@marimo-team/frontend 0.16.1 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ConnectedDataExplorerComponent-2wVcyvDj.js → ConnectedDataExplorerComponent-Brtw1DxF.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-D2j6i0hv.js → ImageComparisonComponent-Dxl-PbZX.js} +1 -1
- package/dist/assets/{VegaLite-BckFaf2D.js → VegaLite-BXQF0Cx_.js} +1 -1
- package/dist/assets/_baseEach-BjSm9ht3.js +1 -0
- package/dist/assets/_baseMap-CV4Ezmtf.js +1 -0
- package/dist/assets/_baseUniq-Ci9yZGxz.js +1 -0
- package/dist/assets/{_createAggregator-C5CVY-0t.js → _createAggregator-VFK9K2d9.js} +1 -1
- package/dist/assets/{agent-panel-RGLNjkYe.js → agent-panel-BoscVLCT.js} +7 -7
- package/dist/assets/{any-language-editor-DjuXwGCA.js → any-language-editor-ChaY_VUU.js} +1 -1
- package/dist/assets/{architectureDiagram-W76B3OCA-Dyj4ds_R.js → architectureDiagram-W76B3OCA-CueUUFYd.js} +1 -1
- package/dist/assets/{between-horizontal-start-Dt2aKpPf.js → between-horizontal-start-DAHqmLYT.js} +1 -1
- package/dist/assets/{blockDiagram-QIGZ2CNN-o-i7DDvN.js → blockDiagram-QIGZ2CNN-BYYygyWn.js} +1 -1
- package/dist/assets/{c4Diagram-FPNF74CW-DGHEwWrx.js → c4Diagram-FPNF74CW-DAz3xEh1.js} +1 -1
- package/dist/assets/channel-6SqQ2U_X.js +1 -0
- package/dist/assets/chat-panel-DJkOLrw9.js +3 -0
- package/dist/assets/{chunk-4BX2VUAB-BJecb-Ri.js → chunk-4BX2VUAB-8g-RyHdt.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-CAATkc4w.js → chunk-55IACEB6-iWZZ8Mt6.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DPuNbQ-f.js → chunk-FMBD7UC4-knjss4wk.js} +1 -1
- package/dist/assets/{chunk-K7UQS3LO-C8TWVLiH.js → chunk-K7UQS3LO-DVIwPBgZ.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-DiZZ09q4.js → chunk-QN33PNHL-CBU8pN6I.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BIUM7usu.js → chunk-QZHKN3VN-5ljElUF4.js} +1 -1
- package/dist/assets/{chunk-TVAH2DTR-vGTArPBG.js → chunk-TVAH2DTR-DkIdGINc.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-D2KRqp_x.js → chunk-TZMSLE5B-CIFOSTqh.js} +1 -1
- package/dist/assets/{circle-play-cjeNez0N.js → circle-play-BOdsbq5u.js} +1 -1
- package/dist/assets/classDiagram-KNZD7YFC-DVqXcTYf.js +1 -0
- package/dist/assets/classDiagram-v2-RKCZMP56-DVqXcTYf.js +1 -0
- package/dist/assets/{clear-button-C97JtAez.js → clear-button-GAjXl0CQ.js} +1 -1
- package/dist/assets/clone-DSDb0xen.js +1 -0
- package/dist/assets/command-palette-BUXkqoLh.js +1 -0
- package/dist/assets/{common-Du9rSOwD.js → common-DahoYqdi.js} +1 -1
- package/dist/assets/{compile-CZXqyOxa.js → compile-Bg8uJ7vm.js} +1 -1
- package/dist/assets/{cose-bilkent-S5V4N54A-CqUN5Y9b.js → cose-bilkent-S5V4N54A-z_0gqD9K.js} +1 -1
- package/dist/assets/{dagre-5GWH7T2D-RJqTI9DM.js → dagre-5GWH7T2D-BMt7CNXL.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-DZN0q1LV.js → data-grid-overlay-editor-Ctn4XtXx.js} +1 -1
- package/dist/assets/datasources-panel-C7sqRIHs.js +1 -0
- package/dist/assets/{dependency-graph-panel-CEog_O7V.js → dependency-graph-panel-DNajptzv.js} +4 -4
- package/dist/assets/{diagram-N5W7TBWH-D-l4zZ9d.js → diagram-N5W7TBWH-BzwvLvAy.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-CCOmBUt-.js → diagram-QEK2KX5R-DRLJ56FS.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-C_I_9jnZ.js → diagram-S2PKOQOG-Bf8x4KTU.js} +1 -1
- package/dist/assets/{documentation-panel-C1BtMZ3M.js → documentation-panel-Dm6Ozl67.js} +1 -1
- package/dist/assets/{edit-page-B-oevUZ9.js → edit-page-CGc9EjuG.js} +53 -42
- package/dist/assets/{ellipsis-vertical-BEb-J8z6.js → ellipsis-vertical-Bj1YXvZe.js} +1 -1
- package/dist/assets/{empty-state-C99UyDE3.js → empty-state-CYev-D31.js} +1 -1
- package/dist/assets/{erDiagram-AWTI2OKA-BePOLi5M.js → erDiagram-AWTI2OKA-DmgzgN_I.js} +1 -1
- package/dist/assets/{error-panel-Bs34jXFh.js → error-panel-BYG4twCa.js} +1 -1
- package/dist/assets/{file-explorer-panel-Ck6UL861.js → file-explorer-panel-BSMiOApi.js} +1 -1
- package/dist/assets/{flowDiagram-PVAE7QVJ-BgjFu5l7.js → flowDiagram-PVAE7QVJ-BdRKkajr.js} +1 -1
- package/dist/assets/{ganttDiagram-OWAHRB6G-YOPb3XSV.js → ganttDiagram-OWAHRB6G-lfRAMnq_.js} +5 -5
- package/dist/assets/{gitGraphDiagram-NY62KEGX-CGhqaDTy.js → gitGraphDiagram-NY62KEGX-CQVTIrHF.js} +1 -1
- package/dist/assets/{glide-data-editor-9QUH6iso.js → glide-data-editor-D5A4pou7.js} +4 -4
- package/dist/assets/{graph-DQQFGrho.js → graph-CBNo279v.js} +1 -1
- package/dist/assets/{home-page-DRKpPCrF.js → home-page-CmdznBJR.js} +2 -2
- package/dist/assets/{index-SGLNXrGP.js → index-0dfGh-Gj.js} +1 -1
- package/dist/assets/{index-aE43R74q.js → index-BDYVSSzB.js} +1 -1
- package/dist/assets/{index-BJNCMUmG.js → index-B_KyDZ94.js} +1 -1
- package/dist/assets/{index-BjgnbONl.js → index-Bfy-I_lW.js} +1 -1
- package/dist/assets/{index-CUFv_thQ.js → index-Bh98Tp-z.js} +1 -1
- package/dist/assets/{index-C2MD0vgD.js → index-BhroIwBL.js} +1 -1
- package/dist/assets/{index-DdnKZNxM.js → index-BtQtesaI.js} +1 -1
- package/dist/assets/index-C0iXCvyY.css +1 -0
- package/dist/assets/index-C1SHFMCp.js +581 -0
- package/dist/assets/{index-C_tkBKNO.js → index-C6DWtSls.js} +1 -1
- package/dist/assets/{index-Aeo6WiK7.js → index-C71cdkH-.js} +1 -1
- package/dist/assets/{index-G5QZppK2.js → index-CT_FTqvK.js} +1 -1
- package/dist/assets/{index-B8jXZ12t.js → index-CU5rRr66.js} +1 -1
- package/dist/assets/{index-BAbIIxHU.js → index-Cb6duXQm.js} +1 -1
- package/dist/assets/{index-BW3k9Gss.js → index-D23e9zQj.js} +1 -1
- package/dist/assets/index-DUGecC2Z.js +68 -0
- package/dist/assets/{index-CFKO7WXI.js → index-DcGIOAQi.js} +1 -1
- package/dist/assets/{index-ClzeQrN7.js → index-PJfa9qXY.js} +1 -1
- package/dist/assets/{index-C1ez98sk.js → index-SPslPC2B.js} +1 -1
- package/dist/assets/{index-BprjMYH5.js → index-VPQlo4Uz.js} +1 -1
- package/dist/assets/{index-CfaDbEdi.js → index-qbTLKWyG.js} +1 -1
- package/dist/assets/infoDiagram-STP46IZ2-DBu8p9gd.js +2 -0
- package/dist/assets/{isEmpty-D-4c7sMv.js → isEmpty-CnOLuQIv.js} +1 -1
- package/dist/assets/{journeyDiagram-BIP6EPQ6-C94u3Mv3.js → journeyDiagram-BIP6EPQ6-6U_vHJBH.js} +1 -1
- package/dist/assets/{kanban-definition-6OIFK2YF-BEXYFzz7.js → kanban-definition-6OIFK2YF-DgnR14ys.js} +1 -1
- package/dist/assets/{layout-Bz2BJ2ru.js → layout-RHmq4fP9.js} +1 -1
- package/dist/assets/{linear-D8s7K76e.js → linear-CLdOVPGV.js} +1 -1
- package/dist/assets/links-Dd1icsEk.js +7 -0
- package/dist/assets/{logs-panel-DC7wpmPz.js → logs-panel-CjbuhBLx.js} +1 -1
- package/dist/assets/{markdown-renderer-DRdSWR9X.js → markdown-renderer-X5YJvAZq.js} +3 -3
- package/dist/assets/{mermaid-Y3x4hmD0.js → mermaid-Bl2T5oEC.js} +1 -1
- package/dist/assets/{mermaid.core-DzthE35Y.js → mermaid.core-CfukBvGI.js} +4 -4
- package/dist/assets/min-BXIes1Za.js +1 -0
- package/dist/assets/{mindmap-definition-Q6HEUPPD-DktvuLe1.js → mindmap-definition-Q6HEUPPD-BXCjP4Lu.js} +1 -1
- package/dist/assets/{number-overlay-editor-BEfwI1IT.js → number-overlay-editor-BUyqkSes.js} +1 -1
- package/dist/assets/{outline-panel-CdsnAy2w.js → outline-panel-BvGcPKdd.js} +1 -1
- package/dist/assets/{packages-panel-DiTA-d_D.js → packages-panel-BichDQWG.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-DQDNQ-de.js → pieDiagram-ADFJNKIX-CMzJFIJM.js} +1 -1
- package/dist/assets/{quadrantDiagram-LMRXKWRM-0kgIXc2-.js → quadrantDiagram-LMRXKWRM-CfGssUlO.js} +1 -1
- package/dist/assets/{react-plotly-DJqqfM7c.js → react-plotly-DR3hV0HW.js} +1 -1
- package/dist/assets/{requirementDiagram-4UW4RH46-B5rb0ypd.js → requirementDiagram-4UW4RH46-CfrFolth.js} +1 -1
- package/dist/assets/{run-page-CFmLrv1R.js → run-page-Bqd_4ePD.js} +1 -1
- package/dist/assets/{sankeyDiagram-GR3RE2ED-Dom7IlnF.js → sankeyDiagram-GR3RE2ED-D_UttKU0.js} +1 -1
- package/dist/assets/{scratchpad-panel-CuHWpHO8.js → scratchpad-panel-D5N15ji1.js} +1 -1
- package/dist/assets/secrets-panel-BpbnAO4R.js +1 -0
- package/dist/assets/{sequenceDiagram-C3RYC4MD-PNJWXQbw.js → sequenceDiagram-C3RYC4MD-MdfQQApP.js} +1 -1
- package/dist/assets/{slides-component-CJgaTRZ0.js → slides-component-C0z7rXmk.js} +1 -1
- package/dist/assets/{snippets-panel-B2EC1txM.js → snippets-panel-wlpZ_Wzx.js} +1 -1
- package/dist/assets/sortBy-BW_zNHP6.js +1 -0
- package/dist/assets/{state-CWict9RU.js → state-CDooX-dk.js} +1 -1
- package/dist/assets/{stateDiagram-KXAO66HF-BE58aJnr.js → stateDiagram-KXAO66HF-H7kfw3ot.js} +1 -1
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-YMeb9qMR.js +1 -0
- package/dist/assets/{storage-DRaR04wR.js → storage-b1QCapTq.js} +6 -6
- package/dist/assets/{terminal-BX3Su5q7.js → terminal-CPV44BXz.js} +1 -1
- package/dist/assets/{time-hUzZfpNE.js → time-DDy3xv5Y.js} +1 -1
- package/dist/assets/{timeline-definition-XQNQX7LJ-CqQP9t51.js → timeline-definition-XQNQX7LJ-J-cPRT2_.js} +1 -1
- package/dist/assets/{tracing-B10Q1n-L.js → tracing-3eHHRUiJ.js} +2 -2
- package/dist/assets/{tracing-panel-Du8WCnno.js → tracing-panel-BMgy3D7d.js} +2 -2
- package/dist/assets/{trash-B81GTiv6.js → trash--tonOuDe.js} +1 -1
- package/dist/assets/{tree-6vW2ogkh.js → tree-ouIGEsVg.js} +1 -1
- package/dist/assets/{treemap-75Q7IDZK-CdwDwwsz.js → treemap-75Q7IDZK-CzJTJ_3R.js} +20 -20
- package/dist/assets/{variable-panel-D5qgJI7k.js → variable-panel-sFTn4Oih.js} +1 -1
- package/dist/assets/{vega-component-DJaJWMJM.js → vega-component-BkPkzX9r.js} +1 -1
- package/dist/assets/{xychartDiagram-6GGTOJPD-WFtXqaM9.js → xychartDiagram-6GGTOJPD-BZ8WOb_8.js} +1 -1
- package/dist/index.html +10 -3
- package/package.json +8 -8
- package/src/__mocks__/common.ts +5 -3
- package/src/__mocks__/notebook.ts +2 -2
- package/src/__mocks__/requests.ts +1 -0
- package/src/__tests__/main.test.tsx +2 -2
- package/src/components/ai/ai-provider-icon.tsx +2 -0
- package/src/components/app-config/ai-config.tsx +32 -1
- package/src/components/app-config/common.tsx +2 -2
- package/src/components/app-config/user-config-form.tsx +26 -0
- package/src/components/audio/audio-recorder.tsx +0 -1
- package/src/components/chat/acp/blocks.tsx +2 -2
- package/src/components/chat/acp/thread.tsx +3 -5
- package/src/components/chat/acp/utils.ts +5 -5
- package/src/components/chat/chat-panel.tsx +1 -1
- package/src/components/data-table/__tests__/columns.test.tsx +38 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +2 -2
- package/src/components/data-table/cell-hover-template/feature.ts +1 -1
- package/src/components/data-table/cell-hover-template/types.ts +1 -1
- package/src/components/data-table/charts/__tests__/altair-generator.test.ts +1 -1
- package/src/components/data-table/charts/chart-spec/tooltips.ts +3 -3
- package/src/components/data-table/charts/components/chart-items.tsx +1 -1
- package/src/components/data-table/charts/components/form-fields.tsx +2 -2
- package/src/components/data-table/charts/constants.ts +1 -1
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +1 -1
- package/src/components/data-table/column-summary/chart-spec-model.tsx +2 -2
- package/src/components/data-table/columns.tsx +22 -3
- package/src/components/data-table/data-table.tsx +35 -3
- package/src/components/data-table/date-popover.tsx +1 -1
- package/src/components/data-table/download-actions.tsx +1 -1
- package/src/components/data-table/range-focus/__tests__/utils.test.ts +5 -5
- package/src/components/data-table/renderers.tsx +22 -13
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +1 -1
- package/src/components/data-table/schemas.ts +16 -0
- package/src/components/data-table/types.ts +4 -3
- package/src/components/datasources/column-preview.tsx +9 -6
- package/src/components/debugger/debugger-code.tsx +1 -1
- package/src/components/dependency-graph/custom-node.tsx +15 -6
- package/src/components/dependency-graph/dependency-graph-minimap.tsx +2 -2
- package/src/components/dependency-graph/dependency-graph-tree.tsx +2 -2
- package/src/components/dependency-graph/dependency-graph.tsx +1 -1
- package/src/components/dependency-graph/elements.ts +7 -7
- package/src/components/dependency-graph/utils/changes.ts +4 -4
- package/src/components/editor/Cell.tsx +7 -1
- package/src/components/editor/ai/transport/chat-transport.tsx +1 -1
- package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +1 -1
- package/src/components/editor/chrome/panels/packages-panel.tsx +1 -1
- package/src/components/editor/columns/storage.ts +1 -1
- package/src/components/editor/database/__tests__/__snapshots__/as-code.test.ts.snap +36 -0
- package/src/components/editor/database/__tests__/as-code.test.ts +30 -7
- package/src/components/editor/database/add-database-form.tsx +11 -0
- package/src/components/editor/database/as-code.ts +104 -5
- package/src/components/editor/database/schemas.ts +36 -18
- package/src/components/editor/errors/auto-fix.tsx +12 -2
- package/src/components/editor/errors/sql-validation-errors.tsx +40 -0
- package/src/components/editor/navigation/clipboard.ts +2 -2
- package/src/components/editor/output/ConsoleOutput.tsx +14 -2
- package/src/components/editor/output/JsonOutput.tsx +1 -1
- package/src/components/editor/output/MarimoErrorOutput.tsx +60 -1
- package/src/components/editor/output/MarimoTracebackOutput.tsx +17 -2
- package/src/components/editor/renderers/grid-layout/types.ts +2 -2
- package/src/components/editor/renderers/plugins.ts +1 -1
- package/src/components/editor/renderers/types.ts +1 -1
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +7 -7
- package/src/components/forms/form.tsx +5 -5
- package/src/components/ui/links.tsx +1 -0
- package/src/core/ai/__tests__/model-registry.test.ts +0 -10
- package/src/core/ai/context/providers/cell-output.ts +1 -18
- package/src/core/ai/context/providers/error.ts +2 -2
- package/src/core/ai/ids/ids.ts +1 -0
- package/src/core/ai/model-registry.ts +2 -1
- package/src/core/cells/cells.ts +5 -5
- package/src/core/cells/logs.ts +1 -1
- package/src/core/cells/types.ts +1 -1
- package/src/core/codemirror/__tests__/format.test.ts +6 -0
- package/src/core/codemirror/cells/traceback-decorations.ts +1 -1
- package/src/core/codemirror/editing/commands.ts +2 -2
- package/src/core/codemirror/find-replace/navigate.ts +1 -1
- package/src/core/codemirror/language/__tests__/extension.test.ts +24 -0
- package/src/core/codemirror/language/__tests__/sql-validation.test.ts +133 -0
- package/src/core/codemirror/language/__tests__/sql.test.ts +764 -79
- package/src/core/codemirror/language/languages/markdown.ts +4 -1
- package/src/core/codemirror/language/languages/sql/banner-validation-errors.ts +85 -0
- package/src/core/codemirror/language/languages/sql/completion-builder.ts +160 -0
- package/src/core/codemirror/language/languages/sql/completion-sources.tsx +9 -3
- package/src/core/codemirror/language/languages/sql/completion-store.ts +46 -50
- package/src/core/codemirror/language/languages/sql/renderers.tsx +485 -0
- package/src/core/codemirror/language/languages/sql/sql-mode.ts +20 -0
- package/src/core/codemirror/language/languages/sql/sql.ts +218 -4
- package/src/core/codemirror/language/languages/sql/utils.ts +4 -1
- package/src/core/codemirror/language/panel/panel.tsx +8 -2
- package/src/core/codemirror/language/panel/sql.tsx +86 -4
- package/src/core/codemirror/language/utils/ast.ts +3 -3
- package/src/core/codemirror/lsp/federated-lsp.ts +4 -4
- package/src/core/codemirror/lsp/lens.ts +4 -4
- package/src/core/codemirror/lsp/notebook-lsp.ts +1 -1
- package/src/core/codemirror/lsp/types.ts +1 -1
- package/src/core/codemirror/markdown/completions.ts +1 -1
- package/src/core/codemirror/reactive-references/analyzer.ts +2 -2
- package/src/core/codemirror/rtc/loro/awareness.ts +1 -1
- package/src/core/config/config-schema.ts +1 -0
- package/src/core/config/feature-flag.tsx +6 -2
- package/src/core/datasets/request-registry.ts +24 -1
- package/src/core/dom/events.ts +1 -1
- package/src/core/dom/outline.ts +2 -2
- package/src/core/dom/uiregistry.ts +2 -8
- package/src/core/errors/__tests__/errors.test.ts +22 -4
- package/src/core/errors/errors.ts +29 -1
- package/src/core/errors/state.ts +1 -1
- package/src/core/islands/bridge.ts +1 -0
- package/src/core/islands/main.ts +3 -2
- package/src/core/islands/parse.ts +1 -3
- package/src/core/kernel/messages.ts +2 -1
- package/src/core/network/CachingRequestRegistry.ts +74 -0
- package/src/core/network/DeferredRequestRegistry.ts +3 -1
- package/src/core/network/__tests__/CachingRequestRegistry.test.ts +73 -0
- package/src/core/network/requests-network.ts +7 -0
- package/src/core/network/requests-static.ts +1 -0
- package/src/core/network/requests-toasting.ts +1 -0
- package/src/core/network/types.ts +3 -1
- package/src/core/variables/state.ts +2 -2
- package/src/core/wasm/__tests__/state.test.ts +1 -1
- package/src/core/wasm/bridge.ts +5 -0
- package/src/core/websocket/useMarimoWebSocket.tsx +9 -2
- package/src/custom.d.ts +1 -1
- package/src/hooks/useCellRenderCount.ts +1 -0
- package/src/hooks/useResizeHandle.ts +4 -1
- package/src/plugins/core/RenderHTML.tsx +1 -2
- package/src/plugins/core/registerReactComponent.tsx +23 -19
- package/src/plugins/impl/DataTablePlugin.tsx +18 -6
- package/src/plugins/impl/FileUploadPlugin.tsx +1 -1
- package/src/plugins/impl/RefreshPlugin.tsx +1 -1
- package/src/plugins/impl/SliderPlugin.tsx +4 -0
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +27 -9
- package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +58 -2
- package/src/plugins/impl/anywidget/__tests__/model.test.ts +3 -4
- package/src/plugins/impl/anywidget/model.ts +2 -3
- package/src/plugins/impl/data-editor/types.ts +1 -1
- package/src/plugins/impl/data-explorer/components/query-form.tsx +1 -1
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +17 -5
- package/src/plugins/impl/data-frames/types.ts +1 -1
- package/src/plugins/impl/panel/PanelPlugin.tsx +2 -2
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +3 -3
- package/src/plugins/impl/vega/__tests__/loader.test.ts +2 -2
- package/src/plugins/impl/vega/loader.ts +1 -1
- package/src/plugins/impl/vega/vega-component.tsx +1 -1
- package/src/plugins/impl/vega/vega-loader.ts +2 -2
- package/src/plugins/layout/NavigationMenuPlugin.tsx +1 -1
- package/src/plugins/layout/RoutesPlugin.tsx +1 -2
- package/src/plugins/plugins.ts +2 -2
- package/src/stories/dataframe.stories.tsx +2 -0
- package/src/utils/Logger.ts +1 -1
- package/src/utils/__tests__/data-views.test.ts +30 -68
- package/src/utils/__tests__/dom.test.ts +167 -0
- package/src/utils/__tests__/id-tree.test.ts +49 -1
- package/src/utils/__tests__/storage.test.ts +1 -1
- package/src/utils/__tests__/traceback.test.ts +13 -2
- package/src/utils/arrays.ts +1 -1
- package/src/utils/createReducer.ts +1 -5
- package/src/utils/data-views.ts +6 -19
- package/src/utils/dom.ts +55 -0
- package/src/utils/edit-distance.ts +1 -1
- package/src/utils/fileToBase64.ts +1 -1
- package/src/utils/id-tree.tsx +20 -18
- package/src/utils/json/base64.ts +13 -0
- package/src/utils/json/json-parser.ts +2 -2
- package/src/utils/lru.ts +4 -0
- package/src/utils/mergeRefs.ts +1 -1
- package/src/utils/objects.ts +3 -3
- package/src/utils/pluralize.ts +1 -1
- package/src/utils/routes.ts +2 -2
- package/src/utils/sets.ts +1 -1
- package/src/utils/traceback.ts +45 -15
- package/src/utils/tracer.ts +11 -9
- package/dist/assets/_baseEach-CvTX9w0Y.js +0 -1
- package/dist/assets/_baseMap-CtlwA90f.js +0 -1
- package/dist/assets/_baseUniq-BKktIGQ1.js +0 -1
- package/dist/assets/channel-Co6iMgWq.js +0 -1
- package/dist/assets/chat-panel-9alr8FS4.js +0 -3
- package/dist/assets/classDiagram-KNZD7YFC-BbJ0rY3y.js +0 -1
- package/dist/assets/classDiagram-v2-RKCZMP56-BbJ0rY3y.js +0 -1
- package/dist/assets/clone-BMP0PsTa.js +0 -1
- package/dist/assets/command-palette-B93Pjcky.js +0 -1
- package/dist/assets/datasources-panel-v7H3cR0p.js +0 -1
- package/dist/assets/index-2252nrk6.js +0 -68
- package/dist/assets/index-C7CoaNFb.js +0 -578
- package/dist/assets/index-DadI618h.css +0 -1
- package/dist/assets/infoDiagram-STP46IZ2-CJLOpSAf.js +0 -2
- package/dist/assets/links-BpXlz1GG.js +0 -7
- package/dist/assets/min-BBO3-1Hg.js +0 -1
- package/dist/assets/secrets-panel-CfHc5YD0.js +0 -1
- package/dist/assets/sortBy-DZnlX29-.js +0 -1
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-CdThjimL.js +0 -1
- package/src/__tests__/lru.test.ts +0 -74
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ot,d as ze,r as fe,dj as at,cM as Ce,fq as ht,L as ye,j as _e,a8 as ct,T as je,fb as lt,$ as dt,fr as _t,a as ut,fs as ft,__tla as vt}from"./index-C7CoaNFb.js";import{u as gt,a as pt}from"./state-CWict9RU.js";import{j as mt,__tla as St}from"./edit-page-B-oevUZ9.js";import"./links-BpXlz1GG.js";import{__tla as Ct}from"./storage-DRaR04wR.js";import"./index-Aeo6WiK7.js";import"./index-CfaDbEdi.js";import"./index-BjgnbONl.js";import"./index-CUFv_thQ.js";import"./index-DdnKZNxM.js";import"./index-C_tkBKNO.js";import"./index-BJNCMUmG.js";import"./index-CFKO7WXI.js";import"./index-aE43R74q.js";import"./index-BAbIIxHU.js";import"./index-ClzeQrN7.js";import"./index-G5QZppK2.js";import"./index-C2MD0vgD.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asn1-DWPaVWf6.js";import"./brainfuck-CtZaYBKt.js";import"./cobol-stawOqaz.js";import"./clike-BgBwzOhw.js";import"./clojure-DiuoqK-z.js";import"./css-ZjFoif2m.js";import"./cmake-DXn5xaP-.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./cypher-gJDei3ni.js";import"./python-DD-Q2bae.js";import"./crystal-CRzZ78HM.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./simple-mode-C3vEBAcb.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./mllike-3c2dg9RT.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./idl-pcmmZuaN.js";import"./javascript-BpzJj0-u.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mirc-DkvFAiy5.js";import"./mathematica-IIbmv7SK.js";import"./modelica-DSrSSXCg.js";import"./mumps-zvxmGV4l.js";import"./mbox-z_N2Mo3d.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./pug-BTvK5tSS.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./rpm-DI_rRufH.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./sparql-BRLJFz69.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./verilog-B4LBqg_1.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./ttcn-cfg-CKJxb-l2.js";import"./turtle-BkSuIpt-.js";import"./webidl-CGwyPRYs.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./vhdl-CWWH2SUo.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";import"./mscgen-B2igx18G.js";import"./index-C1ez98sk.js";import"./trash-B81GTiv6.js";import"./_createAggregator-C5CVY-0t.js";import"./_baseEach-CvTX9w0Y.js";import{__tla as bt}from"./loro_wasm_bg-C1ks32Vm.js";let qe,wt=Promise.all([(()=>{try{return vt}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return bt}catch{}})()]).then(async()=>{const Ve=ot("text-select",[["path",{d:"M14 21h1",key:"v9vybs"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M21 14v1",key:"169vum"}],["path",{d:"M21 19a2 2 0 0 1-2 2",key:"1j7049"}],["path",{d:"M21 9v1",key:"mxsmne"}],["path",{d:"M3 14v1",key:"vnatye"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h6",key:"1vyc9m"}],["path",{d:"M7 8h8",key:"1jbsf9"}],["path",{d:"M9 21h1",key:"15o7lz"}],["path",{d:"M9 3h1",key:"1yesri"}]]);var xe,Le={exports:{}},be,Ee,Xe=xe?Le.exports:(xe=1,Le.exports=(be={},(()=>{var ne=be;function G(N,V,F){return N.addEventListener(V,F),{dispose:()=>{F&&N.removeEventListener(V,F)}}}Object.defineProperty(ne,"__esModule",{value:!0}),ne.AttachAddon=void 0,ne.AttachAddon=class{constructor(N,V){this._disposables=[],this._socket=N,this._socket.binaryType="arraybuffer",this._bidirectional=!(V&&V.bidirectional===!1)}activate(N){this._disposables.push(G(this._socket,"message",V=>{const F=V.data;N.write(typeof F=="string"?F:new Uint8Array(F))})),this._bidirectional&&(this._disposables.push(N.onData(V=>this._sendData(V))),this._disposables.push(N.onBinary(V=>this._sendBinary(V)))),this._disposables.push(G(this._socket,"close",()=>this.dispose())),this._disposables.push(G(this._socket,"error",()=>this.dispose()))}dispose(){for(const N of this._disposables)N.dispose()}_sendData(N){this._checkOpenSocket()&&this._socket.send(N)}_sendBinary(N){if(!this._checkOpenSocket())return;const V=new Uint8Array(N.length);for(let F=0;F<N.length;++F)V[F]=255&N.charCodeAt(F);this._socket.send(V)}_checkOpenSocket(){switch(this._socket.readyState){case WebSocket.OPEN:return!0;case WebSocket.CONNECTING:throw new Error("Attach addon was loaded before socket was open");case WebSocket.CLOSING:return console.warn("Attach addon socket is closing"),!1;case WebSocket.CLOSED:throw new Error("Attach addon socket is closed");default:throw new Error("Unexpected socket state")}}}})(),be)),ke={exports:{}},De,Re,Je=Ee?ke.exports:(Ee=1,De=()=>(()=>{var ne={903:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.BaseRenderLayer=void 0;const a=n(274),c=n(627),u=n(237),o=n(860),h=n(374),d=n(296),_=n(345),r=n(859),t=n(399),i=n(855);class e extends r.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var v;return(v=this._charAtlas)==null?void 0:v.pages[0].canvas}constructor(v,g,p,f,m,C,w,L,y,R){super(),this._terminal=v,this._container=g,this._alpha=m,this._themeService=C,this._bufferService=w,this._optionsService=L,this._decorationService=y,this._coreBrowserService=R,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,d.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new r.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new _.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new a.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${p}-layer`),this._canvas.style.zIndex=f.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors(A=>{this._refreshCharAtlas(A),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)})),this.register((0,r.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,h.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(v,g){}handleSelectionChanged(v,g,p=!1){this._selectionModel.update(this._terminal._core,v,g,p)}_setTransparency(v){if(v===this._alpha)return;const g=this._canvas;this._alpha=v,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,g),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(v){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,c.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,v,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,_.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let g=0;g<this._charAtlas.pages.length;g++)this._bitmapGenerator[g]=new s(this._charAtlas.pages[g].canvas)}}resize(v){this._deviceCellWidth=v.device.cell.width,this._deviceCellHeight=v.device.cell.height,this._deviceCharWidth=v.device.char.width,this._deviceCharHeight=v.device.char.height,this._deviceCharLeft=v.device.char.left,this._deviceCharTop=v.device.char.top,this._canvas.width=v.device.canvas.width,this._canvas.height=v.device.canvas.height,this._canvas.style.width=`${v.css.canvas.width}px`,this._canvas.style.height=`${v.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var v;(v=this._charAtlas)==null||v.clearTexture()}_fillCells(v,g,p,f){this._ctx.fillRect(v*this._deviceCellWidth,g*this._deviceCellHeight,p*this._deviceCellWidth,f*this._deviceCellHeight)}_fillMiddleLineAtCells(v,g,p=1){const f=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(v*this._deviceCellWidth,(g+1)*this._deviceCellHeight-f-this._coreBrowserService.dpr,p*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(v,g,p=1,f=0){this._ctx.fillRect(v*this._deviceCellWidth,(g+1)*this._deviceCellHeight+f-this._coreBrowserService.dpr-1,p*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(v,g,p=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const f=this._coreBrowserService.dpr;this._ctx.lineWidth=f;for(let m=0;m<p;m++){const C=(v+m)*this._deviceCellWidth,w=(v+m+.5)*this._deviceCellWidth,L=(v+m+1)*this._deviceCellWidth,y=(g+1)*this._deviceCellHeight-f-1,R=y-f,A=y+f;this._ctx.moveTo(C,y),this._ctx.bezierCurveTo(C,R,w,R,w,y),this._ctx.bezierCurveTo(w,A,L,A,L,y)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(v,g,p=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const f=this._coreBrowserService.dpr;this._ctx.lineWidth=f,this._ctx.setLineDash([2*f,f]);const m=v*this._deviceCellWidth,C=(g+1)*this._deviceCellHeight-f-1;this._ctx.moveTo(m,C);for(let w=0;w<p;w++){const L=(v+p+w)*this._deviceCellWidth;this._ctx.lineTo(L,C)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(v,g,p=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const f=this._coreBrowserService.dpr;this._ctx.lineWidth=f,this._ctx.setLineDash([4*f,3*f]);const m=v*this._deviceCellWidth,C=(v+p)*this._deviceCellWidth,w=(g+1)*this._deviceCellHeight-f-1;this._ctx.moveTo(m,w),this._ctx.lineTo(C,w),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(v,g,p){this._ctx.fillRect(v*this._deviceCellWidth,g*this._deviceCellHeight,this._coreBrowserService.dpr*p,this._deviceCellHeight)}_strokeRectAtCell(v,g,p,f){const m=this._coreBrowserService.dpr;this._ctx.lineWidth=m,this._ctx.strokeRect(v*this._deviceCellWidth+m/2,g*this._deviceCellHeight+m/2,p*this._deviceCellWidth-m,f*this._deviceCellHeight-m)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(v,g,p,f){this._alpha?this._ctx.clearRect(v*this._deviceCellWidth,g*this._deviceCellHeight,p*this._deviceCellWidth,f*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(v*this._deviceCellWidth,g*this._deviceCellHeight,p*this._deviceCellWidth,f*this._deviceCellHeight))}_fillCharTrueColor(v,g,p){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=u.TEXT_BASELINE,this._clipRow(p);let f=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(f=(0,o.tryDrawCustomChar)(this._ctx,v.getChars(),g*this._deviceCellWidth,p*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),f||this._ctx.fillText(v.getChars(),g*this._deviceCellWidth+this._deviceCharLeft,p*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(v,g,p){var y,R,A,B;const f=v.getChars(),m=v.getCode(),C=v.getWidth();if(this._cellColorResolver.resolve(v,g,this._bufferService.buffer.ydisp+p,this._deviceCellWidth),!this._charAtlas)return;let w;if(w=f&&f.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(f,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(v.getCode()||i.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!w.size.x||!w.size.y)return;this._ctx.save(),this._clipRow(p),this._bitmapGenerator[w.texturePage]&&this._charAtlas.pages[w.texturePage].canvas!==this._bitmapGenerator[w.texturePage].canvas&&((R=(y=this._bitmapGenerator[w.texturePage])==null?void 0:y.bitmap)==null||R.close(),delete this._bitmapGenerator[w.texturePage]),this._charAtlas.pages[w.texturePage].version!==((A=this._bitmapGenerator[w.texturePage])==null?void 0:A.version)&&(this._bitmapGenerator[w.texturePage]||(this._bitmapGenerator[w.texturePage]=new s(this._charAtlas.pages[w.texturePage].canvas)),this._bitmapGenerator[w.texturePage].refresh(),this._bitmapGenerator[w.texturePage].version=this._charAtlas.pages[w.texturePage].version);let L=w.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,h.allowRescaling)(m,C,w.size.x,this._deviceCellWidth)&&(L=this._deviceCellWidth-1),this._ctx.drawImage(((B=this._bitmapGenerator[w.texturePage])==null?void 0:B.bitmap)||this._charAtlas.pages[w.texturePage].canvas,w.texturePosition.x,w.texturePosition.y,w.size.x,w.size.y,g*this._deviceCellWidth+this._deviceCharLeft-w.offset.x,p*this._deviceCellHeight+this._deviceCharTop-w.offset.y,L,w.size.y),this._ctx.restore()}_clipRow(v){this._ctx.beginPath(),this._ctx.rect(0,v*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(v,g){return`${g?"italic":""} ${v?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}S.BaseRenderLayer=e;class s{get bitmap(){return this._bitmap}constructor(v){this.canvas=v,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var v;(v=this._bitmap)==null||v.close(),this._bitmap=void 0,t.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout(()=>this._generate(),100)),this._state===1&&(this._state=2))}_generate(){var v;this._state===0&&((v=this._bitmap)==null||v.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then(g=>{this._state===2?this.refresh():this._bitmap=g,this._state=0}),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.CanvasRenderer=void 0;const a=n(627),c=n(56),u=n(374),o=n(345),h=n(859),d=n(873),_=n(43),r=n(630),t=n(744);class i extends h.Disposable{constructor(s,l,v,g,p,f,m,C,w,L,y){super(),this._terminal=s,this._screenElement=l,this._bufferService=g,this._charSizeService=p,this._optionsService=f,this._coreBrowserService=w,this._themeService=y,this._observerDisposable=this.register(new h.MutableDisposable),this._onRequestRedraw=this.register(new o.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new o.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new o.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const R=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new t.TextRenderLayer(this._terminal,this._screenElement,0,R,this._bufferService,this._optionsService,m,L,this._coreBrowserService,y),new r.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,L,this._optionsService,y),new _.LinkRenderLayer(this._terminal,this._screenElement,2,v,this._bufferService,this._optionsService,L,this._coreBrowserService,y),new d.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,C,this._coreBrowserService,L,y)];for(const A of this._renderLayers)(0,o.forwardEvent)(A.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,u.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,c.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,(A,B)=>this._setCanvasDevicePixelDimensions(A,B)),this.register(this._coreBrowserService.onWindowChange(A=>{this._observerDisposable.value=(0,c.observeDevicePixelDimensions)(this._renderLayers[0].canvas,A,(B,T)=>this._setCanvasDevicePixelDimensions(B,T))})),this.register((0,h.toDisposable)(()=>{for(const A of this._renderLayers)A.dispose();(0,a.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(s,l){this._updateDimensions();for(const v of this._renderLayers)v.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation(s=>s.handleBlur())}handleFocus(){this._runOperation(s=>s.handleFocus())}handleSelectionChanged(s,l,v=!1){this._runOperation(g=>g.handleSelectionChanged(s,l,v)),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation(s=>s.handleCursorMove())}clear(){this._runOperation(s=>s.reset())}_runOperation(s){for(const l of this._renderLayers)s(l)}renderRows(s,l){for(const v of this._renderLayers)v.handleGridChanged(s,l)}clearTextureAtlas(){for(const s of this._renderLayers)s.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const s=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*s),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*s),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/s),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/s),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(s,l){this.dimensions.device.canvas.height=l,this.dimensions.device.canvas.width=s;for(const v of this._renderLayers)v.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}S.CanvasRenderer=i},873:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.CursorRenderLayer=void 0;const a=n(457),c=n(859),u=n(399),o=n(782),h=n(903);class d extends h.BaseRenderLayer{constructor(r,t,i,e,s,l,v,g,p,f){super(r,t,"cursor",i,!0,f,s,l,p,g),this._onRequestRedraw=e,this._coreService=v,this._cursorBlinkStateManager=this.register(new c.MutableDisposable),this._cell=new o.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(l.onOptionChange(()=>this._handleOptionsChanged())),this._handleOptionsChanged()}resize(r){super.resize(r),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var r;this._clearCursor(),(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var r;(r=this._cursorBlinkStateManager.value)==null||r.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var r;(r=this._cursorBlinkStateManager.value)==null||r.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new a.CursorBlinkStateManager(()=>this._render(!0),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var r;(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation()}handleGridChanged(r,t){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(r){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,i=t-this._bufferService.buffer.ydisp;if(i<0||i>=this._bufferService.rows)return void this._clearCursor();const e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(t).loadCell(e,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const s=this._optionsService.rawOptions.cursorStyle,l=this._optionsService.rawOptions.cursorInactiveStyle;return l&&l!=="none"&&this._cursorRenderers[l](e,i,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=i,this._state.isFocused=!1,this._state.style=s,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===e&&this._state.y===i&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](e,i,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=i,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(u.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(r,t,i){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(r,t,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(r,t,i){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(r,t,i.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(i,r,t),this._ctx.restore()}_renderUnderlineCursor(r,t,i){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(r,t),this._ctx.restore()}_renderOutlineCursor(r,t,i){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(r,t,i.getWidth(),1),this._ctx.restore()}}S.CursorRenderLayer=d},574:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.GridCache=void 0,S.GridCache=class{constructor(){this.cache=[]}resize(n,a){for(let c=0;c<n;c++){this.cache.length<=c&&this.cache.push([]);for(let u=this.cache[c].length;u<a;u++)this.cache[c].push(void 0);this.cache[c].length=a}this.cache.length=n}clear(){for(let n=0;n<this.cache.length;n++)for(let a=0;a<this.cache[n].length;a++)this.cache[n][a]=void 0}}},43:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.LinkRenderLayer=void 0;const a=n(197),c=n(237),u=n(903);class o extends u.BaseRenderLayer{constructor(d,_,r,t,i,e,s,l,v){super(d,_,"link",r,!0,v,i,e,s,l),this.register(t.onShowLinkUnderline(g=>this._handleShowLinkUnderline(g))),this.register(t.onHideLinkUnderline(g=>this._handleHideLinkUnderline(g)))}resize(d){super.resize(d),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const d=this._state.y2-this._state.y1-1;d>0&&this._clearCells(0,this._state.y1+1,this._state.cols,d),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(d){if(d.fg===c.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:d.fg&&(0,a.is256Color)(d.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[d.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,d.y1===d.y2)this._fillBottomLineAtCells(d.x1,d.y1,d.x2-d.x1);else{this._fillBottomLineAtCells(d.x1,d.y1,d.cols-d.x1);for(let _=d.y1+1;_<d.y2;_++)this._fillBottomLineAtCells(0,_,d.cols);this._fillBottomLineAtCells(0,d.y2,d.x2)}this._state=d}_handleHideLinkUnderline(d){this._clearCurrentLink()}}S.LinkRenderLayer=o},630:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.SelectionRenderLayer=void 0;const a=n(903);class c extends a.BaseRenderLayer{constructor(o,h,d,_,r,t,i,e){super(o,h,"selection",d,!0,e,_,i,t,r),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(o){super.resize(o),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(o,h,d){super.handleSelectionChanged(o,h,d),this._redrawSelection(o,h,d)}_redrawSelection(o,h,d){if(!this._didStateChange(o,h,d,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!o||!h)return void this._clearState();const _=o[1]-this._bufferService.buffer.ydisp,r=h[1]-this._bufferService.buffer.ydisp,t=Math.max(_,0),i=Math.min(r,this._bufferService.rows-1);if(t>=this._bufferService.rows||i<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,d){const e=o[0],s=h[0]-e,l=i-t+1;this._fillCells(e,t,s,l)}else{const e=_===t?o[0]:0,s=t===r?h[0]:this._bufferService.cols;this._fillCells(e,t,s-e,1);const l=Math.max(i-t-1,0);if(this._fillCells(0,t+1,this._bufferService.cols,l),t!==i){const v=r===i?h[0]:this._bufferService.cols;this._fillCells(0,i,v,1)}}this._state.start=[o[0],o[1]],this._state.end=[h[0],h[1]],this._state.columnSelectMode=d,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(o,h,d,_){return!this._areCoordinatesEqual(o,this._state.start)||!this._areCoordinatesEqual(h,this._state.end)||d!==this._state.columnSelectMode||_!==this._state.ydisp}_areCoordinatesEqual(o,h){return!(!o||!h)&&o[0]===h[0]&&o[1]===h[1]}}S.SelectionRenderLayer=c},744:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.TextRenderLayer=void 0;const a=n(577),c=n(147),u=n(782),o=n(855),h=n(903),d=n(574);class _ extends h.BaseRenderLayer{constructor(t,i,e,s,l,v,g,p,f,m){super(t,i,"text",e,s,m,l,v,p,f),this._characterJoinerService=g,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new u.CellData,this._state=new d.GridCache,this.register(v.onSpecificOptionChange("allowTransparency",C=>this._setTransparency(C)))}resize(t){super.resize(t);const i=this._getFont(!1,!1);this._characterWidth===t.device.char.width&&this._characterFont===i||(this._characterWidth=t.device.char.width,this._characterFont=i,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(t,i,e){for(let s=t;s<=i;s++){const l=s+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.lines.get(l),g=this._characterJoinerService.getJoinedCharacters(l);for(let p=0;p<this._bufferService.cols;p++){v.loadCell(p,this._workCell);let f=this._workCell,m=!1,C=p;if(f.getWidth()!==0){if(g.length>0&&p===g[0][0]){m=!0;const w=g.shift();f=new a.JoinedCellData(this._workCell,v.translateToString(!0,w[0],w[1]),w[1]-w[0]),C=w[1]-1}!m&&this._isOverlapping(f)&&C<v.length-1&&v.getCodePoint(C+1)===o.NULL_CELL_CODE&&(f.content&=-12582913,f.content|=8388608),e(f,p,s),p=C}}}}_drawBackground(t,i){const e=this._ctx,s=this._bufferService.cols;let l=0,v=0,g=null;e.save(),this._forEachCell(t,i,(p,f,m)=>{let C=null;p.isInverse()?C=p.isFgDefault()?this._themeService.colors.foreground.css:p.isFgRGB()?`rgb(${c.AttributeData.toColorRGB(p.getFgColor()).join(",")})`:this._themeService.colors.ansi[p.getFgColor()].css:p.isBgRGB()?C=`rgb(${c.AttributeData.toColorRGB(p.getBgColor()).join(",")})`:p.isBgPalette()&&(C=this._themeService.colors.ansi[p.getBgColor()].css);let w=!1;this._decorationService.forEachDecorationAtCell(f,this._bufferService.buffer.ydisp+m,void 0,L=>{L.options.layer!=="top"&&w||(L.backgroundColorRGB&&(C=L.backgroundColorRGB.css),w=L.options.layer==="top")}),g===null&&(l=f,v=m),m!==v?(e.fillStyle=g||"",this._fillCells(l,v,s-l,1),l=f,v=m):g!==C&&(e.fillStyle=g||"",this._fillCells(l,v,f-l,1),l=f,v=m),g=C}),g!==null&&(e.fillStyle=g,this._fillCells(l,v,s-l,1)),e.restore()}_drawForeground(t,i){this._forEachCell(t,i,(e,s,l)=>this._drawChars(e,s,l))}handleGridChanged(t,i){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,t,this._bufferService.cols,i-t+1),this._drawBackground(t,i),this._drawForeground(t,i))}_isOverlapping(t){if(t.getWidth()!==1||t.getCode()<256)return!1;const i=t.getChars();if(this._characterOverlapCache.hasOwnProperty(i))return this._characterOverlapCache[i];this._ctx.save(),this._ctx.font=this._characterFont;const e=Math.floor(this._ctx.measureText(i).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[i]=e,e}}S.TextRenderLayer=_},274:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.CellColorResolver=void 0;const a=n(855),c=n(160),u=n(374);let o,h=0,d=0,_=!1,r=!1,t=!1,i=0;S.CellColorResolver=class{constructor(e,s,l,v,g,p){this._terminal=e,this._optionService=s,this._selectionRenderModel=l,this._decorationService=v,this._coreBrowserService=g,this._themeService=p,this.result={fg:0,bg:0,ext:0}}resolve(e,s,l,v){if(this.result.bg=e.bg,this.result.fg=e.fg,this.result.ext=268435456&e.bg?e.extended.ext:0,d=0,h=0,r=!1,_=!1,t=!1,o=this._themeService.colors,i=0,e.getCode()!==a.NULL_CELL_CODE&&e.extended.underlineStyle===4){const g=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));i=s*v%(2*Math.round(g))}if(this._decorationService.forEachDecorationAtCell(s,l,"bottom",g=>{g.backgroundColorRGB&&(d=g.backgroundColorRGB.rgba>>8&16777215,r=!0),g.foregroundColorRGB&&(h=g.foregroundColorRGB.rgba>>8&16777215,_=!0)}),t=this._selectionRenderModel.isCellSelected(this._terminal,s,l),t){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:d=(16777215&this.result.fg)<<8|255;break;default:d=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:d=(16777215&this.result.bg)<<8|255}d=c.rgba.blend(d,4294967040&(this._coreBrowserService.isFocused?o.selectionBackgroundOpaque:o.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else d=(this._coreBrowserService.isFocused?o.selectionBackgroundOpaque:o.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,o.selectionForeground&&(h=o.selectionForeground.rgba>>8&16777215,_=!0),(0,u.treatGlyphAsBackgroundColor)(e.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))h=(this._coreBrowserService.isFocused?o.selectionBackgroundOpaque:o.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:h=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:h=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:h=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:h=(16777215&this.result.fg)<<8|255;break;default:h=this._themeService.colors.foreground.rgba}h=c.rgba.blend(h,4294967040&(this._coreBrowserService.isFocused?o.selectionBackgroundOpaque:o.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}_=!0}}this._decorationService.forEachDecorationAtCell(s,l,"top",g=>{g.backgroundColorRGB&&(d=g.backgroundColorRGB.rgba>>8&16777215,r=!0),g.foregroundColorRGB&&(h=g.foregroundColorRGB.rgba>>8&16777215,_=!0)}),r&&(d=t?-16777216&e.bg&-134217729|d|50331648:-16777216&e.bg|d|50331648),_&&(h=-16777216&e.fg&-67108865|h|50331648),67108864&this.result.fg&&(r&&!_&&(h=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&o.background.rgba>>8|50331648,_=!0),!r&&_&&(d=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&o.foreground.rgba>>8|50331648,r=!0)),o=void 0,this.result.bg=r?d:this.result.bg,this.result.fg=_?h:this.result.fg,this.result.ext&=536870911,this.result.ext|=i<<29&3758096384}}},627:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.removeTerminalFromCache=S.acquireTextureAtlas=void 0;const a=n(509),c=n(197),u=[];S.acquireTextureAtlas=function(o,h,d,_,r,t,i,e){const s=(0,c.generateConfig)(_,r,t,i,h,d,e);for(let g=0;g<u.length;g++){const p=u[g],f=p.ownedBy.indexOf(o);if(f>=0){if((0,c.configEquals)(p.config,s))return p.atlas;p.ownedBy.length===1?(p.atlas.dispose(),u.splice(g,1)):p.ownedBy.splice(f,1);break}}for(let g=0;g<u.length;g++){const p=u[g];if((0,c.configEquals)(p.config,s))return p.ownedBy.push(o),p.atlas}const l=o._core,v={atlas:new a.TextureAtlas(document,s,l.unicodeService),config:s,ownedBy:[o]};return u.push(v),v.atlas},S.removeTerminalFromCache=function(o){for(let h=0;h<u.length;h++){const d=u[h].ownedBy.indexOf(o);if(d!==-1){u[h].ownedBy.length===1?(u[h].atlas.dispose(),u.splice(h,1)):u[h].ownedBy.splice(d,1);break}}}},197:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.is256Color=S.configEquals=S.generateConfig=void 0;const a=n(160);S.generateConfig=function(c,u,o,h,d,_,r){const t={foreground:_.foreground,background:_.background,cursor:a.NULL_COLOR,cursorAccent:a.NULL_COLOR,selectionForeground:a.NULL_COLOR,selectionBackgroundTransparent:a.NULL_COLOR,selectionBackgroundOpaque:a.NULL_COLOR,selectionInactiveBackgroundTransparent:a.NULL_COLOR,selectionInactiveBackgroundOpaque:a.NULL_COLOR,ansi:_.ansi.slice(),contrastCache:_.contrastCache,halfContrastCache:_.halfContrastCache};return{customGlyphs:d.customGlyphs,devicePixelRatio:r,letterSpacing:d.letterSpacing,lineHeight:d.lineHeight,deviceCellWidth:c,deviceCellHeight:u,deviceCharWidth:o,deviceCharHeight:h,fontFamily:d.fontFamily,fontSize:d.fontSize,fontWeight:d.fontWeight,fontWeightBold:d.fontWeightBold,allowTransparency:d.allowTransparency,drawBoldTextInBrightColors:d.drawBoldTextInBrightColors,minimumContrastRatio:d.minimumContrastRatio,colors:t}},S.configEquals=function(c,u){for(let o=0;o<c.colors.ansi.length;o++)if(c.colors.ansi[o].rgba!==u.colors.ansi[o].rgba)return!1;return c.devicePixelRatio===u.devicePixelRatio&&c.customGlyphs===u.customGlyphs&&c.lineHeight===u.lineHeight&&c.letterSpacing===u.letterSpacing&&c.fontFamily===u.fontFamily&&c.fontSize===u.fontSize&&c.fontWeight===u.fontWeight&&c.fontWeightBold===u.fontWeightBold&&c.allowTransparency===u.allowTransparency&&c.deviceCharWidth===u.deviceCharWidth&&c.deviceCharHeight===u.deviceCharHeight&&c.drawBoldTextInBrightColors===u.drawBoldTextInBrightColors&&c.minimumContrastRatio===u.minimumContrastRatio&&c.colors.foreground.rgba===u.colors.foreground.rgba&&c.colors.background.rgba===u.colors.background.rgba},S.is256Color=function(c){return(50331648&c)==16777216||(50331648&c)==33554432}},237:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.TEXT_BASELINE=S.DIM_OPACITY=S.INVERTED_DEFAULT_COLOR=void 0;const a=n(399);S.INVERTED_DEFAULT_COLOR=257,S.DIM_OPACITY=.5,S.TEXT_BASELINE=a.isFirefox||a.isLegacyEdge?"bottom":"ideographic"},457:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.CursorBlinkStateManager=void 0,S.CursorBlinkStateManager=class{constructor(n,a){this._renderCallback=n,this._coreBrowserService=a,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(n=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const a=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,a>0)return void this._restartInterval(a)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const a=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(a)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},n)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.tryDrawCustomChar=S.powerlineDefinitions=S.boxDrawingDefinitions=S.blockElementDefinitions=void 0;const a=n(374);S.blockElementDefinitions={"\u2580":[{x:0,y:0,w:8,h:4}],"\u2581":[{x:0,y:7,w:8,h:1}],"\u2582":[{x:0,y:6,w:8,h:2}],"\u2583":[{x:0,y:5,w:8,h:3}],"\u2584":[{x:0,y:4,w:8,h:4}],"\u2585":[{x:0,y:3,w:8,h:5}],"\u2586":[{x:0,y:2,w:8,h:6}],"\u2587":[{x:0,y:1,w:8,h:7}],"\u2588":[{x:0,y:0,w:8,h:8}],"\u2589":[{x:0,y:0,w:7,h:8}],"\u258A":[{x:0,y:0,w:6,h:8}],"\u258B":[{x:0,y:0,w:5,h:8}],"\u258C":[{x:0,y:0,w:4,h:8}],"\u258D":[{x:0,y:0,w:3,h:8}],"\u258E":[{x:0,y:0,w:2,h:8}],"\u258F":[{x:0,y:0,w:1,h:8}],"\u2590":[{x:4,y:0,w:4,h:8}],"\u2594":[{x:0,y:0,w:8,h:1}],"\u2595":[{x:7,y:0,w:1,h:8}],"\u2596":[{x:0,y:4,w:4,h:4}],"\u2597":[{x:4,y:4,w:4,h:4}],"\u2598":[{x:0,y:0,w:4,h:4}],"\u2599":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u259A":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"\u259B":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"\u259C":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"\u259D":[{x:4,y:0,w:4,h:4}],"\u259E":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"\u259F":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u{1FB70}":[{x:1,y:0,w:1,h:8}],"\u{1FB71}":[{x:2,y:0,w:1,h:8}],"\u{1FB72}":[{x:3,y:0,w:1,h:8}],"\u{1FB73}":[{x:4,y:0,w:1,h:8}],"\u{1FB74}":[{x:5,y:0,w:1,h:8}],"\u{1FB75}":[{x:6,y:0,w:1,h:8}],"\u{1FB76}":[{x:0,y:1,w:8,h:1}],"\u{1FB77}":[{x:0,y:2,w:8,h:1}],"\u{1FB78}":[{x:0,y:3,w:8,h:1}],"\u{1FB79}":[{x:0,y:4,w:8,h:1}],"\u{1FB7A}":[{x:0,y:5,w:8,h:1}],"\u{1FB7B}":[{x:0,y:6,w:8,h:1}],"\u{1FB7C}":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB7D}":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7E}":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7F}":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB80}":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB81}":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB82}":[{x:0,y:0,w:8,h:2}],"\u{1FB83}":[{x:0,y:0,w:8,h:3}],"\u{1FB84}":[{x:0,y:0,w:8,h:5}],"\u{1FB85}":[{x:0,y:0,w:8,h:6}],"\u{1FB86}":[{x:0,y:0,w:8,h:7}],"\u{1FB87}":[{x:6,y:0,w:2,h:8}],"\u{1FB88}":[{x:5,y:0,w:3,h:8}],"\u{1FB89}":[{x:3,y:0,w:5,h:8}],"\u{1FB8A}":[{x:2,y:0,w:6,h:8}],"\u{1FB8B}":[{x:1,y:0,w:7,h:8}],"\u{1FB95}":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"\u{1FB96}":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"\u{1FB97}":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const c={"\u2591":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"\u2592":[[1,0],[0,0],[0,1],[0,0]],"\u2593":[[0,1],[1,1],[1,0],[1,1]]};S.boxDrawingDefinitions={"\u2500":{1:"M0,.5 L1,.5"},"\u2501":{3:"M0,.5 L1,.5"},"\u2502":{1:"M.5,0 L.5,1"},"\u2503":{3:"M.5,0 L.5,1"},"\u250C":{1:"M0.5,1 L.5,.5 L1,.5"},"\u250F":{3:"M0.5,1 L.5,.5 L1,.5"},"\u2510":{1:"M0,.5 L.5,.5 L.5,1"},"\u2513":{3:"M0,.5 L.5,.5 L.5,1"},"\u2514":{1:"M.5,0 L.5,.5 L1,.5"},"\u2517":{3:"M.5,0 L.5,.5 L1,.5"},"\u2518":{1:"M.5,0 L.5,.5 L0,.5"},"\u251B":{3:"M.5,0 L.5,.5 L0,.5"},"\u251C":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2523":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2524":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252B":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252C":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2533":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2534":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253B":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253C":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u254B":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u2574":{1:"M.5,.5 L0,.5"},"\u2578":{3:"M.5,.5 L0,.5"},"\u2575":{1:"M.5,.5 L.5,0"},"\u2579":{3:"M.5,.5 L.5,0"},"\u2576":{1:"M.5,.5 L1,.5"},"\u257A":{3:"M.5,.5 L1,.5"},"\u2577":{1:"M.5,.5 L.5,1"},"\u257B":{3:"M.5,.5 L.5,1"},"\u2550":{1:(_,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"\u2551":{1:(_,r)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"\u2552":{1:(_,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"\u2553":{1:(_,r)=>`M${.5-_},1 L${.5-_},.5 L1,.5 M${.5+_},.5 L${.5+_},1`},"\u2554":{1:(_,r)=>`M1,${.5-r} L${.5-_},${.5-r} L${.5-_},1 M1,${.5+r} L${.5+_},${.5+r} L${.5+_},1`},"\u2555":{1:(_,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"\u2556":{1:(_,r)=>`M${.5+_},1 L${.5+_},.5 L0,.5 M${.5-_},.5 L${.5-_},1`},"\u2557":{1:(_,r)=>`M0,${.5+r} L${.5-_},${.5+r} L${.5-_},1 M0,${.5-r} L${.5+_},${.5-r} L${.5+_},1`},"\u2558":{1:(_,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"\u2559":{1:(_,r)=>`M1,.5 L${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"\u255A":{1:(_,r)=>`M1,${.5-r} L${.5+_},${.5-r} L${.5+_},0 M1,${.5+r} L${.5-_},${.5+r} L${.5-_},0`},"\u255B":{1:(_,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"\u255C":{1:(_,r)=>`M0,.5 L${.5+_},.5 L${.5+_},0 M${.5-_},.5 L${.5-_},0`},"\u255D":{1:(_,r)=>`M0,${.5-r} L${.5-_},${.5-r} L${.5-_},0 M0,${.5+r} L${.5+_},${.5+r} L${.5+_},0`},"\u255E":{1:(_,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"\u255F":{1:(_,r)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1 M${.5+_},.5 L1,.5`},"\u2560":{1:(_,r)=>`M${.5-_},0 L${.5-_},1 M1,${.5+r} L${.5+_},${.5+r} L${.5+_},1 M1,${.5-r} L${.5+_},${.5-r} L${.5+_},0`},"\u2561":{1:(_,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"\u2562":{1:(_,r)=>`M0,.5 L${.5-_},.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"\u2563":{1:(_,r)=>`M${.5+_},0 L${.5+_},1 M0,${.5+r} L${.5-_},${.5+r} L${.5-_},1 M0,${.5-r} L${.5-_},${.5-r} L${.5-_},0`},"\u2564":{1:(_,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"\u2565":{1:(_,r)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},1 M${.5+_},.5 L${.5+_},1`},"\u2566":{1:(_,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-_},${.5+r} L${.5-_},1 M1,${.5+r} L${.5+_},${.5+r} L${.5+_},1`},"\u2567":{1:(_,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"\u2568":{1:(_,r)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"\u2569":{1:(_,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-_},${.5-r} L${.5-_},0 M1,${.5-r} L${.5+_},${.5-r} L${.5+_},0`},"\u256A":{1:(_,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"\u256B":{1:(_,r)=>`M0,.5 L1,.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"\u256C":{1:(_,r)=>`M0,${.5+r} L${.5-_},${.5+r} L${.5-_},1 M1,${.5+r} L${.5+_},${.5+r} L${.5+_},1 M0,${.5-r} L${.5-_},${.5-r} L${.5-_},0 M1,${.5-r} L${.5+_},${.5-r} L${.5+_},0`},"\u2571":{1:"M1,0 L0,1"},"\u2572":{1:"M0,0 L1,1"},"\u2573":{1:"M1,0 L0,1 M0,0 L1,1"},"\u257C":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u257D":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"\u257E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u257F":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u250D":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u250E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2511":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"\u2512":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2515":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"\u2516":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2519":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"\u251A":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"\u251D":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"\u251E":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u251F":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2520":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2521":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2522":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"\u2525":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"\u2526":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2527":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2528":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"\u2529":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"\u252A":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"\u252D":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u252E":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u252F":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"\u2530":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2531":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2532":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2535":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u2536":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u2537":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"\u2538":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2539":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u253A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"\u253D":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u253E":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u253F":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"\u2540":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2541":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2542":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2543":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u2544":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2545":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2546":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2547":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"\u2548":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2549":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u254A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u254C":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u254D":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u2504":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2505":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2508":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"\u2509":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"\u254E":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u254F":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u2506":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u2507":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u250A":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u250B":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u256D":{1:(_,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"\u256E":{1:(_,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"\u256F":{1:(_,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"\u2570":{1:(_,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,1,.5`}},S.powerlineDefinitions={"\uE0B0":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"\uE0B1":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B2":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"\uE0B3":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B4":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"\uE0B5":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"\uE0B6":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"\uE0B7":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"\uE0B8":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"\uE0B9":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BA":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"\uE0BC":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"\uE0BD":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BE":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},S.powerlineDefinitions["\uE0BB"]=S.powerlineDefinitions["\uE0BD"],S.powerlineDefinitions["\uE0BF"]=S.powerlineDefinitions["\uE0B9"],S.tryDrawCustomChar=function(_,r,t,i,e,s,l,v){const g=S.blockElementDefinitions[r];if(g)return(function(C,w,L,y,R,A){for(let B=0;B<w.length;B++){const T=w[B],P=R/8,b=A/8;C.fillRect(L+T.x*P,y+T.y*b,T.w*P,T.h*b)}})(_,g,t,i,e,s),!0;const p=c[r];if(p)return(function(C,w,L,y,R,A){let B=u.get(w);B||(B=new Map,u.set(w,B));const T=C.fillStyle;if(typeof T!="string")throw new Error(`Unexpected fillStyle type "${T}"`);let P=B.get(T);if(!P){const b=w[0].length,E=w.length,k=C.canvas.ownerDocument.createElement("canvas");k.width=b,k.height=E;const D=(0,a.throwIfFalsy)(k.getContext("2d")),I=new ImageData(b,E);let W,z,q,M;if(T.startsWith("#"))W=parseInt(T.slice(1,3),16),z=parseInt(T.slice(3,5),16),q=parseInt(T.slice(5,7),16),M=T.length>7&&parseInt(T.slice(7,9),16)||1;else{if(!T.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${T}" when drawing pattern glyph`);[W,z,q,M]=T.substring(5,T.length-1).split(",").map(x=>parseFloat(x))}for(let x=0;x<E;x++)for(let H=0;H<b;H++)I.data[4*(x*b+H)]=W,I.data[4*(x*b+H)+1]=z,I.data[4*(x*b+H)+2]=q,I.data[4*(x*b+H)+3]=w[x][H]*(255*M);D.putImageData(I,0,0),P=(0,a.throwIfFalsy)(C.createPattern(k,null)),B.set(T,P)}C.fillStyle=P,C.fillRect(L,y,R,A)})(_,p,t,i,e,s),!0;const f=S.boxDrawingDefinitions[r];if(f)return(function(C,w,L,y,R,A,B){C.strokeStyle=C.fillStyle;for(const[T,P]of Object.entries(w)){let b;C.beginPath(),C.lineWidth=B*Number.parseInt(T),b=typeof P=="function"?P(.15,.15/A*R):P;for(const E of b.split(" ")){const k=E[0],D=h[k];if(!D){console.error(`Could not find drawing instructions for "${k}"`);continue}const I=E.substring(1).split(",");I[0]&&I[1]&&D(C,d(I,R,A,L,y,!0,B))}C.stroke(),C.closePath()}})(_,f,t,i,e,s,v),!0;const m=S.powerlineDefinitions[r];return!!m&&((function(C,w,L,y,R,A,B,T){const P=new Path2D;P.rect(L,y,R,A),C.clip(P),C.beginPath();const b=B/12;C.lineWidth=T*b;for(const E of w.d.split(" ")){const k=E[0],D=h[k];if(!D){console.error(`Could not find drawing instructions for "${k}"`);continue}const I=E.substring(1).split(",");I[0]&&I[1]&&D(C,d(I,R,A,L,y,!1,T,(w.leftPadding??0)*(b/2),(w.rightPadding??0)*(b/2)))}w.type===1?(C.strokeStyle=C.fillStyle,C.stroke()):C.fill(),C.closePath()})(_,m,t,i,e,s,l,v),!0)};const u=new Map;function o(_,r,t=0){return Math.max(Math.min(_,r),t)}const h={C:(_,r)=>_.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(_,r)=>_.lineTo(r[0],r[1]),M:(_,r)=>_.moveTo(r[0],r[1])};function d(_,r,t,i,e,s,l,v=0,g=0){const p=_.map(f=>parseFloat(f)||parseInt(f));if(p.length<2)throw new Error("Too few arguments for instruction");for(let f=0;f<p.length;f+=2)p[f]*=r-v*l-g*l,s&&p[f]!==0&&(p[f]=o(Math.round(p[f]+.5)-.5,r,0)),p[f]+=i+v*l;for(let f=1;f<p.length;f+=2)p[f]*=t,s&&p[f]!==0&&(p[f]=o(Math.round(p[f]+.5)-.5,t,0)),p[f]+=e;return p}},56:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.observeDevicePixelDimensions=void 0;const a=n(859);S.observeDevicePixelDimensions=function(c,u,o){let h=new u.ResizeObserver(d=>{const _=d.find(i=>i.target===c);if(!_)return;if(!("devicePixelContentBoxSize"in _))return h==null||h.disconnect(),void(h=void 0);const r=_.devicePixelContentBoxSize[0].inlineSize,t=_.devicePixelContentBoxSize[0].blockSize;r>0&&t>0&&o(r,t)});try{h.observe(c,{box:["device-pixel-content-box"]})}catch{h.disconnect(),h=void 0}return(0,a.toDisposable)(()=>h==null?void 0:h.disconnect())}},374:(F,S)=>{function n(c){return 57508<=c&&c<=57558}function a(c){return c>=128512&&c<=128591||c>=127744&&c<=128511||c>=128640&&c<=128767||c>=9728&&c<=9983||c>=9984&&c<=10175||c>=65024&&c<=65039||c>=129280&&c<=129535||c>=127462&&c<=127487}Object.defineProperty(S,"__esModule",{value:!0}),S.computeNextVariantOffset=S.createRenderDimensions=S.treatGlyphAsBackgroundColor=S.allowRescaling=S.isEmoji=S.isRestrictedPowerlineGlyph=S.isPowerlineGlyph=S.throwIfFalsy=void 0,S.throwIfFalsy=function(c){if(!c)throw new Error("value must not be falsy");return c},S.isPowerlineGlyph=n,S.isRestrictedPowerlineGlyph=function(c){return 57520<=c&&c<=57527},S.isEmoji=a,S.allowRescaling=function(c,u,o,h){return u===1&&o>Math.ceil(1.5*h)&&c!==void 0&&c>255&&!a(c)&&!n(c)&&!(function(d){return 57344<=d&&d<=63743})(c)},S.treatGlyphAsBackgroundColor=function(c){return n(c)||(function(u){return 9472<=u&&u<=9631})(c)},S.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},S.computeNextVariantOffset=function(c,u,o=0){return(c-(2*Math.round(u)-o))%(2*Math.round(u))}},296:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.createSelectionRenderModel=void 0;class n{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(c,u,o,h=!1){if(this.selectionStart=u,this.selectionEnd=o,!u||!o||u[0]===o[0]&&u[1]===o[1])return void this.clear();const d=c.buffers.active.ydisp,_=u[1]-d,r=o[1]-d,t=Math.max(_,0),i=Math.min(r,c.rows-1);t>=c.rows||i<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=h,this.viewportStartRow=_,this.viewportEndRow=r,this.viewportCappedStartRow=t,this.viewportCappedEndRow=i,this.startCol=u[0],this.endCol=o[0])}isCellSelected(c,u,o){return!!this.hasSelection&&(o-=c.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&o>=this.viewportCappedStartRow&&u<this.endCol&&o<=this.viewportCappedEndRow:u<this.startCol&&o>=this.viewportCappedStartRow&&u>=this.endCol&&o<=this.viewportCappedEndRow:o>this.viewportStartRow&&o<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&o===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&o===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&o===this.viewportStartRow&&u>=this.startCol)}}S.createSelectionRenderModel=function(){return new n}},509:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.TextureAtlas=void 0;const a=n(237),c=n(860),u=n(374),o=n(160),h=n(345),d=n(485),_=n(385),r=n(147),t=n(855),i={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let e;class s{get pages(){return this._pages}constructor(f,m,C){this._document=f,this._config=m,this._unicodeService=C,this._didWarmUp=!1,this._cacheMap=new d.FourKeyMap,this._cacheMapCombined=new d.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new h.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new h.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=g(f,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,u.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const f of this.pages)f.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const f=new _.IdleTaskQueue;for(let m=33;m<126;m++)f.enqueue(()=>{if(!this._cacheMap.get(m,t.DEFAULT_COLOR,t.DEFAULT_COLOR,t.DEFAULT_EXT)){const C=this._drawToCache(m,t.DEFAULT_COLOR,t.DEFAULT_COLOR,t.DEFAULT_EXT);this._cacheMap.set(m,t.DEFAULT_COLOR,t.DEFAULT_COLOR,t.DEFAULT_EXT,C)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const f of this._pages)f.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(s.maxAtlasPages&&this._pages.length>=Math.max(4,s.maxAtlasPages)){const m=this._pages.filter(B=>2*B.canvas.width<=(s.maxTextureSize||4096)).sort((B,T)=>T.canvas.width!==B.canvas.width?T.canvas.width-B.canvas.width:T.percentageUsed-B.percentageUsed);let C=-1,w=0;for(let B=0;B<m.length;B++)if(m[B].canvas.width!==w)C=B,w=m[B].canvas.width;else if(B-C==3)break;const L=m.slice(C,C+4),y=L.map(B=>B.glyphs[0].texturePage).sort((B,T)=>B>T?1:-1),R=this.pages.length-L.length,A=this._mergePages(L,R);A.version++;for(let B=y.length-1;B>=0;B--)this._deletePage(y[B]);this.pages.push(A),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(A.canvas)}const f=new l(this._document,this._textureSize);return this._pages.push(f),this._activePages.push(f),this._onAddTextureAtlasCanvas.fire(f.canvas),f}_mergePages(f,m){const C=2*f[0].canvas.width,w=new l(this._document,C,f);for(const[L,y]of f.entries()){const R=L*y.canvas.width%C,A=Math.floor(L/2)*y.canvas.height;w.ctx.drawImage(y.canvas,R,A);for(const T of y.glyphs)T.texturePage=m,T.sizeClipSpace.x=T.size.x/C,T.sizeClipSpace.y=T.size.y/C,T.texturePosition.x+=R,T.texturePosition.y+=A,T.texturePositionClipSpace.x=T.texturePosition.x/C,T.texturePositionClipSpace.y=T.texturePosition.y/C;this._onRemoveTextureAtlasCanvas.fire(y.canvas);const B=this._activePages.indexOf(y);B!==-1&&this._activePages.splice(B,1)}return w}_deletePage(f){this._pages.splice(f,1);for(let m=f;m<this._pages.length;m++){const C=this._pages[m];for(const w of C.glyphs)w.texturePage--;C.version++}}getRasterizedGlyphCombinedChar(f,m,C,w,L){return this._getFromCacheMap(this._cacheMapCombined,f,m,C,w,L)}getRasterizedGlyph(f,m,C,w,L){return this._getFromCacheMap(this._cacheMap,f,m,C,w,L)}_getFromCacheMap(f,m,C,w,L,y=!1){return e=f.get(m,C,w,L),e||(e=this._drawToCache(m,C,w,L,y),f.set(m,C,w,L,e)),e}_getColorFromAnsiIndex(f){if(f>=this._config.colors.ansi.length)throw new Error("No color found for idx "+f);return this._config.colors.ansi[f]}_getBackgroundColor(f,m,C,w){if(this._config.allowTransparency)return o.NULL_COLOR;let L;switch(f){case 16777216:case 33554432:L=this._getColorFromAnsiIndex(m);break;case 50331648:const y=r.AttributeData.toColorRGB(m);L=o.channels.toColor(y[0],y[1],y[2]);break;default:L=C?o.color.opaque(this._config.colors.foreground):this._config.colors.background}return L}_getForegroundColor(f,m,C,w,L,y,R,A,B,T){const P=this._getMinimumContrastColor(f,m,C,w,L,y,R,B,A,T);if(P)return P;let b;switch(L){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&B&&y<8&&(y+=8),b=this._getColorFromAnsiIndex(y);break;case 50331648:const E=r.AttributeData.toColorRGB(y);b=o.channels.toColor(E[0],E[1],E[2]);break;default:b=R?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(b=o.color.opaque(b)),A&&(b=o.color.multiplyOpacity(b,a.DIM_OPACITY)),b}_resolveBackgroundRgba(f,m,C){switch(f){case 16777216:case 33554432:return this._getColorFromAnsiIndex(m).rgba;case 50331648:return m<<8;default:return C?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(f,m,C,w){switch(f){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&w&&m<8&&(m+=8),this._getColorFromAnsiIndex(m).rgba;case 50331648:return m<<8;default:return C?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(f,m,C,w,L,y,R,A,B,T){if(this._config.minimumContrastRatio===1||T)return;const P=this._getContrastCache(B),b=P.getColor(f,w);if(b!==void 0)return b||void 0;const E=this._resolveBackgroundRgba(m,C,R),k=this._resolveForegroundRgba(L,y,R,A),D=o.rgba.ensureContrastRatio(E,k,this._config.minimumContrastRatio/(B?2:1));if(!D)return void P.setColor(f,w,null);const I=o.channels.toColor(D>>24&255,D>>16&255,D>>8&255);return P.setColor(f,w,I),I}_getContrastCache(f){return f?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(f,m,C,w,L=!1){const y=typeof f=="number"?String.fromCharCode(f):f,R=Math.min(this._config.deviceCellWidth*Math.max(y.length,2)+4,this._textureSize);this._tmpCanvas.width<R&&(this._tmpCanvas.width=R);const A=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<A&&(this._tmpCanvas.height=A),this._tmpCtx.save(),this._workAttributeData.fg=C,this._workAttributeData.bg=m,this._workAttributeData.extended.ext=w,this._workAttributeData.isInvisible())return i;const B=!!this._workAttributeData.isBold(),T=!!this._workAttributeData.isInverse(),P=!!this._workAttributeData.isDim(),b=!!this._workAttributeData.isItalic(),E=!!this._workAttributeData.isUnderline(),k=!!this._workAttributeData.isStrikethrough(),D=!!this._workAttributeData.isOverline();let I=this._workAttributeData.getFgColor(),W=this._workAttributeData.getFgColorMode(),z=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(T){const K=I;I=z,z=K;const J=W;W=q,q=J}const M=this._getBackgroundColor(q,z,T,P);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=M.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const x=B?this._config.fontWeightBold:this._config.fontWeight,H=b?"italic":"";this._tmpCtx.font=`${H} ${x} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=a.TEXT_BASELINE;const O=y.length===1&&(0,u.isPowerlineGlyph)(y.charCodeAt(0)),U=y.length===1&&(0,u.isRestrictedPowerlineGlyph)(y.charCodeAt(0)),$=this._getForegroundColor(m,q,z,C,W,I,T,P,B,(0,u.treatGlyphAsBackgroundColor)(y.charCodeAt(0)));this._tmpCtx.fillStyle=$.css;const j=U?0:4;let se=!1;this._config.customGlyphs!==!1&&(se=(0,c.tryDrawCustomChar)(this._tmpCtx,y,j,j,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let ie,oe=!O;if(ie=typeof f=="number"?this._unicodeService.wcwidth(f):this._unicodeService.getStringCellWidth(f),E){this._tmpCtx.save();const K=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),J=K%2==1?.5:0;if(this._tmpCtx.lineWidth=K,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())oe=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{oe=!1;let le=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&le<8&&(le+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(le).css}this._tmpCtx.beginPath();const he=j,ee=Math.ceil(j+this._config.deviceCharHeight)-J-(L?2*K:0),de=ee+K,ue=ee+2*K;let ce=this._workAttributeData.getUnderlineVariantOffset();for(let le=0;le<ie;le++){this._tmpCtx.save();const te=he+le*this._config.deviceCellWidth,ae=he+(le+1)*this._config.deviceCellWidth,re=te+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(te,ee),this._tmpCtx.lineTo(ae,ee),this._tmpCtx.moveTo(te,ue),this._tmpCtx.lineTo(ae,ue);break;case 3:const ge=K<=1?ue:Math.ceil(j+this._config.deviceCharHeight-K/2)-J,me=K<=1?ee:Math.ceil(j+this._config.deviceCharHeight+K/2)-J,$e=new Path2D;$e.rect(te,ee,this._config.deviceCellWidth,ue-ee),this._tmpCtx.clip($e),this._tmpCtx.moveTo(te-this._config.deviceCellWidth/2,de),this._tmpCtx.bezierCurveTo(te-this._config.deviceCellWidth/2,me,te,me,te,de),this._tmpCtx.bezierCurveTo(te,ge,re,ge,re,de),this._tmpCtx.bezierCurveTo(re,me,ae,me,ae,de),this._tmpCtx.bezierCurveTo(ae,ge,ae+this._config.deviceCellWidth/2,ge,ae+this._config.deviceCellWidth/2,de);break;case 4:const Se=ce===0?0:ce>=K?2*K-ce:K-ce;!(ce>=K)==0||Se===0?(this._tmpCtx.setLineDash([Math.round(K),Math.round(K)]),this._tmpCtx.moveTo(te+Se,ee),this._tmpCtx.lineTo(ae,ee)):(this._tmpCtx.setLineDash([Math.round(K),Math.round(K)]),this._tmpCtx.moveTo(te,ee),this._tmpCtx.lineTo(te+Se,ee),this._tmpCtx.moveTo(te+Se+K,ee),this._tmpCtx.lineTo(ae,ee)),ce=(0,u.computeNextVariantOffset)(ae-te,K,ce);break;case 5:const st=.6,rt=.3,we=ae-te,Ue=Math.floor(st*we),Ne=Math.floor(rt*we),nt=we-Ue-Ne;this._tmpCtx.setLineDash([Ue,Ne,nt]),this._tmpCtx.moveTo(te,ee),this._tmpCtx.lineTo(ae,ee);break;default:this._tmpCtx.moveTo(te,ee),this._tmpCtx.lineTo(ae,ee)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!se&&this._config.fontSize>=12&&!this._config.allowTransparency&&y!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const le=this._tmpCtx.measureText(y);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in le&&le.actualBoundingBoxDescent>0){this._tmpCtx.save();const te=new Path2D;te.rect(he,ee-Math.ceil(K/2),this._config.deviceCellWidth*ie,ue-ee+Math.ceil(K/2)),this._tmpCtx.clip(te),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=M.css,this._tmpCtx.strokeText(y,j,j+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(D){const K=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),J=K%2==1?.5:0;this._tmpCtx.lineWidth=K,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(j,j+J),this._tmpCtx.lineTo(j+this._config.deviceCharWidth*ie,j+J),this._tmpCtx.stroke()}if(se||this._tmpCtx.fillText(y,j,j+this._config.deviceCharHeight),y==="_"&&!this._config.allowTransparency){let K=v(this._tmpCtx.getImageData(j,j,this._config.deviceCellWidth,this._config.deviceCellHeight),M,$,oe);if(K)for(let J=1;J<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=M.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(y,j,j+this._config.deviceCharHeight-J),K=v(this._tmpCtx.getImageData(j,j,this._config.deviceCellWidth,this._config.deviceCellHeight),M,$,oe),K);J++);}if(k){const K=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),J=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=K,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(j,j+Math.floor(this._config.deviceCharHeight/2)-J),this._tmpCtx.lineTo(j+this._config.deviceCharWidth*ie,j+Math.floor(this._config.deviceCharHeight/2)-J),this._tmpCtx.stroke()}this._tmpCtx.restore();const X=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let ve;if(ve=this._config.allowTransparency?(function(K){for(let J=0;J<K.data.length;J+=4)if(K.data[J+3]>0)return!1;return!0})(X):v(X,M,$,oe),ve)return i;const Q=this._findGlyphBoundingBox(X,this._workBoundingBox,R,U,se,j);let Y,Z;for(;;){if(this._activePages.length===0){const K=this._createNewPage();Y=K,Z=K.currentRow,Z.height=Q.size.y;break}Y=this._activePages[this._activePages.length-1],Z=Y.currentRow;for(const K of this._activePages)Q.size.y<=K.currentRow.height&&(Y=K,Z=K.currentRow);for(let K=this._activePages.length-1;K>=0;K--)for(const J of this._activePages[K].fixedRows)J.height<=Z.height&&Q.size.y<=J.height&&(Y=this._activePages[K],Z=J);if(Z.y+Q.size.y>=Y.canvas.height||Z.height>Q.size.y+2){let K=!1;if(Y.currentRow.y+Y.currentRow.height+Q.size.y>=Y.canvas.height){let J;for(const he of this._activePages)if(he.currentRow.y+he.currentRow.height+Q.size.y<he.canvas.height){J=he;break}if(J)Y=J;else if(s.maxAtlasPages&&this._pages.length>=s.maxAtlasPages&&Z.y+Q.size.y<=Y.canvas.height&&Z.height>=Q.size.y&&Z.x+Q.size.x<=Y.canvas.width)K=!0;else{const he=this._createNewPage();Y=he,Z=he.currentRow,Z.height=Q.size.y,K=!0}}K||(Y.currentRow.height>0&&Y.fixedRows.push(Y.currentRow),Z={x:0,y:Y.currentRow.y+Y.currentRow.height,height:Q.size.y},Y.fixedRows.push(Z),Y.currentRow={x:0,y:Z.y+Z.height,height:0})}if(Z.x+Q.size.x<=Y.canvas.width)break;Z===Y.currentRow?(Z.x=0,Z.y+=Z.height,Z.height=0):Y.fixedRows.splice(Y.fixedRows.indexOf(Z),1)}return Q.texturePage=this._pages.indexOf(Y),Q.texturePosition.x=Z.x,Q.texturePosition.y=Z.y,Q.texturePositionClipSpace.x=Z.x/Y.canvas.width,Q.texturePositionClipSpace.y=Z.y/Y.canvas.height,Q.sizeClipSpace.x/=Y.canvas.width,Q.sizeClipSpace.y/=Y.canvas.height,Z.height=Math.max(Z.height,Q.size.y),Z.x+=Q.size.x,Y.ctx.putImageData(X,Q.texturePosition.x-this._workBoundingBox.left,Q.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Q.size.x,Q.size.y),Y.addGlyph(Q),Y.version++,Q}_findGlyphBoundingBox(f,m,C,w,L,y){m.top=0;const R=w?this._config.deviceCellHeight:this._tmpCanvas.height,A=w?this._config.deviceCellWidth:C;let B=!1;for(let T=0;T<R;T++){for(let P=0;P<A;P++){const b=T*this._tmpCanvas.width*4+4*P+3;if(f.data[b]!==0){m.top=T,B=!0;break}}if(B)break}m.left=0,B=!1;for(let T=0;T<y+A;T++){for(let P=0;P<R;P++){const b=P*this._tmpCanvas.width*4+4*T+3;if(f.data[b]!==0){m.left=T,B=!0;break}}if(B)break}m.right=A,B=!1;for(let T=y+A-1;T>=y;T--){for(let P=0;P<R;P++){const b=P*this._tmpCanvas.width*4+4*T+3;if(f.data[b]!==0){m.right=T,B=!0;break}}if(B)break}m.bottom=R,B=!1;for(let T=R-1;T>=0;T--){for(let P=0;P<A;P++){const b=T*this._tmpCanvas.width*4+4*P+3;if(f.data[b]!==0){m.bottom=T,B=!0;break}}if(B)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:m.right-m.left+1,y:m.bottom-m.top+1},sizeClipSpace:{x:m.right-m.left+1,y:m.bottom-m.top+1},offset:{x:-m.left+y+(w||L?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-m.top+y+(w||L?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}S.TextureAtlas=s;class l{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(f){this._glyphs.push(f),this._usedPixels+=f.size.x*f.size.y}constructor(f,m,C){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],C)for(const w of C)this._glyphs.push(...w.glyphs),this._usedPixels+=w._usedPixels;this.canvas=g(f,m,m),this.ctx=(0,u.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function v(p,f,m,C){const w=f.rgba>>>24,L=f.rgba>>>16&255,y=f.rgba>>>8&255,R=m.rgba>>>24,A=m.rgba>>>16&255,B=m.rgba>>>8&255,T=Math.floor((Math.abs(w-R)+Math.abs(L-A)+Math.abs(y-B))/12);let P=!0;for(let b=0;b<p.data.length;b+=4)p.data[b]===w&&p.data[b+1]===L&&p.data[b+2]===y||C&&Math.abs(p.data[b]-w)+Math.abs(p.data[b+1]-L)+Math.abs(p.data[b+2]-y)<T?p.data[b+3]=0:P=!1;return P}function g(p,f,m){const C=p.createElement("canvas");return C.width=f,C.height=m,C}},577:function(F,S,n){var a=this&&this.__decorate||function(t,i,e,s){var l,v=arguments.length,g=v<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(t,i,e,s);else for(var p=t.length-1;p>=0;p--)(l=t[p])&&(g=(v<3?l(g):v>3?l(i,e,g):l(i,e))||g);return v>3&&g&&Object.defineProperty(i,e,g),g},c=this&&this.__param||function(t,i){return function(e,s){i(e,s,t)}};Object.defineProperty(S,"__esModule",{value:!0}),S.CharacterJoinerService=S.JoinedCellData=void 0;const u=n(147),o=n(855),h=n(782),d=n(97);class _ extends u.AttributeData{constructor(i,e,s){super(),this.content=0,this.combinedData="",this.fg=i.fg,this.bg=i.bg,this.combinedData=e,this._width=s}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(i){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}S.JoinedCellData=_;let r=S.CharacterJoinerService=class Ke{constructor(i){this._bufferService=i,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new h.CellData}register(i){const e={id:this._nextCharacterJoinerId++,handler:i};return this._characterJoiners.push(e),e.id}deregister(i){for(let e=0;e<this._characterJoiners.length;e++)if(this._characterJoiners[e].id===i)return this._characterJoiners.splice(e,1),!0;return!1}getJoinedCharacters(i){if(this._characterJoiners.length===0)return[];const e=this._bufferService.buffer.lines.get(i);if(!e||e.length===0)return[];const s=[],l=e.translateToString(!0);let v=0,g=0,p=0,f=e.getFg(0),m=e.getBg(0);for(let C=0;C<e.getTrimmedLength();C++)if(e.loadCell(C,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==f||this._workCell.bg!==m){if(C-v>1){const w=this._getJoinedRanges(l,p,g,e,v);for(let L=0;L<w.length;L++)s.push(w[L])}v=C,p=g,f=this._workCell.fg,m=this._workCell.bg}g+=this._workCell.getChars().length||o.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-v>1){const C=this._getJoinedRanges(l,p,g,e,v);for(let w=0;w<C.length;w++)s.push(C[w])}return s}_getJoinedRanges(i,e,s,l,v){const g=i.substring(e,s);let p=[];try{p=this._characterJoiners[0].handler(g)}catch(f){console.error(f)}for(let f=1;f<this._characterJoiners.length;f++)try{const m=this._characterJoiners[f].handler(g);for(let C=0;C<m.length;C++)Ke._mergeRanges(p,m[C])}catch(m){console.error(m)}return this._stringRangesToCellRanges(p,l,v),p}_stringRangesToCellRanges(i,e,s){let l=0,v=!1,g=0,p=i[l];if(p){for(let f=s;f<this._bufferService.cols;f++){const m=e.getWidth(f),C=e.getString(f).length||o.WHITESPACE_CELL_CHAR.length;if(m!==0){if(!v&&p[0]<=g&&(p[0]=f,v=!0),p[1]<=g){if(p[1]=f,p=i[++l],!p)break;p[0]<=g?(p[0]=f,v=!0):v=!1}g+=C}}p&&(p[1]=this._bufferService.cols)}}static _mergeRanges(i,e){let s=!1;for(let l=0;l<i.length;l++){const v=i[l];if(s){if(e[1]<=v[0])return i[l-1][1]=e[1],i;if(e[1]<=v[1])return i[l-1][1]=Math.max(e[1],v[1]),i.splice(l,1),i;i.splice(l,1),l--}else{if(e[1]<=v[0])return i.splice(l,0,e),i;if(e[1]<=v[1])return v[0]=Math.min(e[0],v[0]),i;e[0]<v[1]&&(v[0]=Math.min(e[0],v[0]),s=!0)}}return s?i[i.length-1][1]=e[1]:i.push(e),i}};S.CharacterJoinerService=r=a([c(0,d.IBufferService)],r)},160:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.contrastRatio=S.toPaddedHex=S.rgba=S.rgb=S.css=S.color=S.channels=S.NULL_COLOR=void 0;let n=0,a=0,c=0,u=0;var o,h,d,_,r;function t(e){const s=e.toString(16);return s.length<2?"0"+s:s}function i(e,s){return e<s?(s+.05)/(e+.05):(e+.05)/(s+.05)}S.NULL_COLOR={css:"#00000000",rgba:0},(function(e){e.toCss=function(s,l,v,g){return g!==void 0?`#${t(s)}${t(l)}${t(v)}${t(g)}`:`#${t(s)}${t(l)}${t(v)}`},e.toRgba=function(s,l,v,g=255){return(s<<24|l<<16|v<<8|g)>>>0},e.toColor=function(s,l,v,g){return{css:e.toCss(s,l,v,g),rgba:e.toRgba(s,l,v,g)}}})(o||(S.channels=o={})),(function(e){function s(l,v){return u=Math.round(255*v),[n,a,c]=r.toChannels(l.rgba),{css:o.toCss(n,a,c,u),rgba:o.toRgba(n,a,c,u)}}e.blend=function(l,v){if(u=(255&v.rgba)/255,u===1)return{css:v.css,rgba:v.rgba};const g=v.rgba>>24&255,p=v.rgba>>16&255,f=v.rgba>>8&255,m=l.rgba>>24&255,C=l.rgba>>16&255,w=l.rgba>>8&255;return n=m+Math.round((g-m)*u),a=C+Math.round((p-C)*u),c=w+Math.round((f-w)*u),{css:o.toCss(n,a,c),rgba:o.toRgba(n,a,c)}},e.isOpaque=function(l){return!(255&~l.rgba)},e.ensureContrastRatio=function(l,v,g){const p=r.ensureContrastRatio(l.rgba,v.rgba,g);if(p)return o.toColor(p>>24&255,p>>16&255,p>>8&255)},e.opaque=function(l){const v=(255|l.rgba)>>>0;return[n,a,c]=r.toChannels(v),{css:o.toCss(n,a,c),rgba:v}},e.opacity=s,e.multiplyOpacity=function(l,v){return u=255&l.rgba,s(l,u*v/255)},e.toColorRGB=function(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}})(h||(S.color=h={})),(function(e){let s,l;try{const v=document.createElement("canvas");v.width=1,v.height=1;const g=v.getContext("2d",{willReadFrequently:!0});g&&(s=g,s.globalCompositeOperation="copy",l=s.createLinearGradient(0,0,1,1))}catch{}e.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return n=parseInt(v.slice(1,2).repeat(2),16),a=parseInt(v.slice(2,3).repeat(2),16),c=parseInt(v.slice(3,4).repeat(2),16),o.toColor(n,a,c);case 5:return n=parseInt(v.slice(1,2).repeat(2),16),a=parseInt(v.slice(2,3).repeat(2),16),c=parseInt(v.slice(3,4).repeat(2),16),u=parseInt(v.slice(4,5).repeat(2),16),o.toColor(n,a,c,u);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const g=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(g)return n=parseInt(g[1]),a=parseInt(g[2]),c=parseInt(g[3]),u=Math.round(255*(g[5]===void 0?1:parseFloat(g[5]))),o.toColor(n,a,c,u);if(!s||!l)throw new Error("css.toColor: Unsupported css format");if(s.fillStyle=l,s.fillStyle=v,typeof s.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(s.fillRect(0,0,1,1),[n,a,c,u]=s.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:o.toRgba(n,a,c,u),css:v}}})(d||(S.css=d={})),(function(e){function s(l,v,g){const p=l/255,f=v/255,m=g/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4))+.0722*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))}e.relativeLuminance=function(l){return s(l>>16&255,l>>8&255,255&l)},e.relativeLuminance2=s})(_||(S.rgb=_={})),(function(e){function s(v,g,p){const f=v>>24&255,m=v>>16&255,C=v>>8&255;let w=g>>24&255,L=g>>16&255,y=g>>8&255,R=i(_.relativeLuminance2(w,L,y),_.relativeLuminance2(f,m,C));for(;R<p&&(w>0||L>0||y>0);)w-=Math.max(0,Math.ceil(.1*w)),L-=Math.max(0,Math.ceil(.1*L)),y-=Math.max(0,Math.ceil(.1*y)),R=i(_.relativeLuminance2(w,L,y),_.relativeLuminance2(f,m,C));return(w<<24|L<<16|y<<8|255)>>>0}function l(v,g,p){const f=v>>24&255,m=v>>16&255,C=v>>8&255;let w=g>>24&255,L=g>>16&255,y=g>>8&255,R=i(_.relativeLuminance2(w,L,y),_.relativeLuminance2(f,m,C));for(;R<p&&(w<255||L<255||y<255);)w=Math.min(255,w+Math.ceil(.1*(255-w))),L=Math.min(255,L+Math.ceil(.1*(255-L))),y=Math.min(255,y+Math.ceil(.1*(255-y))),R=i(_.relativeLuminance2(w,L,y),_.relativeLuminance2(f,m,C));return(w<<24|L<<16|y<<8|255)>>>0}e.blend=function(v,g){if(u=(255&g)/255,u===1)return g;const p=g>>24&255,f=g>>16&255,m=g>>8&255,C=v>>24&255,w=v>>16&255,L=v>>8&255;return n=C+Math.round((p-C)*u),a=w+Math.round((f-w)*u),c=L+Math.round((m-L)*u),o.toRgba(n,a,c)},e.ensureContrastRatio=function(v,g,p){const f=_.relativeLuminance(v>>8),m=_.relativeLuminance(g>>8);if(i(f,m)<p){if(m<f){const L=s(v,g,p),y=i(f,_.relativeLuminance(L>>8));if(y<p){const R=l(v,g,p);return y>i(f,_.relativeLuminance(R>>8))?L:R}return L}const C=l(v,g,p),w=i(f,_.relativeLuminance(C>>8));if(w<p){const L=s(v,g,p);return w>i(f,_.relativeLuminance(L>>8))?C:L}return C}},e.reduceLuminance=s,e.increaseLuminance=l,e.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(S.rgba=r={})),S.toPaddedHex=t,S.contrastRatio=i},345:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.runAndSubscribe=S.forwardEvent=S.EventEmitter=void 0,S.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=n=>(this._listeners.push(n),{dispose:()=>{if(!this._disposed){for(let a=0;a<this._listeners.length;a++)if(this._listeners[a]===n)return void this._listeners.splice(a,1)}}})),this._event}fire(n,a){const c=[];for(let u=0;u<this._listeners.length;u++)c.push(this._listeners[u]);for(let u=0;u<c.length;u++)c[u].call(void 0,n,a)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},S.forwardEvent=function(n,a){return n(c=>a.fire(c))},S.runAndSubscribe=function(n,a){return a(void 0),n(c=>a(c))}},859:(F,S)=>{function n(a){for(const c of a)c.dispose();a.length=0}Object.defineProperty(S,"__esModule",{value:!0}),S.getDisposeArrayDisposable=S.disposeArray=S.toDisposable=S.MutableDisposable=S.Disposable=void 0,S.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const a of this._disposables)a.dispose();this._disposables.length=0}register(a){return this._disposables.push(a),a}unregister(a){const c=this._disposables.indexOf(a);c!==-1&&this._disposables.splice(c,1)}},S.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(a){var c;this._isDisposed||a===this._value||((c=this._value)==null||c.dispose(),this._value=a)}clear(){this.value=void 0}dispose(){var a;this._isDisposed=!0,(a=this._value)==null||a.dispose(),this._value=void 0}},S.toDisposable=function(a){return{dispose:a}},S.disposeArray=n,S.getDisposeArrayDisposable=function(a){return{dispose:()=>n(a)}}},485:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.FourKeyMap=S.TwoKeyMap=void 0;class n{constructor(){this._data={}}set(c,u,o){this._data[c]||(this._data[c]={}),this._data[c][u]=o}get(c,u){return this._data[c]?this._data[c][u]:void 0}clear(){this._data={}}}S.TwoKeyMap=n,S.FourKeyMap=class{constructor(){this._data=new n}set(a,c,u,o,h){this._data.get(a,c)||this._data.set(a,c,new n),this._data.get(a,c).set(u,o,h)}get(a,c,u,o){var h;return(h=this._data.get(a,c))==null?void 0:h.get(u,o)}clear(){this._data.clear()}}},399:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.isChromeOS=S.isLinux=S.isWindows=S.isIphone=S.isIpad=S.isMac=S.getSafariVersion=S.isSafari=S.isLegacyEdge=S.isFirefox=S.isNode=void 0,S.isNode=typeof process<"u"&&"title"in process;const n=S.isNode?"node":navigator.userAgent,a=S.isNode?"node":navigator.platform;S.isFirefox=n.includes("Firefox"),S.isLegacyEdge=n.includes("Edge"),S.isSafari=/^((?!chrome|android).)*safari/i.test(n),S.getSafariVersion=function(){if(!S.isSafari)return 0;const c=n.match(/Version\/(\d+)/);return c===null||c.length<2?0:parseInt(c[1])},S.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(a),S.isIpad=a==="iPad",S.isIphone=a==="iPhone",S.isWindows=["Windows","Win16","Win32","WinCE"].includes(a),S.isLinux=a.indexOf("Linux")>=0,S.isChromeOS=/\bCrOS\b/.test(n)},385:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.DebouncedIdleTask=S.IdleTaskQueue=S.PriorityTaskQueue=void 0;const a=n(399);class c{constructor(){this._tasks=[],this._i=0}enqueue(h){this._tasks.push(h),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(h){this._idleCallback=void 0;let d=0,_=0,r=h.timeRemaining(),t=0;for(;this._i<this._tasks.length;){if(d=Date.now(),this._tasks[this._i]()||this._i++,d=Math.max(1,Date.now()-d),_=Math.max(d,_),t=h.timeRemaining(),1.5*_>t)return r-d<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-d))}ms`),void this._start();r=t}this.clear()}}class u extends c{_requestCallback(h){return setTimeout(()=>h(this._createDeadline(16)))}_cancelCallback(h){clearTimeout(h)}_createDeadline(h){const d=Date.now()+h;return{timeRemaining:()=>Math.max(0,d-Date.now())}}}S.PriorityTaskQueue=u,S.IdleTaskQueue=!a.isNode&&"requestIdleCallback"in window?class extends c{_requestCallback(o){return requestIdleCallback(o)}_cancelCallback(o){cancelIdleCallback(o)}}:u,S.DebouncedIdleTask=class{constructor(){this._queue=new S.IdleTaskQueue}set(o){this._queue.clear(),this._queue.enqueue(o)}flush(){this._queue.flush()}}},147:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.ExtendedAttrs=S.AttributeData=void 0;class n{constructor(){this.fg=0,this.bg=0,this.extended=new a}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new n;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return!(50331648&~this.fg)}isBgRGB(){return!(50331648&~this.bg)}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return!(50331648&this.fg)}isBgDefault(){return!(50331648&this.bg)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?!(50331648&~this.extended.underlineColor):this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?!(50331648&this.extended.underlineColor):this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}S.AttributeData=n;class a{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,o=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=o}clone(){return new a(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}S.ExtendedAttrs=a},782:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.CellData=void 0;const a=n(133),c=n(855),u=n(147);class o extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(d){const _=new o;return _.setFromCharData(d),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,a.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(d){this.fg=d[c.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(d[c.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(d[c.CHAR_DATA_CHAR_INDEX].length===2){const r=d[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const t=d[c.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=t&&t<=57343?this.content=1024*(r-55296)+t-56320+65536|d[c.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=d[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|d[c.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=d[c.CHAR_DATA_CHAR_INDEX],this.content=2097152|d[c.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}S.CellData=o},855:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.WHITESPACE_CELL_CODE=S.WHITESPACE_CELL_WIDTH=S.WHITESPACE_CELL_CHAR=S.NULL_CELL_CODE=S.NULL_CELL_WIDTH=S.NULL_CELL_CHAR=S.CHAR_DATA_CODE_INDEX=S.CHAR_DATA_WIDTH_INDEX=S.CHAR_DATA_CHAR_INDEX=S.CHAR_DATA_ATTR_INDEX=S.DEFAULT_EXT=S.DEFAULT_ATTR=S.DEFAULT_COLOR=void 0,S.DEFAULT_COLOR=0,S.DEFAULT_ATTR=256|S.DEFAULT_COLOR<<9,S.DEFAULT_EXT=0,S.CHAR_DATA_ATTR_INDEX=0,S.CHAR_DATA_CHAR_INDEX=1,S.CHAR_DATA_WIDTH_INDEX=2,S.CHAR_DATA_CODE_INDEX=3,S.NULL_CELL_CHAR="",S.NULL_CELL_WIDTH=1,S.NULL_CELL_CODE=0,S.WHITESPACE_CELL_CHAR=" ",S.WHITESPACE_CELL_WIDTH=1,S.WHITESPACE_CELL_CODE=32},133:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.Utf8ToUtf32=S.StringToUtf32=S.utf32ToString=S.stringFromCodePoint=void 0,S.stringFromCodePoint=function(n){return n>65535?(n-=65536,String.fromCharCode(55296+(n>>10))+String.fromCharCode(n%1024+56320)):String.fromCharCode(n)},S.utf32ToString=function(n,a=0,c=n.length){let u="";for(let o=a;o<c;++o){let h=n[o];h>65535?(h-=65536,u+=String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):u+=String.fromCharCode(h)}return u},S.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(n,a){const c=n.length;if(!c)return 0;let u=0,o=0;if(this._interim){const h=n.charCodeAt(o++);56320<=h&&h<=57343?a[u++]=1024*(this._interim-55296)+h-56320+65536:(a[u++]=this._interim,a[u++]=h),this._interim=0}for(let h=o;h<c;++h){const d=n.charCodeAt(h);if(55296<=d&&d<=56319){if(++h>=c)return this._interim=d,u;const _=n.charCodeAt(h);56320<=_&&_<=57343?a[u++]=1024*(d-55296)+_-56320+65536:(a[u++]=d,a[u++]=_)}else d!==65279&&(a[u++]=d)}return u}},S.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(n,a){const c=n.length;if(!c)return 0;let u,o,h,d,_=0,r=0,t=0;if(this.interim[0]){let s=!1,l=this.interim[0];l&=(224&l)==192?31:(240&l)==224?15:7;let v,g=0;for(;(v=63&this.interim[++g])&&g<4;)l<<=6,l|=v;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,f=p-g;for(;t<f;){if(t>=c)return 0;if(v=n[t++],(192&v)!=128){t--,s=!0;break}this.interim[g++]=v,l<<=6,l|=63&v}s||(p===2?l<128?t--:a[_++]=l:p===3?l<2048||l>=55296&&l<=57343||l===65279||(a[_++]=l):l<65536||l>1114111||(a[_++]=l)),this.interim.fill(0)}const i=c-4;let e=t;for(;e<c;){for(;!(!(e<i)||128&(u=n[e])||128&(o=n[e+1])||128&(h=n[e+2])||128&(d=n[e+3]));)a[_++]=u,a[_++]=o,a[_++]=h,a[_++]=d,e+=4;if(u=n[e++],u<128)a[_++]=u;else if((224&u)==192){if(e>=c)return this.interim[0]=u,_;if(o=n[e++],(192&o)!=128){e--;continue}if(r=(31&u)<<6|63&o,r<128){e--;continue}a[_++]=r}else if((240&u)==224){if(e>=c)return this.interim[0]=u,_;if(o=n[e++],(192&o)!=128){e--;continue}if(e>=c)return this.interim[0]=u,this.interim[1]=o,_;if(h=n[e++],(192&h)!=128){e--;continue}if(r=(15&u)<<12|(63&o)<<6|63&h,r<2048||r>=55296&&r<=57343||r===65279)continue;a[_++]=r}else if((248&u)==240){if(e>=c)return this.interim[0]=u,_;if(o=n[e++],(192&o)!=128){e--;continue}if(e>=c)return this.interim[0]=u,this.interim[1]=o,_;if(h=n[e++],(192&h)!=128){e--;continue}if(e>=c)return this.interim[0]=u,this.interim[1]=o,this.interim[2]=h,_;if(d=n[e++],(192&d)!=128){e--;continue}if(r=(7&u)<<18|(63&o)<<12|(63&h)<<6|63&d,r<65536||r>1114111)continue;a[_++]=r}}return _}}},776:function(F,S,n){var a=this&&this.__decorate||function(r,t,i,e){var s,l=arguments.length,v=l<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,t,i,e);else for(var g=r.length-1;g>=0;g--)(s=r[g])&&(v=(l<3?s(v):l>3?s(t,i,v):s(t,i))||v);return l>3&&v&&Object.defineProperty(t,i,v),v},c=this&&this.__param||function(r,t){return function(i,e){t(i,e,r)}};Object.defineProperty(S,"__esModule",{value:!0}),S.traceCall=S.setTraceLogger=S.LogService=void 0;const u=n(859),o=n(97),h={trace:o.LogLevelEnum.TRACE,debug:o.LogLevelEnum.DEBUG,info:o.LogLevelEnum.INFO,warn:o.LogLevelEnum.WARN,error:o.LogLevelEnum.ERROR,off:o.LogLevelEnum.OFF};let d,_=S.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=o.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),d=this}_updateLogLevel(){this._logLevel=h[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let t=0;t<r.length;t++)typeof r[t]=="function"&&(r[t]=r[t]())}_log(r,t,i){this._evalLazyOptionalParams(i),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+t,...i)}trace(r,...t){var i;this._logLevel<=o.LogLevelEnum.TRACE&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.trace.bind(this._optionsService.options.logger))??console.log,r,t)}debug(r,...t){var i;this._logLevel<=o.LogLevelEnum.DEBUG&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.debug.bind(this._optionsService.options.logger))??console.log,r,t)}info(r,...t){var i;this._logLevel<=o.LogLevelEnum.INFO&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.info.bind(this._optionsService.options.logger))??console.info,r,t)}warn(r,...t){var i;this._logLevel<=o.LogLevelEnum.WARN&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.warn.bind(this._optionsService.options.logger))??console.warn,r,t)}error(r,...t){var i;this._logLevel<=o.LogLevelEnum.ERROR&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.error.bind(this._optionsService.options.logger))??console.error,r,t)}};S.LogService=_=a([c(0,o.IOptionsService)],_),S.setTraceLogger=function(r){d=r},S.traceCall=function(r,t,i){if(typeof i.value!="function")throw new Error("not supported");const e=i.value;i.value=function(...s){if(d.logLevel!==o.LogLevelEnum.TRACE)return e.apply(this,s);d.trace(`GlyphRenderer#${e.name}(${s.map(v=>JSON.stringify(v)).join(", ")})`);const l=e.apply(this,s);return d.trace(`GlyphRenderer#${e.name} return`,l),l}}},726:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.createDecorator=S.getServiceDependencies=S.serviceRegistry=void 0;const n="di$target",a="di$dependencies";S.serviceRegistry=new Map,S.getServiceDependencies=function(c){return c[a]||[]},S.createDecorator=function(c){if(S.serviceRegistry.has(c))return S.serviceRegistry.get(c);const u=function(o,h,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,r,t){r[n]===r?r[a].push({id:_,index:t}):(r[a]=[{id:_,index:t}],r[n]=r)})(u,o,d)};return u.toString=()=>c,S.serviceRegistry.set(c,u),u}},97:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.IDecorationService=S.IUnicodeService=S.IOscLinkService=S.IOptionsService=S.ILogService=S.LogLevelEnum=S.IInstantiationService=S.ICharsetService=S.ICoreService=S.ICoreMouseService=S.IBufferService=void 0;const a=n(726);var c;S.IBufferService=(0,a.createDecorator)("BufferService"),S.ICoreMouseService=(0,a.createDecorator)("CoreMouseService"),S.ICoreService=(0,a.createDecorator)("CoreService"),S.ICharsetService=(0,a.createDecorator)("CharsetService"),S.IInstantiationService=(0,a.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(c||(S.LogLevelEnum=c={})),S.ILogService=(0,a.createDecorator)("LogService"),S.IOptionsService=(0,a.createDecorator)("OptionsService"),S.IOscLinkService=(0,a.createDecorator)("OscLinkService"),S.IUnicodeService=(0,a.createDecorator)("UnicodeService"),S.IDecorationService=(0,a.createDecorator)("DecorationService")}},G={};function N(F){var S=G[F];if(S!==void 0)return S.exports;var n=G[F]={exports:{}};return ne[F].call(n.exports,n,n.exports,N),n.exports}var V={};return(()=>{var F=V;Object.defineProperty(F,"__esModule",{value:!0}),F.CanvasAddon=void 0;const S=N(345),n=N(859),a=N(776),c=N(949);class u extends n.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new S.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new S.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var h;return(h=this._renderer)==null?void 0:h.textureAtlas}activate(h){const d=h._core;if(!h.element)return void this.register(d.onWillOpen(()=>this.activate(h)));this._terminal=h;const _=d.coreService,r=d.optionsService,t=d.screenElement,i=d.linkifier,e=d,s=e._bufferService,l=e._renderService,v=e._characterJoinerService,g=e._charSizeService,p=e._coreBrowserService,f=e._decorationService,m=e._logService,C=e._themeService;(0,a.setTraceLogger)(m),this._renderer=new c.CanvasRenderer(h,t,i,s,g,r,v,_,p,f,C),this.register((0,S.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,S.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),l.setRenderer(this._renderer),l.handleResize(s.cols,s.rows),this.register((0,n.toDisposable)(()=>{var w;l.setRenderer(this._terminal._core._createRenderer()),l.handleResize(h.cols,h.rows),(w=this._renderer)==null||w.dispose(),this._renderer=void 0}))}clearTextureAtlas(){var h;(h=this._renderer)==null||h.clearTextureAtlas()}}F.CanvasAddon=u})(),V})(),ke.exports=De()),Me={exports:{}},Ae,Be,Ye=(Re||(Re=1,Ae=Me,(function(ne,G){Ae.exports=G()})(self,()=>(()=>{var ne={};return(()=>{var G=ne;Object.defineProperty(G,"__esModule",{value:!0}),G.FitAddon=void 0,G.FitAddon=class{activate(N){this._terminal=N}dispose(){}fit(){const N=this.proposeDimensions();if(!N||!this._terminal||isNaN(N.cols)||isNaN(N.rows))return;const V=this._terminal._core;this._terminal.rows===N.rows&&this._terminal.cols===N.cols||(V._renderService.clear(),this._terminal.resize(N.cols,N.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const N=this._terminal._core,V=N._renderService.dimensions;if(V.css.cell.width===0||V.css.cell.height===0)return;const F=this._terminal.options.scrollback===0?0:N.viewport.scrollBarWidth,S=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(S.getPropertyValue("height")),a=Math.max(0,parseInt(S.getPropertyValue("width"))),c=window.getComputedStyle(this._terminal.element),u=n-(parseInt(c.getPropertyValue("padding-top"))+parseInt(c.getPropertyValue("padding-bottom"))),o=a-(parseInt(c.getPropertyValue("padding-right"))+parseInt(c.getPropertyValue("padding-left")))-F;return{cols:Math.max(2,Math.floor(o/V.css.cell.width)),rows:Math.max(1,Math.floor(u/V.css.cell.height))}}}})(),ne})())),Me.exports),Te={exports:{}},Oe,Ze=(Be||(Be=1,(function(ne){(function(G,N){ne.exports=N()})(self,()=>(()=>{var G={345:(S,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===a)return void this._listeners.splice(c,1)}}})),this._event}fire(a,c){const u=[];for(let o=0;o<this._listeners.length;o++)u.push(this._listeners[o]);for(let o=0;o<u.length;o++)u[o].call(void 0,a,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(a,c){return a(u=>c.fire(u))},n.runAndSubscribe=function(a,c){return c(void 0),a(u=>c(u))}},859:(S,n)=>{function a(c){for(const u of c)u.dispose();c.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){const u=this._disposables.indexOf(c);u!==-1&&this._disposables.splice(u,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){var u;this._isDisposed||c===this._value||((u=this._value)==null||u.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)==null||c.dispose(),this._value=void 0}},n.toDisposable=function(c){return{dispose:c}},n.disposeArray=a,n.getDisposeArrayDisposable=function(c){return{dispose:()=>a(c)}}}},N={};function V(S){var n=N[S];if(n!==void 0)return n.exports;var a=N[S]={exports:{}};return G[S](a,a.exports,V),a.exports}var F={};return(()=>{var S=F;Object.defineProperty(S,"__esModule",{value:!0}),S.SearchAddon=void 0;const n=V(345),a=V(859),c=" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?";class u extends a.Disposable{constructor(h){super(),this._highlightedLines=new Set,this._highlightDecorations=[],this._selectedDecoration=this.register(new a.MutableDisposable),this._linesCacheTimeoutId=0,this._linesCacheDisposables=new a.MutableDisposable,this._onDidChangeResults=this.register(new n.EventEmitter),this.onDidChangeResults=this._onDidChangeResults.event,this._highlightLimit=(h==null?void 0:h.highlightLimit)??1e3}activate(h){this._terminal=h,this.register(this._terminal.onWriteParsed(()=>this._updateMatches())),this.register(this._terminal.onResize(()=>this._updateMatches())),this.register((0,a.toDisposable)(()=>this.clearDecorations()))}_updateMatches(){var h;this._highlightTimeout&&window.clearTimeout(this._highlightTimeout),this._cachedSearchTerm&&((h=this._lastSearchOptions)!=null&&h.decorations)&&(this._highlightTimeout=setTimeout(()=>{const d=this._cachedSearchTerm;this._cachedSearchTerm=void 0,this.findPrevious(d,{...this._lastSearchOptions,incremental:!0,noScroll:!0})},200))}clearDecorations(h){this._selectedDecoration.clear(),(0,a.disposeArray)(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear(),h||(this._cachedSearchTerm=void 0)}clearActiveDecoration(){this._selectedDecoration.clear()}findNext(h,d){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");const _=!this._lastSearchOptions||this._didOptionsChange(this._lastSearchOptions,d);this._lastSearchOptions=d,d!=null&&d.decorations&&(this._cachedSearchTerm===void 0||h!==this._cachedSearchTerm||_)&&this._highlightAllMatches(h,d);const r=this._findNextAndSelect(h,d);return this._fireResults(d),this._cachedSearchTerm=h,r}_highlightAllMatches(h,d){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!h||h.length===0)return void this.clearDecorations();d=d||{},this.clearDecorations(!0);const _=[];let r,t=this._find(h,0,0,d);for(;t&&((r==null?void 0:r.row)!==t.row||(r==null?void 0:r.col)!==t.col)&&!(_.length>=this._highlightLimit);)r=t,_.push(r),t=this._find(h,r.col+r.term.length>=this._terminal.cols?r.row+1:r.row,r.col+r.term.length>=this._terminal.cols?0:r.col+1,d);for(const i of _){const e=this._createResultDecoration(i,d.decorations);e&&(this._highlightedLines.add(e.marker.line),this._highlightDecorations.push({decoration:e,match:i,dispose(){e.dispose()}}))}}_find(h,d,_,r){var e;if(!this._terminal||!h||h.length===0)return(e=this._terminal)==null||e.clearSelection(),void this.clearDecorations();if(_>this._terminal.cols)throw new Error(`Invalid col: ${_} to search in terminal of ${this._terminal.cols} cols`);let t;this._initLinesCache();const i={startRow:d,startCol:_};if(t=this._findInLine(h,i,r),!t)for(let s=d+1;s<this._terminal.buffer.active.baseY+this._terminal.rows&&(i.startRow=s,i.startCol=0,t=this._findInLine(h,i,r),!t);s++);return t}_findNextAndSelect(h,d){var s;if(!this._terminal||!h||h.length===0)return(s=this._terminal)==null||s.clearSelection(),this.clearDecorations(),!1;const _=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=0,t=0;_&&(this._cachedSearchTerm===h?(r=_.end.x,t=_.end.y):(r=_.start.x,t=_.start.y)),this._initLinesCache();const i={startRow:t,startCol:r};let e=this._findInLine(h,i,d);if(!e)for(let l=t+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(i.startRow=l,i.startCol=0,e=this._findInLine(h,i,d),!e);l++);if(!e&&t!==0)for(let l=0;l<t&&(i.startRow=l,i.startCol=0,e=this._findInLine(h,i,d),!e);l++);return!e&&_&&(i.startRow=_.start.y,i.startCol=0,e=this._findInLine(h,i,d)),this._selectResult(e,d==null?void 0:d.decorations,d==null?void 0:d.noScroll)}findPrevious(h,d){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");const _=!this._lastSearchOptions||this._didOptionsChange(this._lastSearchOptions,d);this._lastSearchOptions=d,d!=null&&d.decorations&&(this._cachedSearchTerm===void 0||h!==this._cachedSearchTerm||_)&&this._highlightAllMatches(h,d);const r=this._findPreviousAndSelect(h,d);return this._fireResults(d),this._cachedSearchTerm=h,r}_didOptionsChange(h,d){return!!d&&(h.caseSensitive!==d.caseSensitive||h.regex!==d.regex||h.wholeWord!==d.wholeWord)}_fireResults(h){if(h!=null&&h.decorations){let d=-1;if(this._selectedDecoration.value){const _=this._selectedDecoration.value.match;for(let r=0;r<this._highlightDecorations.length;r++){const t=this._highlightDecorations[r].match;if(t.row===_.row&&t.col===_.col&&t.size===_.size){d=r;break}}}this._onDidChangeResults.fire({resultIndex:d,resultCount:this._highlightDecorations.length})}}_findPreviousAndSelect(h,d){var l;if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!this._terminal||!h||h.length===0)return(l=this._terminal)==null||l.clearSelection(),this.clearDecorations(),!1;const _=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=this._terminal.buffer.active.baseY+this._terminal.rows-1,t=this._terminal.cols;const i=!0;this._initLinesCache();const e={startRow:r,startCol:t};let s;if(_&&(e.startRow=r=_.start.y,e.startCol=t=_.start.x,this._cachedSearchTerm!==h&&(s=this._findInLine(h,e,d,!1),s||(e.startRow=r=_.end.y,e.startCol=t=_.end.x))),s||(s=this._findInLine(h,e,d,i)),!s){e.startCol=Math.max(e.startCol,this._terminal.cols);for(let v=r-1;v>=0&&(e.startRow=v,s=this._findInLine(h,e,d,i),!s);v--);}if(!s&&r!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let v=this._terminal.buffer.active.baseY+this._terminal.rows-1;v>=r&&(e.startRow=v,s=this._findInLine(h,e,d,i),!s);v--);return this._selectResult(s,d==null?void 0:d.decorations,d==null?void 0:d.noScroll)}_initLinesCache(){const h=this._terminal;this._linesCache||(this._linesCache=new Array(h.buffer.active.length),this._linesCacheDisposables.value=(0,a.getDisposeArrayDisposable)([h.onLineFeed(()=>this._destroyLinesCache()),h.onCursorMove(()=>this._destroyLinesCache()),h.onResize(()=>this._destroyLinesCache())])),window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=window.setTimeout(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeoutId&&(window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=0)}_isWholeWord(h,d,_){return(h===0||c.includes(d[h-1]))&&(h+_.length===d.length||c.includes(d[h+_.length]))}_findInLine(h,d,_={},r=!1){var w;const t=this._terminal,i=d.startRow,e=d.startCol,s=t.buffer.active.getLine(i);if(s!=null&&s.isWrapped)return r?void(d.startCol+=t.cols):(d.startRow--,d.startCol+=t.cols,this._findInLine(h,d,_));let l=(w=this._linesCache)==null?void 0:w[i];l||(l=this._translateBufferLineToStringWithWrap(i,!0),this._linesCache&&(this._linesCache[i]=l));const[v,g]=l,p=this._bufferColsToStringOffset(i,e),f=_.caseSensitive?h:h.toLowerCase(),m=_.caseSensitive?v:v.toLowerCase();let C=-1;if(_.regex){const L=RegExp(f,"g");let y;if(r)for(;y=L.exec(m.slice(0,p));)C=L.lastIndex-y[0].length,h=y[0],L.lastIndex-=h.length-1;else y=L.exec(m.slice(p)),y&&y[0].length>0&&(C=p+(L.lastIndex-y[0].length),h=y[0])}else r?p-f.length>=0&&(C=m.lastIndexOf(f,p-f.length)):C=m.indexOf(f,p);if(C>=0){if(_.wholeWord&&!this._isWholeWord(C,m,h))return;let L=0;for(;L<g.length-1&&C>=g[L+1];)L++;let y=L;for(;y<g.length-1&&C+h.length>=g[y+1];)y++;const R=C-g[L],A=C+h.length-g[y],B=this._stringLengthToBufferSize(i+L,R);return{term:h,col:B,row:i+L,size:this._stringLengthToBufferSize(i+y,A)-B+t.cols*(y-L)}}}_stringLengthToBufferSize(h,d){const _=this._terminal.buffer.active.getLine(h);if(!_)return 0;for(let r=0;r<d;r++){const t=_.getCell(r);if(!t)break;const i=t.getChars();i.length>1&&(d-=i.length-1);const e=_.getCell(r+1);e&&e.getWidth()===0&&d++}return d}_bufferColsToStringOffset(h,d){const _=this._terminal;let r=h,t=0,i=_.buffer.active.getLine(r);for(;d>0&&i;){for(let e=0;e<d&&e<_.cols;e++){const s=i.getCell(e);if(!s)break;s.getWidth()&&(t+=s.getCode()===0?1:s.getChars().length)}if(r++,i=_.buffer.active.getLine(r),i&&!i.isWrapped)break;d-=_.cols}return t}_translateBufferLineToStringWithWrap(h,d){var e;const _=this._terminal,r=[],t=[0];let i=_.buffer.active.getLine(h);for(;i;){const s=_.buffer.active.getLine(h+1),l=!!s&&s.isWrapped;let v=i.translateToString(!l&&d);if(l&&s){const g=i.getCell(i.length-1);g&&g.getCode()===0&&g.getWidth()===1&&((e=s.getCell(0))==null?void 0:e.getWidth())===2&&(v=v.slice(0,-1))}if(r.push(v),!l)break;t.push(t[t.length-1]+v.length),h++,i=s}return[r.join(""),t]}_selectResult(h,d,_){const r=this._terminal;if(this._selectedDecoration.clear(),!h)return r.clearSelection(),!1;if(r.select(h.col,h.row,h.size),d){const t=r.registerMarker(-r.buffer.active.baseY-r.buffer.active.cursorY+h.row);if(t){const i=r.registerDecoration({marker:t,x:h.col,width:h.size,backgroundColor:d.activeMatchBackground,layer:"top",overviewRulerOptions:{color:d.activeMatchColorOverviewRuler}});if(i){const e=[];e.push(t),e.push(i.onRender(s=>this._applyStyles(s,d.activeMatchBorder,!0))),e.push(i.onDispose(()=>(0,a.disposeArray)(e))),this._selectedDecoration.value={decoration:i,match:h,dispose(){i.dispose()}}}}}if(!_&&(h.row>=r.buffer.active.viewportY+r.rows||h.row<r.buffer.active.viewportY)){let t=h.row-r.buffer.active.viewportY;t-=Math.floor(r.rows/2),r.scrollLines(t)}return!0}_applyStyles(h,d,_){h.classList.contains("xterm-find-result-decoration")||(h.classList.add("xterm-find-result-decoration"),d&&(h.style.outline=`1px solid ${d}`)),_&&h.classList.add("xterm-find-active-result-decoration")}_createResultDecoration(h,d){const _=this._terminal,r=_.registerMarker(-_.buffer.active.baseY-_.buffer.active.cursorY+h.row);if(!r)return;const t=_.registerDecoration({marker:r,x:h.col,width:h.size,backgroundColor:d.matchBackground,overviewRulerOptions:this._highlightedLines.has(r.line)?void 0:{color:d.matchOverviewRuler,position:"center"}});if(t){const i=[];i.push(r),i.push(t.onRender(e=>this._applyStyles(e,d.matchBorder,!1))),i.push(t.onDispose(()=>(0,a.disposeArray)(i)))}return t}}S.SearchAddon=u})(),F})())})(Te)),Te.exports),Pe={exports:{}},Ie,Qe=(Oe||(Oe=1,(function(ne){(function(G,N){ne.exports=N()})(0,()=>(()=>{var G={433:(S,n,a)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV11=void 0;const c=a(938),u=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],o=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],h=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],d=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]];let _;function r(t,i){let e,s=0,l=i.length-1;if(t<i[0][0]||t>i[l][1])return!1;for(;l>=s;)if(e=s+l>>1,t>i[e][1])s=e+1;else{if(!(t<i[e][0]))return!0;l=e-1}return!1}n.UnicodeV11=class{constructor(){if(this.version="11",!_){_=new Uint8Array(65536),_.fill(1),_[0]=0,_.fill(0,1,32),_.fill(0,127,160);for(let t=0;t<u.length;++t)_.fill(0,u[t][0],u[t][1]+1);for(let t=0;t<h.length;++t)_.fill(2,h[t][0],h[t][1]+1)}}wcwidth(t){return t<32?0:t<127?1:t<65536?_[t]:r(t,o)?0:r(t,d)?2:1}charProperties(t,i){let e=this.wcwidth(t),s=e===0&&i!==0;if(s){const l=c.UnicodeService.extractWidth(i);l===0?s=!1:l>e&&(e=l)}return c.UnicodeService.createPropertyValue(0,e,s)}}},345:(S,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===a)return void this._listeners.splice(c,1)}}})),this._event}fire(a,c){const u=[];for(let o=0;o<this._listeners.length;o++)u.push(this._listeners[o]);for(let o=0;o<u.length;o++)u[o].call(void 0,a,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(a,c){return a(u=>c.fire(u))},n.runAndSubscribe=function(a,c){return c(void 0),a(u=>c(u))}},490:(S,n,a)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const c=a(938),u=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],o=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let h;n.UnicodeV6=class{constructor(){if(this.version="6",!h){h=new Uint8Array(65536),h.fill(1),h[0]=0,h.fill(0,1,32),h.fill(0,127,160),h.fill(2,4352,4448),h[9001]=2,h[9002]=2,h.fill(2,11904,42192),h[12351]=1,h.fill(2,44032,55204),h.fill(2,63744,64256),h.fill(2,65040,65050),h.fill(2,65072,65136),h.fill(2,65280,65377),h.fill(2,65504,65511);for(let d=0;d<u.length;++d)h.fill(0,u[d][0],u[d][1]+1)}}wcwidth(d){return d<32?0:d<127?1:d<65536?h[d]:(function(_,r){let t,i=0,e=r.length-1;if(_<r[0][0]||_>r[e][1])return!1;for(;e>=i;)if(t=i+e>>1,_>r[t][1])i=t+1;else{if(!(_<r[t][0]))return!0;e=t-1}return!1})(d,o)?0:d>=131072&&d<=196605||d>=196608&&d<=262141?2:1}charProperties(d,_){let r=this.wcwidth(d),t=r===0&&_!==0;if(t){const i=c.UnicodeService.extractWidth(_);i===0?t=!1:i>r&&(r=i)}return c.UnicodeService.createPropertyValue(0,r,t)}}},938:(S,n,a)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const c=a(345),u=a(490);class o{static extractShouldJoin(d){return!!(1&d)}static extractWidth(d){return d>>1&3}static extractCharKind(d){return d>>3}static createPropertyValue(d,_,r=!1){return(16777215&d)<<3|(3&_)<<1|(r?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;const d=new u.UnicodeV6;this.register(d),this._active=d.version,this._activeProvider=d}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(d){if(!this._providers[d])throw new Error(`unknown Unicode version "${d}"`);this._active=d,this._activeProvider=this._providers[d],this._onChange.fire(d)}register(d){this._providers[d.version]=d}wcwidth(d){return this._activeProvider.wcwidth(d)}getStringCellWidth(d){let _=0,r=0;const t=d.length;for(let i=0;i<t;++i){let e=d.charCodeAt(i);if(55296<=e&&e<=56319){if(++i>=t)return _+this.wcwidth(e);const v=d.charCodeAt(i);56320<=v&&v<=57343?e=1024*(e-55296)+v-56320+65536:_+=this.wcwidth(v)}const s=this.charProperties(e,r);let l=o.extractWidth(s);o.extractShouldJoin(s)&&(l-=o.extractWidth(r)),_+=l,r=s}return _}charProperties(d,_){return this._activeProvider.charProperties(d,_)}}n.UnicodeService=o}},N={};function V(S){var n=N[S];if(n!==void 0)return n.exports;var a=N[S]={exports:{}};return G[S](a,a.exports,V),a.exports}var F={};return(()=>{var S=F;Object.defineProperty(S,"__esModule",{value:!0}),S.Unicode11Addon=void 0;const n=V(433);S.Unicode11Addon=class{activate(a){a.unicode.register(new n.UnicodeV11)}dispose(){}}})(),F})())})(Pe)),Pe.exports),He={exports:{}},Fe,et=(Ie||(Ie=1,(function(ne){(function(G,N){ne.exports=N()})(self,()=>(()=>{var G={6:(S,n)=>{function a(u){try{const o=new URL(u),h=o.password&&o.username?`${o.protocol}//${o.username}:${o.password}@${o.host}`:o.username?`${o.protocol}//${o.username}@${o.host}`:`${o.protocol}//${o.host}`;return u.toLocaleLowerCase().startsWith(h.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(n,"__esModule",{value:!0}),n.LinkComputer=n.WebLinkProvider=void 0,n.WebLinkProvider=class{constructor(u,o,h,d={}){this._terminal=u,this._regex=o,this._handler=h,this._options=d}provideLinks(u,o){const h=c.computeLink(u,this._regex,this._terminal,this._handler);o(this._addCallbacks(h))}_addCallbacks(u){return u.map(o=>(o.leave=this._options.leave,o.hover=(h,d)=>{if(this._options.hover){const{range:_}=o;this._options.hover(h,d,_)}},o))}};class c{static computeLink(o,h,d,_){const r=new RegExp(h.source,(h.flags||"")+"g"),[t,i]=c._getWindowedLineStrings(o-1,d),e=t.join("");let s;const l=[];for(;s=r.exec(e);){const v=s[0];if(!a(v))continue;const[g,p]=c._mapStrIdx(d,i,0,s.index),[f,m]=c._mapStrIdx(d,g,p,v.length);if(g===-1||p===-1||f===-1||m===-1)continue;const C={start:{x:p+1,y:g+1},end:{x:m,y:f+1}};l.push({range:C,text:v,activate:_})}return l}static _getWindowedLineStrings(o,h){let d,_=o,r=o,t=0,i="";const e=[];if(d=h.buffer.active.getLine(o)){const s=d.translateToString(!0);if(d.isWrapped&&s[0]!==" "){for(t=0;(d=h.buffer.active.getLine(--_))&&t<2048&&(i=d.translateToString(!0),t+=i.length,e.push(i),d.isWrapped&&i.indexOf(" ")===-1););e.reverse()}for(e.push(s),t=0;(d=h.buffer.active.getLine(++r))&&d.isWrapped&&t<2048&&(i=d.translateToString(!0),t+=i.length,e.push(i),i.indexOf(" ")===-1););}return[e,_]}static _mapStrIdx(o,h,d,_){const r=o.buffer.active,t=r.getNullCell();let i=d;for(;_;){const e=r.getLine(h);if(!e)return[-1,-1];for(let s=i;s<e.length;++s){e.getCell(s,t);const l=t.getChars();if(t.getWidth()&&(_-=l.length||1,s===e.length-1&&l==="")){const v=r.getLine(h+1);v&&v.isWrapped&&(v.getCell(0,t),t.getWidth()===2&&(_+=1))}if(_<0)return[h,s]}h++,i=0}return[h,i]}}n.LinkComputer=c}},N={};function V(S){var n=N[S];if(n!==void 0)return n.exports;var a=N[S]={exports:{}};return G[S](a,a.exports,V),a.exports}var F={};return(()=>{var S=F;Object.defineProperty(S,"__esModule",{value:!0}),S.WebLinksAddon=void 0;const n=V(6),a=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function c(u,o){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=o}else console.warn("Opening link blocked as opener could not be cleared")}S.WebLinksAddon=class{constructor(u=c,o={}){this._handler=u,this._options=o}activate(u){this._terminal=u;const o=this._options,h=o.urlRegex||a;this._linkProvider=this._terminal.registerLinkProvider(new n.WebLinkProvider(this._terminal,h,this._handler,o))}dispose(){var u;(u=this._linkProvider)==null||u.dispose()}}})(),F})())})(He)),He.exports),We={exports:{}},tt=(Fe||(Fe=1,(function(ne){(function(G,N){ne.exports=N()})(globalThis,()=>(()=>{var G={4567:function(S,n,a){var c=this&&this.__decorate||function(e,s,l,v){var g,p=arguments.length,f=p<3?s:v===null?v=Object.getOwnPropertyDescriptor(s,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(e,s,l,v);else for(var m=e.length-1;m>=0;m--)(g=e[m])&&(f=(p<3?g(f):p>3?g(s,l,f):g(s,l))||f);return p>3&&f&&Object.defineProperty(s,l,f),f},u=this&&this.__param||function(e,s){return function(l,v){s(l,v,e)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const o=a(9042),h=a(9924),d=a(844),_=a(4725),r=a(2585),t=a(3656);let i=n.AccessibilityManager=class extends d.Disposable{constructor(e,s,l,v){super(),this._terminal=e,this._coreBrowserService=l,this._renderService=v,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let g=0;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);if(this._topBoundaryFocusListener=g=>this._handleBoundaryFocus(g,0),this._bottomBoundaryFocusListener=g=>this._handleBoundaryFocus(g,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new h.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(g=>this._handleResize(g.rows))),this.register(this._terminal.onRender(g=>this._refreshRows(g.start,g.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(g=>this._handleChar(g))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
1
|
+
import{c as ot,d as ze,r as fe,dp as at,cP as Ce,fv as ht,L as ye,j as _e,a9 as ct,T as je,fg as lt,$ as dt,fw as _t,a as ut,fx as ft,__tla as vt}from"./index-C1SHFMCp.js";import{u as gt,a as pt}from"./state-CDooX-dk.js";import{h as mt,__tla as St}from"./edit-page-CGc9EjuG.js";import"./links-Dd1icsEk.js";import{__tla as Ct}from"./storage-b1QCapTq.js";import"./index-C71cdkH-.js";import"./index-qbTLKWyG.js";import"./index-Bfy-I_lW.js";import"./index-Bh98Tp-z.js";import"./index-BtQtesaI.js";import"./index-C6DWtSls.js";import"./index-B_KyDZ94.js";import"./index-DcGIOAQi.js";import"./index-BDYVSSzB.js";import"./index-Cb6duXQm.js";import"./index-PJfa9qXY.js";import"./index-CT_FTqvK.js";import"./index-BhroIwBL.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asn1-DWPaVWf6.js";import"./brainfuck-CtZaYBKt.js";import"./cobol-stawOqaz.js";import"./clike-BgBwzOhw.js";import"./clojure-DiuoqK-z.js";import"./css-ZjFoif2m.js";import"./cmake-DXn5xaP-.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./cypher-gJDei3ni.js";import"./python-DD-Q2bae.js";import"./crystal-CRzZ78HM.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./simple-mode-C3vEBAcb.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./mllike-3c2dg9RT.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./idl-pcmmZuaN.js";import"./javascript-BpzJj0-u.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mirc-DkvFAiy5.js";import"./mathematica-IIbmv7SK.js";import"./modelica-DSrSSXCg.js";import"./mumps-zvxmGV4l.js";import"./mbox-z_N2Mo3d.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./pug-BTvK5tSS.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./rpm-DI_rRufH.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./sparql-BRLJFz69.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./verilog-B4LBqg_1.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./ttcn-cfg-CKJxb-l2.js";import"./turtle-BkSuIpt-.js";import"./webidl-CGwyPRYs.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./vhdl-CWWH2SUo.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";import"./mscgen-B2igx18G.js";import"./index-SPslPC2B.js";import"./trash--tonOuDe.js";import"./_createAggregator-VFK9K2d9.js";import"./_baseEach-BjSm9ht3.js";import{__tla as bt}from"./loro_wasm_bg-C1ks32Vm.js";let qe,wt=Promise.all([(()=>{try{return vt}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return bt}catch{}})()]).then(async()=>{const Ve=ot("text-select",[["path",{d:"M14 21h1",key:"v9vybs"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M21 14v1",key:"169vum"}],["path",{d:"M21 19a2 2 0 0 1-2 2",key:"1j7049"}],["path",{d:"M21 9v1",key:"mxsmne"}],["path",{d:"M3 14v1",key:"vnatye"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h6",key:"1vyc9m"}],["path",{d:"M7 8h8",key:"1jbsf9"}],["path",{d:"M9 21h1",key:"15o7lz"}],["path",{d:"M9 3h1",key:"1yesri"}]]);var xe,Le={exports:{}},be,Ee,Xe=xe?Le.exports:(xe=1,Le.exports=(be={},(()=>{var ne=be;function G(N,V,F){return N.addEventListener(V,F),{dispose:()=>{F&&N.removeEventListener(V,F)}}}Object.defineProperty(ne,"__esModule",{value:!0}),ne.AttachAddon=void 0,ne.AttachAddon=class{constructor(N,V){this._disposables=[],this._socket=N,this._socket.binaryType="arraybuffer",this._bidirectional=!(V&&V.bidirectional===!1)}activate(N){this._disposables.push(G(this._socket,"message",V=>{const F=V.data;N.write(typeof F=="string"?F:new Uint8Array(F))})),this._bidirectional&&(this._disposables.push(N.onData(V=>this._sendData(V))),this._disposables.push(N.onBinary(V=>this._sendBinary(V)))),this._disposables.push(G(this._socket,"close",()=>this.dispose())),this._disposables.push(G(this._socket,"error",()=>this.dispose()))}dispose(){for(const N of this._disposables)N.dispose()}_sendData(N){this._checkOpenSocket()&&this._socket.send(N)}_sendBinary(N){if(!this._checkOpenSocket())return;const V=new Uint8Array(N.length);for(let F=0;F<N.length;++F)V[F]=255&N.charCodeAt(F);this._socket.send(V)}_checkOpenSocket(){switch(this._socket.readyState){case WebSocket.OPEN:return!0;case WebSocket.CONNECTING:throw new Error("Attach addon was loaded before socket was open");case WebSocket.CLOSING:return console.warn("Attach addon socket is closing"),!1;case WebSocket.CLOSED:throw new Error("Attach addon socket is closed");default:throw new Error("Unexpected socket state")}}}})(),be)),ke={exports:{}},De,Re,Je=Ee?ke.exports:(Ee=1,De=()=>(()=>{var ne={903:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.BaseRenderLayer=void 0;const a=n(274),c=n(627),u=n(237),o=n(860),h=n(374),d=n(296),_=n(345),r=n(859),t=n(399),i=n(855);class e extends r.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var v;return(v=this._charAtlas)==null?void 0:v.pages[0].canvas}constructor(v,g,p,f,m,C,w,L,y,R){super(),this._terminal=v,this._container=g,this._alpha=m,this._themeService=C,this._bufferService=w,this._optionsService=L,this._decorationService=y,this._coreBrowserService=R,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,d.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new r.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new _.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new a.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${p}-layer`),this._canvas.style.zIndex=f.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors(A=>{this._refreshCharAtlas(A),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)})),this.register((0,r.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,h.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(v,g){}handleSelectionChanged(v,g,p=!1){this._selectionModel.update(this._terminal._core,v,g,p)}_setTransparency(v){if(v===this._alpha)return;const g=this._canvas;this._alpha=v,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,g),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(v){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,c.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,v,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,_.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let g=0;g<this._charAtlas.pages.length;g++)this._bitmapGenerator[g]=new s(this._charAtlas.pages[g].canvas)}}resize(v){this._deviceCellWidth=v.device.cell.width,this._deviceCellHeight=v.device.cell.height,this._deviceCharWidth=v.device.char.width,this._deviceCharHeight=v.device.char.height,this._deviceCharLeft=v.device.char.left,this._deviceCharTop=v.device.char.top,this._canvas.width=v.device.canvas.width,this._canvas.height=v.device.canvas.height,this._canvas.style.width=`${v.css.canvas.width}px`,this._canvas.style.height=`${v.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var v;(v=this._charAtlas)==null||v.clearTexture()}_fillCells(v,g,p,f){this._ctx.fillRect(v*this._deviceCellWidth,g*this._deviceCellHeight,p*this._deviceCellWidth,f*this._deviceCellHeight)}_fillMiddleLineAtCells(v,g,p=1){const f=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(v*this._deviceCellWidth,(g+1)*this._deviceCellHeight-f-this._coreBrowserService.dpr,p*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(v,g,p=1,f=0){this._ctx.fillRect(v*this._deviceCellWidth,(g+1)*this._deviceCellHeight+f-this._coreBrowserService.dpr-1,p*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(v,g,p=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const f=this._coreBrowserService.dpr;this._ctx.lineWidth=f;for(let m=0;m<p;m++){const C=(v+m)*this._deviceCellWidth,w=(v+m+.5)*this._deviceCellWidth,L=(v+m+1)*this._deviceCellWidth,y=(g+1)*this._deviceCellHeight-f-1,R=y-f,A=y+f;this._ctx.moveTo(C,y),this._ctx.bezierCurveTo(C,R,w,R,w,y),this._ctx.bezierCurveTo(w,A,L,A,L,y)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(v,g,p=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const f=this._coreBrowserService.dpr;this._ctx.lineWidth=f,this._ctx.setLineDash([2*f,f]);const m=v*this._deviceCellWidth,C=(g+1)*this._deviceCellHeight-f-1;this._ctx.moveTo(m,C);for(let w=0;w<p;w++){const L=(v+p+w)*this._deviceCellWidth;this._ctx.lineTo(L,C)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(v,g,p=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const f=this._coreBrowserService.dpr;this._ctx.lineWidth=f,this._ctx.setLineDash([4*f,3*f]);const m=v*this._deviceCellWidth,C=(v+p)*this._deviceCellWidth,w=(g+1)*this._deviceCellHeight-f-1;this._ctx.moveTo(m,w),this._ctx.lineTo(C,w),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(v,g,p){this._ctx.fillRect(v*this._deviceCellWidth,g*this._deviceCellHeight,this._coreBrowserService.dpr*p,this._deviceCellHeight)}_strokeRectAtCell(v,g,p,f){const m=this._coreBrowserService.dpr;this._ctx.lineWidth=m,this._ctx.strokeRect(v*this._deviceCellWidth+m/2,g*this._deviceCellHeight+m/2,p*this._deviceCellWidth-m,f*this._deviceCellHeight-m)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(v,g,p,f){this._alpha?this._ctx.clearRect(v*this._deviceCellWidth,g*this._deviceCellHeight,p*this._deviceCellWidth,f*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(v*this._deviceCellWidth,g*this._deviceCellHeight,p*this._deviceCellWidth,f*this._deviceCellHeight))}_fillCharTrueColor(v,g,p){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=u.TEXT_BASELINE,this._clipRow(p);let f=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(f=(0,o.tryDrawCustomChar)(this._ctx,v.getChars(),g*this._deviceCellWidth,p*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),f||this._ctx.fillText(v.getChars(),g*this._deviceCellWidth+this._deviceCharLeft,p*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(v,g,p){var y,R,A,B;const f=v.getChars(),m=v.getCode(),C=v.getWidth();if(this._cellColorResolver.resolve(v,g,this._bufferService.buffer.ydisp+p,this._deviceCellWidth),!this._charAtlas)return;let w;if(w=f&&f.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(f,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(v.getCode()||i.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!w.size.x||!w.size.y)return;this._ctx.save(),this._clipRow(p),this._bitmapGenerator[w.texturePage]&&this._charAtlas.pages[w.texturePage].canvas!==this._bitmapGenerator[w.texturePage].canvas&&((R=(y=this._bitmapGenerator[w.texturePage])==null?void 0:y.bitmap)==null||R.close(),delete this._bitmapGenerator[w.texturePage]),this._charAtlas.pages[w.texturePage].version!==((A=this._bitmapGenerator[w.texturePage])==null?void 0:A.version)&&(this._bitmapGenerator[w.texturePage]||(this._bitmapGenerator[w.texturePage]=new s(this._charAtlas.pages[w.texturePage].canvas)),this._bitmapGenerator[w.texturePage].refresh(),this._bitmapGenerator[w.texturePage].version=this._charAtlas.pages[w.texturePage].version);let L=w.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,h.allowRescaling)(m,C,w.size.x,this._deviceCellWidth)&&(L=this._deviceCellWidth-1),this._ctx.drawImage(((B=this._bitmapGenerator[w.texturePage])==null?void 0:B.bitmap)||this._charAtlas.pages[w.texturePage].canvas,w.texturePosition.x,w.texturePosition.y,w.size.x,w.size.y,g*this._deviceCellWidth+this._deviceCharLeft-w.offset.x,p*this._deviceCellHeight+this._deviceCharTop-w.offset.y,L,w.size.y),this._ctx.restore()}_clipRow(v){this._ctx.beginPath(),this._ctx.rect(0,v*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(v,g){return`${g?"italic":""} ${v?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}S.BaseRenderLayer=e;class s{get bitmap(){return this._bitmap}constructor(v){this.canvas=v,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var v;(v=this._bitmap)==null||v.close(),this._bitmap=void 0,t.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout(()=>this._generate(),100)),this._state===1&&(this._state=2))}_generate(){var v;this._state===0&&((v=this._bitmap)==null||v.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then(g=>{this._state===2?this.refresh():this._bitmap=g,this._state=0}),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.CanvasRenderer=void 0;const a=n(627),c=n(56),u=n(374),o=n(345),h=n(859),d=n(873),_=n(43),r=n(630),t=n(744);class i extends h.Disposable{constructor(s,l,v,g,p,f,m,C,w,L,y){super(),this._terminal=s,this._screenElement=l,this._bufferService=g,this._charSizeService=p,this._optionsService=f,this._coreBrowserService=w,this._themeService=y,this._observerDisposable=this.register(new h.MutableDisposable),this._onRequestRedraw=this.register(new o.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new o.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new o.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const R=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new t.TextRenderLayer(this._terminal,this._screenElement,0,R,this._bufferService,this._optionsService,m,L,this._coreBrowserService,y),new r.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,L,this._optionsService,y),new _.LinkRenderLayer(this._terminal,this._screenElement,2,v,this._bufferService,this._optionsService,L,this._coreBrowserService,y),new d.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,C,this._coreBrowserService,L,y)];for(const A of this._renderLayers)(0,o.forwardEvent)(A.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,u.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,c.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,(A,B)=>this._setCanvasDevicePixelDimensions(A,B)),this.register(this._coreBrowserService.onWindowChange(A=>{this._observerDisposable.value=(0,c.observeDevicePixelDimensions)(this._renderLayers[0].canvas,A,(B,T)=>this._setCanvasDevicePixelDimensions(B,T))})),this.register((0,h.toDisposable)(()=>{for(const A of this._renderLayers)A.dispose();(0,a.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(s,l){this._updateDimensions();for(const v of this._renderLayers)v.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation(s=>s.handleBlur())}handleFocus(){this._runOperation(s=>s.handleFocus())}handleSelectionChanged(s,l,v=!1){this._runOperation(g=>g.handleSelectionChanged(s,l,v)),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation(s=>s.handleCursorMove())}clear(){this._runOperation(s=>s.reset())}_runOperation(s){for(const l of this._renderLayers)s(l)}renderRows(s,l){for(const v of this._renderLayers)v.handleGridChanged(s,l)}clearTextureAtlas(){for(const s of this._renderLayers)s.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const s=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*s),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*s),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/s),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/s),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(s,l){this.dimensions.device.canvas.height=l,this.dimensions.device.canvas.width=s;for(const v of this._renderLayers)v.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}S.CanvasRenderer=i},873:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.CursorRenderLayer=void 0;const a=n(457),c=n(859),u=n(399),o=n(782),h=n(903);class d extends h.BaseRenderLayer{constructor(r,t,i,e,s,l,v,g,p,f){super(r,t,"cursor",i,!0,f,s,l,p,g),this._onRequestRedraw=e,this._coreService=v,this._cursorBlinkStateManager=this.register(new c.MutableDisposable),this._cell=new o.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(l.onOptionChange(()=>this._handleOptionsChanged())),this._handleOptionsChanged()}resize(r){super.resize(r),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var r;this._clearCursor(),(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var r;(r=this._cursorBlinkStateManager.value)==null||r.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var r;(r=this._cursorBlinkStateManager.value)==null||r.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new a.CursorBlinkStateManager(()=>this._render(!0),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var r;(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation()}handleGridChanged(r,t){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(r){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,i=t-this._bufferService.buffer.ydisp;if(i<0||i>=this._bufferService.rows)return void this._clearCursor();const e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(t).loadCell(e,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const s=this._optionsService.rawOptions.cursorStyle,l=this._optionsService.rawOptions.cursorInactiveStyle;return l&&l!=="none"&&this._cursorRenderers[l](e,i,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=i,this._state.isFocused=!1,this._state.style=s,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===e&&this._state.y===i&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](e,i,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=i,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(u.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(r,t,i){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(r,t,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(r,t,i){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(r,t,i.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(i,r,t),this._ctx.restore()}_renderUnderlineCursor(r,t,i){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(r,t),this._ctx.restore()}_renderOutlineCursor(r,t,i){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(r,t,i.getWidth(),1),this._ctx.restore()}}S.CursorRenderLayer=d},574:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.GridCache=void 0,S.GridCache=class{constructor(){this.cache=[]}resize(n,a){for(let c=0;c<n;c++){this.cache.length<=c&&this.cache.push([]);for(let u=this.cache[c].length;u<a;u++)this.cache[c].push(void 0);this.cache[c].length=a}this.cache.length=n}clear(){for(let n=0;n<this.cache.length;n++)for(let a=0;a<this.cache[n].length;a++)this.cache[n][a]=void 0}}},43:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.LinkRenderLayer=void 0;const a=n(197),c=n(237),u=n(903);class o extends u.BaseRenderLayer{constructor(d,_,r,t,i,e,s,l,v){super(d,_,"link",r,!0,v,i,e,s,l),this.register(t.onShowLinkUnderline(g=>this._handleShowLinkUnderline(g))),this.register(t.onHideLinkUnderline(g=>this._handleHideLinkUnderline(g)))}resize(d){super.resize(d),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const d=this._state.y2-this._state.y1-1;d>0&&this._clearCells(0,this._state.y1+1,this._state.cols,d),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(d){if(d.fg===c.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:d.fg&&(0,a.is256Color)(d.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[d.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,d.y1===d.y2)this._fillBottomLineAtCells(d.x1,d.y1,d.x2-d.x1);else{this._fillBottomLineAtCells(d.x1,d.y1,d.cols-d.x1);for(let _=d.y1+1;_<d.y2;_++)this._fillBottomLineAtCells(0,_,d.cols);this._fillBottomLineAtCells(0,d.y2,d.x2)}this._state=d}_handleHideLinkUnderline(d){this._clearCurrentLink()}}S.LinkRenderLayer=o},630:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.SelectionRenderLayer=void 0;const a=n(903);class c extends a.BaseRenderLayer{constructor(o,h,d,_,r,t,i,e){super(o,h,"selection",d,!0,e,_,i,t,r),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(o){super.resize(o),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(o,h,d){super.handleSelectionChanged(o,h,d),this._redrawSelection(o,h,d)}_redrawSelection(o,h,d){if(!this._didStateChange(o,h,d,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!o||!h)return void this._clearState();const _=o[1]-this._bufferService.buffer.ydisp,r=h[1]-this._bufferService.buffer.ydisp,t=Math.max(_,0),i=Math.min(r,this._bufferService.rows-1);if(t>=this._bufferService.rows||i<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,d){const e=o[0],s=h[0]-e,l=i-t+1;this._fillCells(e,t,s,l)}else{const e=_===t?o[0]:0,s=t===r?h[0]:this._bufferService.cols;this._fillCells(e,t,s-e,1);const l=Math.max(i-t-1,0);if(this._fillCells(0,t+1,this._bufferService.cols,l),t!==i){const v=r===i?h[0]:this._bufferService.cols;this._fillCells(0,i,v,1)}}this._state.start=[o[0],o[1]],this._state.end=[h[0],h[1]],this._state.columnSelectMode=d,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(o,h,d,_){return!this._areCoordinatesEqual(o,this._state.start)||!this._areCoordinatesEqual(h,this._state.end)||d!==this._state.columnSelectMode||_!==this._state.ydisp}_areCoordinatesEqual(o,h){return!(!o||!h)&&o[0]===h[0]&&o[1]===h[1]}}S.SelectionRenderLayer=c},744:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.TextRenderLayer=void 0;const a=n(577),c=n(147),u=n(782),o=n(855),h=n(903),d=n(574);class _ extends h.BaseRenderLayer{constructor(t,i,e,s,l,v,g,p,f,m){super(t,i,"text",e,s,m,l,v,p,f),this._characterJoinerService=g,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new u.CellData,this._state=new d.GridCache,this.register(v.onSpecificOptionChange("allowTransparency",C=>this._setTransparency(C)))}resize(t){super.resize(t);const i=this._getFont(!1,!1);this._characterWidth===t.device.char.width&&this._characterFont===i||(this._characterWidth=t.device.char.width,this._characterFont=i,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(t,i,e){for(let s=t;s<=i;s++){const l=s+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.lines.get(l),g=this._characterJoinerService.getJoinedCharacters(l);for(let p=0;p<this._bufferService.cols;p++){v.loadCell(p,this._workCell);let f=this._workCell,m=!1,C=p;if(f.getWidth()!==0){if(g.length>0&&p===g[0][0]){m=!0;const w=g.shift();f=new a.JoinedCellData(this._workCell,v.translateToString(!0,w[0],w[1]),w[1]-w[0]),C=w[1]-1}!m&&this._isOverlapping(f)&&C<v.length-1&&v.getCodePoint(C+1)===o.NULL_CELL_CODE&&(f.content&=-12582913,f.content|=8388608),e(f,p,s),p=C}}}}_drawBackground(t,i){const e=this._ctx,s=this._bufferService.cols;let l=0,v=0,g=null;e.save(),this._forEachCell(t,i,(p,f,m)=>{let C=null;p.isInverse()?C=p.isFgDefault()?this._themeService.colors.foreground.css:p.isFgRGB()?`rgb(${c.AttributeData.toColorRGB(p.getFgColor()).join(",")})`:this._themeService.colors.ansi[p.getFgColor()].css:p.isBgRGB()?C=`rgb(${c.AttributeData.toColorRGB(p.getBgColor()).join(",")})`:p.isBgPalette()&&(C=this._themeService.colors.ansi[p.getBgColor()].css);let w=!1;this._decorationService.forEachDecorationAtCell(f,this._bufferService.buffer.ydisp+m,void 0,L=>{L.options.layer!=="top"&&w||(L.backgroundColorRGB&&(C=L.backgroundColorRGB.css),w=L.options.layer==="top")}),g===null&&(l=f,v=m),m!==v?(e.fillStyle=g||"",this._fillCells(l,v,s-l,1),l=f,v=m):g!==C&&(e.fillStyle=g||"",this._fillCells(l,v,f-l,1),l=f,v=m),g=C}),g!==null&&(e.fillStyle=g,this._fillCells(l,v,s-l,1)),e.restore()}_drawForeground(t,i){this._forEachCell(t,i,(e,s,l)=>this._drawChars(e,s,l))}handleGridChanged(t,i){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,t,this._bufferService.cols,i-t+1),this._drawBackground(t,i),this._drawForeground(t,i))}_isOverlapping(t){if(t.getWidth()!==1||t.getCode()<256)return!1;const i=t.getChars();if(this._characterOverlapCache.hasOwnProperty(i))return this._characterOverlapCache[i];this._ctx.save(),this._ctx.font=this._characterFont;const e=Math.floor(this._ctx.measureText(i).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[i]=e,e}}S.TextRenderLayer=_},274:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.CellColorResolver=void 0;const a=n(855),c=n(160),u=n(374);let o,h=0,d=0,_=!1,r=!1,t=!1,i=0;S.CellColorResolver=class{constructor(e,s,l,v,g,p){this._terminal=e,this._optionService=s,this._selectionRenderModel=l,this._decorationService=v,this._coreBrowserService=g,this._themeService=p,this.result={fg:0,bg:0,ext:0}}resolve(e,s,l,v){if(this.result.bg=e.bg,this.result.fg=e.fg,this.result.ext=268435456&e.bg?e.extended.ext:0,d=0,h=0,r=!1,_=!1,t=!1,o=this._themeService.colors,i=0,e.getCode()!==a.NULL_CELL_CODE&&e.extended.underlineStyle===4){const g=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));i=s*v%(2*Math.round(g))}if(this._decorationService.forEachDecorationAtCell(s,l,"bottom",g=>{g.backgroundColorRGB&&(d=g.backgroundColorRGB.rgba>>8&16777215,r=!0),g.foregroundColorRGB&&(h=g.foregroundColorRGB.rgba>>8&16777215,_=!0)}),t=this._selectionRenderModel.isCellSelected(this._terminal,s,l),t){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:d=(16777215&this.result.fg)<<8|255;break;default:d=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:d=(16777215&this.result.bg)<<8|255}d=c.rgba.blend(d,4294967040&(this._coreBrowserService.isFocused?o.selectionBackgroundOpaque:o.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else d=(this._coreBrowserService.isFocused?o.selectionBackgroundOpaque:o.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,o.selectionForeground&&(h=o.selectionForeground.rgba>>8&16777215,_=!0),(0,u.treatGlyphAsBackgroundColor)(e.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))h=(this._coreBrowserService.isFocused?o.selectionBackgroundOpaque:o.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:h=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:h=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:h=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:h=(16777215&this.result.fg)<<8|255;break;default:h=this._themeService.colors.foreground.rgba}h=c.rgba.blend(h,4294967040&(this._coreBrowserService.isFocused?o.selectionBackgroundOpaque:o.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}_=!0}}this._decorationService.forEachDecorationAtCell(s,l,"top",g=>{g.backgroundColorRGB&&(d=g.backgroundColorRGB.rgba>>8&16777215,r=!0),g.foregroundColorRGB&&(h=g.foregroundColorRGB.rgba>>8&16777215,_=!0)}),r&&(d=t?-16777216&e.bg&-134217729|d|50331648:-16777216&e.bg|d|50331648),_&&(h=-16777216&e.fg&-67108865|h|50331648),67108864&this.result.fg&&(r&&!_&&(h=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&o.background.rgba>>8|50331648,_=!0),!r&&_&&(d=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&o.foreground.rgba>>8|50331648,r=!0)),o=void 0,this.result.bg=r?d:this.result.bg,this.result.fg=_?h:this.result.fg,this.result.ext&=536870911,this.result.ext|=i<<29&3758096384}}},627:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.removeTerminalFromCache=S.acquireTextureAtlas=void 0;const a=n(509),c=n(197),u=[];S.acquireTextureAtlas=function(o,h,d,_,r,t,i,e){const s=(0,c.generateConfig)(_,r,t,i,h,d,e);for(let g=0;g<u.length;g++){const p=u[g],f=p.ownedBy.indexOf(o);if(f>=0){if((0,c.configEquals)(p.config,s))return p.atlas;p.ownedBy.length===1?(p.atlas.dispose(),u.splice(g,1)):p.ownedBy.splice(f,1);break}}for(let g=0;g<u.length;g++){const p=u[g];if((0,c.configEquals)(p.config,s))return p.ownedBy.push(o),p.atlas}const l=o._core,v={atlas:new a.TextureAtlas(document,s,l.unicodeService),config:s,ownedBy:[o]};return u.push(v),v.atlas},S.removeTerminalFromCache=function(o){for(let h=0;h<u.length;h++){const d=u[h].ownedBy.indexOf(o);if(d!==-1){u[h].ownedBy.length===1?(u[h].atlas.dispose(),u.splice(h,1)):u[h].ownedBy.splice(d,1);break}}}},197:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.is256Color=S.configEquals=S.generateConfig=void 0;const a=n(160);S.generateConfig=function(c,u,o,h,d,_,r){const t={foreground:_.foreground,background:_.background,cursor:a.NULL_COLOR,cursorAccent:a.NULL_COLOR,selectionForeground:a.NULL_COLOR,selectionBackgroundTransparent:a.NULL_COLOR,selectionBackgroundOpaque:a.NULL_COLOR,selectionInactiveBackgroundTransparent:a.NULL_COLOR,selectionInactiveBackgroundOpaque:a.NULL_COLOR,ansi:_.ansi.slice(),contrastCache:_.contrastCache,halfContrastCache:_.halfContrastCache};return{customGlyphs:d.customGlyphs,devicePixelRatio:r,letterSpacing:d.letterSpacing,lineHeight:d.lineHeight,deviceCellWidth:c,deviceCellHeight:u,deviceCharWidth:o,deviceCharHeight:h,fontFamily:d.fontFamily,fontSize:d.fontSize,fontWeight:d.fontWeight,fontWeightBold:d.fontWeightBold,allowTransparency:d.allowTransparency,drawBoldTextInBrightColors:d.drawBoldTextInBrightColors,minimumContrastRatio:d.minimumContrastRatio,colors:t}},S.configEquals=function(c,u){for(let o=0;o<c.colors.ansi.length;o++)if(c.colors.ansi[o].rgba!==u.colors.ansi[o].rgba)return!1;return c.devicePixelRatio===u.devicePixelRatio&&c.customGlyphs===u.customGlyphs&&c.lineHeight===u.lineHeight&&c.letterSpacing===u.letterSpacing&&c.fontFamily===u.fontFamily&&c.fontSize===u.fontSize&&c.fontWeight===u.fontWeight&&c.fontWeightBold===u.fontWeightBold&&c.allowTransparency===u.allowTransparency&&c.deviceCharWidth===u.deviceCharWidth&&c.deviceCharHeight===u.deviceCharHeight&&c.drawBoldTextInBrightColors===u.drawBoldTextInBrightColors&&c.minimumContrastRatio===u.minimumContrastRatio&&c.colors.foreground.rgba===u.colors.foreground.rgba&&c.colors.background.rgba===u.colors.background.rgba},S.is256Color=function(c){return(50331648&c)==16777216||(50331648&c)==33554432}},237:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.TEXT_BASELINE=S.DIM_OPACITY=S.INVERTED_DEFAULT_COLOR=void 0;const a=n(399);S.INVERTED_DEFAULT_COLOR=257,S.DIM_OPACITY=.5,S.TEXT_BASELINE=a.isFirefox||a.isLegacyEdge?"bottom":"ideographic"},457:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.CursorBlinkStateManager=void 0,S.CursorBlinkStateManager=class{constructor(n,a){this._renderCallback=n,this._coreBrowserService=a,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(n=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const a=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,a>0)return void this._restartInterval(a)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const a=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(a)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},n)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.tryDrawCustomChar=S.powerlineDefinitions=S.boxDrawingDefinitions=S.blockElementDefinitions=void 0;const a=n(374);S.blockElementDefinitions={"\u2580":[{x:0,y:0,w:8,h:4}],"\u2581":[{x:0,y:7,w:8,h:1}],"\u2582":[{x:0,y:6,w:8,h:2}],"\u2583":[{x:0,y:5,w:8,h:3}],"\u2584":[{x:0,y:4,w:8,h:4}],"\u2585":[{x:0,y:3,w:8,h:5}],"\u2586":[{x:0,y:2,w:8,h:6}],"\u2587":[{x:0,y:1,w:8,h:7}],"\u2588":[{x:0,y:0,w:8,h:8}],"\u2589":[{x:0,y:0,w:7,h:8}],"\u258A":[{x:0,y:0,w:6,h:8}],"\u258B":[{x:0,y:0,w:5,h:8}],"\u258C":[{x:0,y:0,w:4,h:8}],"\u258D":[{x:0,y:0,w:3,h:8}],"\u258E":[{x:0,y:0,w:2,h:8}],"\u258F":[{x:0,y:0,w:1,h:8}],"\u2590":[{x:4,y:0,w:4,h:8}],"\u2594":[{x:0,y:0,w:8,h:1}],"\u2595":[{x:7,y:0,w:1,h:8}],"\u2596":[{x:0,y:4,w:4,h:4}],"\u2597":[{x:4,y:4,w:4,h:4}],"\u2598":[{x:0,y:0,w:4,h:4}],"\u2599":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u259A":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"\u259B":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"\u259C":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"\u259D":[{x:4,y:0,w:4,h:4}],"\u259E":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"\u259F":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u{1FB70}":[{x:1,y:0,w:1,h:8}],"\u{1FB71}":[{x:2,y:0,w:1,h:8}],"\u{1FB72}":[{x:3,y:0,w:1,h:8}],"\u{1FB73}":[{x:4,y:0,w:1,h:8}],"\u{1FB74}":[{x:5,y:0,w:1,h:8}],"\u{1FB75}":[{x:6,y:0,w:1,h:8}],"\u{1FB76}":[{x:0,y:1,w:8,h:1}],"\u{1FB77}":[{x:0,y:2,w:8,h:1}],"\u{1FB78}":[{x:0,y:3,w:8,h:1}],"\u{1FB79}":[{x:0,y:4,w:8,h:1}],"\u{1FB7A}":[{x:0,y:5,w:8,h:1}],"\u{1FB7B}":[{x:0,y:6,w:8,h:1}],"\u{1FB7C}":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB7D}":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7E}":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7F}":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB80}":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB81}":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB82}":[{x:0,y:0,w:8,h:2}],"\u{1FB83}":[{x:0,y:0,w:8,h:3}],"\u{1FB84}":[{x:0,y:0,w:8,h:5}],"\u{1FB85}":[{x:0,y:0,w:8,h:6}],"\u{1FB86}":[{x:0,y:0,w:8,h:7}],"\u{1FB87}":[{x:6,y:0,w:2,h:8}],"\u{1FB88}":[{x:5,y:0,w:3,h:8}],"\u{1FB89}":[{x:3,y:0,w:5,h:8}],"\u{1FB8A}":[{x:2,y:0,w:6,h:8}],"\u{1FB8B}":[{x:1,y:0,w:7,h:8}],"\u{1FB95}":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"\u{1FB96}":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"\u{1FB97}":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const c={"\u2591":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"\u2592":[[1,0],[0,0],[0,1],[0,0]],"\u2593":[[0,1],[1,1],[1,0],[1,1]]};S.boxDrawingDefinitions={"\u2500":{1:"M0,.5 L1,.5"},"\u2501":{3:"M0,.5 L1,.5"},"\u2502":{1:"M.5,0 L.5,1"},"\u2503":{3:"M.5,0 L.5,1"},"\u250C":{1:"M0.5,1 L.5,.5 L1,.5"},"\u250F":{3:"M0.5,1 L.5,.5 L1,.5"},"\u2510":{1:"M0,.5 L.5,.5 L.5,1"},"\u2513":{3:"M0,.5 L.5,.5 L.5,1"},"\u2514":{1:"M.5,0 L.5,.5 L1,.5"},"\u2517":{3:"M.5,0 L.5,.5 L1,.5"},"\u2518":{1:"M.5,0 L.5,.5 L0,.5"},"\u251B":{3:"M.5,0 L.5,.5 L0,.5"},"\u251C":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2523":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u2524":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252B":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u252C":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2533":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2534":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253B":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"\u253C":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u254B":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"\u2574":{1:"M.5,.5 L0,.5"},"\u2578":{3:"M.5,.5 L0,.5"},"\u2575":{1:"M.5,.5 L.5,0"},"\u2579":{3:"M.5,.5 L.5,0"},"\u2576":{1:"M.5,.5 L1,.5"},"\u257A":{3:"M.5,.5 L1,.5"},"\u2577":{1:"M.5,.5 L.5,1"},"\u257B":{3:"M.5,.5 L.5,1"},"\u2550":{1:(_,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"\u2551":{1:(_,r)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"\u2552":{1:(_,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"\u2553":{1:(_,r)=>`M${.5-_},1 L${.5-_},.5 L1,.5 M${.5+_},.5 L${.5+_},1`},"\u2554":{1:(_,r)=>`M1,${.5-r} L${.5-_},${.5-r} L${.5-_},1 M1,${.5+r} L${.5+_},${.5+r} L${.5+_},1`},"\u2555":{1:(_,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"\u2556":{1:(_,r)=>`M${.5+_},1 L${.5+_},.5 L0,.5 M${.5-_},.5 L${.5-_},1`},"\u2557":{1:(_,r)=>`M0,${.5+r} L${.5-_},${.5+r} L${.5-_},1 M0,${.5-r} L${.5+_},${.5-r} L${.5+_},1`},"\u2558":{1:(_,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"\u2559":{1:(_,r)=>`M1,.5 L${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"\u255A":{1:(_,r)=>`M1,${.5-r} L${.5+_},${.5-r} L${.5+_},0 M1,${.5+r} L${.5-_},${.5+r} L${.5-_},0`},"\u255B":{1:(_,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"\u255C":{1:(_,r)=>`M0,.5 L${.5+_},.5 L${.5+_},0 M${.5-_},.5 L${.5-_},0`},"\u255D":{1:(_,r)=>`M0,${.5-r} L${.5-_},${.5-r} L${.5-_},0 M0,${.5+r} L${.5+_},${.5+r} L${.5+_},0`},"\u255E":{1:(_,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"\u255F":{1:(_,r)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1 M${.5+_},.5 L1,.5`},"\u2560":{1:(_,r)=>`M${.5-_},0 L${.5-_},1 M1,${.5+r} L${.5+_},${.5+r} L${.5+_},1 M1,${.5-r} L${.5+_},${.5-r} L${.5+_},0`},"\u2561":{1:(_,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"\u2562":{1:(_,r)=>`M0,.5 L${.5-_},.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"\u2563":{1:(_,r)=>`M${.5+_},0 L${.5+_},1 M0,${.5+r} L${.5-_},${.5+r} L${.5-_},1 M0,${.5-r} L${.5-_},${.5-r} L${.5-_},0`},"\u2564":{1:(_,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"\u2565":{1:(_,r)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},1 M${.5+_},.5 L${.5+_},1`},"\u2566":{1:(_,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-_},${.5+r} L${.5-_},1 M1,${.5+r} L${.5+_},${.5+r} L${.5+_},1`},"\u2567":{1:(_,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"\u2568":{1:(_,r)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"\u2569":{1:(_,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-_},${.5-r} L${.5-_},0 M1,${.5-r} L${.5+_},${.5-r} L${.5+_},0`},"\u256A":{1:(_,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"\u256B":{1:(_,r)=>`M0,.5 L1,.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"\u256C":{1:(_,r)=>`M0,${.5+r} L${.5-_},${.5+r} L${.5-_},1 M1,${.5+r} L${.5+_},${.5+r} L${.5+_},1 M0,${.5-r} L${.5-_},${.5-r} L${.5-_},0 M1,${.5-r} L${.5+_},${.5-r} L${.5+_},0`},"\u2571":{1:"M1,0 L0,1"},"\u2572":{1:"M0,0 L1,1"},"\u2573":{1:"M1,0 L0,1 M0,0 L1,1"},"\u257C":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u257D":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"\u257E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u257F":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u250D":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u250E":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2511":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"\u2512":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2515":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"\u2516":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2519":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"\u251A":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"\u251D":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"\u251E":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u251F":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2520":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2521":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2522":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"\u2525":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"\u2526":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2527":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"\u2528":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"\u2529":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"\u252A":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"\u252D":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u252E":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"\u252F":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"\u2530":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2531":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2532":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2535":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u2536":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u2537":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"\u2538":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"\u2539":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u253A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"\u253D":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"\u253E":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"\u253F":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"\u2540":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"\u2541":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"\u2542":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"\u2543":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"\u2544":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"\u2545":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"\u2546":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"\u2547":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"\u2548":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"\u2549":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"\u254A":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"\u254C":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u254D":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"\u2504":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2505":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"\u2508":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"\u2509":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"\u254E":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u254F":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"\u2506":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u2507":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"\u250A":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u250B":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"\u256D":{1:(_,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"\u256E":{1:(_,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"\u256F":{1:(_,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"\u2570":{1:(_,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,1,.5`}},S.powerlineDefinitions={"\uE0B0":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"\uE0B1":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B2":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"\uE0B3":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0B4":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"\uE0B5":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"\uE0B6":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"\uE0B7":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"\uE0B8":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"\uE0B9":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BA":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"\uE0BC":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"\uE0BD":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"\uE0BE":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},S.powerlineDefinitions["\uE0BB"]=S.powerlineDefinitions["\uE0BD"],S.powerlineDefinitions["\uE0BF"]=S.powerlineDefinitions["\uE0B9"],S.tryDrawCustomChar=function(_,r,t,i,e,s,l,v){const g=S.blockElementDefinitions[r];if(g)return(function(C,w,L,y,R,A){for(let B=0;B<w.length;B++){const T=w[B],P=R/8,b=A/8;C.fillRect(L+T.x*P,y+T.y*b,T.w*P,T.h*b)}})(_,g,t,i,e,s),!0;const p=c[r];if(p)return(function(C,w,L,y,R,A){let B=u.get(w);B||(B=new Map,u.set(w,B));const T=C.fillStyle;if(typeof T!="string")throw new Error(`Unexpected fillStyle type "${T}"`);let P=B.get(T);if(!P){const b=w[0].length,E=w.length,k=C.canvas.ownerDocument.createElement("canvas");k.width=b,k.height=E;const D=(0,a.throwIfFalsy)(k.getContext("2d")),I=new ImageData(b,E);let W,z,q,M;if(T.startsWith("#"))W=parseInt(T.slice(1,3),16),z=parseInt(T.slice(3,5),16),q=parseInt(T.slice(5,7),16),M=T.length>7&&parseInt(T.slice(7,9),16)||1;else{if(!T.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${T}" when drawing pattern glyph`);[W,z,q,M]=T.substring(5,T.length-1).split(",").map(x=>parseFloat(x))}for(let x=0;x<E;x++)for(let H=0;H<b;H++)I.data[4*(x*b+H)]=W,I.data[4*(x*b+H)+1]=z,I.data[4*(x*b+H)+2]=q,I.data[4*(x*b+H)+3]=w[x][H]*(255*M);D.putImageData(I,0,0),P=(0,a.throwIfFalsy)(C.createPattern(k,null)),B.set(T,P)}C.fillStyle=P,C.fillRect(L,y,R,A)})(_,p,t,i,e,s),!0;const f=S.boxDrawingDefinitions[r];if(f)return(function(C,w,L,y,R,A,B){C.strokeStyle=C.fillStyle;for(const[T,P]of Object.entries(w)){let b;C.beginPath(),C.lineWidth=B*Number.parseInt(T),b=typeof P=="function"?P(.15,.15/A*R):P;for(const E of b.split(" ")){const k=E[0],D=h[k];if(!D){console.error(`Could not find drawing instructions for "${k}"`);continue}const I=E.substring(1).split(",");I[0]&&I[1]&&D(C,d(I,R,A,L,y,!0,B))}C.stroke(),C.closePath()}})(_,f,t,i,e,s,v),!0;const m=S.powerlineDefinitions[r];return!!m&&((function(C,w,L,y,R,A,B,T){const P=new Path2D;P.rect(L,y,R,A),C.clip(P),C.beginPath();const b=B/12;C.lineWidth=T*b;for(const E of w.d.split(" ")){const k=E[0],D=h[k];if(!D){console.error(`Could not find drawing instructions for "${k}"`);continue}const I=E.substring(1).split(",");I[0]&&I[1]&&D(C,d(I,R,A,L,y,!1,T,(w.leftPadding??0)*(b/2),(w.rightPadding??0)*(b/2)))}w.type===1?(C.strokeStyle=C.fillStyle,C.stroke()):C.fill(),C.closePath()})(_,m,t,i,e,s,l,v),!0)};const u=new Map;function o(_,r,t=0){return Math.max(Math.min(_,r),t)}const h={C:(_,r)=>_.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(_,r)=>_.lineTo(r[0],r[1]),M:(_,r)=>_.moveTo(r[0],r[1])};function d(_,r,t,i,e,s,l,v=0,g=0){const p=_.map(f=>parseFloat(f)||parseInt(f));if(p.length<2)throw new Error("Too few arguments for instruction");for(let f=0;f<p.length;f+=2)p[f]*=r-v*l-g*l,s&&p[f]!==0&&(p[f]=o(Math.round(p[f]+.5)-.5,r,0)),p[f]+=i+v*l;for(let f=1;f<p.length;f+=2)p[f]*=t,s&&p[f]!==0&&(p[f]=o(Math.round(p[f]+.5)-.5,t,0)),p[f]+=e;return p}},56:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.observeDevicePixelDimensions=void 0;const a=n(859);S.observeDevicePixelDimensions=function(c,u,o){let h=new u.ResizeObserver(d=>{const _=d.find(i=>i.target===c);if(!_)return;if(!("devicePixelContentBoxSize"in _))return h==null||h.disconnect(),void(h=void 0);const r=_.devicePixelContentBoxSize[0].inlineSize,t=_.devicePixelContentBoxSize[0].blockSize;r>0&&t>0&&o(r,t)});try{h.observe(c,{box:["device-pixel-content-box"]})}catch{h.disconnect(),h=void 0}return(0,a.toDisposable)(()=>h==null?void 0:h.disconnect())}},374:(F,S)=>{function n(c){return 57508<=c&&c<=57558}function a(c){return c>=128512&&c<=128591||c>=127744&&c<=128511||c>=128640&&c<=128767||c>=9728&&c<=9983||c>=9984&&c<=10175||c>=65024&&c<=65039||c>=129280&&c<=129535||c>=127462&&c<=127487}Object.defineProperty(S,"__esModule",{value:!0}),S.computeNextVariantOffset=S.createRenderDimensions=S.treatGlyphAsBackgroundColor=S.allowRescaling=S.isEmoji=S.isRestrictedPowerlineGlyph=S.isPowerlineGlyph=S.throwIfFalsy=void 0,S.throwIfFalsy=function(c){if(!c)throw new Error("value must not be falsy");return c},S.isPowerlineGlyph=n,S.isRestrictedPowerlineGlyph=function(c){return 57520<=c&&c<=57527},S.isEmoji=a,S.allowRescaling=function(c,u,o,h){return u===1&&o>Math.ceil(1.5*h)&&c!==void 0&&c>255&&!a(c)&&!n(c)&&!(function(d){return 57344<=d&&d<=63743})(c)},S.treatGlyphAsBackgroundColor=function(c){return n(c)||(function(u){return 9472<=u&&u<=9631})(c)},S.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},S.computeNextVariantOffset=function(c,u,o=0){return(c-(2*Math.round(u)-o))%(2*Math.round(u))}},296:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.createSelectionRenderModel=void 0;class n{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(c,u,o,h=!1){if(this.selectionStart=u,this.selectionEnd=o,!u||!o||u[0]===o[0]&&u[1]===o[1])return void this.clear();const d=c.buffers.active.ydisp,_=u[1]-d,r=o[1]-d,t=Math.max(_,0),i=Math.min(r,c.rows-1);t>=c.rows||i<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=h,this.viewportStartRow=_,this.viewportEndRow=r,this.viewportCappedStartRow=t,this.viewportCappedEndRow=i,this.startCol=u[0],this.endCol=o[0])}isCellSelected(c,u,o){return!!this.hasSelection&&(o-=c.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&o>=this.viewportCappedStartRow&&u<this.endCol&&o<=this.viewportCappedEndRow:u<this.startCol&&o>=this.viewportCappedStartRow&&u>=this.endCol&&o<=this.viewportCappedEndRow:o>this.viewportStartRow&&o<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&o===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&o===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&o===this.viewportStartRow&&u>=this.startCol)}}S.createSelectionRenderModel=function(){return new n}},509:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.TextureAtlas=void 0;const a=n(237),c=n(860),u=n(374),o=n(160),h=n(345),d=n(485),_=n(385),r=n(147),t=n(855),i={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let e;class s{get pages(){return this._pages}constructor(f,m,C){this._document=f,this._config=m,this._unicodeService=C,this._didWarmUp=!1,this._cacheMap=new d.FourKeyMap,this._cacheMapCombined=new d.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new h.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new h.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=g(f,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,u.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const f of this.pages)f.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const f=new _.IdleTaskQueue;for(let m=33;m<126;m++)f.enqueue(()=>{if(!this._cacheMap.get(m,t.DEFAULT_COLOR,t.DEFAULT_COLOR,t.DEFAULT_EXT)){const C=this._drawToCache(m,t.DEFAULT_COLOR,t.DEFAULT_COLOR,t.DEFAULT_EXT);this._cacheMap.set(m,t.DEFAULT_COLOR,t.DEFAULT_COLOR,t.DEFAULT_EXT,C)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const f of this._pages)f.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(s.maxAtlasPages&&this._pages.length>=Math.max(4,s.maxAtlasPages)){const m=this._pages.filter(B=>2*B.canvas.width<=(s.maxTextureSize||4096)).sort((B,T)=>T.canvas.width!==B.canvas.width?T.canvas.width-B.canvas.width:T.percentageUsed-B.percentageUsed);let C=-1,w=0;for(let B=0;B<m.length;B++)if(m[B].canvas.width!==w)C=B,w=m[B].canvas.width;else if(B-C==3)break;const L=m.slice(C,C+4),y=L.map(B=>B.glyphs[0].texturePage).sort((B,T)=>B>T?1:-1),R=this.pages.length-L.length,A=this._mergePages(L,R);A.version++;for(let B=y.length-1;B>=0;B--)this._deletePage(y[B]);this.pages.push(A),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(A.canvas)}const f=new l(this._document,this._textureSize);return this._pages.push(f),this._activePages.push(f),this._onAddTextureAtlasCanvas.fire(f.canvas),f}_mergePages(f,m){const C=2*f[0].canvas.width,w=new l(this._document,C,f);for(const[L,y]of f.entries()){const R=L*y.canvas.width%C,A=Math.floor(L/2)*y.canvas.height;w.ctx.drawImage(y.canvas,R,A);for(const T of y.glyphs)T.texturePage=m,T.sizeClipSpace.x=T.size.x/C,T.sizeClipSpace.y=T.size.y/C,T.texturePosition.x+=R,T.texturePosition.y+=A,T.texturePositionClipSpace.x=T.texturePosition.x/C,T.texturePositionClipSpace.y=T.texturePosition.y/C;this._onRemoveTextureAtlasCanvas.fire(y.canvas);const B=this._activePages.indexOf(y);B!==-1&&this._activePages.splice(B,1)}return w}_deletePage(f){this._pages.splice(f,1);for(let m=f;m<this._pages.length;m++){const C=this._pages[m];for(const w of C.glyphs)w.texturePage--;C.version++}}getRasterizedGlyphCombinedChar(f,m,C,w,L){return this._getFromCacheMap(this._cacheMapCombined,f,m,C,w,L)}getRasterizedGlyph(f,m,C,w,L){return this._getFromCacheMap(this._cacheMap,f,m,C,w,L)}_getFromCacheMap(f,m,C,w,L,y=!1){return e=f.get(m,C,w,L),e||(e=this._drawToCache(m,C,w,L,y),f.set(m,C,w,L,e)),e}_getColorFromAnsiIndex(f){if(f>=this._config.colors.ansi.length)throw new Error("No color found for idx "+f);return this._config.colors.ansi[f]}_getBackgroundColor(f,m,C,w){if(this._config.allowTransparency)return o.NULL_COLOR;let L;switch(f){case 16777216:case 33554432:L=this._getColorFromAnsiIndex(m);break;case 50331648:const y=r.AttributeData.toColorRGB(m);L=o.channels.toColor(y[0],y[1],y[2]);break;default:L=C?o.color.opaque(this._config.colors.foreground):this._config.colors.background}return L}_getForegroundColor(f,m,C,w,L,y,R,A,B,T){const P=this._getMinimumContrastColor(f,m,C,w,L,y,R,B,A,T);if(P)return P;let b;switch(L){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&B&&y<8&&(y+=8),b=this._getColorFromAnsiIndex(y);break;case 50331648:const E=r.AttributeData.toColorRGB(y);b=o.channels.toColor(E[0],E[1],E[2]);break;default:b=R?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(b=o.color.opaque(b)),A&&(b=o.color.multiplyOpacity(b,a.DIM_OPACITY)),b}_resolveBackgroundRgba(f,m,C){switch(f){case 16777216:case 33554432:return this._getColorFromAnsiIndex(m).rgba;case 50331648:return m<<8;default:return C?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(f,m,C,w){switch(f){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&w&&m<8&&(m+=8),this._getColorFromAnsiIndex(m).rgba;case 50331648:return m<<8;default:return C?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(f,m,C,w,L,y,R,A,B,T){if(this._config.minimumContrastRatio===1||T)return;const P=this._getContrastCache(B),b=P.getColor(f,w);if(b!==void 0)return b||void 0;const E=this._resolveBackgroundRgba(m,C,R),k=this._resolveForegroundRgba(L,y,R,A),D=o.rgba.ensureContrastRatio(E,k,this._config.minimumContrastRatio/(B?2:1));if(!D)return void P.setColor(f,w,null);const I=o.channels.toColor(D>>24&255,D>>16&255,D>>8&255);return P.setColor(f,w,I),I}_getContrastCache(f){return f?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(f,m,C,w,L=!1){const y=typeof f=="number"?String.fromCharCode(f):f,R=Math.min(this._config.deviceCellWidth*Math.max(y.length,2)+4,this._textureSize);this._tmpCanvas.width<R&&(this._tmpCanvas.width=R);const A=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<A&&(this._tmpCanvas.height=A),this._tmpCtx.save(),this._workAttributeData.fg=C,this._workAttributeData.bg=m,this._workAttributeData.extended.ext=w,this._workAttributeData.isInvisible())return i;const B=!!this._workAttributeData.isBold(),T=!!this._workAttributeData.isInverse(),P=!!this._workAttributeData.isDim(),b=!!this._workAttributeData.isItalic(),E=!!this._workAttributeData.isUnderline(),k=!!this._workAttributeData.isStrikethrough(),D=!!this._workAttributeData.isOverline();let I=this._workAttributeData.getFgColor(),W=this._workAttributeData.getFgColorMode(),z=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(T){const K=I;I=z,z=K;const J=W;W=q,q=J}const M=this._getBackgroundColor(q,z,T,P);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=M.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const x=B?this._config.fontWeightBold:this._config.fontWeight,H=b?"italic":"";this._tmpCtx.font=`${H} ${x} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=a.TEXT_BASELINE;const O=y.length===1&&(0,u.isPowerlineGlyph)(y.charCodeAt(0)),U=y.length===1&&(0,u.isRestrictedPowerlineGlyph)(y.charCodeAt(0)),$=this._getForegroundColor(m,q,z,C,W,I,T,P,B,(0,u.treatGlyphAsBackgroundColor)(y.charCodeAt(0)));this._tmpCtx.fillStyle=$.css;const j=U?0:4;let se=!1;this._config.customGlyphs!==!1&&(se=(0,c.tryDrawCustomChar)(this._tmpCtx,y,j,j,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let ie,oe=!O;if(ie=typeof f=="number"?this._unicodeService.wcwidth(f):this._unicodeService.getStringCellWidth(f),E){this._tmpCtx.save();const K=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),J=K%2==1?.5:0;if(this._tmpCtx.lineWidth=K,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())oe=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{oe=!1;let le=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&le<8&&(le+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(le).css}this._tmpCtx.beginPath();const he=j,ee=Math.ceil(j+this._config.deviceCharHeight)-J-(L?2*K:0),de=ee+K,ue=ee+2*K;let ce=this._workAttributeData.getUnderlineVariantOffset();for(let le=0;le<ie;le++){this._tmpCtx.save();const te=he+le*this._config.deviceCellWidth,ae=he+(le+1)*this._config.deviceCellWidth,re=te+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(te,ee),this._tmpCtx.lineTo(ae,ee),this._tmpCtx.moveTo(te,ue),this._tmpCtx.lineTo(ae,ue);break;case 3:const ge=K<=1?ue:Math.ceil(j+this._config.deviceCharHeight-K/2)-J,me=K<=1?ee:Math.ceil(j+this._config.deviceCharHeight+K/2)-J,$e=new Path2D;$e.rect(te,ee,this._config.deviceCellWidth,ue-ee),this._tmpCtx.clip($e),this._tmpCtx.moveTo(te-this._config.deviceCellWidth/2,de),this._tmpCtx.bezierCurveTo(te-this._config.deviceCellWidth/2,me,te,me,te,de),this._tmpCtx.bezierCurveTo(te,ge,re,ge,re,de),this._tmpCtx.bezierCurveTo(re,me,ae,me,ae,de),this._tmpCtx.bezierCurveTo(ae,ge,ae+this._config.deviceCellWidth/2,ge,ae+this._config.deviceCellWidth/2,de);break;case 4:const Se=ce===0?0:ce>=K?2*K-ce:K-ce;!(ce>=K)==0||Se===0?(this._tmpCtx.setLineDash([Math.round(K),Math.round(K)]),this._tmpCtx.moveTo(te+Se,ee),this._tmpCtx.lineTo(ae,ee)):(this._tmpCtx.setLineDash([Math.round(K),Math.round(K)]),this._tmpCtx.moveTo(te,ee),this._tmpCtx.lineTo(te+Se,ee),this._tmpCtx.moveTo(te+Se+K,ee),this._tmpCtx.lineTo(ae,ee)),ce=(0,u.computeNextVariantOffset)(ae-te,K,ce);break;case 5:const st=.6,rt=.3,we=ae-te,Ue=Math.floor(st*we),Ne=Math.floor(rt*we),nt=we-Ue-Ne;this._tmpCtx.setLineDash([Ue,Ne,nt]),this._tmpCtx.moveTo(te,ee),this._tmpCtx.lineTo(ae,ee);break;default:this._tmpCtx.moveTo(te,ee),this._tmpCtx.lineTo(ae,ee)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!se&&this._config.fontSize>=12&&!this._config.allowTransparency&&y!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const le=this._tmpCtx.measureText(y);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in le&&le.actualBoundingBoxDescent>0){this._tmpCtx.save();const te=new Path2D;te.rect(he,ee-Math.ceil(K/2),this._config.deviceCellWidth*ie,ue-ee+Math.ceil(K/2)),this._tmpCtx.clip(te),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=M.css,this._tmpCtx.strokeText(y,j,j+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(D){const K=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),J=K%2==1?.5:0;this._tmpCtx.lineWidth=K,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(j,j+J),this._tmpCtx.lineTo(j+this._config.deviceCharWidth*ie,j+J),this._tmpCtx.stroke()}if(se||this._tmpCtx.fillText(y,j,j+this._config.deviceCharHeight),y==="_"&&!this._config.allowTransparency){let K=v(this._tmpCtx.getImageData(j,j,this._config.deviceCellWidth,this._config.deviceCellHeight),M,$,oe);if(K)for(let J=1;J<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=M.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(y,j,j+this._config.deviceCharHeight-J),K=v(this._tmpCtx.getImageData(j,j,this._config.deviceCellWidth,this._config.deviceCellHeight),M,$,oe),K);J++);}if(k){const K=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),J=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=K,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(j,j+Math.floor(this._config.deviceCharHeight/2)-J),this._tmpCtx.lineTo(j+this._config.deviceCharWidth*ie,j+Math.floor(this._config.deviceCharHeight/2)-J),this._tmpCtx.stroke()}this._tmpCtx.restore();const X=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let ve;if(ve=this._config.allowTransparency?(function(K){for(let J=0;J<K.data.length;J+=4)if(K.data[J+3]>0)return!1;return!0})(X):v(X,M,$,oe),ve)return i;const Q=this._findGlyphBoundingBox(X,this._workBoundingBox,R,U,se,j);let Y,Z;for(;;){if(this._activePages.length===0){const K=this._createNewPage();Y=K,Z=K.currentRow,Z.height=Q.size.y;break}Y=this._activePages[this._activePages.length-1],Z=Y.currentRow;for(const K of this._activePages)Q.size.y<=K.currentRow.height&&(Y=K,Z=K.currentRow);for(let K=this._activePages.length-1;K>=0;K--)for(const J of this._activePages[K].fixedRows)J.height<=Z.height&&Q.size.y<=J.height&&(Y=this._activePages[K],Z=J);if(Z.y+Q.size.y>=Y.canvas.height||Z.height>Q.size.y+2){let K=!1;if(Y.currentRow.y+Y.currentRow.height+Q.size.y>=Y.canvas.height){let J;for(const he of this._activePages)if(he.currentRow.y+he.currentRow.height+Q.size.y<he.canvas.height){J=he;break}if(J)Y=J;else if(s.maxAtlasPages&&this._pages.length>=s.maxAtlasPages&&Z.y+Q.size.y<=Y.canvas.height&&Z.height>=Q.size.y&&Z.x+Q.size.x<=Y.canvas.width)K=!0;else{const he=this._createNewPage();Y=he,Z=he.currentRow,Z.height=Q.size.y,K=!0}}K||(Y.currentRow.height>0&&Y.fixedRows.push(Y.currentRow),Z={x:0,y:Y.currentRow.y+Y.currentRow.height,height:Q.size.y},Y.fixedRows.push(Z),Y.currentRow={x:0,y:Z.y+Z.height,height:0})}if(Z.x+Q.size.x<=Y.canvas.width)break;Z===Y.currentRow?(Z.x=0,Z.y+=Z.height,Z.height=0):Y.fixedRows.splice(Y.fixedRows.indexOf(Z),1)}return Q.texturePage=this._pages.indexOf(Y),Q.texturePosition.x=Z.x,Q.texturePosition.y=Z.y,Q.texturePositionClipSpace.x=Z.x/Y.canvas.width,Q.texturePositionClipSpace.y=Z.y/Y.canvas.height,Q.sizeClipSpace.x/=Y.canvas.width,Q.sizeClipSpace.y/=Y.canvas.height,Z.height=Math.max(Z.height,Q.size.y),Z.x+=Q.size.x,Y.ctx.putImageData(X,Q.texturePosition.x-this._workBoundingBox.left,Q.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Q.size.x,Q.size.y),Y.addGlyph(Q),Y.version++,Q}_findGlyphBoundingBox(f,m,C,w,L,y){m.top=0;const R=w?this._config.deviceCellHeight:this._tmpCanvas.height,A=w?this._config.deviceCellWidth:C;let B=!1;for(let T=0;T<R;T++){for(let P=0;P<A;P++){const b=T*this._tmpCanvas.width*4+4*P+3;if(f.data[b]!==0){m.top=T,B=!0;break}}if(B)break}m.left=0,B=!1;for(let T=0;T<y+A;T++){for(let P=0;P<R;P++){const b=P*this._tmpCanvas.width*4+4*T+3;if(f.data[b]!==0){m.left=T,B=!0;break}}if(B)break}m.right=A,B=!1;for(let T=y+A-1;T>=y;T--){for(let P=0;P<R;P++){const b=P*this._tmpCanvas.width*4+4*T+3;if(f.data[b]!==0){m.right=T,B=!0;break}}if(B)break}m.bottom=R,B=!1;for(let T=R-1;T>=0;T--){for(let P=0;P<A;P++){const b=T*this._tmpCanvas.width*4+4*P+3;if(f.data[b]!==0){m.bottom=T,B=!0;break}}if(B)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:m.right-m.left+1,y:m.bottom-m.top+1},sizeClipSpace:{x:m.right-m.left+1,y:m.bottom-m.top+1},offset:{x:-m.left+y+(w||L?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-m.top+y+(w||L?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}S.TextureAtlas=s;class l{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(f){this._glyphs.push(f),this._usedPixels+=f.size.x*f.size.y}constructor(f,m,C){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],C)for(const w of C)this._glyphs.push(...w.glyphs),this._usedPixels+=w._usedPixels;this.canvas=g(f,m,m),this.ctx=(0,u.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function v(p,f,m,C){const w=f.rgba>>>24,L=f.rgba>>>16&255,y=f.rgba>>>8&255,R=m.rgba>>>24,A=m.rgba>>>16&255,B=m.rgba>>>8&255,T=Math.floor((Math.abs(w-R)+Math.abs(L-A)+Math.abs(y-B))/12);let P=!0;for(let b=0;b<p.data.length;b+=4)p.data[b]===w&&p.data[b+1]===L&&p.data[b+2]===y||C&&Math.abs(p.data[b]-w)+Math.abs(p.data[b+1]-L)+Math.abs(p.data[b+2]-y)<T?p.data[b+3]=0:P=!1;return P}function g(p,f,m){const C=p.createElement("canvas");return C.width=f,C.height=m,C}},577:function(F,S,n){var a=this&&this.__decorate||function(t,i,e,s){var l,v=arguments.length,g=v<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(t,i,e,s);else for(var p=t.length-1;p>=0;p--)(l=t[p])&&(g=(v<3?l(g):v>3?l(i,e,g):l(i,e))||g);return v>3&&g&&Object.defineProperty(i,e,g),g},c=this&&this.__param||function(t,i){return function(e,s){i(e,s,t)}};Object.defineProperty(S,"__esModule",{value:!0}),S.CharacterJoinerService=S.JoinedCellData=void 0;const u=n(147),o=n(855),h=n(782),d=n(97);class _ extends u.AttributeData{constructor(i,e,s){super(),this.content=0,this.combinedData="",this.fg=i.fg,this.bg=i.bg,this.combinedData=e,this._width=s}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(i){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}S.JoinedCellData=_;let r=S.CharacterJoinerService=class Ke{constructor(i){this._bufferService=i,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new h.CellData}register(i){const e={id:this._nextCharacterJoinerId++,handler:i};return this._characterJoiners.push(e),e.id}deregister(i){for(let e=0;e<this._characterJoiners.length;e++)if(this._characterJoiners[e].id===i)return this._characterJoiners.splice(e,1),!0;return!1}getJoinedCharacters(i){if(this._characterJoiners.length===0)return[];const e=this._bufferService.buffer.lines.get(i);if(!e||e.length===0)return[];const s=[],l=e.translateToString(!0);let v=0,g=0,p=0,f=e.getFg(0),m=e.getBg(0);for(let C=0;C<e.getTrimmedLength();C++)if(e.loadCell(C,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==f||this._workCell.bg!==m){if(C-v>1){const w=this._getJoinedRanges(l,p,g,e,v);for(let L=0;L<w.length;L++)s.push(w[L])}v=C,p=g,f=this._workCell.fg,m=this._workCell.bg}g+=this._workCell.getChars().length||o.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-v>1){const C=this._getJoinedRanges(l,p,g,e,v);for(let w=0;w<C.length;w++)s.push(C[w])}return s}_getJoinedRanges(i,e,s,l,v){const g=i.substring(e,s);let p=[];try{p=this._characterJoiners[0].handler(g)}catch(f){console.error(f)}for(let f=1;f<this._characterJoiners.length;f++)try{const m=this._characterJoiners[f].handler(g);for(let C=0;C<m.length;C++)Ke._mergeRanges(p,m[C])}catch(m){console.error(m)}return this._stringRangesToCellRanges(p,l,v),p}_stringRangesToCellRanges(i,e,s){let l=0,v=!1,g=0,p=i[l];if(p){for(let f=s;f<this._bufferService.cols;f++){const m=e.getWidth(f),C=e.getString(f).length||o.WHITESPACE_CELL_CHAR.length;if(m!==0){if(!v&&p[0]<=g&&(p[0]=f,v=!0),p[1]<=g){if(p[1]=f,p=i[++l],!p)break;p[0]<=g?(p[0]=f,v=!0):v=!1}g+=C}}p&&(p[1]=this._bufferService.cols)}}static _mergeRanges(i,e){let s=!1;for(let l=0;l<i.length;l++){const v=i[l];if(s){if(e[1]<=v[0])return i[l-1][1]=e[1],i;if(e[1]<=v[1])return i[l-1][1]=Math.max(e[1],v[1]),i.splice(l,1),i;i.splice(l,1),l--}else{if(e[1]<=v[0])return i.splice(l,0,e),i;if(e[1]<=v[1])return v[0]=Math.min(e[0],v[0]),i;e[0]<v[1]&&(v[0]=Math.min(e[0],v[0]),s=!0)}}return s?i[i.length-1][1]=e[1]:i.push(e),i}};S.CharacterJoinerService=r=a([c(0,d.IBufferService)],r)},160:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.contrastRatio=S.toPaddedHex=S.rgba=S.rgb=S.css=S.color=S.channels=S.NULL_COLOR=void 0;let n=0,a=0,c=0,u=0;var o,h,d,_,r;function t(e){const s=e.toString(16);return s.length<2?"0"+s:s}function i(e,s){return e<s?(s+.05)/(e+.05):(e+.05)/(s+.05)}S.NULL_COLOR={css:"#00000000",rgba:0},(function(e){e.toCss=function(s,l,v,g){return g!==void 0?`#${t(s)}${t(l)}${t(v)}${t(g)}`:`#${t(s)}${t(l)}${t(v)}`},e.toRgba=function(s,l,v,g=255){return(s<<24|l<<16|v<<8|g)>>>0},e.toColor=function(s,l,v,g){return{css:e.toCss(s,l,v,g),rgba:e.toRgba(s,l,v,g)}}})(o||(S.channels=o={})),(function(e){function s(l,v){return u=Math.round(255*v),[n,a,c]=r.toChannels(l.rgba),{css:o.toCss(n,a,c,u),rgba:o.toRgba(n,a,c,u)}}e.blend=function(l,v){if(u=(255&v.rgba)/255,u===1)return{css:v.css,rgba:v.rgba};const g=v.rgba>>24&255,p=v.rgba>>16&255,f=v.rgba>>8&255,m=l.rgba>>24&255,C=l.rgba>>16&255,w=l.rgba>>8&255;return n=m+Math.round((g-m)*u),a=C+Math.round((p-C)*u),c=w+Math.round((f-w)*u),{css:o.toCss(n,a,c),rgba:o.toRgba(n,a,c)}},e.isOpaque=function(l){return!(255&~l.rgba)},e.ensureContrastRatio=function(l,v,g){const p=r.ensureContrastRatio(l.rgba,v.rgba,g);if(p)return o.toColor(p>>24&255,p>>16&255,p>>8&255)},e.opaque=function(l){const v=(255|l.rgba)>>>0;return[n,a,c]=r.toChannels(v),{css:o.toCss(n,a,c),rgba:v}},e.opacity=s,e.multiplyOpacity=function(l,v){return u=255&l.rgba,s(l,u*v/255)},e.toColorRGB=function(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}})(h||(S.color=h={})),(function(e){let s,l;try{const v=document.createElement("canvas");v.width=1,v.height=1;const g=v.getContext("2d",{willReadFrequently:!0});g&&(s=g,s.globalCompositeOperation="copy",l=s.createLinearGradient(0,0,1,1))}catch{}e.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return n=parseInt(v.slice(1,2).repeat(2),16),a=parseInt(v.slice(2,3).repeat(2),16),c=parseInt(v.slice(3,4).repeat(2),16),o.toColor(n,a,c);case 5:return n=parseInt(v.slice(1,2).repeat(2),16),a=parseInt(v.slice(2,3).repeat(2),16),c=parseInt(v.slice(3,4).repeat(2),16),u=parseInt(v.slice(4,5).repeat(2),16),o.toColor(n,a,c,u);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const g=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(g)return n=parseInt(g[1]),a=parseInt(g[2]),c=parseInt(g[3]),u=Math.round(255*(g[5]===void 0?1:parseFloat(g[5]))),o.toColor(n,a,c,u);if(!s||!l)throw new Error("css.toColor: Unsupported css format");if(s.fillStyle=l,s.fillStyle=v,typeof s.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(s.fillRect(0,0,1,1),[n,a,c,u]=s.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:o.toRgba(n,a,c,u),css:v}}})(d||(S.css=d={})),(function(e){function s(l,v,g){const p=l/255,f=v/255,m=g/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4))+.0722*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))}e.relativeLuminance=function(l){return s(l>>16&255,l>>8&255,255&l)},e.relativeLuminance2=s})(_||(S.rgb=_={})),(function(e){function s(v,g,p){const f=v>>24&255,m=v>>16&255,C=v>>8&255;let w=g>>24&255,L=g>>16&255,y=g>>8&255,R=i(_.relativeLuminance2(w,L,y),_.relativeLuminance2(f,m,C));for(;R<p&&(w>0||L>0||y>0);)w-=Math.max(0,Math.ceil(.1*w)),L-=Math.max(0,Math.ceil(.1*L)),y-=Math.max(0,Math.ceil(.1*y)),R=i(_.relativeLuminance2(w,L,y),_.relativeLuminance2(f,m,C));return(w<<24|L<<16|y<<8|255)>>>0}function l(v,g,p){const f=v>>24&255,m=v>>16&255,C=v>>8&255;let w=g>>24&255,L=g>>16&255,y=g>>8&255,R=i(_.relativeLuminance2(w,L,y),_.relativeLuminance2(f,m,C));for(;R<p&&(w<255||L<255||y<255);)w=Math.min(255,w+Math.ceil(.1*(255-w))),L=Math.min(255,L+Math.ceil(.1*(255-L))),y=Math.min(255,y+Math.ceil(.1*(255-y))),R=i(_.relativeLuminance2(w,L,y),_.relativeLuminance2(f,m,C));return(w<<24|L<<16|y<<8|255)>>>0}e.blend=function(v,g){if(u=(255&g)/255,u===1)return g;const p=g>>24&255,f=g>>16&255,m=g>>8&255,C=v>>24&255,w=v>>16&255,L=v>>8&255;return n=C+Math.round((p-C)*u),a=w+Math.round((f-w)*u),c=L+Math.round((m-L)*u),o.toRgba(n,a,c)},e.ensureContrastRatio=function(v,g,p){const f=_.relativeLuminance(v>>8),m=_.relativeLuminance(g>>8);if(i(f,m)<p){if(m<f){const L=s(v,g,p),y=i(f,_.relativeLuminance(L>>8));if(y<p){const R=l(v,g,p);return y>i(f,_.relativeLuminance(R>>8))?L:R}return L}const C=l(v,g,p),w=i(f,_.relativeLuminance(C>>8));if(w<p){const L=s(v,g,p);return w>i(f,_.relativeLuminance(L>>8))?C:L}return C}},e.reduceLuminance=s,e.increaseLuminance=l,e.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(S.rgba=r={})),S.toPaddedHex=t,S.contrastRatio=i},345:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.runAndSubscribe=S.forwardEvent=S.EventEmitter=void 0,S.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=n=>(this._listeners.push(n),{dispose:()=>{if(!this._disposed){for(let a=0;a<this._listeners.length;a++)if(this._listeners[a]===n)return void this._listeners.splice(a,1)}}})),this._event}fire(n,a){const c=[];for(let u=0;u<this._listeners.length;u++)c.push(this._listeners[u]);for(let u=0;u<c.length;u++)c[u].call(void 0,n,a)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},S.forwardEvent=function(n,a){return n(c=>a.fire(c))},S.runAndSubscribe=function(n,a){return a(void 0),n(c=>a(c))}},859:(F,S)=>{function n(a){for(const c of a)c.dispose();a.length=0}Object.defineProperty(S,"__esModule",{value:!0}),S.getDisposeArrayDisposable=S.disposeArray=S.toDisposable=S.MutableDisposable=S.Disposable=void 0,S.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const a of this._disposables)a.dispose();this._disposables.length=0}register(a){return this._disposables.push(a),a}unregister(a){const c=this._disposables.indexOf(a);c!==-1&&this._disposables.splice(c,1)}},S.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(a){var c;this._isDisposed||a===this._value||((c=this._value)==null||c.dispose(),this._value=a)}clear(){this.value=void 0}dispose(){var a;this._isDisposed=!0,(a=this._value)==null||a.dispose(),this._value=void 0}},S.toDisposable=function(a){return{dispose:a}},S.disposeArray=n,S.getDisposeArrayDisposable=function(a){return{dispose:()=>n(a)}}},485:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.FourKeyMap=S.TwoKeyMap=void 0;class n{constructor(){this._data={}}set(c,u,o){this._data[c]||(this._data[c]={}),this._data[c][u]=o}get(c,u){return this._data[c]?this._data[c][u]:void 0}clear(){this._data={}}}S.TwoKeyMap=n,S.FourKeyMap=class{constructor(){this._data=new n}set(a,c,u,o,h){this._data.get(a,c)||this._data.set(a,c,new n),this._data.get(a,c).set(u,o,h)}get(a,c,u,o){var h;return(h=this._data.get(a,c))==null?void 0:h.get(u,o)}clear(){this._data.clear()}}},399:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.isChromeOS=S.isLinux=S.isWindows=S.isIphone=S.isIpad=S.isMac=S.getSafariVersion=S.isSafari=S.isLegacyEdge=S.isFirefox=S.isNode=void 0,S.isNode=typeof process<"u"&&"title"in process;const n=S.isNode?"node":navigator.userAgent,a=S.isNode?"node":navigator.platform;S.isFirefox=n.includes("Firefox"),S.isLegacyEdge=n.includes("Edge"),S.isSafari=/^((?!chrome|android).)*safari/i.test(n),S.getSafariVersion=function(){if(!S.isSafari)return 0;const c=n.match(/Version\/(\d+)/);return c===null||c.length<2?0:parseInt(c[1])},S.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(a),S.isIpad=a==="iPad",S.isIphone=a==="iPhone",S.isWindows=["Windows","Win16","Win32","WinCE"].includes(a),S.isLinux=a.indexOf("Linux")>=0,S.isChromeOS=/\bCrOS\b/.test(n)},385:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.DebouncedIdleTask=S.IdleTaskQueue=S.PriorityTaskQueue=void 0;const a=n(399);class c{constructor(){this._tasks=[],this._i=0}enqueue(h){this._tasks.push(h),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(h){this._idleCallback=void 0;let d=0,_=0,r=h.timeRemaining(),t=0;for(;this._i<this._tasks.length;){if(d=Date.now(),this._tasks[this._i]()||this._i++,d=Math.max(1,Date.now()-d),_=Math.max(d,_),t=h.timeRemaining(),1.5*_>t)return r-d<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-d))}ms`),void this._start();r=t}this.clear()}}class u extends c{_requestCallback(h){return setTimeout(()=>h(this._createDeadline(16)))}_cancelCallback(h){clearTimeout(h)}_createDeadline(h){const d=Date.now()+h;return{timeRemaining:()=>Math.max(0,d-Date.now())}}}S.PriorityTaskQueue=u,S.IdleTaskQueue=!a.isNode&&"requestIdleCallback"in window?class extends c{_requestCallback(o){return requestIdleCallback(o)}_cancelCallback(o){cancelIdleCallback(o)}}:u,S.DebouncedIdleTask=class{constructor(){this._queue=new S.IdleTaskQueue}set(o){this._queue.clear(),this._queue.enqueue(o)}flush(){this._queue.flush()}}},147:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.ExtendedAttrs=S.AttributeData=void 0;class n{constructor(){this.fg=0,this.bg=0,this.extended=new a}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new n;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return!(50331648&~this.fg)}isBgRGB(){return!(50331648&~this.bg)}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return!(50331648&this.fg)}isBgDefault(){return!(50331648&this.bg)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?!(50331648&~this.extended.underlineColor):this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?!(50331648&this.extended.underlineColor):this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}S.AttributeData=n;class a{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,o=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=o}clone(){return new a(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}S.ExtendedAttrs=a},782:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.CellData=void 0;const a=n(133),c=n(855),u=n(147);class o extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(d){const _=new o;return _.setFromCharData(d),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,a.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(d){this.fg=d[c.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(d[c.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(d[c.CHAR_DATA_CHAR_INDEX].length===2){const r=d[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const t=d[c.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=t&&t<=57343?this.content=1024*(r-55296)+t-56320+65536|d[c.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=d[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|d[c.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=d[c.CHAR_DATA_CHAR_INDEX],this.content=2097152|d[c.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}S.CellData=o},855:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.WHITESPACE_CELL_CODE=S.WHITESPACE_CELL_WIDTH=S.WHITESPACE_CELL_CHAR=S.NULL_CELL_CODE=S.NULL_CELL_WIDTH=S.NULL_CELL_CHAR=S.CHAR_DATA_CODE_INDEX=S.CHAR_DATA_WIDTH_INDEX=S.CHAR_DATA_CHAR_INDEX=S.CHAR_DATA_ATTR_INDEX=S.DEFAULT_EXT=S.DEFAULT_ATTR=S.DEFAULT_COLOR=void 0,S.DEFAULT_COLOR=0,S.DEFAULT_ATTR=256|S.DEFAULT_COLOR<<9,S.DEFAULT_EXT=0,S.CHAR_DATA_ATTR_INDEX=0,S.CHAR_DATA_CHAR_INDEX=1,S.CHAR_DATA_WIDTH_INDEX=2,S.CHAR_DATA_CODE_INDEX=3,S.NULL_CELL_CHAR="",S.NULL_CELL_WIDTH=1,S.NULL_CELL_CODE=0,S.WHITESPACE_CELL_CHAR=" ",S.WHITESPACE_CELL_WIDTH=1,S.WHITESPACE_CELL_CODE=32},133:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.Utf8ToUtf32=S.StringToUtf32=S.utf32ToString=S.stringFromCodePoint=void 0,S.stringFromCodePoint=function(n){return n>65535?(n-=65536,String.fromCharCode(55296+(n>>10))+String.fromCharCode(n%1024+56320)):String.fromCharCode(n)},S.utf32ToString=function(n,a=0,c=n.length){let u="";for(let o=a;o<c;++o){let h=n[o];h>65535?(h-=65536,u+=String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):u+=String.fromCharCode(h)}return u},S.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(n,a){const c=n.length;if(!c)return 0;let u=0,o=0;if(this._interim){const h=n.charCodeAt(o++);56320<=h&&h<=57343?a[u++]=1024*(this._interim-55296)+h-56320+65536:(a[u++]=this._interim,a[u++]=h),this._interim=0}for(let h=o;h<c;++h){const d=n.charCodeAt(h);if(55296<=d&&d<=56319){if(++h>=c)return this._interim=d,u;const _=n.charCodeAt(h);56320<=_&&_<=57343?a[u++]=1024*(d-55296)+_-56320+65536:(a[u++]=d,a[u++]=_)}else d!==65279&&(a[u++]=d)}return u}},S.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(n,a){const c=n.length;if(!c)return 0;let u,o,h,d,_=0,r=0,t=0;if(this.interim[0]){let s=!1,l=this.interim[0];l&=(224&l)==192?31:(240&l)==224?15:7;let v,g=0;for(;(v=63&this.interim[++g])&&g<4;)l<<=6,l|=v;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,f=p-g;for(;t<f;){if(t>=c)return 0;if(v=n[t++],(192&v)!=128){t--,s=!0;break}this.interim[g++]=v,l<<=6,l|=63&v}s||(p===2?l<128?t--:a[_++]=l:p===3?l<2048||l>=55296&&l<=57343||l===65279||(a[_++]=l):l<65536||l>1114111||(a[_++]=l)),this.interim.fill(0)}const i=c-4;let e=t;for(;e<c;){for(;!(!(e<i)||128&(u=n[e])||128&(o=n[e+1])||128&(h=n[e+2])||128&(d=n[e+3]));)a[_++]=u,a[_++]=o,a[_++]=h,a[_++]=d,e+=4;if(u=n[e++],u<128)a[_++]=u;else if((224&u)==192){if(e>=c)return this.interim[0]=u,_;if(o=n[e++],(192&o)!=128){e--;continue}if(r=(31&u)<<6|63&o,r<128){e--;continue}a[_++]=r}else if((240&u)==224){if(e>=c)return this.interim[0]=u,_;if(o=n[e++],(192&o)!=128){e--;continue}if(e>=c)return this.interim[0]=u,this.interim[1]=o,_;if(h=n[e++],(192&h)!=128){e--;continue}if(r=(15&u)<<12|(63&o)<<6|63&h,r<2048||r>=55296&&r<=57343||r===65279)continue;a[_++]=r}else if((248&u)==240){if(e>=c)return this.interim[0]=u,_;if(o=n[e++],(192&o)!=128){e--;continue}if(e>=c)return this.interim[0]=u,this.interim[1]=o,_;if(h=n[e++],(192&h)!=128){e--;continue}if(e>=c)return this.interim[0]=u,this.interim[1]=o,this.interim[2]=h,_;if(d=n[e++],(192&d)!=128){e--;continue}if(r=(7&u)<<18|(63&o)<<12|(63&h)<<6|63&d,r<65536||r>1114111)continue;a[_++]=r}}return _}}},776:function(F,S,n){var a=this&&this.__decorate||function(r,t,i,e){var s,l=arguments.length,v=l<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,t,i,e);else for(var g=r.length-1;g>=0;g--)(s=r[g])&&(v=(l<3?s(v):l>3?s(t,i,v):s(t,i))||v);return l>3&&v&&Object.defineProperty(t,i,v),v},c=this&&this.__param||function(r,t){return function(i,e){t(i,e,r)}};Object.defineProperty(S,"__esModule",{value:!0}),S.traceCall=S.setTraceLogger=S.LogService=void 0;const u=n(859),o=n(97),h={trace:o.LogLevelEnum.TRACE,debug:o.LogLevelEnum.DEBUG,info:o.LogLevelEnum.INFO,warn:o.LogLevelEnum.WARN,error:o.LogLevelEnum.ERROR,off:o.LogLevelEnum.OFF};let d,_=S.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=o.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),d=this}_updateLogLevel(){this._logLevel=h[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let t=0;t<r.length;t++)typeof r[t]=="function"&&(r[t]=r[t]())}_log(r,t,i){this._evalLazyOptionalParams(i),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+t,...i)}trace(r,...t){var i;this._logLevel<=o.LogLevelEnum.TRACE&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.trace.bind(this._optionsService.options.logger))??console.log,r,t)}debug(r,...t){var i;this._logLevel<=o.LogLevelEnum.DEBUG&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.debug.bind(this._optionsService.options.logger))??console.log,r,t)}info(r,...t){var i;this._logLevel<=o.LogLevelEnum.INFO&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.info.bind(this._optionsService.options.logger))??console.info,r,t)}warn(r,...t){var i;this._logLevel<=o.LogLevelEnum.WARN&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.warn.bind(this._optionsService.options.logger))??console.warn,r,t)}error(r,...t){var i;this._logLevel<=o.LogLevelEnum.ERROR&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.error.bind(this._optionsService.options.logger))??console.error,r,t)}};S.LogService=_=a([c(0,o.IOptionsService)],_),S.setTraceLogger=function(r){d=r},S.traceCall=function(r,t,i){if(typeof i.value!="function")throw new Error("not supported");const e=i.value;i.value=function(...s){if(d.logLevel!==o.LogLevelEnum.TRACE)return e.apply(this,s);d.trace(`GlyphRenderer#${e.name}(${s.map(v=>JSON.stringify(v)).join(", ")})`);const l=e.apply(this,s);return d.trace(`GlyphRenderer#${e.name} return`,l),l}}},726:(F,S)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.createDecorator=S.getServiceDependencies=S.serviceRegistry=void 0;const n="di$target",a="di$dependencies";S.serviceRegistry=new Map,S.getServiceDependencies=function(c){return c[a]||[]},S.createDecorator=function(c){if(S.serviceRegistry.has(c))return S.serviceRegistry.get(c);const u=function(o,h,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,r,t){r[n]===r?r[a].push({id:_,index:t}):(r[a]=[{id:_,index:t}],r[n]=r)})(u,o,d)};return u.toString=()=>c,S.serviceRegistry.set(c,u),u}},97:(F,S,n)=>{Object.defineProperty(S,"__esModule",{value:!0}),S.IDecorationService=S.IUnicodeService=S.IOscLinkService=S.IOptionsService=S.ILogService=S.LogLevelEnum=S.IInstantiationService=S.ICharsetService=S.ICoreService=S.ICoreMouseService=S.IBufferService=void 0;const a=n(726);var c;S.IBufferService=(0,a.createDecorator)("BufferService"),S.ICoreMouseService=(0,a.createDecorator)("CoreMouseService"),S.ICoreService=(0,a.createDecorator)("CoreService"),S.ICharsetService=(0,a.createDecorator)("CharsetService"),S.IInstantiationService=(0,a.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(c||(S.LogLevelEnum=c={})),S.ILogService=(0,a.createDecorator)("LogService"),S.IOptionsService=(0,a.createDecorator)("OptionsService"),S.IOscLinkService=(0,a.createDecorator)("OscLinkService"),S.IUnicodeService=(0,a.createDecorator)("UnicodeService"),S.IDecorationService=(0,a.createDecorator)("DecorationService")}},G={};function N(F){var S=G[F];if(S!==void 0)return S.exports;var n=G[F]={exports:{}};return ne[F].call(n.exports,n,n.exports,N),n.exports}var V={};return(()=>{var F=V;Object.defineProperty(F,"__esModule",{value:!0}),F.CanvasAddon=void 0;const S=N(345),n=N(859),a=N(776),c=N(949);class u extends n.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new S.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new S.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var h;return(h=this._renderer)==null?void 0:h.textureAtlas}activate(h){const d=h._core;if(!h.element)return void this.register(d.onWillOpen(()=>this.activate(h)));this._terminal=h;const _=d.coreService,r=d.optionsService,t=d.screenElement,i=d.linkifier,e=d,s=e._bufferService,l=e._renderService,v=e._characterJoinerService,g=e._charSizeService,p=e._coreBrowserService,f=e._decorationService,m=e._logService,C=e._themeService;(0,a.setTraceLogger)(m),this._renderer=new c.CanvasRenderer(h,t,i,s,g,r,v,_,p,f,C),this.register((0,S.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,S.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),l.setRenderer(this._renderer),l.handleResize(s.cols,s.rows),this.register((0,n.toDisposable)(()=>{var w;l.setRenderer(this._terminal._core._createRenderer()),l.handleResize(h.cols,h.rows),(w=this._renderer)==null||w.dispose(),this._renderer=void 0}))}clearTextureAtlas(){var h;(h=this._renderer)==null||h.clearTextureAtlas()}}F.CanvasAddon=u})(),V})(),ke.exports=De()),Me={exports:{}},Ae,Be,Ye=(Re||(Re=1,Ae=Me,(function(ne,G){Ae.exports=G()})(self,()=>(()=>{var ne={};return(()=>{var G=ne;Object.defineProperty(G,"__esModule",{value:!0}),G.FitAddon=void 0,G.FitAddon=class{activate(N){this._terminal=N}dispose(){}fit(){const N=this.proposeDimensions();if(!N||!this._terminal||isNaN(N.cols)||isNaN(N.rows))return;const V=this._terminal._core;this._terminal.rows===N.rows&&this._terminal.cols===N.cols||(V._renderService.clear(),this._terminal.resize(N.cols,N.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const N=this._terminal._core,V=N._renderService.dimensions;if(V.css.cell.width===0||V.css.cell.height===0)return;const F=this._terminal.options.scrollback===0?0:N.viewport.scrollBarWidth,S=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(S.getPropertyValue("height")),a=Math.max(0,parseInt(S.getPropertyValue("width"))),c=window.getComputedStyle(this._terminal.element),u=n-(parseInt(c.getPropertyValue("padding-top"))+parseInt(c.getPropertyValue("padding-bottom"))),o=a-(parseInt(c.getPropertyValue("padding-right"))+parseInt(c.getPropertyValue("padding-left")))-F;return{cols:Math.max(2,Math.floor(o/V.css.cell.width)),rows:Math.max(1,Math.floor(u/V.css.cell.height))}}}})(),ne})())),Me.exports),Te={exports:{}},Oe,Ze=(Be||(Be=1,(function(ne){(function(G,N){ne.exports=N()})(self,()=>(()=>{var G={345:(S,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===a)return void this._listeners.splice(c,1)}}})),this._event}fire(a,c){const u=[];for(let o=0;o<this._listeners.length;o++)u.push(this._listeners[o]);for(let o=0;o<u.length;o++)u[o].call(void 0,a,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(a,c){return a(u=>c.fire(u))},n.runAndSubscribe=function(a,c){return c(void 0),a(u=>c(u))}},859:(S,n)=>{function a(c){for(const u of c)u.dispose();c.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){const u=this._disposables.indexOf(c);u!==-1&&this._disposables.splice(u,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){var u;this._isDisposed||c===this._value||((u=this._value)==null||u.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)==null||c.dispose(),this._value=void 0}},n.toDisposable=function(c){return{dispose:c}},n.disposeArray=a,n.getDisposeArrayDisposable=function(c){return{dispose:()=>a(c)}}}},N={};function V(S){var n=N[S];if(n!==void 0)return n.exports;var a=N[S]={exports:{}};return G[S](a,a.exports,V),a.exports}var F={};return(()=>{var S=F;Object.defineProperty(S,"__esModule",{value:!0}),S.SearchAddon=void 0;const n=V(345),a=V(859),c=" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?";class u extends a.Disposable{constructor(h){super(),this._highlightedLines=new Set,this._highlightDecorations=[],this._selectedDecoration=this.register(new a.MutableDisposable),this._linesCacheTimeoutId=0,this._linesCacheDisposables=new a.MutableDisposable,this._onDidChangeResults=this.register(new n.EventEmitter),this.onDidChangeResults=this._onDidChangeResults.event,this._highlightLimit=(h==null?void 0:h.highlightLimit)??1e3}activate(h){this._terminal=h,this.register(this._terminal.onWriteParsed(()=>this._updateMatches())),this.register(this._terminal.onResize(()=>this._updateMatches())),this.register((0,a.toDisposable)(()=>this.clearDecorations()))}_updateMatches(){var h;this._highlightTimeout&&window.clearTimeout(this._highlightTimeout),this._cachedSearchTerm&&((h=this._lastSearchOptions)!=null&&h.decorations)&&(this._highlightTimeout=setTimeout(()=>{const d=this._cachedSearchTerm;this._cachedSearchTerm=void 0,this.findPrevious(d,{...this._lastSearchOptions,incremental:!0,noScroll:!0})},200))}clearDecorations(h){this._selectedDecoration.clear(),(0,a.disposeArray)(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear(),h||(this._cachedSearchTerm=void 0)}clearActiveDecoration(){this._selectedDecoration.clear()}findNext(h,d){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");const _=!this._lastSearchOptions||this._didOptionsChange(this._lastSearchOptions,d);this._lastSearchOptions=d,d!=null&&d.decorations&&(this._cachedSearchTerm===void 0||h!==this._cachedSearchTerm||_)&&this._highlightAllMatches(h,d);const r=this._findNextAndSelect(h,d);return this._fireResults(d),this._cachedSearchTerm=h,r}_highlightAllMatches(h,d){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!h||h.length===0)return void this.clearDecorations();d=d||{},this.clearDecorations(!0);const _=[];let r,t=this._find(h,0,0,d);for(;t&&((r==null?void 0:r.row)!==t.row||(r==null?void 0:r.col)!==t.col)&&!(_.length>=this._highlightLimit);)r=t,_.push(r),t=this._find(h,r.col+r.term.length>=this._terminal.cols?r.row+1:r.row,r.col+r.term.length>=this._terminal.cols?0:r.col+1,d);for(const i of _){const e=this._createResultDecoration(i,d.decorations);e&&(this._highlightedLines.add(e.marker.line),this._highlightDecorations.push({decoration:e,match:i,dispose(){e.dispose()}}))}}_find(h,d,_,r){var e;if(!this._terminal||!h||h.length===0)return(e=this._terminal)==null||e.clearSelection(),void this.clearDecorations();if(_>this._terminal.cols)throw new Error(`Invalid col: ${_} to search in terminal of ${this._terminal.cols} cols`);let t;this._initLinesCache();const i={startRow:d,startCol:_};if(t=this._findInLine(h,i,r),!t)for(let s=d+1;s<this._terminal.buffer.active.baseY+this._terminal.rows&&(i.startRow=s,i.startCol=0,t=this._findInLine(h,i,r),!t);s++);return t}_findNextAndSelect(h,d){var s;if(!this._terminal||!h||h.length===0)return(s=this._terminal)==null||s.clearSelection(),this.clearDecorations(),!1;const _=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=0,t=0;_&&(this._cachedSearchTerm===h?(r=_.end.x,t=_.end.y):(r=_.start.x,t=_.start.y)),this._initLinesCache();const i={startRow:t,startCol:r};let e=this._findInLine(h,i,d);if(!e)for(let l=t+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(i.startRow=l,i.startCol=0,e=this._findInLine(h,i,d),!e);l++);if(!e&&t!==0)for(let l=0;l<t&&(i.startRow=l,i.startCol=0,e=this._findInLine(h,i,d),!e);l++);return!e&&_&&(i.startRow=_.start.y,i.startCol=0,e=this._findInLine(h,i,d)),this._selectResult(e,d==null?void 0:d.decorations,d==null?void 0:d.noScroll)}findPrevious(h,d){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");const _=!this._lastSearchOptions||this._didOptionsChange(this._lastSearchOptions,d);this._lastSearchOptions=d,d!=null&&d.decorations&&(this._cachedSearchTerm===void 0||h!==this._cachedSearchTerm||_)&&this._highlightAllMatches(h,d);const r=this._findPreviousAndSelect(h,d);return this._fireResults(d),this._cachedSearchTerm=h,r}_didOptionsChange(h,d){return!!d&&(h.caseSensitive!==d.caseSensitive||h.regex!==d.regex||h.wholeWord!==d.wholeWord)}_fireResults(h){if(h!=null&&h.decorations){let d=-1;if(this._selectedDecoration.value){const _=this._selectedDecoration.value.match;for(let r=0;r<this._highlightDecorations.length;r++){const t=this._highlightDecorations[r].match;if(t.row===_.row&&t.col===_.col&&t.size===_.size){d=r;break}}}this._onDidChangeResults.fire({resultIndex:d,resultCount:this._highlightDecorations.length})}}_findPreviousAndSelect(h,d){var l;if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!this._terminal||!h||h.length===0)return(l=this._terminal)==null||l.clearSelection(),this.clearDecorations(),!1;const _=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=this._terminal.buffer.active.baseY+this._terminal.rows-1,t=this._terminal.cols;const i=!0;this._initLinesCache();const e={startRow:r,startCol:t};let s;if(_&&(e.startRow=r=_.start.y,e.startCol=t=_.start.x,this._cachedSearchTerm!==h&&(s=this._findInLine(h,e,d,!1),s||(e.startRow=r=_.end.y,e.startCol=t=_.end.x))),s||(s=this._findInLine(h,e,d,i)),!s){e.startCol=Math.max(e.startCol,this._terminal.cols);for(let v=r-1;v>=0&&(e.startRow=v,s=this._findInLine(h,e,d,i),!s);v--);}if(!s&&r!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let v=this._terminal.buffer.active.baseY+this._terminal.rows-1;v>=r&&(e.startRow=v,s=this._findInLine(h,e,d,i),!s);v--);return this._selectResult(s,d==null?void 0:d.decorations,d==null?void 0:d.noScroll)}_initLinesCache(){const h=this._terminal;this._linesCache||(this._linesCache=new Array(h.buffer.active.length),this._linesCacheDisposables.value=(0,a.getDisposeArrayDisposable)([h.onLineFeed(()=>this._destroyLinesCache()),h.onCursorMove(()=>this._destroyLinesCache()),h.onResize(()=>this._destroyLinesCache())])),window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=window.setTimeout(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeoutId&&(window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=0)}_isWholeWord(h,d,_){return(h===0||c.includes(d[h-1]))&&(h+_.length===d.length||c.includes(d[h+_.length]))}_findInLine(h,d,_={},r=!1){var w;const t=this._terminal,i=d.startRow,e=d.startCol,s=t.buffer.active.getLine(i);if(s!=null&&s.isWrapped)return r?void(d.startCol+=t.cols):(d.startRow--,d.startCol+=t.cols,this._findInLine(h,d,_));let l=(w=this._linesCache)==null?void 0:w[i];l||(l=this._translateBufferLineToStringWithWrap(i,!0),this._linesCache&&(this._linesCache[i]=l));const[v,g]=l,p=this._bufferColsToStringOffset(i,e),f=_.caseSensitive?h:h.toLowerCase(),m=_.caseSensitive?v:v.toLowerCase();let C=-1;if(_.regex){const L=RegExp(f,"g");let y;if(r)for(;y=L.exec(m.slice(0,p));)C=L.lastIndex-y[0].length,h=y[0],L.lastIndex-=h.length-1;else y=L.exec(m.slice(p)),y&&y[0].length>0&&(C=p+(L.lastIndex-y[0].length),h=y[0])}else r?p-f.length>=0&&(C=m.lastIndexOf(f,p-f.length)):C=m.indexOf(f,p);if(C>=0){if(_.wholeWord&&!this._isWholeWord(C,m,h))return;let L=0;for(;L<g.length-1&&C>=g[L+1];)L++;let y=L;for(;y<g.length-1&&C+h.length>=g[y+1];)y++;const R=C-g[L],A=C+h.length-g[y],B=this._stringLengthToBufferSize(i+L,R);return{term:h,col:B,row:i+L,size:this._stringLengthToBufferSize(i+y,A)-B+t.cols*(y-L)}}}_stringLengthToBufferSize(h,d){const _=this._terminal.buffer.active.getLine(h);if(!_)return 0;for(let r=0;r<d;r++){const t=_.getCell(r);if(!t)break;const i=t.getChars();i.length>1&&(d-=i.length-1);const e=_.getCell(r+1);e&&e.getWidth()===0&&d++}return d}_bufferColsToStringOffset(h,d){const _=this._terminal;let r=h,t=0,i=_.buffer.active.getLine(r);for(;d>0&&i;){for(let e=0;e<d&&e<_.cols;e++){const s=i.getCell(e);if(!s)break;s.getWidth()&&(t+=s.getCode()===0?1:s.getChars().length)}if(r++,i=_.buffer.active.getLine(r),i&&!i.isWrapped)break;d-=_.cols}return t}_translateBufferLineToStringWithWrap(h,d){var e;const _=this._terminal,r=[],t=[0];let i=_.buffer.active.getLine(h);for(;i;){const s=_.buffer.active.getLine(h+1),l=!!s&&s.isWrapped;let v=i.translateToString(!l&&d);if(l&&s){const g=i.getCell(i.length-1);g&&g.getCode()===0&&g.getWidth()===1&&((e=s.getCell(0))==null?void 0:e.getWidth())===2&&(v=v.slice(0,-1))}if(r.push(v),!l)break;t.push(t[t.length-1]+v.length),h++,i=s}return[r.join(""),t]}_selectResult(h,d,_){const r=this._terminal;if(this._selectedDecoration.clear(),!h)return r.clearSelection(),!1;if(r.select(h.col,h.row,h.size),d){const t=r.registerMarker(-r.buffer.active.baseY-r.buffer.active.cursorY+h.row);if(t){const i=r.registerDecoration({marker:t,x:h.col,width:h.size,backgroundColor:d.activeMatchBackground,layer:"top",overviewRulerOptions:{color:d.activeMatchColorOverviewRuler}});if(i){const e=[];e.push(t),e.push(i.onRender(s=>this._applyStyles(s,d.activeMatchBorder,!0))),e.push(i.onDispose(()=>(0,a.disposeArray)(e))),this._selectedDecoration.value={decoration:i,match:h,dispose(){i.dispose()}}}}}if(!_&&(h.row>=r.buffer.active.viewportY+r.rows||h.row<r.buffer.active.viewportY)){let t=h.row-r.buffer.active.viewportY;t-=Math.floor(r.rows/2),r.scrollLines(t)}return!0}_applyStyles(h,d,_){h.classList.contains("xterm-find-result-decoration")||(h.classList.add("xterm-find-result-decoration"),d&&(h.style.outline=`1px solid ${d}`)),_&&h.classList.add("xterm-find-active-result-decoration")}_createResultDecoration(h,d){const _=this._terminal,r=_.registerMarker(-_.buffer.active.baseY-_.buffer.active.cursorY+h.row);if(!r)return;const t=_.registerDecoration({marker:r,x:h.col,width:h.size,backgroundColor:d.matchBackground,overviewRulerOptions:this._highlightedLines.has(r.line)?void 0:{color:d.matchOverviewRuler,position:"center"}});if(t){const i=[];i.push(r),i.push(t.onRender(e=>this._applyStyles(e,d.matchBorder,!1))),i.push(t.onDispose(()=>(0,a.disposeArray)(i)))}return t}}S.SearchAddon=u})(),F})())})(Te)),Te.exports),Pe={exports:{}},Ie,Qe=(Oe||(Oe=1,(function(ne){(function(G,N){ne.exports=N()})(0,()=>(()=>{var G={433:(S,n,a)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV11=void 0;const c=a(938),u=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],o=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],h=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],d=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]];let _;function r(t,i){let e,s=0,l=i.length-1;if(t<i[0][0]||t>i[l][1])return!1;for(;l>=s;)if(e=s+l>>1,t>i[e][1])s=e+1;else{if(!(t<i[e][0]))return!0;l=e-1}return!1}n.UnicodeV11=class{constructor(){if(this.version="11",!_){_=new Uint8Array(65536),_.fill(1),_[0]=0,_.fill(0,1,32),_.fill(0,127,160);for(let t=0;t<u.length;++t)_.fill(0,u[t][0],u[t][1]+1);for(let t=0;t<h.length;++t)_.fill(2,h[t][0],h[t][1]+1)}}wcwidth(t){return t<32?0:t<127?1:t<65536?_[t]:r(t,o)?0:r(t,d)?2:1}charProperties(t,i){let e=this.wcwidth(t),s=e===0&&i!==0;if(s){const l=c.UnicodeService.extractWidth(i);l===0?s=!1:l>e&&(e=l)}return c.UnicodeService.createPropertyValue(0,e,s)}}},345:(S,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===a)return void this._listeners.splice(c,1)}}})),this._event}fire(a,c){const u=[];for(let o=0;o<this._listeners.length;o++)u.push(this._listeners[o]);for(let o=0;o<u.length;o++)u[o].call(void 0,a,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(a,c){return a(u=>c.fire(u))},n.runAndSubscribe=function(a,c){return c(void 0),a(u=>c(u))}},490:(S,n,a)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const c=a(938),u=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],o=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let h;n.UnicodeV6=class{constructor(){if(this.version="6",!h){h=new Uint8Array(65536),h.fill(1),h[0]=0,h.fill(0,1,32),h.fill(0,127,160),h.fill(2,4352,4448),h[9001]=2,h[9002]=2,h.fill(2,11904,42192),h[12351]=1,h.fill(2,44032,55204),h.fill(2,63744,64256),h.fill(2,65040,65050),h.fill(2,65072,65136),h.fill(2,65280,65377),h.fill(2,65504,65511);for(let d=0;d<u.length;++d)h.fill(0,u[d][0],u[d][1]+1)}}wcwidth(d){return d<32?0:d<127?1:d<65536?h[d]:(function(_,r){let t,i=0,e=r.length-1;if(_<r[0][0]||_>r[e][1])return!1;for(;e>=i;)if(t=i+e>>1,_>r[t][1])i=t+1;else{if(!(_<r[t][0]))return!0;e=t-1}return!1})(d,o)?0:d>=131072&&d<=196605||d>=196608&&d<=262141?2:1}charProperties(d,_){let r=this.wcwidth(d),t=r===0&&_!==0;if(t){const i=c.UnicodeService.extractWidth(_);i===0?t=!1:i>r&&(r=i)}return c.UnicodeService.createPropertyValue(0,r,t)}}},938:(S,n,a)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const c=a(345),u=a(490);class o{static extractShouldJoin(d){return!!(1&d)}static extractWidth(d){return d>>1&3}static extractCharKind(d){return d>>3}static createPropertyValue(d,_,r=!1){return(16777215&d)<<3|(3&_)<<1|(r?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;const d=new u.UnicodeV6;this.register(d),this._active=d.version,this._activeProvider=d}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(d){if(!this._providers[d])throw new Error(`unknown Unicode version "${d}"`);this._active=d,this._activeProvider=this._providers[d],this._onChange.fire(d)}register(d){this._providers[d.version]=d}wcwidth(d){return this._activeProvider.wcwidth(d)}getStringCellWidth(d){let _=0,r=0;const t=d.length;for(let i=0;i<t;++i){let e=d.charCodeAt(i);if(55296<=e&&e<=56319){if(++i>=t)return _+this.wcwidth(e);const v=d.charCodeAt(i);56320<=v&&v<=57343?e=1024*(e-55296)+v-56320+65536:_+=this.wcwidth(v)}const s=this.charProperties(e,r);let l=o.extractWidth(s);o.extractShouldJoin(s)&&(l-=o.extractWidth(r)),_+=l,r=s}return _}charProperties(d,_){return this._activeProvider.charProperties(d,_)}}n.UnicodeService=o}},N={};function V(S){var n=N[S];if(n!==void 0)return n.exports;var a=N[S]={exports:{}};return G[S](a,a.exports,V),a.exports}var F={};return(()=>{var S=F;Object.defineProperty(S,"__esModule",{value:!0}),S.Unicode11Addon=void 0;const n=V(433);S.Unicode11Addon=class{activate(a){a.unicode.register(new n.UnicodeV11)}dispose(){}}})(),F})())})(Pe)),Pe.exports),He={exports:{}},Fe,et=(Ie||(Ie=1,(function(ne){(function(G,N){ne.exports=N()})(self,()=>(()=>{var G={6:(S,n)=>{function a(u){try{const o=new URL(u),h=o.password&&o.username?`${o.protocol}//${o.username}:${o.password}@${o.host}`:o.username?`${o.protocol}//${o.username}@${o.host}`:`${o.protocol}//${o.host}`;return u.toLocaleLowerCase().startsWith(h.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(n,"__esModule",{value:!0}),n.LinkComputer=n.WebLinkProvider=void 0,n.WebLinkProvider=class{constructor(u,o,h,d={}){this._terminal=u,this._regex=o,this._handler=h,this._options=d}provideLinks(u,o){const h=c.computeLink(u,this._regex,this._terminal,this._handler);o(this._addCallbacks(h))}_addCallbacks(u){return u.map(o=>(o.leave=this._options.leave,o.hover=(h,d)=>{if(this._options.hover){const{range:_}=o;this._options.hover(h,d,_)}},o))}};class c{static computeLink(o,h,d,_){const r=new RegExp(h.source,(h.flags||"")+"g"),[t,i]=c._getWindowedLineStrings(o-1,d),e=t.join("");let s;const l=[];for(;s=r.exec(e);){const v=s[0];if(!a(v))continue;const[g,p]=c._mapStrIdx(d,i,0,s.index),[f,m]=c._mapStrIdx(d,g,p,v.length);if(g===-1||p===-1||f===-1||m===-1)continue;const C={start:{x:p+1,y:g+1},end:{x:m,y:f+1}};l.push({range:C,text:v,activate:_})}return l}static _getWindowedLineStrings(o,h){let d,_=o,r=o,t=0,i="";const e=[];if(d=h.buffer.active.getLine(o)){const s=d.translateToString(!0);if(d.isWrapped&&s[0]!==" "){for(t=0;(d=h.buffer.active.getLine(--_))&&t<2048&&(i=d.translateToString(!0),t+=i.length,e.push(i),d.isWrapped&&i.indexOf(" ")===-1););e.reverse()}for(e.push(s),t=0;(d=h.buffer.active.getLine(++r))&&d.isWrapped&&t<2048&&(i=d.translateToString(!0),t+=i.length,e.push(i),i.indexOf(" ")===-1););}return[e,_]}static _mapStrIdx(o,h,d,_){const r=o.buffer.active,t=r.getNullCell();let i=d;for(;_;){const e=r.getLine(h);if(!e)return[-1,-1];for(let s=i;s<e.length;++s){e.getCell(s,t);const l=t.getChars();if(t.getWidth()&&(_-=l.length||1,s===e.length-1&&l==="")){const v=r.getLine(h+1);v&&v.isWrapped&&(v.getCell(0,t),t.getWidth()===2&&(_+=1))}if(_<0)return[h,s]}h++,i=0}return[h,i]}}n.LinkComputer=c}},N={};function V(S){var n=N[S];if(n!==void 0)return n.exports;var a=N[S]={exports:{}};return G[S](a,a.exports,V),a.exports}var F={};return(()=>{var S=F;Object.defineProperty(S,"__esModule",{value:!0}),S.WebLinksAddon=void 0;const n=V(6),a=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function c(u,o){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=o}else console.warn("Opening link blocked as opener could not be cleared")}S.WebLinksAddon=class{constructor(u=c,o={}){this._handler=u,this._options=o}activate(u){this._terminal=u;const o=this._options,h=o.urlRegex||a;this._linkProvider=this._terminal.registerLinkProvider(new n.WebLinkProvider(this._terminal,h,this._handler,o))}dispose(){var u;(u=this._linkProvider)==null||u.dispose()}}})(),F})())})(He)),He.exports),We={exports:{}},tt=(Fe||(Fe=1,(function(ne){(function(G,N){ne.exports=N()})(globalThis,()=>(()=>{var G={4567:function(S,n,a){var c=this&&this.__decorate||function(e,s,l,v){var g,p=arguments.length,f=p<3?s:v===null?v=Object.getOwnPropertyDescriptor(s,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(e,s,l,v);else for(var m=e.length-1;m>=0;m--)(g=e[m])&&(f=(p<3?g(f):p>3?g(s,l,f):g(s,l))||f);return p>3&&f&&Object.defineProperty(s,l,f),f},u=this&&this.__param||function(e,s){return function(l,v){s(l,v,e)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const o=a(9042),h=a(9924),d=a(844),_=a(4725),r=a(2585),t=a(3656);let i=n.AccessibilityManager=class extends d.Disposable{constructor(e,s,l,v){super(),this._terminal=e,this._coreBrowserService=l,this._renderService=v,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let g=0;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);if(this._topBoundaryFocusListener=g=>this._handleBoundaryFocus(g,0),this._bottomBoundaryFocusListener=g=>this._handleBoundaryFocus(g,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new h.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(g=>this._handleResize(g.rows))),this.register(this._terminal.onRender(g=>this._refreshRows(g.start,g.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(g=>this._handleChar(g))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
2
2
|
`))),this.register(this._terminal.onA11yTab(g=>this._handleTab(g))),this.register(this._terminal.onKey(g=>this._handleKey(g.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,t.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,d.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let s=0;s<e;s++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=o.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,s){this._liveRegionDebouncer.refresh(e,s,this._terminal.rows)}_renderRows(e,s){const l=this._terminal.buffer,v=l.lines.length.toString();for(let g=e;g<=s;g++){const p=l.lines.get(l.ydisp+g),f=[],m=(p==null?void 0:p.translateToString(!0,void 0,void 0,f))||"",C=(l.ydisp+g+1).toString(),w=this._rowElements[g];w&&(m.length===0?(w.innerText="\xA0",this._rowColumns.set(w,[0,1])):(w.textContent=m,this._rowColumns.set(w,f)),w.setAttribute("aria-posinset",C),w.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,s){const l=e.target,v=this._rowElements[s===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")===(s===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==v)return;let g,p;if(s===0?(g=l,p=this._rowElements.pop(),this._rowContainer.removeChild(p)):(g=this._rowElements.shift(),p=l,this._rowContainer.removeChild(g)),g.removeEventListener("focus",this._topBoundaryFocusListener),p.removeEventListener("focus",this._bottomBoundaryFocusListener),s===0){const f=this._createAccessibilityTreeNode();this._rowElements.unshift(f),this._rowContainer.insertAdjacentElement("afterbegin",f)}else{const f=this._createAccessibilityTreeNode();this._rowElements.push(f),this._rowContainer.appendChild(f)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(s===0?-1:1),this._rowElements[s===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var m;if(this._rowElements.length===0)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let s={node:e.anchorNode,offset:e.anchorOffset},l={node:e.focusNode,offset:e.focusOffset};if((s.node.compareDocumentPosition(l.node)&Node.DOCUMENT_POSITION_PRECEDING||s.node===l.node&&s.offset>l.offset)&&([s,l]=[l,s]),s.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(s={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(s.node))return;const v=this._rowElements.slice(-1)[0];if(l.node.compareDocumentPosition(v)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(l={node:v,offset:((m=v.textContent)==null?void 0:m.length)??0}),!this._rowContainer.contains(l.node))return;const g=({node:C,offset:w})=>{const L=C instanceof Text?C.parentNode:C;let y=parseInt(L==null?void 0:L.getAttribute("aria-posinset"),10)-1;if(isNaN(y))return console.warn("row is invalid. Race condition?"),null;const R=this._rowColumns.get(L);if(!R)return console.warn("columns is null. Race condition?"),null;let A=w<R.length?R[w]:R.slice(-1)[0]+1;return A>=this._terminal.cols&&(++y,A=0),{row:y,column:A}},p=g(s),f=g(l);if(p&&f){if(p.row>f.row||p.row===f.row&&p.column>=f.column)throw new Error("invalid range");this._terminal.select(p.column,p.row,(f.row-p.row)*this._terminal.cols-p.column+f.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let s=this._rowContainer.children.length;s<this._terminal.rows;s++)this._rowElements[s]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[s]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=i=c([u(1,r.IInstantiationService),u(2,_.ICoreBrowserService),u(3,_.IRenderService)],i)},3614:(S,n)=>{function a(h){return h.replace(/\r?\n/g,"\r")}function c(h,d){return d?"\x1B[200~"+h+"\x1B[201~":h}function u(h,d,_,r){h=c(h=a(h),_.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),_.triggerDataEvent(h,!0),d.value=""}function o(h,d,_){const r=_.getBoundingClientRect(),t=h.clientX-r.left-10,i=h.clientY-r.top-10;d.style.width="20px",d.style.height="20px",d.style.left=`${t}px`,d.style.top=`${i}px`,d.style.zIndex="1000",d.focus()}Object.defineProperty(n,"__esModule",{value:!0}),n.rightClickHandler=n.moveTextAreaUnderMouseCursor=n.paste=n.handlePasteEvent=n.copyHandler=n.bracketTextForPaste=n.prepareTextForTerminal=void 0,n.prepareTextForTerminal=a,n.bracketTextForPaste=c,n.copyHandler=function(h,d){h.clipboardData&&h.clipboardData.setData("text/plain",d.selectionText),h.preventDefault()},n.handlePasteEvent=function(h,d,_,r){h.stopPropagation(),h.clipboardData&&u(h.clipboardData.getData("text/plain"),d,_,r)},n.paste=u,n.moveTextAreaUnderMouseCursor=o,n.rightClickHandler=function(h,d,_,r,t){o(h,d,_),t&&r.rightClickSelect(h),d.value=r.selectionText,d.select()}},7239:(S,n,a)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const c=a(1505);n.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(u,o,h){this._css.set(u,o,h)}getCss(u,o){return this._css.get(u,o)}setColor(u,o,h){this._color.set(u,o,h)}getColor(u,o){return this._color.get(u,o)}clear(){this._color.clear(),this._css.clear()}}},3656:(S,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(a,c,u,o){a.addEventListener(c,u,o);let h=!1;return{dispose:()=>{h||(h=!0,a.removeEventListener(c,u,o))}}}},3551:function(S,n,a){var c=this&&this.__decorate||function(i,e,s,l){var v,g=arguments.length,p=g<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var f=i.length-1;f>=0;f--)(v=i[f])&&(p=(g<3?v(p):g>3?v(e,s,p):v(e,s))||p);return g>3&&p&&Object.defineProperty(e,s,p),p},u=this&&this.__param||function(i,e){return function(s,l){e(s,l,i)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const o=a(3656),h=a(8460),d=a(844),_=a(2585),r=a(4725);let t=n.Linkifier=class extends d.Disposable{get currentLink(){return this._currentLink}constructor(i,e,s,l,v){super(),this._element=i,this._mouseService=e,this._renderService=s,this._bufferService=l,this._linkProviderService=v,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new h.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new h.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,d.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,d.toDisposable)(()=>{var g;this._lastMouseEvent=void 0,(g=this._activeProviderReplies)==null||g.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,o.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,o.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(i){this._lastMouseEvent=i;const e=this._positionFromMouseEvent(i,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;const s=i.composedPath();for(let l=0;l<s.length;l++){const v=s[l];if(v.classList.contains("xterm"))break;if(v.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(i){if(this._activeLine!==i.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(i,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,i)||(this._clearCurrentLink(),this._askForLink(i,!0))}_askForLink(i,e){var l,v;this._activeProviderReplies&&e||((l=this._activeProviderReplies)==null||l.forEach(g=>{g==null||g.forEach(p=>{p.link.dispose&&p.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=i.y);let s=!1;for(const[g,p]of this._linkProviderService.linkProviders.entries())e?(v=this._activeProviderReplies)!=null&&v.get(g)&&(s=this._checkLinkProviderResult(g,i,s)):p.provideLinks(i.y,f=>{var C,w;if(this._isMouseOut)return;const m=f==null?void 0:f.map(L=>({link:L}));(C=this._activeProviderReplies)==null||C.set(g,m),s=this._checkLinkProviderResult(g,i,s),((w=this._activeProviderReplies)==null?void 0:w.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(i.y,this._activeProviderReplies)})}_removeIntersectingLinks(i,e){const s=new Set;for(let l=0;l<e.size;l++){const v=e.get(l);if(v)for(let g=0;g<v.length;g++){const p=v[g],f=p.link.range.start.y<i?0:p.link.range.start.x,m=p.link.range.end.y>i?this._bufferService.cols:p.link.range.end.x;for(let C=f;C<=m;C++){if(s.has(C)){v.splice(g--,1);break}s.add(C)}}}}_checkLinkProviderResult(i,e,s){var g;if(!this._activeProviderReplies)return s;const l=this._activeProviderReplies.get(i);let v=!1;for(let p=0;p<i;p++)this._activeProviderReplies.has(p)&&!this._activeProviderReplies.get(p)||(v=!0);if(!v&&l){const p=l.find(f=>this._linkAtPosition(f.link,e));p&&(s=!0,this._handleNewLink(p))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!s)for(let p=0;p<this._activeProviderReplies.size;p++){const f=(g=this._activeProviderReplies.get(p))==null?void 0:g.find(m=>this._linkAtPosition(m.link,e));if(f){s=!0,this._handleNewLink(f);break}}return s}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(i){if(!this._currentLink)return;const e=this._positionFromMouseEvent(i,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(i,this._currentLink.link.text)}_clearCurrentLink(i,e){this._currentLink&&this._lastMouseEvent&&(!i||!e||this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,d.disposeArray)(this._linkCacheDisposables))}_handleNewLink(i){if(!this._lastMouseEvent)return;const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(i.link,e)&&(this._currentLink=i,this._currentLink.state={decorations:{underline:i.link.decorations===void 0||i.link.decorations.underline,pointerCursor:i.link.decorations===void 0||i.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,i.link,this._lastMouseEvent),i.link.decorations={},Object.defineProperties(i.link.decorations,{pointerCursor:{get:()=>{var s,l;return(l=(s=this._currentLink)==null?void 0:s.state)==null?void 0:l.decorations.pointerCursor},set:s=>{var l;(l=this._currentLink)!=null&&l.state&&this._currentLink.state.decorations.pointerCursor!==s&&(this._currentLink.state.decorations.pointerCursor=s,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",s))}},underline:{get:()=>{var s,l;return(l=(s=this._currentLink)==null?void 0:s.state)==null?void 0:l.decorations.underline},set:s=>{var l,v,g;(l=this._currentLink)!=null&&l.state&&((g=(v=this._currentLink)==null?void 0:v.state)==null?void 0:g.decorations.underline)!==s&&(this._currentLink.state.decorations.underline=s,this._currentLink.state.isHovered&&this._fireUnderlineEvent(i.link,s))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(s=>{if(!this._currentLink)return;const l=s.start===0?0:s.start+1+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.ydisp+1+s.end;if(this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=v&&(this._clearCurrentLink(l,v),this._lastMouseEvent)){const g=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);g&&this._askForLink(g,!1)}})))}_linkHover(i,e,s){var l;(l=this._currentLink)!=null&&l.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&i.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(s,e.text)}_fireUnderlineEvent(i,e){const s=i.range,l=this._bufferService.buffer.ydisp,v=this._createLinkUnderlineEvent(s.start.x-1,s.start.y-l-1,s.end.x,s.end.y-l-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(v)}_linkLeave(i,e,s){var l;(l=this._currentLink)!=null&&l.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&i.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(s,e.text)}_linkAtPosition(i,e){const s=i.range.start.y*this._bufferService.cols+i.range.start.x,l=i.range.end.y*this._bufferService.cols+i.range.end.x,v=e.y*this._bufferService.cols+e.x;return s<=v&&v<=l}_positionFromMouseEvent(i,e,s){const l=s.getCoords(i,e,this._bufferService.cols,this._bufferService.rows);if(l)return{x:l[0],y:l[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(i,e,s,l,v){return{x1:i,y1:e,x2:s,y2:l,cols:this._bufferService.cols,fg:v}}};n.Linkifier=t=c([u(1,r.IMouseService),u(2,r.IRenderService),u(3,_.IBufferService),u(4,r.ILinkProviderService)],t)},9042:(S,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tooMuchOutput=n.promptLabel=void 0,n.promptLabel="Terminal input",n.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(S,n,a){var c=this&&this.__decorate||function(r,t,i,e){var s,l=arguments.length,v=l<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,t,i,e);else for(var g=r.length-1;g>=0;g--)(s=r[g])&&(v=(l<3?s(v):l>3?s(t,i,v):s(t,i))||v);return l>3&&v&&Object.defineProperty(t,i,v),v},u=this&&this.__param||function(r,t){return function(i,e){t(i,e,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const o=a(511),h=a(2585);let d=n.OscLinkProvider=class{constructor(r,t,i){this._bufferService=r,this._optionsService=t,this._oscLinkService=i}provideLinks(r,t){var m;const i=this._bufferService.buffer.lines.get(r-1);if(!i)return void t(void 0);const e=[],s=this._optionsService.rawOptions.linkHandler,l=new o.CellData,v=i.getTrimmedLength();let g=-1,p=-1,f=!1;for(let C=0;C<v;C++)if(p!==-1||i.hasContent(C)){if(i.loadCell(C,l),l.hasExtendedAttrs()&&l.extended.urlId){if(p===-1){p=C,g=l.extended.urlId;continue}f=l.extended.urlId!==g}else p!==-1&&(f=!0);if(f||p!==-1&&C===v-1){const w=(m=this._oscLinkService.getLinkData(g))==null?void 0:m.uri;if(w){const L={start:{x:p+1,y:r},end:{x:C+(f||C!==v-1?0:1),y:r}};let y=!1;if(!(s!=null&&s.allowNonHttpProtocols))try{const R=new URL(w);["http:","https:"].includes(R.protocol)||(y=!0)}catch{y=!0}y||e.push({text:w,range:L,activate:(R,A)=>s?s.activate(R,A,L):_(0,A),hover:(R,A)=>{var B;return(B=s==null?void 0:s.hover)==null?void 0:B.call(s,R,A,L)},leave:(R,A)=>{var B;return(B=s==null?void 0:s.leave)==null?void 0:B.call(s,R,A,L)}})}f=!1,l.hasExtendedAttrs()&&l.extended.urlId?(p=C,g=l.extended.urlId):(p=-1,g=-1)}}t(e)}};function _(r,t){if(confirm(`Do you want to navigate to ${t}?
|
|
4
4
|
|