@globalpayments/vega-sandbox-app 0.1.1-0
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.
Potentially problematic release.
This version of @globalpayments/vega-sandbox-app might be problematic. Click here for more details.
- package/README.md +49 -0
- package/dist/assets/accessibility-6af5cf2e-XlEB_Jt7.js +1 -0
- package/dist/assets/action-color-accessibility-validator-ce55cb07-C-ZfZ90r.js +1 -0
- package/dist/assets/align-left-7f959adf-BlPklVKE.js +1 -0
- package/dist/assets/aria-attributes-value-mapper-2c632641-BA3SU8ke.js +1 -0
- package/dist/assets/aria-dialog-focusable-trap-slimmer-7db3d5a7-Cx8CJUcp.js +1 -0
- package/dist/assets/array-7888f339-BUzRhXHn.js +1 -0
- package/dist/assets/auto-run-when-re-render-task-queue-slimmer.abstract-27820d4c-DrPRo97a.js +1 -0
- package/dist/assets/babel-Dyqlk8mN.svg +1 -0
- package/dist/assets/brand-switch-state-controller-slimmer-9ca03c81-D2Iufq0G.js +1 -0
- package/dist/assets/check-box-required-rule-cb0aa339-B8GrMHqP.js +1 -0
- package/dist/assets/chevron-down-4a75d28e-CQKZrHY1.js +1 -0
- package/dist/assets/chevron-up-b1989751-Bfzxj3jY.js +1 -0
- package/dist/assets/child-nodes-event-prevent-slimmer-1e3ac106-DA54t1iv.js +1 -0
- package/dist/assets/child-nodes-notify-observer-slimmer-499a3aa7-tNZc5byb.js +1 -0
- package/dist/assets/click-outside-only-to-dismiss-strategy-3d286c1b-Bt4qXmzF.js +1 -0
- package/dist/assets/component-7d906393-CRgivpmK.js +1 -0
- package/dist/assets/component-global-style-slimmer-ac703085-BrAKY3hJ.js +1 -0
- package/dist/assets/component-load-required-db42032a-Di7iuaem.js +1 -0
- package/dist/assets/component-usage-runtime-metrics-4b1afd04-D5yBE3LX.js +2 -0
- package/dist/assets/component-value-history-controller-slimmer.abstract-21e9126a-B95QIB1M.js +1 -0
- package/dist/assets/country-flags-39dbfa43-CX7jF-6J.js +927 -0
- package/dist/assets/dark-mode-state-controller-slimmer-778dd929-DdCZ4Jof.js +1 -0
- package/dist/assets/date-required-rule-d6ce832c-CEFLpidy.js +1 -0
- package/dist/assets/deprecated-property-slimmer-ea34fa7b-DPzyydTv.js +1 -0
- package/dist/assets/design-token-0a575bf2-PUb6fp1k.js +1 -0
- package/dist/assets/docker-CILJA9EV.svg +1 -0
- package/dist/assets/drop-file-accept-filter-slimmer-ad759e4a-DTuTuRV0.js +1 -0
- package/dist/assets/effect-f50e072d-BVwAMfLb.js +1 -0
- package/dist/assets/element-appender-slimmer-44bbb5c6-BvVikV-9.js +7 -0
- package/dist/assets/event-emit-slimmer-3eb4d8ad-Ctlccsem.js +1 -0
- package/dist/assets/file-uploader-required-rule-ad886d01-BSSsG3dt.js +1 -0
- package/dist/assets/fileDropUtils-RRUBaLqo.js +1 -0
- package/dist/assets/form-field-controller-slimmer-03894a51-CoAcSeLl.js +1 -0
- package/dist/assets/gulp-BUg8jesr.svg +1 -0
- package/dist/assets/image-annotation-action-e8ab7b64-KPj0aQNC.js +1 -0
- package/dist/assets/immutable-map-4fe22b11-DIPXISW1.js +1 -0
- package/dist/assets/index-CVS-vjRT.js +669 -0
- package/dist/assets/index-DJavp-p1.css +32 -0
- package/dist/assets/inject-keyboard-manager-e5874185-CNHbHoko.js +1 -0
- package/dist/assets/input-phone-number-required-rule-be6a5572-Cwd2Hv4V.js +1 -0
- package/dist/assets/input-range-required-rule-3ad74776-B7PLb3FQ.js +1 -0
- package/dist/assets/keyboard-manager-404b9c17-BrcyLUZb.js +1 -0
- package/dist/assets/keyboard-manager-slimmer-c8fcfe60-CN3LeBJZ.js +1 -0
- package/dist/assets/legend-input-processor-122008c5-XSunuE2s.js +1 -0
- package/dist/assets/license-C5slmVrE.svg +1 -0
- package/dist/assets/min-number-rule-2f1cfbf9-CWIvZYfA.js +1 -0
- package/dist/assets/min-string-length-rule-c31c89f4-BTY-3yJy.js +1 -0
- package/dist/assets/month-view-generator-d341fa5a-IIor3YXJ.js +1 -0
- package/dist/assets/mutation-observer-filters-1a054fb0-CJhfq3iU.js +1 -0
- package/dist/assets/mutation-observer-slimmer-58ebc13c-m99uIPjN.js +1 -0
- package/dist/assets/page-size-option-utils-50afc81a-BpAIWejs.js +1 -0
- package/dist/assets/placeholder-bf562081-D8zcyDHt.js +1 -0
- package/dist/assets/public-rules-09387dcf-BYyE4A0Y.js +1 -0
- package/dist/assets/required-field-rule-ab4bdc47-BVWO4gts.js +1 -0
- package/dist/assets/responsive-format-facade-51c0c2e1-CSNTrSBX.js +1 -0
- package/dist/assets/rich-text-editor-required-rule-cca16fd0-DCeA9od8.js +1 -0
- package/dist/assets/ruby-B9Na5RWH.svg +1 -0
- package/dist/assets/rust-D4Lh77kM.svg +1 -0
- package/dist/assets/state-border-formatter-50394e9c-ByDMiCxI.js +1 -0
- package/dist/assets/string-format-strategy.abstract-de17b899-BAoFnBxC.js +1 -0
- package/dist/assets/string-input-formatter-slimmer-c3d483ef-D4FEqo9Z.js +1 -0
- package/dist/assets/string-mask-strategy-87efdb9e-yW6x2ZjX.js +1 -0
- package/dist/assets/style-formatter-c20c1988-CFX-tZPv.js +1 -0
- package/dist/assets/sub-state-notify-slimmer-d5a21bb3-D4DqpbZp.js +1 -0
- package/dist/assets/sub-state-observer-slimmer-d924288a-Dvj3sSUI.js +1 -0
- package/dist/assets/synchronize-task-queue-ac8acc3b-Zj5FaVSX.js +1 -0
- package/dist/assets/time-required-rule-026c17a1-DhKBWnaH.js +1 -0
- package/dist/assets/toggle-switch-required-rule-b3cf4302-BAn2CJUG.js +1 -0
- package/dist/assets/translation-slimmer-7f195ba8-B5rGwI39.js +1 -0
- package/dist/assets/trash-can-8819a939-BMBO4L_u.js +1 -0
- package/dist/assets/vega-accordion.entry-CfEINT7F.js +1 -0
- package/dist/assets/vega-app-footer.entry-dxKlVGHF.js +1 -0
- package/dist/assets/vega-app-header-button.entry-BqvJf9ih.js +1 -0
- package/dist/assets/vega-backdrop.entry-zvDuVOIm.js +1 -0
- package/dist/assets/vega-banner.entry-BP5KtjWa.js +1 -0
- package/dist/assets/vega-bar-chart.entry-CkwKn-ae.js +1 -0
- package/dist/assets/vega-box.entry-CKRpS_7q.js +1 -0
- package/dist/assets/vega-brand-logo.entry-D55jTPdD.js +1 -0
- package/dist/assets/vega-breadcrumb.entry-Bi43hitV.js +1 -0
- package/dist/assets/vega-button-circle.entry-Q2J7n2u7.js +1 -0
- package/dist/assets/vega-button-group_2.entry-CeqFPsfs.js +1 -0
- package/dist/assets/vega-button-link.entry-DMdYQDOf.js +1 -0
- package/dist/assets/vega-button.entry-D3XB1oFN.js +1 -0
- package/dist/assets/vega-calendar_4.entry-Cj_Aij7Z.js +1 -0
- package/dist/assets/vega-card.entry-C2ddJjpk.js +1 -0
- package/dist/assets/vega-carousel.entry-DGpl69kz.js +1 -0
- package/dist/assets/vega-checkbox_2.entry-C21WN-0W.js +1 -0
- package/dist/assets/vega-chip.entry-Bp2Li7OI.js +1 -0
- package/dist/assets/vega-code-block.entry-DKuulw1O.js +8 -0
- package/dist/assets/vega-color-picker.entry-DMEFhqQB.js +1 -0
- package/dist/assets/vega-color-swatch-picker.entry-CD1Epzrl.js +1 -0
- package/dist/assets/vega-color-swatch.entry-DcQLUHHI.js +1 -0
- package/dist/assets/vega-combo-box.entry-D4ug2PTD.js +1 -0
- package/dist/assets/vega-counter-badge.entry-BW_zAciV.js +1 -0
- package/dist/assets/vega-date-picker_2.entry-CAk2ZvQC.js +4 -0
- package/dist/assets/vega-dialog_2.entry-BrWAWuH-.js +1 -0
- package/dist/assets/vega-divider.entry-C4hdehoc.js +1 -0
- package/dist/assets/vega-dropdown_5.entry-BX3pQZ88.js +1 -0
- package/dist/assets/vega-field-error.entry-sTqISZIh.js +1 -0
- package/dist/assets/vega-field-label.entry-B__dQ20F.js +1 -0
- package/dist/assets/vega-file-uploader.entry-CO-VykBt.js +1 -0
- package/dist/assets/vega-flag-icon.entry-DxPXoyZ_.js +1 -0
- package/dist/assets/vega-flex.entry-668-6FhU.js +1 -0
- package/dist/assets/vega-font.entry-DcCrpbh1.js +1 -0
- package/dist/assets/vega-form.entry-BY-iqkFc.js +1 -0
- package/dist/assets/vega-grid.entry-Dm_eAuM6.js +1 -0
- package/dist/assets/vega-hint.entry-w8vfPncB.js +1 -0
- package/dist/assets/vega-icon.entry-D0_veR1Z.js +19 -0
- package/dist/assets/vega-image-uploader.entry-C1ApH3Dq.js +1 -0
- package/dist/assets/vega-input-credit-card.entry-dGTMeBXb.js +1 -0
- package/dist/assets/vega-input-numeric.entry-DbKsmljR.js +1 -0
- package/dist/assets/vega-input-passcode.entry-AxuvDAd-.js +1 -0
- package/dist/assets/vega-input-phone-number.entry-BiiZYFI1.js +1 -0
- package/dist/assets/vega-input-range.entry-DGIIQve0.js +1 -0
- package/dist/assets/vega-input-select.entry-nlgDZyki.js +1 -0
- package/dist/assets/vega-input.entry-BtU6J85I.js +1 -0
- package/dist/assets/vega-item-toggle.entry-CAUYBFcM.js +1 -0
- package/dist/assets/vega-left-nav_5.entry-DDK5HUna.js +1 -0
- package/dist/assets/vega-line-chart.entry-CyhXfR8n.js +1 -0
- package/dist/assets/vega-loader-wrapper_2.entry-DOe-Q5fc.js +1 -0
- package/dist/assets/vega-page-notification_2.entry-DjquyS0N.js +1 -0
- package/dist/assets/vega-pagination-page-selector-mobile.entry-BDFn5APr.js +1 -0
- package/dist/assets/vega-pagination-page-size-selector-mobile.entry-VDwjbmBP.js +1 -0
- package/dist/assets/vega-pagination.entry-T9P8GzDt.js +1 -0
- package/dist/assets/vega-pie-chart.entry-DXqyhKag.js +1 -0
- package/dist/assets/vega-popover_2.entry-CUnGGq6S.js +1 -0
- package/dist/assets/vega-progress-tracker_2.entry-BN8MMnIz.js +1 -0
- package/dist/assets/vega-radio_2.entry-D3q0-wxn.js +1 -0
- package/dist/assets/vega-rich-text-content.entry-C0oUM9kr.js +3 -0
- package/dist/assets/vega-rich-text-editor_4.entry-CIo_VUmI.js +10 -0
- package/dist/assets/vega-rich-text-special-characters-panel.entry-DGrfdbvp.js +1 -0
- package/dist/assets/vega-rich-text-table-properties_3.entry-D6KltaW8.js +1 -0
- package/dist/assets/vega-section-title.entry-DMRteeP5.js +1 -0
- package/dist/assets/vega-segment-control.entry-BwMgjNjf.js +1 -0
- package/dist/assets/vega-selection-chip_2.entry-BzfGr-t3.js +1 -0
- package/dist/assets/vega-selection-tile_2.entry-D0Rj0qTo.js +1 -0
- package/dist/assets/vega-sidenav_3.entry-CoM3yggu.js +1 -0
- package/dist/assets/vega-signature-capture.entry-DiooBJdu.js +1 -0
- package/dist/assets/vega-skeleton.entry-G3BcZuxx.js +1 -0
- package/dist/assets/vega-slot-container.entry-CJ33BQ0e.js +1 -0
- package/dist/assets/vega-stepper.entry-BrHGbs7A.js +1 -0
- package/dist/assets/vega-tab-group_2.entry-BUeLgXca.js +1 -0
- package/dist/assets/vega-table_11.entry-4Qi4DN0-.js +1 -0
- package/dist/assets/vega-text.entry-BbuifURi.js +1 -0
- package/dist/assets/vega-textarea.entry-62v-CMjF.js +1 -0
- package/dist/assets/vega-time-picker_2.entry-DpI-krpy.js +1 -0
- package/dist/assets/vega-toggle-switch.entry-Dw9nwAY4.js +1 -0
- package/dist/assets/vega-tooltip_2.entry-CL3u7qCj.js +1 -0
- package/dist/assets/video-BNtpQqFj.svg +1 -0
- package/dist/assets/wait-for-component-did-render-b378bf16-B6sxiKZd.js +1 -0
- package/dist/assets/y-axis-input-processor-c7e05353-ChGpmgoo.js +1 -0
- package/dist/assets/zip-B6t6sldd.svg +1 -0
- package/dist/coi-serviceworker.js +2 -0
- package/dist/index.html +21 -0
- package/package.json +34 -0
|
@@ -0,0 +1,669 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vega-accordion.entry-CfEINT7F.js","./placeholder-bf562081-D8zcyDHt.js","./component-usage-runtime-metrics-4b1afd04-D5yBE3LX.js","./component-7d906393-CRgivpmK.js","./design-token-0a575bf2-PUb6fp1k.js","./responsive-format-facade-51c0c2e1-CSNTrSBX.js","./array-7888f339-BUzRhXHn.js","./state-border-formatter-50394e9c-ByDMiCxI.js","./chevron-up-b1989751-Bfzxj3jY.js","./chevron-down-4a75d28e-CQKZrHY1.js","./event-emit-slimmer-3eb4d8ad-Ctlccsem.js","./translation-slimmer-7f195ba8-B5rGwI39.js","./vega-app-footer.entry-dxKlVGHF.js","./brand-switch-state-controller-slimmer-9ca03c81-D2Iufq0G.js","./vega-app-header-button.entry-BqvJf9ih.js","./child-nodes-event-prevent-slimmer-1e3ac106-DA54t1iv.js","./aria-attributes-value-mapper-2c632641-BA3SU8ke.js","./mutation-observer-slimmer-58ebc13c-m99uIPjN.js","./vega-backdrop.entry-zvDuVOIm.js","./vega-box.entry-CKRpS_7q.js","./style-formatter-c20c1988-CFX-tZPv.js","./vega-flex.entry-668-6FhU.js","./vega-grid.entry-Dm_eAuM6.js","./vega-breadcrumb.entry-Bi43hitV.js","./component-global-style-slimmer-ac703085-BrAKY3hJ.js","./vega-button.entry-D3XB1oFN.js","./vega-button-circle.entry-Q2J7n2u7.js","./vega-button-link.entry-DMdYQDOf.js","./vega-card.entry-C2ddJjpk.js","./vega-carousel.entry-DGpl69kz.js","./synchronize-task-queue-ac8acc3b-Zj5FaVSX.js","./accessibility-6af5cf2e-XlEB_Jt7.js","./effect-f50e072d-BVwAMfLb.js","./deprecated-property-slimmer-ea34fa7b-DPzyydTv.js","./vega-line-chart.entry-CyhXfR8n.js","./legend-input-processor-122008c5-XSunuE2s.js","./y-axis-input-processor-c7e05353-ChGpmgoo.js","./vega-bar-chart.entry-CkwKn-ae.js","./vega-pie-chart.entry-DXqyhKag.js","./vega-chip.entry-Bp2Li7OI.js","./vega-counter-badge.entry-BW_zAciV.js","./vega-color-picker.entry-DMEFhqQB.js","./required-field-rule-ab4bdc47-BVWO4gts.js","./form-field-controller-slimmer-03894a51-CoAcSeLl.js","./mutation-observer-filters-1a054fb0-CJhfq3iU.js","./sub-state-observer-slimmer-d924288a-Dvj3sSUI.js","./vega-combo-box.entry-D4ug2PTD.js","./keyboard-manager-slimmer-c8fcfe60-CN3LeBJZ.js","./keyboard-manager-404b9c17-BrcyLUZb.js","./vega-field-error.entry-sTqISZIh.js","./vega-field-label.entry-B__dQ20F.js","./vega-font.entry-DcCrpbh1.js","./component-load-required-db42032a-Di7iuaem.js","./vega-form.entry-BY-iqkFc.js","./sub-state-notify-slimmer-d5a21bb3-D4DqpbZp.js","./immutable-map-4fe22b11-DIPXISW1.js","./child-nodes-notify-observer-slimmer-499a3aa7-tNZc5byb.js","./vega-icon.entry-D0_veR1Z.js","./vega-flag-icon.entry-DxPXoyZ_.js","./vega-image-uploader.entry-C1ApH3Dq.js","./drop-file-accept-filter-slimmer-ad759e4a-DTuTuRV0.js","./dark-mode-state-controller-slimmer-778dd929-DdCZ4Jof.js","./vega-input-credit-card.entry-dGTMeBXb.js","./string-mask-strategy-87efdb9e-yW6x2ZjX.js","./string-format-strategy.abstract-de17b899-BAoFnBxC.js","./vega-input-select.entry-nlgDZyki.js","./vega-input.entry-BtU6J85I.js","./min-number-rule-2f1cfbf9-CWIvZYfA.js","./min-string-length-rule-c31c89f4-BTY-3yJy.js","./string-input-formatter-slimmer-c3d483ef-D4FEqo9Z.js","./wait-for-component-did-render-b378bf16-B6sxiKZd.js","./click-outside-only-to-dismiss-strategy-3d286c1b-Bt4qXmzF.js","./vega-item-toggle.entry-CAUYBFcM.js","./vega-pagination.entry-T9P8GzDt.js","./page-size-option-utils-50afc81a-BpAIWejs.js","./vega-pagination-page-selector-mobile.entry-BDFn5APr.js","./vega-pagination-page-size-selector-mobile.entry-VDwjbmBP.js","./vega-slot-container.entry-CJ33BQ0e.js","./vega-stepper.entry-BrHGbs7A.js","./vega-segment-control.entry-BwMgjNjf.js","./vega-text.entry-BbuifURi.js","./vega-textarea.entry-62v-CMjF.js","./vega-toggle-switch.entry-Dw9nwAY4.js","./toggle-switch-required-rule-b3cf4302-BAn2CJUG.js","./vega-section-title.entry-DMRteeP5.js","./vega-input-range.entry-DGIIQve0.js","./input-range-required-rule-3ad74776-B7PLb3FQ.js","./vega-banner.entry-BP5KtjWa.js","./vega-divider.entry-C4hdehoc.js","./vega-skeleton.entry-G3BcZuxx.js","./vega-input-phone-number.entry-BiiZYFI1.js","./input-phone-number-required-rule-be6a5572-Cwd2Hv4V.js","./vega-signature-capture.entry-DiooBJdu.js","./vega-hint.entry-w8vfPncB.js","./vega-file-uploader.entry-CO-VykBt.js","./trash-can-8819a939-BMBO4L_u.js","./file-uploader-required-rule-ad886d01-BSSsG3dt.js","./vega-input-numeric.entry-DbKsmljR.js","./vega-rich-text-special-characters-panel.entry-DGrfdbvp.js","./vega-rich-text-content.entry-C0oUM9kr.js","./image-annotation-action-e8ab7b64-KPj0aQNC.js","./vega-brand-logo.entry-D55jTPdD.js","./vega-code-block.entry-DKuulw1O.js","./component-value-history-controller-slimmer.abstract-21e9126a-B95QIB1M.js","./auto-run-when-re-render-task-queue-slimmer.abstract-27820d4c-DrPRo97a.js","./vega-input-passcode.entry-AxuvDAd-.js","./vega-color-swatch.entry-DcQLUHHI.js","./vega-color-swatch-picker.entry-CD1Epzrl.js","./vega-checkbox_2.entry-C21WN-0W.js","./check-box-required-rule-cb0aa339-B8GrMHqP.js","./vega-date-picker_2.entry-CAk2ZvQC.js","./date-required-rule-d6ce832c-CEFLpidy.js","./element-appender-slimmer-44bbb5c6-BvVikV-9.js","./aria-dialog-focusable-trap-slimmer-7db3d5a7-Cx8CJUcp.js","./month-view-generator-d341fa5a-IIor3YXJ.js","./vega-dialog_2.entry-BrWAWuH-.js","./vega-page-notification_2.entry-DjquyS0N.js","./vega-loader-wrapper_2.entry-DOe-Q5fc.js","./vega-popover_2.entry-CUnGGq6S.js","./inject-keyboard-manager-e5874185-CNHbHoko.js","./vega-progress-tracker_2.entry-BN8MMnIz.js","./vega-radio_2.entry-D3q0-wxn.js","./vega-tab-group_2.entry-BUeLgXca.js","./vega-time-picker_2.entry-DpI-krpy.js","./time-required-rule-026c17a1-DhKBWnaH.js","./vega-tooltip_2.entry-CL3u7qCj.js","./vega-button-group_2.entry-CeqFPsfs.js","./vega-selection-tile_2.entry-D0Rj0qTo.js","./vega-selection-chip_2.entry-BzfGr-t3.js","./vega-sidenav_3.entry-CoM3yggu.js","./vega-rich-text-table-properties_3.entry-D6KltaW8.js","./align-left-7f959adf-BlPklVKE.js","./vega-calendar_4.entry-Cj_Aij7Z.js","./vega-rich-text-editor_4.entry-CIo_VUmI.js","./rich-text-editor-required-rule-cca16fd0-DCeA9od8.js","./vega-dropdown_5.entry-BX3pQZ88.js","./vega-left-nav_5.entry-DDK5HUna.js","./vega-table_11.entry-4Qi4DN0-.js","./public-rules-09387dcf-BYyE4A0Y.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var v3=Object.defineProperty;var _3=(r,e,t)=>e in r?v3(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Be=(r,e,t)=>_3(r,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function y3(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Dm={exports:{}},wd={},Nm={exports:{}},ge={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var el=Symbol.for("react.element"),b3=Symbol.for("react.portal"),w3=Symbol.for("react.fragment"),S3=Symbol.for("react.strict_mode"),C3=Symbol.for("react.profiler"),E3=Symbol.for("react.provider"),x3=Symbol.for("react.context"),T3=Symbol.for("react.forward_ref"),k3=Symbol.for("react.suspense"),L3=Symbol.for("react.memo"),A3=Symbol.for("react.lazy"),Kg=Symbol.iterator;function R3(r){return r===null||typeof r!="object"?null:(r=Kg&&r[Kg]||r["@@iterator"],typeof r=="function"?r:null)}var Im={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Bm=Object.assign,Mm={};function fo(r,e,t){this.props=r,this.context=e,this.refs=Mm,this.updater=t||Im}fo.prototype.isReactComponent={};fo.prototype.setState=function(r,e){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,e,"setState")};fo.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function Pm(){}Pm.prototype=fo.prototype;function Gf(r,e,t){this.props=r,this.context=e,this.refs=Mm,this.updater=t||Im}var Kf=Gf.prototype=new Pm;Kf.constructor=Gf;Bm(Kf,fo.prototype);Kf.isPureReactComponent=!0;var qg=Array.isArray,Fm=Object.prototype.hasOwnProperty,qf={current:null},Hm={key:!0,ref:!0,__self:!0,__source:!0};function jm(r,e,t){var n,i={},s=null,a=null;if(e!=null)for(n in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(s=""+e.key),e)Fm.call(e,n)&&!Hm.hasOwnProperty(n)&&(i[n]=e[n]);var o=arguments.length-2;if(o===1)i.children=t;else if(1<o){for(var l=Array(o),c=0;c<o;c++)l[c]=arguments[c+2];i.children=l}if(r&&r.defaultProps)for(n in o=r.defaultProps,o)i[n]===void 0&&(i[n]=o[n]);return{$$typeof:el,type:r,key:s,ref:a,props:i,_owner:qf.current}}function O3(r,e){return{$$typeof:el,type:r.type,key:e,ref:r.ref,props:r.props,_owner:r._owner}}function Xf(r){return typeof r=="object"&&r!==null&&r.$$typeof===el}function D3(r){var e={"=":"=0",":":"=2"};return"$"+r.replace(/[=:]/g,function(t){return e[t]})}var Xg=/\/+/g;function _u(r,e){return typeof r=="object"&&r!==null&&r.key!=null?D3(""+r.key):e.toString(36)}function rc(r,e,t,n,i){var s=typeof r;(s==="undefined"||s==="boolean")&&(r=null);var a=!1;if(r===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(r.$$typeof){case el:case b3:a=!0}}if(a)return a=r,i=i(a),r=n===""?"."+_u(a,0):n,qg(i)?(t="",r!=null&&(t=r.replace(Xg,"$&/")+"/"),rc(i,e,t,"",function(c){return c})):i!=null&&(Xf(i)&&(i=O3(i,t+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Xg,"$&/")+"/")+r)),e.push(i)),1;if(a=0,n=n===""?".":n+":",qg(r))for(var o=0;o<r.length;o++){s=r[o];var l=n+_u(s,o);a+=rc(s,e,t,l,i)}else if(l=R3(r),typeof l=="function")for(r=l.call(r),o=0;!(s=r.next()).done;)s=s.value,l=n+_u(s,o++),a+=rc(s,e,t,l,i);else if(s==="object")throw e=String(r),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function Sl(r,e,t){if(r==null)return r;var n=[],i=0;return rc(r,n,"","",function(s){return e.call(t,s,i++)}),n}function N3(r){if(r._status===-1){var e=r._result;e=e(),e.then(function(t){(r._status===0||r._status===-1)&&(r._status=1,r._result=t)},function(t){(r._status===0||r._status===-1)&&(r._status=2,r._result=t)}),r._status===-1&&(r._status=0,r._result=e)}if(r._status===1)return r._result.default;throw r._result}var Qt={current:null},nc={transition:null},I3={ReactCurrentDispatcher:Qt,ReactCurrentBatchConfig:nc,ReactCurrentOwner:qf};function $m(){throw Error("act(...) is not supported in production builds of React.")}ge.Children={map:Sl,forEach:function(r,e,t){Sl(r,function(){e.apply(this,arguments)},t)},count:function(r){var e=0;return Sl(r,function(){e++}),e},toArray:function(r){return Sl(r,function(e){return e})||[]},only:function(r){if(!Xf(r))throw Error("React.Children.only expected to receive a single React element child.");return r}};ge.Component=fo;ge.Fragment=w3;ge.Profiler=C3;ge.PureComponent=Gf;ge.StrictMode=S3;ge.Suspense=k3;ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I3;ge.act=$m;ge.cloneElement=function(r,e,t){if(r==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+r+".");var n=Bm({},r.props),i=r.key,s=r.ref,a=r._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,a=qf.current),e.key!==void 0&&(i=""+e.key),r.type&&r.type.defaultProps)var o=r.type.defaultProps;for(l in e)Fm.call(e,l)&&!Hm.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&o!==void 0?o[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=t;else if(1<l){o=Array(l);for(var c=0;c<l;c++)o[c]=arguments[c+2];n.children=o}return{$$typeof:el,type:r.type,key:i,ref:s,props:n,_owner:a}};ge.createContext=function(r){return r={$$typeof:x3,_currentValue:r,_currentValue2:r,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},r.Provider={$$typeof:E3,_context:r},r.Consumer=r};ge.createElement=jm;ge.createFactory=function(r){var e=jm.bind(null,r);return e.type=r,e};ge.createRef=function(){return{current:null}};ge.forwardRef=function(r){return{$$typeof:T3,render:r}};ge.isValidElement=Xf;ge.lazy=function(r){return{$$typeof:A3,_payload:{_status:-1,_result:r},_init:N3}};ge.memo=function(r,e){return{$$typeof:L3,type:r,compare:e===void 0?null:e}};ge.startTransition=function(r){var e=nc.transition;nc.transition={};try{r()}finally{nc.transition=e}};ge.unstable_act=$m;ge.useCallback=function(r,e){return Qt.current.useCallback(r,e)};ge.useContext=function(r){return Qt.current.useContext(r)};ge.useDebugValue=function(){};ge.useDeferredValue=function(r){return Qt.current.useDeferredValue(r)};ge.useEffect=function(r,e){return Qt.current.useEffect(r,e)};ge.useId=function(){return Qt.current.useId()};ge.useImperativeHandle=function(r,e,t){return Qt.current.useImperativeHandle(r,e,t)};ge.useInsertionEffect=function(r,e){return Qt.current.useInsertionEffect(r,e)};ge.useLayoutEffect=function(r,e){return Qt.current.useLayoutEffect(r,e)};ge.useMemo=function(r,e){return Qt.current.useMemo(r,e)};ge.useReducer=function(r,e,t){return Qt.current.useReducer(r,e,t)};ge.useRef=function(r){return Qt.current.useRef(r)};ge.useState=function(r){return Qt.current.useState(r)};ge.useSyncExternalStore=function(r,e,t){return Qt.current.useSyncExternalStore(r,e,t)};ge.useTransition=function(){return Qt.current.useTransition()};ge.version="18.3.1";Nm.exports=ge;var j=Nm.exports;const js=y3(j);/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var B3=j,M3=Symbol.for("react.element"),P3=Symbol.for("react.fragment"),F3=Object.prototype.hasOwnProperty,H3=B3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j3={key:!0,ref:!0,__self:!0,__source:!0};function Vm(r,e,t){var n,i={},s=null,a=null;t!==void 0&&(s=""+t),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(a=e.ref);for(n in e)F3.call(e,n)&&!j3.hasOwnProperty(n)&&(i[n]=e[n]);if(r&&r.defaultProps)for(n in e=r.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:M3,type:r,key:s,ref:a,props:i,_owner:H3.current}}wd.Fragment=P3;wd.jsx=Vm;wd.jsxs=Vm;Dm.exports=wd;var M=Dm.exports,zm={exports:{}},kr={},Um={exports:{}},Wm={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/(function(r){function e(T,R){var O=T.length;T.push(R);e:for(;0<O;){var I=O-1>>>1,$=T[I];if(0<i($,R))T[I]=R,T[O]=$,O=I;else break e}}function t(T){return T.length===0?null:T[0]}function n(T){if(T.length===0)return null;var R=T[0],O=T.pop();if(O!==R){T[0]=O;e:for(var I=0,$=T.length,V=$>>>1;I<V;){var U=2*(I+1)-1,G=T[U],le=U+1,D=T[le];if(0>i(G,O))le<$&&0>i(D,G)?(T[I]=D,T[le]=O,I=le):(T[I]=G,T[U]=O,I=U);else if(le<$&&0>i(D,O))T[I]=D,T[le]=O,I=le;else break e}}return R}function i(T,R){var O=T.sortIndex-R.sortIndex;return O!==0?O:T.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;r.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();r.unstable_now=function(){return a.now()-o}}var l=[],c=[],u=1,d=null,g=3,_=!1,y=!1,b=!1,p=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(T){for(var R=t(c);R!==null;){if(R.callback===null)n(c);else if(R.startTime<=T)n(c),R.sortIndex=R.expirationTime,e(l,R);else break;R=t(c)}}function v(T){if(b=!1,m(T),!y)if(t(l)!==null)y=!0,F(w);else{var R=t(c);R!==null&&H(v,R.startTime-T)}}function w(T,R){y=!1,b&&(b=!1,f(S),S=-1),_=!0;var O=g;try{for(m(R),d=t(l);d!==null&&(!(d.expirationTime>R)||T&&!P());){var I=d.callback;if(typeof I=="function"){d.callback=null,g=d.priorityLevel;var $=I(d.expirationTime<=R);R=r.unstable_now(),typeof $=="function"?d.callback=$:d===t(l)&&n(l),m(R)}else n(l);d=t(l)}if(d!==null)var V=!0;else{var U=t(c);U!==null&&H(v,U.startTime-R),V=!1}return V}finally{d=null,g=O,_=!1}}var C=!1,E=null,S=-1,x=5,L=-1;function P(){return!(r.unstable_now()-L<x)}function A(){if(E!==null){var T=r.unstable_now();L=T;var R=!0;try{R=E(!0,T)}finally{R?k():(C=!1,E=null)}}else C=!1}var k;if(typeof h=="function")k=function(){h(A)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,N=B.port2;B.port1.onmessage=A,k=function(){N.postMessage(null)}}else k=function(){p(A,0)};function F(T){E=T,C||(C=!0,k())}function H(T,R){S=p(function(){T(r.unstable_now())},R)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(T){T.callback=null},r.unstable_continueExecution=function(){y||_||(y=!0,F(w))},r.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<T?Math.floor(1e3/T):5},r.unstable_getCurrentPriorityLevel=function(){return g},r.unstable_getFirstCallbackNode=function(){return t(l)},r.unstable_next=function(T){switch(g){case 1:case 2:case 3:var R=3;break;default:R=g}var O=g;g=R;try{return T()}finally{g=O}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(T,R){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var O=g;g=T;try{return R()}finally{g=O}},r.unstable_scheduleCallback=function(T,R,O){var I=r.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?I+O:I):O=I,T){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=O+$,T={id:u++,callback:R,priorityLevel:T,startTime:O,expirationTime:$,sortIndex:-1},O>I?(T.sortIndex=O,e(c,T),t(l)===null&&T===t(c)&&(b?(f(S),S=-1):b=!0,H(v,O-I))):(T.sortIndex=$,e(l,T),y||_||(y=!0,F(w))),T},r.unstable_shouldYield=P,r.unstable_wrapCallback=function(T){var R=g;return function(){var O=g;g=R;try{return T.apply(this,arguments)}finally{g=O}}}})(Wm);Um.exports=Wm;var $3=Um.exports;/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var V3=j,xr=$3;function X(r){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+r,t=1;t<arguments.length;t++)e+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+r+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Gm=new Set,fa={};function ds(r,e){Zs(r,e),Zs(r+"Capture",e)}function Zs(r,e){for(fa[r]=e,r=0;r<e.length;r++)Gm.add(e[r])}var Fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ch=Object.prototype.hasOwnProperty,z3=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Zg={},Yg={};function U3(r){return Ch.call(Yg,r)?!0:Ch.call(Zg,r)?!1:z3.test(r)?Yg[r]=!0:(Zg[r]=!0,!1)}function W3(r,e,t,n){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:t!==null?!t.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function G3(r,e,t,n){if(e===null||typeof e>"u"||W3(r,e,t,n))return!0;if(n)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function er(r,e,t,n,i,s,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=t,this.propertyName=r,this.type=e,this.sanitizeURL=s,this.removeEmptyString=a}var It={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){It[r]=new er(r,0,!1,r,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var e=r[0];It[e]=new er(e,1,!1,r[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(r){It[r]=new er(r,2,!1,r.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){It[r]=new er(r,2,!1,r,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){It[r]=new er(r,3,!1,r.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(r){It[r]=new er(r,3,!0,r,null,!1,!1)});["capture","download"].forEach(function(r){It[r]=new er(r,4,!1,r,null,!1,!1)});["cols","rows","size","span"].forEach(function(r){It[r]=new er(r,6,!1,r,null,!1,!1)});["rowSpan","start"].forEach(function(r){It[r]=new er(r,5,!1,r.toLowerCase(),null,!1,!1)});var Zf=/[\-:]([a-z])/g;function Yf(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var e=r.replace(Zf,Yf);It[e]=new er(e,1,!1,r,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var e=r.replace(Zf,Yf);It[e]=new er(e,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(r){var e=r.replace(Zf,Yf);It[e]=new er(e,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(r){It[r]=new er(r,1,!1,r.toLowerCase(),null,!1,!1)});It.xlinkHref=new er("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(r){It[r]=new er(r,1,!1,r.toLowerCase(),null,!0,!0)});function Jf(r,e,t,n){var i=It.hasOwnProperty(e)?It[e]:null;(i!==null?i.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(G3(e,t,i,n)&&(t=null),n||i===null?U3(e)&&(t===null?r.removeAttribute(e):r.setAttribute(e,""+t)):i.mustUseProperty?r[i.propertyName]=t===null?i.type===3?!1:"":t:(e=i.attributeName,n=i.attributeNamespace,t===null?r.removeAttribute(e):(i=i.type,t=i===3||i===4&&t===!0?"":""+t,n?r.setAttributeNS(n,e,t):r.setAttribute(e,t))))}var Kn=V3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Cl=Symbol.for("react.element"),Es=Symbol.for("react.portal"),xs=Symbol.for("react.fragment"),Qf=Symbol.for("react.strict_mode"),Eh=Symbol.for("react.profiler"),Km=Symbol.for("react.provider"),qm=Symbol.for("react.context"),ep=Symbol.for("react.forward_ref"),xh=Symbol.for("react.suspense"),Th=Symbol.for("react.suspense_list"),tp=Symbol.for("react.memo"),Qn=Symbol.for("react.lazy"),Xm=Symbol.for("react.offscreen"),Jg=Symbol.iterator;function ko(r){return r===null||typeof r!="object"?null:(r=Jg&&r[Jg]||r["@@iterator"],typeof r=="function"?r:null)}var et=Object.assign,yu;function $o(r){if(yu===void 0)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);yu=e&&e[1]||""}return`
|
|
35
|
+
`+yu+r}var bu=!1;function wu(r,e){if(!r||bu)return"";bu=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var n=c}Reflect.construct(r,[],e)}else{try{e.call()}catch(c){n=c}r.call(e.prototype)}else{try{throw Error()}catch(c){n=c}r()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
|
36
|
+
`),s=n.stack.split(`
|
|
37
|
+
`),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(a!==1||o!==1)do if(a--,o--,0>o||i[a]!==s[o]){var l=`
|
|
38
|
+
`+i[a].replace(" at new "," at ");return r.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",r.displayName)),l}while(1<=a&&0<=o);break}}}finally{bu=!1,Error.prepareStackTrace=t}return(r=r?r.displayName||r.name:"")?$o(r):""}function K3(r){switch(r.tag){case 5:return $o(r.type);case 16:return $o("Lazy");case 13:return $o("Suspense");case 19:return $o("SuspenseList");case 0:case 2:case 15:return r=wu(r.type,!1),r;case 11:return r=wu(r.type.render,!1),r;case 1:return r=wu(r.type,!0),r;default:return""}}function kh(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case xs:return"Fragment";case Es:return"Portal";case Eh:return"Profiler";case Qf:return"StrictMode";case xh:return"Suspense";case Th:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case qm:return(r.displayName||"Context")+".Consumer";case Km:return(r._context.displayName||"Context")+".Provider";case ep:var e=r.render;return r=r.displayName,r||(r=e.displayName||e.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case tp:return e=r.displayName||null,e!==null?e:kh(r.type)||"Memo";case Qn:e=r._payload,r=r._init;try{return kh(r(e))}catch{}}return null}function q3(r){var e=r.type;switch(r.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=e.render,r=r.displayName||r.name||"",e.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return kh(e);case 8:return e===Qf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Si(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Zm(r){var e=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function X3(r){var e=Zm(r)?"checked":"value",t=Object.getOwnPropertyDescriptor(r.constructor.prototype,e),n=""+r[e];if(!r.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var i=t.get,s=t.set;return Object.defineProperty(r,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,s.call(this,a)}}),Object.defineProperty(r,e,{enumerable:t.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){r._valueTracker=null,delete r[e]}}}}function El(r){r._valueTracker||(r._valueTracker=X3(r))}function Ym(r){if(!r)return!1;var e=r._valueTracker;if(!e)return!0;var t=e.getValue(),n="";return r&&(n=Zm(r)?r.checked?"true":"false":r.value),r=n,r!==t?(e.setValue(r),!0):!1}function xc(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Lh(r,e){var t=e.checked;return et({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??r._wrapperState.initialChecked})}function Qg(r,e){var t=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;t=Si(e.value!=null?e.value:t),r._wrapperState={initialChecked:n,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Jm(r,e){e=e.checked,e!=null&&Jf(r,"checked",e,!1)}function Ah(r,e){Jm(r,e);var t=Si(e.value),n=e.type;if(t!=null)n==="number"?(t===0&&r.value===""||r.value!=t)&&(r.value=""+t):r.value!==""+t&&(r.value=""+t);else if(n==="submit"||n==="reset"){r.removeAttribute("value");return}e.hasOwnProperty("value")?Rh(r,e.type,t):e.hasOwnProperty("defaultValue")&&Rh(r,e.type,Si(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(r.defaultChecked=!!e.defaultChecked)}function e1(r,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+r._wrapperState.initialValue,t||e===r.value||(r.value=e),r.defaultValue=e}t=r.name,t!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,t!==""&&(r.name=t)}function Rh(r,e,t){(e!=="number"||xc(r.ownerDocument)!==r)&&(t==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+t&&(r.defaultValue=""+t))}var Vo=Array.isArray;function $s(r,e,t,n){if(r=r.options,e){e={};for(var i=0;i<t.length;i++)e["$"+t[i]]=!0;for(t=0;t<r.length;t++)i=e.hasOwnProperty("$"+r[t].value),r[t].selected!==i&&(r[t].selected=i),i&&n&&(r[t].defaultSelected=!0)}else{for(t=""+Si(t),e=null,i=0;i<r.length;i++){if(r[i].value===t){r[i].selected=!0,n&&(r[i].defaultSelected=!0);return}e!==null||r[i].disabled||(e=r[i])}e!==null&&(e.selected=!0)}}function Oh(r,e){if(e.dangerouslySetInnerHTML!=null)throw Error(X(91));return et({},e,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function t1(r,e){var t=e.value;if(t==null){if(t=e.children,e=e.defaultValue,t!=null){if(e!=null)throw Error(X(92));if(Vo(t)){if(1<t.length)throw Error(X(93));t=t[0]}e=t}e==null&&(e=""),t=e}r._wrapperState={initialValue:Si(t)}}function Qm(r,e){var t=Si(e.value),n=Si(e.defaultValue);t!=null&&(t=""+t,t!==r.value&&(r.value=t),e.defaultValue==null&&r.defaultValue!==t&&(r.defaultValue=t)),n!=null&&(r.defaultValue=""+n)}function r1(r){var e=r.textContent;e===r._wrapperState.initialValue&&e!==""&&e!==null&&(r.value=e)}function ev(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Dh(r,e){return r==null||r==="http://www.w3.org/1999/xhtml"?ev(e):r==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var xl,tv=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,t,n,i){MSApp.execUnsafeLocalFunction(function(){return r(e,t,n,i)})}:r}(function(r,e){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=e;else{for(xl=xl||document.createElement("div"),xl.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=xl.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;e.firstChild;)r.appendChild(e.firstChild)}});function pa(r,e){if(e){var t=r.firstChild;if(t&&t===r.lastChild&&t.nodeType===3){t.nodeValue=e;return}}r.textContent=e}var Ko={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Z3=["Webkit","ms","Moz","O"];Object.keys(Ko).forEach(function(r){Z3.forEach(function(e){e=e+r.charAt(0).toUpperCase()+r.substring(1),Ko[e]=Ko[r]})});function rv(r,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||Ko.hasOwnProperty(r)&&Ko[r]?(""+e).trim():e+"px"}function nv(r,e){r=r.style;for(var t in e)if(e.hasOwnProperty(t)){var n=t.indexOf("--")===0,i=rv(t,e[t],n);t==="float"&&(t="cssFloat"),n?r.setProperty(t,i):r[t]=i}}var Y3=et({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Nh(r,e){if(e){if(Y3[r]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(X(137,r));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(X(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(X(61))}if(e.style!=null&&typeof e.style!="object")throw Error(X(62))}}function Ih(r,e){if(r.indexOf("-")===-1)return typeof e.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bh=null;function rp(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Mh=null,Vs=null,zs=null;function n1(r){if(r=nl(r)){if(typeof Mh!="function")throw Error(X(280));var e=r.stateNode;e&&(e=Td(e),Mh(r.stateNode,r.type,e))}}function iv(r){Vs?zs?zs.push(r):zs=[r]:Vs=r}function sv(){if(Vs){var r=Vs,e=zs;if(zs=Vs=null,n1(r),e)for(r=0;r<e.length;r++)n1(e[r])}}function ov(r,e){return r(e)}function av(){}var Su=!1;function lv(r,e,t){if(Su)return r(e,t);Su=!0;try{return ov(r,e,t)}finally{Su=!1,(Vs!==null||zs!==null)&&(av(),sv())}}function ga(r,e){var t=r.stateNode;if(t===null)return null;var n=Td(t);if(n===null)return null;t=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(r=r.type,n=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!n;break e;default:r=!1}if(r)return null;if(t&&typeof t!="function")throw Error(X(231,e,typeof t));return t}var Ph=!1;if(Fn)try{var Lo={};Object.defineProperty(Lo,"passive",{get:function(){Ph=!0}}),window.addEventListener("test",Lo,Lo),window.removeEventListener("test",Lo,Lo)}catch{Ph=!1}function J3(r,e,t,n,i,s,a,o,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(t,c)}catch(u){this.onError(u)}}var qo=!1,Tc=null,kc=!1,Fh=null,Q3={onError:function(r){qo=!0,Tc=r}};function ew(r,e,t,n,i,s,a,o,l){qo=!1,Tc=null,J3.apply(Q3,arguments)}function tw(r,e,t,n,i,s,a,o,l){if(ew.apply(this,arguments),qo){if(qo){var c=Tc;qo=!1,Tc=null}else throw Error(X(198));kc||(kc=!0,Fh=c)}}function us(r){var e=r,t=r;if(r.alternate)for(;e.return;)e=e.return;else{r=e;do e=r,e.flags&4098&&(t=e.return),r=e.return;while(r)}return e.tag===3?t:null}function cv(r){if(r.tag===13){var e=r.memoizedState;if(e===null&&(r=r.alternate,r!==null&&(e=r.memoizedState)),e!==null)return e.dehydrated}return null}function i1(r){if(us(r)!==r)throw Error(X(188))}function rw(r){var e=r.alternate;if(!e){if(e=us(r),e===null)throw Error(X(188));return e!==r?null:r}for(var t=r,n=e;;){var i=t.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){t=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===t)return i1(i),r;if(s===n)return i1(i),e;s=s.sibling}throw Error(X(188))}if(t.return!==n.return)t=i,n=s;else{for(var a=!1,o=i.child;o;){if(o===t){a=!0,t=i,n=s;break}if(o===n){a=!0,n=i,t=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===t){a=!0,t=s,n=i;break}if(o===n){a=!0,n=s,t=i;break}o=o.sibling}if(!a)throw Error(X(189))}}if(t.alternate!==n)throw Error(X(190))}if(t.tag!==3)throw Error(X(188));return t.stateNode.current===t?r:e}function dv(r){return r=rw(r),r!==null?uv(r):null}function uv(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var e=uv(r);if(e!==null)return e;r=r.sibling}return null}var hv=xr.unstable_scheduleCallback,s1=xr.unstable_cancelCallback,nw=xr.unstable_shouldYield,iw=xr.unstable_requestPaint,lt=xr.unstable_now,sw=xr.unstable_getCurrentPriorityLevel,np=xr.unstable_ImmediatePriority,fv=xr.unstable_UserBlockingPriority,Lc=xr.unstable_NormalPriority,ow=xr.unstable_LowPriority,pv=xr.unstable_IdlePriority,Sd=null,mn=null;function aw(r){if(mn&&typeof mn.onCommitFiberRoot=="function")try{mn.onCommitFiberRoot(Sd,r,void 0,(r.current.flags&128)===128)}catch{}}var en=Math.clz32?Math.clz32:dw,lw=Math.log,cw=Math.LN2;function dw(r){return r>>>=0,r===0?32:31-(lw(r)/cw|0)|0}var Tl=64,kl=4194304;function zo(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Ac(r,e){var t=r.pendingLanes;if(t===0)return 0;var n=0,i=r.suspendedLanes,s=r.pingedLanes,a=t&268435455;if(a!==0){var o=a&~i;o!==0?n=zo(o):(s&=a,s!==0&&(n=zo(s)))}else a=t&~i,a!==0?n=zo(a):s!==0&&(n=zo(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=t&16),e=r.entangledLanes,e!==0)for(r=r.entanglements,e&=n;0<e;)t=31-en(e),i=1<<t,n|=r[t],e&=~i;return n}function uw(r,e){switch(r){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hw(r,e){for(var t=r.suspendedLanes,n=r.pingedLanes,i=r.expirationTimes,s=r.pendingLanes;0<s;){var a=31-en(s),o=1<<a,l=i[a];l===-1?(!(o&t)||o&n)&&(i[a]=uw(o,e)):l<=e&&(r.expiredLanes|=o),s&=~o}}function Hh(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function gv(){var r=Tl;return Tl<<=1,!(Tl&4194240)&&(Tl=64),r}function Cu(r){for(var e=[],t=0;31>t;t++)e.push(r);return e}function tl(r,e,t){r.pendingLanes|=e,e!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,e=31-en(e),r[e]=t}function fw(r,e){var t=r.pendingLanes&~e;r.pendingLanes=e,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=e,r.mutableReadLanes&=e,r.entangledLanes&=e,e=r.entanglements;var n=r.eventTimes;for(r=r.expirationTimes;0<t;){var i=31-en(t),s=1<<i;e[i]=0,n[i]=-1,r[i]=-1,t&=~s}}function ip(r,e){var t=r.entangledLanes|=e;for(r=r.entanglements;t;){var n=31-en(t),i=1<<n;i&e|r[n]&e&&(r[n]|=e),t&=~i}}var Ae=0;function mv(r){return r&=-r,1<r?4<r?r&268435455?16:536870912:4:1}var vv,sp,_v,yv,bv,jh=!1,Ll=[],ci=null,di=null,ui=null,ma=new Map,va=new Map,ni=[],pw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function o1(r,e){switch(r){case"focusin":case"focusout":ci=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":ui=null;break;case"pointerover":case"pointerout":ma.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":va.delete(e.pointerId)}}function Ao(r,e,t,n,i,s){return r===null||r.nativeEvent!==s?(r={blockedOn:e,domEventName:t,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},e!==null&&(e=nl(e),e!==null&&sp(e)),r):(r.eventSystemFlags|=n,e=r.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),r)}function gw(r,e,t,n,i){switch(e){case"focusin":return ci=Ao(ci,r,e,t,n,i),!0;case"dragenter":return di=Ao(di,r,e,t,n,i),!0;case"mouseover":return ui=Ao(ui,r,e,t,n,i),!0;case"pointerover":var s=i.pointerId;return ma.set(s,Ao(ma.get(s)||null,r,e,t,n,i)),!0;case"gotpointercapture":return s=i.pointerId,va.set(s,Ao(va.get(s)||null,r,e,t,n,i)),!0}return!1}function wv(r){var e=ji(r.target);if(e!==null){var t=us(e);if(t!==null){if(e=t.tag,e===13){if(e=cv(t),e!==null){r.blockedOn=e,bv(r.priority,function(){_v(t)});return}}else if(e===3&&t.stateNode.current.memoizedState.isDehydrated){r.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}r.blockedOn=null}function ic(r){if(r.blockedOn!==null)return!1;for(var e=r.targetContainers;0<e.length;){var t=$h(r.domEventName,r.eventSystemFlags,e[0],r.nativeEvent);if(t===null){t=r.nativeEvent;var n=new t.constructor(t.type,t);Bh=n,t.target.dispatchEvent(n),Bh=null}else return e=nl(t),e!==null&&sp(e),r.blockedOn=t,!1;e.shift()}return!0}function a1(r,e,t){ic(r)&&t.delete(e)}function mw(){jh=!1,ci!==null&&ic(ci)&&(ci=null),di!==null&&ic(di)&&(di=null),ui!==null&&ic(ui)&&(ui=null),ma.forEach(a1),va.forEach(a1)}function Ro(r,e){r.blockedOn===e&&(r.blockedOn=null,jh||(jh=!0,xr.unstable_scheduleCallback(xr.unstable_NormalPriority,mw)))}function _a(r){function e(i){return Ro(i,r)}if(0<Ll.length){Ro(Ll[0],r);for(var t=1;t<Ll.length;t++){var n=Ll[t];n.blockedOn===r&&(n.blockedOn=null)}}for(ci!==null&&Ro(ci,r),di!==null&&Ro(di,r),ui!==null&&Ro(ui,r),ma.forEach(e),va.forEach(e),t=0;t<ni.length;t++)n=ni[t],n.blockedOn===r&&(n.blockedOn=null);for(;0<ni.length&&(t=ni[0],t.blockedOn===null);)wv(t),t.blockedOn===null&&ni.shift()}var Us=Kn.ReactCurrentBatchConfig,Rc=!0;function vw(r,e,t,n){var i=Ae,s=Us.transition;Us.transition=null;try{Ae=1,op(r,e,t,n)}finally{Ae=i,Us.transition=s}}function _w(r,e,t,n){var i=Ae,s=Us.transition;Us.transition=null;try{Ae=4,op(r,e,t,n)}finally{Ae=i,Us.transition=s}}function op(r,e,t,n){if(Rc){var i=$h(r,e,t,n);if(i===null)Nu(r,e,n,Oc,t),o1(r,n);else if(gw(i,r,e,t,n))n.stopPropagation();else if(o1(r,n),e&4&&-1<pw.indexOf(r)){for(;i!==null;){var s=nl(i);if(s!==null&&vv(s),s=$h(r,e,t,n),s===null&&Nu(r,e,n,Oc,t),s===i)break;i=s}i!==null&&n.stopPropagation()}else Nu(r,e,n,null,t)}}var Oc=null;function $h(r,e,t,n){if(Oc=null,r=rp(n),r=ji(r),r!==null)if(e=us(r),e===null)r=null;else if(t=e.tag,t===13){if(r=cv(e),r!==null)return r;r=null}else if(t===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;r=null}else e!==r&&(r=null);return Oc=r,null}function Sv(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(sw()){case np:return 1;case fv:return 4;case Lc:case ow:return 16;case pv:return 536870912;default:return 16}default:return 16}}var oi=null,ap=null,sc=null;function Cv(){if(sc)return sc;var r,e=ap,t=e.length,n,i="value"in oi?oi.value:oi.textContent,s=i.length;for(r=0;r<t&&e[r]===i[r];r++);var a=t-r;for(n=1;n<=a&&e[t-n]===i[s-n];n++);return sc=i.slice(r,1<n?1-n:void 0)}function oc(r){var e=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&e===13&&(r=13)):r=e,r===10&&(r=13),32<=r||r===13?r:0}function Al(){return!0}function l1(){return!1}function Lr(r){function e(t,n,i,s,a){this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in r)r.hasOwnProperty(o)&&(t=r[o],this[o]=t?t(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Al:l1,this.isPropagationStopped=l1,this}return et(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():typeof t.returnValue!="unknown"&&(t.returnValue=!1),this.isDefaultPrevented=Al)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=Al)},persist:function(){},isPersistent:Al}),e}var po={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lp=Lr(po),rl=et({},po,{view:0,detail:0}),yw=Lr(rl),Eu,xu,Oo,Cd=et({},rl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cp,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Oo&&(Oo&&r.type==="mousemove"?(Eu=r.screenX-Oo.screenX,xu=r.screenY-Oo.screenY):xu=Eu=0,Oo=r),Eu)},movementY:function(r){return"movementY"in r?r.movementY:xu}}),c1=Lr(Cd),bw=et({},Cd,{dataTransfer:0}),ww=Lr(bw),Sw=et({},rl,{relatedTarget:0}),Tu=Lr(Sw),Cw=et({},po,{animationName:0,elapsedTime:0,pseudoElement:0}),Ew=Lr(Cw),xw=et({},po,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Tw=Lr(xw),kw=et({},po,{data:0}),d1=Lr(kw),Lw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Aw={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Rw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ow(r){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(r):(r=Rw[r])?!!e[r]:!1}function cp(){return Ow}var Dw=et({},rl,{key:function(r){if(r.key){var e=Lw[r.key]||r.key;if(e!=="Unidentified")return e}return r.type==="keypress"?(r=oc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Aw[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cp,charCode:function(r){return r.type==="keypress"?oc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?oc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),Nw=Lr(Dw),Iw=et({},Cd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),u1=Lr(Iw),Bw=et({},rl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cp}),Mw=Lr(Bw),Pw=et({},po,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fw=Lr(Pw),Hw=et({},Cd,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),jw=Lr(Hw),$w=[9,13,27,32],dp=Fn&&"CompositionEvent"in window,Xo=null;Fn&&"documentMode"in document&&(Xo=document.documentMode);var Vw=Fn&&"TextEvent"in window&&!Xo,Ev=Fn&&(!dp||Xo&&8<Xo&&11>=Xo),h1=" ",f1=!1;function xv(r,e){switch(r){case"keyup":return $w.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tv(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ts=!1;function zw(r,e){switch(r){case"compositionend":return Tv(e);case"keypress":return e.which!==32?null:(f1=!0,h1);case"textInput":return r=e.data,r===h1&&f1?null:r;default:return null}}function Uw(r,e){if(Ts)return r==="compositionend"||!dp&&xv(r,e)?(r=Cv(),sc=ap=oi=null,Ts=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Ev&&e.locale!=="ko"?null:e.data;default:return null}}var Ww={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function p1(r){var e=r&&r.nodeName&&r.nodeName.toLowerCase();return e==="input"?!!Ww[r.type]:e==="textarea"}function kv(r,e,t,n){iv(n),e=Dc(e,"onChange"),0<e.length&&(t=new lp("onChange","change",null,t,n),r.push({event:t,listeners:e}))}var Zo=null,ya=null;function Gw(r){Fv(r,0)}function Ed(r){var e=As(r);if(Ym(e))return r}function Kw(r,e){if(r==="change")return e}var Lv=!1;if(Fn){var ku;if(Fn){var Lu="oninput"in document;if(!Lu){var g1=document.createElement("div");g1.setAttribute("oninput","return;"),Lu=typeof g1.oninput=="function"}ku=Lu}else ku=!1;Lv=ku&&(!document.documentMode||9<document.documentMode)}function m1(){Zo&&(Zo.detachEvent("onpropertychange",Av),ya=Zo=null)}function Av(r){if(r.propertyName==="value"&&Ed(ya)){var e=[];kv(e,ya,r,rp(r)),lv(Gw,e)}}function qw(r,e,t){r==="focusin"?(m1(),Zo=e,ya=t,Zo.attachEvent("onpropertychange",Av)):r==="focusout"&&m1()}function Xw(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ed(ya)}function Zw(r,e){if(r==="click")return Ed(e)}function Yw(r,e){if(r==="input"||r==="change")return Ed(e)}function Jw(r,e){return r===e&&(r!==0||1/r===1/e)||r!==r&&e!==e}var on=typeof Object.is=="function"?Object.is:Jw;function ba(r,e){if(on(r,e))return!0;if(typeof r!="object"||r===null||typeof e!="object"||e===null)return!1;var t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;for(n=0;n<t.length;n++){var i=t[n];if(!Ch.call(e,i)||!on(r[i],e[i]))return!1}return!0}function v1(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function _1(r,e){var t=v1(r);r=0;for(var n;t;){if(t.nodeType===3){if(n=r+t.textContent.length,r<=e&&n>=e)return{node:t,offset:e-r};r=n}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=v1(t)}}function Rv(r,e){return r&&e?r===e?!0:r&&r.nodeType===3?!1:e&&e.nodeType===3?Rv(r,e.parentNode):"contains"in r?r.contains(e):r.compareDocumentPosition?!!(r.compareDocumentPosition(e)&16):!1:!1}function Ov(){for(var r=window,e=xc();e instanceof r.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)r=e.contentWindow;else break;e=xc(r.document)}return e}function up(r){var e=r&&r.nodeName&&r.nodeName.toLowerCase();return e&&(e==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||e==="textarea"||r.contentEditable==="true")}function Qw(r){var e=Ov(),t=r.focusedElem,n=r.selectionRange;if(e!==t&&t&&t.ownerDocument&&Rv(t.ownerDocument.documentElement,t)){if(n!==null&&up(t)){if(e=n.start,r=n.end,r===void 0&&(r=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(r,t.value.length);else if(r=(e=t.ownerDocument||document)&&e.defaultView||window,r.getSelection){r=r.getSelection();var i=t.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!r.extend&&s>n&&(i=n,n=s,s=i),i=_1(t,s);var a=_1(t,n);i&&a&&(r.rangeCount!==1||r.anchorNode!==i.node||r.anchorOffset!==i.offset||r.focusNode!==a.node||r.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),r.removeAllRanges(),s>n?(r.addRange(e),r.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),r.addRange(e)))}}for(e=[],r=t;r=r.parentNode;)r.nodeType===1&&e.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t<e.length;t++)r=e[t],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var eS=Fn&&"documentMode"in document&&11>=document.documentMode,ks=null,Vh=null,Yo=null,zh=!1;function y1(r,e,t){var n=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;zh||ks==null||ks!==xc(n)||(n=ks,"selectionStart"in n&&up(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Yo&&ba(Yo,n)||(Yo=n,n=Dc(Vh,"onSelect"),0<n.length&&(e=new lp("onSelect","select",null,e,t),r.push({event:e,listeners:n}),e.target=ks)))}function Rl(r,e){var t={};return t[r.toLowerCase()]=e.toLowerCase(),t["Webkit"+r]="webkit"+e,t["Moz"+r]="moz"+e,t}var Ls={animationend:Rl("Animation","AnimationEnd"),animationiteration:Rl("Animation","AnimationIteration"),animationstart:Rl("Animation","AnimationStart"),transitionend:Rl("Transition","TransitionEnd")},Au={},Dv={};Fn&&(Dv=document.createElement("div").style,"AnimationEvent"in window||(delete Ls.animationend.animation,delete Ls.animationiteration.animation,delete Ls.animationstart.animation),"TransitionEvent"in window||delete Ls.transitionend.transition);function xd(r){if(Au[r])return Au[r];if(!Ls[r])return r;var e=Ls[r],t;for(t in e)if(e.hasOwnProperty(t)&&t in Dv)return Au[r]=e[t];return r}var Nv=xd("animationend"),Iv=xd("animationiteration"),Bv=xd("animationstart"),Mv=xd("transitionend"),Pv=new Map,b1="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Li(r,e){Pv.set(r,e),ds(e,[r])}for(var Ru=0;Ru<b1.length;Ru++){var Ou=b1[Ru],tS=Ou.toLowerCase(),rS=Ou[0].toUpperCase()+Ou.slice(1);Li(tS,"on"+rS)}Li(Nv,"onAnimationEnd");Li(Iv,"onAnimationIteration");Li(Bv,"onAnimationStart");Li("dblclick","onDoubleClick");Li("focusin","onFocus");Li("focusout","onBlur");Li(Mv,"onTransitionEnd");Zs("onMouseEnter",["mouseout","mouseover"]);Zs("onMouseLeave",["mouseout","mouseover"]);Zs("onPointerEnter",["pointerout","pointerover"]);Zs("onPointerLeave",["pointerout","pointerover"]);ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ds("onBeforeInput",["compositionend","keypress","textInput","paste"]);ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),nS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Uo));function w1(r,e,t){var n=r.type||"unknown-event";r.currentTarget=t,tw(n,e,void 0,r),r.currentTarget=null}function Fv(r,e){e=(e&4)!==0;for(var t=0;t<r.length;t++){var n=r[t],i=n.event;n=n.listeners;e:{var s=void 0;if(e)for(var a=n.length-1;0<=a;a--){var o=n[a],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;w1(i,o,c),s=l}else for(a=0;a<n.length;a++){if(o=n[a],l=o.instance,c=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;w1(i,o,c),s=l}}}if(kc)throw r=Fh,kc=!1,Fh=null,r}function Me(r,e){var t=e[qh];t===void 0&&(t=e[qh]=new Set);var n=r+"__bubble";t.has(n)||(Hv(e,r,2,!1),t.add(n))}function Du(r,e,t){var n=0;e&&(n|=4),Hv(t,r,n,e)}var Ol="_reactListening"+Math.random().toString(36).slice(2);function wa(r){if(!r[Ol]){r[Ol]=!0,Gm.forEach(function(t){t!=="selectionchange"&&(nS.has(t)||Du(t,!1,r),Du(t,!0,r))});var e=r.nodeType===9?r:r.ownerDocument;e===null||e[Ol]||(e[Ol]=!0,Du("selectionchange",!1,e))}}function Hv(r,e,t,n){switch(Sv(e)){case 1:var i=vw;break;case 4:i=_w;break;default:i=op}t=i.bind(null,e,t,r),i=void 0,!Ph||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?r.addEventListener(e,t,{capture:!0,passive:i}):r.addEventListener(e,t,!0):i!==void 0?r.addEventListener(e,t,{passive:i}):r.addEventListener(e,t,!1)}function Nu(r,e,t,n,i){var s=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var o=n.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;o!==null;){if(a=ji(o),a===null)return;if(l=a.tag,l===5||l===6){n=s=a;continue e}o=o.parentNode}}n=n.return}lv(function(){var c=s,u=rp(t),d=[];e:{var g=Pv.get(r);if(g!==void 0){var _=lp,y=r;switch(r){case"keypress":if(oc(t)===0)break e;case"keydown":case"keyup":_=Nw;break;case"focusin":y="focus",_=Tu;break;case"focusout":y="blur",_=Tu;break;case"beforeblur":case"afterblur":_=Tu;break;case"click":if(t.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=c1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=ww;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=Mw;break;case Nv:case Iv:case Bv:_=Ew;break;case Mv:_=Fw;break;case"scroll":_=yw;break;case"wheel":_=jw;break;case"copy":case"cut":case"paste":_=Tw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=u1}var b=(e&4)!==0,p=!b&&r==="scroll",f=b?g!==null?g+"Capture":null:g;b=[];for(var h=c,m;h!==null;){m=h;var v=m.stateNode;if(m.tag===5&&v!==null&&(m=v,f!==null&&(v=ga(h,f),v!=null&&b.push(Sa(h,v,m)))),p)break;h=h.return}0<b.length&&(g=new _(g,y,null,t,u),d.push({event:g,listeners:b}))}}if(!(e&7)){e:{if(g=r==="mouseover"||r==="pointerover",_=r==="mouseout"||r==="pointerout",g&&t!==Bh&&(y=t.relatedTarget||t.fromElement)&&(ji(y)||y[Hn]))break e;if((_||g)&&(g=u.window===u?u:(g=u.ownerDocument)?g.defaultView||g.parentWindow:window,_?(y=t.relatedTarget||t.toElement,_=c,y=y?ji(y):null,y!==null&&(p=us(y),y!==p||y.tag!==5&&y.tag!==6)&&(y=null)):(_=null,y=c),_!==y)){if(b=c1,v="onMouseLeave",f="onMouseEnter",h="mouse",(r==="pointerout"||r==="pointerover")&&(b=u1,v="onPointerLeave",f="onPointerEnter",h="pointer"),p=_==null?g:As(_),m=y==null?g:As(y),g=new b(v,h+"leave",_,t,u),g.target=p,g.relatedTarget=m,v=null,ji(u)===c&&(b=new b(f,h+"enter",y,t,u),b.target=m,b.relatedTarget=p,v=b),p=v,_&&y)t:{for(b=_,f=y,h=0,m=b;m;m=vs(m))h++;for(m=0,v=f;v;v=vs(v))m++;for(;0<h-m;)b=vs(b),h--;for(;0<m-h;)f=vs(f),m--;for(;h--;){if(b===f||f!==null&&b===f.alternate)break t;b=vs(b),f=vs(f)}b=null}else b=null;_!==null&&S1(d,g,_,b,!1),y!==null&&p!==null&&S1(d,p,y,b,!0)}}e:{if(g=c?As(c):window,_=g.nodeName&&g.nodeName.toLowerCase(),_==="select"||_==="input"&&g.type==="file")var w=Kw;else if(p1(g))if(Lv)w=Yw;else{w=Xw;var C=qw}else(_=g.nodeName)&&_.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(w=Zw);if(w&&(w=w(r,c))){kv(d,w,t,u);break e}C&&C(r,g,c),r==="focusout"&&(C=g._wrapperState)&&C.controlled&&g.type==="number"&&Rh(g,"number",g.value)}switch(C=c?As(c):window,r){case"focusin":(p1(C)||C.contentEditable==="true")&&(ks=C,Vh=c,Yo=null);break;case"focusout":Yo=Vh=ks=null;break;case"mousedown":zh=!0;break;case"contextmenu":case"mouseup":case"dragend":zh=!1,y1(d,t,u);break;case"selectionchange":if(eS)break;case"keydown":case"keyup":y1(d,t,u)}var E;if(dp)e:{switch(r){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else Ts?xv(r,t)&&(S="onCompositionEnd"):r==="keydown"&&t.keyCode===229&&(S="onCompositionStart");S&&(Ev&&t.locale!=="ko"&&(Ts||S!=="onCompositionStart"?S==="onCompositionEnd"&&Ts&&(E=Cv()):(oi=u,ap="value"in oi?oi.value:oi.textContent,Ts=!0)),C=Dc(c,S),0<C.length&&(S=new d1(S,r,null,t,u),d.push({event:S,listeners:C}),E?S.data=E:(E=Tv(t),E!==null&&(S.data=E)))),(E=Vw?zw(r,t):Uw(r,t))&&(c=Dc(c,"onBeforeInput"),0<c.length&&(u=new d1("onBeforeInput","beforeinput",null,t,u),d.push({event:u,listeners:c}),u.data=E))}Fv(d,e)})}function Sa(r,e,t){return{instance:r,listener:e,currentTarget:t}}function Dc(r,e){for(var t=e+"Capture",n=[];r!==null;){var i=r,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ga(r,t),s!=null&&n.unshift(Sa(r,s,i)),s=ga(r,e),s!=null&&n.push(Sa(r,s,i))),r=r.return}return n}function vs(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function S1(r,e,t,n,i){for(var s=e._reactName,a=[];t!==null&&t!==n;){var o=t,l=o.alternate,c=o.stateNode;if(l!==null&&l===n)break;o.tag===5&&c!==null&&(o=c,i?(l=ga(t,s),l!=null&&a.unshift(Sa(t,l,o))):i||(l=ga(t,s),l!=null&&a.push(Sa(t,l,o)))),t=t.return}a.length!==0&&r.push({event:e,listeners:a})}var iS=/\r\n?/g,sS=/\u0000|\uFFFD/g;function C1(r){return(typeof r=="string"?r:""+r).replace(iS,`
|
|
39
|
+
`).replace(sS,"")}function Dl(r,e,t){if(e=C1(e),C1(r)!==e&&t)throw Error(X(425))}function Nc(){}var Uh=null,Wh=null;function Gh(r,e){return r==="textarea"||r==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Kh=typeof setTimeout=="function"?setTimeout:void 0,oS=typeof clearTimeout=="function"?clearTimeout:void 0,E1=typeof Promise=="function"?Promise:void 0,aS=typeof queueMicrotask=="function"?queueMicrotask:typeof E1<"u"?function(r){return E1.resolve(null).then(r).catch(lS)}:Kh;function lS(r){setTimeout(function(){throw r})}function Iu(r,e){var t=e,n=0;do{var i=t.nextSibling;if(r.removeChild(t),i&&i.nodeType===8)if(t=i.data,t==="/$"){if(n===0){r.removeChild(i),_a(e);return}n--}else t!=="$"&&t!=="$?"&&t!=="$!"||n++;t=i}while(t);_a(e)}function hi(r){for(;r!=null;r=r.nextSibling){var e=r.nodeType;if(e===1||e===3)break;if(e===8){if(e=r.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return r}function x1(r){r=r.previousSibling;for(var e=0;r;){if(r.nodeType===8){var t=r.data;if(t==="$"||t==="$!"||t==="$?"){if(e===0)return r;e--}else t==="/$"&&e++}r=r.previousSibling}return null}var go=Math.random().toString(36).slice(2),gn="__reactFiber$"+go,Ca="__reactProps$"+go,Hn="__reactContainer$"+go,qh="__reactEvents$"+go,cS="__reactListeners$"+go,dS="__reactHandles$"+go;function ji(r){var e=r[gn];if(e)return e;for(var t=r.parentNode;t;){if(e=t[Hn]||t[gn]){if(t=e.alternate,e.child!==null||t!==null&&t.child!==null)for(r=x1(r);r!==null;){if(t=r[gn])return t;r=x1(r)}return e}r=t,t=r.parentNode}return null}function nl(r){return r=r[gn]||r[Hn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function As(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(X(33))}function Td(r){return r[Ca]||null}var Xh=[],Rs=-1;function Ai(r){return{current:r}}function $e(r){0>Rs||(r.current=Xh[Rs],Xh[Rs]=null,Rs--)}function Ne(r,e){Rs++,Xh[Rs]=r.current,r.current=e}var Ci={},zt=Ai(Ci),ar=Ai(!1),rs=Ci;function Ys(r,e){var t=r.type.contextTypes;if(!t)return Ci;var n=r.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in t)i[s]=e[s];return n&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=e,r.__reactInternalMemoizedMaskedChildContext=i),i}function lr(r){return r=r.childContextTypes,r!=null}function Ic(){$e(ar),$e(zt)}function T1(r,e,t){if(zt.current!==Ci)throw Error(X(168));Ne(zt,e),Ne(ar,t)}function jv(r,e,t){var n=r.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return t;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(X(108,q3(r)||"Unknown",i));return et({},t,n)}function Bc(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Ci,rs=zt.current,Ne(zt,r),Ne(ar,ar.current),!0}function k1(r,e,t){var n=r.stateNode;if(!n)throw Error(X(169));t?(r=jv(r,e,rs),n.__reactInternalMemoizedMergedChildContext=r,$e(ar),$e(zt),Ne(zt,r)):$e(ar),Ne(ar,t)}var Rn=null,kd=!1,Bu=!1;function $v(r){Rn===null?Rn=[r]:Rn.push(r)}function uS(r){kd=!0,$v(r)}function Ri(){if(!Bu&&Rn!==null){Bu=!0;var r=0,e=Ae;try{var t=Rn;for(Ae=1;r<t.length;r++){var n=t[r];do n=n(!0);while(n!==null)}Rn=null,kd=!1}catch(i){throw Rn!==null&&(Rn=Rn.slice(r+1)),hv(np,Ri),i}finally{Ae=e,Bu=!1}}return null}var Os=[],Ds=0,Mc=null,Pc=0,Nr=[],Ir=0,ns=null,On=1,Dn="";function Mi(r,e){Os[Ds++]=Pc,Os[Ds++]=Mc,Mc=r,Pc=e}function Vv(r,e,t){Nr[Ir++]=On,Nr[Ir++]=Dn,Nr[Ir++]=ns,ns=r;var n=On;r=Dn;var i=32-en(n)-1;n&=~(1<<i),t+=1;var s=32-en(e)+i;if(30<s){var a=i-i%5;s=(n&(1<<a)-1).toString(32),n>>=a,i-=a,On=1<<32-en(e)+i|t<<i|n,Dn=s+r}else On=1<<s|t<<i|n,Dn=r}function hp(r){r.return!==null&&(Mi(r,1),Vv(r,1,0))}function fp(r){for(;r===Mc;)Mc=Os[--Ds],Os[Ds]=null,Pc=Os[--Ds],Os[Ds]=null;for(;r===ns;)ns=Nr[--Ir],Nr[Ir]=null,Dn=Nr[--Ir],Nr[Ir]=null,On=Nr[--Ir],Nr[Ir]=null}var Cr=null,yr=null,Ge=!1,Yr=null;function zv(r,e){var t=Mr(5,null,null,0);t.elementType="DELETED",t.stateNode=e,t.return=r,e=r.deletions,e===null?(r.deletions=[t],r.flags|=16):e.push(t)}function L1(r,e){switch(r.tag){case 5:var t=r.type;return e=e.nodeType!==1||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(r.stateNode=e,Cr=r,yr=hi(e.firstChild),!0):!1;case 6:return e=r.pendingProps===""||e.nodeType!==3?null:e,e!==null?(r.stateNode=e,Cr=r,yr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(t=ns!==null?{id:On,overflow:Dn}:null,r.memoizedState={dehydrated:e,treeContext:t,retryLane:1073741824},t=Mr(18,null,null,0),t.stateNode=e,t.return=r,r.child=t,Cr=r,yr=null,!0):!1;default:return!1}}function Zh(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Yh(r){if(Ge){var e=yr;if(e){var t=e;if(!L1(r,e)){if(Zh(r))throw Error(X(418));e=hi(t.nextSibling);var n=Cr;e&&L1(r,e)?zv(n,t):(r.flags=r.flags&-4097|2,Ge=!1,Cr=r)}}else{if(Zh(r))throw Error(X(418));r.flags=r.flags&-4097|2,Ge=!1,Cr=r}}}function A1(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Cr=r}function Nl(r){if(r!==Cr)return!1;if(!Ge)return A1(r),Ge=!0,!1;var e;if((e=r.tag!==3)&&!(e=r.tag!==5)&&(e=r.type,e=e!=="head"&&e!=="body"&&!Gh(r.type,r.memoizedProps)),e&&(e=yr)){if(Zh(r))throw Uv(),Error(X(418));for(;e;)zv(r,e),e=hi(e.nextSibling)}if(A1(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(X(317));e:{for(r=r.nextSibling,e=0;r;){if(r.nodeType===8){var t=r.data;if(t==="/$"){if(e===0){yr=hi(r.nextSibling);break e}e--}else t!=="$"&&t!=="$!"&&t!=="$?"||e++}r=r.nextSibling}yr=null}}else yr=Cr?hi(r.stateNode.nextSibling):null;return!0}function Uv(){for(var r=yr;r;)r=hi(r.nextSibling)}function Js(){yr=Cr=null,Ge=!1}function pp(r){Yr===null?Yr=[r]:Yr.push(r)}var hS=Kn.ReactCurrentBatchConfig;function Do(r,e,t){if(r=t.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(t._owner){if(t=t._owner,t){if(t.tag!==1)throw Error(X(309));var n=t.stateNode}if(!n)throw Error(X(147,r));var i=n,s=""+r;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(a){var o=i.refs;a===null?delete o[s]:o[s]=a},e._stringRef=s,e)}if(typeof r!="string")throw Error(X(284));if(!t._owner)throw Error(X(290,r))}return r}function Il(r,e){throw r=Object.prototype.toString.call(e),Error(X(31,r==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":r))}function R1(r){var e=r._init;return e(r._payload)}function Wv(r){function e(f,h){if(r){var m=f.deletions;m===null?(f.deletions=[h],f.flags|=16):m.push(h)}}function t(f,h){if(!r)return null;for(;h!==null;)e(f,h),h=h.sibling;return null}function n(f,h){for(f=new Map;h!==null;)h.key!==null?f.set(h.key,h):f.set(h.index,h),h=h.sibling;return f}function i(f,h){return f=mi(f,h),f.index=0,f.sibling=null,f}function s(f,h,m){return f.index=m,r?(m=f.alternate,m!==null?(m=m.index,m<h?(f.flags|=2,h):m):(f.flags|=2,h)):(f.flags|=1048576,h)}function a(f){return r&&f.alternate===null&&(f.flags|=2),f}function o(f,h,m,v){return h===null||h.tag!==6?(h=Vu(m,f.mode,v),h.return=f,h):(h=i(h,m),h.return=f,h)}function l(f,h,m,v){var w=m.type;return w===xs?u(f,h,m.props.children,v,m.key):h!==null&&(h.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Qn&&R1(w)===h.type)?(v=i(h,m.props),v.ref=Do(f,h,m),v.return=f,v):(v=fc(m.type,m.key,m.props,null,f.mode,v),v.ref=Do(f,h,m),v.return=f,v)}function c(f,h,m,v){return h===null||h.tag!==4||h.stateNode.containerInfo!==m.containerInfo||h.stateNode.implementation!==m.implementation?(h=zu(m,f.mode,v),h.return=f,h):(h=i(h,m.children||[]),h.return=f,h)}function u(f,h,m,v,w){return h===null||h.tag!==7?(h=Ki(m,f.mode,v,w),h.return=f,h):(h=i(h,m),h.return=f,h)}function d(f,h,m){if(typeof h=="string"&&h!==""||typeof h=="number")return h=Vu(""+h,f.mode,m),h.return=f,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Cl:return m=fc(h.type,h.key,h.props,null,f.mode,m),m.ref=Do(f,null,h),m.return=f,m;case Es:return h=zu(h,f.mode,m),h.return=f,h;case Qn:var v=h._init;return d(f,v(h._payload),m)}if(Vo(h)||ko(h))return h=Ki(h,f.mode,m,null),h.return=f,h;Il(f,h)}return null}function g(f,h,m,v){var w=h!==null?h.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return w!==null?null:o(f,h,""+m,v);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Cl:return m.key===w?l(f,h,m,v):null;case Es:return m.key===w?c(f,h,m,v):null;case Qn:return w=m._init,g(f,h,w(m._payload),v)}if(Vo(m)||ko(m))return w!==null?null:u(f,h,m,v,null);Il(f,m)}return null}function _(f,h,m,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return f=f.get(m)||null,o(h,f,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Cl:return f=f.get(v.key===null?m:v.key)||null,l(h,f,v,w);case Es:return f=f.get(v.key===null?m:v.key)||null,c(h,f,v,w);case Qn:var C=v._init;return _(f,h,m,C(v._payload),w)}if(Vo(v)||ko(v))return f=f.get(m)||null,u(h,f,v,w,null);Il(h,v)}return null}function y(f,h,m,v){for(var w=null,C=null,E=h,S=h=0,x=null;E!==null&&S<m.length;S++){E.index>S?(x=E,E=null):x=E.sibling;var L=g(f,E,m[S],v);if(L===null){E===null&&(E=x);break}r&&E&&L.alternate===null&&e(f,E),h=s(L,h,S),C===null?w=L:C.sibling=L,C=L,E=x}if(S===m.length)return t(f,E),Ge&&Mi(f,S),w;if(E===null){for(;S<m.length;S++)E=d(f,m[S],v),E!==null&&(h=s(E,h,S),C===null?w=E:C.sibling=E,C=E);return Ge&&Mi(f,S),w}for(E=n(f,E);S<m.length;S++)x=_(E,f,S,m[S],v),x!==null&&(r&&x.alternate!==null&&E.delete(x.key===null?S:x.key),h=s(x,h,S),C===null?w=x:C.sibling=x,C=x);return r&&E.forEach(function(P){return e(f,P)}),Ge&&Mi(f,S),w}function b(f,h,m,v){var w=ko(m);if(typeof w!="function")throw Error(X(150));if(m=w.call(m),m==null)throw Error(X(151));for(var C=w=null,E=h,S=h=0,x=null,L=m.next();E!==null&&!L.done;S++,L=m.next()){E.index>S?(x=E,E=null):x=E.sibling;var P=g(f,E,L.value,v);if(P===null){E===null&&(E=x);break}r&&E&&P.alternate===null&&e(f,E),h=s(P,h,S),C===null?w=P:C.sibling=P,C=P,E=x}if(L.done)return t(f,E),Ge&&Mi(f,S),w;if(E===null){for(;!L.done;S++,L=m.next())L=d(f,L.value,v),L!==null&&(h=s(L,h,S),C===null?w=L:C.sibling=L,C=L);return Ge&&Mi(f,S),w}for(E=n(f,E);!L.done;S++,L=m.next())L=_(E,f,S,L.value,v),L!==null&&(r&&L.alternate!==null&&E.delete(L.key===null?S:L.key),h=s(L,h,S),C===null?w=L:C.sibling=L,C=L);return r&&E.forEach(function(A){return e(f,A)}),Ge&&Mi(f,S),w}function p(f,h,m,v){if(typeof m=="object"&&m!==null&&m.type===xs&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Cl:e:{for(var w=m.key,C=h;C!==null;){if(C.key===w){if(w=m.type,w===xs){if(C.tag===7){t(f,C.sibling),h=i(C,m.props.children),h.return=f,f=h;break e}}else if(C.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Qn&&R1(w)===C.type){t(f,C.sibling),h=i(C,m.props),h.ref=Do(f,C,m),h.return=f,f=h;break e}t(f,C);break}else e(f,C);C=C.sibling}m.type===xs?(h=Ki(m.props.children,f.mode,v,m.key),h.return=f,f=h):(v=fc(m.type,m.key,m.props,null,f.mode,v),v.ref=Do(f,h,m),v.return=f,f=v)}return a(f);case Es:e:{for(C=m.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){t(f,h.sibling),h=i(h,m.children||[]),h.return=f,f=h;break e}else{t(f,h);break}else e(f,h);h=h.sibling}h=zu(m,f.mode,v),h.return=f,f=h}return a(f);case Qn:return C=m._init,p(f,h,C(m._payload),v)}if(Vo(m))return y(f,h,m,v);if(ko(m))return b(f,h,m,v);Il(f,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(t(f,h.sibling),h=i(h,m),h.return=f,f=h):(t(f,h),h=Vu(m,f.mode,v),h.return=f,f=h),a(f)):t(f,h)}return p}var Qs=Wv(!0),Gv=Wv(!1),Fc=Ai(null),Hc=null,Ns=null,gp=null;function mp(){gp=Ns=Hc=null}function vp(r){var e=Fc.current;$e(Fc),r._currentValue=e}function Jh(r,e,t){for(;r!==null;){var n=r.alternate;if((r.childLanes&e)!==e?(r.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),r===t)break;r=r.return}}function Ws(r,e){Hc=r,gp=Ns=null,r=r.dependencies,r!==null&&r.firstContext!==null&&(r.lanes&e&&(sr=!0),r.firstContext=null)}function zr(r){var e=r._currentValue;if(gp!==r)if(r={context:r,memoizedValue:e,next:null},Ns===null){if(Hc===null)throw Error(X(308));Ns=r,Hc.dependencies={lanes:0,firstContext:r}}else Ns=Ns.next=r;return e}var $i=null;function _p(r){$i===null?$i=[r]:$i.push(r)}function Kv(r,e,t,n){var i=e.interleaved;return i===null?(t.next=t,_p(e)):(t.next=i.next,i.next=t),e.interleaved=t,jn(r,n)}function jn(r,e){r.lanes|=e;var t=r.alternate;for(t!==null&&(t.lanes|=e),t=r,r=r.return;r!==null;)r.childLanes|=e,t=r.alternate,t!==null&&(t.childLanes|=e),t=r,r=r.return;return t.tag===3?t.stateNode:null}var ei=!1;function yp(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qv(r,e){r=r.updateQueue,e.updateQueue===r&&(e.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Bn(r,e){return{eventTime:r,lane:e,tag:0,payload:null,callback:null,next:null}}function fi(r,e,t){var n=r.updateQueue;if(n===null)return null;if(n=n.shared,Ee&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,jn(r,t)}return i=n.interleaved,i===null?(e.next=e,_p(n)):(e.next=i.next,i.next=e),n.interleaved=e,jn(r,t)}function ac(r,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194240)!==0)){var n=e.lanes;n&=r.pendingLanes,t|=n,e.lanes=t,ip(r,t)}}function O1(r,e){var t=r.updateQueue,n=r.alternate;if(n!==null&&(n=n.updateQueue,t===n)){var i=null,s=null;if(t=t.firstBaseUpdate,t!==null){do{var a={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};s===null?i=s=a:s=s.next=a,t=t.next}while(t!==null);s===null?i=s=e:s=s.next=e}else i=s=e;t={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},r.updateQueue=t;return}r=t.lastBaseUpdate,r===null?t.firstBaseUpdate=e:r.next=e,t.lastBaseUpdate=e}function jc(r,e,t,n){var i=r.updateQueue;ei=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,c=l.next;l.next=null,a===null?s=c:a.next=c,a=l;var u=r.alternate;u!==null&&(u=u.updateQueue,o=u.lastBaseUpdate,o!==a&&(o===null?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;a=0,u=c=l=null,o=s;do{var g=o.lane,_=o.eventTime;if((n&g)===g){u!==null&&(u=u.next={eventTime:_,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=r,b=o;switch(g=e,_=t,b.tag){case 1:if(y=b.payload,typeof y=="function"){d=y.call(_,d,g);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=b.payload,g=typeof y=="function"?y.call(_,d,g):y,g==null)break e;d=et({},d,g);break e;case 2:ei=!0}}o.callback!==null&&o.lane!==0&&(r.flags|=64,g=i.effects,g===null?i.effects=[o]:g.push(o))}else _={eventTime:_,lane:g,tag:o.tag,payload:o.payload,callback:o.callback,next:null},u===null?(c=u=_,l=d):u=u.next=_,a|=g;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;g=o,o=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do a|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);ss|=a,r.lanes=a,r.memoizedState=d}}function D1(r,e,t){if(r=e.effects,e.effects=null,r!==null)for(e=0;e<r.length;e++){var n=r[e],i=n.callback;if(i!==null){if(n.callback=null,n=t,typeof i!="function")throw Error(X(191,i));i.call(n)}}}var il={},vn=Ai(il),Ea=Ai(il),xa=Ai(il);function Vi(r){if(r===il)throw Error(X(174));return r}function bp(r,e){switch(Ne(xa,e),Ne(Ea,r),Ne(vn,il),r=e.nodeType,r){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Dh(null,"");break;default:r=r===8?e.parentNode:e,e=r.namespaceURI||null,r=r.tagName,e=Dh(e,r)}$e(vn),Ne(vn,e)}function eo(){$e(vn),$e(Ea),$e(xa)}function Xv(r){Vi(xa.current);var e=Vi(vn.current),t=Dh(e,r.type);e!==t&&(Ne(Ea,r),Ne(vn,t))}function wp(r){Ea.current===r&&($e(vn),$e(Ea))}var Ze=Ai(0);function $c(r){for(var e=r;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===r)break;for(;e.sibling===null;){if(e.return===null||e.return===r)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Mu=[];function Sp(){for(var r=0;r<Mu.length;r++)Mu[r]._workInProgressVersionPrimary=null;Mu.length=0}var lc=Kn.ReactCurrentDispatcher,Pu=Kn.ReactCurrentBatchConfig,is=0,Qe=null,gt=null,wt=null,Vc=!1,Jo=!1,Ta=0,fS=0;function Bt(){throw Error(X(321))}function Cp(r,e){if(e===null)return!1;for(var t=0;t<e.length&&t<r.length;t++)if(!on(r[t],e[t]))return!1;return!0}function Ep(r,e,t,n,i,s){if(is=s,Qe=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,lc.current=r===null||r.memoizedState===null?vS:_S,r=t(n,i),Jo){s=0;do{if(Jo=!1,Ta=0,25<=s)throw Error(X(301));s+=1,wt=gt=null,e.updateQueue=null,lc.current=yS,r=t(n,i)}while(Jo)}if(lc.current=zc,e=gt!==null&>.next!==null,is=0,wt=gt=Qe=null,Vc=!1,e)throw Error(X(300));return r}function xp(){var r=Ta!==0;return Ta=0,r}function hn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Qe.memoizedState=wt=r:wt=wt.next=r,wt}function Ur(){if(gt===null){var r=Qe.alternate;r=r!==null?r.memoizedState:null}else r=gt.next;var e=wt===null?Qe.memoizedState:wt.next;if(e!==null)wt=e,gt=r;else{if(r===null)throw Error(X(310));gt=r,r={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},wt===null?Qe.memoizedState=wt=r:wt=wt.next=r}return wt}function ka(r,e){return typeof e=="function"?e(r):e}function Fu(r){var e=Ur(),t=e.queue;if(t===null)throw Error(X(311));t.lastRenderedReducer=r;var n=gt,i=n.baseQueue,s=t.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}n.baseQueue=i=s,t.pending=null}if(i!==null){s=i.next,n=n.baseState;var o=a=null,l=null,c=s;do{var u=c.lane;if((is&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:r(n,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(o=l=d,a=n):l=l.next=d,Qe.lanes|=u,ss|=u}c=c.next}while(c!==null&&c!==s);l===null?a=n:l.next=o,on(n,e.memoizedState)||(sr=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=l,t.lastRenderedState=n}if(r=t.interleaved,r!==null){i=r;do s=i.lane,Qe.lanes|=s,ss|=s,i=i.next;while(i!==r)}else i===null&&(t.lanes=0);return[e.memoizedState,t.dispatch]}function Hu(r){var e=Ur(),t=e.queue;if(t===null)throw Error(X(311));t.lastRenderedReducer=r;var n=t.dispatch,i=t.pending,s=e.memoizedState;if(i!==null){t.pending=null;var a=i=i.next;do s=r(s,a.action),a=a.next;while(a!==i);on(s,e.memoizedState)||(sr=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),t.lastRenderedState=s}return[s,n]}function Zv(){}function Yv(r,e){var t=Qe,n=Ur(),i=e(),s=!on(n.memoizedState,i);if(s&&(n.memoizedState=i,sr=!0),n=n.queue,Tp(e2.bind(null,t,n,r),[r]),n.getSnapshot!==e||s||wt!==null&&wt.memoizedState.tag&1){if(t.flags|=2048,La(9,Qv.bind(null,t,n,i,e),void 0,null),Ct===null)throw Error(X(349));is&30||Jv(t,e,i)}return i}function Jv(r,e,t){r.flags|=16384,r={getSnapshot:e,value:t},e=Qe.updateQueue,e===null?(e={lastEffect:null,stores:null},Qe.updateQueue=e,e.stores=[r]):(t=e.stores,t===null?e.stores=[r]:t.push(r))}function Qv(r,e,t,n){e.value=t,e.getSnapshot=n,t2(e)&&r2(r)}function e2(r,e,t){return t(function(){t2(e)&&r2(r)})}function t2(r){var e=r.getSnapshot;r=r.value;try{var t=e();return!on(r,t)}catch{return!0}}function r2(r){var e=jn(r,1);e!==null&&tn(e,r,1,-1)}function N1(r){var e=hn();return typeof r=="function"&&(r=r()),e.memoizedState=e.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:r},e.queue=r,r=r.dispatch=mS.bind(null,Qe,r),[e.memoizedState,r]}function La(r,e,t,n){return r={tag:r,create:e,destroy:t,deps:n,next:null},e=Qe.updateQueue,e===null?(e={lastEffect:null,stores:null},Qe.updateQueue=e,e.lastEffect=r.next=r):(t=e.lastEffect,t===null?e.lastEffect=r.next=r:(n=t.next,t.next=r,r.next=n,e.lastEffect=r)),r}function n2(){return Ur().memoizedState}function cc(r,e,t,n){var i=hn();Qe.flags|=r,i.memoizedState=La(1|e,t,void 0,n===void 0?null:n)}function Ld(r,e,t,n){var i=Ur();n=n===void 0?null:n;var s=void 0;if(gt!==null){var a=gt.memoizedState;if(s=a.destroy,n!==null&&Cp(n,a.deps)){i.memoizedState=La(e,t,s,n);return}}Qe.flags|=r,i.memoizedState=La(1|e,t,s,n)}function I1(r,e){return cc(8390656,8,r,e)}function Tp(r,e){return Ld(2048,8,r,e)}function i2(r,e){return Ld(4,2,r,e)}function s2(r,e){return Ld(4,4,r,e)}function o2(r,e){if(typeof e=="function")return r=r(),e(r),function(){e(null)};if(e!=null)return r=r(),e.current=r,function(){e.current=null}}function a2(r,e,t){return t=t!=null?t.concat([r]):null,Ld(4,4,o2.bind(null,e,r),t)}function kp(){}function l2(r,e){var t=Ur();e=e===void 0?null:e;var n=t.memoizedState;return n!==null&&e!==null&&Cp(e,n[1])?n[0]:(t.memoizedState=[r,e],r)}function c2(r,e){var t=Ur();e=e===void 0?null:e;var n=t.memoizedState;return n!==null&&e!==null&&Cp(e,n[1])?n[0]:(r=r(),t.memoizedState=[r,e],r)}function d2(r,e,t){return is&21?(on(t,e)||(t=gv(),Qe.lanes|=t,ss|=t,r.baseState=!0),e):(r.baseState&&(r.baseState=!1,sr=!0),r.memoizedState=t)}function pS(r,e){var t=Ae;Ae=t!==0&&4>t?t:4,r(!0);var n=Pu.transition;Pu.transition={};try{r(!1),e()}finally{Ae=t,Pu.transition=n}}function u2(){return Ur().memoizedState}function gS(r,e,t){var n=gi(r);if(t={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null},h2(r))f2(e,t);else if(t=Kv(r,e,t,n),t!==null){var i=Xt();tn(t,r,n,i),p2(t,e,n)}}function mS(r,e,t){var n=gi(r),i={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null};if(h2(r))f2(e,i);else{var s=r.alternate;if(r.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var a=e.lastRenderedState,o=s(a,t);if(i.hasEagerState=!0,i.eagerState=o,on(o,a)){var l=e.interleaved;l===null?(i.next=i,_p(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}t=Kv(r,e,i,n),t!==null&&(i=Xt(),tn(t,r,n,i),p2(t,e,n))}}function h2(r){var e=r.alternate;return r===Qe||e!==null&&e===Qe}function f2(r,e){Jo=Vc=!0;var t=r.pending;t===null?e.next=e:(e.next=t.next,t.next=e),r.pending=e}function p2(r,e,t){if(t&4194240){var n=e.lanes;n&=r.pendingLanes,t|=n,e.lanes=t,ip(r,t)}}var zc={readContext:zr,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useInsertionEffect:Bt,useLayoutEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useMutableSource:Bt,useSyncExternalStore:Bt,useId:Bt,unstable_isNewReconciler:!1},vS={readContext:zr,useCallback:function(r,e){return hn().memoizedState=[r,e===void 0?null:e],r},useContext:zr,useEffect:I1,useImperativeHandle:function(r,e,t){return t=t!=null?t.concat([r]):null,cc(4194308,4,o2.bind(null,e,r),t)},useLayoutEffect:function(r,e){return cc(4194308,4,r,e)},useInsertionEffect:function(r,e){return cc(4,2,r,e)},useMemo:function(r,e){var t=hn();return e=e===void 0?null:e,r=r(),t.memoizedState=[r,e],r},useReducer:function(r,e,t){var n=hn();return e=t!==void 0?t(e):e,n.memoizedState=n.baseState=e,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:e},n.queue=r,r=r.dispatch=gS.bind(null,Qe,r),[n.memoizedState,r]},useRef:function(r){var e=hn();return r={current:r},e.memoizedState=r},useState:N1,useDebugValue:kp,useDeferredValue:function(r){return hn().memoizedState=r},useTransition:function(){var r=N1(!1),e=r[0];return r=pS.bind(null,r[1]),hn().memoizedState=r,[e,r]},useMutableSource:function(){},useSyncExternalStore:function(r,e,t){var n=Qe,i=hn();if(Ge){if(t===void 0)throw Error(X(407));t=t()}else{if(t=e(),Ct===null)throw Error(X(349));is&30||Jv(n,e,t)}i.memoizedState=t;var s={value:t,getSnapshot:e};return i.queue=s,I1(e2.bind(null,n,s,r),[r]),n.flags|=2048,La(9,Qv.bind(null,n,s,t,e),void 0,null),t},useId:function(){var r=hn(),e=Ct.identifierPrefix;if(Ge){var t=Dn,n=On;t=(n&~(1<<32-en(n)-1)).toString(32)+t,e=":"+e+"R"+t,t=Ta++,0<t&&(e+="H"+t.toString(32)),e+=":"}else t=fS++,e=":"+e+"r"+t.toString(32)+":";return r.memoizedState=e},unstable_isNewReconciler:!1},_S={readContext:zr,useCallback:l2,useContext:zr,useEffect:Tp,useImperativeHandle:a2,useInsertionEffect:i2,useLayoutEffect:s2,useMemo:c2,useReducer:Fu,useRef:n2,useState:function(){return Fu(ka)},useDebugValue:kp,useDeferredValue:function(r){var e=Ur();return d2(e,gt.memoizedState,r)},useTransition:function(){var r=Fu(ka)[0],e=Ur().memoizedState;return[r,e]},useMutableSource:Zv,useSyncExternalStore:Yv,useId:u2,unstable_isNewReconciler:!1},yS={readContext:zr,useCallback:l2,useContext:zr,useEffect:Tp,useImperativeHandle:a2,useInsertionEffect:i2,useLayoutEffect:s2,useMemo:c2,useReducer:Hu,useRef:n2,useState:function(){return Hu(ka)},useDebugValue:kp,useDeferredValue:function(r){var e=Ur();return gt===null?e.memoizedState=r:d2(e,gt.memoizedState,r)},useTransition:function(){var r=Hu(ka)[0],e=Ur().memoizedState;return[r,e]},useMutableSource:Zv,useSyncExternalStore:Yv,useId:u2,unstable_isNewReconciler:!1};function Xr(r,e){if(r&&r.defaultProps){e=et({},e),r=r.defaultProps;for(var t in r)e[t]===void 0&&(e[t]=r[t]);return e}return e}function Qh(r,e,t,n){e=r.memoizedState,t=t(n,e),t=t==null?e:et({},e,t),r.memoizedState=t,r.lanes===0&&(r.updateQueue.baseState=t)}var Ad={isMounted:function(r){return(r=r._reactInternals)?us(r)===r:!1},enqueueSetState:function(r,e,t){r=r._reactInternals;var n=Xt(),i=gi(r),s=Bn(n,i);s.payload=e,t!=null&&(s.callback=t),e=fi(r,s,i),e!==null&&(tn(e,r,i,n),ac(e,r,i))},enqueueReplaceState:function(r,e,t){r=r._reactInternals;var n=Xt(),i=gi(r),s=Bn(n,i);s.tag=1,s.payload=e,t!=null&&(s.callback=t),e=fi(r,s,i),e!==null&&(tn(e,r,i,n),ac(e,r,i))},enqueueForceUpdate:function(r,e){r=r._reactInternals;var t=Xt(),n=gi(r),i=Bn(t,n);i.tag=2,e!=null&&(i.callback=e),e=fi(r,i,n),e!==null&&(tn(e,r,n,t),ac(e,r,n))}};function B1(r,e,t,n,i,s,a){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(n,s,a):e.prototype&&e.prototype.isPureReactComponent?!ba(t,n)||!ba(i,s):!0}function g2(r,e,t){var n=!1,i=Ci,s=e.contextType;return typeof s=="object"&&s!==null?s=zr(s):(i=lr(e)?rs:zt.current,n=e.contextTypes,s=(n=n!=null)?Ys(r,i):Ci),e=new e(t,s),r.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Ad,r.stateNode=e,e._reactInternals=r,n&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=s),e}function M1(r,e,t,n){r=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(t,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(t,n),e.state!==r&&Ad.enqueueReplaceState(e,e.state,null)}function ef(r,e,t,n){var i=r.stateNode;i.props=t,i.state=r.memoizedState,i.refs={},yp(r);var s=e.contextType;typeof s=="object"&&s!==null?i.context=zr(s):(s=lr(e)?rs:zt.current,i.context=Ys(r,s)),i.state=r.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Qh(r,e,s,t),i.state=r.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&Ad.enqueueReplaceState(i,i.state,null),jc(r,t,i,n),i.state=r.memoizedState),typeof i.componentDidMount=="function"&&(r.flags|=4194308)}function to(r,e){try{var t="",n=e;do t+=K3(n),n=n.return;while(n);var i=t}catch(s){i=`
|
|
40
|
+
Error generating stack: `+s.message+`
|
|
41
|
+
`+s.stack}return{value:r,source:e,stack:i,digest:null}}function ju(r,e,t){return{value:r,source:null,stack:t??null,digest:e??null}}function tf(r,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var bS=typeof WeakMap=="function"?WeakMap:Map;function m2(r,e,t){t=Bn(-1,t),t.tag=3,t.payload={element:null};var n=e.value;return t.callback=function(){Wc||(Wc=!0,hf=n),tf(r,e)},t}function v2(r,e,t){t=Bn(-1,t),t.tag=3;var n=r.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;t.payload=function(){return n(i)},t.callback=function(){tf(r,e)}}var s=r.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(t.callback=function(){tf(r,e),typeof n!="function"&&(pi===null?pi=new Set([this]):pi.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),t}function P1(r,e,t){var n=r.pingCache;if(n===null){n=r.pingCache=new bS;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(t)||(i.add(t),r=IS.bind(null,r,e,t),e.then(r,r))}function F1(r){do{var e;if((e=r.tag===13)&&(e=r.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return r;r=r.return}while(r!==null);return null}function H1(r,e,t,n,i){return r.mode&1?(r.flags|=65536,r.lanes=i,r):(r===e?r.flags|=65536:(r.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(e=Bn(-1,1),e.tag=2,fi(t,e,1))),t.lanes|=1),r)}var wS=Kn.ReactCurrentOwner,sr=!1;function Ut(r,e,t,n){e.child=r===null?Gv(e,null,t,n):Qs(e,r.child,t,n)}function j1(r,e,t,n,i){t=t.render;var s=e.ref;return Ws(e,i),n=Ep(r,e,t,n,s,i),t=xp(),r!==null&&!sr?(e.updateQueue=r.updateQueue,e.flags&=-2053,r.lanes&=~i,$n(r,e,i)):(Ge&&t&&hp(e),e.flags|=1,Ut(r,e,n,i),e.child)}function $1(r,e,t,n,i){if(r===null){var s=t.type;return typeof s=="function"&&!Bp(s)&&s.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=s,_2(r,e,s,n,i)):(r=fc(t.type,null,n,e,e.mode,i),r.ref=e.ref,r.return=e,e.child=r)}if(s=r.child,!(r.lanes&i)){var a=s.memoizedProps;if(t=t.compare,t=t!==null?t:ba,t(a,n)&&r.ref===e.ref)return $n(r,e,i)}return e.flags|=1,r=mi(s,n),r.ref=e.ref,r.return=e,e.child=r}function _2(r,e,t,n,i){if(r!==null){var s=r.memoizedProps;if(ba(s,n)&&r.ref===e.ref)if(sr=!1,e.pendingProps=n=s,(r.lanes&i)!==0)r.flags&131072&&(sr=!0);else return e.lanes=r.lanes,$n(r,e,i)}return rf(r,e,t,n,i)}function y2(r,e,t){var n=e.pendingProps,i=n.children,s=r!==null?r.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ne(Bs,pr),pr|=t;else{if(!(t&1073741824))return r=s!==null?s.baseLanes|t:t,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:r,cachePool:null,transitions:null},e.updateQueue=null,Ne(Bs,pr),pr|=r,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:t,Ne(Bs,pr),pr|=n}else s!==null?(n=s.baseLanes|t,e.memoizedState=null):n=t,Ne(Bs,pr),pr|=n;return Ut(r,e,i,t),e.child}function b2(r,e){var t=e.ref;(r===null&&t!==null||r!==null&&r.ref!==t)&&(e.flags|=512,e.flags|=2097152)}function rf(r,e,t,n,i){var s=lr(t)?rs:zt.current;return s=Ys(e,s),Ws(e,i),t=Ep(r,e,t,n,s,i),n=xp(),r!==null&&!sr?(e.updateQueue=r.updateQueue,e.flags&=-2053,r.lanes&=~i,$n(r,e,i)):(Ge&&n&&hp(e),e.flags|=1,Ut(r,e,t,i),e.child)}function V1(r,e,t,n,i){if(lr(t)){var s=!0;Bc(e)}else s=!1;if(Ws(e,i),e.stateNode===null)dc(r,e),g2(e,t,n),ef(e,t,n,i),n=!0;else if(r===null){var a=e.stateNode,o=e.memoizedProps;a.props=o;var l=a.context,c=t.contextType;typeof c=="object"&&c!==null?c=zr(c):(c=lr(t)?rs:zt.current,c=Ys(e,c));var u=t.getDerivedStateFromProps,d=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==n||l!==c)&&M1(e,a,n,c),ei=!1;var g=e.memoizedState;a.state=g,jc(e,n,a,i),l=e.memoizedState,o!==n||g!==l||ar.current||ei?(typeof u=="function"&&(Qh(e,t,u,n),l=e.memoizedState),(o=ei||B1(e,t,o,n,g,l,c))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),a.props=n,a.state=l,a.context=c,n=o):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{a=e.stateNode,qv(r,e),o=e.memoizedProps,c=e.type===e.elementType?o:Xr(e.type,o),a.props=c,d=e.pendingProps,g=a.context,l=t.contextType,typeof l=="object"&&l!==null?l=zr(l):(l=lr(t)?rs:zt.current,l=Ys(e,l));var _=t.getDerivedStateFromProps;(u=typeof _=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||g!==l)&&M1(e,a,n,l),ei=!1,g=e.memoizedState,a.state=g,jc(e,n,a,i);var y=e.memoizedState;o!==d||g!==y||ar.current||ei?(typeof _=="function"&&(Qh(e,t,_,n),y=e.memoizedState),(c=ei||B1(e,t,c,n,g,y,l)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,y,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,y,l)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===r.memoizedProps&&g===r.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===r.memoizedProps&&g===r.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=y),a.props=n,a.state=y,a.context=l,n=c):(typeof a.componentDidUpdate!="function"||o===r.memoizedProps&&g===r.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===r.memoizedProps&&g===r.memoizedState||(e.flags|=1024),n=!1)}return nf(r,e,t,n,s,i)}function nf(r,e,t,n,i,s){b2(r,e);var a=(e.flags&128)!==0;if(!n&&!a)return i&&k1(e,t,!1),$n(r,e,s);n=e.stateNode,wS.current=e;var o=a&&typeof t.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,r!==null&&a?(e.child=Qs(e,r.child,null,s),e.child=Qs(e,null,o,s)):Ut(r,e,o,s),e.memoizedState=n.state,i&&k1(e,t,!0),e.child}function w2(r){var e=r.stateNode;e.pendingContext?T1(r,e.pendingContext,e.pendingContext!==e.context):e.context&&T1(r,e.context,!1),bp(r,e.containerInfo)}function z1(r,e,t,n,i){return Js(),pp(i),e.flags|=256,Ut(r,e,t,n),e.child}var sf={dehydrated:null,treeContext:null,retryLane:0};function of(r){return{baseLanes:r,cachePool:null,transitions:null}}function S2(r,e,t){var n=e.pendingProps,i=Ze.current,s=!1,a=(e.flags&128)!==0,o;if((o=a)||(o=r!==null&&r.memoizedState===null?!1:(i&2)!==0),o?(s=!0,e.flags&=-129):(r===null||r.memoizedState!==null)&&(i|=1),Ne(Ze,i&1),r===null)return Yh(e),r=e.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?(e.mode&1?r.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=n.children,r=n.fallback,s?(n=e.mode,s=e.child,a={mode:"hidden",children:a},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=Dd(a,n,0,null),r=Ki(r,n,t,null),s.return=e,r.return=e,s.sibling=r,e.child=s,e.child.memoizedState=of(t),e.memoizedState=sf,r):Lp(e,a));if(i=r.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return SS(r,e,a,n,o,i,t);if(s){s=n.fallback,a=e.mode,i=r.child,o=i.sibling;var l={mode:"hidden",children:n.children};return!(a&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=mi(i,l),n.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=mi(o,s):(s=Ki(s,a,t,null),s.flags|=2),s.return=e,n.return=e,n.sibling=s,e.child=n,n=s,s=e.child,a=r.child.memoizedState,a=a===null?of(t):{baseLanes:a.baseLanes|t,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=r.childLanes&~t,e.memoizedState=sf,n}return s=r.child,r=s.sibling,n=mi(s,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=t),n.return=e,n.sibling=null,r!==null&&(t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)),e.child=n,e.memoizedState=null,n}function Lp(r,e){return e=Dd({mode:"visible",children:e},r.mode,0,null),e.return=r,r.child=e}function Bl(r,e,t,n){return n!==null&&pp(n),Qs(e,r.child,null,t),r=Lp(e,e.pendingProps.children),r.flags|=2,e.memoizedState=null,r}function SS(r,e,t,n,i,s,a){if(t)return e.flags&256?(e.flags&=-257,n=ju(Error(X(422))),Bl(r,e,a,n)):e.memoizedState!==null?(e.child=r.child,e.flags|=128,null):(s=n.fallback,i=e.mode,n=Dd({mode:"visible",children:n.children},i,0,null),s=Ki(s,i,a,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,e.mode&1&&Qs(e,r.child,null,a),e.child.memoizedState=of(a),e.memoizedState=sf,s);if(!(e.mode&1))return Bl(r,e,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var o=n.dgst;return n=o,s=Error(X(419)),n=ju(s,n,void 0),Bl(r,e,a,n)}if(o=(a&r.childLanes)!==0,sr||o){if(n=Ct,n!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,jn(r,i),tn(n,r,i,-1))}return Ip(),n=ju(Error(X(421))),Bl(r,e,a,n)}return i.data==="$?"?(e.flags|=128,e.child=r.child,e=BS.bind(null,r),i._reactRetry=e,null):(r=s.treeContext,yr=hi(i.nextSibling),Cr=e,Ge=!0,Yr=null,r!==null&&(Nr[Ir++]=On,Nr[Ir++]=Dn,Nr[Ir++]=ns,On=r.id,Dn=r.overflow,ns=e),e=Lp(e,n.children),e.flags|=4096,e)}function U1(r,e,t){r.lanes|=e;var n=r.alternate;n!==null&&(n.lanes|=e),Jh(r.return,e,t)}function $u(r,e,t,n,i){var s=r.memoizedState;s===null?r.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:t,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=t,s.tailMode=i)}function C2(r,e,t){var n=e.pendingProps,i=n.revealOrder,s=n.tail;if(Ut(r,e,n.children,t),n=Ze.current,n&2)n=n&1|2,e.flags|=128;else{if(r!==null&&r.flags&128)e:for(r=e.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&U1(r,t,e);else if(r.tag===19)U1(r,t,e);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break e;for(;r.sibling===null;){if(r.return===null||r.return===e)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}n&=1}if(Ne(Ze,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(t=e.child,i=null;t!==null;)r=t.alternate,r!==null&&$c(r)===null&&(i=t),t=t.sibling;t=i,t===null?(i=e.child,e.child=null):(i=t.sibling,t.sibling=null),$u(e,!1,i,t,s);break;case"backwards":for(t=null,i=e.child,e.child=null;i!==null;){if(r=i.alternate,r!==null&&$c(r)===null){e.child=i;break}r=i.sibling,i.sibling=t,t=i,i=r}$u(e,!0,t,null,s);break;case"together":$u(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function dc(r,e){!(e.mode&1)&&r!==null&&(r.alternate=null,e.alternate=null,e.flags|=2)}function $n(r,e,t){if(r!==null&&(e.dependencies=r.dependencies),ss|=e.lanes,!(t&e.childLanes))return null;if(r!==null&&e.child!==r.child)throw Error(X(153));if(e.child!==null){for(r=e.child,t=mi(r,r.pendingProps),e.child=t,t.return=e;r.sibling!==null;)r=r.sibling,t=t.sibling=mi(r,r.pendingProps),t.return=e;t.sibling=null}return e.child}function CS(r,e,t){switch(e.tag){case 3:w2(e),Js();break;case 5:Xv(e);break;case 1:lr(e.type)&&Bc(e);break;case 4:bp(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Ne(Fc,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Ne(Ze,Ze.current&1),e.flags|=128,null):t&e.child.childLanes?S2(r,e,t):(Ne(Ze,Ze.current&1),r=$n(r,e,t),r!==null?r.sibling:null);Ne(Ze,Ze.current&1);break;case 19:if(n=(t&e.childLanes)!==0,r.flags&128){if(n)return C2(r,e,t);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ne(Ze,Ze.current),n)break;return null;case 22:case 23:return e.lanes=0,y2(r,e,t)}return $n(r,e,t)}var E2,af,x2,T2;E2=function(r,e){for(var t=e.child;t!==null;){if(t.tag===5||t.tag===6)r.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};af=function(){};x2=function(r,e,t,n){var i=r.memoizedProps;if(i!==n){r=e.stateNode,Vi(vn.current);var s=null;switch(t){case"input":i=Lh(r,i),n=Lh(r,n),s=[];break;case"select":i=et({},i,{value:void 0}),n=et({},n,{value:void 0}),s=[];break;case"textarea":i=Oh(r,i),n=Oh(r,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(r.onclick=Nc)}Nh(t,n);var a;t=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var o=i[c];for(a in o)o.hasOwnProperty(a)&&(t||(t={}),t[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(fa.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var l=n[c];if(o=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&l!==o&&(l!=null||o!=null))if(c==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(t||(t={}),t[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(t||(t={}),t[a]=l[a])}else t||(s||(s=[]),s.push(c,t)),t=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(fa.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Me("scroll",r),s||o===l||(s=[])):(s=s||[]).push(c,l))}t&&(s=s||[]).push("style",t);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};T2=function(r,e,t,n){t!==n&&(e.flags|=4)};function No(r,e){if(!Ge)switch(r.tailMode){case"hidden":e=r.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?r.tail=null:t.sibling=null;break;case"collapsed":t=r.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e||r.tail===null?r.tail=null:r.tail.sibling=null:n.sibling=null}}function Mt(r){var e=r.alternate!==null&&r.alternate.child===r.child,t=0,n=0;if(e)for(var i=r.child;i!==null;)t|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=r,i=i.sibling;else for(i=r.child;i!==null;)t|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=r,i=i.sibling;return r.subtreeFlags|=n,r.childLanes=t,e}function ES(r,e,t){var n=e.pendingProps;switch(fp(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(e),null;case 1:return lr(e.type)&&Ic(),Mt(e),null;case 3:return n=e.stateNode,eo(),$e(ar),$e(zt),Sp(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(r===null||r.child===null)&&(Nl(e)?e.flags|=4:r===null||r.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Yr!==null&&(gf(Yr),Yr=null))),af(r,e),Mt(e),null;case 5:wp(e);var i=Vi(xa.current);if(t=e.type,r!==null&&e.stateNode!=null)x2(r,e,t,n,i),r.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(X(166));return Mt(e),null}if(r=Vi(vn.current),Nl(e)){n=e.stateNode,t=e.type;var s=e.memoizedProps;switch(n[gn]=e,n[Ca]=s,r=(e.mode&1)!==0,t){case"dialog":Me("cancel",n),Me("close",n);break;case"iframe":case"object":case"embed":Me("load",n);break;case"video":case"audio":for(i=0;i<Uo.length;i++)Me(Uo[i],n);break;case"source":Me("error",n);break;case"img":case"image":case"link":Me("error",n),Me("load",n);break;case"details":Me("toggle",n);break;case"input":Qg(n,s),Me("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},Me("invalid",n);break;case"textarea":t1(n,s),Me("invalid",n)}Nh(t,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var o=s[a];a==="children"?typeof o=="string"?n.textContent!==o&&(s.suppressHydrationWarning!==!0&&Dl(n.textContent,o,r),i=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&Dl(n.textContent,o,r),i=["children",""+o]):fa.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&Me("scroll",n)}switch(t){case"input":El(n),e1(n,s,!0);break;case"textarea":El(n),r1(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=Nc)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=ev(t)),r==="http://www.w3.org/1999/xhtml"?t==="script"?(r=a.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof n.is=="string"?r=a.createElement(t,{is:n.is}):(r=a.createElement(t),t==="select"&&(a=r,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):r=a.createElementNS(r,t),r[gn]=e,r[Ca]=n,E2(r,e,!1,!1),e.stateNode=r;e:{switch(a=Ih(t,n),t){case"dialog":Me("cancel",r),Me("close",r),i=n;break;case"iframe":case"object":case"embed":Me("load",r),i=n;break;case"video":case"audio":for(i=0;i<Uo.length;i++)Me(Uo[i],r);i=n;break;case"source":Me("error",r),i=n;break;case"img":case"image":case"link":Me("error",r),Me("load",r),i=n;break;case"details":Me("toggle",r),i=n;break;case"input":Qg(r,n),i=Lh(r,n),Me("invalid",r);break;case"option":i=n;break;case"select":r._wrapperState={wasMultiple:!!n.multiple},i=et({},n,{value:void 0}),Me("invalid",r);break;case"textarea":t1(r,n),i=Oh(r,n),Me("invalid",r);break;default:i=n}Nh(t,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="style"?nv(r,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&tv(r,l)):s==="children"?typeof l=="string"?(t!=="textarea"||l!=="")&&pa(r,l):typeof l=="number"&&pa(r,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(fa.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Me("scroll",r):l!=null&&Jf(r,s,l,a))}switch(t){case"input":El(r),e1(r,n,!1);break;case"textarea":El(r),r1(r);break;case"option":n.value!=null&&r.setAttribute("value",""+Si(n.value));break;case"select":r.multiple=!!n.multiple,s=n.value,s!=null?$s(r,!!n.multiple,s,!1):n.defaultValue!=null&&$s(r,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(r.onclick=Nc)}switch(t){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Mt(e),null;case 6:if(r&&e.stateNode!=null)T2(r,e,r.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(X(166));if(t=Vi(xa.current),Vi(vn.current),Nl(e)){if(n=e.stateNode,t=e.memoizedProps,n[gn]=e,(s=n.nodeValue!==t)&&(r=Cr,r!==null))switch(r.tag){case 3:Dl(n.nodeValue,t,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Dl(n.nodeValue,t,(r.mode&1)!==0)}s&&(e.flags|=4)}else n=(t.nodeType===9?t:t.ownerDocument).createTextNode(n),n[gn]=e,e.stateNode=n}return Mt(e),null;case 13:if($e(Ze),n=e.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Ge&&yr!==null&&e.mode&1&&!(e.flags&128))Uv(),Js(),e.flags|=98560,s=!1;else if(s=Nl(e),n!==null&&n.dehydrated!==null){if(r===null){if(!s)throw Error(X(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(X(317));s[gn]=e}else Js(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Mt(e),s=!1}else Yr!==null&&(gf(Yr),Yr=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=t,e):(n=n!==null,n!==(r!==null&&r.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(r===null||Ze.current&1?vt===0&&(vt=3):Ip())),e.updateQueue!==null&&(e.flags|=4),Mt(e),null);case 4:return eo(),af(r,e),r===null&&wa(e.stateNode.containerInfo),Mt(e),null;case 10:return vp(e.type._context),Mt(e),null;case 17:return lr(e.type)&&Ic(),Mt(e),null;case 19:if($e(Ze),s=e.memoizedState,s===null)return Mt(e),null;if(n=(e.flags&128)!==0,a=s.rendering,a===null)if(n)No(s,!1);else{if(vt!==0||r!==null&&r.flags&128)for(r=e.child;r!==null;){if(a=$c(r),a!==null){for(e.flags|=128,No(s,!1),n=a.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=t,t=e.child;t!==null;)s=t,r=n,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=r,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,r=a.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t=t.sibling;return Ne(Ze,Ze.current&1|2),e.child}r=r.sibling}s.tail!==null&<()>ro&&(e.flags|=128,n=!0,No(s,!1),e.lanes=4194304)}else{if(!n)if(r=$c(a),r!==null){if(e.flags|=128,n=!0,t=r.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),No(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Ge)return Mt(e),null}else 2*lt()-s.renderingStartTime>ro&&t!==1073741824&&(e.flags|=128,n=!0,No(s,!1),e.lanes=4194304);s.isBackwards?(a.sibling=e.child,e.child=a):(t=s.last,t!==null?t.sibling=a:e.child=a,s.last=a)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=lt(),e.sibling=null,t=Ze.current,Ne(Ze,n?t&1|2:t&1),e):(Mt(e),null);case 22:case 23:return Np(),n=e.memoizedState!==null,r!==null&&r.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?pr&1073741824&&(Mt(e),e.subtreeFlags&6&&(e.flags|=8192)):Mt(e),null;case 24:return null;case 25:return null}throw Error(X(156,e.tag))}function xS(r,e){switch(fp(e),e.tag){case 1:return lr(e.type)&&Ic(),r=e.flags,r&65536?(e.flags=r&-65537|128,e):null;case 3:return eo(),$e(ar),$e(zt),Sp(),r=e.flags,r&65536&&!(r&128)?(e.flags=r&-65537|128,e):null;case 5:return wp(e),null;case 13:if($e(Ze),r=e.memoizedState,r!==null&&r.dehydrated!==null){if(e.alternate===null)throw Error(X(340));Js()}return r=e.flags,r&65536?(e.flags=r&-65537|128,e):null;case 19:return $e(Ze),null;case 4:return eo(),null;case 10:return vp(e.type._context),null;case 22:case 23:return Np(),null;case 24:return null;default:return null}}var Ml=!1,Ht=!1,TS=typeof WeakSet=="function"?WeakSet:Set,re=null;function Is(r,e){var t=r.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){tt(r,e,n)}else t.current=null}function lf(r,e,t){try{t()}catch(n){tt(r,e,n)}}var W1=!1;function kS(r,e){if(Uh=Rc,r=Ov(),up(r)){if("selectionStart"in r)var t={start:r.selectionStart,end:r.selectionEnd};else e:{t=(t=r.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var a=0,o=-1,l=-1,c=0,u=0,d=r,g=null;t:for(;;){for(var _;d!==t||i!==0&&d.nodeType!==3||(o=a+i),d!==s||n!==0&&d.nodeType!==3||(l=a+n),d.nodeType===3&&(a+=d.nodeValue.length),(_=d.firstChild)!==null;)g=d,d=_;for(;;){if(d===r)break t;if(g===t&&++c===i&&(o=a),g===s&&++u===n&&(l=a),(_=d.nextSibling)!==null)break;d=g,g=d.parentNode}d=_}t=o===-1||l===-1?null:{start:o,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(Wh={focusedElem:r,selectionRange:t},Rc=!1,re=e;re!==null;)if(e=re,r=e.child,(e.subtreeFlags&1028)!==0&&r!==null)r.return=e,re=r;else for(;re!==null;){e=re;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var b=y.memoizedProps,p=y.memoizedState,f=e.stateNode,h=f.getSnapshotBeforeUpdate(e.elementType===e.type?b:Xr(e.type,b),p);f.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=e.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(X(163))}}catch(v){tt(e,e.return,v)}if(r=e.sibling,r!==null){r.return=e.return,re=r;break}re=e.return}return y=W1,W1=!1,y}function Qo(r,e,t){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&r)===r){var s=i.destroy;i.destroy=void 0,s!==void 0&&lf(e,t,s)}i=i.next}while(i!==n)}}function Rd(r,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&r)===r){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}}function cf(r){var e=r.ref;if(e!==null){var t=r.stateNode;switch(r.tag){case 5:r=t;break;default:r=t}typeof e=="function"?e(r):e.current=r}}function k2(r){var e=r.alternate;e!==null&&(r.alternate=null,k2(e)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(e=r.stateNode,e!==null&&(delete e[gn],delete e[Ca],delete e[qh],delete e[cS],delete e[dS])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function L2(r){return r.tag===5||r.tag===3||r.tag===4}function G1(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||L2(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function df(r,e,t){var n=r.tag;if(n===5||n===6)r=r.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(r,e):t.insertBefore(r,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(r,t)):(e=t,e.appendChild(r)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=Nc));else if(n!==4&&(r=r.child,r!==null))for(df(r,e,t),r=r.sibling;r!==null;)df(r,e,t),r=r.sibling}function uf(r,e,t){var n=r.tag;if(n===5||n===6)r=r.stateNode,e?t.insertBefore(r,e):t.appendChild(r);else if(n!==4&&(r=r.child,r!==null))for(uf(r,e,t),r=r.sibling;r!==null;)uf(r,e,t),r=r.sibling}var kt=null,Zr=!1;function Zn(r,e,t){for(t=t.child;t!==null;)A2(r,e,t),t=t.sibling}function A2(r,e,t){if(mn&&typeof mn.onCommitFiberUnmount=="function")try{mn.onCommitFiberUnmount(Sd,t)}catch{}switch(t.tag){case 5:Ht||Is(t,e);case 6:var n=kt,i=Zr;kt=null,Zn(r,e,t),kt=n,Zr=i,kt!==null&&(Zr?(r=kt,t=t.stateNode,r.nodeType===8?r.parentNode.removeChild(t):r.removeChild(t)):kt.removeChild(t.stateNode));break;case 18:kt!==null&&(Zr?(r=kt,t=t.stateNode,r.nodeType===8?Iu(r.parentNode,t):r.nodeType===1&&Iu(r,t),_a(r)):Iu(kt,t.stateNode));break;case 4:n=kt,i=Zr,kt=t.stateNode.containerInfo,Zr=!0,Zn(r,e,t),kt=n,Zr=i;break;case 0:case 11:case 14:case 15:if(!Ht&&(n=t.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&lf(t,e,a),i=i.next}while(i!==n)}Zn(r,e,t);break;case 1:if(!Ht&&(Is(t,e),n=t.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(o){tt(t,e,o)}Zn(r,e,t);break;case 21:Zn(r,e,t);break;case 22:t.mode&1?(Ht=(n=Ht)||t.memoizedState!==null,Zn(r,e,t),Ht=n):Zn(r,e,t);break;default:Zn(r,e,t)}}function K1(r){var e=r.updateQueue;if(e!==null){r.updateQueue=null;var t=r.stateNode;t===null&&(t=r.stateNode=new TS),e.forEach(function(n){var i=MS.bind(null,r,n);t.has(n)||(t.add(n),n.then(i,i))})}}function Gr(r,e){var t=e.deletions;if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];try{var s=r,a=e,o=a;e:for(;o!==null;){switch(o.tag){case 5:kt=o.stateNode,Zr=!1;break e;case 3:kt=o.stateNode.containerInfo,Zr=!0;break e;case 4:kt=o.stateNode.containerInfo,Zr=!0;break e}o=o.return}if(kt===null)throw Error(X(160));A2(s,a,i),kt=null,Zr=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){tt(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)R2(e,r),e=e.sibling}function R2(r,e){var t=r.alternate,n=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Gr(e,r),cn(r),n&4){try{Qo(3,r,r.return),Rd(3,r)}catch(b){tt(r,r.return,b)}try{Qo(5,r,r.return)}catch(b){tt(r,r.return,b)}}break;case 1:Gr(e,r),cn(r),n&512&&t!==null&&Is(t,t.return);break;case 5:if(Gr(e,r),cn(r),n&512&&t!==null&&Is(t,t.return),r.flags&32){var i=r.stateNode;try{pa(i,"")}catch(b){tt(r,r.return,b)}}if(n&4&&(i=r.stateNode,i!=null)){var s=r.memoizedProps,a=t!==null?t.memoizedProps:s,o=r.type,l=r.updateQueue;if(r.updateQueue=null,l!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&Jm(i,s),Ih(o,a);var c=Ih(o,s);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];u==="style"?nv(i,d):u==="dangerouslySetInnerHTML"?tv(i,d):u==="children"?pa(i,d):Jf(i,u,d,c)}switch(o){case"input":Ah(i,s);break;case"textarea":Qm(i,s);break;case"select":var g=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var _=s.value;_!=null?$s(i,!!s.multiple,_,!1):g!==!!s.multiple&&(s.defaultValue!=null?$s(i,!!s.multiple,s.defaultValue,!0):$s(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ca]=s}catch(b){tt(r,r.return,b)}}break;case 6:if(Gr(e,r),cn(r),n&4){if(r.stateNode===null)throw Error(X(162));i=r.stateNode,s=r.memoizedProps;try{i.nodeValue=s}catch(b){tt(r,r.return,b)}}break;case 3:if(Gr(e,r),cn(r),n&4&&t!==null&&t.memoizedState.isDehydrated)try{_a(e.containerInfo)}catch(b){tt(r,r.return,b)}break;case 4:Gr(e,r),cn(r);break;case 13:Gr(e,r),cn(r),i=r.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Op=lt())),n&4&&K1(r);break;case 22:if(u=t!==null&&t.memoizedState!==null,r.mode&1?(Ht=(c=Ht)||u,Gr(e,r),Ht=c):Gr(e,r),cn(r),n&8192){if(c=r.memoizedState!==null,(r.stateNode.isHidden=c)&&!u&&r.mode&1)for(re=r,u=r.child;u!==null;){for(d=re=u;re!==null;){switch(g=re,_=g.child,g.tag){case 0:case 11:case 14:case 15:Qo(4,g,g.return);break;case 1:Is(g,g.return);var y=g.stateNode;if(typeof y.componentWillUnmount=="function"){n=g,t=g.return;try{e=n,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(b){tt(n,t,b)}}break;case 5:Is(g,g.return);break;case 22:if(g.memoizedState!==null){X1(d);continue}}_!==null?(_.return=g,re=_):X1(d)}u=u.sibling}e:for(u=null,d=r;;){if(d.tag===5){if(u===null){u=d;try{i=d.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=d.stateNode,l=d.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=rv("display",a))}catch(b){tt(r,r.return,b)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(b){tt(r,r.return,b)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===r)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===r)break e;for(;d.sibling===null;){if(d.return===null||d.return===r)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Gr(e,r),cn(r),n&4&&K1(r);break;case 21:break;default:Gr(e,r),cn(r)}}function cn(r){var e=r.flags;if(e&2){try{e:{for(var t=r.return;t!==null;){if(L2(t)){var n=t;break e}t=t.return}throw Error(X(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(pa(i,""),n.flags&=-33);var s=G1(r);uf(r,s,i);break;case 3:case 4:var a=n.stateNode.containerInfo,o=G1(r);df(r,o,a);break;default:throw Error(X(161))}}catch(l){tt(r,r.return,l)}r.flags&=-3}e&4096&&(r.flags&=-4097)}function LS(r,e,t){re=r,O2(r)}function O2(r,e,t){for(var n=(r.mode&1)!==0;re!==null;){var i=re,s=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||Ml;if(!a){var o=i.alternate,l=o!==null&&o.memoizedState!==null||Ht;o=Ml;var c=Ht;if(Ml=a,(Ht=l)&&!c)for(re=i;re!==null;)a=re,l=a.child,a.tag===22&&a.memoizedState!==null?Z1(i):l!==null?(l.return=a,re=l):Z1(i);for(;s!==null;)re=s,O2(s),s=s.sibling;re=i,Ml=o,Ht=c}q1(r)}else i.subtreeFlags&8772&&s!==null?(s.return=i,re=s):q1(r)}}function q1(r){for(;re!==null;){var e=re;if(e.flags&8772){var t=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ht||Rd(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Ht)if(t===null)n.componentDidMount();else{var i=e.elementType===e.type?t.memoizedProps:Xr(e.type,t.memoizedProps);n.componentDidUpdate(i,t.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&D1(e,s,n);break;case 3:var a=e.updateQueue;if(a!==null){if(t=null,e.child!==null)switch(e.child.tag){case 5:t=e.child.stateNode;break;case 1:t=e.child.stateNode}D1(e,a,t)}break;case 5:var o=e.stateNode;if(t===null&&e.flags&4){t=o;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&t.focus();break;case"img":l.src&&(t.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&_a(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(X(163))}Ht||e.flags&512&&cf(e)}catch(g){tt(e,e.return,g)}}if(e===r){re=null;break}if(t=e.sibling,t!==null){t.return=e.return,re=t;break}re=e.return}}function X1(r){for(;re!==null;){var e=re;if(e===r){re=null;break}var t=e.sibling;if(t!==null){t.return=e.return,re=t;break}re=e.return}}function Z1(r){for(;re!==null;){var e=re;try{switch(e.tag){case 0:case 11:case 15:var t=e.return;try{Rd(4,e)}catch(l){tt(e,t,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(l){tt(e,i,l)}}var s=e.return;try{cf(e)}catch(l){tt(e,s,l)}break;case 5:var a=e.return;try{cf(e)}catch(l){tt(e,a,l)}}}catch(l){tt(e,e.return,l)}if(e===r){re=null;break}var o=e.sibling;if(o!==null){o.return=e.return,re=o;break}re=e.return}}var AS=Math.ceil,Uc=Kn.ReactCurrentDispatcher,Ap=Kn.ReactCurrentOwner,Pr=Kn.ReactCurrentBatchConfig,Ee=0,Ct=null,ht=null,Ot=0,pr=0,Bs=Ai(0),vt=0,Aa=null,ss=0,Od=0,Rp=0,ea=null,ir=null,Op=0,ro=1/0,An=null,Wc=!1,hf=null,pi=null,Pl=!1,ai=null,Gc=0,ta=0,ff=null,uc=-1,hc=0;function Xt(){return Ee&6?lt():uc!==-1?uc:uc=lt()}function gi(r){return r.mode&1?Ee&2&&Ot!==0?Ot&-Ot:hS.transition!==null?(hc===0&&(hc=gv()),hc):(r=Ae,r!==0||(r=window.event,r=r===void 0?16:Sv(r.type)),r):1}function tn(r,e,t,n){if(50<ta)throw ta=0,ff=null,Error(X(185));tl(r,t,n),(!(Ee&2)||r!==Ct)&&(r===Ct&&(!(Ee&2)&&(Od|=t),vt===4&&ii(r,Ot)),cr(r,n),t===1&&Ee===0&&!(e.mode&1)&&(ro=lt()+500,kd&&Ri()))}function cr(r,e){var t=r.callbackNode;hw(r,e);var n=Ac(r,r===Ct?Ot:0);if(n===0)t!==null&&s1(t),r.callbackNode=null,r.callbackPriority=0;else if(e=n&-n,r.callbackPriority!==e){if(t!=null&&s1(t),e===1)r.tag===0?uS(Y1.bind(null,r)):$v(Y1.bind(null,r)),aS(function(){!(Ee&6)&&Ri()}),t=null;else{switch(mv(n)){case 1:t=np;break;case 4:t=fv;break;case 16:t=Lc;break;case 536870912:t=pv;break;default:t=Lc}t=H2(t,D2.bind(null,r))}r.callbackPriority=e,r.callbackNode=t}}function D2(r,e){if(uc=-1,hc=0,Ee&6)throw Error(X(327));var t=r.callbackNode;if(Gs()&&r.callbackNode!==t)return null;var n=Ac(r,r===Ct?Ot:0);if(n===0)return null;if(n&30||n&r.expiredLanes||e)e=Kc(r,n);else{e=n;var i=Ee;Ee|=2;var s=I2();(Ct!==r||Ot!==e)&&(An=null,ro=lt()+500,Gi(r,e));do try{DS();break}catch(o){N2(r,o)}while(!0);mp(),Uc.current=s,Ee=i,ht!==null?e=0:(Ct=null,Ot=0,e=vt)}if(e!==0){if(e===2&&(i=Hh(r),i!==0&&(n=i,e=pf(r,i))),e===1)throw t=Aa,Gi(r,0),ii(r,n),cr(r,lt()),t;if(e===6)ii(r,n);else{if(i=r.current.alternate,!(n&30)&&!RS(i)&&(e=Kc(r,n),e===2&&(s=Hh(r),s!==0&&(n=s,e=pf(r,s))),e===1))throw t=Aa,Gi(r,0),ii(r,n),cr(r,lt()),t;switch(r.finishedWork=i,r.finishedLanes=n,e){case 0:case 1:throw Error(X(345));case 2:Pi(r,ir,An);break;case 3:if(ii(r,n),(n&130023424)===n&&(e=Op+500-lt(),10<e)){if(Ac(r,0)!==0)break;if(i=r.suspendedLanes,(i&n)!==n){Xt(),r.pingedLanes|=r.suspendedLanes&i;break}r.timeoutHandle=Kh(Pi.bind(null,r,ir,An),e);break}Pi(r,ir,An);break;case 4:if(ii(r,n),(n&4194240)===n)break;for(e=r.eventTimes,i=-1;0<n;){var a=31-en(n);s=1<<a,a=e[a],a>i&&(i=a),n&=~s}if(n=i,n=lt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*AS(n/1960))-n,10<n){r.timeoutHandle=Kh(Pi.bind(null,r,ir,An),n);break}Pi(r,ir,An);break;case 5:Pi(r,ir,An);break;default:throw Error(X(329))}}}return cr(r,lt()),r.callbackNode===t?D2.bind(null,r):null}function pf(r,e){var t=ea;return r.current.memoizedState.isDehydrated&&(Gi(r,e).flags|=256),r=Kc(r,e),r!==2&&(e=ir,ir=t,e!==null&&gf(e)),r}function gf(r){ir===null?ir=r:ir.push.apply(ir,r)}function RS(r){for(var e=r;;){if(e.flags&16384){var t=e.updateQueue;if(t!==null&&(t=t.stores,t!==null))for(var n=0;n<t.length;n++){var i=t[n],s=i.getSnapshot;i=i.value;try{if(!on(s(),i))return!1}catch{return!1}}}if(t=e.child,e.subtreeFlags&16384&&t!==null)t.return=e,e=t;else{if(e===r)break;for(;e.sibling===null;){if(e.return===null||e.return===r)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ii(r,e){for(e&=~Rp,e&=~Od,r.suspendedLanes|=e,r.pingedLanes&=~e,r=r.expirationTimes;0<e;){var t=31-en(e),n=1<<t;r[t]=-1,e&=~n}}function Y1(r){if(Ee&6)throw Error(X(327));Gs();var e=Ac(r,0);if(!(e&1))return cr(r,lt()),null;var t=Kc(r,e);if(r.tag!==0&&t===2){var n=Hh(r);n!==0&&(e=n,t=pf(r,n))}if(t===1)throw t=Aa,Gi(r,0),ii(r,e),cr(r,lt()),t;if(t===6)throw Error(X(345));return r.finishedWork=r.current.alternate,r.finishedLanes=e,Pi(r,ir,An),cr(r,lt()),null}function Dp(r,e){var t=Ee;Ee|=1;try{return r(e)}finally{Ee=t,Ee===0&&(ro=lt()+500,kd&&Ri())}}function os(r){ai!==null&&ai.tag===0&&!(Ee&6)&&Gs();var e=Ee;Ee|=1;var t=Pr.transition,n=Ae;try{if(Pr.transition=null,Ae=1,r)return r()}finally{Ae=n,Pr.transition=t,Ee=e,!(Ee&6)&&Ri()}}function Np(){pr=Bs.current,$e(Bs)}function Gi(r,e){r.finishedWork=null,r.finishedLanes=0;var t=r.timeoutHandle;if(t!==-1&&(r.timeoutHandle=-1,oS(t)),ht!==null)for(t=ht.return;t!==null;){var n=t;switch(fp(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Ic();break;case 3:eo(),$e(ar),$e(zt),Sp();break;case 5:wp(n);break;case 4:eo();break;case 13:$e(Ze);break;case 19:$e(Ze);break;case 10:vp(n.type._context);break;case 22:case 23:Np()}t=t.return}if(Ct=r,ht=r=mi(r.current,null),Ot=pr=e,vt=0,Aa=null,Rp=Od=ss=0,ir=ea=null,$i!==null){for(e=0;e<$i.length;e++)if(t=$i[e],n=t.interleaved,n!==null){t.interleaved=null;var i=n.next,s=t.pending;if(s!==null){var a=s.next;s.next=i,n.next=a}t.pending=n}$i=null}return r}function N2(r,e){do{var t=ht;try{if(mp(),lc.current=zc,Vc){for(var n=Qe.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Vc=!1}if(is=0,wt=gt=Qe=null,Jo=!1,Ta=0,Ap.current=null,t===null||t.return===null){vt=1,Aa=e,ht=null;break}e:{var s=r,a=t.return,o=t,l=e;if(e=Ot,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=o,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var g=u.alternate;g?(u.updateQueue=g.updateQueue,u.memoizedState=g.memoizedState,u.lanes=g.lanes):(u.updateQueue=null,u.memoizedState=null)}var _=F1(a);if(_!==null){_.flags&=-257,H1(_,a,o,s,e),_.mode&1&&P1(s,c,e),e=_,l=c;var y=e.updateQueue;if(y===null){var b=new Set;b.add(l),e.updateQueue=b}else y.add(l);break e}else{if(!(e&1)){P1(s,c,e),Ip();break e}l=Error(X(426))}}else if(Ge&&o.mode&1){var p=F1(a);if(p!==null){!(p.flags&65536)&&(p.flags|=256),H1(p,a,o,s,e),pp(to(l,o));break e}}s=l=to(l,o),vt!==4&&(vt=2),ea===null?ea=[s]:ea.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var f=m2(s,l,e);O1(s,f);break e;case 1:o=l;var h=s.type,m=s.stateNode;if(!(s.flags&128)&&(typeof h.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(pi===null||!pi.has(m)))){s.flags|=65536,e&=-e,s.lanes|=e;var v=v2(s,o,e);O1(s,v);break e}}s=s.return}while(s!==null)}M2(t)}catch(w){e=w,ht===t&&t!==null&&(ht=t=t.return);continue}break}while(!0)}function I2(){var r=Uc.current;return Uc.current=zc,r===null?zc:r}function Ip(){(vt===0||vt===3||vt===2)&&(vt=4),Ct===null||!(ss&268435455)&&!(Od&268435455)||ii(Ct,Ot)}function Kc(r,e){var t=Ee;Ee|=2;var n=I2();(Ct!==r||Ot!==e)&&(An=null,Gi(r,e));do try{OS();break}catch(i){N2(r,i)}while(!0);if(mp(),Ee=t,Uc.current=n,ht!==null)throw Error(X(261));return Ct=null,Ot=0,vt}function OS(){for(;ht!==null;)B2(ht)}function DS(){for(;ht!==null&&!nw();)B2(ht)}function B2(r){var e=F2(r.alternate,r,pr);r.memoizedProps=r.pendingProps,e===null?M2(r):ht=e,Ap.current=null}function M2(r){var e=r;do{var t=e.alternate;if(r=e.return,e.flags&32768){if(t=xS(t,e),t!==null){t.flags&=32767,ht=t;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{vt=6,ht=null;return}}else if(t=ES(t,e,pr),t!==null){ht=t;return}if(e=e.sibling,e!==null){ht=e;return}ht=e=r}while(e!==null);vt===0&&(vt=5)}function Pi(r,e,t){var n=Ae,i=Pr.transition;try{Pr.transition=null,Ae=1,NS(r,e,t,n)}finally{Pr.transition=i,Ae=n}return null}function NS(r,e,t,n){do Gs();while(ai!==null);if(Ee&6)throw Error(X(327));t=r.finishedWork;var i=r.finishedLanes;if(t===null)return null;if(r.finishedWork=null,r.finishedLanes=0,t===r.current)throw Error(X(177));r.callbackNode=null,r.callbackPriority=0;var s=t.lanes|t.childLanes;if(fw(r,s),r===Ct&&(ht=Ct=null,Ot=0),!(t.subtreeFlags&2064)&&!(t.flags&2064)||Pl||(Pl=!0,H2(Lc,function(){return Gs(),null})),s=(t.flags&15990)!==0,t.subtreeFlags&15990||s){s=Pr.transition,Pr.transition=null;var a=Ae;Ae=1;var o=Ee;Ee|=4,Ap.current=null,kS(r,t),R2(t,r),Qw(Wh),Rc=!!Uh,Wh=Uh=null,r.current=t,LS(t),iw(),Ee=o,Ae=a,Pr.transition=s}else r.current=t;if(Pl&&(Pl=!1,ai=r,Gc=i),s=r.pendingLanes,s===0&&(pi=null),aw(t.stateNode),cr(r,lt()),e!==null)for(n=r.onRecoverableError,t=0;t<e.length;t++)i=e[t],n(i.value,{componentStack:i.stack,digest:i.digest});if(Wc)throw Wc=!1,r=hf,hf=null,r;return Gc&1&&r.tag!==0&&Gs(),s=r.pendingLanes,s&1?r===ff?ta++:(ta=0,ff=r):ta=0,Ri(),null}function Gs(){if(ai!==null){var r=mv(Gc),e=Pr.transition,t=Ae;try{if(Pr.transition=null,Ae=16>r?16:r,ai===null)var n=!1;else{if(r=ai,ai=null,Gc=0,Ee&6)throw Error(X(331));var i=Ee;for(Ee|=4,re=r.current;re!==null;){var s=re,a=s.child;if(re.flags&16){var o=s.deletions;if(o!==null){for(var l=0;l<o.length;l++){var c=o[l];for(re=c;re!==null;){var u=re;switch(u.tag){case 0:case 11:case 15:Qo(8,u,s)}var d=u.child;if(d!==null)d.return=u,re=d;else for(;re!==null;){u=re;var g=u.sibling,_=u.return;if(k2(u),u===c){re=null;break}if(g!==null){g.return=_,re=g;break}re=_}}}var y=s.alternate;if(y!==null){var b=y.child;if(b!==null){y.child=null;do{var p=b.sibling;b.sibling=null,b=p}while(b!==null)}}re=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,re=a;else e:for(;re!==null;){if(s=re,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Qo(9,s,s.return)}var f=s.sibling;if(f!==null){f.return=s.return,re=f;break e}re=s.return}}var h=r.current;for(re=h;re!==null;){a=re;var m=a.child;if(a.subtreeFlags&2064&&m!==null)m.return=a,re=m;else e:for(a=h;re!==null;){if(o=re,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:Rd(9,o)}}catch(w){tt(o,o.return,w)}if(o===a){re=null;break e}var v=o.sibling;if(v!==null){v.return=o.return,re=v;break e}re=o.return}}if(Ee=i,Ri(),mn&&typeof mn.onPostCommitFiberRoot=="function")try{mn.onPostCommitFiberRoot(Sd,r)}catch{}n=!0}return n}finally{Ae=t,Pr.transition=e}}return!1}function J1(r,e,t){e=to(t,e),e=m2(r,e,1),r=fi(r,e,1),e=Xt(),r!==null&&(tl(r,1,e),cr(r,e))}function tt(r,e,t){if(r.tag===3)J1(r,r,t);else for(;e!==null;){if(e.tag===3){J1(e,r,t);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(pi===null||!pi.has(n))){r=to(t,r),r=v2(e,r,1),e=fi(e,r,1),r=Xt(),e!==null&&(tl(e,1,r),cr(e,r));break}}e=e.return}}function IS(r,e,t){var n=r.pingCache;n!==null&&n.delete(e),e=Xt(),r.pingedLanes|=r.suspendedLanes&t,Ct===r&&(Ot&t)===t&&(vt===4||vt===3&&(Ot&130023424)===Ot&&500>lt()-Op?Gi(r,0):Rp|=t),cr(r,e)}function P2(r,e){e===0&&(r.mode&1?(e=kl,kl<<=1,!(kl&130023424)&&(kl=4194304)):e=1);var t=Xt();r=jn(r,e),r!==null&&(tl(r,e,t),cr(r,t))}function BS(r){var e=r.memoizedState,t=0;e!==null&&(t=e.retryLane),P2(r,t)}function MS(r,e){var t=0;switch(r.tag){case 13:var n=r.stateNode,i=r.memoizedState;i!==null&&(t=i.retryLane);break;case 19:n=r.stateNode;break;default:throw Error(X(314))}n!==null&&n.delete(e),P2(r,t)}var F2;F2=function(r,e,t){if(r!==null)if(r.memoizedProps!==e.pendingProps||ar.current)sr=!0;else{if(!(r.lanes&t)&&!(e.flags&128))return sr=!1,CS(r,e,t);sr=!!(r.flags&131072)}else sr=!1,Ge&&e.flags&1048576&&Vv(e,Pc,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;dc(r,e),r=e.pendingProps;var i=Ys(e,zt.current);Ws(e,t),i=Ep(null,e,n,r,i,t);var s=xp();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,lr(n)?(s=!0,Bc(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,yp(e),i.updater=Ad,e.stateNode=i,i._reactInternals=e,ef(e,n,r,t),e=nf(null,e,n,!0,s,t)):(e.tag=0,Ge&&s&&hp(e),Ut(null,e,i,t),e=e.child),e;case 16:n=e.elementType;e:{switch(dc(r,e),r=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=FS(n),r=Xr(n,r),i){case 0:e=rf(null,e,n,r,t);break e;case 1:e=V1(null,e,n,r,t);break e;case 11:e=j1(null,e,n,r,t);break e;case 14:e=$1(null,e,n,Xr(n.type,r),t);break e}throw Error(X(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Xr(n,i),rf(r,e,n,i,t);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Xr(n,i),V1(r,e,n,i,t);case 3:e:{if(w2(e),r===null)throw Error(X(387));n=e.pendingProps,s=e.memoizedState,i=s.element,qv(r,e),jc(e,n,null,t);var a=e.memoizedState;if(n=a.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=to(Error(X(423)),e),e=z1(r,e,n,t,i);break e}else if(n!==i){i=to(Error(X(424)),e),e=z1(r,e,n,t,i);break e}else for(yr=hi(e.stateNode.containerInfo.firstChild),Cr=e,Ge=!0,Yr=null,t=Gv(e,null,n,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Js(),n===i){e=$n(r,e,t);break e}Ut(r,e,n,t)}e=e.child}return e;case 5:return Xv(e),r===null&&Yh(e),n=e.type,i=e.pendingProps,s=r!==null?r.memoizedProps:null,a=i.children,Gh(n,i)?a=null:s!==null&&Gh(n,s)&&(e.flags|=32),b2(r,e),Ut(r,e,a,t),e.child;case 6:return r===null&&Yh(e),null;case 13:return S2(r,e,t);case 4:return bp(e,e.stateNode.containerInfo),n=e.pendingProps,r===null?e.child=Qs(e,null,n,t):Ut(r,e,n,t),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Xr(n,i),j1(r,e,n,i,t);case 7:return Ut(r,e,e.pendingProps,t),e.child;case 8:return Ut(r,e,e.pendingProps.children,t),e.child;case 12:return Ut(r,e,e.pendingProps.children,t),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,a=i.value,Ne(Fc,n._currentValue),n._currentValue=a,s!==null)if(on(s.value,a)){if(s.children===i.children&&!ar.current){e=$n(r,e,t);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Bn(-1,t&-t),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=t,l=s.alternate,l!==null&&(l.lanes|=t),Jh(s.return,t,e),o.lanes|=t;break}l=l.next}}else if(s.tag===10)a=s.type===e.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(X(341));a.lanes|=t,o=a.alternate,o!==null&&(o.lanes|=t),Jh(a,t,e),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===e){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Ut(r,e,i.children,t),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Ws(e,t),i=zr(i),n=n(i),e.flags|=1,Ut(r,e,n,t),e.child;case 14:return n=e.type,i=Xr(n,e.pendingProps),i=Xr(n.type,i),$1(r,e,n,i,t);case 15:return _2(r,e,e.type,e.pendingProps,t);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Xr(n,i),dc(r,e),e.tag=1,lr(n)?(r=!0,Bc(e)):r=!1,Ws(e,t),g2(e,n,i),ef(e,n,i,t),nf(null,e,n,!0,r,t);case 19:return C2(r,e,t);case 22:return y2(r,e,t)}throw Error(X(156,e.tag))};function H2(r,e){return hv(r,e)}function PS(r,e,t,n){this.tag=r,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mr(r,e,t,n){return new PS(r,e,t,n)}function Bp(r){return r=r.prototype,!(!r||!r.isReactComponent)}function FS(r){if(typeof r=="function")return Bp(r)?1:0;if(r!=null){if(r=r.$$typeof,r===ep)return 11;if(r===tp)return 14}return 2}function mi(r,e){var t=r.alternate;return t===null?(t=Mr(r.tag,e,r.key,r.mode),t.elementType=r.elementType,t.type=r.type,t.stateNode=r.stateNode,t.alternate=r,r.alternate=t):(t.pendingProps=e,t.type=r.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=r.flags&14680064,t.childLanes=r.childLanes,t.lanes=r.lanes,t.child=r.child,t.memoizedProps=r.memoizedProps,t.memoizedState=r.memoizedState,t.updateQueue=r.updateQueue,e=r.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=r.sibling,t.index=r.index,t.ref=r.ref,t}function fc(r,e,t,n,i,s){var a=2;if(n=r,typeof r=="function")Bp(r)&&(a=1);else if(typeof r=="string")a=5;else e:switch(r){case xs:return Ki(t.children,i,s,e);case Qf:a=8,i|=8;break;case Eh:return r=Mr(12,t,e,i|2),r.elementType=Eh,r.lanes=s,r;case xh:return r=Mr(13,t,e,i),r.elementType=xh,r.lanes=s,r;case Th:return r=Mr(19,t,e,i),r.elementType=Th,r.lanes=s,r;case Xm:return Dd(t,i,s,e);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case Km:a=10;break e;case qm:a=9;break e;case ep:a=11;break e;case tp:a=14;break e;case Qn:a=16,n=null;break e}throw Error(X(130,r==null?r:typeof r,""))}return e=Mr(a,t,e,i),e.elementType=r,e.type=n,e.lanes=s,e}function Ki(r,e,t,n){return r=Mr(7,r,n,e),r.lanes=t,r}function Dd(r,e,t,n){return r=Mr(22,r,n,e),r.elementType=Xm,r.lanes=t,r.stateNode={isHidden:!1},r}function Vu(r,e,t){return r=Mr(6,r,null,e),r.lanes=t,r}function zu(r,e,t){return e=Mr(4,r.children!==null?r.children:[],r.key,e),e.lanes=t,e.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},e}function HS(r,e,t,n,i){this.tag=e,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cu(0),this.expirationTimes=Cu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cu(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Mp(r,e,t,n,i,s,a,o,l){return r=new HS(r,e,t,o,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Mr(3,null,null,e),r.current=s,s.stateNode=r,s.memoizedState={element:n,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},yp(s),r}function jS(r,e,t){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Es,key:n==null?null:""+n,children:r,containerInfo:e,implementation:t}}function j2(r){if(!r)return Ci;r=r._reactInternals;e:{if(us(r)!==r||r.tag!==1)throw Error(X(170));var e=r;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(lr(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(X(171))}if(r.tag===1){var t=r.type;if(lr(t))return jv(r,t,e)}return e}function $2(r,e,t,n,i,s,a,o,l){return r=Mp(t,n,!0,r,i,s,a,o,l),r.context=j2(null),t=r.current,n=Xt(),i=gi(t),s=Bn(n,i),s.callback=e??null,fi(t,s,i),r.current.lanes=i,tl(r,i,n),cr(r,n),r}function Nd(r,e,t,n){var i=e.current,s=Xt(),a=gi(i);return t=j2(t),e.context===null?e.context=t:e.pendingContext=t,e=Bn(s,a),e.payload={element:r},n=n===void 0?null:n,n!==null&&(e.callback=n),r=fi(i,e,a),r!==null&&(tn(r,i,a,s),ac(r,i,a)),a}function qc(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Q1(r,e){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var t=r.retryLane;r.retryLane=t!==0&&t<e?t:e}}function Pp(r,e){Q1(r,e),(r=r.alternate)&&Q1(r,e)}function $S(){return null}var V2=typeof reportError=="function"?reportError:function(r){console.error(r)};function Fp(r){this._internalRoot=r}Id.prototype.render=Fp.prototype.render=function(r){var e=this._internalRoot;if(e===null)throw Error(X(409));Nd(r,e,null,null)};Id.prototype.unmount=Fp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var e=r.containerInfo;os(function(){Nd(null,r,null,null)}),e[Hn]=null}};function Id(r){this._internalRoot=r}Id.prototype.unstable_scheduleHydration=function(r){if(r){var e=yv();r={blockedOn:null,target:r,priority:e};for(var t=0;t<ni.length&&e!==0&&e<ni[t].priority;t++);ni.splice(t,0,r),t===0&&wv(r)}};function Hp(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Bd(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function e0(){}function VS(r,e,t,n,i){if(i){if(typeof n=="function"){var s=n;n=function(){var c=qc(a);s.call(c)}}var a=$2(e,n,r,0,null,!1,!1,"",e0);return r._reactRootContainer=a,r[Hn]=a.current,wa(r.nodeType===8?r.parentNode:r),os(),a}for(;i=r.lastChild;)r.removeChild(i);if(typeof n=="function"){var o=n;n=function(){var c=qc(l);o.call(c)}}var l=Mp(r,0,!1,null,null,!1,!1,"",e0);return r._reactRootContainer=l,r[Hn]=l.current,wa(r.nodeType===8?r.parentNode:r),os(function(){Nd(e,l,t,n)}),l}function Md(r,e,t,n,i){var s=t._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var o=i;i=function(){var l=qc(a);o.call(l)}}Nd(e,a,r,i)}else a=VS(t,e,r,i,n);return qc(a)}vv=function(r){switch(r.tag){case 3:var e=r.stateNode;if(e.current.memoizedState.isDehydrated){var t=zo(e.pendingLanes);t!==0&&(ip(e,t|1),cr(e,lt()),!(Ee&6)&&(ro=lt()+500,Ri()))}break;case 13:os(function(){var n=jn(r,1);if(n!==null){var i=Xt();tn(n,r,1,i)}}),Pp(r,1)}};sp=function(r){if(r.tag===13){var e=jn(r,134217728);if(e!==null){var t=Xt();tn(e,r,134217728,t)}Pp(r,134217728)}};_v=function(r){if(r.tag===13){var e=gi(r),t=jn(r,e);if(t!==null){var n=Xt();tn(t,r,e,n)}Pp(r,e)}};yv=function(){return Ae};bv=function(r,e){var t=Ae;try{return Ae=r,e()}finally{Ae=t}};Mh=function(r,e,t){switch(e){case"input":if(Ah(r,t),e=t.name,t.type==="radio"&&e!=null){for(t=r;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<t.length;e++){var n=t[e];if(n!==r&&n.form===r.form){var i=Td(n);if(!i)throw Error(X(90));Ym(n),Ah(n,i)}}}break;case"textarea":Qm(r,t);break;case"select":e=t.value,e!=null&&$s(r,!!t.multiple,e,!1)}};ov=Dp;av=os;var zS={usingClientEntryPoint:!1,Events:[nl,As,Td,iv,sv,Dp]},Io={findFiberByHostInstance:ji,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},US={bundleType:Io.bundleType,version:Io.version,rendererPackageName:Io.rendererPackageName,rendererConfig:Io.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Kn.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=dv(r),r===null?null:r.stateNode},findFiberByHostInstance:Io.findFiberByHostInstance||$S,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fl.isDisabled&&Fl.supportsFiber)try{Sd=Fl.inject(US),mn=Fl}catch{}}kr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zS;kr.createPortal=function(r,e){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hp(e))throw Error(X(200));return jS(r,e,null,t)};kr.createRoot=function(r,e){if(!Hp(r))throw Error(X(299));var t=!1,n="",i=V2;return e!=null&&(e.unstable_strictMode===!0&&(t=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Mp(r,1,!1,null,null,t,!1,n,i),r[Hn]=e.current,wa(r.nodeType===8?r.parentNode:r),new Fp(e)};kr.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var e=r._reactInternals;if(e===void 0)throw typeof r.render=="function"?Error(X(188)):(r=Object.keys(r).join(","),Error(X(268,r)));return r=dv(e),r=r===null?null:r.stateNode,r};kr.flushSync=function(r){return os(r)};kr.hydrate=function(r,e,t){if(!Bd(e))throw Error(X(200));return Md(null,r,e,!0,t)};kr.hydrateRoot=function(r,e,t){if(!Hp(r))throw Error(X(405));var n=t!=null&&t.hydratedSources||null,i=!1,s="",a=V2;if(t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),e=$2(e,null,r,1,t??null,i,!1,s,a),r[Hn]=e.current,wa(r),n)for(r=0;r<n.length;r++)t=n[r],i=t._getVersion,i=i(t._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,i]:e.mutableSourceEagerHydrationData.push(t,i);return new Id(e)};kr.render=function(r,e,t){if(!Bd(e))throw Error(X(200));return Md(null,r,e,!1,t)};kr.unmountComponentAtNode=function(r){if(!Bd(r))throw Error(X(40));return r._reactRootContainer?(os(function(){Md(null,null,r,!1,function(){r._reactRootContainer=null,r[Hn]=null})}),!0):!1};kr.unstable_batchedUpdates=Dp;kr.unstable_renderSubtreeIntoContainer=function(r,e,t,n){if(!Bd(t))throw Error(X(200));if(r==null||r._reactInternals===void 0)throw Error(X(38));return Md(r,e,t,!1,n)};kr.version="18.3.1-next-f1338f8080-20240426";function z2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(z2)}catch(r){console.error(r)}}z2(),zm.exports=kr;var U2=zm.exports,W2,t0=U2;W2=t0.createRoot,t0.hydrateRoot;const WS="modulepreload",GS=function(r,e){return new URL(r,e).href},r0={},Y=function(e,t,n){let i=Promise.resolve();if(t&&t.length>0){const a=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(t.map(c=>{if(c=GS(c,n),c in r0)return;r0[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(!!n)for(let y=a.length-1;y>=0;y--){const b=a[y];if(b.href===c&&(!u||b.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${d}`))return;const _=document.createElement("link");if(_.rel=u?"stylesheet":WS,u||(_.as="script"),_.crossOrigin="",_.href=c,l&&_.setAttribute("nonce",l),document.head.appendChild(_),u)return new Promise((y,b)=>{_.addEventListener("load",y),_.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})},KS="vega";let pc,G2,gr=!1,mf=!1;const sl=typeof window<"u"?window:{},vi=sl.document||{head:{}},Rt={$flags$:0,$resourcesUrl$:"",jmp:r=>r(),raf:r=>requestAnimationFrame(r),ael:(r,e,t,n)=>r.addEventListener(e,t,n),rel:(r,e,t,n)=>r.removeEventListener(e,t,n),ce:(r,e)=>new CustomEvent(r,e)},K2=r=>Promise.resolve(r),qS=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch{}return!1})(),q2=(r,e,t,n)=>{t&&t.map(([i,s,a])=>{const o=ZS(r,i),l=XS(e,a),c=YS(i);Rt.ael(o,s,l,c),(e.$rmListeners$=e.$rmListeners$||[]).push(()=>Rt.rel(o,s,l,c))})},XS=(r,e)=>t=>{try{r.$flags$&256?r.$lazyInstance$[e](t):(r.$queuedListeners$=r.$queuedListeners$||[]).push([e,t])}catch(n){Z(n)}},ZS=(r,e)=>e&8?sl:r,YS=r=>(r&2)!==0,JS="{visibility:hidden}.hydrated{visibility:inherit}",n0="http://www.w3.org/1999/xlink",Vn=(r,e="")=>()=>{},QS=(r,e)=>()=>{},i0=new WeakMap,eC=(r,e,t)=>{let n=Yc.get(r);qS&&t?(n=n||new CSSStyleSheet,typeof n=="string"?n=e:n.replaceSync(e)):n=e,Yc.set(r,n)},tC=(r,e,t,n)=>{let i=X2(e);const s=Yc.get(i);if(r=r.nodeType===11?r:vi,s)if(typeof s=="string"){r=r.head||r;let a=i0.get(r),o;a||i0.set(r,a=new Set),a.has(i)||(o=vi.createElement("style"),o.innerHTML=s,r.insertBefore(o,r.querySelector("link")),a&&a.add(i))}else r.adoptedStyleSheets.includes(s)||(r.adoptedStyleSheets=[...r.adoptedStyleSheets,s]);return i},rC=r=>{const e=r.$cmpMeta$,t=r.$hostElement$,n=e.$flags$,i=Vn("attachStyles",e.$tagName$),s=tC(t.shadowRoot?t.shadowRoot:t.getRootNode(),e);n&10&&(t["s-sc"]=s,t.classList.add(s+"-h")),i()},X2=(r,e)=>"sc-"+r.$tagName$,s0={},nC="http://www.w3.org/2000/svg",iC="http://www.w3.org/1999/xhtml",sC=r=>r!=null,jp=r=>(r=typeof r,r==="object"||r==="function"),Z2=(r,e,...t)=>{let n=null,i=null,s=!1,a=!1;const o=[],l=u=>{for(let d=0;d<u.length;d++)n=u[d],Array.isArray(n)?l(n):n!=null&&typeof n!="boolean"&&((s=typeof r!="function"&&!jp(n))&&(n=String(n)),s&&a?o[o.length-1].$text$+=n:o.push(s?Xc(null,n):n),a=s)};if(l(t),e){e.key&&(i=e.key);{const u=e.className||e.class;u&&(e.class=typeof u!="object"?u:Object.keys(u).filter(d=>u[d]).join(" "))}}if(typeof r=="function")return r(e===null?{}:e,o,lC);const c=Xc(r,null);return c.$attrs$=e,o.length>0&&(c.$children$=o),c.$key$=i,c},Xc=(r,e)=>{const t={$flags$:0,$tag$:r,$text$:e,$elm$:null,$children$:null};return t.$attrs$=null,t.$key$=null,t},oC={},aC=r=>r&&r.$tag$===oC,lC={forEach:(r,e)=>r.map(o0).forEach(e),map:(r,e)=>r.map(o0).map(e).map(cC)},o0=r=>({vattrs:r.$attrs$,vchildren:r.$children$,vkey:r.$key$,vname:r.$name$,vtag:r.$tag$,vtext:r.$text$}),cC=r=>{if(typeof r.vtag=="function"){const t=Object.assign({},r.vattrs);return r.vkey&&(t.key=r.vkey),r.vname&&(t.name=r.vname),Z2(r.vtag,t,...r.vchildren||[])}const e=Xc(r.vtag,r.vtext);return e.$attrs$=r.vattrs,e.$children$=r.vchildren,e.$key$=r.vkey,e.$name$=r.vname,e},a0=(r,e,t,n,i,s)=>{if(t!==n){let a=d0(r,e),o=e.toLowerCase();if(e==="class"){const l=r.classList,c=l0(t),u=l0(n);l.remove(...c.filter(d=>d&&!u.includes(d))),l.add(...u.filter(d=>d&&!c.includes(d)))}else if(e==="style"){for(const l in t)(!n||n[l]==null)&&(l.includes("-")?r.style.removeProperty(l):r.style[l]="");for(const l in n)(!t||n[l]!==t[l])&&(l.includes("-")?r.style.setProperty(l,n[l]):r.style[l]=n[l])}else if(e!=="key")if(e==="ref")n&&n(r);else if(!a&&e[0]==="o"&&e[1]==="n")e[2]==="-"?e=e.slice(3):d0(sl,o)?e=o.slice(2):e=o[2]+e.slice(3),t&&Rt.rel(r,e,t,!1),n&&Rt.ael(r,e,n,!1);else{const l=jp(n);if((a||l&&n!==null)&&!i)try{if(r.tagName.includes("-"))r[e]=n;else{const u=n??"";e==="list"?a=!1:(t==null||r[e]!=u)&&(r[e]=u)}}catch{}let c=!1;o!==(o=o.replace(/^xlink\:?/,""))&&(e=o,c=!0),n==null||n===!1?(n!==!1||r.getAttribute(e)==="")&&(c?r.removeAttributeNS(n0,e):r.removeAttribute(e)):(!a||s&4||i)&&!l&&(n=n===!0?"":n,c?r.setAttributeNS(n0,e,n):r.setAttribute(e,n))}}},dC=/\s/,l0=r=>r?r.split(dC):[],Y2=(r,e,t,n)=>{const i=e.$elm$.nodeType===11&&e.$elm$.host?e.$elm$.host:e.$elm$,s=r&&r.$attrs$||s0,a=e.$attrs$||s0;for(n in s)n in a||a0(i,n,s[n],void 0,t,e.$flags$);for(n in a)a0(i,n,s[n],a[n],t,e.$flags$)},Zc=(r,e,t,n)=>{const i=e.$children$[t];let s=0,a,o;if(i.$text$!==null)a=i.$elm$=vi.createTextNode(i.$text$);else{if(gr||(gr=i.$tag$==="svg"),a=i.$elm$=vi.createElementNS(gr?nC:iC,i.$tag$),gr&&i.$tag$==="foreignObject"&&(gr=!1),Y2(null,i,gr),sC(pc)&&a["s-si"]!==pc&&a.classList.add(a["s-si"]=pc),i.$children$)for(s=0;s<i.$children$.length;++s)o=Zc(r,i,s),o&&a.appendChild(o);i.$tag$==="svg"?gr=!1:a.tagName==="foreignObject"&&(gr=!0)}return a},J2=(r,e,t,n,i,s)=>{let a=r,o;for(a.shadowRoot&&a.tagName===G2&&(a=a.shadowRoot);i<=s;++i)n[i]&&(o=Zc(null,t,i),o&&(n[i].$elm$=o,a.insertBefore(o,e)))},Q2=(r,e,t,n,i)=>{for(;e<=t;++e)(n=r[e])&&(i=n.$elm$,e_(n),i.remove())},uC=(r,e,t,n)=>{let i=0,s=0,a=0,o=0,l=e.length-1,c=e[0],u=e[l],d=n.length-1,g=n[0],_=n[d],y,b;for(;i<=l&&s<=d;)if(c==null)c=e[++i];else if(u==null)u=e[--l];else if(g==null)g=n[++s];else if(_==null)_=n[--d];else if(Hl(c,g))ws(c,g),c=e[++i],g=n[++s];else if(Hl(u,_))ws(u,_),u=e[--l],_=n[--d];else if(Hl(c,_))ws(c,_),r.insertBefore(c.$elm$,u.$elm$.nextSibling),c=e[++i],_=n[--d];else if(Hl(u,g))ws(u,g),r.insertBefore(u.$elm$,c.$elm$),u=e[--l],g=n[++s];else{for(a=-1,o=i;o<=l;++o)if(e[o]&&e[o].$key$!==null&&e[o].$key$===g.$key$){a=o;break}a>=0?(b=e[a],b.$tag$!==g.$tag$?y=Zc(e&&e[s],t,a):(ws(b,g),e[a]=void 0,y=b.$elm$),g=n[++s]):(y=Zc(e&&e[s],t,s),g=n[++s]),y&&c.$elm$.parentNode.insertBefore(y,c.$elm$)}i>l?J2(r,n[d+1]==null?null:n[d+1].$elm$,t,n,s,d):s>d&&Q2(e,i,l)},Hl=(r,e)=>r.$tag$===e.$tag$?r.$key$===e.$key$:!1,ws=(r,e)=>{const t=e.$elm$=r.$elm$,n=r.$children$,i=e.$children$,s=e.$tag$,a=e.$text$;a===null?(gr=s==="svg"?!0:s==="foreignObject"?!1:gr,s==="slot"||Y2(r,e,gr),n!==null&&i!==null?uC(t,n,e,i):i!==null?(r.$text$!==null&&(t.textContent=""),J2(t,null,e,i,0,i.length-1)):n!==null&&Q2(n,0,n.length-1),gr&&s==="svg"&&(gr=!1)):r.$text$!==a&&(t.data=a)},e_=r=>{r.$attrs$&&r.$attrs$.ref&&r.$attrs$.ref(null),r.$children$&&r.$children$.map(e_)},hC=(r,e)=>{const t=r.$hostElement$,n=r.$cmpMeta$,i=r.$vnode$||Xc(null,null),s=aC(e)?e:Z2(null,null,e);G2=t.tagName,n.$attrsToReflect$&&(s.$attrs$=s.$attrs$||{},n.$attrsToReflect$.map(([a,o])=>s.$attrs$[o]=t[a])),s.$tag$=null,s.$flags$|=4,r.$vnode$=s,s.$elm$=i.$elm$=t.shadowRoot||t,pc=t["s-sc"],ws(i,s)},fC=r=>zn(r).$hostElement$,KI=(r,e,t)=>{const n=fC(r);return{emit:i=>t_(n,e,{bubbles:!!(t&4),composed:!!(t&2),cancelable:!!(t&1),detail:i})}},t_=(r,e,t)=>{const n=Rt.ce(e,t);return r.dispatchEvent(n),n},r_=(r,e)=>{e&&!r.$onRenderResolve$&&e["s-p"]&&e["s-p"].push(new Promise(t=>r.$onRenderResolve$=t))},Pd=(r,e)=>{if(r.$flags$|=16,r.$flags$&4){r.$flags$|=512;return}return r_(r,r.$ancestorComponent$),AC(()=>pC(r,e))},pC=(r,e)=>{const t=Vn("scheduleUpdate",r.$cmpMeta$.$tagName$),n=r.$lazyInstance$;let i;return e&&(r.$flags$|=256,r.$queuedListeners$&&(r.$queuedListeners$.map(([s,a])=>_i(n,s,a)),r.$queuedListeners$=null),i=_i(n,"componentWillLoad")),i=c0(i,()=>_i(n,"componentWillRender")),t(),c0(i,()=>gC(r,n,e))},gC=async(r,e,t)=>{const n=r.$hostElement$,i=Vn("update",r.$cmpMeta$.$tagName$),s=n["s-rc"];t&&rC(r);const a=Vn("render",r.$cmpMeta$.$tagName$);mC(r,e),s&&(s.map(o=>o()),n["s-rc"]=void 0),a(),i();{const o=n["s-p"],l=()=>vC(r);o.length===0?l():(Promise.all(o).then(l),r.$flags$|=4,o.length=0)}},mC=(r,e,t)=>{try{e=e.render(),r.$flags$&=-17,r.$flags$|=2,hC(r,e)}catch(n){Z(n,r.$hostElement$)}return null},vC=r=>{const e=r.$cmpMeta$.$tagName$,t=r.$hostElement$,n=Vn("postUpdate",e),i=r.$lazyInstance$,s=r.$ancestorComponent$;_i(i,"componentDidRender"),r.$flags$&64?(_i(i,"componentDidUpdate"),n()):(r.$flags$|=64,i_(t),_i(i,"componentDidLoad"),n(),r.$onReadyResolve$(t),s||n_()),r.$onInstanceResolve$(t),r.$onRenderResolve$&&(r.$onRenderResolve$(),r.$onRenderResolve$=void 0),r.$flags$&512&&Vp(()=>Pd(r,!1)),r.$flags$&=-517},_C=r=>{{const e=zn(r),t=e.$hostElement$.isConnected;return t&&(e.$flags$&18)===2&&Pd(e,!1),t}},n_=r=>{i_(vi.documentElement),Vp(()=>t_(sl,"appload",{detail:{namespace:KS}}))},_i=(r,e,t)=>{if(r&&r[e])try{return r[e](t)}catch(n){Z(n)}},c0=(r,e)=>r&&r.then?r.then(e):e(),i_=r=>r.classList.add("hydrated"),yC=(r,e)=>r!=null&&!jp(r)?e&4?r==="false"?!1:r===""||!!r:e&2?parseFloat(r):e&1?String(r):r:r,bC=(r,e)=>zn(r).$instanceValues$.get(e),wC=(r,e,t,n)=>{const i=zn(r),s=i.$hostElement$,a=i.$instanceValues$.get(e),o=i.$flags$,l=i.$lazyInstance$;t=yC(t,n.$members$[e][0]);const c=Number.isNaN(a)&&Number.isNaN(t),u=t!==a&&!c;if((!(o&8)||a===void 0)&&u&&(i.$instanceValues$.set(e,t),l)){if(n.$watchers$&&o&128){const d=n.$watchers$[e];d&&d.map(g=>{try{l[g](t,a,e)}catch(_){Z(_,s)}})}if((o&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(t,a,e)===!1)return;Pd(i,!1)}}},s_=(r,e,t)=>{if(e.$members$){r.watchers&&(e.$watchers$=r.watchers);const n=Object.entries(e.$members$),i=r.prototype;if(n.map(([s,[a]])=>{a&31||t&2&&a&32?Object.defineProperty(i,s,{get(){return bC(this,s)},set(o){wC(this,s,o,e)},configurable:!0,enumerable:!0}):t&1&&a&64&&Object.defineProperty(i,s,{value(...o){const l=zn(this);return l.$onInstancePromise$.then(()=>l.$lazyInstance$[s](...o))}})}),t&1){const s=new Map;i.attributeChangedCallback=function(a,o,l){Rt.jmp(()=>{const c=s.get(a);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(i.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},r.observedAttributes=n.filter(([a,o])=>o[0]&15).map(([a,o])=>{const l=o[1]||a;return s.set(l,a),o[0]&512&&e.$attrsToReflect$.push([a,l]),l})}}return r},SC=async(r,e,t,n,i)=>{if(!(e.$flags$&32)){{if(e.$flags$|=32,i=kC(t),i.then){const l=QS();i=await i,l()}i.isProxied||(t.$watchers$=i.watchers,s_(i,t,2),i.isProxied=!0);const o=Vn("createInstance",t.$tagName$);e.$flags$|=8;try{new i(e)}catch(l){Z(l)}e.$flags$&=-9,e.$flags$|=128,o(),o_(e.$lazyInstance$)}if(i.style){let o=i.style;const l=X2(t);if(!Yc.has(l)){const c=Vn("registerStyles",t.$tagName$);eC(l,o,!!(t.$flags$&1)),c()}}}const s=e.$ancestorComponent$,a=()=>Pd(e,!0);s&&s["s-rc"]?s["s-rc"].push(a):a()},o_=r=>{_i(r,"connectedCallback")},CC=r=>{if(!(Rt.$flags$&1)){const e=zn(r),t=e.$cmpMeta$,n=Vn("connectedCallback",t.$tagName$);if(e.$flags$&1)q2(r,e,t.$listeners$),o_(e.$lazyInstance$);else{e.$flags$|=1;{let i=r;for(;i=i.parentNode||i.host;)if(i["s-p"]){r_(e,e.$ancestorComponent$=i);break}}t.$members$&&Object.entries(t.$members$).map(([i,[s]])=>{if(s&31&&r.hasOwnProperty(i)){const a=r[i];delete r[i],r[i]=a}}),SC(r,e,t)}n()}},EC=r=>{if(!(Rt.$flags$&1)){const e=zn(r),t=e.$lazyInstance$;e.$rmListeners$&&(e.$rmListeners$.map(n=>n()),e.$rmListeners$=void 0),_i(t,"disconnectedCallback")}},xC=(r,e={})=>{const t=Vn(),n=[],i=e.exclude||[],s=sl.customElements,a=vi.head,o=a.querySelector("meta[charset]"),l=vi.createElement("style"),c=[];let u,d=!0;Object.assign(Rt,e),Rt.$resourcesUrl$=new URL(e.resourcesUrl||"./",vi.baseURI).href,r.map(g=>{g[1].map(_=>{const y={$flags$:_[0],$tagName$:_[1],$members$:_[2],$listeners$:_[3]};y.$members$=_[2],y.$listeners$=_[3],y.$attrsToReflect$=[],y.$watchers$={};const b=y.$tagName$,p=class extends HTMLElement{constructor(f){super(f),f=this,TC(f,y),y.$flags$&1&&f.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),d?c.push(this):Rt.jmp(()=>CC(this))}disconnectedCallback(){Rt.jmp(()=>EC(this)),Rt.raf(()=>{var m;const f=zn(this),h=c.findIndex(v=>v===this);h>-1&&c.splice(h,1),((m=f==null?void 0:f.$vnode$)==null?void 0:m.$elm$)instanceof Node&&!f.$vnode$.$elm$.isConnected&&delete f.$vnode$.$elm$})}componentOnReady(){return zn(this).$onReadyPromise$}};y.$lazyBundleId$=g[0],!i.includes(b)&&!s.get(b)&&(n.push(b),s.define(b,s_(p,y,1)))})}),l.innerHTML=n+JS,l.setAttribute("data-styles",""),a.insertBefore(l,o?o.nextSibling:a.firstChild),d=!1,c.length?c.map(g=>g.connectedCallback()):Rt.jmp(()=>u=setTimeout(n_,30)),t()},qI=(r,e)=>e,$p=new WeakMap,zn=r=>$p.get(r),XI=(r,e)=>$p.set(e.$lazyInstance$=r,e),TC=(r,e)=>{const t={$flags$:0,$hostElement$:r,$cmpMeta$:e,$instanceValues$:new Map};return t.$onInstancePromise$=new Promise(n=>t.$onInstanceResolve$=n),t.$onReadyPromise$=new Promise(n=>t.$onReadyResolve$=n),r["s-p"]=[],r["s-rc"]=[],q2(r,t,e.$listeners$),$p.set(r,t)},d0=(r,e)=>e in r,Z=(r,e)=>(0,console.error)(r,e),Uu=new Map,kC=(r,e,t)=>{const n=r.$tagName$.replace(/-/g,"_"),i=r.$lazyBundleId$,s=Uu.get(i);if(s)return s[n];{const a=o=>(Uu.set(i,o),o[n]);switch(i){case"vega-accordion":return Y(()=>import("./vega-accordion.entry-CfEINT7F.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url).then(a,Z);case"vega-app-footer":return Y(()=>import("./vega-app-footer.entry-dxKlVGHF.js"),__vite__mapDeps([12,3,2,13]),import.meta.url).then(a,Z);case"vega-app-header-button":return Y(()=>import("./vega-app-header-button.entry-BqvJf9ih.js"),__vite__mapDeps([14,3,4,5,6,7,2,15,10,8,9,16,17]),import.meta.url).then(a,Z);case"vega-backdrop":return Y(()=>import("./vega-backdrop.entry-zvDuVOIm.js"),__vite__mapDeps([18,3,2]),import.meta.url).then(a,Z);case"vega-box":return Y(()=>import("./vega-box.entry-CKRpS_7q.js"),__vite__mapDeps([19,3,4,5,6,7,2,20]),import.meta.url).then(a,Z);case"vega-flex":return Y(()=>import("./vega-flex.entry-668-6FhU.js"),__vite__mapDeps([21,3,4,5,6,7,2,20]),import.meta.url).then(a,Z);case"vega-grid":return Y(()=>import("./vega-grid.entry-Dm_eAuM6.js"),__vite__mapDeps([22,4,5,6,7,3,2]),import.meta.url).then(a,Z);case"vega-breadcrumb":return Y(()=>import("./vega-breadcrumb.entry-Bi43hitV.js"),__vite__mapDeps([23,2,3,15,10,24]),import.meta.url).then(a,Z);case"vega-button":return Y(()=>import("./vega-button.entry-D3XB1oFN.js"),__vite__mapDeps([25,3,5,6,2,10,15]),import.meta.url).then(a,Z);case"vega-button-circle":return Y(()=>import("./vega-button-circle.entry-Q2J7n2u7.js"),__vite__mapDeps([26,3,4,5,6,7,2,10,15,16,17]),import.meta.url).then(a,Z);case"vega-button-link":return Y(()=>import("./vega-button-link.entry-DMdYQDOf.js"),__vite__mapDeps([27,3,2,10,15,16,17]),import.meta.url).then(a,Z);case"vega-card":return Y(()=>import("./vega-card.entry-C2ddJjpk.js"),__vite__mapDeps([28,3,4,5,6,7,2]),import.meta.url).then(a,Z);case"vega-carousel":return Y(()=>import("./vega-carousel.entry-DGpl69kz.js"),__vite__mapDeps([29,30,31,3,32,5,6,2,10,33]),import.meta.url).then(a,Z);case"vega-line-chart":return Y(()=>import("./vega-line-chart.entry-CyhXfR8n.js"),__vite__mapDeps([34,35,6,36,3,2]),import.meta.url).then(a,Z);case"vega-bar-chart":return Y(()=>import("./vega-bar-chart.entry-CkwKn-ae.js"),__vite__mapDeps([37,35,6,36,2]),import.meta.url).then(a,Z);case"vega-pie-chart":return Y(()=>import("./vega-pie-chart.entry-DXqyhKag.js"),__vite__mapDeps([38,35,6,3,2]),import.meta.url).then(a,Z);case"vega-chip":return Y(()=>import("./vega-chip.entry-Bp2Li7OI.js"),__vite__mapDeps([39,3,5,6,4,7,31,2,10,15]),import.meta.url).then(a,Z);case"vega-counter-badge":return Y(()=>import("./vega-counter-badge.entry-BW_zAciV.js"),__vite__mapDeps([40,3,2]),import.meta.url).then(a,Z);case"vega-color-picker":return Y(()=>import("./vega-color-picker.entry-DMEFhqQB.js"),__vite__mapDeps([41,42,31,3,43,17,44,6,45,2,10]),import.meta.url).then(a,Z);case"vega-combo-box":return Y(()=>import("./vega-combo-box.entry-D4ug2PTD.js"),__vite__mapDeps([46,42,3,2,43,17,44,6,45,15,10,31,4,5,7,47,48]),import.meta.url).then(a,Z);case"vega-field-error":return Y(()=>import("./vega-field-error.entry-sTqISZIh.js"),__vite__mapDeps([49,3,2]),import.meta.url).then(a,Z);case"vega-field-label":return Y(()=>import("./vega-field-label.entry-B__dQ20F.js"),__vite__mapDeps([50,3,2,10,31,11]),import.meta.url).then(a,Z);case"vega-font":return Y(()=>import("./vega-font.entry-DcCrpbh1.js"),__vite__mapDeps([51,3,1,2,52,5,6,4,7]),import.meta.url).then(a,Z);case"vega-form":return Y(()=>import("./vega-form.entry-BY-iqkFc.js"),__vite__mapDeps([53,3,1,2,10,15,54,45,43,17,44,6,55,56]),import.meta.url).then(a,Z);case"vega-icon":return Y(()=>import("./vega-icon.entry-D0_veR1Z.js"),__vite__mapDeps([57,3,4,5,6,7,2]),import.meta.url).then(a,Z);case"vega-flag-icon":return Y(()=>import("./vega-flag-icon.entry-DxPXoyZ_.js"),__vite__mapDeps([58,3,2,4,5,6,7]),import.meta.url).then(a,Z);case"vega-image-uploader":return Y(()=>import("./vega-image-uploader.entry-C1ApH3Dq.js"),__vite__mapDeps([59,3,42,5,6,1,2,31,60,43,17,44,45,15,10,11,61]),import.meta.url).then(a,Z);case"vega-input-credit-card":return Y(()=>import("./vega-input-credit-card.entry-dGTMeBXb.js"),__vite__mapDeps([62,42,3,2,43,17,44,6,45,10,15,63,64]),import.meta.url).then(a,Z);case"vega-input-select":return Y(()=>import("./vega-input-select.entry-nlgDZyki.js"),__vite__mapDeps([65,42,3,5,6,2,31,8,9,43,17,44,45,10,15,11]),import.meta.url).then(a,Z);case"vega-input":return Y(()=>import("./vega-input.entry-BtU6J85I.js"),__vite__mapDeps([66,67,68,42,3,52,1,2,43,17,44,6,45,10,63,64,69,70,31,71,16]),import.meta.url).then(a,Z);case"vega-item-toggle":return Y(()=>import("./vega-item-toggle.entry-CAUYBFcM.js"),__vite__mapDeps([72,3,10,2,33]),import.meta.url).then(a,Z);case"vega-pagination":return Y(()=>import("./vega-pagination.entry-T9P8GzDt.js"),__vite__mapDeps([73,3,74,15,10,2,11,5,6]),import.meta.url).then(a,Z);case"vega-pagination-page-selector-mobile":return Y(()=>import("./vega-pagination-page-selector-mobile.entry-BDFn5APr.js"),__vite__mapDeps([75,2,3,15]),import.meta.url).then(a,Z);case"vega-pagination-page-size-selector-mobile":return Y(()=>import("./vega-pagination-page-size-selector-mobile.entry-VDwjbmBP.js"),__vite__mapDeps([76,2,3,11,74]),import.meta.url).then(a,Z);case"vega-slot-container":return Y(()=>import("./vega-slot-container.entry-CJ33BQ0e.js"),__vite__mapDeps([77,2]),import.meta.url).then(a,Z);case"vega-stepper":return Y(()=>import("./vega-stepper.entry-BrHGbs7A.js"),__vite__mapDeps([78,67,3,2,43,17,44,6,45,15,10]),import.meta.url).then(a,Z);case"vega-segment-control":return Y(()=>import("./vega-segment-control.entry-BwMgjNjf.js"),__vite__mapDeps([79,3,2,10]),import.meta.url).then(a,Z);case"vega-text":return Y(()=>import("./vega-text.entry-BbuifURi.js"),__vite__mapDeps([80,2]),import.meta.url).then(a,Z);case"vega-textarea":return Y(()=>import("./vega-textarea.entry-62v-CMjF.js"),__vite__mapDeps([81,68,42,3,2,43,17,44,6,45,10,15]),import.meta.url).then(a,Z);case"vega-toggle-switch":return Y(()=>import("./vega-toggle-switch.entry-Dw9nwAY4.js"),__vite__mapDeps([82,10,31,3,2,43,17,44,6,45,83]),import.meta.url).then(a,Z);case"vega-section-title":return Y(()=>import("./vega-section-title.entry-DMRteeP5.js"),__vite__mapDeps([84,3,2]),import.meta.url).then(a,Z);case"vega-input-range":return Y(()=>import("./vega-input-range.entry-DGIIQve0.js"),__vite__mapDeps([85,3,2,10,43,17,44,6,45,15,86,31,11]),import.meta.url).then(a,Z);case"vega-banner":return Y(()=>import("./vega-banner.entry-BP5KtjWa.js"),__vite__mapDeps([87,2,3,31,10]),import.meta.url).then(a,Z);case"vega-divider":return Y(()=>import("./vega-divider.entry-C4hdehoc.js"),__vite__mapDeps([88,3,2,5,6,4,7]),import.meta.url).then(a,Z);case"vega-skeleton":return Y(()=>import("./vega-skeleton.entry-G3BcZuxx.js"),__vite__mapDeps([89,2,3]),import.meta.url).then(a,Z);case"vega-input-phone-number":return Y(()=>import("./vega-input-phone-number.entry-BiiZYFI1.js"),__vite__mapDeps([90,3,2,64,16,17,43,44,6,45,10,91,15]),import.meta.url).then(a,Z);case"vega-signature-capture":return Y(()=>import("./vega-signature-capture.entry-DiooBJdu.js"),__vite__mapDeps([92,2,3,4,5,6,7,10,43,17,44,45,42,11]),import.meta.url).then(a,Z);case"vega-hint":return Y(()=>import("./vega-hint.entry-w8vfPncB.js"),__vite__mapDeps([93,2,3]),import.meta.url).then(a,Z);case"vega-file-uploader":return Y(()=>import("./vega-file-uploader.entry-CO-VykBt.js"),__vite__mapDeps([94,3,2,31,95,10,43,17,44,6,45,96,42,60,11]),import.meta.url).then(a,Z);case"vega-input-numeric":return Y(()=>import("./vega-input-numeric.entry-DbKsmljR.js"),__vite__mapDeps([97,3,2,15,10,47,48,43,17,44,6,45,42,54,67]),import.meta.url).then(a,Z);case"vega-rich-text-special-characters-panel":return Y(()=>import("./vega-rich-text-special-characters-panel.entry-DGrfdbvp.js"),__vite__mapDeps([98,3,2,10,47,48,11]),import.meta.url).then(a,Z);case"vega-rich-text-content":return Y(()=>import("./vega-rich-text-content.entry-C0oUM9kr.js"),__vite__mapDeps([99,2,3,100,31,45,70,6,61]),import.meta.url).then(a,Z);case"vega-brand-logo":return Y(()=>import("./vega-brand-logo.entry-D55jTPdD.js"),__vite__mapDeps([101,3,2,61]),import.meta.url).then(a,Z);case"vega-code-block":return Y(()=>import("./vega-code-block.entry-DKuulw1O.js"),__vite__mapDeps([102,2,3,95,10,11,103,104,30,47,48,15,24]),import.meta.url).then(a,Z);case"vega-input-passcode":return Y(()=>import("./vega-input-passcode.entry-AxuvDAd-.js"),__vite__mapDeps([105,2,3,10,47,48,15,43,17,44,6,45,42]),import.meta.url).then(a,Z);case"vega-color-swatch":return Y(()=>import("./vega-color-swatch.entry-DcQLUHHI.js"),__vite__mapDeps([106,2,3,31,10,11]),import.meta.url).then(a,Z);case"vega-color-swatch-picker":return Y(()=>import("./vega-color-swatch-picker.entry-CD1Epzrl.js"),__vite__mapDeps([107,2,42,3,43,17,44,6,45,10,11,15]),import.meta.url).then(a,Z);case"vega-checkbox_2":return Y(()=>import("./vega-checkbox_2.entry-C21WN-0W.js"),__vite__mapDeps([108,3,109,2,43,17,44,6,45,10,15,16,42,52,56]),import.meta.url).then(a,Z);case"vega-date-picker_2":return Y(()=>import("./vega-date-picker_2.entry-CAk2ZvQC.js"),__vite__mapDeps([110,3,111,2,43,17,44,6,45,31,63,64,69,70,47,48,52,10,15,11,112,5,30,71,113,114]),import.meta.url).then(a,Z);case"vega-dialog_2":return Y(()=>import("./vega-dialog_2.entry-BrWAWuH-.js"),__vite__mapDeps([115,3,7,2,10,15,24,33,17,44,6,31,113,30]),import.meta.url).then(a,Z);case"vega-page-notification_2":return Y(()=>import("./vega-page-notification_2.entry-DjquyS0N.js"),__vite__mapDeps([116,31,3,2]),import.meta.url).then(a,Z);case"vega-loader-wrapper_2":return Y(()=>import("./vega-loader-wrapper_2.entry-DOe-Q5fc.js"),__vite__mapDeps([117,2,3,5,6]),import.meta.url).then(a,Z);case"vega-popover_2":return Y(()=>import("./vega-popover_2.entry-CUnGGq6S.js"),__vite__mapDeps([118,3,119,48,2,10,112,5,6,113,30,4,7]),import.meta.url).then(a,Z);case"vega-progress-tracker_2":return Y(()=>import("./vega-progress-tracker_2.entry-BN8MMnIz.js"),__vite__mapDeps([120,3,2,10,33,31,30,54,17,5,6,104,45]),import.meta.url).then(a,Z);case"vega-radio_2":return Y(()=>import("./vega-radio_2.entry-D3q0-wxn.js"),__vite__mapDeps([121,31,3,2,10,42,52,43,17,44,6,45,56,15,47,48]),import.meta.url).then(a,Z);case"vega-tab-group_2":return Y(()=>import("./vega-tab-group_2.entry-BUeLgXca.js"),__vite__mapDeps([122,3,1,2,31,30,15,10]),import.meta.url).then(a,Z);case"vega-time-picker_2":return Y(()=>import("./vega-time-picker_2.entry-DpI-krpy.js"),__vite__mapDeps([123,52,124,3,2,43,17,44,6,45,31,112,5,71,47,48,15,10,11]),import.meta.url).then(a,Z);case"vega-tooltip_2":return Y(()=>import("./vega-tooltip_2.entry-CL3u7qCj.js"),__vite__mapDeps([125,3,119,48,2,112,5,6,33]),import.meta.url).then(a,Z);case"vega-button-group_2":return Y(()=>import("./vega-button-group_2.entry-CeqFPsfs.js"),__vite__mapDeps([126,3,2,54,10,15,17,44,6,45]),import.meta.url).then(a,Z);case"vega-selection-tile_2":return Y(()=>import("./vega-selection-tile_2.entry-D0Rj0qTo.js"),__vite__mapDeps([127,3,2,10,45,15,56,54,43,17,44,6,42]),import.meta.url).then(a,Z);case"vega-selection-chip_2":return Y(()=>import("./vega-selection-chip_2.entry-BzfGr-t3.js"),__vite__mapDeps([128,3,2,5,6,31,45,10,17,44,54,15,43,42]),import.meta.url).then(a,Z);case"vega-sidenav_3":return Y(()=>import("./vega-sidenav_3.entry-CoM3yggu.js"),__vite__mapDeps([129,6,3,2,31,54,32,5,10,45]),import.meta.url).then(a,Z);case"vega-rich-text-table-properties_3":return Y(()=>import("./vega-rich-text-table-properties_3.entry-D6KltaW8.js"),__vite__mapDeps([130,2,11,3,131,15,31,61,47,48,9,6]),import.meta.url).then(a,Z);case"vega-calendar_4":return Y(()=>import("./vega-calendar_4.entry-Cj_Aij7Z.js"),__vite__mapDeps([132,3,2,31,10,114,15,6,54,11,104,30,47,48,1,45]),import.meta.url).then(a,Z);case"vega-rich-text-editor_4":return Y(()=>import("./vega-rich-text-editor_4.entry-CIo_VUmI.js"),__vite__mapDeps([133,2,3,31,100,70,43,17,44,6,45,10,54,131,103,104,30,47,48,61,134,15,11,9,95]),import.meta.url).then(a,Z);case"vega-dropdown_5":return Y(()=>import("./vega-dropdown_5.entry-BX3pQZ88.js"),__vite__mapDeps([135,3,1,2,31,47,48,112,5,6,113,30,54,17,10,56,11,15,24,45]),import.meta.url).then(a,Z);case"vega-left-nav_5":return Y(()=>import("./vega-left-nav_5.entry-DDK5HUna.js"),__vite__mapDeps([136,3,1,2,32,119,48,10,24,54,13,8,9,45,33,4,5,6,7]),import.meta.url).then(a,Z);case"vega-table_11":return Y(()=>import("./vega-table_11.entry-4Qi4DN0-.js"),__vite__mapDeps([137,1,2,5,6,3,17,44,54,15,10,55,11,30,45,31,8,9]),import.meta.url).then(a,Z)}}return Y(()=>import(`./${i}.entry.js`),[],import.meta.url).then(a=>(Uu.set(i,a),a[n]),Z)},Yc=new Map,u0=[],a_=[],LC=(r,e)=>t=>{r.push(t),mf||(mf=!0,Rt.$flags$&4?Vp(vf):Rt.raf(vf))},h0=r=>{for(let e=0;e<r.length;e++)try{r[e](performance.now())}catch(t){Z(t)}r.length=0},vf=()=>{h0(u0),h0(a_),(mf=u0.length>0)&&Rt.raf(vf)},Vp=r=>K2().then(r),AC=LC(a_);class rt{static setVegaLogLevel(e){this.logLevel=e}static log(...e){this.shouldLog("log")&&console.log(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...e)}static warn(...e){this.shouldLog("warn")&&console.warn(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...e)}static error(...e){this.shouldLog("error")&&console.error(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...e)}static shouldLog(e){const t=this.LOG_LEVELS.findIndex(i=>i===e),n=this.LOG_LEVELS.findIndex(i=>i===this.logLevel);return t<=n}}rt.logLevel="error";rt.LOG_PREFIX_STR="[Vega]";rt.LOG_PREFIX_STYLE="font-weight: bold";rt.LOG_LEVELS=["off","error","warn","log"];function RC(r){rt.setVegaLogLevel(r)}class zp{static log(...e){console.log(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...e)}static warn(...e){console.warn(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...e)}static error(...e){console.error(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...e)}}zp.LOG_PREFIX_STR="[Vega]";zp.LOG_PREFIX_STYLE="font-weight: bold";const Nn=Symbol("ProcessorInternalCallback"),Fd=Symbol("SlimmerConsumedBy"),qi=Symbol("ConsumerSlimmers"),l_=Symbol("CurrentlyInvokedMethodName");function c_(r){return function(e,t){Object.defineProperty(e,t,{get:DC(t,r),set:OC(t,r),configurable:!0})}}function OC(r,e={}){return function(t){var n;if(!e.writable){zp.error(`${r} is not writable`);return}const i=this[Fd],s=(n=e.componentFieldName)!==null&&n!==void 0?n:r;i[s]=t}}function DC(r,e={}){return function(){const{componentFieldName:t}=e;return this[Fd][t??r]}}function En(r){return function(e,t){NC(e),e[Nn].push({componentMethodName:r,slimmerMethodName:t})}}function NC(r){Object.prototype.hasOwnProperty.call(r,Nn)||(r[Nn]=r[Nn]?[].concat(r[Nn]):[])}function IC(){return function(r,e){Object.defineProperty(r,e,{set:BC(e),get:MC(e)})}}function BC(r){return function(e){this[qi]||(this[qi]=new Map),this[qi].set(r,e),e[Fd]=this,PC(e,this)}}function MC(r){return function(){return this[qi].get(r)}}function PC(r,e){const t=r.constructor.prototype;if(t[Nn])for(const n of t[Nn])e[n.componentMethodName]=FC(e,r,e[n.componentMethodName],n)}function FC(r,e,t,n){return function(...i){const s=t==null?void 0:t.apply(r,i);return s&&typeof s.then=="function"?s.then(()=>e[n.slimmerMethodName].call(e,...i)):e[n.slimmerMethodName].call(e,...i)}}class ol{}class d_{static register(e){this.globalSlimmers=e}}d_.globalSlimmers=[];function u_(r,e,t){return t={path:e,exports:{},require:function(n,i){return HC()}},r(t,t.exports),t.exports}function HC(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var jC=u_(function(r){(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,i){return n<<i|n>>>32-i},rotr:function(n,i){return n<<32-i|n>>>i},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var i=0;i<n.length;i++)n[i]=t.endian(n[i]);return n},randomBytes:function(n){for(var i=[];n>0;n--)i.push(Math.floor(Math.random()*256));return i},bytesToWords:function(n){for(var i=[],s=0,a=0;s<n.length;s++,a+=8)i[a>>>5]|=n[s]<<24-a%32;return i},wordsToBytes:function(n){for(var i=[],s=0;s<n.length*32;s+=8)i.push(n[s>>>5]>>>24-s%32&255);return i},bytesToHex:function(n){for(var i=[],s=0;s<n.length;s++)i.push((n[s]>>>4).toString(16)),i.push((n[s]&15).toString(16));return i.join("")},hexToBytes:function(n){for(var i=[],s=0;s<n.length;s+=2)i.push(parseInt(n.substr(s,2),16));return i},bytesToBase64:function(n){for(var i=[],s=0;s<n.length;s+=3)for(var a=n[s]<<16|n[s+1]<<8|n[s+2],o=0;o<4;o++)s*8+o*6<=n.length*8?i.push(e.charAt(a>>>6*(3-o)&63)):i.push("=");return i.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var i=[],s=0,a=0;s<n.length;a=++s%4)a!=0&&i.push((e.indexOf(n.charAt(s-1))&Math.pow(2,-2*a+8)-1)<<a*2|e.indexOf(n.charAt(s))>>>6-a*2);return i}};r.exports=t})()}),_f={utf8:{stringToBytes:function(r){return _f.bin.stringToBytes(unescape(encodeURIComponent(r)))},bytesToString:function(r){return decodeURIComponent(escape(_f.bin.bytesToString(r)))}},bin:{stringToBytes:function(r){for(var e=[],t=0;t<r.length;t++)e.push(r.charCodeAt(t)&255);return e},bytesToString:function(r){for(var e=[],t=0;t<r.length;t++)e.push(String.fromCharCode(r[t]));return e.join("")}}},f0=_f;/*!
|
|
42
|
+
* Determine if an object is a Buffer
|
|
43
|
+
*
|
|
44
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
45
|
+
* @license MIT
|
|
46
|
+
*/var $C=function(r){return r!=null&&(h_(r)||VC(r)||!!r._isBuffer)};function h_(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function VC(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&h_(r.slice(0,0))}var zC=u_(function(r){(function(){var e=jC,t=f0.utf8,n=$C,i=f0.bin,s=function(a,o){a.constructor==String?o&&o.encoding==="binary"?a=i.stringToBytes(a):a=t.stringToBytes(a):n(a)?a=Array.prototype.slice.call(a,0):!Array.isArray(a)&&a.constructor!==Uint8Array&&(a=a.toString());for(var l=e.bytesToWords(a),c=a.length*8,u=1732584193,d=-271733879,g=-1732584194,_=271733878,y=0;y<l.length;y++)l[y]=(l[y]<<8|l[y]>>>24)&16711935|(l[y]<<24|l[y]>>>8)&4278255360;l[c>>>5]|=128<<c%32,l[(c+64>>>9<<4)+14]=c;for(var b=s._ff,p=s._gg,f=s._hh,h=s._ii,y=0;y<l.length;y+=16){var m=u,v=d,w=g,C=_;u=b(u,d,g,_,l[y+0],7,-680876936),_=b(_,u,d,g,l[y+1],12,-389564586),g=b(g,_,u,d,l[y+2],17,606105819),d=b(d,g,_,u,l[y+3],22,-1044525330),u=b(u,d,g,_,l[y+4],7,-176418897),_=b(_,u,d,g,l[y+5],12,1200080426),g=b(g,_,u,d,l[y+6],17,-1473231341),d=b(d,g,_,u,l[y+7],22,-45705983),u=b(u,d,g,_,l[y+8],7,1770035416),_=b(_,u,d,g,l[y+9],12,-1958414417),g=b(g,_,u,d,l[y+10],17,-42063),d=b(d,g,_,u,l[y+11],22,-1990404162),u=b(u,d,g,_,l[y+12],7,1804603682),_=b(_,u,d,g,l[y+13],12,-40341101),g=b(g,_,u,d,l[y+14],17,-1502002290),d=b(d,g,_,u,l[y+15],22,1236535329),u=p(u,d,g,_,l[y+1],5,-165796510),_=p(_,u,d,g,l[y+6],9,-1069501632),g=p(g,_,u,d,l[y+11],14,643717713),d=p(d,g,_,u,l[y+0],20,-373897302),u=p(u,d,g,_,l[y+5],5,-701558691),_=p(_,u,d,g,l[y+10],9,38016083),g=p(g,_,u,d,l[y+15],14,-660478335),d=p(d,g,_,u,l[y+4],20,-405537848),u=p(u,d,g,_,l[y+9],5,568446438),_=p(_,u,d,g,l[y+14],9,-1019803690),g=p(g,_,u,d,l[y+3],14,-187363961),d=p(d,g,_,u,l[y+8],20,1163531501),u=p(u,d,g,_,l[y+13],5,-1444681467),_=p(_,u,d,g,l[y+2],9,-51403784),g=p(g,_,u,d,l[y+7],14,1735328473),d=p(d,g,_,u,l[y+12],20,-1926607734),u=f(u,d,g,_,l[y+5],4,-378558),_=f(_,u,d,g,l[y+8],11,-2022574463),g=f(g,_,u,d,l[y+11],16,1839030562),d=f(d,g,_,u,l[y+14],23,-35309556),u=f(u,d,g,_,l[y+1],4,-1530992060),_=f(_,u,d,g,l[y+4],11,1272893353),g=f(g,_,u,d,l[y+7],16,-155497632),d=f(d,g,_,u,l[y+10],23,-1094730640),u=f(u,d,g,_,l[y+13],4,681279174),_=f(_,u,d,g,l[y+0],11,-358537222),g=f(g,_,u,d,l[y+3],16,-722521979),d=f(d,g,_,u,l[y+6],23,76029189),u=f(u,d,g,_,l[y+9],4,-640364487),_=f(_,u,d,g,l[y+12],11,-421815835),g=f(g,_,u,d,l[y+15],16,530742520),d=f(d,g,_,u,l[y+2],23,-995338651),u=h(u,d,g,_,l[y+0],6,-198630844),_=h(_,u,d,g,l[y+7],10,1126891415),g=h(g,_,u,d,l[y+14],15,-1416354905),d=h(d,g,_,u,l[y+5],21,-57434055),u=h(u,d,g,_,l[y+12],6,1700485571),_=h(_,u,d,g,l[y+3],10,-1894986606),g=h(g,_,u,d,l[y+10],15,-1051523),d=h(d,g,_,u,l[y+1],21,-2054922799),u=h(u,d,g,_,l[y+8],6,1873313359),_=h(_,u,d,g,l[y+15],10,-30611744),g=h(g,_,u,d,l[y+6],15,-1560198380),d=h(d,g,_,u,l[y+13],21,1309151649),u=h(u,d,g,_,l[y+4],6,-145523070),_=h(_,u,d,g,l[y+11],10,-1120210379),g=h(g,_,u,d,l[y+2],15,718787259),d=h(d,g,_,u,l[y+9],21,-343485551),u=u+m>>>0,d=d+v>>>0,g=g+w>>>0,_=_+C>>>0}return e.endian([u,d,g,_])};s._ff=function(a,o,l,c,u,d,g){var _=a+(o&l|~o&c)+(u>>>0)+g;return(_<<d|_>>>32-d)+o},s._gg=function(a,o,l,c,u,d,g){var _=a+(o&c|l&~c)+(u>>>0)+g;return(_<<d|_>>>32-d)+o},s._hh=function(a,o,l,c,u,d,g){var _=a+(o^l^c)+(u>>>0)+g;return(_<<d|_>>>32-d)+o},s._ii=function(a,o,l,c,u,d,g){var _=a+(l^(o|~c))+(u>>>0)+g;return(_<<d|_>>>32-d)+o},s._blocksize=16,s._digestsize=16,r.exports=function(a,o){if(a==null)throw new Error("Illegal argument "+a);var l=e.wordsToBytes(s(a,o));return o&&o.asBytes?l:o&&o.asString?i.bytesToString(l):e.bytesToHex(l)}})()});class ct{static setVegaTelemetryLogLevel(e){this.logLevel=e}static log(...e){this.shouldLog("log")&&console.log(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...e)}static debug(...e){this.shouldLog("debug")&&console.debug(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...e)}static warn(...e){this.shouldLog("warn")&&console.warn(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...e)}static error(...e){this.shouldLog("error")&&console.error(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...e)}static shouldLog(e){return this.LOG_LEVELS.indexOf(e)<=this.LOG_LEVELS.indexOf(this.logLevel)}}ct.logLevel="off",ct.LOG_PREFIX_STR="[VegaTelemetry]",ct.LOG_PREFIX_STYLE="font-weight: bold",ct.LOG_LEVELS=["off","error","warn","debug","log"],Object.assign(globalThis,{LogUtility:ct});class UC{constructor(e,t){this.environment=e,this.payload=t,this.id=zC(JSON.stringify({environment:e,payload:t}))}}var yf=new class{constructor(){this.runtimeMetrics=[],this.runtimeMetricsIds=new Set([])}collect(r){ct.debug("Collecting the runtime metrics payload"),this.runtimeMetricsIds.has(r.id)||(this.runtimeMetrics.push(r),this.runtimeMetricsIds.add(r.id))}getRuntimeMetrics(){return this.runtimeMetrics}deleteRuntimeMetrics(r){this.runtimeMetrics=this.runtimeMetrics.filter(e=>(this.runtimeMetricsIds.delete(e.id),!r.includes(e)))}},jl=new class{constructor(){this.localStorage=null;try{this.localStorage=globalThis.localStorage}catch(r){ct.error("Failed to access browser localStorage:",r)}}setItem(r,e){this.localStorage&&this.localStorage.setItem(r,JSON.stringify(e))}getItem(r){if(this.localStorage){const e=this.localStorage.getItem(r);if(e)return JSON.parse(e)}return null}removeItem(r){this.localStorage&&this.localStorage.removeItem(r)}clear(){this.localStorage&&this.localStorage.clear()}findKeys(r){const e=[];if(this.localStorage)for(let t=0;t<this.localStorage.length;t++){const n=this.localStorage.key(t);n&&n.includes(r)&&e.push(n)}return e}};class zi{isDuplicate(e){return this.getRuntimeMetricsIds().includes(e.id)}cleanup(){ct.debug("Vega telemetry start clear the old vega version runtime metrics ids in localStorage"),jl.findKeys(zi.RUNTIME_METRICS_IDS_KEY_PREFIX).map(e=>{e!==zi.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version&&jl.removeItem(e)})}getRuntimeMetricsIds(){return jl.getItem(zi.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version)||[]}onDispatched(e){ct.debug("Vega telemetry records runtime metrics ids in localStorage");const t=e.map(n=>n.id);jl.setItem(zi.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version,[...new Set([...this.getRuntimeMetricsIds(),...t])])}}zi.RUNTIME_METRICS_IDS_KEY_PREFIX="vega-telemetry-runtime-metrics-ids-";var Jc=new class{constructor(r){this.strategies=r}checkByStrategies(r){ct.debug("Start check duplicate payload by strategies");for(const e of this.strategies)return e.isDuplicate(r);return!1}updateDispatchedRuntimeMetrics(r){for(const e of this.strategies)e.onDispatched(r)}clearRuntimeMetrics(){try{for(const r of this.strategies)r.cleanup()}catch(r){ct.error("Vega telemetry failed to clear runtime metrics in localStorage:",r)}}}([new zi]);class WC{constructor(e,t,n,i,s){this.vegaVersion=e,this.framework=t,this.browser=n,this.os=i,this.origin=s}}class GC{constructor(e,t){this.name=e,this.version=t}}let KC=class{constructor(e,t){this.name=e,this.version=t}},al=class{constructor(){this.commonVersionRegExp=/version\/(\d+(\.?_?\d+)+)/i}getVersion(e){return this.getPCTerminalMatch(this.versionRegExp[0],e)}isNameMatch(e){return this.nameRegExp.some(t=>t.test(e))}predict(e){const t=this.name,n=this.getVersion(e);return new GC(t,n)}getPCTerminalMatch(e,t){const n=t.match(e);return n&&n.length>0&&n[1]||""}getMobileTerminalMatch(e,t){const n=t.match(e);return n&&n.length>1&&n[2]||""}};class qC extends al{constructor(){super(...arguments),this.name="IE",this.nameRegExp=[/msie|trident/i],this.versionRegExp=[/(?:msie |rv:)(\d+(\.?_?\d+)+)/i]}}class XC extends al{constructor(){super(...arguments),this.name="Edge",this.nameRegExp=[/\sedg\//i,/edg([ae]|ios)/i],this.versionRegExp=[/\sedg\/(\d+(\.?_?\d+)+)/i,/edg([ae]|ios)\/(\d+(\.?_?\d+)+)/i]}getVersion(e){return this.nameRegExp[0].test(e)?this.getPCTerminalMatch(this.versionRegExp[0],e):this.getMobileTerminalMatch(this.versionRegExp[1],e)}}class ZC extends al{constructor(){super(...arguments),this.name="FireFox",this.nameRegExp=[/firefox|iceweasel|fxios/i],this.versionRegExp=[/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i]}}class YC extends al{constructor(){super(...arguments),this.name="Chrome",this.nameRegExp=[/chromium/i,/^(?!.*\s(edg|edga)\/).*chrome|crios|crmo/i],this.versionRegExp=[/chromium[\s/](\d+(\.?_?\d+)+)/i,/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i]}getVersion(e){let t="";return t=this.nameRegExp[0].test(e)?this.getPCTerminalMatch(this.versionRegExp[0],e)||this.getPCTerminalMatch(this.commonVersionRegExp,e):this.getPCTerminalMatch(this.versionRegExp[1],e),t}}class JC extends al{constructor(){super(...arguments),this.name="Safari",this.nameRegExp=[/^(?!.*\s(firefox|iceweasel|fxios)\/).*(safari|applewebkit)/i],this.versionRegExp=[/version\/(\d+(\.?_?\d+)+)/i]}}class f_{detect(e){if(e){for(const t of this.predictors)if(t.isNameMatch(e))return t.predict(e)}return{name:"Other",version:""}}}class QC extends f_{constructor(){super(...arguments),this.predictors=[new YC,new XC,new JC,new ZC,new qC]}}let ll=class{constructor(){this.commonVersionRegExp=/version\/(\d+(\.?_?\d+)+)/i,this.versionDelimiterRegExp=/[\s_]/g}isNameMatch(e){return this.nameRegExp.some(t=>t.test(e))}predict(e){const t=this.getName(e),n=this.getVersion(e);return new KC(t,n)}getName(e){const t=e.match(/\((.*?)\)/);return t&&t[1]||"Other"}getVersion(e){return this.getCommonVersion(e)}getCommonVersion(e,t=!1){let n=this.getMainstreamOSMatch(this.versionRegExp[0]||this.commonVersionRegExp,e);return n&&t&&(n=n.replace(this.versionDelimiterRegExp,".")),n}getMainstreamOSMatch(e,t){const n=t.match(e);return n&&n.length>0&&n[1]||""}},e5=class extends ll{constructor(){super(...arguments),this.nameRegExp=[/windows /i],this.versionRegExp=[/windows ((nt|xp)( \d\d?.\d)?)/i]}};class t5 extends ll{constructor(){super(...arguments),this.nameRegExp=[/macintosh/i],this.versionRegExp=[/mac os x (\d+(\.?_?\d+)+)/i]}getVersion(e){return this.getCommonVersion(e,!0)}}class r5 extends ll{constructor(){super(...arguments),this.nameRegExp=[/(ipod|iphone|ipad)/i],this.versionRegExp=[/os (\d+([\s_]\d+)*) like mac os x/i]}getVersion(e){return this.getCommonVersion(e,!0)}}class n5 extends ll{constructor(){super(...arguments),this.nameRegExp=[/android/i],this.versionRegExp=[/android[\s/-](\d+(\.\d+)*)/i]}}class i5 extends ll{constructor(){super(...arguments),this.nameRegExp=[/linux/i],this.versionRegExp=[]}}class s5 extends f_{constructor(){super(...arguments),this.predictors=[new t5,new e5,new r5,new n5,new i5]}}function p_(r){ct.debug("Vega telemetry start clear runtime metrics in localStorage"),"requestIdleCallback"in globalThis?globalThis.requestIdleCallback(()=>{r()}):setTimeout(()=>{r()},100)}function p0(){return globalThis.navigator.userAgent}function g0(){try{return globalThis&&!!globalThis.localStorage&&!!globalThis.navigator&&!!globalThis.location}catch(r){return ct.debug("Failed to access browser localStorage, navigator or location:",r),!1}}var g_=new class{constructor(){this.browserDetector=new QC,this.osDetector=new s5}generate(){return this.environment||(this.environment=new WC(globalThis.VegaEnvInfo.version,globalThis.VegaEnvInfo.framework,this.browserDetector.detect(p0()),this.osDetector.detect(p0()),globalThis.location.origin)),this.environment}},yi,Qc,ra,Wu=new class{emit(r){const e=new UC(g_.generate(),r);ct.debug("Vega telemetry start emit runtime metrics"),Jc.checkByStrategies(e)||(ct.debug("The payload has not been collected by strategies check"),yf.collect(e))}};let o5=class bf{static post(e,t){const n=new globalThis.Blob([JSON.stringify(t)]);return globalThis.navigator.sendBeacon(bf.getVegaTelemetryApimHost()+e+`?subscription-key=${bf.getVegaTelemetryApimSubKey()}`,n)}static getVegaTelemetryApimHost(){return"https://vega-telemetry-apim-dev.azure-api.net"}static getVegaTelemetryApimSubKey(){return"8bc15c7c8b514d1bb92825b0b17a1731"}},a5=class{constructor(e,t,n){this.environment=e,this.payloads=t,this.triggerEvent=n}};(function(r){r.ComponentUsagePayload="componentUsage",r.FeatureFlagOverriddenPayload="featureFlagOverridden",r.PublicAPIMetricsPayload="publicAPIMetrics"})(yi||(yi={})),function(r){r.VisibilityChange="visibilitychange",r.PageHide="pagehide"}(Qc||(Qc={})),function(r){r.ENABLE_COLLECT_COMPONENTS_USAGE="VEGA_TELEMETRY.ENABLE_COLLECT_COMPONENTS_USAGE",r.ENABLE_COLLECT_PUBLIC_API="VEGA_TELEMETRY.ENABLE_COLLECT_PUBLIC_API",r.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN="VEGA_TELEMETRY.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN"}(ra||(ra={}));var m0=new class{constructor(){this.dispatchedRuntimeMetrics=[]}dispatch(r){try{const e=this.generateRuntimeMetricsSubmitDto(r);e&&(ct.debug("Vega telemetry start dispatch runtime metrics"),o5.post("/runtime-metrics",e),Jc.updateDispatchedRuntimeMetrics(this.dispatchedRuntimeMetrics),yf.deleteRuntimeMetrics(this.dispatchedRuntimeMetrics),ct.debug("The runtime metrics have been dispatched successfully!"))}catch(e){ct.error("Vega telemetry failed to dispatch:",e)}}generateRuntimeMetricsSubmitDto(r){const e=this.filterRuntimeMetrics();return e.length>0?(this.dispatchedRuntimeMetrics=e,new a5(g_.generate(),e.map(t=>t.payload),r)):null}filterRuntimeMetrics(){return yf.getRuntimeMetrics().filter(r=>this.canDispatch(r)&&!Jc.checkByStrategies(r))}canDispatch(r){const e=m_.getFeatureFlagController();if(!e)return!1;switch(r.payload.type){case yi.ComponentUsagePayload:return e.isEnabled(ra.ENABLE_COLLECT_COMPONENTS_USAGE);case yi.FeatureFlagOverriddenPayload:return e.isEnabled(ra.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN);case yi.PublicAPIMetricsPayload:return e.isEnabled(ra.ENABLE_COLLECT_PUBLIC_API)}}},m_=new class{register(r){var e;ct.debug("Vega telemetry start register 'pagehide' and 'visibilitychange' event"),e=()=>m0.dispatch(Qc.VisibilityChange),"visibilityState"in document&&document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&e()}),function(t){globalThis.addEventListener("pagehide",t)}(()=>m0.dispatch(Qc.PageHide)),p_(()=>Jc.clearRuntimeMetrics()),this.featureFlagController=r}getFeatureFlagController(){return this.featureFlagController}};let l5=class{constructor(e,t,n){this.type=e,this.componentName=t,this.data=n}},c5=class{constructor(e,t,n){this.type=e,this.featureFlagName=t,this.featureFlagOverriddenValue=n}};class d5{constructor(e,t,n){this.type=e,this.publicAPIName=t,this.data=n}}var v_=new class{emit(r,e){p_(()=>{try{if(g0())switch(r){case yi.ComponentUsagePayload:Wu.emit(new l5(r,e.componentName,e.data));break;case yi.FeatureFlagOverriddenPayload:Wu.emit(new c5(r,e.featureFlagName,e.featureFlagOverriddenValue));break;case yi.PublicAPIMetricsPayload:Wu.emit(new d5(r,e.publicAPIName,e.data));break;default:throw new Error(`Unknown runtime metrics payload type: ${r}`)}}catch(t){ct.error("Vega telemetry failed to emit runtime metrics:",t)}})}init(r){try{g0()&&m_.register(r)}catch(e){ct.error("Vega telemetry failed to register event:",e)}}};const __=Object.freeze(Object.defineProperty({__proto__:null,default:v_},Symbol.toStringTag,{value:"Module"})),u5={"VEGA_DATE_PICKER.COMPONENT_LOAD_REQUIRED_DECORATOR":{description:"Feature flag to enable the required decorator for the date picker component. <br/> <b>Note: This feature flag is for demonstration purpose and will be persisted permanently.</b>",createdTimestamp:1660330561422,createdAtVersion:"1.2.0",removedAfterVersion:"1.11.1"},"VEGA_COMPONENT.SANITIZE_VEGA_COMPONENT":{description:"Feature flag to enable sanitize vega components.",createdTimestamp:1664262689486,createdAtVersion:"1.8.1",removedAfterVersion:"2.0.0"},"VEGA_TEXT.LABEL_OR_CONTENT_NESTED_VEGA_TEXT_COMPONENT":{description:"Feature flag to enable the label or content of other component nested vega-text component.",createdTimestamp:1665218525140,createdAtVersion:"1.8.1",removedAfterVersion:"1.9.1"},"VEGA_FLEX.ENABLE_DIRECTION_ONLY":{description:"Feature flag to make direction take effect only regardless of breakpoint for vega-flex component.",createdTimestamp:1665639912117,createdAtVersion:"1.9.0"},"VEGA_FIELD_LABEL.SHOW_LABEL":{description:"Feature flag to enable the vega-field-label component for vega-input, vega-input-select and vega-date-picker.",createdTimestamp:1666184962131,createdAtVersion:"1.9.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.USE_NATIVE_FLEX_BEHAVIOR":{description:"Feature flag to enable the **default** use of native flex behavior for vega-flex component.",createdTimestamp:1668059639449,createdAtVersion:"1.11.1",removedAfterVersion:"2.0.0"},"VEGA_TABLE.DEPRECATED_ROW_SELECTION_CHANGE_PROP":{description:"Feature flag to deprecate the rowSelection.onSelectChange and rowSelection.onSelectAllChange",createdTimestamp:1673321949321,createdAtVersion:"1.18.0",removedAfterVersion:"2.0.0"},"VEGA_ICON.USE_SIZE_PROP_FOR_THIRD_PARTY_ICONS":{description:"Feature flag to make size prop of vega-icon to take effect for third party icons.",createdTimestamp:1675752744795,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_INJECT_FORM_FIELD_CONTROLLER.ADD_DATA_VEGA_FORM_FILTER":{description:"Feature flag to deprecate the form field should validate only have data-vega-from attribute",createdTimestamp:1676017004107,createdAtVersion:"1.19.0",removedAfterVersion:"2.0.0"},"VEGA_FORM_FIELD.CHANGE_BLOCK_TO_INLINE_BLOCK":{description:"Feature flag to deprecate the form fields like input/datePicker/timePicker should use inline block",createdTimestamp:1676512727310,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_CHECKBOX_RADIO_GROUP.FLEX_DIRECTION_COL_DEFAULT":{description:"Feature flag to make the checkbox group and radio group prop vegaFlexProp default direction to col",createdTimestamp:16811712e5,createdAtVersion:"1.27.3",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_SSR":{description:"Feature flag to prevent the SSR in vega-react",createdTimestamp:1679450185124,createdAtVersion:"1.25.0",disabledByDefault:!0},"VEGA_STEPPER.INPUT_DISABLED":{description:"Feature flag to rename the prop input-editable to input-disabled ",createdTimestamp:1683252081350,createdAtVersion:"1.30.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.ALIGNITEM_JUSTIFYCONTENT_USE_PREFIX_V_INSTEAD_OF_VEGA":{description:"Feature flag to render vega-flex prop alignItems and justifyContent classes by using v- instead of vega-",createdTimestamp:1684128467390,createdAtVersion:"1.32.0",removedAfterVersion:"1.48.3"},"VEGA_ANGULAR.USE_JUGGLE_RESIZE_OBSERVER":{description:"Feature flag to enable the @juggle/resizeObserver to instead window resizeObserver",createdTimestamp:1684203399089,createdAtVersion:"1.31.0"},"VEGA_INPUT.FOCUS_ON_INPUT_BY_CLICK_CLEAR_BUTTON":{description:"Feature flag to keep the input focused whenever click the clear button",createdTimestamp:1685513925082,createdAtVersion:"1.34.0",removedAfterVersion:"1.38.2"},"VEGA_VUE.EMIT_CAMEL_CASE_EVENT_NAME":{description:"Feature flag to emit camel case event name for Vue framework",createdTimestamp:1688971026741,createdAtVersion:"1.37.0"},VEGA_ITEM_TOGGLE_ISERROR_DEPRECATED:{description:"Feature flag to deprecated the component vega-item-toggle property isError",createdTimestamp:1687934508330,createdAtVersion:"1.36.0",removedAfterVersion:"2.0.0"},"VEGA_BUTTON_LINK.DEPRECATED_EVENTFUL":{description:"Feature flag to deprecated eventful property",createdTimestamp:1689313658898,createdAtVersion:"1.36.1",removedAfterVersion:"2.0.0"},"VEGA_DROPDOWN.RENAME_PREFIX_TO_PREFIX_ICON":{description:"Feature flag to rename prefix to prefixIcon",createdTimestamp:1689576347049,createdAtVersion:"1.37.0",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad",createdTimestamp:1706598728908,createdAtVersion:"2.0.0"},"VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad in all framework",createdTimestamp:1708495728180,createdAtVersion:"2.0.0"},"VEGA_REACT.ENABLE_ON_CHANGE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onChange event handle under react version 19 or below",createdTimestamp:1709603823660,createdAtVersion:"2.0.0"},"VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD":{description:"Feature flag to enable the hide card number mask upon initial loading of the credit card.",createdTimestamp:1715932781059,createdAtVersion:"2.9.0"},"VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE":{description:"Feature flag to enable the new cell words break style",createdTimestamp:1719282763075,createdAtVersion:"2.11.2"},"VEGA_TELEMETRY.ENABLE_COLLECT_COMPONENTS_USAGE":{description:"Feature flag to enable the collection of component usage.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_TELEMETRY.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN":{description:"Feature flag to enable the feature flag overridden.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_REACT.ENABLE_ON_CLOSE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onClose event handle under react version 19 or below",createdTimestamp:1719910557333,createdAtVersion:"2.12.0"},VEGA_BANNER_DEPRECATED_ACTION_BUTTON_PROP_VEGA_CLICK:{description:"Feature flag to deprecated the vega-banner component property actionButtons property vegaClick",createdTimestamp:1723449433833,createdAtVersion:"2.18.0"},"VEGA_REACT.SKIP_NATIVE_EVENT_PREVENT_BY_DEFAULT":{description:"Feature flag to skip the native event prevent logic in default",createdTimestamp:17239968e5,createdAtVersion:"2.18.1",disabledByDefault:!0},"VEGA_TELEMETRY.ENABLE_COLLECT_PUBLIC_API":{description:"Feature flag to enable the collection of public api.",createdTimestamp:1727232497961,createdAtVersion:"2.21.0"},"VEGA_LEFT_NAV.DISABLE_ANIMATION_ON_LOAD":{description:"Feature flag that disables the transition animation of the left nav.",createdTimestamp:1730361348399,createdAtVersion:"2.26.0"},"VEGA_DATE_PICKER.ENABLE_CALCULATION_POSITION_BY_SCREEN":{description:"Feature flag that enable use screen to calculation position.",createdTimestamp:1733293586535,createdAtVersion:"2.29.0"},"VEGA_TABLE.REVERSE_SORT_ORDER":{description:"Feature flag that reverses table column sorting order from default>asc>desc to default>desc>asc",createdTimestamp:1737521148363,createdAtVersion:"2.32.0",disabledByDefault:!1},"VEGA_PAGINATION.ENABLE_EXTENSIONS_RESPONSIVE_DEFAULT_VALUE":{description:"Feature flag to enable responsive default values for the extensions property in vega-pagination.",createdTimestamp:1744876233415,createdAtVersion:"2.42.0",disabledByDefault:!0},"VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR":{description:"Feature flag that the component corners style weights are sorted according to the [0, 9999, 2, 4, 8, ..., 48]",createdTimestamp:1744772429681,createdAtVersion:"2.41.0",disabledByDefault:!0},"VEGA_INPUT_PHONE_NUMBER.ENABLE_CALCULATION_POSITION_BY_SCREEN":{description:"Feature flag that enable use screen to calculation position.",createdTimestamp:1750317683577,createdAtVersion:"2.48.1",disabledByDefault:!0},"VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT":{description:"A feature flag to automatic placement for appendable pop-ups when isScreenPosition is enabled.",createdTimestamp:17709408e5,createdAtVersion:"2.76.0",disabledByDefault:!1}},Bo=Object.freeze(u5);class h5{constructor(){this.enabledFeatureFlagKeySet=new Set,this.init()}enable(...e){e.forEach(t=>{this.versionGuard(t)&&(this.enabledFeatureFlagKeySet.add(t),this.sendFeatureFlagKeyToTelemetry(t,!0))})}disable(...e){e.forEach(t=>{this.versionGuard(t)&&(this.enabledFeatureFlagKeySet.delete(t),this.sendFeatureFlagKeyToTelemetry(t,!1))})}isEnabled(e){return this.enabledFeatureFlagKeySet.has(e)}init(){Object.keys(Bo).map(e=>{!Bo[e].disabledByDefault&&!this.isRemoved(e)&&this.enabledFeatureFlagKeySet.add(e)})}versionGuard(e){return this.isRemoved(e)?(rt.error(`The feature flag key '${e}' has been removed after v${Bo[e].removedAfterVersion}`),!1):!0}isRemoved(e){return!!Bo[e].removedAfterVersion}sendFeatureFlagKeyToTelemetry(e,t){this.canSendFeatureFlagsToTelemetry(e,t)&&v_.emit("featureFlagOverridden",{featureFlagName:e,featureFlagOverriddenValue:t})}canSendFeatureFlagsToTelemetry(e,t){return!!Bo[e].disabledByDefault===t}}const Ra=new h5,Q=()=>(Date.now()+Math.floor(Math.random()*1e4)).toString(),f5=r=>r?Object.keys(r).length===0:!0,p5=(async()=>{}).constructor,nB=r=>typeof r=="function"&&(r[Symbol.toStringTag]==="AsyncFunction"||r instanceof p5);var Xi;(function(r){r.TABLET="tablet",r.MOBILE="mobile",r.DESKTOP="desktop"})(Xi||(Xi={}));function ed(r,e,t){if(!r)return null;let n=r.parentElement||r.getRootNode().host,i=null;for(;n;){if(n.matches(e)&&(i=n,!(t!=null&&t.outerMost)))return i;n=n.parentElement||n.getRootNode().host}return i}const v0=()=>{const r=navigator.userAgent;return/(tablet|ipad|playbook|silk|Macintosh)|(android(?!.*mobi))/i.test(r)&&navigator.maxTouchPoints>0?Xi.TABLET:/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(r)?Xi.MOBILE:Xi.DESKTOP},g5=r=>r?r.filter(e=>e).join(" "):"";function y_(r,e){return!r||!e?!1:r===e?!0:y_(r.parentElement||r.getRootNode().host,e)}function iB(r,e){r.scrollTop=e.offsetTop}function sB(r){return r.getBoundingClientRect().height>0}function oB(r){if(r){const e=r.replace(/\D/g,"");return e===""?null:Number(e)}return null}function aB(r){r=m5(r);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}function Up(r){if(!r.includes("rgb"))return null;const e=r.match(/\d+/g);return!e||e.length!==3?null:`#${e.map(n=>{const i=Number(n).toString(16);return i.length===1?"0"+i:i}).join("")}`}function m5(r){r||(r="");const e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;return r.replace(e,function(n,i,s,a){return"#"+i+i+s+s+a+a})}function v5(r=document,e=!1){const t=r.activeElement;return!t&&e&&"host"in r?r.host:t&&t.shadowRoot?v5(t.shadowRoot,e):t}function Wp(r){return r&&r.nodeType===Node.ELEMENT_NODE}function lB(r,e){const t=r.replace(/[^a-zA-Z0-9_-]/g,"-");return`${e}-${t}`}function cB(r){if(r.detail===0)return!0;const e=r.composedPath()[0].getBoundingClientRect();if(e.width===0&&e.height===0)return!1;const t=Math.floor(e.x+e.width/2),n=Math.floor(e.y+e.height/2),i=r.clientX,s=r.clientY;return r.detail===1&&Math.abs(t-i)<=1&&Math.abs(n-s)<=1}const _5=["a[href]","area[href]","button","input","select","textarea","iframe","object","embed",'[contenteditable="true"]','[contenteditable=""]',"[tabindex]"].join(",");function Gu(r){return!r.matches(_5)||r.hasAttribute("disabled")||r.hasAttribute("inert")||r.getAttribute("aria-hidden")==="true"||r instanceof HTMLInputElement&&r.type==="hidden"?!1:r.tabIndex>=0}function dB(r){const e=t=>{if(t instanceof HTMLElement&&Gu(t))return t;const n=Array.from(t.querySelectorAll("*"));for(const i of n){if(Gu(i))return i;if(i.shadowRoot){const s=e(i.shadowRoot);if(s)return s}}return null};return r instanceof HTMLElement&&r.shadowRoot?Gu(r)?r:e(r)||e(r.shadowRoot):e(r)}function b_(r,e,t=[],n=[],i=[]){var s;const a=[r.name,e.name,...t.map(o=>o.mapFrom),...n.map(o=>o.mapFrom)].join("-");return(s=r.prototype)[a]||(s[a]=y5(e,t,n)),new r.prototype[a](...i)}const y5=(r,e,t)=>{const n=class extends r{};return e.forEach(i=>{c_(Object.assign(i,{componentFieldName:i.mapFrom}))(n.prototype,i.mapTo)}),t.forEach(i=>{En(i.mapFrom)(n.prototype,i.mapTo)}),n};function xn(){return function(r,e){Object.defineProperty(r,e,{set:b5(e)})}}function b5(r){return function(e){this[qi]||(this[qi]=new Map),this[qi].set(r,e),e[Fd]=this,w5(e,this)}}function w5(r,e){const t=r.constructor.prototype;if(t[Nn])for(const n of t[Nn])e[n.componentMethodName]=S5(e,r,e[n.componentMethodName],n)}function S5(r,e,t,n){return function(...i){const s=t.apply(r,i);return e[l_]=n.componentMethodName,s&&typeof s.then=="function"?s.then(()=>e[n.slimmerMethodName].call(e,...i)):e[n.slimmerMethodName].call(e,...i),s}}class C5 extends ol{constructor(e,t){super(),this.className=e,this.usageDefinitions=t}sendPublicAPIPayloadToTelemetry(e){try{const t=this.getPublicAPIMetricsPayload(e);t&&Y(()=>Promise.resolve().then(()=>__),void 0,import.meta.url).then(n=>{n.default.emit("publicAPIMetrics",t)})}catch(t){rt.log("Public API payload failed to emit telemetry:",t)}}getPublicAPIMetricsPayload(e){const t={};return this.usageDefinitions.filter(n=>n.canAccept(this.className,this[l_],e)).forEach(n=>{t[n.payloadKey]=n.payloadValue(e)}),f5(t)?null:{publicAPIName:this.className,data:t}}}function Tn(r,e,t){const n=[];return e.map(i=>n.push({mapFrom:i,mapTo:"sendPublicAPIPayloadToTelemetry"})),b_(r,C5,[],n,[r.name,t])}const _0=(r,e)=>{const t=Number(r);return isNaN(t)?Number(e):t},uB=r=>/^\d+(?:\.\d+)?%$/.test(r),hB=(r,e,t)=>{let n=r;return typeof e=="number"&&(n=Math.max(e,n)),typeof t=="number"&&(n=Math.min(t,n)),n},E5=r=>Math.trunc(r/10)+r%10,x5=(r,e)=>r+=e,T5=r=>r.split("").filter(e=>/\d/.test(e)).map(e=>Number(e)),k5=(r,e)=>r.map((t,n)=>e(n)?t:E5(t*2)),fB=r=>{const e=r.toString();return e.includes(".")?e.split(".")[1].length:0},L5=1e4,A5=11e3;class R5{constructor(){this.baseBasicZIndex=L5,this.topBasicZIndex=A5,this.levelEntry={base:{zIndex:this.baseBasicZIndex,elements:[]},top:{zIndex:this.topBasicZIndex,elements:[]}}}setZIndex(e,t="base"){if(e===null)return;this.removeZIndex(e,t);const n=this.levelEntry[t];e&&n&&(t==="base"&&this.isBaseLevelOver()&&(rt.warn("The max 'z-index' of base level is '11000', but the current 'z-index' is over, Please optimize the use of 'z-index', otherwise there will be some performance overhead."),this.increaseTopEntry()),n.elements.push(e),n.zIndex+=1,e.style.zIndex=n.zIndex.toString())}removeZIndex(e,t="base"){if(e===null)return;const n=this.levelEntry[t];if(e&&n){let i=-1;n.elements.forEach((s,a)=>{s===e&&(i=a),i>=0&&a>i&&(s.style.zIndex=`${_0(s.style.zIndex)-1}`)}),i>=0&&(e.style.removeProperty("z-index"),n.elements.splice(i,1),n.zIndex-=1)}}overrideZIndexBasicValues(e){const t=this.formatZIndexBasicValues(e);this.validBasicValues(t)&&this.updateBasicValues(t)}formatZIndexBasicValues(e){return Object.assign({base:this.baseBasicZIndex,top:this.topBasicZIndex},e)}validBasicValues(e){return typeof e.base!="number"||typeof e.top!="number"?(rt.error("Change z-index basic value failed, both base level and top level should be of type number!"),!1):e.base>=e.top?(rt.error("Change z-index basic value failed, the base level should be smaller than the top level!"),!1):!0}updateBasicValues(e){this.baseBasicZIndex=e.base,this.topBasicZIndex=e.top;const t=this.levelEntry.base;t.elements.forEach((i,s)=>{i.style.zIndex=`${this.baseBasicZIndex+s+1}`}),t.zIndex=this.baseBasicZIndex+t.elements.length;const n=this.levelEntry.top;n.elements.forEach((i,s)=>{i.style.zIndex=`${this.topBasicZIndex+s+1}`}),n.zIndex=this.topBasicZIndex+n.elements.length}increaseTopEntry(){const e=this.levelEntry.top;e.elements.forEach(t=>{t.style.zIndex=`${_0(t.style.zIndex)+1}`}),e.zIndex+=1}isBaseLevelOver(){return this.levelEntry.base.zIndex>=this.topBasicZIndex}}const wf=new R5,Sf=["default","S","M","L","XL"],pB={default:200,S:"min(calc(100vw - 32px), 480px)",M:616,L:820,XL:1134},gB=["top","left","bottom","right"],mB=["start","center","end"],vB=1500,O5=["row","col","column","row-reverse","col-reverse","column-reverse"],D5=["start","center","end","baseline","stretch"],N5=["start","center","end","space-around","space-between","space-evenly"],I5=["start","center","end","stretch"],B5=["nowrap","wrap","wrap-reverse"],M5=["block","inline-block","none"],P5=["solid","dashed","dotted","double","none"],F5=["start","end","left","right","center","justify"],H5=["default","hover","active","focus-visible"],Gp={S:320,M:768,L:1024,XL:1440},j5=()=>{let r=Sf.length-1;const e=window.innerWidth;for(r;r>=0;r--){const t=Sf[r];if(t==="default")break;if(e>=Gp[t])return t}return"default"},_B=r=>{let e;return Sf.forEach(t=>{Object.prototype.hasOwnProperty.call(r,t)?e=r[t]:r[t]=e}),r};function br(){return typeof document<"u"?document:void 0}var Hd=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class cl extends ol{constructor(e){super(),this.observerEntry=e}reconnectResizeObserver(){this.resizeObserver===null&&this.createResizeObserver()}disconnectResizeObserver(){var e;(e=this.resizeObserver)===null||e===void 0||e.disconnect(),this.resizeObserver=null}connectResizeObserver(){this.createResizeObserver()}createResizeObserver(){var e;const t=this.observerEntry;(e=this.resizeObserver)===null||e===void 0||e.disconnect();const n=window.VegaResizeObserver||window.ResizeObserver;n&&(this.resizeObserver=new n((i,s)=>{if(!(t&&typeof t.shouldTrigger=="function"&&!t.shouldTrigger()))if(t&&typeof t.callback=="function"){const a=()=>{t.callback(i,s)};t.isDeferred?setTimeout(a):a()}else this.currentBreakpoint=j5()})),this.observerResizeObserver()}observerResizeObserver(){var e;if(this.resizeObserver&&br()){const t=this.resizeObserver;let n=null;!((e=this.observerEntry)===null||e===void 0)&&e.target&&(n=this.observerEntry.target()),Array.isArray(n)?n.forEach(i=>{t.observe(i)}):n?t.observe(n):t.observe(br().body)}}}Hd([c_({writable:!0})],cl.prototype,"currentBreakpoint",void 0);Hd([En("connectedCallback")],cl.prototype,"reconnectResizeObserver",null);Hd([En("disconnectedCallback")],cl.prototype,"disconnectResizeObserver",null);Hd([En("componentDidLoad")],cl.prototype,"connectResizeObserver",null);class ie{constructor(e,t){this.vegaName=e,this.nativeName=t}getName(){return this.getVegaName()}getCurrentName(e){return e.namespace!=="native"?this.getVegaName():this.getNativeName()}getVegaName(){return this.vegaName}getNativeName(){return this.nativeName}isBrowserRawEvent(){return SE.includes(this)}}const Se=new ie("vegaChange","change"),y0=new ie("vegaUserChange","userChange"),bt=new ie("vegaClick","click"),gc=new ie("vegaFocus","focus"),Wo=new ie("vegaBlur","blur"),Ku=new ie("vegaClose","close"),$5=new ie("vegaOpen","modalOpen"),V5=new ie("vegaValidate","validate"),z5=new ie("vegaFormSubmit","formSubmit"),U5=new ie("vegaFormReset","formReset"),W5=new ie("vegaRowClick","rowClick"),G5=new ie("vegaRowExpand","rowExpand"),K5=new ie("vegaRowDragDrop","rowDragDrop"),q5=new ie("vegaSelectChange","selectChange"),X5=new ie("vegaRowSelect","rowSelect"),Z5=new ie("vegaRowSelectAll","rowSelectAll"),Y5=new ie("vegaSelectAllChange","selectAllChange"),J5=new ie("vegaPageSizeChange","pageSizeChange"),Cf=new ie("vegaDropdownClick","dropdownClick"),b0=new ie("vegaCreate","create"),w0=new ie("vegaSearch","search"),S0=new ie("vegaSearchTrigger","searchTrigger"),Q5=new ie("vegaHide","hide"),eE=new ie("vegaShow","show"),jd=new ie("vegaPopoverShow","popoverShow"),w_=new ie("vegaPopoverHide","popoverHide"),tE=new ie("vegaCancel","cancel"),qu=new ie("vegaRemove","remove"),rE=new ie("vegaPageUpdate","pageUpdate"),nE=new ie("vegaCurrentStepUpdate","currentStepUpdate"),iE=new ie("vegaToggleStatus","toggleStatus"),C0=new ie("vegaStateUpdate","stateUpdate"),sE=new ie("vegaGroupClick","groupClick"),oE=new ie("vegaMenuClick","menuClick"),E0=new ie("vegaExpand","expand"),aE=new ie("vegaShow","dropdownShow"),lE=new ie("vegaHide","dropdownHide"),x0=new ie("vegaSearch","dropdownSearch"),cE=new ie("vegaActionClick","actionClick"),dE=new ie("vegaEventClick","eventClick"),uE=new ie("vegaDateDblClick","dateDblClick"),hE=new ie("vegaDateClick","dateClick"),fE=new ie("vegaCountryChange","countryChange"),pE=new ie("vegaActionButtonClick","actionButtonClick"),gE=new ie("vegaMoreActionClick","moreActionClick"),mE=new ie("vegaSelectedFileChange","selectedFileChange"),vE=new ie("vegaImageInserted","imageInserted"),_E=new ie("vegaRetry","retry"),yE=new ie("vegaPreview","preview"),$l=new ie("vegaLabelButtonClick","labelButtonClick"),T0=new ie("vegaReset","reset"),bE=new ie("vegaClear","clear"),wE=new ie("vegaComplete","complete"),S_=new ie("vegaPaste","paste"),SE=[Se,bt,gc,Wo,S_],k0=new ie("vegaMonthYearChange","monthYearChange"),CE=new ie("vegaSelectionChange","selectionChange"),EE=new ie("vegaTodayClick","todayClick"),xE=new ie("vegaSuggestionItemClick","suggestionItemClick"),TE=new ie("vegaNativeInputChange","nativeInputChange"),kE=new ie("vegaSourceCodeChange","sourceCodeChange"),LE=new ie("vegaEventEdit","eventEdit"),AE=[["vega-accordion",[E0]],["vega-app-header-button",[bt,Cf,T0,x0]],["vega-banner",[Ku,pE]],["vega-breadcrumb",[bt]],["vega-button",[bt]],["vega-button-circle",[bt]],["vega-button-group",[bt]],["vega-button-link",[bt]],["vega-calendar",[Se,dE,uE,gE,hE,LE]],["vega-carousel",[rE]],["vega-checkbox",[Se,y0]],["vega-checkbox-group",[Se,y0]],["vega-chip",[Ku,bt]],["vega-code-block",[Se,qu]],["vega-color-picker",[Se]],["vega-color-swatch",[bt]],["vega-color-swatch-picker",[Se]],["vega-combo-box",[Se,b0,w0]],["vega-date-picker",[Se,k0]],["vega-date-picker-calendar",[bE,k0,CE,EE]],["vega-dropdown",[aE,lE,Cf,T0,b0,x0,S0]],["vega-dropdown-item",[bt]],["vega-field-label",[bt,$l]],["vega-file-uploader",[Se,mE,qu,_E,yE]],["vega-form",[z5,U5,V5]],["vega-image-uploader",[Se,qu,tE]],["vega-input",[Se,TE,gc,Wo,$l,xE,S_]],["vega-input-credit-card",[Se,Wo,gc]],["vega-input-numeric",[Se]],["vega-input-passcode",[Se,wE]],["vega-input-phone-number",[Se,fE]],["vega-input-range",[Se]],["vega-input-select",[Se,w0,S0,eE,Q5,$l]],["vega-item-toggle",[iE]],["vega-modal",[$5,Ku]],["vega-left-nav",[C0]],["vega-left-nav-group",[sE]],["vega-left-nav-link",[oE]],["vega-left-nav-section",[cE]],["vega-pagination",[Se,J5]],["vega-popover",[jd,w_]],["vega-progress-tracker",[nE]],["vega-radio",[Se,gc,Wo]],["vega-radio-group",[Se]],["vega-rich-text-editor",[Se,vE,kE]],["vega-rich-text-editor-toolbar-button",[bt]],["vega-rich-text-image-editor",[Se]],["vega-rich-text-link-editor",[Se]],["vega-segment-control",[Se]],["vega-selection-chip",[Se]],["vega-selection-chip-group",[Se]],["vega-selection-tile",[Se]],["vega-selection-tile-group",[Se]],["vega-sidenav",[C0]],["vega-sidenav-link",[bt]],["vega-signature-capture",[Se]],["vega-stepper",[Se]],["vega-tab-group",[bt]],["vega-table",[Se,q5,Y5,W5,G5,K5,X5,Z5]],["vega-table-head-cell",[bt]],["vega-table-row",[bt,E0]],["vega-textarea",[Se,Wo,$l]],["vega-time-picker",[Se]],["vega-toggle-switch",[Se]]],RE=new Map(AE);class mo{getHostName(){return this.vegaComponentName}getEventName(){return this.eventName}handle(e,t){const n=this.createEventTarget(e);n.style.display="none",e.appendChild(n);const i=this.createEvent(this.eventName);return t&&Object.defineProperty(i,"detail",{configurable:!0,value:t}),n.dispatchEvent(i),n.remove(),i}copyAttributesToTarget(e,t){e&&t&&Array.from(e.attributes).filter(i=>!i.name.startsWith("on")).forEach(i=>{try{t.setAttribute(i.name,i.value)}catch{rt.error(`Delegated strategy copy ${e.tagName} attribute '${i.name}' error.`)}})}createEvent(e){let t=new Event(e,{bubbles:!0,cancelable:!0});return e==="click"&&(t=new MouseEvent(e,{bubbles:!0,cancelable:!0})),t}}class OE extends mo{constructor(){super(...arguments),this.eventName="click",this.vegaComponentName="vega-button"}createEventTarget(e){const t=document.createElement("button");return this.copyAttributesToTarget(e,t),t.type=e.type,t}}class DE extends mo{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-checkbox"}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type="checkbox",t.checked=e.checked,t}}class NE extends mo{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-input-select"}createEventTarget(e){const t=document.createElement("select");return this.copyAttributesToTarget(e,t),e.value&&(t.value=e.value.toString()),t}}class Xu extends mo{constructor(e){super(),this.vegaComponentName="vega-input",this.eventName=e}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type=e.type,t.value=e.value,t}}class IE extends mo{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-radio"}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type="radio",t.checked=e.checked,t}}class BE extends mo{constructor(){super(...arguments),this.vegaComponentName="vega-textarea",this.eventName="change"}createEventTarget(e){const t=document.createElement("textarea");return this.copyAttributesToTarget(e,t),t.value=e.value,t}}class ME{constructor(){this.strategyRegistry=new Map,this.updateStrategyRegistry([new OE,new Xu("change"),new Xu("focus"),new Xu("blur"),new NE,new BE,new DE,new IE])}isSupportDelegated(e,t){let n=!1;const i=e.tagName.toLowerCase();return this.strategyRegistry.get(i)&&this.strategyRegistry.get(i).get(t.getNativeName())&&(n=!0),n}updateRegistryFromEventSemantics(e){let t=[];const{global:n,components:i}=e;if(n&&Array.isArray(n.jqueryDelegatedEvent)&&(t=t.concat(n.jqueryDelegatedEvent)),i)for(const s in i)Array.isArray(i[s].jqueryDelegatedEvent)&&(t=t.concat(i[s].jqueryDelegatedEvent));t.length&&this.updateStrategyRegistry(t)}getStrategy(e,t){const n=e.tagName.toLowerCase();if(this.strategyRegistry&&this.strategyRegistry.get(n))return this.strategyRegistry.get(n).get(t.getNativeName())}updateStrategyRegistry(e){e.forEach(t=>{const n=t.getHostName(),i=t.getEventName();if(this.strategyRegistry.get(n))this.strategyRegistry.get(n).set(i,t);else{const s=new Map;s.set(i,t),this.strategyRegistry.set(n,s)}})}}const PE=new ME;class FE{constructor(){this.config={},this.defaultEventSemantics={namespace:"vega"}}setSemantics(e){this.config=e,PE.updateRegistryFromEventSemantics(e)}getSemantics(e){return Object.assign({},this.defaultEventSemantics,this.getSemanticsInGlobal(),this.getSemanticsInComponents(e))}getEnabledEventIdsByComponent(e){return RE.get(e)}getSemanticsInGlobal(){return this.config.global}getSemanticsInComponents(e){const t=e.tagName.toLocaleLowerCase();return this.config.components&&Object.prototype.hasOwnProperty.call(this.config.components,t)?this.config.components[t]:null}}const Zu=new FE;class HE{constructor(){this.pubSubMap=new Map}register(e,t){if(this.pubSubMap.has(e)){const n=this.pubSubMap.get(e);n&&!n.includes(t)&&n.push(t)}else this.pubSubMap.set(e,[t])}unregister(e,t){if(this.pubSubMap.has(e)){const n=this.pubSubMap.get(e);n&&n.includes(t)&&n.splice(n.indexOf(t),1)}}clearObserversBySubject(e){this.pubSubMap.delete(e)}notify(e,t){this.pubSubMap.has(e)&&this.pubSubMap.get(e).forEach(n=>{try{n.notify(t)}catch(i){rt.warn(`Encountered error while notifying observer for subject ${e.getDescription()}`,i)}})}}const Ke=new HE;class Ue{constructor(e){this.title=e}getDescription(){return this.title}}const yB=new Ue("SIDENAV_LINK_SELECTED_TOPIC"),bB=new Ue("ACCORDION_EXPAND_TOPIC"),wB=new Ue("FORM_RESET_OPERATION_TRIGGERED"),SB=new Ue("FORM_FIELD_ELEMENT_DISCONNECTED"),CB=new Ue("RADIO_GROUP_DISABLED_CHANGE"),EB=new Ue("CHECKBOX_GROUP_DISABLED_CHANGE"),xB=new Ue("FORM_FIELD_PENDING_VALID_CHANGE"),TB=new Ue("TAB_PANEL_ADD_OR_DEL_TO_GROUP"),kB=new Ue("TABLE_EXPAND_ROW"),LB=new Ue("TABLE_ROW_SELECTION"),AB=new Ue("TABLE_ROW_SELECTION_ALL"),RB=new Ue("TABLE_ROW_CLICK"),OB=new Ue("FIELD_ERROR_MESSAGE_CHANGE"),DB=new Ue("DROPDOWN_ITEM_CLICK"),NB=new Ue("CHECKBOX_VALUE_CHANGE"),IB=new Ue("CHECKBOX_USER_INTERACTION"),BB=new Ue("RADIO_VALUE_CHANGE"),MB=new Ue("FORM_ELEMENT_VALUE_CHANGE"),PB=new Ue("FORM_EMEMENT_VALIDATE"),FB=new Ue("SELECTION_TILE_VALUE_CHANGE"),td=new Ue("UPDATE_TRANSLATION"),Kp=new Ue("DARK_MODE_CHANGE"),HB=new Ue("SHADOW_ROOT_ELEMENT_SCROLLING"),jB=new Ue("FLAG_ICON_LOADED"),C_=new Ue("GP_BRAND_CHANGE"),mc={"This field is required":"This field is required","The minimum input value is {0}":"The minimum input value is {0}","The maximum input value is {0}":"The maximum input value is {0}","The end value should be greater than the start value":"The end value should be greater than the start value","The end date should be later than start date":"The end date should be later than start date","Credit card number is invalid":"Credit card number is invalid","Please enter the correct email format.":"Please enter the correct email format.","The maximum input length is {0}":"The maximum input length is {0}","The start date should be later than {0}":"The start date should be later than {0}","The start date should be earlier than {0}":"The start date should be earlier than {0}","The end date should be earlier than {0}":"The end date should be earlier than {0}","The date should be later than {0}":"The date should be later than {0}","The date should be earlier than {0}":"The date should be earlier than {0}","The minimum input length is {0}":"The minimum input length is {0}","The end time should be later than start time":"The end time should be later than start time","Phone number is not valid":"Phone number is not valid","Phone number is valid but it belongs to country {0}, not country {1}":"Phone number is valid but it belongs to country {0}, not country {1}","The value does not exist in the source":"The value does not exist in the source","There are values that do not exist in the source":"There are values that do not exist in the source",Viewing:"Viewing",Show:"Show","Go To":"Go To","Viewing {0}-{1} of {2}":"Viewing {0}-{1} of {2}","Viewing [{0}-{1}] of {2}":"Viewing [{0}-{1}] of {2}","Show [{0} items / page]":"Show [{0} items / page]","Items Per Page":"Items Per Page",Upload:"Upload",Clear:"Clear",Today:"Today","Previous month":"Previous month","Next month":"Next month",Day:"Day",Week:"Week",Month:"Month",Sun:"Sun",Mon:"Mon",Tue:"Tue",Wed:"Wed",Thu:"Thu",Fri:"Fri",Sat:"Sat","Sun-short":"S","Mon-short":"M","Tue-short":"T","Wed-short":"W","Thu-short":"T","Fri-short":"F","Sat-short":"S","Sun-full":"Sunday","Mon-full":"Monday","Tue-full":"Tuesday","Wed-full":"Wednesday","Thu-full":"Thursday","Fri-full":"Friday","Sat-full":"Saturday",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",Jan:"Jan",Feb:"Feb",Mar:"Mar",Apr:"Apr",Jun:"Jun",Jul:"Jul",Aug:"Aug",Sep:"Sep",Oct:"Oct",Nov:"Nov",Dec:"Dec","All Day":"All Day","Select or drop your file here":"Select or drop your file here","Please sign here":"Please sign here","Clear Signature":"Clear Signature","Start Date":"Start Date","End Date":"End Date","Please select":"Please select","No options":"No options","No results found":"No results found",Minimum:"Minimum",Maximum:"Maximum","Select Time":"Select Time","Start Time":"Start Time","End Time":"End Time","There is no data to display":"There is no data to display","Text Styles":"Text Styles",Bold:"Bold",Italic:"Italic",Underline:"Underline",Strikethrough:"Strikethrough",Code:"Code","Text Color":"Text Color","Left Align":"Left Align","Center Align":"Center Align","Right Align":"Right Align",Justified:"Justified","Line Height":"Line Height",Bullets:"Bullets",Numbers:"Numbers","More Indent":"More Indent","Less Indent":"Less Indent",Link:"Link",Image:"Image","Upload from computer":"Upload from computer","Insert via URL":"Insert via URL","Image via URL":"Image via URL",Insert:"Insert","Clear Style":"Clear Style",URL:"URL",Text:"Text",Edit:"Edit",Unlink:"Unlink",Size:"Size","Alt Text":"Alt Text","Delete Image":"Delete Image",Sm:"Sm",Md:"Md",Lg:"Lg",Title:"Title",Subtitle:"Subtitle","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3",Paragraph:"Paragraph","Reset Selection":"Reset Selection","Select Language":"Select Language","Delete Code":"Delete Code","Copy Code":"Copy Code","Code Block":"Code Block",Copied:"Copied","Repeat every {0} days":"Repeat every {0} days","Repeat daily":"Repeat daily","Repeat every {0} weeks on {1}":"Repeat every {0} weeks on {1}","Repeat weekly on {0}":"Repeat weekly on {0}","Repeat every {0} months on day {1}":"Repeat every {0} months on day {1}","Repeat monthly on day {0}":"Repeat monthly on day {0}","Repeat every {0} years on {1} {2}":"Repeat every {0} years on {1} {2}","Repeat yearly on {0} {1}":"Repeat yearly on {0} {1}","until {0}":"until {0}","after {0} occurrences":"after {0} occurrences",Sunday:"Sunday",Monday:"Monday",Tuesday:"Tuesday",Wednesday:"Wednesday",Thursday:"Thursday",Friday:"Friday",Saturday:"Saturday",am:"am",pm:"pm","{0} Selected":"{0} Selected","date picker":"Date Picker","Selected result":"Selected result","Close event preview detail":"Close event preview detail","Edit event":"Edit event","More actions":"More actions","Expand accordion":"Expand accordion","Collapse accordion":"Collapse accordion","Expand {0} accordion":"Expand {0} accordion","Collapse {0} accordion":"Collapse {0} accordion","Clear color":"Clear color","Color swatch":"Color swatch","Color {0}":"Color {0}",Apply:"Apply","Enter color":"Enter color","Horizontal line":"Horizontal line","Special Characters":"Special Characters",All:"All",Latin:"Latin",Mathematical:"Mathematical",Arrows:"Arrows",Currency:"Currency",Required:"Required",Disabled:"Disabled",Optional:"Optional"};class Ui{constructor(){this.resources={en:mc},this._currentLanguage="en"}get currentLanguage(){return this._currentLanguage}init({resources:e,language:t}){e&&Object.keys(e).length>0?this.resources=e:(rt.warn('Resources are empty. Falling back to default language "en".'),this.resources={en:mc}),t&&t in this.resources?this._currentLanguage=t:(rt.warn(`Language "${t}" not found in resources. Falling back to default language "en".`),this._currentLanguage="en"),Ke.notify(td,{})}changeLanguage(e){this.resources[e]?(this._currentLanguage=e,Ke.notify(td,{})):rt.warn(`Language "${e}" not found in resources.`)}t(e,...t){const n=this.resources[this._currentLanguage][e]||mc[e]||e;return t.reduce((i,s,a)=>i.replace(new RegExp(`\\{${a}\\}`,"g"),String(s)),n)}registerComponent(e){const t=Ui.connectedComponents.get(e.tagName);t?t.add(e):Ui.connectedComponents.set(e.tagName,new Set([e]))}unRegisterComponent(e){const t=Ui.connectedComponents.get(e.tagName);t&&t.delete(e)}getConnectedComponents(){return Ui.connectedComponents}tWithPreservedBlocks(e,t=/(\[[^\]]*\])/g,...n){return this.t(e,...n).split(t).map(a=>{const o=t.test(a);return{content:o?a.substring(1,a.length-1):a,isPreserved:o}})}}Ui.connectedComponents=new Map;const vr=new Ui;class dl{constructor(e,t){this.accept=e,this.listener=t}notify(e){this.accept(e)&&this.listener(e)}}class jE{constructor(e,t){this.title=e,this.host=t}getDescription(){return`, this is a dom nodes subject of ${this.title}.(class name:${this.host.className}, id:${this.host.id})`}}class $E{constructor(){this.cache=new Map}getSubject(e,t){return this.isExist(e,t)?this.cache.get(e).get(t):this.setSubject(e,t)}isExist(e,t){return e?this.cache.has(e)&&this.cache.get(e)!==void 0&&this.cache.get(e).has(t):!1}getSubjectFromParentNodeByEventId(e,t){let n;for(const i of this.cache)if(y_(e,i[0])&&i[1].has(t)){n=i[1].get(t);break}return n}setSubject(e,t){const n=`${e.tagName}:${t.getName()}`,i=new jE(n,e);return this.cache.get(e)||this.cache.set(e,new Map),this.cache.get(e).set(t,i),i}}const Zt=new $E,VE=()=>!0;class rn{static addUniqueObserverToNode(e,t,n,i){if(e){const s=new dl(typeof i=="function"?i.bind(null):VE,n);rn.removeUniqueObserverFromNode(e,t),Ke.register(Zt.getSubject(e,t),s)}}static removeUniqueObserverFromNode(e,t){Zt.isExist(e,t)&&Ke.clearObserversBySubject(Zt.getSubject(e,t))}}class oe{constructor(e){this.name=e}getName(){return this.name}}const $B=new oe("valid"),VB=new oe("fieldErrorStateChange"),zB=new oe("virtualScrollToBottom"),UB=new oe("buttonGroupClick"),WB=new oe("leftNavLinkClick"),GB=new oe("subStatePull"),KB=new oe("subStatePush"),qB=new oe("monthEventsChange"),XB=new oe("dropdownTemplateItemsChange"),ZB=new oe("tableRowSelect"),YB=new oe("tableRowSelectAll"),JB=new oe("tableRowExpand"),QB=new oe("dropdownRenderItemInternalOverridden"),eM=new oe("dropdownRenderPrefixIconInternalOverridden"),tM=new oe("VegaDropdownSearchInternalOverridden"),rM=new oe("sidenavLinkClick"),nM=new oe("leftNavGroupExpand"),iM=new oe("leftNavLinkSelected"),sM=new oe("initializeLeftNavLinkSelected"),$d=new oe("richTextEditorFlushChanges"),qp=new oe("richTextEditorSelectionRangeChange"),oM=new oe("richTextImageClick"),aM=new oe("richTextImageDeleteButtonClicked"),lM=new oe("componentDidRender"),E_=new oe("popoverUpdateTarget"),cM=new oe("richTextEditDeleteSelectedNodes"),dM=new oe("paginationPageSizeChange"),uM=new oe("paginationCurrentChange"),hM=new oe("pasteEvent"),fM=new oe("nestEAHierarchyTreeChange"),pM=new oe("tableHeadCellSortEvent"),gM=new oe("internalCodeBlockSelectionChange"),mM=new oe("tableHeadRowRenderInputRIC"),vM=new oe("tableHeadCellRenderInputRIC"),_M=new oe("tableCellRenderInputRIC"),yM=new oe("tableColumnCellRenderInputChange"),bM=new oe("calendarEventPreviewUpdate"),wM=new oe("calendarEventPreviewClear"),zE=new oe("InternalUpdateRTECursorPosition"),SM=new oe("leftNavLinkSelectedTopic"),CM=new oe("calendarEventPreviewHide"),EM=new oe("dialogContentReady"),xM=new oe("formSubmit"),TM=new oe("formReset"),kM=new oe("progressTrackerStepClick"),LM=new oe("datePickerCalendarClear"),AM=new oe("datePickerCalendarUpdatePeriodByUser"),RM=new oe("updateVegaInputValue"),OM=new oe("focusVegaInput"),DM=new oe("setupVegaInputMaskConfig"),NM=new oe("codeBlockBlur"),Ef=new oe("rteExtensionTableCellsSelectionAnchor"),UE=new oe("rteExtensionTableCellSelectionChange"),IM=new oe("calendarPreviewActionClick"),Ks=r=>r.replace(/([A-Z])/g,e=>`-${e[0].toLowerCase()}`),WE=r=>r.split("-").map((e,t)=>(t===0?e.charAt(0).toLowerCase():e.charAt(0).toUpperCase())+e.slice(1)).join(""),BM={"v-font-h1":["@apply v-font-inter","font-size:42px","font-weight:700","line-height:50px","letter-spacing:0.42px"],"M:v-font-h1":["@apply v-font-inter","font-size:42px","font-weight:700","line-height:50px","letter-spacing:2.52px"],"L:v-font-h1":["@apply v-font-inter","font-size:48px","font-weight:700","line-height:56px","letter-spacing:0.96px"],"XL:v-font-h1":["@apply v-font-inter","font-size:60px","font-weight:700","line-height:70px","letter-spacing:1.8px"],"v-font-h2":["@apply v-font-inter","font-size:32px","font-weight:700","line-height:40px","letter-spacing:0px"],"M:v-font-h2":["@apply v-font-inter","font-size:32px","font-weight:700","line-height:40px","letter-spacing:0px"],"L:v-font-h2":["@apply v-font-inter","font-size:36px","font-weight:700","line-height:44px","letter-spacing:1.8px"],"XL:v-font-h2":["@apply v-font-inter","font-size:42px","font-weight:700","line-height:52px","letter-spacing:0.42px"],"v-font-h3":["@apply v-font-inter","font-size:28px","font-weight:500","line-height:36px","letter-spacing:0.28px"],"M:v-font-h3":["@apply v-font-inter","font-size:28px","font-weight:500","line-height:36px","letter-spacing:0.28px"],"L:v-font-h3":["@apply v-font-inter","font-size:28px","font-weight:500","line-height:36px","letter-spacing:0.28px"],"XL:v-font-h3":["@apply v-font-inter","font-size:32px","font-weight:500","line-height:44px","letter-spacing:0.32px"],"v-font-h4":["@apply v-font-inter","font-size:24px","font-weight:700","line-height:32px","letter-spacing:0px"],"M:v-font-h4":["@apply v-font-inter","font-size:24px","font-weight:700","line-height:32px","letter-spacing:0px"],"L:v-font-h4":["@apply v-font-inter","font-size:24px","font-weight:700","line-height:32px","letter-spacing:0px"],"XL:v-font-h4":["@apply v-font-inter","font-size:28px","font-weight:700","line-height:36px","letter-spacing:0px"],"v-font-h5":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:28px","letter-spacing:0px"],"M:v-font-h5":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:28px","letter-spacing:0px"],"L:v-font-h5":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:28px","letter-spacing:0px"],"XL:v-font-h5":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:28px","letter-spacing:0px"],"v-font-h6":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:25px","letter-spacing:0px"],"M:v-font-h6":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:25px","letter-spacing:0px"],"L:v-font-h6":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:25px","letter-spacing:0px"],"XL:v-font-h6":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:25px","letter-spacing:0px"],"v-font-p1-short":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:28px","letter-spacing:0px"],"M:v-font-p1-short":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:27px","letter-spacing:0px"],"L:v-font-p1-short":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:27px","letter-spacing:0px"],"XL:v-font-p1-short":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:27px","letter-spacing:0px"],"v-font-p1-long":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:32px","letter-spacing:0px"],"M:v-font-p1-long":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:30px","letter-spacing:0px"],"L:v-font-p1-long":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:30px","letter-spacing:0px"],"XL:v-font-p1-long":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:30px","letter-spacing:0px"],"v-font-p2-short":["@apply v-font-inter","font-size:18px","font-weight:500","line-height:28px","letter-spacing:0px"],"M:v-font-p2-short":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:22px","letter-spacing:0px"],"L:v-font-p2-short":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:22px","letter-spacing:0px"],"XL:v-font-p2-short":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:22px","letter-spacing:0px"],"v-font-p2-long":["@apply v-font-inter","font-size:18px","font-weight:500","line-height:30px","letter-spacing:0px"],"M:v-font-p2-long":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:28px","letter-spacing:0px"],"L:v-font-p2-long":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:28px","letter-spacing:0px"],"XL:v-font-p2-long":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:28px","letter-spacing:0px"],"v-font-btn-label":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:24px","letter-spacing:0px"],"M:v-font-btn-label":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px","letter-spacing:0px"],"L:v-font-btn-label":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px","letter-spacing:0px"],"XL:v-font-btn-label":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px","letter-spacing:0px"],"v-font-btn-label-lg":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:24px","letter-spacing:0px"],"M:v-font-btn-label-lg":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:24px","letter-spacing:0px"],"L:v-font-btn-label-lg":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:24px","letter-spacing:0px"],"XL:v-font-btn-label-lg":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:24px","letter-spacing:0px"],"v-font-btn-label-sm":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px","letter-spacing:0px"],"M:v-font-btn-label-sm":["@apply v-font-inter","font-size:14px","font-weight:700","line-height:18px","letter-spacing:0px"],"L:v-font-btn-label-sm":["@apply v-font-inter","font-size:14px","font-weight:700","line-height:18px","letter-spacing:0px"],"XL:v-font-btn-label-sm":["@apply v-font-inter","font-size:14px","font-weight:700","line-height:18px","letter-spacing:0px"],"v-font-btn-link-label":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:24px","letter-spacing:0px"],"M:v-font-btn-link-label":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:22px","letter-spacing:0px"],"L:v-font-btn-link-label":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:22px","letter-spacing:0px"],"XL:v-font-btn-link-label":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:22px","letter-spacing:0px"],"v-font-btn-link-label-lg":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:24px","letter-spacing:0px"],"M:v-font-btn-link-label-lg":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:22px","letter-spacing:0px"],"L:v-font-btn-link-label-lg":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:22px","letter-spacing:0px"],"XL:v-font-btn-link-label-lg":["@apply v-font-inter","font-size:18px","font-weight:700","line-height:22px","letter-spacing:0px"],"v-font-btn-link-label-sm":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px","letter-spacing:0px"],"M:v-font-btn-link-label-sm":["@apply v-font-inter","font-size:14px","font-weight:700","line-height:18px","letter-spacing:0px"],"L:v-font-btn-link-label-sm":["@apply v-font-inter","font-size:14px","font-weight:700","line-height:18px","letter-spacing:0px"],"XL:v-font-btn-link-label-sm":["@apply v-font-inter","font-size:14px","font-weight:700","line-height:18px","letter-spacing:0px"],"v-font-field-label":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:22px","letter-spacing:0px"],"M:v-font-field-label":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:22px","letter-spacing:0px"],"L:v-font-field-label":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:22px","letter-spacing:0px"],"XL:v-font-field-label":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:22px","letter-spacing:0px"],"v-font-field-label-sm":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:18px"],"M:v-font-field-label-sm":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:18px"],"L:v-font-field-label-sm":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:18px"],"XL:v-font-field-label-sm":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:18px"],"v-font-field-label-xs":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:16px"],"M:v-font-field-label-xs":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:16px"],"L:v-font-field-label-xs":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:16px"],"XL:v-font-field-label-xs":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:16px"],"v-font-field-label-lg":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:24px","letter-spacing:0px"],"M:v-font-field-label-lg":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:24px","letter-spacing:0px"],"L:v-font-field-label-lg":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:24px","letter-spacing:0px"],"XL:v-font-field-label-lg":["@apply v-font-inter","font-size:20px","font-weight:500","line-height:24px","letter-spacing:0px"],"v-font-field-label-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px"],"M:v-font-field-label-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px"],"L:v-font-field-label-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px"],"XL:v-font-field-label-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px"],"v-font-field-label-sm-em":["@apply v-font-inter","font-size:14px","font-weight:700","line-height:18px"],"M:v-font-field-label-sm-em":["@apply v-font-inter","font-size:14px","font-weight:700","line-height:18px"],"L:v-font-field-label-sm-em":["@apply v-font-inter","font-size:14px","font-weight:700","line-height:18px"],"XL:v-font-field-label-sm-em":["@apply v-font-inter","font-size:14px","font-weight:700","line-height:18px"],"v-font-field-label-xs-em":["@apply v-font-inter","font-size:12px","font-weight:700","line-height:16px","letter-spacing:0px"],"M:v-font-field-label-xs-em":["@apply v-font-inter","font-size:12px","font-weight:700","line-height:16px","letter-spacing:0px"],"L:v-font-field-label-xs-em":["@apply v-font-inter","font-size:12px","font-weight:700","line-height:16px","letter-spacing:0px"],"XL:v-font-field-label-xs-em":["@apply v-font-inter","font-size:12px","font-weight:700","line-height:16px","letter-spacing:0px"],"v-font-field-label-lg-em":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:24px","letter-spacing:0px"],"M:v-font-field-label-lg-em":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:24px","letter-spacing:0px"],"L:v-font-field-label-lg-em":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:24px","letter-spacing:0px"],"XL:v-font-field-label-lg-em":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:24px","letter-spacing:0px"],"v-font-field-value":["@apply v-font-inter","font-size:16px","font-weight:400","line-height:24px","letter-spacing:0px"],"M:v-font-field-value":["@apply v-font-inter","font-size:16px","font-weight:400","line-height:24px","letter-spacing:0px"],"L:v-font-field-value":["@apply v-font-inter","font-size:16px","font-weight:400","line-height:24px","letter-spacing:0px"],"XL:v-font-field-value":["@apply v-font-inter","font-size:16px","font-weight:400","line-height:24px","letter-spacing:0px"],"v-font-field-value-sm":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:16px"],"M:v-font-field-value-sm":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:16px"],"L:v-font-field-value-sm":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:16px"],"XL:v-font-field-value-sm":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:16px"],"v-font-field-value-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:22px","letter-spacing:0px"],"M:v-font-field-value-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:22px","letter-spacing:0px"],"L:v-font-field-value-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:22px","letter-spacing:0px"],"XL:v-font-field-value-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:22px","letter-spacing:0px"],"v-font-field-value-disabled":["@apply v-font-inter","font-size:16px","font-weight:400","line-height:24px","letter-spacing:0px"],"M:v-font-field-value-disabled":["@apply v-font-inter","font-size:16px","font-weight:400","line-height:24px","letter-spacing:0px"],"L:v-font-field-value-disabled":["@apply v-font-inter","font-size:16px","font-weight:400","line-height:24px","letter-spacing:0px"],"XL:v-font-field-value-disabled":["@apply v-font-inter","font-size:16px","font-weight:400","line-height:24px","letter-spacing:0px"],"v-font-sidebar-link":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:24px","letter-spacing:0px"],"M:v-font-sidebar-link":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:24px","letter-spacing:0px"],"L:v-font-sidebar-link":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:24px","letter-spacing:0px"],"XL:v-font-sidebar-link":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:24px","letter-spacing:0px"],"v-font-sidebar-link-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px","letter-spacing:0px"],"M:v-font-sidebar-link-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px","letter-spacing:0px"],"L:v-font-sidebar-link-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px","letter-spacing:0px"],"XL:v-font-sidebar-link-em":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px","letter-spacing:0px"],"v-font-footnote1-short":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:18px","letter-spacing:0px"],"M:v-font-footnote1-short":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:18px","letter-spacing:0px"],"L:v-font-footnote1-short":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:18px","letter-spacing:0px"],"XL:v-font-footnote1-short":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:18px","letter-spacing:0px"],"v-font-footnote1-long":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:20px","letter-spacing:0px"],"M:v-font-footnote1-long":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:18px","letter-spacing:0px"],"L:v-font-footnote1-long":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:18px","letter-spacing:0px"],"XL:v-font-footnote1-long":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:18px","letter-spacing:0px"],"v-font-footnote2-short":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:16px","letter-spacing:0px"],"M:v-font-footnote2-short":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:16px","letter-spacing:0px"],"L:v-font-footnote2-short":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:16px","letter-spacing:0px"],"XL:v-font-footnote2-short":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:16px","letter-spacing:0px"],"v-font-footnote2-long":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:20px","letter-spacing:0px"],"M:v-font-footnote2-long":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:18px","letter-spacing:0px"],"L:v-font-footnote2-long":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:18px","letter-spacing:0px"],"XL:v-font-footnote2-long":["@apply v-font-inter","font-size:12px","font-weight:400","line-height:18px","letter-spacing:0px"],"v-font-h-modal":["@apply v-font-inter","font-size:24px","font-weight:700","line-height:32px"],"M:v-font-h-modal":["@apply v-font-inter","font-size:24px","font-weight:700","line-height:32px"],"L:v-font-h-modal":["@apply v-font-inter","font-size:24px","font-weight:700","line-height:32px"],"XL:v-font-h-modal":["@apply v-font-inter","font-size:24px","font-weight:700","line-height:32px"],"v-font-keypad-label":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px"],"M:v-font-keypad-label":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px"],"L:v-font-keypad-label":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px"],"XL:v-font-keypad-label":["@apply v-font-inter","font-size:16px","font-weight:700","line-height:24px"],"v-font-keypad-label-large":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:24px"],"M:v-font-keypad-label-large":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:24px"],"L:v-font-keypad-label-large":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:24px"],"XL:v-font-keypad-label-large":["@apply v-font-inter","font-size:20px","font-weight:700","line-height:24px"],"v-font-notification-content":["@apply v-font-inter","font-size:14px","font-weight:400","line-height:20px","letter-spacing:0px"],"M:v-font-notification-content":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:22px","letter-spacing:0px"],"L:v-font-notification-content":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:22px","letter-spacing:0px"],"XL:v-font-notification-content":["@apply v-font-inter","font-size:16px","font-weight:500","line-height:22px","letter-spacing:0px"],"v-font-counter-badge-label":["@apply v-font-inter","font-size:12px","font-weight:700","line-height:16px"],"M:v-font-counter-badge-label":["@apply v-font-inter","font-size:12px","font-weight:700","line-height:16px"],"L:v-font-counter-badge-label":["@apply v-font-inter","font-size:12px","font-weight:700","line-height:16px"],"XL:v-font-counter-badge-label":["@apply v-font-inter","font-size:12px","font-weight:700","line-height:16px"]},GE=["font-h1","font-h2","font-h3","font-h4","font-h5","font-h6","font-p1-short","font-p1-long","font-p2-short","font-p2-long","font-btn-label","font-btn-label-lg","font-btn-label-sm","font-btn-link-label","font-btn-link-label-lg","font-btn-link-label-sm","font-field-label","font-field-label-sm","font-field-label-xs","font-field-label-lg","font-field-label-em","font-field-label-sm-em","font-field-label-xs-em","font-field-label-lg-em","font-field-value","font-field-value-sm","font-field-value-em","font-field-value-disabled","font-sidebar-link","font-sidebar-link-em","font-footnote1-short","font-footnote1-long","font-footnote2-short","font-footnote2-long","font-h-modal","font-keypad-label","font-keypad-label-large","font-notification-content","font-counter-badge-label"],rd={inter:{name:"Inter",url:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap"},"roboto-mono":{name:"Roboto Mono",url:"https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap"}},KE=new RegExp(/^([1-9]|1[0-2])(-auto)?$/),qE=new RegExp(/^([1-9]|1[0-2])(-auto)?$/),L0=/^4/,A0=/^(5[1-5]|677189)|^(222[1-9]|2[3-6]\d{2}|27[0-1]\d|2720)/,R0=/^3[47]/,O0=/^(6011|65|64[4-9]|622)/,D0=/(\\)?(Y{2,4}|M{1,4}|D{1,2}|d{1,4})/g,XE=["bg-brand","bg-page","bg-primary","bg-secondary","bg-tertiary","bg-quaternary","bg-inverted-primary","bg-inverted-secondary","bg-inverted-tertiary","bg-inverted-quaternary","bg-action","bg-action-hover","bg-action-focus","bg-action-active","bg-action-quaternary","bg-action-quaternary-hover","bg-action-quaternary-active","bg-action-secondary","bg-action-secondary-hover","bg-action-secondary-active","bg-action-tertiary","bg-action-tertiary-hover","bg-action-tertiary-active","bg-app-header","bg-backdrop-modal","bg-backdrop-popover","bg-backdrop-sidebar","bg-chip","bg-chip-hover","bg-chip-active","bg-danger","bg-danger-hover","bg-danger-focus","bg-danger-active","bg-danger-tertiary","bg-danger-tertiary-hover","bg-danger-tertiary-active","bg-disabled","bg-divider","bg-divider-secondary","bg-keypad-btn-active","bg-loading-progress","bg-loading-track","bg-segment-hover","bg-segment-control","bg-selected","bg-sidebar","bg-sidebar-icon","bg-sidebar-icon-hover","bg-sidebar-icon-selected","bg-sidebar-item-hover","bg-sidebar-item-selected","bg-site-footer","bg-site-footer-action","bg-site-footer-action-hover","bg-site-footer-action-active","bg-site-footer-field","bg-slider-handle","bg-status-error","bg-status-info","bg-status-success","bg-status-warning","bg-tab","bg-tab-hover","bg-tab-selected","bg-table-alt-row","bg-table-header","bg-table-row-hover","bg-table-row-selected-expanded","bg-table-selected-row","bg-textarea-count","bg-tile","bg-tile-hover","bg-tile-selected","bg-tile-selected-hover","bg-toggle-switch","bg-toggle-switch-hover","bg-toggle-switch-selected-disabled","bg-transparent","bg-accent1-primary","bg-accent1-secondary","bg-accent1-tertiary","bg-accent2-primary","bg-accent2-secondary","bg-accent2-tertiary","bg-accent3-primary","bg-accent3-secondary","bg-accent3-tertiary","bg-accent4-primary","bg-accent4-secondary","bg-accent4-tertiary","bg-accent5-primary","bg-accent5-secondary","bg-accent5-tertiary","bg-accent6-primary","bg-accent6-secondary","bg-accent6-tertiary","bg-accent7-primary","bg-accent7-secondary","bg-accent7-tertiary","bg-accent8-primary","bg-accent8-secondary","bg-accent8-tertiary","bg-accent9-primary","bg-accent9-secondary","bg-accent9-tertiary","bg-accent10-primary","bg-accent10-secondary","bg-accent10-tertiary","bg-date-picker-range","text-primary","text-secondary","text-inverted-primary","text-inverted-secondary","text-black","text-white","text-brand","text-danger-link","text-danger-link-hover","text-danger-link-active","text-danger-link-focus","text-danger-link-visited","text-disabled","text-error","text-input-disabled","text-input-placeholder","text-link","text-link-hover","text-link-active","text-link-focus","text-link-visited","text-on-action","text-on-danger","text-on-disabled","text-sidebar-link","text-sidebar-link-hover","text-sidebar-link-selected","text-site-footer-link","text-site-footer-link-hover","text-site-footer-link-active","text-success","text-inverted-success","text-accent1-primary","text-accent2-primary","text-accent3-primary","text-accent4-primary","text-accent5-primary","text-accent6-primary","text-accent7-primary","text-accent8-primary","text-accent9-primary","text-accent10-primary","border-color-action","border-color-action-hover","border-color-action-active","border-color-chip","border-color-danger","border-color-danger-hover","border-color-danger-active","border-color-divider","border-color-divider-secondary","border-color-input-field","border-color-input-field-hover","border-color-input-field-focus","border-color-input-field-danger","border-color-input-field-danger-hover","border-color-input-field-danger-focus","border-color-input-field-disabled","border-color-secondary-btn-disabled","border-color-sidebar-item-focus","border-color-slider-handle","border-color-success","border-color-table-divider","border-color-tile","border-color-tile-hover","border-color-tile-focus","border-color-tile-selected-focus","border-color-tile-selected","border-color-tile-selected-hover","border-color-notification-btn","border-color-notification-btn-dark"],ZE=["bg-brand","bg-page","bg-primary","bg-secondary","bg-tertiary","bg-quaternary","bg-inverted-primary","bg-inverted-secondary","bg-inverted-tertiary","bg-inverted-quaternary","bg-action","bg-action-hover","bg-action-focus","bg-action-active","bg-action-quaternary","bg-action-quaternary-hover","bg-action-quaternary-active","bg-action-secondary","bg-action-secondary-hover","bg-action-secondary-active","bg-action-tertiary","bg-action-tertiary-hover","bg-action-tertiary-active","bg-app-header","bg-backdrop-modal","bg-backdrop-popover","bg-backdrop-sidebar","bg-chip","bg-chip-hover","bg-chip-active","bg-danger","bg-danger-hover","bg-danger-focus","bg-danger-active","bg-danger-tertiary","bg-danger-tertiary-hover","bg-danger-tertiary-active","bg-disabled","bg-divider","bg-divider-secondary","bg-keypad-btn-active","bg-loading-progress","bg-loading-track","bg-segment-hover","bg-segment-control","bg-selected","bg-sidebar","bg-sidebar-icon","bg-sidebar-icon-hover","bg-sidebar-icon-selected","bg-sidebar-item-hover","bg-sidebar-item-selected","bg-site-footer","bg-site-footer-action","bg-site-footer-action-hover","bg-site-footer-action-active","bg-site-footer-field","bg-slider-handle","bg-status-error","bg-status-info","bg-status-success","bg-status-warning","bg-tab","bg-tab-hover","bg-tab-selected","bg-table-alt-row","bg-table-header","bg-table-row-hover","bg-table-row-selected-expanded","bg-table-selected-row","bg-textarea-count","bg-tile","bg-tile-hover","bg-tile-selected","bg-tile-selected-hover","bg-toggle-switch","bg-toggle-switch-hover","bg-toggle-switch-selected-disabled","bg-transparent","bg-accent1-primary","bg-accent1-secondary","bg-accent1-tertiary","bg-accent2-primary","bg-accent2-secondary","bg-accent2-tertiary","bg-accent3-primary","bg-accent3-secondary","bg-accent3-tertiary","bg-accent4-primary","bg-accent4-secondary","bg-accent4-tertiary","bg-accent5-primary","bg-accent5-secondary","bg-accent5-tertiary","bg-accent6-primary","bg-accent6-secondary","bg-accent6-tertiary","bg-accent7-primary","bg-accent7-secondary","bg-accent7-tertiary","bg-accent8-primary","bg-accent8-secondary","bg-accent8-tertiary","bg-accent9-primary","bg-accent9-secondary","bg-accent9-tertiary","bg-accent10-primary","bg-accent10-secondary","bg-accent10-tertiary","bg-date-picker-range"],MM=["border-color-action","border-color-action-hover","border-color-action-active","border-color-chip","border-color-danger","border-color-danger-hover","border-color-danger-active","border-color-divider","border-color-divider-secondary","border-color-input-field","border-color-input-field-hover","border-color-input-field-focus","border-color-input-field-danger","border-color-input-field-danger-hover","border-color-input-field-danger-focus","border-color-input-field-disabled","border-color-secondary-btn-disabled","border-color-sidebar-item-focus","border-color-slider-handle","border-color-success","border-color-table-divider","border-color-tile","border-color-tile-hover","border-color-tile-focus","border-color-tile-selected-focus","border-color-tile-selected","border-color-tile-selected-hover","border-color-notification-btn","border-color-notification-btn-dark"],YE={"bg-brand":"rgba(var(--v-bg-brand, 51, 57, 61, 1))","bg-page":"rgba(var(--v-bg-page, 240, 243, 247, 1))","bg-primary":"rgba(var(--v-bg-primary, 252, 252, 252, 1))","bg-secondary":"rgba(var(--v-bg-secondary, 245, 247, 247, 1))","bg-tertiary":"rgba(var(--v-bg-tertiary, 240, 243, 247, 1))","bg-quaternary":"rgba(var(--v-bg-quaternary, 241, 248, 251, 1))","bg-inverted-primary":"rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1))","bg-inverted-secondary":"rgba(var(--v-bg-inverted-secondary, 18, 18, 39, 1))","bg-inverted-tertiary":"rgba(var(--v-bg-inverted-tertiary, 24, 24, 48, 1))","bg-inverted-quaternary":"rgba(var(--v-bg-inverted-quaternary, 70, 71, 101, 1))","bg-action":"rgba(var(--v-bg-action, 19, 98, 226, 1))","bg-action-hover":"rgba(var(--v-bg-action-hover, 4, 112, 236, 1))","bg-action-focus":"rgba(var(--v-bg-action-focus, 19, 98, 226, 1))","bg-action-active":"rgba(var(--v-bg-action-active, 29, 65, 195, 1))","bg-action-quaternary":"rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))","bg-action-quaternary-hover":"rgba(var(--v-bg-action-quaternary-hover, 239, 239, 239, 1))","bg-action-quaternary-active":"rgba(var(--v-bg-action-quaternary-active, 205, 209, 211, 1))","bg-action-secondary":"rgba(var(--v-bg-action-secondary, 252, 252, 252, 1))","bg-action-secondary-hover":"rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))","bg-action-secondary-active":"rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))","bg-action-tertiary":"rgba(var(--v-bg-action-tertiary, 0, 0, 0, 0))","bg-action-tertiary-hover":"rgba(var(--v-bg-action-tertiary-hover, 4, 4, 28, 0.05))","bg-action-tertiary-active":"rgba(var(--v-bg-action-tertiary-active, 4, 4, 28, 0.1))","bg-app-header":"rgba(var(--v-bg-app-header, 240, 243, 247, 0.88))","bg-backdrop-modal":"rgba(var(--v-bg-backdrop-modal, 18, 18, 39, 0.85))","bg-backdrop-popover":"rgba(var(--v-bg-backdrop-popover, 32, 54, 69, 0.16))","bg-backdrop-sidebar":"rgba(var(--v-bg-backdrop-sidebar, 18, 18, 39, 0.85))","bg-chip":"rgba(var(--v-bg-chip, 32, 54, 69, 0.06))","bg-chip-hover":"rgba(var(--v-bg-chip-hover, 32, 54, 69, 0.12))","bg-chip-active":"rgba(var(--v-bg-chip-active, 32, 54, 69, 0.2))","bg-danger":"rgba(var(--v-bg-danger, 189, 41, 71, 1))","bg-danger-hover":"rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))","bg-danger-focus":"rgba(var(--v-bg-danger-focus, 189, 41, 71, 1))","bg-danger-active":"rgba(var(--v-bg-danger-active, 230, 50, 87, 1))","bg-danger-tertiary":"rgba(var(--v-bg-danger-tertiary, 0, 0, 0, 0))","bg-danger-tertiary-hover":"rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2))","bg-danger-tertiary-active":"rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2))","bg-disabled":"rgba(var(--v-bg-disabled, 176, 180, 181, 1))","bg-divider":"rgba(var(--v-bg-divider, 171, 198, 216, 1))","bg-divider-secondary":"rgba(var(--v-bg-divider-secondary, 199, 217, 229, 1))","bg-keypad-btn-active":"rgba(var(--v-bg-keypad-btn-active, 229, 239, 255, 1))","bg-loading-progress":"rgba(var(--v-bg-loading-progress, 153, 192, 255, 1))","bg-loading-track":"rgba(var(--v-bg-loading-track, 229, 239, 255, 1))","bg-segment-hover":"rgba(var(--v-bg-segment-hover, 205, 209, 211, 1))","bg-segment-control":"rgba(var(--v-bg-segment-control, 89, 96, 99, 0.1))","bg-selected":"rgba(var(--v-bg-selected, 0, 151, 255, 0.3))","bg-sidebar":"rgba(var(--v-bg-sidebar, 18, 18, 39, 1))","bg-sidebar-icon":"rgba(var(--v-bg-sidebar-icon, 188, 186, 213, 1))","bg-sidebar-icon-hover":"rgba(var(--v-bg-sidebar-icon-hover, 18, 18, 39, 1))","bg-sidebar-icon-selected":"rgba(var(--v-bg-sidebar-icon-selected, 252, 252, 252, 1))","bg-sidebar-item-hover":"rgba(var(--v-bg-sidebar-item-hover, 252, 252, 252, 1))","bg-sidebar-item-selected":"rgba(var(--v-bg-sidebar-item-selected, 19, 98, 226, 0.4))","bg-site-footer":"rgba(var(--v-bg-site-footer, 51, 57, 61, 1))","bg-site-footer-action":"rgba(var(--v-bg-site-footer-action, 171, 198, 216, 1))","bg-site-footer-action-hover":"rgba(var(--v-bg-site-footer-action-hover, 199, 217, 229, 1))","bg-site-footer-action-active":"rgba(var(--v-bg-site-footer-action-active, 143, 179, 203, 1))","bg-site-footer-field":"rgba(var(--v-bg-site-footer-field, 89, 96, 99, 1))","bg-slider-handle":"rgba(var(--v-bg-slider-handle, 252, 252, 252, 1))","bg-status-error":"rgba(var(--v-bg-status-error, 255, 110, 139, 1))","bg-status-info":"rgba(var(--v-bg-status-info, 205, 209, 211, 1))","bg-status-success":"rgba(var(--v-bg-status-success, 160, 233, 167, 1))","bg-status-warning":"rgba(var(--v-bg-status-warning, 255, 220, 131, 1))","bg-tab":"rgba(var(--v-bg-tab, 240, 243, 247, 1))","bg-tab-hover":"rgba(var(--v-bg-tab-hover, 245, 247, 247, 1))","bg-tab-selected":"rgba(var(--v-bg-tab-selected, 32, 54, 69, 1))","bg-table-alt-row":"rgba(var(--v-bg-table-alt-row, 245, 247, 247, 1))","bg-table-header":"rgba(var(--v-bg-table-header, 240, 243, 247, 1))","bg-table-row-hover":"rgba(var(--v-bg-table-row-hover, 241, 248, 251, 1))","bg-table-row-selected-expanded":"rgba(var(--v-bg-table-row-selected-expanded, 229, 239, 255, 1))","bg-table-selected-row":"rgba(var(--v-bg-table-selected-row, 204, 223, 255, 1))","bg-textarea-count":"rgba(var(--v-bg-textarea-count, 4, 4, 28, 0.6))","bg-tile":"rgba(var(--v-bg-tile, 252, 252, 252, 1))","bg-tile-hover":"rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))","bg-tile-selected":"rgba(var(--v-bg-tile-selected, 242, 247, 255, 1))","bg-tile-selected-hover":"rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1))","bg-toggle-switch":"rgba(var(--v-bg-toggle-switch, 107, 116, 125, 0.7))","bg-toggle-switch-hover":"rgba(var(--v-bg-toggle-switch-hover, 107, 116, 125, 1))","bg-toggle-switch-selected-disabled":"rgba(var(--v-bg-toggle-switch-selected-disabled, 153, 192, 255, 1))","bg-transparent":"rgba(var(--v-bg-transparent, 0, 0, 0, 0))","bg-accent1-primary":"rgba(var(--v-bg-accent1-primary, 115, 230, 220, 1))","bg-accent1-secondary":"rgba(var(--v-bg-accent1-secondary, 193, 244, 239, 1))","bg-accent1-tertiary":"rgba(var(--v-bg-accent1-tertiary, 224, 249, 247, 1))","bg-accent2-primary":"rgba(var(--v-bg-accent2-primary, 128, 107, 255, 1))","bg-accent2-secondary":"rgba(var(--v-bg-accent2-secondary, 199, 189, 255, 1))","bg-accent2-tertiary":"rgba(var(--v-bg-accent2-tertiary, 227, 222, 255, 1))","bg-accent3-primary":"rgba(var(--v-bg-accent3-primary, 255, 220, 131, 1))","bg-accent3-secondary":"rgba(var(--v-bg-accent3-secondary, 255, 239, 200, 1))","bg-accent3-tertiary":"rgba(var(--v-bg-accent3-tertiary, 255, 247, 227, 1))","bg-accent4-primary":"rgba(var(--v-bg-accent4-primary, 255, 149, 113, 1))","bg-accent4-secondary":"rgba(var(--v-bg-accent4-secondary, 255, 208, 192, 1))","bg-accent4-tertiary":"rgba(var(--v-bg-accent4-tertiary, 255, 231, 223, 1))","bg-accent5-primary":"rgba(var(--v-bg-accent5-primary, 0, 187, 255, 1))","bg-accent5-secondary":"rgba(var(--v-bg-accent5-secondary, 142, 223, 249, 1))","bg-accent5-tertiary":"rgba(var(--v-bg-accent5-tertiary, 227, 247, 253, 1))","bg-accent6-primary":"rgba(var(--v-bg-accent6-primary, 255, 130, 201, 1))","bg-accent6-secondary":"rgba(var(--v-bg-accent6-secondary, 255, 199, 231, 1))","bg-accent6-tertiary":"rgba(var(--v-bg-accent6-tertiary, 255, 227, 243, 1))","bg-accent7-primary":"rgba(var(--v-bg-accent7-primary, 37, 159, 159, 1))","bg-accent7-secondary":"rgba(var(--v-bg-accent7-secondary, 155, 212, 214, 1))","bg-accent7-tertiary":"rgba(var(--v-bg-accent7-tertiary, 208, 239, 239, 1))","bg-accent8-primary":"rgba(var(--v-bg-accent8-primary, 86, 61, 130, 1))","bg-accent8-secondary":"rgba(var(--v-bg-accent8-secondary, 199, 162, 204, 1))","bg-accent8-tertiary":"rgba(var(--v-bg-accent8-tertiary, 230, 214, 234, 1))","bg-accent9-primary":"rgba(var(--v-bg-accent9-primary, 255, 191, 63, 1))","bg-accent9-secondary":"rgba(var(--v-bg-accent9-secondary, 254, 215, 142, 1))","bg-accent9-tertiary":"rgba(var(--v-bg-accent9-tertiary, 251, 226, 185, 1))","bg-accent10-primary":"rgba(var(--v-bg-accent10-primary, 237, 122, 35, 1))","bg-accent10-secondary":"rgba(var(--v-bg-accent10-secondary, 241, 146, 85, 1))","bg-accent10-tertiary":"rgba(var(--v-bg-accent10-tertiary, 245, 187, 148, 1))","bg-date-picker-range":"rgba(var(--v-bg-date-picker-range, 229, 239, 255, 1))"},PM={"border-color-action":"rgba(var(--v-border-color-action, 19, 98, 226, 1))","border-color-action-hover":"rgba(var(--v-border-color-action-hover, 4, 112, 236, 1))","border-color-action-active":"rgba(var(--v-border-color-action-active, 29, 65, 195, 1))","border-color-chip":"rgba(var(--v-border-color-chip, 205, 209, 211, 1))","border-color-danger":"rgba(var(--v-border-color-danger, 230, 50, 87, 1))","border-color-danger-hover":"rgba(var(--v-border-color-danger-hover, 255, 87, 114, 1))","border-color-danger-active":"rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))","border-color-divider":"rgba(var(--v-border-color-divider, 171, 198, 216, 1))","border-color-divider-secondary":"rgba(var(--v-border-color-divider-secondary, 199, 217, 229, 1))","border-color-input-field":"rgba(var(--v-border-color-input-field, 171, 198, 216, 1))","border-color-input-field-hover":"rgba(var(--v-border-color-input-field-hover, 115, 160, 190, 1))","border-color-input-field-focus":"rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))","border-color-input-field-danger":"rgba(var(--v-border-color-input-field-danger, 230, 50, 87, 1))","border-color-input-field-danger-hover":"rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))","border-color-input-field-danger-focus":"rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))","border-color-input-field-disabled":"rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1))","border-color-secondary-btn-disabled":"rgba(var(--v-border-color-secondary-btn-disabled, 176, 180, 181, 1))","border-color-sidebar-item-focus":"rgba(var(--v-border-color-sidebar-item-focus, 19, 98, 226, 1))","border-color-slider-handle":"rgba(var(--v-border-color-slider-handle, 199, 217, 229, 1))","border-color-success":"rgba(var(--v-border-color-success, 1, 128, 31, 1))","border-color-table-divider":"rgba(var(--v-border-color-table-divider, 171, 198, 216, 1))","border-color-tile":"rgba(var(--v-border-color-tile, 171, 198, 216, 1))","border-color-tile-hover":"rgba(var(--v-border-color-tile-hover, 115, 160, 190, 1))","border-color-tile-focus":"rgba(var(--v-border-color-tile-focus, 19, 98, 226, 1))","border-color-tile-selected-focus":"rgba(var(--v-border-color-tile-selected-focus, 19, 98, 226, 1))","border-color-tile-selected":"rgba(var(--v-border-color-tile-selected, 19, 98, 226, 1))","border-color-tile-selected-hover":"rgba(var(--v-border-color-tile-selected-hover, 4, 112, 236, 1))","border-color-notification-btn":"rgba(var(--v-border-color-notification-btn, 32, 54, 69, 1))","border-color-notification-btn-dark":"rgba(var(--v-border-color-notification-btn-dark, 32, 54, 69, 1))"},x_={0:0,"size-4":4,"size-8":8,"size-12":12,"size-16":16,"size-20":20,"size-24":24,"size-32":32,"size-40":40,"size-48":48,"size-64":64,"size-72":72,"size-80":80,"size-112":112,"size-2":2},JE=["shadow-card","shadow-modal","shadow-popover","shadow-form-field","shadow-dropdown-menu","shadow-app-header","shadow-modal-header","shadow-modal-footer","shadow-modal-footer-no-scroll"],FM={"shadow-card":"var(--v-shadow-card, 0px 2px 8px 0px rgba(0, 0, 0, 0.04), 0px 2px 4px 0px rgba(0, 0, 0, 0.02))","shadow-modal":"var(--v-shadow-modal, 0px 6px 40px 0px rgba(2, 2, 15, 0.04), 0px 4px 24px 0px rgba(2, 2, 15, 0.08), 0px 8px 80px 0px rgba(2, 2, 15, 0.16))","shadow-popover":"var(--v-shadow-popover, 0px 0px 88px 0px rgba(2, 2, 15, 0.01), 0px 0px 32px 0px rgba(2, 2, 15, 0.02), 0px 4px 72px 0px rgba(2, 2, 15, 0.06))","shadow-form-field":"var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1))","shadow-dropdown-menu":"var(--v-shadow-dropdown-menu, 0px 2px 4px -2px rgba(0, 0, 0, 0.1), 0px 4px 6px -1px rgba(0, 0, 0, 0.1))","shadow-app-header":"var(--v-shadow-app-header, 0px 1px 0px 0px rgba(45, 76, 97, 0.15))","shadow-modal-header":"var(--v-shadow-modal-header, 0px 1px 0px 0px rgba(45, 76, 97, 0.15))","shadow-modal-footer":"var(--v-shadow-modal-footer, 0px -2px 8px 0px rgba(45, 76, 97, 0.2), 0px -1px 0px 0px rgba(45, 76, 97, 0.15))","shadow-modal-footer-no-scroll":"var(--v-shadow-modal-footer-no-scroll, 0px -1px 0px 0px rgba(45, 76, 97, 0.15))"},T_={"rounded-none":0,"rounded-full":9999,"rounded-2":2,"rounded-4":4,"rounded-8":8,"rounded-12":12,"rounded-16":16,"rounded-24":24,"rounded-32":32,"rounded-48":48},QE=["border-secondary-btn","border-secondary-btn-hover","border-secondary-danger-btn","border-secondary-btn-active","border-secondary-danger-btn-hover","border-secondary-danger-btn-active","border-input-field","border-input-field-hover","border-input-field-focus","border-input-field-danger","border-input-field-danger-hover","border-input-field-danger-focus","border-sidebar-item-focus","border-input-field-disabled","border-success","border-secondary-btn-disabled","border-chip","border-divider","border-divider-secondary","border-tile-selected","border-tile-selected-hover","border-table-divider","border-slider-handle","border-tile","border-tile-hover","border-tile-focus","border-tile-selected-focus","border-notification-btn","border-notification-btn-black"],HM={"border-secondary-btn":"2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1))","border-secondary-btn-hover":"2px solid rgba(var(--v-border-secondary-btn-hover, 4, 112, 236, 1))","border-secondary-danger-btn":"2px solid rgba(var(--v-border-secondary-danger-btn, 230, 50, 87, 1))","border-secondary-btn-active":"2px solid rgba(var(--v-border-secondary-btn-active, 29, 65, 195, 1))","border-secondary-danger-btn-hover":"2px solid rgba(var(--v-border-secondary-danger-btn-hover, 255, 87, 114, 1))","border-secondary-danger-btn-active":"2px solid rgba(var(--v-border-secondary-danger-btn-active, 189, 41, 71, 1))","border-input-field":"1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))","border-input-field-hover":"1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))","border-input-field-focus":"1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1))","border-input-field-danger":"1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))","border-input-field-danger-hover":"1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))","border-input-field-danger-focus":"1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))","border-sidebar-item-focus":"2px solid rgba(var(--v-border-sidebar-item-focus, 19, 98, 226, 1))","border-input-field-disabled":"1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))","border-success":"2px solid rgba(var(--v-border-success, 1, 128, 31, 1))","border-secondary-btn-disabled":"2px solid rgba(var(--v-border-secondary-btn-disabled, 176, 180, 181, 1))","border-chip":"1px solid rgba(var(--v-border-chip, 205, 209, 211, 1))","border-divider":"1px solid rgba(var(--v-border-divider, 171, 198, 216, 1))","border-divider-secondary":"1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1))","border-tile-selected":"2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1))","border-tile-selected-hover":"2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1))","border-table-divider":"1px solid rgba(var(--v-border-table-divider, 171, 198, 216, 1))","border-slider-handle":"1px solid rgba(var(--v-border-slider-handle, 199, 217, 229, 1))","border-tile":"1px solid rgba(var(--v-border-tile, 171, 198, 216, 1))","border-tile-hover":"1px solid rgba(var(--v-border-tile-hover, 115, 160, 190, 1))","border-tile-focus":"1px solid rgba(var(--v-border-tile-focus, 19, 98, 226, 1))","border-tile-selected-focus":"2px solid rgba(var(--v-border-tile-selected-focus, 19, 98, 226, 1))","border-notification-btn":"2px solid rgba(var(--v-border-notification-btn, 32, 54, 69, 1))","border-notification-btn-black":"2px solid rgba(var(--v-border-notification-btn-black, 32, 54, 69, 1))"},k_=(r=0)=>{const e=[0,1,2,3,4,5,6];return e.concat(e).slice(r,r+7)};var N0;(function(r){r.sun="Sunday",r.mon="Monday",r.tue="Tuesday",r.wed="Wednesday",r.thu="Thursday",r.fri="Friday",r.sat="Saturday"})(N0||(N0={}));const na=()=>Intl.DateTimeFormat().resolvedOptions().timeZone,jM=r=>{const e=r.mode,t=r.startDate,n=r.endDate;if(!t&&!n)return"";const i=s=>`${s.getMonthName()} ${s.date} ${s.year}`;if(e==="single"&&t)return`${vr.t("Selected result")}: ${i(t)}`;if(e==="range"){const s=vr.t("Start Date"),a=vr.t("End Date");if(t&&n)return`${vr.t("Selected result")} ${s}: ${i(t)}. ${a}: ${i(n)}.`;if(t)return`${vr.t("Selected result")} ${s}: ${i(t)}.`}return""};class Oa{constructor(e,t){this._hours=e,this._minutes=t}static fromString(e){const t=this.convertTimeTo24Hour(e),[n,i]=t.split(":");return new Oa(Number(n),Number(i))}static fromDate(e){return new Oa(e.getHours(),e.getMinutes())}static calculateDuration(e,t,n="minutes"){const i=e.totalMinutes;let s=t.totalMinutes;t.hours===0&&e.hours!==0&&(s+=24*60);const a=s-i;return n==="hours"?a/60:a}static convertTimeTo24Hour(e){const t=e.toLocaleLowerCase();if(t.includes("am")||t.includes("pm")){const n=t.includes("am"),i=t.replace("am","").replace("pm","").trim(),[s,a]=i.split(":"),o=a.padStart(2,"0");return n?`${s==="12"?"00":s}:${o}`:`${s==="12"?"12":`${Number(s)+12}`}:${o}`}return e}get hours(){return this._hours}get minutes(){return this._minutes}get totalMinutes(){return this._hours*60+this._minutes}toString(e="hh:mm"){const t=this._hours.toString().padStart(2,"0"),n=this._minutes.toString().padStart(2,"0");switch(e.toLowerCase()){case"hh:m":return`${t}:${this._minutes}`;case"h:mm":return`${this._hours}:${n}`;case"h:m":return`${this._hours}:${this._minutes}`;case"12-hour":{const s=this._hours>=12?"pm":"am";return`${this._hours%12||12}:${n} ${vr.t(s)}`}default:return`${t}:${n}`}}}class Da{constructor(e,t){this.originalDate=e,this.timezone=t,this.syncDateTime()}static fromDate(e,t){return new Da(e,t)}static fromInitDataSource(e,t){const n=new Date(e);if(t.time){const i=Oa.fromString(t.time);n.setHours(i.hours,i.minutes,0,0)}else t.endTimeMissing&&n.setHours(23,59,59,0);return Da.fromDate(n,t.timezone)}get calendarDate(){return this.date}get calendarTime(){return this.time}toDate(){return this.date.toDate()}setTimezone(e){this.timezone=e,this.syncDateTime()}syncDateTime(){const e=this.convertDateToTimezone(this.originalDate);this.date=new Fe(e.getFullYear(),e.getMonth()+1,e.getDate()),this.time=Oa.fromDate(e)}convertDateToTimezone(e){if(this.timezone===na())return e;try{const n=new Intl.DateTimeFormat([],{timeZone:this.timezone,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(e),i=this.findDateTimeFormatPart(n,"year"),s=this.findDateTimeFormatPart(n,"month"),a=this.findDateTimeFormatPart(n,"day"),o=this.findDateTimeFormatPart(n,"hour"),l=this.findDateTimeFormatPart(n,"minute"),c=this.findDateTimeFormatPart(n,"second");if(i&&s&&a&&o&&l&&c){const u=parseInt(i.value,10),d=parseInt(s.value,10),g=parseInt(a.value,10),_=parseInt(o.value,10),y=parseInt(l.value,10),b=parseInt(c.value,10);return new Date(u,d-1,g,_,y,b)}}catch{rt.warn("Invalid timezone:",this.timezone)}return e}findDateTimeFormatPart(e,t){return e.find(n=>n.type===t)}}const $M=r=>!isNaN(Date.parse(r)),ex=(r,e)=>r.getTime()>e.getTime(),tx=(r,e)=>r.getTime()<e.getTime(),VM=(r,e)=>r.getTime()<=e.getTime(),rx=(r,e)=>e==="12-hour"?new RegExp(/^(1[012]|0[1-9]):[0-5][0-9] ([AP][M])$/).test(r):new RegExp(/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/).test(r),vc=(r,e=2,t="0")=>{if(r||r===0)return r.toString().padStart(e,t);rt.error("The input should be a number")},zM=r=>{if(rx(r,"12-hour")){const[e,t,n]=r.replace(" ",":").split(":");let i=parseInt(e,10);return n==="PM"&&i!==12?i+=12:n==="AM"&&i===12&&(i=0),`${vc(i)}:${t}`}return r},nx=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];class Fe{constructor(e,t,n){this._date=n,this._month=t,this._year=e}static from(e,t=na()){return Da.fromDate(e,t).calendarDate}static fromString(e,t="MM/DD/YYYY",n="en-us"){if(!e)return null;const i=[];let s=null;for(;(s=D0.exec(t))!=null;)s[1]!=="\\"&&i.push(s);if(i.length){const a={year:void 0,month:void 0,shortMonth:void 0,longMonth:void 0,day:void 0,value:""},o=i[0];o&&o.index>0&&(a.value+=".*?");for(const[c,u]of Object.entries(i)){const d=Number(c);if(u){const{group:g,pattern:_}=this.getPatternByFormatToken(u[0],n);a[g]=d+1,a.value+=_,a.value+=".*?"}}const l=new RegExp(`^${a.value}$`);if(l.test(e)){const c=l.exec(e);if(c&&a.year&&(a.month||a.shortMonth||a.longMonth)&&a.day){const u=Number(c[a.year]);let d=1;a.month?d=Number(c[a.month])-1:a.shortMonth?d=this.shortMonths(n).indexOf(c[a.shortMonth]):a.longMonth&&(d=this.longMonths(n).indexOf(c[a.longMonth]));const g=Number(c[a.day]),_=Number(vc(u,4,`${new Date().getFullYear()}`.slice(0,2)));return isNaN(Date.parse(`${_}-${vc(d+1)}-${vc(g)}`))?null:this.from(new Date(_,d,g,0,0,0,0))}}}return this.from(new Date(e))}static getPatternByFormatToken(e,t){switch(e){case"YY":case"YYYY":return{group:"year",pattern:`(\\d{${e.length}})`};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:`(${this.shortMonths(t).join("|")})`};case"MMMM":return{group:"longMonth",pattern:`(${this.longMonths(t).join("|")})`};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"};default:return{group:"unknown",pattern:"(.*)"}}}static shortMonths(e){return this.MONTHS.map(t=>new Date(2019,t).toLocaleString(e,{month:"short"}))}static longMonths(e){return this.MONTHS.map(t=>new Date(2019,t).toLocaleString(e,{month:"long"}))}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}toString(e="MM/DD/YYYY",t="en-us"){let n="";const i=[];let s=null;for(;(s=D0.exec(e))!=null;)s[1]!=="\\"&&i.push(s);if(i.length){const a=i[0];a&&a.index>0&&(n+=e.substring(0,a.index));for(const[o,l]of Object.entries(i)){const c=Number(o);if(l){n+=this.getDateItemByFormatToken(l[0],t);const u=i[c+1];u&&(n+=e.substring(l.index+l[0].length,u.index)),c===i.length-1&&(n+=e.substring(l.index+l[0].length))}}}return n.replace(/\\/g,"")}isToday(e=na()){if(e===na()){const s=new Date;return s.getFullYear()===this.year&&s.getMonth()+1===this.month&&s.getDate()===this.date}const{year:t,month:n,date:i}=Da.fromDate(new Date,e).calendarDate;return t===this.year&&n===this.month&&i===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:n}=e,i={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<n?i.isPreviousMonth=!0:this.month>n?i.isNextMonth=!0:i.inMonth=!0:this.year>t?i.isNextMonth=!0:i.isPreviousMonth=!0,i}equal(e){if(!e)return!1;const{year:t,month:n,date:i}=e;return this._year===t&&this._month===n&&this._date===i}getMonthName(e=!1){return vr.t(this.toDate().toLocaleDateString("en-US",{month:e?"short":"long"}))}isAfter(e){return e?ex(this.toDate(),e.toDate()):!1}isBefore(e){return e?tx(this.toDate(),e.toDate()):!1}firstDateOfMonth(){return Fe.from(new Date(this.year,this.month-1,1))}lastDateOfMonth(){return Fe.from(new Date(this.year,this.month,0))}add(e=0,t=0,n=0){const i=this.toDate(),s=new Date(i.getFullYear()+e,i.getMonth()+t,i.getDate()+n);return Fe.from(s)}getWeekDayShortName(){const e=this.toDate();return nx[e.getDay()]}getDateItemByFormatToken(e,t){switch(e){case"YY":return String(this.year).slice(-2);case"YYYY":return String(this.year);case"M":return String(this.month);case"MM":return`0${this.month}`.slice(-2);case"MMM":return Fe.shortMonths(t)[this.month-1];case"MMMM":return Fe.longMonths(t)[this.month-1];case"D":return String(this.date);case"DD":return`0${this.date}`.slice(-2);default:return""}}}Fe.MONTHS=[0,1,2,3,4,5,6,7,8,9,10,11];class Xp{constructor(e,t,n){this._count=e,this._timezone=n||na(),this._current=t||Fe.from(new Date,this._timezone),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}get type(){return this._type}get showWeekends(){return this._showWeekends}get timezone(){return this._timezone}goTo(e){return this.createBy(e)}now(){return this.createBy(Fe.from(new Date,this._timezone))}equal(e){return this.startDate.equal(e.startDate)&&this.endDate.equal(e.endDate)}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-k_().indexOf(t.getDay())),this._startDate=Fe.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=Fe.from(t)}}class ix{format(e){if(cx(e)){const t=[];return this.getStates().forEach(n=>{const i=this.formatToken(e[n]);i&&t.push(`:host${n==="default"?"":`(:${n})`}{
|
|
47
|
+
${i}
|
|
48
|
+
}`)}),t.join(`
|
|
49
|
+
`)}else return`:host{
|
|
50
|
+
${this.formatToken(e)}
|
|
51
|
+
}`}}class sx extends ix{constructor(){super(...arguments),this.states=["default","hover","active","focus-visible"]}formatToken(e){return R_(e)?`background-color: ${YE[e]};`:(rt.warn(`The backgroundColor value ${e} is invalid, it must be a value of: `,ZE),"")}getStates(){return this.states}}const ox=new sx;var Na;(function(r){r.PREVIOUS="-1",r.NEXT="1"})(Na||(Na={}));function UM(r,e=15){const[t,n]=r.split(":");return Math.round((Number(t)*60+Number(n))/e)}function WM(r){return"vega-calendar-event-slot-"+r}function Yu(r,e=Na.NEXT){const t=r.toDate().getDay();if(t===0||t===6){let n=t===0?1:2;return e===Na.PREVIOUS&&(n=t===0?-2:-1),Fe.from(new Date(r.year,r.month-1,r.date+n))}return r}function GM(r="bg-accent6-primary"){return R_(r)?`.event-bg-color{${ox.formatToken(r)}}`:`.event-bg-color{background-color:${r}}`}class nd extends Xp{constructor(e,t,n){super(nd.DISPLAY_DATE_COUNT,e,n),this._type="day",this._showWeekends=!0,this._showWeekends=t!==!1}next(){const e=this.current.toDate();e.setDate(e.getDate()+1);let t=Fe.from(e);return this._showWeekends===!1&&(t=Yu(t)),this.createBy(t)}previous(){const e=this.current.toDate();e.setDate(e.getDate()-1);let t=Fe.from(e);return this._showWeekends===!1&&(t=Yu(t,Na.PREVIOUS)),this.createBy(t)}now(){let e=Fe.from(new Date,this.timezone);return this._showWeekends===!1&&(e=Yu(e)),this.createBy(e)}createBy(e){return new nd(e,this._showWeekends,this.timezone)}}nd.DISPLAY_DATE_COUNT=1;class id extends Xp{constructor(e,t,n){super(id.DISPLAY_DATE_COUNT,e,n),this._type="week",this._showWeekends=!0,this._showWeekends=t!==!1}next(){const e=this.current.toDate();return e.setDate(e.getDate()+7),this.createBy(Fe.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-7),this.createBy(Fe.from(e))}createBy(e){return new id(e,this._showWeekends,this.timezone)}}id.DISPLAY_DATE_COUNT=7;class ia extends Xp{constructor(e,t,n){super(ia.DISPLAY_DATE_COUNT,e,n),this._type="month",this._showWeekends=!0,this._showWeekends=t!==!1}static getMonthFirstDay(e,t){const n=e||Fe.from(new Date,t);return new Fe(n.year,n.month,1)}calculatePeriod(e){const n=ia.getMonthFirstDay(e).toDate();n.setDate(n.getDate()-k_().indexOf(n.getDay())),this._startDate=Fe.from(n),n.setDate(n.getDate()+this.count-1),this._endDate=Fe.from(n)}next(){const e=this.current.toDate(),t=e.getFullYear(),n=e.getMonth()+1,i=e.getDate(),s=new Date(t,n+1,0).getDate(),a=Math.min(i,s),o=new Date(t,n,a);return this.createBy(Fe.from(o))}previous(){const e=this.current.toDate(),t=e.getFullYear(),n=e.getMonth()-1,i=e.getDate(),s=new Date(t,n+1,0).getDate(),a=Math.min(i,s),o=new Date(t,n,a);return this.createBy(Fe.from(o))}createBy(e){return new ia(e,this._showWeekends,this.timezone)}}ia.DISPLAY_DATE_COUNT=6*7;const L_=r=>typeof r=="string"&&["top","bottom","left","right","x","y"].includes(r),ax=r=>typeof r=="string"&&typeof x_[r]=="number",KM=r=>typeof r=="object"&&r!==null&&Object.keys(r).every(L_)&&Object.values(r).every(e=>e in x_),qM=r=>typeof r=="object"&&r!==null&&Object.keys(r).every(A_),A_=r=>typeof r=="string"&&(r in Gp||r==="default"),XM=r=>typeof r=="string"&&r in T_,Zp=r=>typeof r=="string"&&XE.includes(r),ZM=r=>Zp(r)&&/^border-color-.+$/.test(r),YM=r=>typeof r=="string"&&QE.includes(r),R_=r=>Zp(r)&&/^bg-.+$/.test(r),JM=r=>Zp(r)&&/^text-.+$/.test(r),QM=r=>typeof r=="string"&&JE.includes(r),eP=r=>(typeof r=="string"||typeof r=="number")&&qE.test(r.toString()),tP=r=>(typeof r=="string"||typeof r=="number")&&KE.test(r.toString()),rP=r=>typeof r=="string"&&I5.includes(r),nP=r=>Object.keys(Gp).includes(r),iP=r=>typeof r=="object"&&r!==null&&(typeof r.X=="number"||["start","center","end"].includes(r.X))&&(typeof r.Y=="number"||["start","center","end"].includes(r.Y)),sP=r=>typeof r.groupId=="string"&&r.element&&r.element.tagName==="VEGA-ACCORDION",oP=r=>typeof r=="string"&&O5.includes(r),aP=r=>typeof r=="string"&&D5.includes(r),lP=r=>typeof r=="string"&&N5.includes(r),cP=r=>typeof r=="string"&&B5.includes(r),dP=r=>typeof r=="string"&&F5.includes(r),uP=(r,e)=>Array.isArray(r)&&r.every(e),hP=r=>typeof r=="object"&&Object.prototype.hasOwnProperty.call(r,"label")&&Object.prototype.hasOwnProperty.call(r,"key"),fP=r=>typeof r=="object"&&Object.prototype.hasOwnProperty.call(r,"id")&&Object.prototype.hasOwnProperty.call(r,"displayName"),pP=r=>typeof r=="string"&&M5.includes(r),Te=r=>r!=null,gP=r=>typeof r=="string"&&GE.includes(r),mP=r=>typeof r=="string"&&P5.includes(r),lx=r=>typeof r=="string"&&["top","right","bottom","left","top-left","top-right","bottom-left","bottom-right"].includes(r),vP=r=>typeof r=="object"&&r!==null&&Object.keys(r).every(lx)&&Object.values(r).every(e=>e in T_),cx=r=>typeof r=="object"&&r!==null&&Object.keys(r).every(dx),dx=r=>typeof r=="string"&&H5.includes(r),_P=r=>typeof r=="object"&&r!==null&&"key"in r&&"label"in r&&typeof r.label=="string",yP=r=>r instanceof Fe,bP=r=>!!r&&typeof r.evaluate=="function"&&typeof r.canEvaluate=="function",ux=r=>ax(r)||r==="auto",wP=r=>typeof r=="object"&&r!==null&&Object.keys(r).every(L_)&&Object.values(r).every(ux),I0=r=>typeof r=="number"?!0:typeof r!="string"||!r?!1:!isNaN(Number(r))||/^(\d+(?:\.\d+)?)%$/.test(r),SP=r=>!!r&&(I0(r)||typeof r=="object"&&Object.keys(r).every(A_)&&Object.values(r).every(I0)),CP=r=>typeof r=="object"&&r!==null&&Object.keys(r).length>0&&Object.keys(r).every(e=>["header","content","footer"].includes(e));class pt{constructor(e){const t=pt.parseColor(e);this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a}static clamp(e,t,n){return Math.min(Math.max(e,t),n)}static parseColor(e){if(typeof e=="object"&&"r"in e&&"g"in e&&"b"in e)return{r:Math.round(pt.clamp(e.r,0,255)),g:Math.round(pt.clamp(e.g,0,255)),b:Math.round(pt.clamp(e.b,0,255)),a:e.a!==void 0?pt.clamp(e.a,0,1):1};if(typeof e!="string")return{r:0,g:0,b:0,a:1};const t=e.trim().toLowerCase();return t.startsWith("#")?pt.parseHex(t):t.startsWith("rgb")?pt.parseRgbString(t):{r:0,g:0,b:0,a:1}}static parseHex(e){let t=e.slice(1);t.length===3&&(t=t.split("").map(o=>o+o).join("")),t.length===4&&(t=t.split("").map(o=>o+o).join(""));const n=parseInt(t.slice(0,2),16),i=parseInt(t.slice(2,4),16),s=parseInt(t.slice(4,6),16);let a=1;return t.length===8&&(a=parseInt(t.slice(6,8),16)/255),{r:Number.isNaN(n)?0:n,g:Number.isNaN(i)?0:i,b:Number.isNaN(s)?0:s,a:Number.isNaN(a)?1:a}}static parseRgbString(e){const t=e.match(/rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+\.?\d*))?\s*\)/);return t?{r:pt.clamp(parseInt(t[1],10),0,255),g:pt.clamp(parseInt(t[2],10),0,255),b:pt.clamp(parseInt(t[3],10),0,255),a:t[4]!==void 0?pt.clamp(parseFloat(t[4]),0,1):1}:{r:0,g:0,b:0,a:1}}static rgbToHsl(e,t,n){e/=255,t/=255,n/=255;const i=Math.max(e,t,n),s=Math.min(e,t,n),a=(i+s)/2;let o=0,l=0;if(i!==s){const c=i-s;switch(l=a>.5?c/(2-i-s):c/(i+s),i){case e:o=((t-n)/c+(t<n?6:0))/6;break;case t:o=((n-e)/c+2)/6;break;case n:o=((e-t)/c+4)/6;break}}return{h:o*360,s:l,l:a}}static hslToRgb(e,t,n){e/=360;let i,s,a;if(t===0)i=s=a=n;else{const o=(u,d,g)=>(g<0&&(g+=1),g>1&&(g-=1),g<.16666666666666666?u+(d-u)*6*g:g<.5?d:g<.6666666666666666?u+(d-u)*(.6666666666666666-g)*6:u),l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=o(c,l,e+1/3),s=o(c,l,e),a=o(c,l,e-1/3)}return{r:Math.round(i*255),g:Math.round(s*255),b:Math.round(a*255)}}static getBrightness(e,t,n){return(e*299+t*587+n*114)/1e3}isDark(){return pt.getBrightness(this._r,this._g,this._b)<128}isLight(){return!this.isDark()}clone(){return new pt({r:this._r,g:this._g,b:this._b,a:this._a})}lighten(e=10){const t=pt.rgbToHsl(this._r,this._g,this._b);t.l=pt.clamp(t.l+e/100,0,1);const n=pt.hslToRgb(t.h,t.s,t.l);return this._r=n.r,this._g=n.g,this._b=n.b,this}darken(e=10){return this.lighten(-e)}setAlpha(e){return this._a=pt.clamp(e,0,1),this}toRgb(){return{r:this._r,g:this._g,b:this._b,a:this._a}}}function hx(r){return new pt(r)}class fx{constructor(e){var t;if(e)this._nonce=e;else if(typeof br=="function"){const n=br();if(n){const i=(t=n.querySelector('meta[name="csp-nonce"]'))===null||t===void 0?void 0:t.content;i&&(this._nonce=i)}}}set nonce(e){this._nonce=e}get nonce(){return this._nonce}patchHeadInsertBeforeWithNonceToStencil(){const e=br();if(!e)return;const t=e.head,n=t.insertBefore;t.insertBefore=function(i,s){return yn.nonce?(i.nodeType===Node.ELEMENT_NODE&&i instanceof HTMLStyleElement&&i.hasAttribute("data-styles")&&(i.innerHTML.includes("vega-")||i.innerHTML.includes(".hydrated"))&&!i.hasAttribute("nonce")&&i.setAttribute("nonce",yn.nonce),n.call(this,i,s)):n.call(this,i,s)}}}const yn=new fx;function px(r){yn.nonce=r}function gx(r,e){var t;const n=e.createElement("div");return n.appendChild(r),n.children.length===0?(t=n.textContent)!==null&&t!==void 0?t:"":n.innerHTML}class mx{sanitize(e,t){if(!e||e.trim()==="")return"";const n=br();if(!n)return"";const s=new DOMParser().parseFromString(e,"text/html"),a=n.createDocumentFragment();return s.body.childNodes.forEach(o=>{const l=t.execute(o,n);l&&a.appendChild(l)}),gx(a,n)}}class Yp{constructor(){this.preserveTextContent=!0}execute(e,t){var n;switch(e.nodeType){case Node.TEXT_NODE:return this.preserveTextContent?t.createTextNode((n=e.textContent)!==null&&n!==void 0?n:""):null;case Node.ELEMENT_NODE:return this.sanitizeElement(e,t);default:return null}}sanitizeElement(e,t){var n;const i=e.tagName;if(!this.allowedTags.has(i)){const o=t.createDocumentFragment();return e.childNodes.forEach(l=>{const c=this.execute(l,t);c&&o.appendChild(c)}),o}const s=t.createElement(i.toLowerCase()),a=(n=this.allowedAttributes)===null||n===void 0?void 0:n.get(i);return a&&Array.from(e.attributes).forEach(o=>{a.has(o.name)&&s.setAttribute(o.name,o.value)}),e.childNodes.forEach(o=>{const l=this.execute(o,t);l&&s.appendChild(l)}),s}}const vx=new Set(["B","I","STRONG","EM"]);class _x extends Yp{constructor(){super(...arguments),this.allowedTags=vx}}class yx extends Yp{constructor(){super(...arguments),this.allowedTags=new Set,this.preserveTextContent=!0}execute(e,t){var n;switch(e.nodeType){case Node.TEXT_NODE:{const i=(n=e.textContent)!==null&&n!==void 0?n:"";return this.isSafeCss(i)?t.createTextNode(i):null}case Node.ELEMENT_NODE:{const i=t.createDocumentFragment();return e.childNodes.forEach(s=>{const a=this.execute(s,t);a&&i.appendChild(a)}),i}default:return null}}isSafeCss(e){return!/expression\s*\(|javascript:|url\s*\(/i.test(e)}}class bx extends Yp{constructor(){super(...arguments),this.allowedTags=new Set,this.preserveTextContent=!1}execute(){return null}}const Vd=new mx,EP=new _x,Jp=new yx,wx=new bx,Sx={"bg-brand":"176, 180, 181, 1","bg-page":"24, 24, 48, 1","bg-primary":"4, 4, 28, 1","bg-secondary":"18, 18, 39, 1","bg-tertiary":"24, 24, 48, 1","bg-quaternary":"70, 71, 101, 1","bg-inverted-primary":"252, 252, 252, 1","bg-inverted-secondary":"247, 247, 247, 1","bg-inverted-tertiary":"240, 243, 247, 1","bg-inverted-quaternary":"241, 248, 251, 1","bg-action":"28, 171, 255, 1","bg-action-hover":"76, 190, 255, 1","bg-action-focus":"28, 171, 255, 1","bg-action-active":"15, 167, 255, 1","bg-action-quaternary":"51, 57, 61, 1","bg-action-quaternary-hover":"89, 96, 99, 1","bg-action-quaternary-active":"24, 24, 48, 1","bg-action-secondary":"0, 0, 0, 0","bg-action-secondary-hover":"76, 190, 255, 0.2","bg-action-secondary-active":"15, 167, 255, 0.2","bg-action-tertiary":"0, 0, 0, 0","bg-action-tertiary-hover":"252, 252, 252, 0.2","bg-action-tertiary-active":"252, 252, 252, 0.1","bg-app-header":"24, 24, 48, 0.92","bg-backdrop-modal":"70, 71, 101, 0.8","bg-backdrop-popover":"70, 71, 101, 0.56","bg-backdrop-sidebar":"70, 71, 101, 0.8","bg-chip":"252, 252, 252, 0.1","bg-chip-hover":"252, 252, 252, 0.2","bg-chip-active":"252, 252, 252, 0.06","bg-danger":"255, 56, 97, 1","bg-danger-hover":"255, 71, 123, 1","bg-danger-focus":"255, 56, 97, 1","bg-danger-active":"230, 50, 87, 1","bg-danger-tertiary":"0, 0, 0, 0","bg-danger-tertiary-hover":"255, 71, 123, 0.2","bg-danger-tertiary-active":"230, 50, 87, 0.2","bg-disabled":"70, 71, 101, 1","bg-divider":"32, 54, 69, 1","bg-divider-secondary":"51, 57, 61, 1","bg-keypad-btn-active":"45, 76, 97, 1","bg-loading-progress":"4, 165, 245, 1","bg-loading-track":"142, 223, 249, 1","bg-segment-hover":"70, 71, 101, 1","bg-segment-control":"210, 208, 223, 0.1","bg-selected":"85, 218, 255, 0.3","bg-sidebar":"18, 18, 39, 1","bg-sidebar-icon":"188, 186, 213, 1","bg-sidebar-icon-hover":"18, 18, 39, 1","bg-sidebar-icon-selected":"252, 252, 252, 1","bg-sidebar-item-hover":"252, 252, 252, 1","bg-sidebar-item-selected":"0, 187, 255, 0.4","bg-site-footer":"51, 57, 61, 1","bg-site-footer-action":"171, 198, 216, 1","bg-site-footer-action-hover":"199, 217, 229, 1","bg-site-footer-action-active":"143, 179, 203, 1","bg-site-footer-field":"89, 96, 99, 1","bg-slider-handle":"252, 252, 252, 1","bg-status-error":"189, 41, 71, 1","bg-status-info":"252, 252, 252, 1","bg-status-success":"123, 242, 151, 1","bg-status-warning":"255, 212, 105, 1","bg-tab":"51, 57, 61, 1","bg-tab-hover":"89, 96, 99, 1","bg-tab-selected":"240, 243, 247, 1","bg-table-alt-row":"18, 18, 39, 1","bg-table-header":"24, 24, 48, 1","bg-table-row-hover":"70, 71, 101, 1","bg-table-row-selected-expanded":"32, 54, 69, 1","bg-table-selected-row":"45, 76, 97, 1","bg-textarea-count":"252, 252, 252, 0.5","bg-tile":"4, 4, 28, 1","bg-tile-hover":"24, 24, 48, 1","bg-tile-selected":"32, 54, 69, 1","bg-tile-selected-hover":"45, 76, 97, 1","bg-toggle-switch":"210, 208, 223, 1","bg-toggle-switch-hover":"188, 186, 213, 1","bg-toggle-switch-selected-disabled":"0, 75, 128, 1","bg-transparent":"0, 0, 0, 0","bg-accent1-primary":"109, 217, 202, 1","bg-accent1-secondary":"174, 234, 226, 1","bg-accent1-tertiary":"223, 247, 243, 1","bg-accent2-primary":"95, 56, 206, 1","bg-accent2-secondary":"184, 167, 233, 1","bg-accent2-tertiary":"219, 211, 244, 1","bg-accent3-primary":"255, 203, 105, 1","bg-accent3-secondary":"251, 226, 185, 1","bg-accent3-tertiary":"255, 243, 222, 1","bg-accent4-primary":"255, 129, 87, 1","bg-accent4-secondary":"255, 185, 162, 1","bg-accent4-tertiary":"255, 227, 218, 1","bg-accent5-primary":"4, 165, 245, 1","bg-accent5-secondary":"85, 218, 255, 1","bg-accent5-tertiary":"227, 247, 253, 1","bg-accent6-primary":"255, 84, 165, 1","bg-accent6-secondary":"255, 179, 215, 1","bg-accent6-tertiary":"255, 217, 235, 1","bg-accent7-primary":"37, 159, 159, 1","bg-accent7-secondary":"155, 212, 214, 1","bg-accent7-tertiary":"208, 239, 239, 1","bg-accent8-primary":"86, 61, 130, 1","bg-accent8-secondary":"199, 162, 204, 1","bg-accent8-tertiary":"230, 214, 234, 1","bg-accent9-primary":"255, 191, 63, 1","bg-accent9-secondary":"254, 215, 142, 1","bg-accent9-tertiary":"251, 226, 185, 1","bg-accent10-primary":"237, 122, 35, 1","bg-accent10-secondary":"241, 146, 85, 1","bg-accent10-tertiary":"245, 187, 148, 1","bg-date-picker-range":"32, 54, 69, 1","text-primary":"252, 252, 254, 0.9","text-secondary":"252, 252, 254, 0.64","text-inverted-primary":"4, 4, 28, 0.95","text-inverted-secondary":"4, 4, 28, 0.64","text-black":"4, 4, 28, 0.95","text-white":"252, 252, 254, 0.9","text-brand":"176, 180, 181, 1","text-danger-link":"255, 56, 97, 1","text-danger-link-hover":"255, 71, 123, 1","text-danger-link-active":"230, 50, 87, 1","text-danger-link-focus":"255, 82, 136, 1","text-danger-link-visited":"255, 56, 97, 1","text-disabled":"252, 252, 254, 0.38","text-error":"255, 56, 97, 1","text-input-disabled":"252, 252, 254, 0.38","text-input-placeholder":"252, 252, 254, 0.5","text-link":"28, 171, 255, 1","text-link-hover":"76, 190, 255, 1","text-link-active":"15, 167, 255, 1","text-link-focus":"28, 171, 255, 1","text-link-visited":"128, 107, 255, 1","text-on-action":"4, 4, 28, 0.95","text-on-danger":"4, 4, 28, 0.95","text-on-disabled":"4, 4, 28, 0.95","text-sidebar-link":"188, 186, 213, 1","text-sidebar-link-hover":"18, 18, 39, 1","text-sidebar-link-selected":"252, 252, 252, 1","text-site-footer-link":"171, 198, 216, 1","text-site-footer-link-hover":"199, 217, 229, 1","text-site-footer-link-active":"143, 179, 203, 1","text-success":"89, 217, 119, 1","text-inverted-success":"1, 128, 31, 1","text-accent1-primary":"109, 217, 202, 1","text-accent2-primary":"95, 56, 206, 1","text-accent3-primary":"255, 203, 105, 1","text-accent4-primary":"255, 129, 87, 1","text-accent5-primary":"4, 165, 245, 1","text-accent6-primary":"255, 71, 123, 1","text-accent7-primary":"37, 159, 159, 1","text-accent8-primary":"86, 61, 130, 1","text-accent9-primary":"255, 191, 63, 1","text-accent10-primary":"237, 122, 35, 1","border-color-action":"28, 171, 255, 1","border-color-action-hover":"76, 190, 255, 1","border-color-action-active":"15, 167, 255, 1","border-color-chip":"107, 116, 125, 1","border-color-danger":"255, 56, 97, 1","border-color-danger-hover":"255, 71, 123, 1","border-color-danger-active":"230, 50, 87, 1","border-color-divider":"32, 54, 69, 1","border-color-divider-secondary":"51, 57, 61, 1","border-color-input-field":"32, 54, 69, 1","border-color-input-field-hover":"58, 98, 125, 1","border-color-input-field-focus":"28, 171, 255, 1","border-color-input-field-danger":"255, 56, 97, 1","border-color-input-field-danger-hover":"255, 71, 123, 1","border-color-input-field-danger-focus":"255, 56, 97, 1","border-color-input-field-disabled":"4, 4, 28, 1","border-color-secondary-btn-disabled":"70, 71, 101, 1","border-color-sidebar-item-focus":"28, 171, 255, 1","border-color-slider-handle":"107, 116, 125, 1","border-color-success":"89, 217, 119, 1","border-color-table-divider":"32, 54, 69, 1","border-color-tile":"32, 54, 69, 1","border-color-tile-hover":"58, 98, 125, 1","border-color-tile-focus":"28, 171, 255, 1","border-color-tile-selected-focus":"28, 171, 255, 1","border-color-tile-selected":"28, 171, 255, 1","border-color-tile-selected-hover":"76, 190, 255, 1","border-color-notification-btn":"252, 252, 252, 1","border-color-notification-btn-dark":"32, 54, 69, 1"},Cx={"border-secondary-btn":"28, 171, 255, 1","border-secondary-btn-hover":"76, 190, 255, 1","border-secondary-danger-btn":"255, 56, 97, 1","border-secondary-btn-active":"15, 167, 255, 1","border-secondary-danger-btn-hover":"255, 71, 123, 1","border-secondary-danger-btn-active":"230, 50, 87, 1","border-input-field":"32, 54, 69, 1","border-input-field-hover":"58, 98, 125, 1","border-input-field-focus":"28, 171, 255, 1","border-input-field-danger":"255, 56, 97, 1","border-input-field-danger-hover":"255, 71, 123, 1","border-input-field-danger-focus":"255, 56, 97, 1","border-sidebar-item-focus":"28, 171, 255, 1","border-input-field-disabled":"4, 4, 28, 1","border-success":"89, 217, 119, 1","border-secondary-btn-disabled":"70, 71, 101, 1","border-chip":"107, 116, 125, 1","border-divider":"32, 54, 69, 1","border-divider-secondary":"51, 57, 61, 1","border-tile-selected":"28, 171, 255, 1","border-tile-selected-hover":"76, 190, 255, 1","border-table-divider":"32, 54, 69, 1","border-slider-handle":"107, 116, 125, 1","border-tile":"32, 54, 69, 1","border-tile-hover":"58, 98, 125, 1","border-tile-focus":"28, 171, 255, 1","border-tile-selected-focus":"28, 171, 255, 1","border-notification-btn":"252, 252, 252, 1","border-notification-btn-black":"32, 54, 69, 1"},Ex={"shadow-card":"0px 2px 10px 0px rgba(0, 0, 0, 0.18), 0px 2px 4px 0px rgba(0, 0, 0, 0.1)","shadow-modal":"0px 6px 40px 0px rgba(2, 2, 15, 0.14), 0px 4px 24px 0px rgba(2, 2, 15, 0.28), 0px 8px 80px 0px rgba(2, 2, 15, 0.26)","shadow-popover":"0px 0px 88px 0px rgba(2, 2, 15, 0.08), 0px 0px 32px 0px rgba(2, 2, 15, 0.1), 0px 4px 72px 0px rgba(2, 2, 15, 0.16)","shadow-form-field":"0px 1px 2px 0px rgba(170, 170, 170, 0.06), 0px 1px 3px 0px rgba(170, 170, 170, 0.1)","shadow-dropdown-menu":"0px 2px 4px -2px rgba(0, 0, 0, 0.14), 0px 4px 6px -1px rgba(0, 0, 0, 0.16)","shadow-app-header":"0px 1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-header":"0px 1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-footer":"0px -2px 8px 0px rgba(188, 186, 213, 0.4), 0px -1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-footer-no-scroll":"0px -1px 0px 0px rgba(188, 186, 213, 0.25)"},xx={"ring-input-focus":"0, 187, 255, 0.25","ring-input-danger-focus":"255, 56, 97, 0.25","ring-action-focus":"0, 187, 255, 0.25","ring-action-danger-focus":"255, 56, 97, 0.25"},O_={"bg-brand":"176, 180, 181, 1","bg-page":"24, 24, 48, 1","bg-primary":"4, 4, 28, 1","bg-secondary":"18, 18, 39, 1","bg-tertiary":"24, 24, 48, 1","bg-quaternary":"70, 71, 101, 1","bg-inverted-primary":"252, 252, 252, 1","bg-inverted-secondary":"247, 247, 247, 1","bg-inverted-tertiary":"240, 243, 247, 1","bg-inverted-quaternary":"241, 248, 251, 1","bg-action":"0, 187, 255, 1","bg-action-hover":"0, 204, 255, 1","bg-action-focus":"0, 187, 255, 1","bg-action-active":"4, 165, 245, 1","bg-action-quaternary":"51, 57, 61, 1","bg-action-quaternary-hover":"89, 96, 99, 1","bg-action-quaternary-active":"24, 24, 48, 1","bg-action-secondary":"0, 0, 0, 0","bg-action-secondary-hover":"0, 204, 255, 0.2","bg-action-secondary-active":"4, 165, 245, 0.2","bg-action-tertiary":"0, 0, 0, 0","bg-action-tertiary-hover":"252, 252, 252, 0.2","bg-action-tertiary-active":"252, 252, 252, 0.1","bg-app-header":"24, 24, 48, 0.92","bg-backdrop-modal":"70, 71, 101, 0.8","bg-backdrop-popover":"70, 71, 101, 0.56","bg-backdrop-sidebar":"70, 71, 101, 0.8","bg-chip":"252, 252, 252, 0.1","bg-chip-hover":"252, 252, 252, 0.2","bg-chip-active":"252, 252, 252, 0.06","bg-danger":"255, 56, 97, 1","bg-danger-hover":"255, 71, 123, 1","bg-danger-focus":"255, 56, 97, 1","bg-danger-active":"230, 50, 87, 1","bg-danger-tertiary":"0, 0, 0, 0","bg-danger-tertiary-hover":"255, 71, 123, 0.2","bg-danger-tertiary-active":"230, 50, 87, 0.2","bg-disabled":"70, 71, 101, 1","bg-divider":"32, 54, 69, 1","bg-divider-secondary":"51, 57, 61, 1","bg-keypad-btn-active":"45, 76, 97, 1","bg-loading-progress":"4, 165, 245, 1","bg-loading-track":"142, 223, 249, 1","bg-segment-hover":"70, 71, 101, 1","bg-segment-control":"210, 208, 223, 0.1","bg-selected":"85, 218, 255, 0.3","bg-sidebar":"18, 18, 39, 1","bg-sidebar-icon":"188, 186, 213, 1","bg-sidebar-icon-hover":"18, 18, 39, 1","bg-sidebar-icon-selected":"252, 252, 252, 1","bg-sidebar-item-hover":"252, 252, 252, 1","bg-sidebar-item-selected":"0, 187, 255, 0.4","bg-site-footer":"51, 57, 61, 1","bg-site-footer-action":"171, 198, 216, 1","bg-site-footer-action-hover":"199, 217, 229, 1","bg-site-footer-action-active":"143, 179, 203, 1","bg-site-footer-field":"89, 96, 99, 1","bg-slider-handle":"252, 252, 252, 1","bg-status-error":"189, 41, 71, 1","bg-status-info":"252, 252, 252, 1","bg-status-success":"123, 242, 151, 1","bg-status-warning":"255, 212, 105, 1","bg-tab":"51, 57, 61, 1","bg-tab-hover":"89, 96, 99, 1","bg-tab-selected":"240, 243, 247, 1","bg-table-alt-row":"18, 18, 39, 1","bg-table-header":"24, 24, 48, 1","bg-table-row-hover":"70, 71, 101, 1","bg-table-row-selected-expanded":"32, 54, 69, 1","bg-table-selected-row":"45, 76, 97, 1","bg-textarea-count":"252, 252, 252, 0.5","bg-tile":"4, 4, 28, 1","bg-tile-hover":"24, 24, 48, 1","bg-tile-selected":"32, 54, 69, 1","bg-tile-selected-hover":"45, 76, 97, 1","bg-toggle-switch":"210, 208, 223, 1","bg-toggle-switch-hover":"188, 186, 213, 1","bg-toggle-switch-selected-disabled":"0, 75, 128, 1","bg-transparent":"0, 0, 0, 0","bg-accent1-primary":"109, 217, 202, 1","bg-accent1-secondary":"174, 234, 226, 1","bg-accent1-tertiary":"223, 247, 243, 1","bg-accent2-primary":"95, 56, 206, 1","bg-accent2-secondary":"184, 167, 233, 1","bg-accent2-tertiary":"219, 211, 244, 1","bg-accent3-primary":"255, 203, 105, 1","bg-accent3-secondary":"251, 226, 185, 1","bg-accent3-tertiary":"255, 243, 222, 1","bg-accent4-primary":"255, 129, 87, 1","bg-accent4-secondary":"255, 185, 162, 1","bg-accent4-tertiary":"255, 227, 218, 1","bg-accent5-primary":"4, 165, 245, 1","bg-accent5-secondary":"85, 218, 255, 1","bg-accent5-tertiary":"227, 247, 253, 1","bg-accent6-primary":"255, 84, 165, 1","bg-accent6-secondary":"255, 179, 215, 1","bg-accent6-tertiary":"255, 217, 235, 1","bg-accent7-primary":"37, 159, 159, 1","bg-accent7-secondary":"155, 212, 214, 1","bg-accent7-tertiary":"208, 239, 239, 1","bg-accent8-primary":"86, 61, 130, 1","bg-accent8-secondary":"199, 162, 204, 1","bg-accent8-tertiary":"230, 214, 234, 1","bg-accent9-primary":"255, 191, 63, 1","bg-accent9-secondary":"254, 215, 142, 1","bg-accent9-tertiary":"251, 226, 185, 1","bg-accent10-primary":"237, 122, 35, 1","bg-accent10-secondary":"241, 146, 85, 1","bg-accent10-tertiary":"245, 187, 148, 1","bg-date-picker-range":"32, 54, 69, 1","text-primary":"252, 252, 252, 1","text-secondary":"188, 186, 213, 1","text-inverted-primary":"4, 4, 28, 1","text-inverted-secondary":"107, 116, 125, 1","text-black":"32, 54, 69, 1","text-white":"252, 252, 252, 1","text-brand":"176, 180, 181, 1","text-danger-link":"255, 56, 97, 1","text-danger-link-hover":"255, 71, 123, 1","text-danger-link-active":"230, 50, 87, 1","text-danger-link-focus":"255, 82, 136, 1","text-danger-link-visited":"255, 56, 97, 1","text-disabled":"70, 71, 101, 1","text-error":"255, 56, 97, 1","text-input-disabled":"176, 180, 181, 1","text-input-placeholder":"89, 96, 99, 1","text-link":"0, 187, 255, 1","text-link-hover":"0, 204, 255, 1","text-link-active":"4, 165, 245, 1","text-link-focus":"0, 204, 255, 1","text-link-visited":"128, 107, 255, 1","text-on-action":"4, 4, 28, 1","text-on-danger":"4, 4, 28, 1","text-on-disabled":"4, 4, 28, 1","text-sidebar-link":"188, 186, 213, 1","text-sidebar-link-hover":"18, 18, 39, 1","text-sidebar-link-selected":"252, 252, 252, 1","text-site-footer-link":"171, 198, 216, 1","text-site-footer-link-hover":"199, 217, 229, 1","text-site-footer-link-active":"143, 179, 203, 1","text-success":"89, 217, 119, 1","text-inverted-success":"1, 128, 31, 1","text-accent1-primary":"109, 217, 202, 1","text-accent2-primary":"95, 56, 206, 1","text-accent3-primary":"255, 203, 105, 1","text-accent4-primary":"255, 129, 87, 1","text-accent5-primary":"4, 165, 245, 1","text-accent6-primary":"255, 71, 123, 1","text-accent7-primary":"37, 159, 159, 1","text-accent8-primary":"86, 61, 130, 1","text-accent9-primary":"255, 191, 63, 1","text-accent10-primary":"237, 122, 35, 1","border-color-action":"0, 187, 255, 1","border-color-action-hover":"0, 204, 255, 1","border-color-action-active":"4, 165, 245, 1","border-color-chip":"107, 116, 125, 1","border-color-danger":"255, 56, 97, 1","border-color-danger-hover":"255, 71, 123, 1","border-color-danger-active":"230, 50, 87, 1","border-color-divider":"32, 54, 69, 1","border-color-divider-secondary":"51, 57, 61, 1","border-color-input-field":"32, 54, 69, 1","border-color-input-field-hover":"58, 98, 125, 1","border-color-input-field-focus":"0, 187, 255, 1","border-color-input-field-danger":"255, 56, 97, 1","border-color-input-field-danger-hover":"255, 71, 123, 1","border-color-input-field-danger-focus":"255, 56, 97, 1","border-color-input-field-disabled":"4, 4, 28, 1","border-color-secondary-btn-disabled":"70, 71, 101, 1","border-color-sidebar-item-focus":"0, 187, 255, 1","border-color-slider-handle":"107, 116, 125, 1","border-color-success":"89, 217, 119, 1","border-color-table-divider":"32, 54, 69, 1","border-color-tile":"32, 54, 69, 1","border-color-tile-hover":"58, 98, 125, 1","border-color-tile-focus":"0, 187, 255, 1","border-color-tile-selected-focus":"153, 192, 255, 1","border-color-tile-selected":"153, 192, 255, 1","border-color-tile-selected-hover":"178, 208, 255, 1","border-color-notification-btn":"252, 252, 252, 1","border-color-notification-btn-dark":"32, 54, 69, 1"},Tx={"border-secondary-btn":"0, 187, 255, 1","border-secondary-btn-hover":"0, 204, 255, 1","border-secondary-danger-btn":"255, 56, 97, 1","border-secondary-btn-active":"4, 165, 245, 1","border-secondary-danger-btn-hover":"255, 71, 123, 1","border-secondary-danger-btn-active":"230, 50, 87, 1","border-input-field":"32, 54, 69, 1","border-input-field-hover":"58, 98, 125, 1","border-input-field-focus":"0, 187, 255, 1","border-input-field-danger":"255, 56, 97, 1","border-input-field-danger-hover":"255, 71, 123, 1","border-input-field-danger-focus":"255, 56, 97, 1","border-sidebar-item-focus":"0, 187, 255, 1","border-input-field-disabled":"4, 4, 28, 1","border-success":"89, 217, 119, 1","border-secondary-btn-disabled":"70, 71, 101, 1","border-chip":"107, 116, 125, 1","border-divider":"32, 54, 69, 1","border-divider-secondary":"51, 57, 61, 1","border-tile-selected":"153, 192, 255, 1","border-tile-selected-hover":"178, 208, 255, 1","border-table-divider":"32, 54, 69, 1","border-slider-handle":"107, 116, 125, 1","border-tile":"32, 54, 69, 1","border-tile-hover":"58, 98, 125, 1","border-tile-focus":"0, 187, 255, 1","border-tile-selected-focus":"153, 192, 255, 1","border-notification-btn":"252, 252, 252, 1","border-notification-btn-black":"32, 54, 69, 1"},kx={"shadow-card":"0px 2px 10px 0px rgba(0, 0, 0, 0.18), 0px 2px 4px 0px rgba(0, 0, 0, 0.1)","shadow-modal":"0px 6px 40px 0px rgba(2, 2, 15, 0.14), 0px 4px 24px 0px rgba(2, 2, 15, 0.28), 0px 8px 80px 0px rgba(2, 2, 15, 0.26)","shadow-popover":"0px 0px 88px 0px rgba(2, 2, 15, 0.08), 0px 0px 32px 0px rgba(2, 2, 15, 0.1), 0px 4px 72px 0px rgba(2, 2, 15, 0.16)","shadow-form-field":"0px 1px 2px 0px rgba(170, 170, 170, 0.06), 0px 1px 3px 0px rgba(170, 170, 170, 0.1)","shadow-dropdown-menu":"0px 2px 4px -2px rgba(0, 0, 0, 0.14), 0px 4px 6px -1px rgba(0, 0, 0, 0.16)","shadow-app-header":"0px 1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-header":"0px 1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-footer":"0px -2px 8px 0px rgba(188, 186, 213, 0.4), 0px -1px 0px 0px rgba(188, 186, 213, 0.25)","shadow-modal-footer-no-scroll":"0px -1px 0px 0px rgba(188, 186, 213, 0.25)"},Lx={"ring-input-focus":"0, 187, 255, 0.25","ring-input-danger-focus":"255, 56, 97, 0.25","ring-action-focus":"0, 187, 255, 0.25","ring-action-danger-focus":"255, 56, 97, 0.25"},ve=r=>{if(!r)return"";const{r:e,g:t,b:n,a:i}=r.toRgb();return`${e} ${t} ${n} / ${i}`},Ax=[{name:"bg-action",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return ve(i)}},{name:"dark-bg-action"},{name:"bg-action-hover",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),ve(i)}},{name:"dark-bg-action-hover"},{name:"bg-action-focus",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return ve(i)}},{name:"dark-bg-action-focus"},{name:"bg-action-active",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(15):i=i==null?void 0:i.lighten(-15),ve(i)}},{name:"dark-bg-action-active"},{name:"bg-action-secondary-hover",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),i=i==null?void 0:i.setAlpha(.15),ve(i)}},{name:"dark-bg-action-secondary-hover"},{name:"bg-action-secondary-active",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(20):i=i==null?void 0:i.lighten(-20),i=i==null?void 0:i.setAlpha(.15),ve(i)}},{name:"dark-bg-action-secondary-active"},{name:"bg-divider",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=i==null?void 0:i.setAlpha(.6),ve(i)}},{name:"dark-bg-divider"},{name:"bg-keypad-btn-active",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=i==null?void 0:i.setAlpha(.3),ve(i)}},{name:"dark-bg-keypad-btn-active"},{name:"bg-selected",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),i=i==null?void 0:i.setAlpha(.25),ve(i)}},{name:"dark-bg-selected"},{name:"bg-sidebar",overrideGetter:(r,e)=>{const t=r.sidebarColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return ve(i)}},{name:"dark-bg-sidebar"},{name:"bg-sidebar-item-hover",overrideGetter:(r,e)=>{const t=r.sidebarColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=e({a:.9,r:255,b:255,g:255}):i=e({a:.86,r:15,b:15,g:15}),ve(i)}},{name:"dark-bg-sidebar-item-hover"},{name:"bg-sidebar-item-selected",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=i==null?void 0:i.setAlpha(.4),ve(i)}},{name:"dark-bg-sidebar-item-selected"},{name:"bg-table-selected-row",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=i==null?void 0:i.setAlpha(.2),ve(i)}},{name:"dark-bg-table-selected-row"},{name:"bg-toggle-switch-selected-disabled",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=i==null?void 0:i.setAlpha(.5),ve(i)}},{name:"dark-bg-toggle-switch-selected-disabled"},{name:"bg-date-picker-range",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),i=i==null?void 0:i.setAlpha(.15),ve(i)}},{name:"dark-bg-date-picker-range"},{name:"text-link",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return ve(i)}},{name:"dark-text-link"},{name:"text-link-hover",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),ve(i)}},{name:"dark-text-link-hover"},{name:"text-link-active",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(15):i=i==null?void 0:i.lighten(-15),ve(i)}},{name:"dark-text-link-active"},{name:"text-link-focus",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),ve(i)}},{name:"dark-text-link-focus"},{name:"text-link-visited",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(20):i=i==null?void 0:i.lighten(-22),ve(i)}},{name:"dark-text-link-visited"},{name:"text-sidebar-link",overrideGetter:(r,e)=>{const t=r.sidebarColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=e({a:.9,b:255,r:255,g:255}):i=e({a:.86,b:15,r:15,g:15}),ve(i)}},{name:"dark-text-sidebar-link"},{name:"text-sidebar-link-hover",overrideGetter:(r,e)=>{const t=r.sidebarColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=e({a:.86,r:15,b:15,g:15}):i=e({a:.9,r:255,b:255,g:255}),ve(i)}},{name:"dark-text-sidebar-link-hover"},{name:"text-sidebar-link-selected",overrideGetter:(r,e)=>{const t=r.sidebarColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=e({a:.9,r:255,b:255,g:255}):i=e({a:.86,b:15,r:15,g:15}),ve(i)}},{name:"dark-text-sidebar-link-selected"},{name:"border-color-action",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return ve(i)}},{name:"dark-border-color-action"},{name:"border-color-action-hover",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),ve(i)}},{name:"dark-border-color-action-hover"},{name:"border-color-action-active",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(15):i=i==null?void 0:i.lighten(-15),ve(i)}},{name:"dark-border-color-action-active"},{name:"border-color-divider",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=i==null?void 0:i.setAlpha(.6),ve(i)}},{name:"dark-border-color-divider"},{name:"border-color-divider-secondary",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(15):i=i==null?void 0:i.lighten(-15),i=i==null?void 0:i.setAlpha(.4),ve(i)}},{name:"dark-border-color-divider-secondary"},{name:"border-color-input-field",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=i==null?void 0:i.setAlpha(.6),ve(i)}},{name:"dark-border-color-input-field"},{name:"border-color-input-field-hover",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),i=i==null?void 0:i.setAlpha(.6),ve(i)}},{name:"dark-border-color-input-field-hover"},{name:"border-color-input-field-focus",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(15):i=i==null?void 0:i.lighten(-15),i=i==null?void 0:i.setAlpha(.6),ve(i)}},{name:"dark-border-color-input-field-focus"},{name:"border-color-input-field-disabled",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=e({a:.2,r:15,b:15,g:15}),ve(i)}},{name:"dark-border-color-input-field-disabled"},{name:"border-color-tile-focus",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return ve(i)}},{name:"dark-border-color-tile-focus"},{name:"border-color-tile-selected-focus",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(15):i=i==null?void 0:i.lighten(-15),i=i==null?void 0:i.setAlpha(.6),ve(i)}},{name:"dark-border-color-tile-selected-focus"},{name:"border-color-tile-selected",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return ve(i)}},{name:"dark-border-color-tile-selected"},{name:"border-color-tile-selected-hover",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),ve(i)}},{name:"dark-border-color-tile-selected-hover"}],fr=r=>{if(!r)return"";const{r:e,g:t,b:n,a:i}=r.toRgb();return`${e} ${t} ${n} / ${i}`},Rx=[{name:"border-secondary-btn",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return fr(i)}},{name:"dark-border-secondary-btn"},{name:"border-secondary-btn-hover",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),fr(i)}},{name:"dark-border-secondary-btn-hover"},{name:"border-secondary-btn-active",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(15):i=i==null?void 0:i.lighten(-15),fr(i)}},{name:"dark-border-secondary-btn-active"},{name:"border-input-field",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=i==null?void 0:i.setAlpha(.6),fr(i)}},{name:"dark-border-input-field"},{name:"border-input-field-hover",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),i=i==null?void 0:i.setAlpha(.6),fr(i)}},{name:"dark-border-input-field-hover"},{name:"border-input-field-focus",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(15):i=i==null?void 0:i.lighten(-15),i=i==null?void 0:i.setAlpha(.6),fr(i)}},{name:"dark-border-input-field-focus"},{name:"border-input-field-disabled",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=e({a:.2,r:15,b:15,g:15}),fr(i)}},{name:"dark-border-input-field-disabled"},{name:"border-divider",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=i==null?void 0:i.setAlpha(.6),fr(i)}},{name:"dark-border-divider"},{name:"border-divider-secondary",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(15):i=i==null?void 0:i.lighten(-15),i=i==null?void 0:i.setAlpha(.4),fr(i)}},{name:"dark-border-divider-secondary"},{name:"border-tile-selected",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return fr(i)}},{name:"dark-border-tile-selected"},{name:"border-tile-selected-hover",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(10):i=i==null?void 0:i.lighten(-10),fr(i)}},{name:"dark-border-tile-selected-hover"},{name:"border-tile-focus",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return fr(i)}},{name:"dark-border-tile-focus"},{name:"border-tile-selected-focus",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return n!=null&&n.isDark()?i=i==null?void 0:i.lighten(15):i=i==null?void 0:i.lighten(-15),i=i==null?void 0:i.setAlpha(.6),fr(i)}},{name:"dark-border-tile-selected-focus"}],B0=r=>{if(!r)return"";const{r:e,g:t,b:n,a:i}=r.toRgb();return`${e} ${t} ${n} / ${i}`},Ox=[{name:"ring-input-focus",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=i==null?void 0:i.setAlpha(.25),B0(i)}},{name:"dark-ring-input-focus"},{name:"ring-action-focus",overrideGetter:(r,e)=>{const t=r.actionColor;if(!t)return"";const n=t?e(t):void 0;let i=n?n.clone():void 0;return i=i==null?void 0:i.setAlpha(.25),B0(i)}},{name:"dark-ring-action-focus"}];class Dx{generateOverrideThemes(e){return this.getOverridableTokens().map(t=>({name:t.name,value:this.parseCssVarValue(t,e)}))}applyTheme(e){const t=`
|
|
52
|
+
:root {
|
|
53
|
+
${e.filter(n=>!!n.value).map(n=>`--v-${n.name}: ${n.value};`).join(`
|
|
54
|
+
`)}
|
|
55
|
+
}
|
|
56
|
+
`;this.getOverrideThemeContainer().innerHTML=Vd.sanitize(t,Jp)}getOverrideThemeContainer(){let e=document.head.querySelector("#vegaCustomOverrideTheme");return e||(e=document.createElement("style"),e.id="vegaCustomOverrideTheme",yn.nonce&&e.setAttribute("nonce",yn.nonce),document.head.append(e)),e}getOverridableTokens(){return[...Ax,...Rx,...Ox]}parseCssVarValue(e,t){var n;return(n=e.overrideGetter)===null||n===void 0?void 0:n.call(e,t,hx)}}const Ju=new Dx,Nx={"border-secondary-btn":"38, 42, 255, 1","border-secondary-btn-hover":"61, 64, 255, 1","border-secondary-danger-btn":"230, 50, 87, 1","border-secondary-btn-active":"23, 26, 232, 1","border-secondary-danger-btn-hover":"255, 87, 114, 1","border-secondary-danger-btn-active":"189, 41, 71, 1","border-input-field":"171, 198, 216, 1","border-input-field-hover":"115, 160, 190, 1","border-input-field-focus":"38, 42, 255, 1","border-input-field-danger":"230, 50, 87, 1","border-input-field-danger-hover":"255, 87, 114, 1","border-input-field-danger-focus":"233, 71, 104, 1","border-sidebar-item-focus":"38, 42, 255, 1","border-input-field-disabled":"222, 225, 227, 1","border-success":"1, 128, 31, 1","border-secondary-btn-disabled":"176, 180, 181, 1","border-chip":"205, 209, 211, 1","border-divider":"171, 198, 216, 1","border-divider-secondary":"199, 217, 229, 1","border-tile-selected":"38, 42, 255, 1","border-tile-selected-hover":"61, 64, 255, 1","border-table-divider":"171, 198, 216, 1","border-slider-handle":"199, 217, 229, 1","border-tile":"171, 198, 216, 1","border-tile-hover":"115, 160, 190, 1","border-tile-focus":"38, 42, 255, 1","border-tile-selected-focus":"38, 42, 255, 1","border-notification-btn":"32, 54, 69, 1","border-notification-btn-black":"32, 54, 69, 1"},Ix={"shadow-card":"0px 2px 8px 0px rgba(0, 0, 0, 0.04), 0px 2px 4px 0px rgba(0, 0, 0, 0.02)","shadow-modal":"0px 6px 40px 0px rgba(2, 2, 15, 0.04), 0px 4px 24px 0px rgba(2, 2, 15, 0.08), 0px 8px 80px 0px rgba(2, 2, 15, 0.16)","shadow-popover":"0px 0px 88px 0px rgba(2, 2, 15, 0.01), 0px 0px 32px 0px rgba(2, 2, 15, 0.02), 0px 4px 72px 0px rgba(2, 2, 15, 0.06)","shadow-form-field":"0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1)","shadow-dropdown-menu":"0px 2px 4px -2px rgba(0, 0, 0, 0.1), 0px 4px 6px -1px rgba(0, 0, 0, 0.1)","shadow-app-header":"0px 1px 0px 0px rgba(45, 76, 97, 0.15)","shadow-modal-header":"0px 1px 0px 0px rgba(45, 76, 97, 0.15)","shadow-modal-footer":"0px -2px 8px 0px rgba(45, 76, 97, 0.2), 0px -1px 0px 0px rgba(45, 76, 97, 0.15)","shadow-modal-footer-no-scroll":"0px -1px 0px 0px rgba(45, 76, 97, 0.15)"},Bx={"bg-brand":"51, 57, 61, 1","bg-page":"240, 243, 247, 1","bg-primary":"252, 252, 252, 1","bg-secondary":"245, 247, 247, 1","bg-tertiary":"240, 243, 247, 1","bg-quaternary":"241, 248, 251, 1","bg-inverted-primary":"4, 4, 28, 1","bg-inverted-secondary":"18, 18, 39, 1","bg-inverted-tertiary":"24, 24, 48, 1","bg-inverted-quaternary":"70, 71, 101, 1","bg-action":"38, 42, 255, 1","bg-action-hover":"61, 64, 255, 1","bg-action-focus":"38, 42, 255, 1","bg-action-active":"23, 26, 232, 1","bg-action-quaternary":"222, 225, 227, 1","bg-action-quaternary-hover":"239, 239, 239, 1","bg-action-quaternary-active":"205, 209, 211, 1","bg-action-secondary":"252, 252, 252, 1","bg-action-secondary-hover":"235, 235, 255, 1","bg-action-secondary-active":"219, 220, 255, 1","bg-action-tertiary":"0, 0, 0, 0","bg-action-tertiary-hover":"4, 4, 28, 0.05","bg-action-tertiary-active":"4, 4, 28, 0.1","bg-app-header":"240, 243, 247, 0.88","bg-backdrop-modal":"18, 18, 39, 0.85","bg-backdrop-popover":"32, 54, 69, 0.16","bg-backdrop-sidebar":"18, 18, 39, 0.85","bg-chip":"32, 54, 69, 0.06","bg-chip-hover":"32, 54, 69, 0.12","bg-chip-active":"32, 54, 69, 0.2","bg-danger":"189, 41, 71, 1","bg-danger-hover":"233, 71, 104, 1","bg-danger-focus":"189, 41, 71, 1","bg-danger-active":"230, 50, 87, 1","bg-danger-tertiary":"0, 0, 0, 0","bg-danger-tertiary-hover":"255, 87, 114, 0.2","bg-danger-tertiary-active":"189, 41, 71, 0.2","bg-disabled":"176, 180, 181, 1","bg-divider":"171, 198, 216, 1","bg-divider-secondary":"199, 217, 229, 1","bg-keypad-btn-active":"229, 239, 255, 1","bg-loading-progress":"153, 192, 255, 1","bg-loading-track":"229, 239, 255, 1","bg-segment-hover":"205, 209, 211, 1","bg-segment-control":"89, 96, 99, 0.1","bg-selected":"0, 151, 255, 0.3","bg-sidebar":"18, 18, 39, 1","bg-sidebar-icon":"188, 186, 213, 1","bg-sidebar-icon-hover":"18, 18, 39, 1","bg-sidebar-icon-selected":"252, 252, 252, 1","bg-sidebar-item-hover":"252, 252, 252, 1","bg-sidebar-item-selected":"19, 98, 226, 0.4","bg-site-footer":"51, 57, 61, 1","bg-site-footer-action":"171, 198, 216, 1","bg-site-footer-action-hover":"199, 217, 229, 1","bg-site-footer-action-active":"143, 179, 203, 1","bg-site-footer-field":"89, 96, 99, 1","bg-slider-handle":"252, 252, 252, 1","bg-status-error":"255, 110, 139, 1","bg-status-info":"205, 209, 211, 1","bg-status-success":"160, 233, 167, 1","bg-status-warning":"255, 220, 131, 1","bg-tab":"240, 243, 247, 1","bg-tab-hover":"245, 247, 247, 1","bg-tab-selected":"32, 54, 69, 1","bg-table-alt-row":"245, 247, 247, 1","bg-table-header":"240, 243, 247, 1","bg-table-row-hover":"241, 248, 251, 1","bg-table-row-selected-expanded":"229, 239, 255, 1","bg-table-selected-row":"204, 223, 255, 1","bg-textarea-count":"4, 4, 28, 0.6","bg-tile":"252, 252, 252, 1","bg-tile-hover":"245, 247, 247, 1","bg-tile-selected":"242, 247, 255, 1","bg-tile-selected-hover":"229, 239, 255, 1","bg-toggle-switch":"107, 116, 125, 0.7","bg-toggle-switch-hover":"107, 116, 125, 1","bg-toggle-switch-selected-disabled":"153, 192, 255, 1","bg-transparent":"0, 0, 0, 0","bg-accent1-primary":"115, 230, 220, 1","bg-accent1-secondary":"193, 244, 239, 1","bg-accent1-tertiary":"224, 249, 247, 1","bg-accent2-primary":"128, 107, 255, 1","bg-accent2-secondary":"199, 189, 255, 1","bg-accent2-tertiary":"227, 222, 255, 1","bg-accent3-primary":"255, 220, 131, 1","bg-accent3-secondary":"255, 239, 200, 1","bg-accent3-tertiary":"255, 247, 227, 1","bg-accent4-primary":"255, 149, 113, 1","bg-accent4-secondary":"255, 208, 192, 1","bg-accent4-tertiary":"255, 231, 223, 1","bg-accent5-primary":"0, 187, 255, 1","bg-accent5-secondary":"142, 223, 249, 1","bg-accent5-tertiary":"227, 247, 253, 1","bg-accent6-primary":"255, 130, 201, 1","bg-accent6-secondary":"255, 199, 231, 1","bg-accent6-tertiary":"255, 227, 243, 1","bg-accent7-primary":"37, 159, 159, 1","bg-accent7-secondary":"155, 212, 214, 1","bg-accent7-tertiary":"208, 239, 239, 1","bg-accent8-primary":"86, 61, 130, 1","bg-accent8-secondary":"199, 162, 204, 1","bg-accent8-tertiary":"230, 214, 234, 1","bg-accent9-primary":"255, 191, 63, 1","bg-accent9-secondary":"254, 215, 142, 1","bg-accent9-tertiary":"251, 226, 185, 1","bg-accent10-primary":"237, 122, 35, 1","bg-accent10-secondary":"241, 146, 85, 1","bg-accent10-tertiary":"245, 187, 148, 1","bg-date-picker-range":"229, 239, 255, 1","text-primary":"4, 4, 28, 0.95","text-secondary":"4, 4, 28, 0.64","text-inverted-primary":"252, 252, 254, 0.9","text-inverted-secondary":"252, 252, 254, 0.64","text-black":"4, 4, 28, 0.95","text-white":"252, 252, 254, 0.9","text-brand":"51, 57, 61, 1","text-danger-link":"230, 50, 87, 1","text-danger-link-hover":"233, 71, 104, 1","text-danger-link-active":"189, 41, 71, 1","text-danger-link-focus":"240, 52, 91, 1","text-danger-link-visited":"230, 50, 87, 1","text-disabled":"4, 4, 28, 0.35","text-error":"189, 41, 71, 1","text-input-disabled":"4, 4, 28, 0.35","text-input-placeholder":"4, 4, 28, 0.58","text-link":"38, 42, 255, 1","text-link-hover":"61, 64, 255, 1","text-link-active":"23, 26, 232, 1","text-link-focus":"38, 42, 255, 1","text-link-visited":"95, 56, 206, 1","text-on-action":"252, 252, 254, 0.9","text-on-danger":"252, 252, 254, 0.9","text-on-disabled":"252, 252, 254, 0.9","text-sidebar-link":"188, 186, 213, 1","text-sidebar-link-hover":"18, 18, 39, 1","text-sidebar-link-selected":"252, 252, 252, 1","text-site-footer-link":"171, 198, 216, 1","text-site-footer-link-hover":"199, 217, 229, 1","text-site-footer-link-active":"143, 179, 203, 1","text-success":"1, 128, 31, 1","text-inverted-success":"89, 217, 119, 1","text-accent1-primary":"115, 230, 220, 1","text-accent2-primary":"128, 107, 255, 1","text-accent3-primary":"255, 220, 131, 1","text-accent4-primary":"255, 149, 113, 1","text-accent5-primary":"0, 187, 255, 1","text-accent6-primary":"240, 52, 91, 1","text-accent7-primary":"37, 159, 159, 1","text-accent8-primary":"86, 61, 130, 1","text-accent9-primary":"255, 191, 63, 1","text-accent10-primary":"237, 122, 35, 1","border-color-action":"38, 42, 255, 1","border-color-action-hover":"61, 64, 255, 1","border-color-action-active":"23, 26, 232, 1","border-color-chip":"205, 209, 211, 1","border-color-danger":"230, 50, 87, 1","border-color-danger-hover":"255, 87, 114, 1","border-color-danger-active":"189, 41, 71, 1","border-color-divider":"171, 198, 216, 1","border-color-divider-secondary":"199, 217, 229, 1","border-color-input-field":"171, 198, 216, 1","border-color-input-field-hover":"115, 160, 190, 1","border-color-input-field-focus":"38, 42, 255, 1","border-color-input-field-danger":"230, 50, 87, 1","border-color-input-field-danger-hover":"255, 87, 114, 1","border-color-input-field-danger-focus":"233, 71, 104, 1","border-color-input-field-disabled":"222, 225, 227, 1","border-color-secondary-btn-disabled":"176, 180, 181, 1","border-color-sidebar-item-focus":"38, 42, 255, 1","border-color-slider-handle":"199, 217, 229, 1","border-color-success":"1, 128, 31, 1","border-color-table-divider":"171, 198, 216, 1","border-color-tile":"171, 198, 216, 1","border-color-tile-hover":"115, 160, 190, 1","border-color-tile-focus":"38, 42, 255, 1","border-color-tile-selected-focus":"38, 42, 255, 1","border-color-tile-selected":"38, 42, 255, 1","border-color-tile-selected-hover":"61, 64, 255, 1","border-color-notification-btn":"32, 54, 69, 1","border-color-notification-btn-dark":"32, 54, 69, 1"};class D_{getStyleContainer(e){let t=document.head.querySelector(`#${e}`);return t||(t=document.createElement("style"),t.id=e,yn.nonce&&t.setAttribute("nonce",yn.nonce),document.head.append(t)),t}reset(e){const t=document.head.querySelector(`#${e}`);t&&t.remove()}}class Mx extends D_{constructor(){super(),this.tokens={},this.themeStyleContainerKey="vega-brand-theme",this.observer=new dl(this.isAcceptObserver.bind(this),e=>{e==="heartland"?this.reset(this.themeStyleContainerKey):this.generateThemeStyle();const t=Br.isDarkMode();t&&Ke.notify(Kp,t)}),Ke.register(C_,this.observer)}generateThemeStyle(){this.tokens=Object.assign(Bx,Nx,Ix);const t=`
|
|
57
|
+
:root {
|
|
58
|
+
${Object.keys(this.tokens).map(n=>`--v-${n}: ${this.tokens[n]};`).join(`
|
|
59
|
+
`)}}`;this.getStyleContainer(this.themeStyleContainerKey).innerHTML=Vd.sanitize(t,Jp)}isAcceptObserver(){return!0}}new Mx;class Px{constructor(){this.currentBranding="heartland"}overrideColors(e){const t=Ju.generateOverrideThemes(e),n=e.overrideTokenMap?this.applyTokenMapPatches(t,e.overrideTokenMap):t;Ju.applyTheme(n)}reset(){Ju.getOverrideThemeContainer().innerHTML=Vd.sanitize("",wx)}toggleDarkMode(e){e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),Ke.notify(Kp,e)}isDarkMode(){return document.documentElement.classList.contains("dark")}getBranding(){return this.currentBranding}applyBranding(e){this.currentBranding=e,Ke.notify(C_,e)}async validateColorAccessibility(e){return(await Y(()=>import("./action-color-accessibility-validator-ce55cb07-C-ZfZ90r.js"),[],import.meta.url)).vegaAccessibilityValidator.validate(e)}applyTokenMapPatches(e,t){return Object.keys(t).length===0?e:e.map(n=>t[n.name]!==void 0?{name:n.name,value:t[n.name]}:n)}}const Br=new Px,Fx={"bg-backdrop-loading":"0, 0, 0, 0.5","text-page-notification-content":O_["text-inverted-primary"],"bg-textarea-counter-exceed-max-length":"255, 87, 114","bg-date-picker-range":"32, 54, 69, 1","regular-credit-card-bg":"252, 252, 252, 1","regular-credit-card-top":"4, 4, 28, 1","regular-credit-card-bottom":"255, 255, 255, 1"};class Hx extends D_{constructor(){super(),this.dynamicCustomDarkModeColor={},this.themeStyleContainerKey="vegaDarkModeStyle",this.darkModeColorAllTokens={},this.observer=new dl(this.isAcceptObserver.bind(this),e=>{e?this.generateThemeStyle():this.reset(this.themeStyleContainerKey)}),Ke.register(Kp,this.observer)}registerCustomDarkModeColor(e){this.dynamicCustomDarkModeColor=Object.assign(Object.assign({},this.dynamicCustomDarkModeColor),e),this.generateThemeStyle()}generateThemeStyle(){const e=Object.assign(Sx,Cx,Ex,xx),t=Object.assign(O_,Tx,Lx,kx);this.darkModeColorAllTokens=Object.assign(Br.getBranding()==="heartland"?t:e,Fx,this.dynamicCustomDarkModeColor);const i=`
|
|
60
|
+
html.dark {
|
|
61
|
+
${Object.keys(this.darkModeColorAllTokens).map(s=>`--v-${s}: ${this.darkModeColorAllTokens[s]};`).join(`
|
|
62
|
+
`)}}`;this.getStyleContainer(this.themeStyleContainerKey).innerHTML=Vd.sanitize(i,Jp)}isAcceptObserver(){return!0}}const xP=new Hx;function TP(r,e=""){return e.includes(".")&&e!=="."?e.split(".").reduce((t,n)=>t==null?void 0:t[n],r):r[e]}function jx(r,e){return r&&e&&typeof r=="object"&&typeof e=="object"?Object.keys(r).length===Object.keys(e).length&&Object.keys(r).reduce(function(t,n){return t&&jx(r[n],e[n])},!0):r===e}function Vt(r,e){return Object.fromEntries(Object.entries(r).filter(([t,n])=>n!=null&&(e!=null&&e.cleanEmptyString?n!=="":!0)))}var Je;(function(r){r.SELECTION_RANGE="SELECTION_RANGE",r.CLEAR_FORMATTING="CLEAR_FORMATTING",r.LINK_GROUP="LINK_GROUP"})(Je||(Je={}));class hs{}var Tr;(function(r){r.ALIGNMENT="ALIGNMENT",r.TEXT_STYLE="TEXT_STYLE",r.INDENT="INDENT",r.LIST="LIST",r.INTERNAL_WRAPPER="INTERNAL_WRAPPER"})(Tr||(Tr={}));class dr extends hs{}class $x{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap,this.contentEntityToRootDom=new Map,this.rootDomToContentEntity=new WeakMap}register(e,t){this.isVegaRTEContent(t)?this.registerRootDomAndContentEntity(e,t):(this.domToEntity.set(e,t),this.entityToDOM.set(t,e))}getEntityByDOM(e){return this.domToEntity.get(e)}getDOMByEntity(e){return this.isVegaRTEContent(e)?this.contentEntityToRootDom.get(e):this.entityToDOM.get(e)}removeDirtyDomRef(e){this.domToEntity.delete(e)}registerRootDomAndContentEntity(e,t){const n=this.rootDomToContentEntity.get(e);n&&n!==t&&this.contentEntityToRootDom.delete(n),this.rootDomToContentEntity.set(e,t),this.contentEntityToRootDom.set(t,e)}isVegaRTEContent(e){return e&&e.dtoName==="VegaRTEContent"}}const Pe=new $x;var J;(function(r){r.DELETE_CHILDREN="DELETE_CHILDREN",r.DELETE_NEST_LIST="DELETE_NEST_LIST",r.UPDATE_TEXT="UPDATE_TEXT",r.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",r.APPEND_CHILDREN="APPEND_CHILDREN",r.INSERT_CHILDREN_AFTER="INSERT_CHILDREN_AFTER",r.INSERT_CHILDREN_BEFORE="INSERT_CHILDREN_BEFORE",r.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",r.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",r.REPLACE_NEST_LIST="REPLACE_NEST_LIST",r.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",r.INSERT_NEW_PARAGRAPH="INSERT_NEW_PARAGRAPH",r.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",r.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",r.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",r.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",r.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",r.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",r.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",r.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",r.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",r.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",r.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK",r.UNLINK_LINK_GROUP="UNLINK_LINK_GROUP",r.LINK_GROUP_NODE_SPLIT="LINK_GROUP_NODE_SPLIT",r.DELETE_LINK_GROUP="DELETE_LINK_GROUP",r.UPDATE_CURSOR_POSITION="UPDATE_CURSOR_POSITION",r.INSERT_TEXT_TO_DECORATOR_NODE="INSERT_TEXT_TO_DECORATOR_NODE",r.INSERT_NODE_TO_NEAREST_ROOT="INSERT_NODE_TO_NEAREST_ROOT",r.PASTE_CONTENT="PASTE_CONTENT"})(J||(J={}));class ue{constructor(){this.isFlushable=!1}}function N_(r){const e=r.getAttribute("style");return e?e.split(";").filter(Boolean).filter(n=>n!==" ").map(n=>{const i=n.replace(/(['"])(.*?)\1/g,"$2").split(":");return{[WE(i[0].trim())]:i[1].trim().replace(";","")}}).reduce((n,i)=>Object.assign(Object.assign({},n),i),{}):{}}class dt{constructor(){this.classNameToBeAdded=""}filterAnnotations(e){const t=e.customStyle;return t&&(this.extractAndDeleteMatchedStyles(t),Object.keys(t).length===0&&delete e.customStyle),e}filterAndDeleteStyles(e,t){const n=new Set(t);return this.extractAndDeleteMatchedStyles(e)&&this.classNameToBeAdded&&n.add(this.classNameToBeAdded),{styles:e,classNames:Array.from(n)}}refillStyles(e){this.classNameToBeAdded&&e.classList.remove(this.classNameToBeAdded);const t=N_(e),n=Object.assign(Object.assign({},this.stylesToBeFiltered),t),i=Object.entries(Object.assign({},n)).map(([s,a])=>`${Ks(s)}: ${a};`).join("");e.setAttribute("style",i)}canFilter(e){return!1}canRefill(e,t){return!1}toCssText(){return""}get alwaysFilter(){return!1}extractAndDeleteMatchedStyles(e){let t=!1;const n=this.stylesToBeFiltered;if(e&&n){const i=Object.keys(n);for(const s of i)e[s]===n[s]&&(delete e[s],t=!0)}return t}buildCssTextForStyles(e,t){const n=`.${dt.RTE_CONTENT_CONTAINER_CLASS_NAME}`+(t?` .${t}`:` ${e}`),i=Object.entries(this.stylesToBeFiltered).map(([s,a])=>`${Ks(s)}: ${a};`).join(" ");return`${n} { ${i} }`}convertStylesMapToCssText(e){const t=e||this.stylesToBeFiltered;return Object.entries(t).map(([n,i])=>`${Ks(n)}: ${i};`).join(" ")}isBlockOrNodeStylesMatchFilterStyles(e,t){const n=e.getStyles({standalone:!0});return this.isMatchFilterStyles(n,t)}isMatchFilterStyles(e,t){return(t&&t.length>0?t:Object.keys(this.stylesToBeFiltered)).every(i=>e[i]===this.stylesToBeFiltered[i])}}dt.RTE_CONTENT_CONTAINER_CLASS_NAME="vega-rte-content";var ce;(function(r){r.BOLD="BOLD",r.ITALIC="ITALIC",r.UNDERLINE="UNDERLINE",r.STRIKETHROUGH="STRIKETHROUGH",r.SELECTION_RANGE="SELECTION_RANGE",r.IMAGE="IMAGE",r.CODE="CODE",r.TEXT_COLOR="TEXT_COLOR",r.LINK="LINK",r.INLINE_HTML="INLINE_HTML",r.PLAIN_TEXT="PLAIN_TEXT"})(ce||(ce={}));class ur extends hs{}let ft=class{static isTextBlock(e){return e===this.RTE_TEXT_BLOCK_CLASS_NAME}static isCodeBlock(e){return e==="RTECodeBlock"}static isListBlock(e){return e==="RTEListBlock"}static isListItemBlock(e){return e==="RTEListItemBlock"}static isTextNode(e){return e===this.RTE_TEXT_NODE_CLASS_NAME}static isLinkNode(e){return this.isTextNode(e.dtoName)&&!!e.getAnnotationByType(ce.LINK)}static isCodeNode(e){if(this.isTextNode(e.dtoName)){const t=e.getAnnotationByType(ce.CODE);return!!t&&t.code}return!1}static isImageNode(e){return e.dtoName==="RTEImageNode"}static isCodeBlockNode(e){return e.dtoName==="RTECodeBlockNode"}};ft.RTE_TEXT_NODE_CLASS_NAME="RTETextNode";ft.RTE_TEXT_BLOCK_CLASS_NAME="RTETextBlock";class I_ extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=Mn.getDefaultStyles(),this.elementTagName="a"}filterAnnotations(e){const t=e.link;return t!=null&&t.customStyle&&(this.extractAndDeleteMatchedStyles(t.customStyle),Object.keys(t.customStyle).length===0&&delete t.customStyle),e}canFilter(e){return ft.isLinkNode(e)}canRefill(e,t){return e==="RTETextNode"&&t.matches(this.elementTagName)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}filterLinkGroupInlineStyles(e){const t=e.style,n=e.class?e.class.split(" "):[],i=this.filterAndDeleteStyles(t,n);return i.styles&&Object.keys(i.styles).length>0&&(e.style=i.styles),i.classNames&&i.classNames.length>0&&(e.class=i.classNames.join(" ")),e.style&&Object.keys(e.style).length===0&&delete e.style,e}}class Mn extends hs{constructor(e){super(),this.type=Je.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[e,[]]])}static getDefaultStyles(){return{color:"rgba(var(--v-text-link, 19, 98, 226, 1))"}}clone(){const e=new Mn("");return this.linkGroups.forEach((t,n)=>{e.linkGroups.set(n,t.map(i=>i.clone(i.parent)))}),e}toString(e,t){let n=this.toJsx(e,t);return t!=null&&t.filterInlineStyles&&(n=Mn.linkGroupFilterStylesStrategy.filterLinkGroupInlineStyles(n)),Object.entries(n).map(([i,s])=>{const a=typeof s=="string"?s:this.formatStyleToString(s);return`${Ks(i)}="${a}"`}).join(" ")}toJsx(e,t){const n=this.getStyle(e,t),i=this.getClass(e,t),s=this.getAttribute(e);return i.length>0&&(s.class=i.join(" ")),n&&Object.keys(n).length>0&&(s.style=n),s}getClass(e,t){const n=[];return e.link.customClass&&n.push(...e.link.customClass),!(t!=null&&t.standalone)&&e.useInternalStyle&&n.push("v-rte--link"),n}getStyle(e,t){const n={};return e.link.customStyle&&Object.assign(n,e.link.customStyle),t!=null&&t.standalone&&e.useInternalStyle&&Object.assign(n,Mn.getDefaultStyles()),n}getAttribute(e){const{href:t,customAttribute:n={}}=e.link,i=e.useInternalStyle,s=n.target||(i?"_blank":"");return Object.assign(Object.assign(Object.assign({},n),t?{href:t}:i?{href:t}:{}),s?{target:s}:{})}formatStyleToString(e){return Object.entries(e).map(([t,n])=>`${Ks(t)}: ${n};`).join(" ")}}Mn.linkGroupFilterStylesStrategy=new I_;class Zi extends dr{constructor(e){super(),this.type=Tr.ALIGNMENT,this.textAlign=e}static from(e){return[Tr.ALIGNMENT,new Zi(e)]}static getDefaultStyles(e){switch(e){case"right":case"center":case"justify":return{textAlign:e};case"left":default:return{textAlign:"left"}}}toJSON(){return{textAlign:this.textAlign}}renderClass(e){if(e!=null&&e.standalone)return null;switch(this.textAlign){case"right":case"center":case"justify":return`v-rte--horizontal-alignment-${this.textAlign}`;case"left":default:return"v-rte--horizontal-alignment-left"}}clone(){return new Zi(this.textAlign)}renderStyle(e){return e!=null&&e.standalone?Zi.getDefaultStyles(this.textAlign):null}}class Ia extends dr{constructor(e){super(),this.type=Tr.INDENT,this.indent=Math.max(0,e)}static from(e){return[Tr.INDENT,new Ia(e)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new Ia(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:`${this.indent*16}px`}:null}}class sd{static register(e,t,n){this.registry.has(t)||this.registry.set(t,new Map),this.registry.get(t).has(e)||this.registry.get(t).set(e,new Set),this.registry.get(t).get(e).add(n)}static unregister(e,t,n){const i=this.registry.get(t);if(i){const s=i.get(e);s&&s.delete(n)}}static get(e,t){const n=t.constructor.name,i=e instanceof ue?e.type:e.constructor.name,s=this.registry.get(n);if(s){const a=s.get(i);if(a&&a.size>0)return Array.from(a).find(o=>o.canIntercept(e,t))}}}sd.registry=new Map;class q{static register(e,t,n){this.registry.has(t)||this.registry.set(t,new Map),this.registry.get(t).set(e,n)}static unregister(e,t){const n=this.registry.get(t);n&&n.delete(e)}static get(e,t){const n=this.registry.get(t);if(n)return n.get(e)}static executeTheStrategy(e,t){const n=sd.get(e,t),i=()=>{const s=e instanceof ue?e.type:e.constructor.name,a=q.get(s,t.constructor.name);if(a)return e.executedFlag=!0,a.execute(e,t);rt.warn(`Type ${s} action handle strategy is not registered in class ${t.constructor.name}`)};return n?n.intercept(i,e,t):i()}static canHandle(e,t){return!!q.get(e,t.constructor.name)}}q.registry=new Map;var nt;(function(r){r.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",r.CUSTOM_CLASS="CUSTOM_CLASS",r.CUSTOM_STYLE="CUSTOM_STYLE"})(nt||(nt={}));class as extends hs{}class an extends as{constructor(e){super(),this.type=nt.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=e}static from(e){return[nt.CUSTOM_ATTRIBUTE,new an(e)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new an(this.customAttribute)}toString(e=[]){const t=e.map(n=>n.split("=")[0]);return Object.keys(this.customAttribute).map(n=>t.includes(n)?null:`${n}="${this.customAttribute[n]}"`).filter(Te)}render(e={}){var t;const n=Object.assign({},this.customAttribute);return(t=e.filterAttributes)===null||t===void 0||t.forEach(i=>delete n[i]),Object.keys(n).forEach(i=>{this.BOOLEAN_ATTRS.has(i)&&n[i]===""&&(n[i]="true")}),n}}class Un extends as{constructor(e){super(),this.type=nt.CUSTOM_CLASS,this.customClass=e}static from(e){return[nt.CUSTOM_CLASS,new Un(e)]}toJSON(){return{customClass:this.customClass}}clone(){return new Un(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class Wr extends as{constructor(e){super(),this.type=nt.CUSTOM_STYLE,this.customStyle=e}static from(e){return[nt.CUSTOM_STYLE,new Wr(e)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new Wr(this.customStyle)}renderStyle(){return this.customStyle}removeStyles(e){const t=Object.assign({},this.customStyle);return e.forEach(n=>delete t[n]),t}toString(){return`style="${Object.entries(this.customStyle).map(([e,t])=>`${e}: ${t};`).join(" ")}"`}}class Ba extends dr{constructor(e){super(),this.type=Tr.INTERNAL_WRAPPER,this.internalWrapper=e}static from(e){return[Tr.INTERNAL_WRAPPER,new Ba(e)]}clone(){return new Ba(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class Ma{constructor(e){this.dtoName=e instanceof it?"block":"node",this.annotationMap=e.annotationMap}toCssText(e={standalone:!1},t,n){return n=n||this.toJSON(e,t),Object.entries(Object.assign({},n)).map(([i,s])=>`${Ks(i)}: ${s};`).join("")}toJSON(e={standalone:!1},t){const n=Array.from(this.annotationMap.values()).filter(i=>this.filterAnnotation(i)||i instanceof Wr).map(i=>i.renderStyle(e)).filter(Te);return t&&t.length>0?this.mergeAnnotationStyles(n,t):n.reduce((i,s)=>Object.assign(Object.assign({},i),s),{})}filterAnnotation(e){return this.dtoName==="block"?e instanceof dr:e instanceof ur}mergeAnnotationStyles(e,t){const n={};for(const i of e)for(const s in i){const a=i[s],o=n[s];typeof o=="string"&&typeof a=="string"&&t.includes(s)?n[s]=Array.from(new Set(`${o} ${a}`.split(/\s+/).filter(Boolean))).join(" "):n[s]=a}return n}}class pe{static register(e,t){var n;const i=(n=this.registry.get(e))!==null&&n!==void 0?n:new Set;i.add(t),this.registry.set(e,i)}static getStrategies(e){var t;return Array.from((t=this.registry.get(e))!==null&&t!==void 0?t:[])}static executeTheStrategyFilterAction(e,t,n){const i=e.dtoName;return this.getStrategies(i).filter(o=>o.canFilter(e)).reduce((o,l)=>l.filterAndDeleteStyles(o.styles,o.classNames),{styles:t,classNames:n})}static executeTheStrategyRefillAction(e,t){this.getStrategies(e).filter(s=>s.canRefill(e,t)).forEach(s=>{s.refillStyles(t)})}static generateAllStylesContent(e=!1){const t=[];return e&&(t.push(`/* Font-face imports begin */
|
|
63
|
+
`),t.push(Object.keys(rd).map(n=>`@import url('${rd[n].url}');
|
|
64
|
+
`).join(" ")),t.push(`/* Font-face imports end */
|
|
65
|
+
`)),this.registry.forEach(n=>{n.forEach(i=>{const s=i.toCssText();s&&!t.includes(s)&&t.push(s)})}),t.join(" ")}}pe.registry=new Map;var Pa;(function(r){r.TEXT="TEXT",r.IMAGE="IMAGE",r.CODE_BLOCK_NODE="CODE_BLOCK_NODE"})(Pa||(Pa={}));class ls{constructor(e,t){this.annotationMap=new Map,this.dtoName=this.constructor.name,this.id=e,t&&(this.annotationMap=t)}static from(e,t,n){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(e)}, ${t}, ${n}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(e,t){switch(e){case"customAttribute":return an.from(t);case"customClass":return Un.from(t);case"customStyle":return Wr.from(t)}}getAnnotationByType(e){return this.annotationMap.get(e)}deleteAnnotationByType(e){this.annotationMap.delete(e),this.flushChange()}apply(e){return this.doApply(e),e.isFlushable&&this.flushChange(),this}getStyles(e={standalone:!1}){return new Ma(this).toJSON(e,["textDecoration"])}getClasses(e={standalone:!1}){return Array.from(this.annotationMap.values()).filter(t=>t instanceof ur||t instanceof Un).map(t=>t.renderClass(e)).filter(Te).reduce((t,n)=>[t,n].join(" ").trim(),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(nt.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return Pe.getDOMByEntity(this)}generateAttributeString(e,...t){var n;const i=new Ma(this),s=i.toJSON({standalone:!0},["textDecoration"]),a=this.annotationMap.get(nt.CUSTOM_CLASS);let o=s,l=a==null?void 0:a.renderClass();if(e&&e.filterInlineStyles){const d=pe.executeTheStrategyFilterAction(this,s,l);o=d.styles,l=d.classNames}const u=[...((n=this.getCustomAttributesAnnotation())===null||n===void 0?void 0:n.toString(t))||[],l&&l.length>0?`class="${l.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${i.toCssText({standalone:!0},void 0,o)}"`:null,...t].filter(Te);return u.length?` ${u.join(" ")}`:""}doApply(e){e instanceof ue?this.doModifyActionApply(e):this.doAnnotationActionApply(e)}flushChange(){const e=Pe.getDOMByEntity(this);if(e){const t=Zt.getSubjectFromParentNodeByEventId(e,$d);t&&Ke.notify(t,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map(([e,t])=>[e,t.clone()]))}doAnnotationActionApply(e){}doModifyActionApply(e){}}class Vx{constructor(){this.RTE_BLOCK_DTO_CLASS_MAP=new Map,this.RTE_NODE_DTO_CLASS_MAP=new Map}registerRTEDTOClass(e,t){if(t.prototype instanceof it)this.RTE_BLOCK_DTO_CLASS_MAP.set(e,t);else if(t.prototype instanceof ls)this.RTE_NODE_DTO_CLASS_MAP.set(e,t);else throw new Error(`Invalid RTE DTO class type: ${e}`)}getRTEBlockClass(e){return this.RTE_BLOCK_DTO_CLASS_MAP.get(e)}getRTENodeClass(e){return this.RTE_NODE_DTO_CLASS_MAP.get(e)}}const qe=new Vx;class it{constructor(e){this.annotationMap=new Map,this.dtoName=this.constructor.name,this.id=e}static from(e,t){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(e)}, ${t}) is not implemented. Please implement this method in the subclass.`)}static generateBlockChildren(e,t,n){return e.map(i=>{const s=qe.getRTEBlockClass(i.type);if(s){const a=s.from(i,t);return a.parent=n,a}}).filter(Te)}static createAnnotationEntity(e,t){switch(e){case"textAlign":return Zi.from(t);case"indent":return Ia.from(t);case"customAttribute":return an.from(t);case"customClass":return Un.from(t);case"customStyle":return Wr.from(t);case"internalWrapper":return Ba.from(t)}}static convertAnnotationsToMap(e,t){Object.entries(t).forEach(([n,i])=>{const s=this.createAnnotationEntity(n,i);Te(s)&&e.set(...s)})}shouldRenderAsInternalWrapper(){const e=this.getAnnotationByType(Tr.INTERNAL_WRAPPER);return e?e.internalWrapper&&Array.from(this.annotationMap.values()).filter(t=>!(t instanceof Mn)&&!(t instanceof Ba)).length===0:!1}toJSON(){const e=Array.from(this.annotationMap.values()).filter(t=>t instanceof dr||t instanceof as).reduce((t,n)=>Object.assign(Object.assign({},t),n.toJSON()),{});return Object.assign({id:this.id},Object.keys(e).length>0?{annotations:e}:{})}getAnnotationByType(e){return this.annotationMap.get(e)}apply(e){if(this.doApply(e),e.isFlushable){const t=Pe.getDOMByEntity(this);if(t){const n=Zt.getSubjectFromParentNodeByEventId(t,$d);n&&Ke.notify(n,{})}}}getFirstNode(){if(!this.children||!this.children[0])return null;const e=this.children[0];return e instanceof it?e.getFirstNode():e}isListItemBlock(){return this.type==="list-item"}getStyles(e={standalone:!1}){const n=new Ma(this).toJSON(e);return Object.assign(Object.assign({},n),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(e={standalone:!1}){return Array.from(this.annotationMap.values()).filter(t=>t instanceof dr||t instanceof Un).map(t=>t.renderClass(e)).filter(Te).reduce((t,n)=>[t,n].join(" ").trim(),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(nt.CUSTOM_ATTRIBUTE)}generateAttributeString(e,...t){var n;const i=new Ma(this),s=i.toJSON({standalone:!0}),a=this.annotationMap.get(nt.CUSTOM_CLASS);let o=s,l=a==null?void 0:a.renderClass();if(e&&e.filterInlineStyles){const d=pe.executeTheStrategyFilterAction(this,s,l);o=d.styles,l=d.classNames}const u=[...((n=this.getCustomAttributesAnnotation())===null||n===void 0?void 0:n.toString(t))||[],l&&l.length>0?`class="${l.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${i.toCssText({standalone:!0},void 0,o)}"`:null,...t].filter(Te);return u.length?` ${u.join(" ")}`:""}doApply(e){e instanceof ue?q.executeTheStrategy(e,this):this.applyAnnotationAction(e)}applyAnnotationAction(e){const t=e.toAnnotation();if(t instanceof Mn||this.annotationMap.set(t.type,t),typeof this.doAnnotationActionApply=="function")this.doAnnotationActionApply(e);else{const n=q.get(e.constructor.name,this.constructor.name);n&&n.execute(e,this)}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map(([e,t])=>[e,t.clone()]))}}class Yt{}class Fr extends Yt{constructor(){super(...arguments),this.doSplit=!0}}class ul extends hs{constructor(e){super(),this.type=Je.SELECTION_RANGE,this.range=e}clone(){return new ul(this.range)}}const Qp="700",zx="bold",eg="italic",od="underline",ad="line-through",Ux="Roboto Mono",Wx="pre-wrap";class Fa extends ur{constructor(e){super(),this.type=ce.STRIKETHROUGH,this.strikethrough=e}static from(e){return[ce.STRIKETHROUGH,new Fa(e)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new Fa(this.strikethrough)}renderClass(e){return e!=null&&e.standalone?null:this.strikethrough?"v-rte--strikethrough":null}renderStyle(e){return e!=null&&e.standalone&&this.strikethrough?{textDecoration:ad}:null}}class Ha extends ur{constructor(e){super(),this.type=ce.UNDERLINE,this.underline=e}static from(e){return[ce.UNDERLINE,new Ha(e)]}toJSON(){return{underline:this.underline}}clone(){return new Ha(this.underline)}renderClass(e){return e!=null&&e.standalone?null:this.underline?"v-rte--underline":null}renderStyle(e){return e!=null&&e.standalone&&this.underline?{textDecoration:od}:null}}class ja extends ur{constructor(e){super(),this.type=ce.ITALIC,this.italic=e}static from(e){return[ce.ITALIC,new ja(e)]}toJSON(){return{italic:this.italic}}clone(){return new ja(this.italic)}renderClass(e){return e!=null&&e.standalone?null:this.italic?"v-rte--italic":null}renderStyle(e){return e!=null&&e.standalone&&this.italic?{fontStyle:eg}:null}}class $a extends ur{constructor(e){super(),this.type=ce.BOLD,this.bold=e}static from(e){return[ce.BOLD,new $a(e)]}toJSON(){return{bold:this.bold}}clone(){return new $a(this.bold)}renderClass(e){return e!=null&&e.standalone?null:this.bold?"v-rte--bold":null}renderStyle(e){return e!=null&&e.standalone&&this.bold?{fontWeight:Qp}:null}}class Yi extends ur{constructor(e,t=!0){super(),this.type=ce.CODE,this.code=e,this.useInternalStyle=t}static from(e,t){return[ce.CODE,new Yi(e,t)]}static getDefaultStyles(){return{fontFamily:Ux,whiteSpace:Wx}}toJSON(){return{code:this.code}}clone(){return new Yi(this.code,this.useInternalStyle)}renderClass(e){return e!=null&&e.standalone?null:this.code&&this.useInternalStyle?"v-rte--code":null}renderStyle(e){return e!=null&&e.standalone&&this.code&&this.useInternalStyle?Yi.getDefaultStyles():null}}const B_={key:"black",light:"#111128",dark:"#E3E3E8"},ld=[B_,{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],Gx="",LP=[{key:"title"},{key:"subtitle"},{key:"heading-1"},{key:"heading-2"},{key:"heading-3"},{key:"paragraph"}],Kx=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]],xf=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);class Va extends ur{constructor(e){super(),this.type=ce.TEXT_COLOR,this.textColor=this.formatTextColor(e)}static from(e){return[ce.TEXT_COLOR,new Va(e)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new Va(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:Br.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(e){return ld.find(t=>t.key===e)||ld[0]}}class no extends ur{constructor(e,t=!0){super(),this.type=ce.LINK,this.link=e,this.useInternalStyle=t}static from(e,t=!0){return[ce.LINK,new no(e,t)]}toJSON(){return{link:this.link}}clone(){return new no(this.link,this.useInternalStyle)}toEqual(e){return this.link.groupKey===e.link.groupKey}renderClass(){return null}renderStyle(){return null}}class tg extends Yt{constructor(e,t,n){super(),this.isFlushable=!1,this.groupKey=e,this.nodes=t,this.type=n}toAnnotation(){return new Mn(this.groupKey)}}class zd extends Yt{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class ne{execute(e,t){return rt.log(`Executing action ${e.constructor.name} on ${t.constructor.name} ${t.id}`),this.handleAction(e,t)}updateCustomStyleAnnotation(e,t){const n=e.annotationMap.get(nt.CUSTOM_STYLE);n&&this.isCustomStyle(n,t)&&e.annotationMap.set(n.type,new Wr(n.removeStyles(t)))}createNewParagraph(e){const t=qe.getRTEBlockClass("paragraph");if(t)return t.from({id:Q(),type:"paragraph",nodes:[{id:Q(),type:"text",text:e}]})}getRootContent(e){const t=e.parent;if(t)return t.dtoName==="VegaRTEContent"?t:this.getRootContent(t)}isCaretPositionAtBlockStart(e,t,n){return t===e.children[0]&&n===0}isCaretPositionAtBlockEnd(e,t,n){return t.isContentEditable()?this.isCaretPositionAtTextBlockEnd(e,t,n):this.isCaretPositionAtDecoratorBlockEnd(e,t,n)}getDOMByEntity(e){return Pe.getDOMByEntity(e)}isCaretPositionAtTextBlockEnd(e,t,n){const i=e.children[e.children.length-1];return t===i&&(t.isEmpty()||n===i.text.length)}isCaretPositionAtDecoratorBlockEnd(e,t,n){return t===e.children[e.children.length-1]&&n!==0}isCustomStyle(e,t){return t.some(n=>Object.keys(e.customStyle).includes(n))}}class qx extends ue{constructor(e){super(),this.type=J.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=e}}class Xx extends ne{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(e,t){const n=t.getAnnotationByType(Je.SELECTION_RANGE);if(this.setApplyTargetNode(null),e instanceof Fr&&e.doSplit&&n){const{startContainer:i,endContainer:s,startOffset:a,endOffset:o}=n.range,l=i===s&&a===o;t.parent.children=t.parent.children.flatMap(c=>{if(c.id===t.id){if(l)return this.insertNewNode(a,t);if(this.shouldSplitSelection(n.range)&&t.isContentEditable()){const u=this.splitTextNode(n.range,t);return c.annotationMap.has("LINK")&&c.apply(new qx(u)),u}else return this.setApplyTargetNode(t),t}return c})}return this.applyTargetNode}insertNewNode(e,t){const n=t.cloneWithText("");this.setApplyTargetNode(n);const i=t.parent.children.findIndex(o=>o===t);if(e===0||!t.isContentEditable()&&e===i)return[n,t];if(e===t.text.length||!t.isContentEditable()&&e===i+1)return[t,n];const s=t.cloneWithText(t.text.substring(0,e)),a=t.cloneWithText(t.text.substring(e));return[s,n,a]}shouldSplitSelection(e){const{startContainer:t,endContainer:n,startOffset:i,endOffset:s}=e,a=t!==n,o=i>0,l=s<(n.textContent?n.textContent.length:0);return a||(o||l)}splitTextNode(e,t){const{startContainer:n,endContainer:i,startOffset:s}=e,a=n.parentElement,o=i.parentElement,l=(d,g,_)=>{const y=d.substring(0,g),b=d.substring(g,_),p=d.substring(_);return[t.cloneWithText(y),t.cloneWithText(b),t.cloneWithText(p)]},c=a&&Pe.getEntityByDOM(a),u=o&&Pe.getEntityByDOM(o);if(c&&c.id===t.id){const d=n===i?e.endOffset:t.text.length,[g,_,y]=l(t.text,s,d);return this.setApplyTargetNode(_),[g,_,y].filter(b=>!!b.text)}else if(u&&u.id===t.id){const[d,g,_]=l(t.text,0,e.endOffset);return this.setApplyTargetNode(g),[d,g,_].filter(y=>!!y.text)}else return this.setApplyTargetNode(t),t}setApplyTargetNode(e){this.applyTargetNode=e}}class rg extends Fr{constructor(e){super(),this.isFlushable=!0,this.bold=e}toAnnotation(){return new $a(this.bold)}}class M_ extends hs{constructor(){super(...arguments),this.type=Je.CLEAR_FORMATTING,this.items=[ce.BOLD,ce.ITALIC,ce.UNDERLINE,ce.STRIKETHROUGH,ce.TEXT_COLOR,ce.CODE,nt.CUSTOM_STYLE]}}class P_ extends Fr{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new M_}}class F_ extends Fr{constructor(e){super(),this.isFlushable=!0,this.code=e}toAnnotation(){return new Yi(this.code)}}class H_ extends Yt{constructor(e){super(),this.isFlushable=!0,this.annotationType=e}toAnnotation(){}}class j_ extends Fr{constructor(e){super(),this.isFlushable=!0,this.italic=e}toAnnotation(){return new ja(this.italic)}}class ng extends Fr{constructor({link:e,newText:t,needMergeNode:n,doSplit:i,type:s}){super(),this.isFlushable=!0,this.link=e,this.needMergeNode=n,this.newText=t,this.type=s,Te(i)&&(this.doSplit=i)}toAnnotation(){return new no(this.link)}}class $_ extends Fr{constructor(e){super(),this.isFlushable=!0,this.strikethrough=e}toAnnotation(){return new Fa(this.strikethrough)}}class V_ extends Fr{constructor(e){super(),this.isFlushable=!0,this.underline=e}toAnnotation(){return new Ha(this.underline)}}class kn extends ne{handleAction(e,t){const n=e.toAnnotation();if(e instanceof H_){t.annotationMap.delete(e.annotationType);return}if(n instanceof M_){n.items.forEach(i=>{t.deleteAnnotationByType(i)});return}if(n instanceof ur||n instanceof ul){e instanceof ng&&(Te(e.newText)&&(t.text=e.newText),t.parent.apply(new tg(e.link.groupKey,[t],e.type))),e instanceof F_&&this.handleAction(new P_,t),e instanceof rg&&this.updateCustomStyleAnnotation(t,["fontWeight"]),e instanceof j_&&this.updateCustomStyleAnnotation(t,["fontStyle"]),(e instanceof V_||e instanceof $_)&&this.updateCustomStyleAnnotation(t,["textDecoration"]),t.annotationMap.set(n.type,n);return}}}class Zx extends ue{constructor(){super(...arguments),this.type=J.DELETE_LINK_GROUP}}class Yx extends ne{handleAction(e,t){t.text=e.newTextContent,!t.text&&t.annotationMap.has("LINK")&&t.apply(new Zx)}}class ig extends ue{constructor(e){super(),this.type=J.UPDATE_TEXT,this.newTextContent="",this.newTextContent=e}}class Jx extends ne{handleAction(e,t){this.replaceSelectedText(e.textToBeInsert,e.currentRange,t)}replaceSelectedText(e,t,n){if(t&&t.startContainer&&t.endContainer){const{startContainer:i,endContainer:s,startOffset:a,endOffset:o}=t;let l=n.text;if(i===s&&a===o&&e)l=n.text.slice(0,a)+e+n.text.slice(a);else{const c=i.parentElement,u=s.parentElement,d=c&&Pe.getEntityByDOM(c),g=u&&Pe.getEntityByDOM(u);let _=0,y=n.text.length;d&&d===n?(_=a,y=i===s?o:y):g&&g===n&&(y=o),l=n.text.slice(0,_)+e+n.text.slice(y)}n.apply(new ig(l))}}}class qs extends hs{constructor(e){super(),this.type=ce.INLINE_HTML,this.htmlTag=e}static from(e){const{htmlTag:t,child:n,customStyle:i,customClass:s,customAttribute:a}=e,o=new qs(t);return o.groupId=e.groupId,o.child=n?qs.from(n)[1]:void 0,o.customAttribute=a?an.from(a)[1]:void 0,o.customClass=s?Un.from(s)[1]:void 0,o.customStyle=i?Wr.from(i)[1]:void 0,[ce.INLINE_HTML,o]}clone(){var e,t,n,i;const s=new qs(this.htmlTag);return s.groupId=this.groupId,s.child=(e=this.child)===null||e===void 0?void 0:e.clone(),s.customAttribute=(t=this.customAttribute)===null||t===void 0?void 0:t.clone(),s.customClass=(n=this.customClass)===null||n===void 0?void 0:n.clone(),s.customStyle=(i=this.customStyle)===null||i===void 0?void 0:i.clone(),s}renderProps(){var e,t,n;return Object.assign(Object.assign({},(e=this.customAttribute)===null||e===void 0?void 0:e.render()),{style:(t=this.customStyle)===null||t===void 0?void 0:t.renderStyle(),class:(n=this.customClass)===null||n===void 0?void 0:n.renderClass().join(" ")})}toJSON(){var e,t,n,i;return{inlineHtml:Vt({htmlTag:this.htmlTag,groupId:this.groupId,child:(e=this.child)===null||e===void 0?void 0:e.toJSON().inlineHtml,customAttribute:(t=this.customAttribute)===null||t===void 0?void 0:t.toJSON().customAttribute,customClass:(n=this.customClass)===null||n===void 0?void 0:n.toJSON().customClass,customStyle:(i=this.customStyle)===null||i===void 0?void 0:i.toJSON().customStyle})}}}class Qx extends ne{handleAction(e,t){const n=t.parent.getAnnotationByType(Je.LINK_GROUP);if(n){const i=t.annotationMap.get("LINK").link.groupKey,s=n.linkGroups.get(i);if(s){const a=s.indexOf(t);a!==-1&&(s.splice(a,1,...Array.isArray(e.splittedTextNodes)?e.splittedTextNodes:[e.splittedTextNodes]),n.linkGroups.set(i,s))}}}}class e4 extends ne{handleAction(e,t){const n=t.parent.getAnnotationByType(Je.LINK_GROUP);if(n){const i=t.annotationMap.get(ce.LINK).link.groupKey,s=n.linkGroups.get(i);if(s){const a=s.indexOf(t);a!==-1&&s.splice(a,1),s.length===0&&n.linkGroups.delete(i),n.linkGroups.size===0&&t.parent.annotationMap.delete(Je.LINK_GROUP)}}t.annotationMap.delete(ce.LINK)}}class za extends ur{constructor(e){super(),this.type=ce.PLAIN_TEXT,this.plainText=!0,this.plainText=e}static from(e){return[ce.PLAIN_TEXT,new za(e)]}clone(){return new za(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class t4 extends Fr{constructor(e){super(),this.isFlushable=!0,this.textColor=e}toAnnotation(){return new Va(this.textColor)}}class ye extends ls{constructor(e,t,n,i){super(e,i),this.dtoName=ye.dtoName,this.type=Pa.TEXT,this.parent=n,this.text=t,this.registerModifyStrategy()}static supportsHtmlTag(e){return["span","code"].includes(e)}static from(e,t,n={autoMatchFormat:!0}){const i=new ye(e.id,e.text,t),{annotations:s}=e;return s&&(i.annotationMap=this.generateTextAnnotationMap(s,n,t,i)),i}static generateTextAnnotationMap(e,t,n,i){return new Map(Object.keys(e).map(s=>(s==="link"&&e.link&&n&&i&&n.apply(new tg(e.link.groupKey,[i],"link")),this.createAnnotationEntity(s,e[s],t))).filter(Te))}static createAnnotationEntity(e,t,n){const i=!!(n&&n.autoMatchFormat);switch(e){case"bold":return $a.from(t);case"italic":return ja.from(t);case"underline":return Ha.from(t);case"strikethrough":return Fa.from(t);case"code":return Yi.from(t,i);case"textColor":return Va.from(t);case"link":return no.from(t,i);case"inlineHtml":return qs.from(t);case"plainText":return za.from(t)}return ls.createAnnotationEntity(e,t)}toJSON(){const e=Array.from(this.annotationMap.values()).filter(t=>t instanceof ur||t instanceof as||t instanceof qs).reduce((t,n)=>Object.assign(Object.assign({},t),n.toJSON()),{});return Object.assign(Object.assign({id:this.id},Object.keys(e).length>0?{annotations:e}:{}),{type:"text",text:this.text})}toHtml(e){const t=this.getAnnotationByType(ce.INLINE_HTML);return t?this.renderWithWrapperStr(t,e):this.renderTextStr(e)}cloneWithText(e){return new ye(Q(),e,this.parent,super.cloneAnnotations())}clone(e){return new ye(this.id,this.text,e,super.cloneAnnotations())}isEmpty(){return this.getAnnotationByType(ce.INLINE_HTML)?!1:!this.text||this.text===Gx||this.text===`
|
|
66
|
+
`}isTextNode(){return!0}getRangeEndOffset(){return!this.isContentEditable()&&this.parent?this.parent.children.indexOf(this)+1:this.text===`
|
|
67
|
+
`?0:this.text.length}getRangeContainer(){const e=this.getElementRef();if(e)return this.isContentEditable()?e.firstChild:e.parentElement}isContentEditable(){return!0}getInlineHtmlTagAtDepth(e){const t=this.getInlineHtmlAnnotationAtDepth(e);return!t||xf.has(t.htmlTag)?null:{htmlTag:t.htmlTag,attrStr:this.annotationAttrStr(t),groupId:t.groupId,annotation:t}}renderHtmlFromDepth(e,t){if(e===0)return this.toHtml(t);const n=this.getInlineHtmlAnnotationAtDepth(e);return n?this.renderWithWrapperStr(n,t):this.renderTextStr(t)}getInlineHtmlAnnotationAtDepth(e){let t=this.getAnnotationByType(ce.INLINE_HTML);for(let n=0;n<e&&t;n++)t=t.child;return t}registerModifyStrategy(){const e=this.constructor.name;ye.registerActionStrategyStatus[e]||(this.isContentEditable()&&(q.register(J.UPDATE_TEXT,e,new Yx),q.register(J.REPLACE_SELECTED_TEXT,e,new Jx),q.register(J.LINK_GROUP_NODE_SPLIT,e,new Qx),q.register(ng.name,e,new kn)),q.register(Fr.name,e,new Xx),q.register(J.DELETE_LINK_GROUP,e,new e4),q.register(rg.name,e,new kn),q.register(P_.name,e,new kn),q.register(j_.name,e,new kn),q.register(V_.name,e,new kn),q.register(t4.name,e,new kn),q.register($_.name,e,new kn),q.register(F_.name,e,new kn),q.register(Yt.name,e,new kn),ye.registerActionStrategyStatus[e]=!0)}doAnnotationActionApply(e){const t=this.getAnnotationByType(Je.SELECTION_RANGE);if(e instanceof Fr&&e.doSplit&&t){const n=q.get(Fr.name,this.constructor.name);if(n){const i=n.execute(e,this);i&&this.applyActionToNode(i,e)}}else this.applyActionToNode(this,e);typeof this.parent.mergeNodes=="function"&&this.parent.mergeNodes(e)}doModifyActionApply(e){q.executeTheStrategy(e,this)}applyActionToNode(e,t){const n=t.toAnnotation();if(t instanceof zd){this.syncUpSelectedNodes(e);return}n instanceof ul||this.syncUpSelectedNodes(e);const i=q.get(t.constructor.name,e.constructor.name);if(i){i.execute(t,e);return}const s=q.get(Yt.name,ye.name);if(s){s.execute(t,e);return}}syncUpSelectedNodes(e){const t=this.getElementRef();if(t){const n=Zt.getSubjectFromParentNodeByEventId(t,qp);n&&Ke.notify(n,{node:e})}}renderWithWrapperStr(e,t){const{htmlTag:n,child:i}=e,s=this.annotationAttrStr(e);return i?`<${n}${s}>${this.renderWithWrapperStr(i,t)}</${n}>`:xf.has(n)?`<${n}${s}>`:this.text?`<${n}${s}>${this.renderTextStr(t)}</${n}>`:`<${n}${s}></${n}>`}annotationAttrStr(e){const{customAttribute:t,customClass:n,customStyle:i}=e,s=[...(t==null?void 0:t.toString())||[],n==null?void 0:n.toString(),i==null?void 0:i.toString()].filter(Te);return s.length>0?` ${s.join(" ")}`:""}renderTextStr(e){var t;const n=!((t=this.getAnnotationByType(ce.CODE))===null||t===void 0)&&t.code?"code":"span",i=super.generateAttributeString(e);return this.text===`
|
|
68
|
+
`?"<br>":this.shouldRenderAsPlainText()?this.text:`<${n}${i}>${this.text}</${n}>`}shouldRenderAsPlainText(){const e=super.getAnnotationByType(ce.PLAIN_TEXT);return e?e.plainText&&Array.from(this.annotationMap.values()).filter(t=>t instanceof ur&&!(t instanceof no)&&!(t instanceof za)||t instanceof as).length===0:!1}}ye.registerActionStrategyStatus={};ye.htmlTag="span";ye.dtoName="RTETextNode";class Re extends ue{constructor(e){super(),this.type=J.APPEND_CHILDREN,this.entityToBeAppended=e}}const Tf={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",minHeight:"22px",fontWeight:"500"},Di=Object.assign(Object.assign({},Tf),{marginTop:"0px",marginBottom:"0px"}),r4={paragraph:Di,title:Object.assign(Object.assign({},Tf),{fontSize:"36px",lineHeight:"40px",minHeight:"40px"}),subtitle:Object.assign(Object.assign({},Tf),{fontSize:"28px",lineHeight:"32px",minHeight:"32px"}),"heading-1":Object.assign(Object.assign({},Di),{fontSize:"22px",lineHeight:"24px",minHeight:"24px"}),"heading-2":Object.assign(Object.assign({},Di),{fontSize:"20px",lineHeight:"24px",minHeight:"24px"}),"heading-3":Object.assign(Object.assign({},Di),{fontSize:"18px"}),"heading-4":Object.assign({},Di),"heading-5":Object.assign(Object.assign({},Di),{fontSize:"14px"}),"heading-6":Object.assign(Object.assign({},Di),{fontSize:"12px"})};class Er extends dr{constructor(e){super(),this.type=Tr.TEXT_STYLE,this.textStyle=e}static from(e){return[Tr.TEXT_STYLE,new Er(e)]}static getDefaultStyles(e){return e?r4[e]:null}toJSON(){return{textStyle:this.textStyle}}clone(){return new Er(this.textStyle)}renderClass(e){return e!=null&&e.standalone?null:this.textStyle?`v-rte--text-style-${this.textStyle}`:null}renderStyle(e){return e!=null&&e.standalone&&this.textStyle?Er.getDefaultStyles(this.textStyle):null}}class z_ extends Yt{constructor(e,t){super(),this.isFlushable=!0,this.textStyle=e,this.bold=t}toAnnotation(){return new Er(this.textStyle)}}class U_ extends ne{handleAction(e,t){t.type!=="list-item"&&(t.type=e.textStyle),e.bold?t.children.forEach(n=>{const i=new rg(!0);i.doSplit=!1,n.apply(i)}):t.children.forEach(n=>{n.apply(new H_(ce.BOLD))}),this.updateCustomStyleAnnotation(t,["fontFamily","lineHeight","fontWeight","fontSize"])}}class n4 extends ne{handleAction(e,t){let n=t.getAnnotationByType(Je.LINK_GROUP);if(e.type==="update_link"){if(n){const i=n.linkGroups.get(e.groupKey);i&&n.linkGroups.set(e.groupKey,[i[0]])}}else{if(n){const i=n.linkGroups.get(e.groupKey)||[];n.linkGroups.set(e.groupKey,[...i,...e.nodes])}else n=e.toAnnotation(),n.linkGroups.set(e.groupKey,[...e.nodes]);t.annotationMap.set(Je.LINK_GROUP,n)}}}class we extends ue{constructor(e,...t){super(),this.type=J.INSERT_CHILDREN_AFTER,this.referChildren=e,this.childrenToBeInserted=t}}class Ud extends ue{constructor(e){super(),this.type=J.REPLACE_CHILD_NODES,this.newChildNodes=e}}class W_ extends ne{handleAction(e,t){e.newBlock=this.splitTextNodeBlock(e.splitPointNode,e.startOffsetOfNode,t)}splitTextNodeBlock(e,t,n){if(e){const i=e.text.slice(0,t),s=e.text.slice(t),a=n.children.indexOf(e);if(a>-1){const o=n.children.slice(0,a),l=n.children.slice(a+1);i&&o.push(e.cloneWithText(i)),s&&l.unshift(e.cloneWithText(s)),n.apply(new Ud(o));const c=n.cloneWithNodes(l);return n.parent.apply(new we(n,c)),c}}}}class sg extends ne{handleAction(e,t){t.children=[],t.apply(new Re(e.newChildNodes))}}class _e extends ue{constructor(e){super(),this.type=J.DELETE_CHILDREN,this.entityToBeRemoved=e}}class og extends ne{handleAction(e,t){const n=e.blockNeedToBeMerged;if(t.type===n.type||t.type!=="image"&&n.type!=="image"){let i=n.children;n.type!=="image"&&(i=n.children.filter(s=>s.text)),t.apply(new Re(i)),n.parent.apply(new _e(n))}}}class G_ extends ne{handleAction(e,t){e.lineBreakNode=this.lineBreakSingleBlock(e.startContainerNode,e.startOffset,t)}lineBreakSingleBlock(e,t,n){if(e){const i=new ye(Q(),`
|
|
69
|
+
`,n),s=e.text.slice(0,t),a=e.text.slice(t),o=n.children.indexOf(e);if(o>-1){const l=n.children.slice(0,o),c=n.children.slice(o+1);s&&l.push(e.cloneWithText(s)),a&&c.unshift(e.cloneWithText(a)),this.mergeLineBreakNodes(l,i,c,n)}return i}}mergeLineBreakNodes(e,t,n,i){(n.length===0||n[0]&&n[0].text==="")&&n.push(new ye(Q(),`
|
|
70
|
+
`,i,e[e.length-1]&&e[e.length-1].annotationMap)),i.apply(new Ud([...e,t,...n]))}}class K_ extends ne{handleAction(e,t){e.lineBreakNode=this.lineBreakMultipleBlocks(e.selectedBlocks,t)}lineBreakMultipleBlocks(e,t){const n=t.children,i=new ye(Q(),`
|
|
71
|
+
`,t),s=this.concatBlocksNodes(e.slice(1));return this.mergeLineBreakNodes(n,i,s,t),i}concatBlocksNodes(e){const t=[];return e.map(n=>{n.type!=="image"&&(t.push(...n.children),n.parent.apply(new _e(n)))}),t}mergeLineBreakNodes(e,t,n,i){(n.length===0||n[0]&&n[0].text==="")&&n.push(new ye(Q(),`
|
|
72
|
+
`,i,e[e.length-1]&&e[e.length-1].annotationMap)),i.apply(new Ud([...e,t,...n]))}}class Ve extends ue{constructor(e,...t){super(),this.type=J.INSERT_CHILDREN_BEFORE,this.referChildren=e,this.childrenToBeInserted=t}}class vo extends ue{constructor(e,t){super(),this.type=J.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=e,this.startOffsetOfNode=t}}class i4 extends ne{handleAction(e,t){const n=e.splitPointNode,i=e.startOffsetOfNode,s=e.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(t,n,i))t.parent.apply(new we(t,s));else if(this.isCaretPositionAtBlockStart(t,n,i))t.parent.apply(new Ve(t,s));else{const a=new vo(n,i);t.apply(a),t.parent.apply(new we(t,s))}}}class s4 extends ne{handleAction(e,t){const n=t.parent,i=n.createList(e.listType),s=e.selectedBlocks,a=s.map(o=>n.toListItem(o));i.apply(new Re(a)),n.apply(new we(e.selectedBlocks[0],i)),s.forEach(o=>{o.parent.apply(new _e(o))})}}class ag extends Yt{constructor(e){super(),this.isFlushable=!0,this.textAlign=e}toAnnotation(){return new Zi(this.textAlign)}}class lg extends ne{handleAction(e,t){this.updateCustomStyleAnnotation(t,["textAlign"])}}class o4 extends ne{handleAction(e,t){this.updateCustomStyleAnnotation(t,["marginLeft"])}}class a4 extends Yt{constructor(e){super(),this.isFlushable=!0,this.indent=e}toAnnotation(){return new Ia(this.indent)}}class l4 extends ne{handleAction(e,t){const n=t.getAnnotationByType(Je.LINK_GROUP);n&&(n.linkGroups.size>1?n.linkGroups.delete(e.groupKey):t.annotationMap.delete(Je.LINK_GROUP))}}class te extends it{constructor(e,t,n){super(e),this.dtoName=te.dtoName,this.children=[],this.type=t;const{autoMatchFormat:i}=n||{autoMatchFormat:!0};i&&(te.isAcceptableTextStyle(t)?this.annotationMap=new Map([Er.from(t)]):this.annotationMap=new Map([Er.from("paragraph")]))}static from(e,t={autoMatchFormat:!0}){var n,i;const s=new te(e.id,e.type,t),a=t.autoMatchFormat?Object.assign(Object.assign({},e.annotations),{textStyle:(i=(n=e.annotations)===null||n===void 0?void 0:n.textStyle)!==null&&i!==void 0?i:s.type}):e.annotations;return s.children=e.nodes.map(o=>{const l=qe.getRTENodeClass(o.type);if(l)return l.from(o,s,t)}).filter(Te),a&&super.convertAnnotationsToMap(s.annotationMap,a),s}static createAnnotationEntity(e,t){return e==="textStyle"?Er.from(t):super.createAnnotationEntity(e,t)}static isAcceptableTextStyle(e){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(e)}mergeNodes(e){this.children=this.children.reduce((t,n)=>{const i=t.at(-1);if(e instanceof ng&&e.needMergeNode){const s=i==null?void 0:i.getAnnotationByType(ce.LINK),a=n.getAnnotationByType(ce.LINK);if(s&&a&&s.toEqual(a))return t}return[...t,n]},[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map(e=>e.toJSON())})}toHtml(e){const t=this.getBlockTag(),n=super.generateAttributeString(e),i=this.getChildrenHtml(e);return super.shouldRenderAsInternalWrapper()?i:[`<${t}${n}>`,i,`</${t}>`].join("")}cloneWithNodes(e){const t=new te(Q(),this.type);return t.annotationMap=super.cloneAnnotations(),t.apply(new Re(e)),t}clone(e){const t=new te(this.id,this.type);return t.children=this.children.map(n=>n.clone(t)),t.annotationMap=super.cloneAnnotations(),t.parent=e,t}isNotEmpty(){return this.children.length>0&&this.children.some(e=>!e.isEmpty())}getLastNode(){return this.children[this.children.length-1]}getBlockTag(){switch(this.type){case"title":case"subtitle":return"div";case"heading-1":return"h1";case"heading-2":return"h2";case"heading-3":return"h3";case"heading-4":return"h4";case"heading-5":return"h5";case"heading-6":return"h6";case"paragraph":default:return"p"}}getChildrenHtml(e){const t=this.getAnnotationByType(Je.LINK_GROUP);let n=this.renderGroupedNodesAtDepth(this.children,0,e);return t&&this.children.length>0&&(n=this.generateLinkHtml(t,n,e)),n}doAnnotationActionApply(e){const t=q.get(e.constructor.name,te.name);t&&t.execute(e,this)}renderGroupedNodesAtDepth(e,t,n){var i;let s="",a=0;for(;a<e.length;){const o=e[a].getInlineHtmlTagAtDepth(t);if(!(o!=null&&o.groupId)){s+=e[a].renderHtmlFromDepth(t,n),a++;continue}let l=a+1;for(;l<e.length&&((i=e[l].getInlineHtmlTagAtDepth(t))===null||i===void 0?void 0:i.groupId)===o.groupId;)l++;if(l===a+1)s+=e[a].renderHtmlFromDepth(t,n);else{const c=this.renderGroupedNodesAtDepth(e.slice(a,l),t+1,n);s+=`<${o.htmlTag}${o.attrStr}>${c}</${o.htmlTag}>`}a=l}return s}generateLinkHtml(e,t,n){t="";let i=[];for(let s=0;s<this.children.length;s++){const a=this.children[s].getAnnotationByType(ce.LINK),o=this.children[s+1]?this.children[s+1].getAnnotationByType(ce.LINK):null;if(a){if(i.push(this.children[s]),!o||a.link.groupKey!==o.link.groupKey){const l=e.toString(a,{standalone:!0,filterInlineStyles:n==null?void 0:n.filterInlineStyles});t+=[`<a${l?` ${l}`:""}>`,this.renderGroupedNodesAtDepth(i,0,n),"</a>"].join(""),i=[]}}else t+=this.children[s].toHtml(n)}return t}}q.register(z_.name,te.name,new U_),q.register(ag.name,te.name,new lg),q.register(a4.name,te.name,new o4),q.register(tg.name,te.name,new n4),q.register(J.UNLINK_LINK_GROUP,te.name,new l4),q.register(J.SPLIT_BLOCK_WITH_NODE,te.name,new W_),q.register(J.REPLACE_CHILD_NODES,te.name,new sg),q.register(J.MERGE_TWO_BLOCKS_NODES,te.name,new og),q.register(J.LINE_BREAK_SINGLE_BLOCK,te.name,new G_),q.register(J.LINE_BREAK_MULTIPLE_BLOCKS,te.name,new K_),q.register(J.INSERT_IMAGE_TO_BLOCK,te.name,new i4),q.register(J.TRANSFORM_LIST_BLOCK,te.name,new s4);te.dtoName="RTETextBlock";class q_ extends ne{getPreviousNode(e){const t=e.parent,n=t.children.indexOf(e);if(n>0)return t.children[n-1];if(t.parent){const i=this.getPreviousBlock(t);if(i)return this.getBlockLastNode(i)}}getNextNode(e){const t=e.parent,n=t.children.indexOf(e);if(t.children[n+1])return t.children[n+1];if(t.parent){const i=this.getNextBlock(t);if(i)return this.getBlockFirstNode(i)}}isContentFirstNode(e){const t=e.parent,n=t.children.indexOf(e),i=t.parent;if(t.isListItemBlock()){const s=i.parent;return n===0&&Array.isArray(i.children)&&i.children[0]===t&&s.type!=="list-item"&&Array.isArray(s.children)&&s.children[0]===i}else return n===0&&Array.isArray(i.children)&&i.children[0]===t}getPreviousBlock(e){if(e&&e.parent&&e.parent.children){const t=e.parent.children.indexOf(e);if(t>0)return e.parent.children[t-1];if(this.isRTEBlock(e.parent)&&t===0)return this.getPreviousBlock(e.parent)}}getBlockLastNode(e){return e.getLastNode()}getBlockFirstNode(e){if(e.type==="number-list"||e.type==="bullet-list"){if(e.children){const t=e.children[0];return this.getBlockFirstNode(t)}}else if(e.children)return e.children[0]}getNextBlock(e){if(e&&e.parent&&e.parent.children){const t=e.parent.children.indexOf(e);if(e.parent.children[t+1])return e.parent.children[t+1];if(e.type==="list-item"&&e.parent.children.length===t+1)return this.getNextBlock(e.parent)}}isRTEBlock(e){return e&&e.dtoName!=="VegaRTEContent"}}class c4 extends q_{handleAction(e,t){const n=t.children[0],i=t.parent;if(i){let s=this.getPreviousNode(n),a=this.getRTENodeEndOffset(s);s||(s=this.getNextNode(n),a=0),i.apply(new _e(t));const o=s?Pe.getDOMByEntity(s):null;if(i.children.length===0){const l=te.from({id:Q(),type:"paragraph",nodes:[{id:Q(),type:"text",text:""}]});t.parent.apply(new Re([l])),s=l.children[0],a=0}this.notifyUpdateSelection(s,o,a,t)}}notifyUpdateSelection(e,t,n,i){const s=Pe.getDOMByEntity(i);if(s){const a=Zt.getSubjectFromParentNodeByEventId(s,qp);a&&Ke.notify(a,{node:e,updateDirectly:!!t,offset:n})}}getRTENodeEndOffset(e){return e?e.getRangeEndOffset():0}}class d4 extends ue{constructor(e,t){super(),this.isFlushable=!0,this.type=J.UPDATE_CODE_BLOCK,this.content=e,this.language=t}}class u4 extends ne{handleAction(e,t){const{content:n,language:i}=e,s=n.split(`
|
|
73
|
+
`),a=new d4(s.slice(0,s.length-2).join(`
|
|
74
|
+
`),i);a.isFlushable=!1,t.children[0].apply(a);const o=te.from({id:Q(),type:"paragraph",nodes:[{id:Q(),text:"",type:"text"}]});t.parent.apply(new we(t,o));const l=Pe.getDOMByEntity(t);if(l){const c=Zt.getSubjectFromParentNodeByEventId(l,qp);c&&Ke.notify(c,{node:o.children[0]})}}}class h4 extends ne{handleAction(e,t){const{content:n,language:i}=e;t.language=i,t.text=n}}class f4 extends Yt{constructor(e){super(),this.isFlushable=!1,this.range=e}toAnnotation(){return new ul(this.range)}}class p4 extends ne{handleAction(e,t){t.annotationMap.set(Je.SELECTION_RANGE,e.toAnnotation())}}class nn extends ls{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(e){return e&&e.classList.contains(nn.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(e){return e.querySelector(`.${nn.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const e=this.getElementRef();if(e)return ed(e,`.${nn.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}nn.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container";nn.DECORATOR_NODE_CLASS="v-internal-decorator-node";class hl extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=hl.STYLES,this.elementTagName="pre code"}canFilter(e){return ft.isCodeBlockNode(e)}canRefill(e,t){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}hl.STYLES={boxSizing:"border-box",color:"rgba(var(--v-text-primary, 32, 54, 69, 1))",textAlign:"left",fontFamily:'"Roboto Mono"',fontWeight:"400",lineHeight:"22px",fontSize:"16px",whiteSpace:"pre-wrap",minHeight:"22px",tabSize:"2px"};class Ei extends nn{constructor(e,t,n,i){super(e),this.dtoName=Ei.dtoName,this.type=Pa.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=t,this.parent=i,this.language=n,this.annotationMap.set(nt.CUSTOM_STYLE,new Wr(hl.STYLES))}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}toHtml(e){return`<code${this.generateAttributeString(e)}>${this.text}</code>`}clone(e){return new Ei(this.id,this.text,this.language,e)}doAnnotationActionApply(e){q.executeTheStrategy(e,this)}doModifyActionApply(e){q.executeTheStrategy(e,this)}}q.register(J.UPDATE_CODE_BLOCK,Ei.name,new h4),q.register(f4.name,Ei.name,new p4);Ei.dtoName="RTECodeBlockNode";class g4 extends ne{handleAction(e,t){const n=e.imageBlockToBeInserted;t.parent.apply(new we(t,n))}}var kf;(function(r){r.CSS="css",r.HTML="html",r.JavaScript="js",r.JSX="jsx",r["Plain Text"]="plainText",r.TypeScript="ts",r.TSX="tsx"})(kf||(kf={}));class Wd extends ne{handleAction(e,t){const n=t.children;t.children=n.filter(i=>i!==e.entityToBeRemoved),t.children.length===0&&"parent"in t&&t.parent&&(t.isListItemBlock()?(!t.nestList||!t.nestList.length)&&t.parent.apply(new _e(t)):t.parent.apply(new _e(t)))}}class fl extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=fl.STYLES,this.elementTagName="pre"}canFilter(e){return ft.isCodeBlock(e.dtoName)}canRefill(e,t){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}fl.STYLES={backgroundColor:"rgba(var(--v-bg-secondary, 245, 247, 247, 1))",padding:"12px"};class $t extends it{constructor(e,t,n){super(e),this.dtoName=$t.dtoName,this.type="code-block",this.annotationMap=new Map([Wr.from(fl.STYLES)]),this.children=[new Ei(`${e}-1`,t,n,this)]}static from(e){return new $t(e.id,e.content,e.language)}toJSON(){const{language:e,text:t}=this.children[0];return{id:this.id,type:"code-block",content:t,language:e}}toHtml(e){const{language:t=kf["Plain Text"]}=this.children[0],n=super.generateAttributeString(e);return`<pre data-language="${t}"${n}>${this.children.map(i=>i.toHtml(e))}</pre>`}clone(e){const t=$t.from(this.toJSON());return t.parent=e,t}apply(e){if(e instanceof ue&&q.executeTheStrategy(e,this),e.isFlushable){const t=Pe.getDOMByEntity(this);if(t){const n=Zt.getSubjectFromParentNodeByEventId(t,$d);n&&Ke.notify(n,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(Je.SELECTION_RANGE)}}q.register(J.DELETE_CODE_BLOCK,$t.name,new c4),q.register(J.DELETE_CHILDREN,$t.name,new Wd),q.register(J.SWITCH_OUT_FROM_CODE_BLOCK,$t.name,new u4),q.register(J.INSERT_IMAGE_TO_BLOCK,$t.name,new g4);$t.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";$t.dtoName="RTECodeBlock";class m4 extends ne{handleAction(e,t){t.nestList&&(t.nestList.length>1?t.nestList=t.nestList.filter(n=>n!==e.nestListBlockToBeRemoved):t.nestList=void 0)}}class v4 extends ne{handleAction(e,t){e.newList.forEach(n=>{n.parent=t}),t.nestList=e.newList}}class _4 extends ne{handleAction(e,t){t.parent.apply(e)}}class de extends te{constructor(e,t,n){super(e,"list-item",n),this.dtoName=de.dtoName,this.nestList=[],this.nestList=t}static from(e,t={autoMatchFormat:!0}){const n=new de(e.id,void 0,t);n.children=e.nodes.map(s=>ye.from(s,n,t)),e.children&&(n.nestList=e.children.map(s=>{const a=st.from(s);return a.parent=n,a}));const{annotations:i}=e;return i&&Object.entries(i).forEach(([s,a])=>{const o=this.createAnnotationEntity(s,a);Te(o)&&n.annotationMap.set(...o)}),n}toJSON(){var e;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:(e=this.nestList)===null||e===void 0?void 0:e.map(t=>t.toJSON())})}toHtml(e){return[`<li${super.generateAttributeString(e)}>`,this.getChildrenHtml(e),"</li>"].join("")}cloneWithNodes(e){const t=new de(Q());return t.children=[],t.apply(new Re(e)),t}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new de(Q())}clone(e){var t;const n=new de(this.id);return n.children=this.children.map(i=>i.clone(n)),n.annotationMap=super.cloneAnnotations(),n.nestList=(t=this.nestList)===null||t===void 0?void 0:t.map(i=>i.clone(n)),n.parent=e,n}}q.register(z_.name,de.name,new U_),q.register(ag.name,de.name,new lg),q.register(J.LINE_BREAK_SINGLE_BLOCK,de.name,new G_),q.register(J.LINE_BREAK_MULTIPLE_BLOCKS,de.name,new K_),q.register(J.DELETE_NEST_LIST,de.name,new m4),q.register(J.SPLIT_BLOCK_WITH_NODE,de.name,new W_),q.register(J.REPLACE_CHILD_NODES,de.name,new sg),q.register(J.REPLACE_NEST_LIST,de.name,new v4),q.register(J.MERGE_TWO_BLOCKS_NODES,de.name,new og),q.register(J.INSERT_IMAGE_TO_BLOCK,de.name,new _4);de.dtoName="RTEListItemBlock";class y4 extends ne{handleAction(e,t){const n=e.selectedBlocks,i=t.parent.createList(e.listType);if(n.every(a=>a.parent===t))i.apply(new Re(t.children)),t.parent.apply(new we(t,i)),t.parent.apply(new _e(t)),n.forEach(a=>a.children.map(o=>o.apply(new zd)));else{const a=e.selectedBlocks.map(o=>t.parent.toListItem(o));i.apply(new Re(a)),t.parent.apply(new we(t,i)),e.selectedBlocks.forEach(o=>{o.parent.apply(new _e(o))}),t.children.length===0&&t.parent.apply(new _e(t))}}}class b4 extends ne{handleAction(e,t){let n=!1,i=!1;const s=e.selectedBlocks,a=s.map(o=>(o.children.map(l=>l.apply(new zd)),o===t.children[0]&&(n=!0),o===t.children[t.children.length-1]&&(i=!0),this.toParagraph(o)));if(n)t.parent.apply(new Ve(t,...a));else if(i)t.parent.apply(new we(t,...a));else{const o=t.children.indexOf(s[0]),l=t.children.indexOf(s[s.length-1]),c=t.parent.createList(t.type);c.apply(new Re(t.children.slice(0,o)));const u=t.parent.createList(t.type);u.apply(new Re(t.children.slice(l+1))),t.parent.apply(new Ve(t,c,...a,u)),t.parent.apply(new _e(t))}s.map(o=>{t.apply(new _e(o))}),t.children.length===0&&t.parent.apply(new _e(t))}toParagraph(e){const t=new te(Q(),"paragraph");return t.apply(new Re(e.children)),t.annotationMap=e.annotationMap,t}}class w4 extends ne{handleAction(e,t){const n=e.imageBlockToBeInserted;t.parent.type!=="list-item"?t.parent.apply(new we(t,n)):t.parent.apply(e)}}class Ua extends dr{constructor(){super(...arguments),this.type=Tr.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}renderStyle(e){return e!=null&&e.standalone?Ua.getDefaultStyles():null}renderClass(e){return e!=null&&e.standalone?null:"v-rte--list"}clone(){return new Ua}toJSON(){}}class st extends it{constructor(e,t,n){super(e),this.dtoName=st.dtoName,this.type="bullet-list",this.children=[],this.type=t;const{autoMatchFormat:i}=n||{autoMatchFormat:!0};i&&this.annotationMap.set(Tr.LIST,new Ua)}static from(e,t={autoMatchFormat:!0}){const n=new st(e.id,e.type,t),{annotations:i}=e;return i&&Object.entries(i).forEach(([s,a])=>{const o=this.createAnnotationEntity(s,a);Te(o)&&n.annotationMap.set(...o)}),n.children=e.blocks.map(s=>{const a=de.from(s,t);return a.parent=n,a}),n}static createAnnotationEntity(e,t){switch(e){case"customAttribute":return an.from(t);case"customClass":return Un.from(t);case"customStyle":return Wr.from(t)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map(e=>e.toJSON())})}toHtml(e){const t=this.getBlockTag(),n=super.generateAttributeString(e);return[`<${t}${n}>`,this.children.map(i=>i.toHtml(e)).join(""),`</${t}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(e){const t=new st(this.id,this.type);return t.children=this.children.map(n=>n.clone(t)),t.annotationMap=super.cloneAnnotations(),t.parent=e,t}getBlockTag(){return this.type==="number-list"?"ol":"ul"}}q.register(J.TRANSFORM_LIST_BLOCK,st.name,new y4),q.register(J.TRANSFORM_PARAGRAPH_BLOCK,st.name,new b4),q.register(J.INSERT_IMAGE_TO_BLOCK,st.name,new w4);st.dtoName="RTEListBlock";class S4 extends ne{handleAction(e,t){const n=e.selectedBlocks,i=new $t(Q(),this.getCodeContent(n),"plainText");t.apply(new Ve(n[0],i)),e.newCodeBlock=i,this.removeSelectBlocks(n,t)}getCodeContent(e){return e.filter(n=>n.type!=="image"&&n.type!=="list-item").map(n=>n.children.map(i=>i.text).join("")).join(`
|
|
75
|
+
`)}removeSelectBlocks(e,t){for(let n=0;n<e.length;n++)t.apply(new _e(e[n]))}}class fs{}class C4{constructor(e,t){this.childrenOutput=[],this.currentStrategy=e,this.currentElements=t}setChildrenOutput(e){this.childrenOutput=e}toDto(e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const t=this.currentStrategy.handle(this.currentElements,e);return this.childrenOutput.length>0&&t&&this.currentStrategy.appendChildBlocks(t,this.childrenOutput.map(n=>n.toDto(e)).filter(Te)),t}}class E4{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(e){this.hasDuplicateStrategy(e,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(e)}registerElementToNodeStrategy(e){this.hasDuplicateStrategy(e,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(e)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(e,t){return t.includes(e)}}const _t=new E4;class x4{process(e,t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),i=[];for(let s=0;s<e.length;s++){if(this.isInvalidElement(e[s],t))continue;let a=0;for(const o of n)if(a=o.canHandle(e,s,t),a>0){const l=e.slice(s,s+a),c=new C4(o,l);a===1&&o.shouldProceedToElementChildren()&&c.setChildrenOutput(this.process(Array.from(l[0].childNodes),t)),i.push(c),s+=a-1;break}if(a===0&&s<e.length){const o=Array.from(e[s].childNodes),l=this.process(Array.from(o),t);l.length>0&&i.push(...l)}}return i}isInvalidElement(e,t){return e.nodeType===Node.COMMENT_NODE?!0:t.autoMatchFormat===!1?!1:["META","STYLE"].includes(e.nodeName)}getElementToBlockStrategies(){return _t.getElementToBlockStrategies()}}const T4=new x4;class k4 extends ne{handleAction(e,t){const{offset:n,nextFocusNode:i,immediatelyRun:s}=e,a=Pe.getDOMByEntity(t);a&&Ke.notify(Zt.getSubject(a,zE),{node:i,offset:n,updateDirectly:s})}}class X_ extends ne{handleAction(e,t){const n=e.entityToBeAppended;if(t.children){n.forEach(s=>{s.parent=t});const i=t.children;t.children=i.concat(n)}}}class Gd extends ne{handleAction(e,t){this.replaceElementWithElements(t,e.referChildren,[...e.childrenToBeInserted,e.referChildren])}replaceElementWithElements(e,t,n){if(e.children){n.forEach(s=>{s.parent=e});const i=e.children;e.children=i.flatMap(s=>s===t?n:s)}}}class Z_ extends Gd{handleAction(e,t){this.replaceElementWithElements(t,e.referChildren,[e.referChildren,...e.childrenToBeInserted])}}class bi extends ur{constructor(e,t){super(),this.type=ce.IMAGE,this.size=e,this.alt=t}static from(e,t){return[ce.IMAGE,new bi(e,t)]}static getDefaultStyles(){return{verticalAlign:"bottom"}}toJSON(){return Te(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new bi(this.size,this.alt)}renderClass(e){return e!=null&&e.standalone?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(e){if(!(e!=null&&e.standalone))return null;const t=bi.getDefaultStyles();switch(this.size){case"sm":return Object.assign(Object.assign({},t),{width:"25%"});case"md":return Object.assign(Object.assign({},t),{width:"50%"});case"lg":return Object.assign(Object.assign({},t),{width:"100%"})}}}bi.BASE_STYLES={verticalAlign:"bottom"};class L4 extends ne{handleAction(e,t){const n=e.toAnnotation();t.annotationMap.set(n.type,n)}}class A4 extends ne{handleAction(e,t){t.url=e.url}}var R4=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t};class wr extends nn{constructor(e,t,n,i){super(e,i),this.dtoName=wr.dtoName,this.type=Pa.IMAGE,this.url=t,this.parent=n}static from(e,t,n={autoMatchFormat:!0}){const i=new wr(e.id,e.url,t),s=!!n.autoMatchFormat,a=Object.assign({},e.annotations),{size:o}=a,l=R4(a,["size"]),c=Object.assign(Object.assign({},l),{size:o??(s?"md":void 0)});return i.annotationMap=new Map(Object.keys(c).map(u=>u==="size"||u==="alt"?bi.from(c.size,c.alt):this.createAnnotationEntity(u,c[u])).filter(Te)),i}toJSON(){const e=Array.from(this.annotationMap.values()).filter(t=>t instanceof bi||t instanceof as).reduce((t,n)=>Object.assign(Object.assign({},t),n.toJSON()),{});return e.alt==""&&delete e.alt,Object.assign(Object.assign({id:this.id},Object.keys(e).length>0?{annotations:e}:{}),{type:"image",url:this.url})}clone(e){return new wr(this.id,this.url,e,super.cloneAnnotations())}toHtml(e){const t=this.getAnnotationByType(ce.IMAGE);return`<img${super.generateAttributeString(e,...[t&&t.alt?`alt="${t.alt}"`:null,`src="${this.url}"`,t&&t.size?`data-size="${t.size}"`:null].filter(Te))}>`}doAnnotationActionApply(e){const t=q.get(Yt.name,wr.name);t&&t.execute(e,this)}doModifyActionApply(e){q.executeTheStrategy(e,this)}}q.register(J.UPDATE_IMAGE_NODE_URL,wr.name,new A4),q.register(Yt.name,wr.name,new L4);wr.dtoName="RTEImageNode";class O4 extends ne{handleAction(e,t){e.newBlock=this.splitImageNodes(e.splitPointNode,e.startOffsetOfNode,t)}splitImageNodes(e,t,n){const i=n.children.indexOf(e);if(i>-1){const s=n.children.slice(0,i+t),a=n.children.slice(i+t);n.apply(new Ud(s));const o=this.cloneWithNodes(a,n);return n.parent.apply(new we(n,o)),o}}cloneWithNodes(e,t){const n=t.createNewImageBlock();return n.children=[],n.apply(new Re(e)),n}}class Y_ extends ue{constructor(e,t){super(),this.type=J.INSERT_NEW_PARAGRAPH,this.startContainerNode=e,this.startOffset=t}}class D4 extends ne{handleAction(e,t){const n=new Y_(e.startContainerNode,e.startOffset);t.apply(n);const i=n.newBlock;i&&(e.lineBreakNode=i.children[0])}}class N4 extends ne{handleAction(e,t){e.lineBreakNode=this.lineBreakMultipleBlocks(e.selectedBlocks,t)}lineBreakMultipleBlocks(e,t){const n=te.from({id:Q(),type:"paragraph",nodes:[{id:Q(),type:"text",text:`
|
|
76
|
+
`}]});t.parent.apply(new we(t,n));const i=this.concatBlocksNodes(e.slice(1));return(i.length===0||i[0]&&i[0].text==="")&&i.push(new ye(Q(),`
|
|
77
|
+
`,n)),n.apply(new Re(i)),n.children[0]}concatBlocksNodes(e){const t=[];return e.map(n=>{n.type!=="image"&&(t.push(...n.children),n.parent.apply(new _e(n)))}),t}}class I4 extends ne{handleAction(e,t){const n=e.splitPointNode,i=e.startOffsetOfNode,s=e.imageBlockToBeInserted,a=s.children;t.children.length<1?t.apply(new Re(a)):this.isCaretPositionAtBlockEnd(t,n,i)?t.parent.apply(new we(t,s)):this.isCaretPositionAtBlockStart(t,n,i)?t.parent.apply(new Ve(t,s)):(t.apply(new vo(n,i)),t.parent.apply(new we(t,s)))}}class Ye extends it{constructor(e){super(e),this.dtoName=Ye.dtoName,this.type="image",this.children=[]}static from(e,t={autoMatchFormat:!0}){const n=new Ye(e.id),{annotations:i}=e;return n.children=e.nodes.map(s=>wr.from(s,n,t)),i&&super.convertAnnotationsToMap(n.annotationMap,i),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map(e=>e.toJSON())})}toHtml(e){const t=super.generateAttributeString(e),n=this.children.map(i=>i.toHtml(e)).join("");return super.shouldRenderAsInternalWrapper()?n:[`<div${t}>`,n,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some(e=>e.url.length>0)}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new Ye(Q())}clone(e){const t=new Ye(this.id);return t.children=this.children.map(n=>n.clone(t)),t.annotationMap=super.cloneAnnotations(),t.parent=e,t}}q.register(J.MERGE_TWO_BLOCKS_NODES,Ye.name,new og),q.register(J.REPLACE_CHILD_NODES,Ye.name,new sg),q.register(J.SPLIT_BLOCK_WITH_NODE,Ye.name,new O4),q.register(J.LINE_BREAK_SINGLE_BLOCK,Ye.name,new D4),q.register(J.LINE_BREAK_MULTIPLE_BLOCKS,Ye.name,new N4),q.register(J.INSERT_IMAGE_TO_BLOCK,Ye.name,new I4),q.register(ag.name,Ye.name,new lg);Ye.dtoName="RTEImageBlock";class Pn extends it{constructor(e,t){super(e),this.dtoName=Pn.dtoName,this.type="html-block",this.children=[],this.htmlTag=t}static from(e,t){const n=new Pn(e.id,e.htmlTag),{annotations:i}=e;return i&&super.convertAnnotationsToMap(n.annotationMap,i),n.children=this.generateBlockChildren(e.children,t,n),n}clone(e){const t=new Pn(this.id,this.htmlTag);return t.children=this.children.map(n=>n.clone(t)),t.annotationMap=super.cloneAnnotations(),t.parent=e,t}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return!0}toHtml(e){const t=this.htmlTag,n=super.generateAttributeString(e);return xf.has(this.htmlTag)?`<${t}${n}>`:[`<${t}${n}>`,this.children.map(i=>i.toHtml(e)).join(""),`</${t}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map(e=>e.toJSON())})}}Pn.dtoName="RTEHtmlBlock";class B4 extends ue{constructor(e){super(),this.type=J.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=e}}class M4 extends q_{handleAction(e,t){const{startContainerNode:n}=e;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(e,t):this.deleteDecoratorNodeContent(e,t);const i=t.parent;i&&t.isListItemBlock()&&i.children.length===0&&i.parent.apply(new _e(i))}deleteTextNodeContent(e,t){const n=e.startContainerNode,i=e.startOffset;if(i!==0&&!n.isEmpty()){const s=n.text.slice(0,i-1)+n.text.slice(i);if(n.apply(new ig(s)),s){e.previousNode=n;return}else{const a=this.getPreviousNode(n);if(a&&a.parent===t&&a.text===`
|
|
78
|
+
`||t.children.length===1){e.previousNode=n;return}else{t.apply(new _e(n)),e.previousNode=a;return}}}else{let s=this.getPreviousNode(n),a=null;const o=n.isEmpty();if(t.children.length&&s&&s.parent!==t)o&&t.apply(new _e(n)),t.type===s.parent.type&&s.parent.apply(new B4(t));else if(this.isContentFirstNode(n)&&o&&(a=this.getNextNode(n)),o&&t.apply(new _e(n)),s&&s.isTextNode()&&(s.isEmpty()||!s.isContentEditable()&&s.parent===t)){const l=s;s=this.getPreviousNode(s),l.parent.apply(new _e(l)),!s&&!o&&(a=n)}t.children.length===0&&t.parent.apply(new _e(t)),s?e.previousNode=s:a&&(e.nextNode=a)}}deleteDecoratorNodeContent(e,t){const n=e.startContainerNode,i=e.startOffset;let s=this.getPreviousNode(n),a=null;if(i!==0){const o=t;this.isContentFirstNode(n)&&(a=this.getNextNode(n)),o.children.length===1?o.parent.apply(new _e(o)):o.apply(new _e(n))}else{const o=s;o&&!o.isContentEditable()&&(s=this.getPreviousNode(o),o.parent.apply(new _e(o)),s||(e.nextNode=n))}s?e.previousNode=s:a&&(e.nextNode=a)}}class P4 extends ne{handleAction(e,t){const{startContainerNode:n}=e;e.newBlock=this.breakSingleBlock(n,e.startOffset,t)}breakSingleBlock(e,t,n){const i=this.getNewParagraph(e);if(i){if(this.isCaretPositionAtBlockEnd(n,e,t))n.parent.apply(new we(n,i));else if(this.isCaretPositionAtBlockStart(n,e,t))n.parent.apply(new Ve(n,i));else{const s=new vo(e,t);return n.apply(s),s.newBlock}return i}}getNewParagraph(e){const t=this.createNewParagraph("");if(t){let n=t.children[0];return e.isTextNode()&&e.isContentEditable()&&(t.children=[],n=e.cloneWithText(""),n.annotationMap.delete(ce.LINK),t.apply(new Re([n]))),t}}}class xt extends ue{constructor(e,t,n=!1){super(),this.isFlushable=!0,this.type=J.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=e,this.offset=t,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class F4 extends ne{handleAction(e,t){const{rteRange:n,nodeToBeInserted:i}=e,{startNode:s,startOffset:a}=n;if(s){const o=t;if(s.isContentEditable()&&s.isTextNode())if(s.text===`
|
|
79
|
+
`||!s.text||a===0)o.apply(new Ve(s,i));else{const l=s.text.substring(0,a),c=s.text.substring(a),u=s.cloneWithText(l),d=s.cloneWithText(c),g=[u,i];c&&g.push(d),o.apply(new Ve(s,...g)),o.apply(new _e(s))}else a!==0?o.apply(new we(s,i)):o.apply(new Ve(s,i));this.updateCursorPosition(i)}}updateCursorPosition(e){const t=this.getRootContent(e.parent);t&&t.apply(new xt(e))}}class H4 extends ne{handleAction(e,t){const{text:n,offset:i,decoratorNode:s}=e,a=this.createNewParagraph(n);if(a){const o=a.children[0];i!==0?t.apply(new we(s,o)):t.apply(new Ve(s,o)),this.setTheCursorPosition(o)}}setTheCursorPosition(e){const t=this.getRootContent(e.parent);t&&t.apply(new xt(e))}}class j4 extends ne{handleAction(e,t){e.newBlock=this.breakSingleListItemBlock(e.startContainerNode,e.startOffset,t)}breakSingleListItemBlock(e,t,n){const i=n.createNewListItem(),s=this.copyInlineStyleToNewNode(e);if(i.apply(new Re([s])),this.isCaretPositionAtBlockEnd(n,e,t))return this.breakListItemAtEnd(i,n);if(this.isCaretPositionAtBlockStart(n,e,t))n.parent.apply(new Ve(n,i));else{const a=new vo(e,t);return n.apply(a),a.newBlock}return i}breakListItemAtEnd(e,t){const n=t.parent.children[t.parent.children.length-1],i=t.children.length===1&&t.children[0].isEmpty();if(t===n&&i){const s=t.parent.parent;if(s.type!=="list-item"){const a=te.from({id:Q(),type:"paragraph",nodes:[]});return a.apply(new Re(e.children)),s.apply(new we(t.parent,a)),t.parent.apply(new _e(t)),a}else s.parent.apply(new we(s,e)),t.parent.apply(new _e(t))}else t.parent.apply(new we(t,e));return e}copyInlineStyleToNewNode(e){const t=e.cloneWithText("");return t.annotationMap.delete(ce.LINK),t}}class $4 extends ue{constructor(e){super(),this.type=J.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=e}}class V4 extends Wd{handleAction(e,t){super.handleAction(e,t);const n=t.parent;t.children.length===0&&n&&(n.type==="list-item"?n.apply(new $4(t)):n.apply(new _e(t)))}}class J_ extends ne{handleAction(e,t){if(t.parent){const{blocksToBeInserted:n,startNode:i,startOffset:s}=e;let a=t;if(i===t.children[0]&&s===0)t.parent.apply(new Ve(t,...n));else{const o=new vo(i,s);t.apply(o),t.parent.apply(new we(t,...n)),a=o.newBlock}e.futureFocusBlock=a}}}class z4{registerBlockBasicStrategies(e){q.register(J.DELETE_CHILDREN,e,e===st.name?new V4:new Wd),q.register(J.APPEND_CHILDREN,e,new X_),q.register(J.INSERT_CHILDREN_BEFORE,e,new Gd),q.register(J.INSERT_CHILDREN_AFTER,e,new Z_),q.register(J.DELETE_BLOCK_CONTENT,e,new M4),q.register(J.INSERT_NEW_PARAGRAPH,e,e===de.name?new j4:new P4),q.register(J.INSERT_TEXT_TO_DECORATOR_NODE,e,new H4),q.register(J.INSERT_NODE_TO_NEAREST_ROOT,e,new F4),q.register(J.PASTE_CONTENT,e,new J_)}}const _o=new z4;class Tt{}class U4 extends Tt{canHandle(e){return e.dtoName==="RTETextNode"}handle(e,t={}){return this.isBold(e)||t.bold?{bold:!0}:{}}isBold(e){return e.nodeName==="STRONG"||e.nodeName==="B"||e.style.fontWeight===zx||e.style.fontWeight===Qp||e.classList.contains("v-rte--bold")}}class cg extends Tt{canHandle(e,t){return!t.skipCustomAnnotations&&!!e}handle(e){const t=this.getAttributes(e);return Object.keys(t).length>0?{customAttribute:t}:{}}getAttributes(e){return e.getAttributeNames().filter(n=>n!=="style"&&n!=="class"&&this.isValidAttr(n)).reduce((n,i)=>(n[i]=e.getAttribute(i),n),{})}isValidAttr(e){return/^[a-zA-Z_][\w-]*$/.test(e)}}class dg extends Tt{canHandle(e,t){return!t.skipCustomAnnotations&&!!e}handle(e){const t=this.getCustomClass(e);return t.length>0?{customClass:t}:{}}getCustomClass(e){return e.classList.toString().split(" ").filter(t=>!t.includes("v-rte")&&t!=="")}}class ug extends Tt{canHandle(e,t){return!t.skipCustomAnnotations&&!!e}handle(e){const t=N_(e);return Object.keys(t).length>0?{customStyle:t}:{}}}class W4 extends Tt{canHandle(e){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(e.dtoName)}handle(e){const t=this.getIndent(e);return t?{indent:t}:{}}getIndent(e){const t=e.style;let n;if(t.marginLeft)n=t.marginLeft;else if(t.margin){const s=t.margin.split(" ");switch(s.length){case 4:n=s[3];break;case 2:case 3:n=s[1];break;default:n=s[0];break}}else return null;const i=Number(n.replace("px",""));return i&&i>=0?Math.floor(i/16):null}}class G4 extends Tt{canHandle(e){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(e.dtoName)}handle(e){const t=this.getTextAlign(e);return t?{textAlign:t}:{}}getTextAlign(e){const t=e.classList;if(t.contains("v-rte--horizontal-alignment-left"))return"left";if(t.contains("v-rte--horizontal-alignment-center"))return"center";if(t.contains("v-rte--horizontal-alignment-right"))return"right";if(t.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(e.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class K4 extends Tt{canHandle(e){return e.dtoName==="RTETextNode"}handle(e,t={}){return this.isCode(e)||t.code?{code:!0}:{}}isCode(e){return e.classList.contains("v-rte--code")||e.nodeName==="CODE"||e.nodeName==="PRE"||e.style.fontFamily==="monospace"||e.style.fontFamily.replace(/["']/g,"")==="Roboto Mono"}}class q4 extends Tt{canHandle(e){return e.dtoName==="RTETextNode"}handle(e,t={}){const n=this.getColor(e)||t.textColor;return n?{textColor:n}:{}}getColor(e){var t;const n=e.style.color,i=(t=Up(n))===null||t===void 0?void 0:t.toUpperCase();if(i){const s=ld.filter(a=>a.key!==B_.key).find(a=>a.light===i||a.dark===i);return s?s.key:null}else{for(const s of ld)if(e.style.color.includes(s.key))return s.key;return null}}}class X4 extends Tt{canHandle(e){return e.dtoName==="RTETextNode"}handle(e,t={}){return this.isItalic(e)||t.italic?{italic:!0}:{}}isItalic(e){return e.nodeName==="I"||e.style.fontStyle===eg||e.nodeName==="EM"||e.classList.contains("v-rte--italic")}}class hg extends Tt{canHandle(e,t){return!!t.autoMatchFormat&&e.dtoName==="RTETextBlock"}handle(e){const t=this.getTextStyle(e);return t?{textStyle:t}:{}}getTextStyle(e){const t=this.getElementTypeByDataType(e);if(t)return t;const n=this.getElementTypeByNodeName(e);if(n)return n;const i=this.getElementTypeByFontSize(e);if(i)return i;const s=this.getElementTypeByClassName(e);return s||null}getElementTypeByDataType(e){return e.nodeType!==Node.TEXT_NODE&&e.hasAttribute("data-type")?e.getAttribute("data-type"):null}getElementTypeByFontSize(e){var t;switch((t=e.style)===null||t===void 0?void 0:t.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(e){switch(e.nodeName){case"P":return"paragraph";case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(e){if(e.className){const t=/\bv-rte-(?:-text-style-)?(title|subtitle|heading-1|heading-2|heading-3|heading-4|heading-5|heading-6|paragraph)\b/.exec(e.className);if(t)return t[1]}return null}}let Kd=class Q_{static isTitleOrSubtitle(e){if(e.nodeName==="DIV"){const t=Q_.textStyleHandler.getTextStyle(e);return t==="title"||t==="subtitle"}return!1}static isLinkElement(e){return e.nodeName==="A"}};Kd.textStyleHandler=new hg;class M0 extends Tt{constructor(){super(...arguments),this.handlers=[new cg,new dg,new ug]}canHandle(e){return e.dtoName==="RTETextNode"}handle(e,t={}){return t.link?{link:t.link}:Kd.isLinkElement(e)?{link:this.generateLinkAnnotations(e)}:{}}generateLinkAnnotations(e){const t={href:e.getAttribute("href")||"",groupKey:Q()};return this.handlers.forEach(n=>{Object.assign(t,n.handle(e))}),t}}class Z4 extends Tt{canHandle(e){return e.dtoName==="RTETextNode"}handle(e,t={}){return this.isStrikethrough(e)||t.strikethrough?{strikethrough:!0}:{}}isStrikethrough(e){return e.style.textDecoration.includes(ad)||e.nodeName==="S"||e.nodeName==="DEL"||e.classList.contains("v-rte--strikethrough")}}class Y4 extends Tt{canHandle(e){return e.dtoName==="RTETextNode"}handle(e,t={}){return this.isUnderline(e)||t.underline?{underline:!0}:{}}isUnderline(e){return e.style.textDecoration.includes(od)||e.nodeName==="U"||e.nodeName==="INS"||e.classList.contains("v-rte--underline")}}class J4 extends Tt{canHandle(e){return e.dtoName==="RTEImageNode"}handle(e){const t=this.getImageSize(e);return t?{size:t}:{}}getImageSize(e){return e.getAttribute("data-size")?e.getAttribute("data-size"):null}}class Q4 extends Tt{canHandle(e){return e.dtoName==="RTEImageNode"}handle(e){return e.hasAttribute("alt")?{alt:e.getAttribute("alt")}:{}}}const e6=new Set(["P","H1","H2","H3","H4","H5","H6","LI"]),fg=new Set(["P","H1","H2","H3","H4","H5","H6","LI","UL","OL","IMG","CODE"]),li=new Set(["BR","VEGA-RICH-TEXT-LINK-EDITOR","CODE","A"]),t6=new Set(["TABLE","THEAD","TBODY","TFOOT","TR","DL"]),sa=new Set(["ABBR","B","BDI","BDO","CITE","DEL","DFN","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SAMP","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR"]);function ey(r){return e6.has(r.parentElement.nodeName)}class r6 extends Tt{constructor(){super(...arguments),this.customAttributeHandler=new cg,this.customStyleAnnotationHandler=new ug,this.customClassAnnotationHandler=new dg}canHandle(e,t){return e.dtoName==="RTETextNode"&&t.autoMatchFormat===!1}handle(e,t){if(fg.has(e.nodeName)&&!li.has(e.nodeName))return{};const n=this.generateInlineHtmlAnnotation(e,Object.assign({},t));return n?{inlineHtml:n}:{}}generateInlineHtmlAnnotation(e,t){let{inlineHtml:n}=t;const i=Array.from(e.childNodes).some(s=>s.nodeType===Node.ELEMENT_NODE);if(!ye.supportsHtmlTag(e.nodeName.toLowerCase())||i){const s=Object.assign(Object.assign({htmlTag:e.nodeName.toLowerCase()},i?{groupId:Q()}:{}),{customAttribute:this.customAttributeHandler.handle(e).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(e).customStyle,customClass:this.customClassAnnotationHandler.handle(e).customClass});n?n=this.appendToInlineHtmlChain(n,s,e.parentNode):n=s}return n?Object.assign({},n):null}appendToInlineHtmlChain(e,t,n){return e.child&&n&&e.child.htmlTag===n.nodeName.toLowerCase()?Object.assign(Object.assign({},e),{child:this.appendToInlineHtmlChain(e.child,t,n)}):Object.assign(Object.assign({},e),{child:t})}}class n6{constructor(){this.handlers=[new G4,new W4,new U4,new X4,new Y4,new Z4,new q4,new M0,new K4,new J4,new Q4,new cg,new dg,new ug,new hg,new r6]}registerHandler(e){this.handlers.unshift(e)}generate(e,t,n={autoMatchFormat:!0}){n&&n.filterInlineStyles&&pe.executeTheStrategyRefillAction(e.dtoName,t);const i=Kd.isLinkElement(t)&&e.dtoName==="RTETextNode",s=this.handlers.filter(o=>!n.autoMatchFormat&&i?o instanceof M0:!0).filter(o=>t.nodeType!==Node.TEXT_NODE&&o.canHandle(e,{skipCustomAnnotations:n.skipCustomAnnotations||i,autoMatchFormat:n.autoMatchFormat})).reduce((o,l)=>{const c=l.handle(t,n.parentAnnotations);return Object.assign(Object.assign({},o),c)},{});this.removeTextStyleDefaultsFromCustomStyle(s);const a=pe.getStrategies(e.dtoName);for(const o of a)(n.autoMatchFormat||o.alwaysFilter)&&o.filterAnnotations(s);return s}removeTextStyleDefaultsFromCustomStyle(e){const t="textStyle"in e?e.textStyle:void 0,n=e.customStyle;if(!t||!n)return e;const i=Er.getDefaultStyles(t);if(!i)return e;for(const s of Object.keys(i))n[s]===i[s]&&delete n[s];return Object.keys(n).length===0&&delete e.customStyle,e}}const ze=new n6;class hr extends fs{constructor(){super(...arguments),this.annotationHandler=new hg}generateChildNodes(e,t,n){const i=[],s=!!(n&&n.autoMatchFormat===!1),a=Object.assign({},t);return e.forEach(o=>{const l=_t.getElementToNodeStrategies().find(u=>u.canHandle([o],0,n)>0);let c=null;if(l&&(c=l.handle([o],n,a)),c)i.push(c);else if(Wp(o)&&o.childNodes.length>0){const u=ze.generate(ye,o,Object.assign({parentAnnotations:s?{inlineHtml:a.inlineHtml,link:a.link,code:a.code}:t},n));i.push(...this.generateChildNodes(Array.from(o.childNodes),u,n))}}),i}matchTextBlockType(e){var t;return(t=this.annotationHandler.handle(e).textStyle)!==null&&t!==void 0?t:"paragraph"}}class i6 extends hr{canHandle(e,t,n){const i=e[t];return i.nodeType===Node.TEXT_NODE||this.isInlineTagWithoutBlockChildren(i,n)||fg.has(i.nodeName)&&!this.shouldFallBackToHtmlBlock(i)?0:!n.autoMatchFormat&&this.isCustomHtmlContainer(i)&&!Kd.isTitleOrSubtitle(i)?1:0}handle(e,t){const n=e[0];return Pn.from(this.generateHtmlBlock(n,t),t)}appendChildBlocks(e,t){e.children=t.map(n=>(n.parent=e,n))}shouldProceedToElementChildren(){return!0}isInlineTagWithoutBlockChildren(e,t){if(li.has(e.nodeName)&&e.childNodes.length===0)return!0;if(ey(e))return!(e.childNodes.length===0&&e.textContent===""&&!li.has(e.nodeName)&&!sa.has(e.nodeName));const n=Array.from(e.childNodes);return!n.some(s=>s.nodeType===Node.ELEMENT_NODE)&&n.some(s=>s.nodeType===Node.TEXT_NODE)?t.autoMatchFormat===!1?t6.has(e.parentElement.nodeName)?!1:sa.has(e.nodeName)||li.has(e.nodeName):!0:!1}shouldFallBackToHtmlBlock(e){const t=Array.from(e.childNodes);if(t.length===0)return!1;const n=e.parentElement.nodeName;return n==="UL"||n==="OL"?!1:t.every(i=>i.nodeType===Node.ELEMENT_NODE&&i.textContent===""&&!li.has(i.nodeName)&&!sa.has(i.nodeName))}isCustomHtmlContainer(e){return e.nodeName!=="DIV"?!0:e.childNodes.length>0&&e.childNodes[0].nodeName!=="IMG"}generateHtmlBlock(e,t){return{id:Q(),type:"html-block",htmlTag:e.nodeName.toLowerCase(),annotations:ze.generate(Pn,e,t),children:[]}}}class s6 extends hr{canHandle(e,t){return e[t].tagName==="UL"?1:0}handle(e,t){return e[0].childNodes.length===0?null:st.from({id:Q(),type:"bullet-list",blocks:[],annotations:ze.generate(st,e[0],t)},t)}appendChildBlocks(e,t){e.children=t.filter(n=>n instanceof de),t.forEach(n=>n.parent=e)}shouldProceedToElementChildren(){return!0}}class o6 extends hr{canHandle(e,t){return e[t].tagName==="OL"?1:0}handle(e,t){return e[0].childNodes.length===0?null:st.from({id:Q(),type:"number-list",blocks:[],annotations:ze.generate(st,e[0],t)},t)}appendChildBlocks(e,t){e.children=t.filter(n=>n instanceof de),t.forEach(n=>n.parent=e)}shouldProceedToElementChildren(){return!0}}class a6 extends hr{canHandle(e,t){const n=e[t],i=n.parentElement,s=n.nodeName!=="LI",a=n.nodeType===Node.TEXT_NODE&&n.textContent.trim()==="",o=Te(i)&&["UL","OL"].includes(i.nodeName);return s&&!a&&o?1:0}handle(e,t){const n=this.generateChildNodes(e,{},t);return de.from({id:Q(),type:"list-item",nodes:n,annotations:{}},t)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class l6 extends hr{canHandle(e,t){const n=e[t].parentElement;if(!["UL","OL"].includes(n.nodeName)&&e.some(i=>i.nodeName==="LI")){let i=0;for(let s=t;s<e.length&&e[s].nodeName==="LI";s++)i++;return i}return e[t].tagName==="LI"?1:0}handle(e,t){const n=e[0],i=n.parentElement;return["UL","OL"].includes(i.nodeName)?de.from(this.generateListItemBlockDTO(n,t),t):this.generateWithListBlock(e,t)}appendChildBlocks(e,t){e.nestList=t.filter(n=>["bullet-list","number-list"].includes(n.type))}shouldProceedToElementChildren(){return!0}generateWithListBlock(e,t){return st.from({id:Q(),type:"bullet-list",blocks:e.map(n=>this.generateListItemBlockDTO(n,t))},t)}generateListItemBlockDTO(e,t){return{id:Q(),type:"list-item",annotations:ze.generate(de,e,t),nodes:this.generateChildNodes(Array.from(e.childNodes.length?e.childNodes:[e]).filter(n=>!["UL","OL"].includes(n.nodeName)),ze.generate(ye,e,Object.assign(Object.assign({},t),{skipCustomAnnotations:!0})),t)}}}class ty extends hr{canHandle(e,t){return(e[t].tagName==="PRE"||e[t].tagName==="CODE")&&e[t].hasAttribute("data-language")?1:0}handle(e){const t=e[0];if(t){const n=t.textContent,i=t.dataset.language;return $t.from({id:Q(),type:"code-block",content:n,language:i})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class c6 extends ty{canHandle(e,t){return e[t].tagName==="VEGA-CODE-BLOCK"&&!e[t].querySelector("vega-code-block")||this.isCodeBlockContainer(e[t])?1:0}handle(e){const t=this.isCodeBlockContainer(e[0])?e[0].querySelector("vega-code-block"):e[0],n=t.querySelector("code");if(n)return super.handle([n]);if(t.hasAttribute("data-content")){const i=document.createElement("code");return i.textContent=t.dataset.content,i.dataset.language=t.dataset.language,super.handle([i])}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isCodeBlockContainer(e){return e.tagName==="PRE"&&e.classList.contains("code-block-container")&&e.querySelectorAll("vega-code-block").length===1}}class d6 extends hr{canHandle(e,t){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(e[t]))?1:0}handle(e,t){const n=this.generateChildNodes(Array.from(e[0].childNodes),{},t);return n.length===0?null:te.from({id:Q(),type:super.matchTextBlockType(e[0]),nodes:n,annotations:ze.generate(te,e[0],t)},t)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class pg extends hr{createRTEImageBlock(e,t){const n=!(t&&t.autoMatchFormat)&&!!(e.parentNode&&e.parentNode.nodeName!=="DIV");return Ye.from({id:Q(),type:"image",nodes:[{id:Q(),type:"image",url:e.src,annotations:ze.generate(wr,e,t)}],annotations:Object.assign(Object.assign({},ze.generate(Ye,e.parentElement,t)),{internalWrapper:n})},t)}}class u6 extends pg{canHandle(e,t){return e[t].tagName==="IMG"?1:0}handle(e,t){const n=e[0];return this.createRTEImageBlock(n,t)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class h6 extends pg{canHandle(e,t){return e[t].tagName==="VEGA-RICH-TEXT-IMAGE-EDITOR"?1:0}handle(e,t){const n=e[0],i=n.querySelector("img");if(Te(i))return Ye.from({id:Q(),type:"image",nodes:[{id:Q(),type:"image",url:i.src,annotations:ze.generate(wr,n,t)}],annotations:ze.generate(Ye,n.parentElement,t)},t)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class f6 extends pg{canHandle(e,t){const n=e[t];return n.nodeType===Node.ELEMENT_NODE&&n.textContent===""&&n.querySelector("img")?1:0}handle(e,t){const n=e[0].querySelector("img");return this.createRTEImageBlock(n,t)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class p6 extends hr{canHandle(e,t,n){let i=0;for(let s=t;s<e.length;s++){const a=e[s];if(this.isInlineCandidate(a,n))i++;else break}return i}handle(e,t){const n=e[0].parentElement,i=t&&t.autoMatchFormat,s=this.generateChildNodes(e,i?ze.generate(ye,n,Object.assign(Object.assign({},t),{skipCustomAnnotations:!0})):{},t),a=i?super.matchTextBlockType(n):this.matchTextBlockTypeByTagName(n),o=!i&&!a;return te.from(Object.assign({id:Q(),type:a||"paragraph",nodes:s},o?{annotations:{internalWrapper:o}}:{annotations:ze.generate(te,n,t)}),t)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(e){switch(e.nodeName){case"P":return"paragraph";default:return null}}isInlineCandidate(e,t){return e.nodeType===Node.TEXT_NODE||li.has(e.nodeName)?!0:this.isDedicatedBlockTag(e.nodeName)?!1:t.autoMatchFormat===!1&&ey(e)?!0:this.isInlineLeafOrWrapper(e)}isDedicatedBlockTag(e){return fg.has(e)&&!li.has(e)}isInlineLeafOrWrapper(e){return e.childNodes.length===0?sa.has(e.nodeName):this.isTextOnlyElement(e)?sa.has(e.nodeName)||li.has(e.nodeName):this.hasOnlyInlineDescendants(e)}isTextOnlyElement(e){const t=Array.from(e.childNodes);return!t.some(n=>n.nodeType===Node.ELEMENT_NODE)&&t.some(n=>n.nodeType===Node.TEXT_NODE)}hasOnlyInlineDescendants(e){for(let t=0;t<e.children.length;t++){const n=e.children[t];if(this.isDedicatedBlockTag(n.nodeName)||!n.hasChildNodes()||!this.hasOnlyInlineDescendants(n))return!1}return!0}}class ry extends fs{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(e,t){return{id:Q(),type:"text",text:e,annotations:t}}}class g6 extends ry{canHandle(e,t){return e[t].nodeType===Node.TEXT_NODE?1:0}handle(e,t,n){const i=Object.assign({},n),s=!!(t&&t.autoMatchFormat===!1),a=e[0],o=a.parentNode.nodeName.toLowerCase(),l=s&&!ye.supportsHtmlTag(o),c=this.generateTextNode(String(a.textContent),s?Vt(Object.assign(Object.assign({},o==="span"?i:{link:i.link,code:o==="code"?i.code:void 0}),{inlineHtml:i.inlineHtml,plainText:l||void 0})):i);return Object.assign({},c)}}var m6=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t};class v6 extends ry{canHandle(e,t){const n=e[t];return Wp(n)&&(n.nodeName==="BR"||n.childNodes.length===0)?1:0}handle(e,t,n){const i=!!(t&&t.autoMatchFormat===!1),s=Object.assign({},n),a=e[0],o=ze.generate(ye,a,Object.assign({parentAnnotations:i?{inlineHtml:s.inlineHtml,link:s.link,code:s.code}:n},t));if(a.nodeName==="BR"){const{inlineHtml:l}=o,c=m6(o,["inlineHtml"]),u=l&&l.htmlTag==="br"?c:o;return this.generateTextNode(`
|
|
80
|
+
`,u)}else if(a.childNodes.length===0){const l=i?Vt(Object.assign(Object.assign({},ye.supportsHtmlTag(a.nodeName.toLowerCase())?o:{}),{inlineHtml:o.inlineHtml})):o;return Object.assign({},this.generateTextNode("",l))}}}class _6 extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=bi.getDefaultStyles(),this.elementTagName="img"}get alwaysFilter(){return!0}canFilter(e){return ft.isImageNode(e)}canRefill(e,t){return t.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}class y6 extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=Ua.getDefaultStyles(),this.elementTagName="ol,ul"}canFilter(e){return ft.isListBlock(e.dtoName)}canRefill(e,t){return ft.isListBlock(e)&&t.matches(this.elementTagName)}toCssText(){return`${this.elementTagName.split(",").map(t=>`.${dt.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t.trim()}`).join(", ")} { ${this.convertStylesMapToCssText(this.stylesToBeFiltered)} }`}}class b6 extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=Er.getDefaultStyles("paragraph"),this.elementTagName="li",this.headingOrTitleClassNamePattern=/^v-rte-(h[1-6]|title|subtitle)$/}canFilter(e){const n=!e.getStyles().fontSize||this.isBlockOrNodeStylesMatchFilterStyles(e,["fontSize","lineHeight"]);return ft.isListItemBlock(e.dtoName)&&n}canRefill(e,t){return ft.isListItemBlock(e)&&t.matches(this.elementTagName)&&this.isElementNotHeadingOrTitle(t)}toCssText(){return this.buildCssTextForStyles(this.elementTagName)}isElementNotHeadingOrTitle(e){return!e.className.split(" ").some(n=>this.headingOrTitleClassNamePattern.test(n.trim()))}}class gg extends dt{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(e){const{textAlign:t,customStyle:n}=e;return!t||!n?e:(this.stylesToBeFiltered=Zi.getDefaultStyles(t),super.filterAnnotations(e))}}class w6 extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=Yi.getDefaultStyles(),this.elementTagName="code"}filterAnnotations(e){const{code:t,customStyle:n}=e;return!t||!n?e:super.filterAnnotations(e)}canFilter(e){return ft.isCodeNode(e)}canRefill(e,t){return ft.isTextNode(e)&&t.matches(this.elementTagName)}toCssText(){return`${`.${dt.RTE_CONTENT_CONTAINER_CLASS_NAME} ${this.elementTagName}`} { ${this.convertStylesMapToCssText(Object.assign(Object.assign({},this.stylesToBeFiltered),{fontWeight:"500"}))} }`}}class S6 extends dt{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(e){const t=e,n=t.customStyle;if(!n)return e;t.bold&&n.fontWeight===Qp&&delete n.fontWeight,t.italic&&n.fontStyle===eg&&delete n.fontStyle;const i=this.normalizeTextDecoration(n.textDecoration);return i&&this.shouldRemoveTextDecoration(i,t)&&delete n.textDecoration,Object.keys(n).length===0&&delete t.customStyle,e}normalizeTextDecoration(e){if(!e)return;const t=e.trim().toLowerCase().split(/\s+/);if(!t.some(n=>n!==od&&n!==ad))return Array.from(new Set(t)).sort().join(" ")}shouldRemoveTextDecoration(e,t){const n=[];return t.underline&&n.push(od),t.strikethrough&&n.push(ad),n.length===0?!1:e===n.sort().join(" ")}}class mg extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=Er.getDefaultStyles("paragraph"),this.type="paragraph",this.elementTagName="p"}filterAnnotations(e){return e}canFilter(e){return ft.isTextBlock(e.dtoName)&&e.type===this.type}canRefill(e,t){const n=this.classNameToBeAdded?`.${this.classNameToBeAdded}`:this.elementTagName;return ft.isTextBlock(e)&&t.matches(n)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}class ps extends mg{constructor(e){super(),this.type="heading-1",this.elementTagName="h1",this.type=`heading-${e}`,this.elementTagName=`h${e}`,this.stylesToBeFiltered=Er.getDefaultStyles(this.type)}}class vg extends mg{constructor(e){super(),this.type="title",this.elementTagName="div",this.classNameToBeAdded="v-rte-title",this.type=e,this.classNameToBeAdded=`v-rte-${e}`,this.stylesToBeFiltered=Er.getDefaultStyles(this.type)}}class Ji extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=Ji.BOLD_STYLES,this.elementTagName="span",this.parentBlockTypes=["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title"],this.parentElementSelectors=["h1","h2","h3","h4","h5","h6",".v-rte-title"],this.toBeCheckedSelector=this.parentElementSelectors.join(",")}filterAnnotations(e){return e}canFilter(e){return ft.isTextNode(e.dtoName)&&this.parentBlockIsHeadingOrTitle(e)}canRefill(e,t){return ft.isTextNode(e)&&t.nodeName==="SPAN"&&this.isHeadingOrTitleChild(t)}toCssText(){return`${this.parentElementSelectors.map(t=>`.${Ji.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t}`).join(",")} { ${this.convertStylesMapToCssText()} }`}parentBlockIsHeadingOrTitle(e){const t=e.parent;return t?this.parentBlockTypes.includes(t.type):!1}isHeadingOrTitleChild(e){let t=e.parentElement;for(;t;){if(t.matches(this.toBeCheckedSelector))return!0;if(Ji.NON_HEADING_TITLE_ELEMENT_TAGS.includes(t.tagName))return!1;t=t.parentElement}return!1}}Ji.BOLD_STYLES={fontWeight:"700"};Ji.NON_HEADING_TITLE_ELEMENT_TAGS=["TD","TH","TR","TABLE","THEAD","TBODY","DIV","BODY"];class yo extends ps{constructor(e){super(e),this.classNameToBeAdded=`v-rte-h${e}`,this.elementTagName="li"}canFilter(e){return ft.isListItemBlock(e.dtoName)&&this.isBlockOrNodeStylesMatchFilterStyles(e,["fontSize","lineHeight"])}canRefill(e,t){return ft.isListItemBlock(e)&&t.matches(this.elementTagName)&&t.classList.contains(this.classNameToBeAdded)}}class ny extends vg{constructor(e){super(e),this.classNameToBeAdded=`v-rte-${e}`,this.elementTagName="li"}canFilter(e){return ft.isListItemBlock(e.dtoName)&&this.isBlockOrNodeStylesMatchFilterStyles(e,["fontSize","lineHeight"])}canRefill(e,t){return ft.isListItemBlock(e)&&t.matches(this.elementTagName)&&t.classList.contains(this.classNameToBeAdded)}}qe.registerRTEDTOClass("paragraph",te);qe.registerRTEDTOClass("title",te);qe.registerRTEDTOClass("subtitle",te);qe.registerRTEDTOClass("heading-1",te);qe.registerRTEDTOClass("heading-2",te);qe.registerRTEDTOClass("heading-3",te);qe.registerRTEDTOClass("heading-4",te);qe.registerRTEDTOClass("heading-5",te);qe.registerRTEDTOClass("heading-6",te);qe.registerRTEDTOClass("heading-6",te);qe.registerRTEDTOClass("list-item",de);qe.registerRTEDTOClass("bullet-list",st);qe.registerRTEDTOClass("number-list",st);qe.registerRTEDTOClass("image",Ye);qe.registerRTEDTOClass("code-block",$t);qe.registerRTEDTOClass("html-block",Pn);qe.registerRTEDTOClass("text",ye);qe.registerRTEDTOClass("image",wr);_o.registerBlockBasicStrategies(te.name);_o.registerBlockBasicStrategies(st.name);_o.registerBlockBasicStrategies(de.name);_o.registerBlockBasicStrategies(Ye.name);_o.registerBlockBasicStrategies(Pn.name);_t.registerElementToBlockStrategy(new p6);_t.registerElementToBlockStrategy(new f6);_t.registerElementToBlockStrategy(new h6);_t.registerElementToBlockStrategy(new u6);_t.registerElementToBlockStrategy(new d6);_t.registerElementToBlockStrategy(new l6);_t.registerElementToBlockStrategy(new a6);_t.registerElementToBlockStrategy(new o6);_t.registerElementToBlockStrategy(new s6);_t.registerElementToBlockStrategy(new i6);//!important: Code block strategies must be registered after HtmlBlockStrategy because registerElementToBlockStrategy uses unshift, giving later registrations higher priority.
|
|
81
|
+
_t.registerElementToBlockStrategy(new ty);_t.registerElementToBlockStrategy(new c6);_t.registerElementToNodeStrategy(new v6);_t.registerElementToNodeStrategy(new g6);pe.register(te.dtoName,new gg);pe.register(st.dtoName,new gg);pe.register(de.dtoName,new gg);pe.register(ye.dtoName,new S6);pe.register(te.dtoName,new mg);pe.register(te.dtoName,new ps(1));pe.register(te.dtoName,new ps(2));pe.register(te.dtoName,new ps(3));pe.register(te.dtoName,new ps(4));pe.register(te.dtoName,new ps(5));pe.register(te.dtoName,new ps(6));pe.register(te.dtoName,new vg("title"));pe.register(te.dtoName,new vg("subtitle"));pe.register(ye.dtoName,new Ji);pe.register(ye.dtoName,new w6);pe.register(ye.dtoName,new I_);pe.register(wr.dtoName,new _6);pe.register($t.dtoName,new fl);pe.register(Ei.dtoName,new hl);pe.register(st.dtoName,new y6);pe.register(de.dtoName,new b6);pe.register(de.dtoName,new yo(1));pe.register(de.dtoName,new yo(2));pe.register(de.dtoName,new yo(3));pe.register(de.dtoName,new yo(4));pe.register(de.dtoName,new yo(5));pe.register(de.dtoName,new yo(6));pe.register(de.dtoName,new ny("title"));pe.register(de.dtoName,new ny("subtitle"));class C6{static preserve(e){const t=e.replace(/\s+style=/g," data-style=");return new E6(t)}}class E6{constructor(e){this.processedHtml=e}getProcessedHtml(){return this.processedHtml}restore(e){this.walkNodes(e)}walkNodes(e){e.forEach(t=>{if(Wp(t)){const n=t.getAttribute("data-style");n&&(t.style.cssText=n,t.removeAttribute("data-style")),t.children.length>0&&this.walkNodes(Array.from(t.children))}})}}class x6{process(e){return e.replace(/(<[^>]+>)(\s+)(<[^>]+>)/g,(t,n,i,s)=>{const a=this.extractOpeningTagName(n),o=this.extractClosingTagName(s);return a&&o&&a===o?`${n}${i}${s}`:`${n}${s}`})}extractOpeningTagName(e){const t=e.match(/<(\w[\w-]*)/);return t?t[1]:null}extractClosingTagName(e){const t=e.match(/<\/(\w[\w-]*)/);return t?t[1]:null}}class T6{process(e){return e.replace(/(>)[\n\t]+(?=.)/g,"$1")}}class k6{process(e){return e.replace(/(.?)[\n\t]+(?=<)/g,"$1")}}class L6{constructor(){this.processors=[new x6,new T6,new k6]}clean(e){if(!e||e.trim().length===0)return e;let t=e,n;do{n=t;for(const i of this.processors)t=i.process(t)}while(t!==n);return t}}class De{constructor(e){this.dtoName=De.dtoName,e.forEach(t=>{t.parent=this}),this.children=e}static fromJSON(e,t={autoMatchFormat:!0}){const n=e.map(i=>{const s=qe.getRTEBlockClass(i.type);if(s)return s.from(i,t);throw new Error(`[Vega] Unknown block type: ${i.type}`)});return new De(n)}static createEmptyContent(e={autoMatchFormat:!0}){return De.fromJSON([{id:Q(),type:"paragraph",annotations:{internalWrapper:!e.autoMatchFormat},nodes:[{id:Q(),annotations:{plainText:!e.autoMatchFormat},type:"text",text:""}]}],e)}static fromHtml(e,t={autoMatchFormat:!0,skipCustomAnnotations:!1}){const i=new L6().clean(e),s=C6.preserve(i),a=s.getProcessedHtml(),o=new DOMParser().parseFromString(a,"text/html").body,l=Array.from(o.childNodes);s.restore(l);const c=T4.process(l,t).filter(Te).map(u=>u.toDto(t)).filter(Te);return new De(c)}static generateContentStyles(e){return pe.generateAllStylesContent(e==null?void 0:e.enableFontImports)}clone(e=!1){return e?new De(this.children.map(t=>t.clone(this))):new De([...this.children])}toJSON(){return this.children.map(e=>e.toJSON())}toHtml(e){return e&&(Te(e.autoMatchFormat)||Te(e.skipCustomAnnotations))&&rt.warn("The 'options' parameter's properties 'autoMatchFormat' and 'skipCustomAnnotations' in toHtml method are deprecated and will be removed in the future."),this.isEmpty()?"":this.children.map(t=>t.toHtml({filterInlineStyles:e==null?void 0:e.filterInlineStyles})).join("")}isEmpty(){return this.children.length===0?!0:this.children.length===1?!this.children[0].isNotEmpty():!1}apply(e){if(q.executeTheStrategy(e,this),e.executedFlag&&e.isFlushable){const t=Pe.getDOMByEntity(this);t&&Ke.notify(Zt.getSubject(t,$d),{})}}getLastNode(){return this.children.length===0?null:this.children[this.children.length-1].getLastNode()}toListItem(e){e.children.map(n=>n.apply(new zd));const t=new de(Q());return t.apply(new Re(e.children)),t.annotationMap=e.annotationMap,t}createList(e){return new st(Q(),e)}findNodeById(e){return this.findNodeInBlocksById(e,this.children)}findNodeInBlocksById(e,t){for(const n of t){if("children"in n){for(const i of n.children)if(i.id===e)return i}if(n instanceof de&&n.nestList)for(const i of n.nestList){const s=this.findNodeInBlocksById(e,i.children);if(s)return s}if(n instanceof st&&n.children){const i=this.findNodeInBlocksById(e,n.children);if(i)return i}}return null}}q.register(J.DELETE_CHILDREN,De.name,new Wd),q.register(J.APPEND_CHILDREN,De.name,new X_),q.register(J.INSERT_CHILDREN_BEFORE,De.name,new Gd),q.register(J.INSERT_CHILDREN_AFTER,De.name,new Z_),q.register(J.TRANSFORM_TO_CODE_BLOCK,De.name,new S4),q.register(J.UPDATE_CURSOR_POSITION,De.name,new k4);De.dtoName="VegaRTEContent";class A6{constructor(){this.RTE_DTO_RENDERER_MAP=new Map,this.RTE_TOOLBAR_BUTTON_RENDERER_MAP=new Map,this.hostToolbarButtonRendererMap=new WeakMap}registerRTEDTORenderer(e,t){const n=this.RTE_DTO_RENDERER_MAP.get(e);if(t&&n&&n.constructor.name!==t.constructor.name)throw new Error(`Renderer for type ${e} is already registered with a different class(${n.constructor.name}).`);this.RTE_DTO_RENDERER_MAP.set(e,t)}registerRTEToolbarButtonRenderer(e,t){this.RTE_TOOLBAR_BUTTON_RENDERER_MAP.set(e,t)}registerRTEToolbarButtonRendererForHost(e,t,n){let i=this.hostToolbarButtonRendererMap.get(e);i||(i=new Map,this.hostToolbarButtonRendererMap.set(e,i)),i.set(t,n)}getRTERenderer(e){return this.RTE_DTO_RENDERER_MAP.get(e)}getRTEToolbarButtonRenderer(e,t){var n,i;if(t){const s=(n=this.hostToolbarButtonRendererMap.get(t))===null||n===void 0?void 0:n.get(e);if(s)return s}return(i=this.RTE_TOOLBAR_BUTTON_RENDERER_MAP.get(e))!==null&&i!==void 0?i:null}}const _c=new A6;class R6{}const O6=[{payloadKey:"IS_REGISTER_METHOD_CALLED",payloadDescription:"Indicate if the method register of public API IconManager is called",canAccept:(r,e)=>r==="IconManager"&&e==="register",payloadValue:()=>!0},{payloadKey:"IS_GETICON_METHOD_CALLED",payloadDescription:"Indicate if the method getIcon of public API IconManager is called",canAccept:(r,e)=>r==="IconManager"&&e==="getIcon",payloadValue:()=>!0},{payloadKey:"IS_HASICON_METHOD_CALLED",payloadDescription:"Indicate if the method hasIcon of public API IconManager is called",canAccept:(r,e)=>r==="IconManager"&&e==="hasIcon",payloadValue:()=>!0}];var D6=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class qd{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=Tn(qd,["register","getIcon","hasIcon"],O6),this.icons=new Map}register(e){for(const t in e)this.icons.has(t)||this.icons.set(t,e[t])}getIcon(e){return this.icons.get(e)}hasIcon(e){return this.icons.has(e)}}D6([xn()],qd.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Lf=new qd;class Wa{getIconKey(e){return this.generateIconKeyWithNamespace(e,Wa.INTERNAL_ICON_NAMESPACE)}hasIcon(e){return Lf.hasIcon(this.getIconKey(e))}register(e){const t=Object.entries(e).reduce((n,[i,s])=>{const a=this.generateIconKeyWithNamespace(i,Wa.INTERNAL_ICON_NAMESPACE);return n[a]=s,n},{});Lf.register(t)}generateIconKeyWithNamespace(e,t){return[t,e].join(" ")}}Wa.INTERNAL_ICON_NAMESPACE="v-internal-icon";const pl=new Wa,N6=[{payloadKey:"IS_OVERRIDECOLORS_METHOD_CALLED",payloadDescription:"Indicate if the method overrideColors of public API ThemeManager is called",canAccept:(r,e)=>r==="ThemeManager"&&e==="overrideColors",payloadValue:()=>!0},{payloadKey:"IS_RESET_METHOD_CALLED",payloadDescription:"Indicate if the method reset of public API ThemeManager is called",canAccept:(r,e)=>r==="ThemeManager"&&e==="reset",payloadValue:()=>!0},{payloadKey:"IS_TOGGLEDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method toggleDarkMode of public API ThemeManager is called",canAccept:(r,e)=>r==="ThemeManager"&&e==="toggleDarkMode",payloadValue:()=>!0},{payloadKey:"IS_ISDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method isDarkMode of public API ThemeManager is called",canAccept:(r,e)=>r==="ThemeManager"&&e==="isDarkMode",payloadValue:()=>!0},{payloadKey:"IS_APPLY_BRANDING_METHOD_CALLED",payloadDescription:"Indicate if the method applyBranding of public API ThemeManager is called",canAccept:(r,e)=>r==="ThemeManager"&&e==="applyBranding",payloadValue:()=>!0},{payloadKey:"IS_VALIDATECOLORACCESSIBILITY_METHOD_CALLED",payloadDescription:"Indicate if the method validateColorAccessibility of public API ThemeManager is called",canAccept:(r,e)=>r==="ThemeManager"&&e==="validateColorAccessibility",payloadValue:()=>!0}];var I6=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class Xd{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=Tn(Xd,["overrideColors","reset","toggleDarkMode","isDarkMode","applyBranding","validateColorAccessibility"],N6)}async overrideColors(e){Br.overrideColors(e)}async reset(){Br.reset()}toggleDarkMode(e){Br.toggleDarkMode(e)}isDarkMode(){return Br.isDarkMode()}applyBranding(e){Br.applyBranding(e)}async validateColorAccessibility(e){return Br.validateColorAccessibility(e)}}I6([xn()],Xd.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const _g=new Xd,AP=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],iy=[{key:"white",dark:"#04041C",light:"#FCFCFC"},{key:"red",dark:"#AA091C",light:"#FF4C61"},{key:"orange",dark:"#974502",light:"#FDAB68"},{key:"yellow",dark:"#735C00",light:"#FFDC4C"},{key:"green",dark:"#2E6D18",light:"#7BDA58"},{key:"teal",dark:"#287171",light:"#7BD1D1"},{key:"gray",dark:"#595959",light:"#999999"},{key:"black",dark:"#FCFCFC",light:"#04041C"}],cs={key:"default-head-bg",dark:"#181830",light:"#F0F3F7"};class Hr{static getTableColors(){return Hr.TABLE_COLORS}static setTableColors(e){Hr.TABLE_COLORS=e}static getColorKey(e,t=!1){var n;let i=null;const s=Hr.TABLE_COLORS,a=t?[...s,cs]:s;if(a){const o=(n=Up(e))===null||n===void 0?void 0:n.toUpperCase();if(o)i=a.find(l=>_g.isDarkMode()?l.dark===o:l.light===o);else for(const l of a)if(l.key===e){i=l;break}}return i?i.key:""}}Hr.TABLE_COLORS=iy;class io extends dr{constructor(e){super(),this.type=Et.COLOR,this.colorKey=e,e&&(this.color=this.formatColor(e))}renderStyle(){return{color:this.color?Br.isDarkMode()?this.color.dark:this.color.light:this.colorKey||""}}renderClass(){return null}toJSON(){var e;return{color:((e=this.color)===null||e===void 0?void 0:e.key)||this.colorKey||""}}clone(){return new io(this.colorKey)}formatColor(e){return Hr.getTableColors().find(t=>t.key===e)}}var Et;(function(r){r.TABLE="EXTENSION_TABLE",r.CELL="EXTENSION_TABLE_CELL",r.CAPTION="EXTENSION_TABLE_CAPTION",r.COLOR="EXTENSION_TABLE_COLOR"})(Et||(Et={}));class Gt extends dr{constructor({backgroundColor:e,border:t,width:n,height:i,alignment:s,borderCollapse:a}={},o=!0){super(),this.type=Et.TABLE,this.useInternalStyle=o,this.backgroundColor=e,this.border=t,this.width=n,this.height=i,this.alignment=o&&s===void 0?Gt.DEFAULT_ALIGNMENT:s,this.backgroundColorAnnotation=new io(e),this.borderColorAnnotation=new io(t==null?void 0:t.color),this.borderCollapse=o&&a===void 0?Gt.DEFAULT_BORDER_COLLAPSE:a}static from(e,t=!0){return[Et.TABLE,new Gt(e,t)]}static getDefaultStyles(){return{borderCollapse:Gt.DEFAULT_BORDER_COLLAPSE,margin:Gt.DEFAULT_ALIGNMENT_STYLE_VALUE}}get borderStr(){return this.border?`${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}clone(){return new Gt({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse},this.useInternalStyle)}toJSON(){return{table:Vt({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse})}}renderStyle(){const e=this.backgroundColorAnnotation.renderStyle().color,t=Object.assign({border:this.borderStr,width:this.width,height:this.height,borderCollapse:this.borderCollapse},this.renderAlignmentStyle());return e&&(t.backgroundColor=e),Vt(t)}renderClass(){return"v-rte--extension-table"}renderAlignmentStyle(){return this.alignment?{margin:this.alignment==="center"?Gt.DEFAULT_ALIGNMENT_STYLE_VALUE:this.alignment==="left"?"0":"0 0 0 auto"}:{}}}Gt.DEFAULT_BORDER_COLLAPSE="collapse";Gt.DEFAULT_ALIGNMENT="center";Gt.DEFAULT_ALIGNMENT_STYLE_VALUE="0 auto";class Le extends it{constructor(e,t){super(e),this.dtoName=Le.dtoName,this.type="table-block",this.children=[];const{autoMatchFormat:n}=t||{autoMatchFormat:!0};n&&this.annotationMap.set(Et.TABLE,new Gt)}static from(e,t){var n;const i=new Le(e.id,t);return super.convertAnnotationsToMap(i.annotationMap,Object.assign({},e.annotations)),i.children=super.generateBlockChildren(e.children,t,i),!((n=e.annotations)===null||n===void 0)&&n.table&&i.annotationMap.set(...Gt.from(e.annotations.table,t==null?void 0:t.autoMatchFormat)),i}clone(e){const t=new Le(this.id);return t.children=this.children.map(n=>n.clone(t)),t.parent=e,t.annotationMap=super.cloneAnnotations(),t}getLastNode(){return this.children[this.children.length-1].getLastNode()}getFirstNode(){return this.hasCaption()?this.children[0].children[0].getLastNode():this.children[0].children[0].children[0].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(e){const t=this.children.map(i=>i.toHtml(e)).join("");return`<table${super.generateAttributeString(e)}>${t}</table>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map(e=>e.toJSON())})}getCaption(){const e=this.children.find(t=>t.type==="table-caption");return e??null}setCaption(e){const t=this.children.findIndex(n=>n.type==="table-caption");if(!e){t>=0&&this.children.splice(t,1);return}e.parent=this,t>=0?this.children[t]=e:this.children.unshift(e)}hasCaption(){return Te(this.getCaption())}}Le.dtoName="RTETableBlock";var jt;(function(r){r.ROW="ROW",r.CAPTION="CAPTION",r.COLUMN="COLUMN",r.MERGE_CELLS="MERGE_CELLS",r.TABLE="TABLE",r.CELL="CELL",r.SPLIT_CELL="SPLIT_CELL"})(jt||(jt={}));class gl{syncCursorPosition(e,t){const n=this.findRootContent(e);if(t&&n){const i=t.getRangeEndOffset();n.apply(new xt(t,i))}}findRootContent(e){let t=e.parent;for(;t;){if(t instanceof De)return t;t=t.parent}}}const sy="DELETE_TABLE_ROW";class B6 extends ue{constructor(e){super(),this.isFlushable=!0,this.type=sy,this.rowsToBeRemoved=e}}const oy="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION";class M6 extends ue{constructor(e,t=[]){super(),this.isFlushable=!0,this.type=oy,this.selectedRows=[],this.insertDirection=e,this.selectedRows=t}}const ay="INSERT_TABLE_ROW_INTO_SAME_SECTION";var In;(function(r){r.ABOVE="ABOVE",r.BELOW="BELOW"})(In||(In={}));class P6 extends ue{constructor(e,t=[]){super(),this.isFlushable=!0,this.type=ay,this.selectedRows=[],this.insertDirection=e,this.selectedRows=t}}const ly="TOGGLE_HEADER_ROW";class F6 extends ue{constructor(e){super(),this.isFlushable=!0,this.type=ly,this.selectedRows=e}}class Dt extends it{constructor(e){super(e),this.dtoName=Dt.dtoName,this.type="table-body",this.children=[]}static from(e,t){const n=new Dt(e.id);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},e.annotations)),n.children=super.generateBlockChildren(e.children,t,n),n}clone(e){const t=new Dt(this.id);return t.children=this.children.map(n=>n.clone(t)),t.parent=e,t.annotationMap=super.cloneAnnotations(),t}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(e){const t=this.children.map(i=>i.toHtml(e)).join("");return`<tbody${super.generateAttributeString(e)}>${t}</tbody>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map(e=>e.toJSON())})}}Dt.dtoName="RTETableBodyBlock";class Nt extends it{constructor(e){super(e),this.dtoName=Nt.dtoName,this.type="table-head",this.children=[]}static from(e,t){const n=new Nt(e.id);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},e.annotations)),n.children=super.generateBlockChildren(e.children,t,n),n}clone(e){const t=new Nt(this.id);return t.children=this.children.map(n=>n.clone(t)),t.parent=e,t.annotationMap=super.cloneAnnotations(),t}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(e){const t=this.children.map(i=>i.toHtml(e)).join("");return`<thead${super.generateAttributeString(e)}>${t}</thead>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map(e=>e.toJSON())})}}Nt.dtoName="RTETableHeadBlock";class St extends it{constructor(e){super(e),this.dtoName=St.dtoName,this.type="table-row",this.children=[]}static from(e,t){const n=new St(e.id);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},e.annotations)),n.children=super.generateBlockChildren(e.children,t,n),n}clone(e){const t=new St(this.id);return t.children=this.children.map(n=>n.clone(t)),t.parent=e,t.annotationMap=super.cloneAnnotations(),t}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(e){const t=this.children.map(i=>i.toHtml(e)).join("");return`<tr${super.generateAttributeString(e)}>${t}</tr>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map(e=>e.toJSON())})}}St.dtoName="RTETableRowBlock";class he extends dr{constructor({backgroundColor:e,padding:t,border:n,width:i,height:s,textAlign:a,verticalAlign:o,minWidth:l,boxSizing:c}={},u=!0){super(),this.type=Et.CELL,this.useInternalStyle=u,this.backgroundColor=e,this.width=i,this.height=s,this.border=u&&n===void 0?he.DEFAULT_BORDER:n,this.padding=u&&t===void 0?he.DEFAULT_PADDING:t,this.textAlign=u&&a===void 0?he.DEFAULT_HORIZONTAL_TEXT_ALIGN:a,this.verticalAlign=u&&o===void 0?he.DEFAULT_VERTICAL_TEXT_ALIGN:o,this.minWidth=u&&l===void 0?he.DEFAULT_CELL_MIN_WIDTH:l,this.boxSizing=u&&c===void 0?he.DEFAULT_BOX_SIZING:c}static from(e,t){return[Et.CELL,new he(e,t)]}static getDefaultStyles(e=!0){return{padding:he.DEFAULT_PADDING,textAlign:he.DEFAULT_HORIZONTAL_TEXT_ALIGN,verticalAlign:he.DEFAULT_VERTICAL_TEXT_ALIGN,minWidth:he.DEFAULT_CELL_MIN_WIDTH,boxSizing:he.DEFAULT_BOX_SIZING,border:`${he.DEFAULT_BORDER.style} ${he.DEFAULT_BORDER.width} ${e?he.DEFAULT_BORDER.color:he.DEFAULT_BORDER_RGB_COLOR}`}}get borderStr(){return this.border?`${this.border.style||""} ${this.border.width||""} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}set backgroundColor(e){this._backgroundColor=e,this.backgroundColorAnnotation=new io(e)}get backgroundColor(){return this._backgroundColor}set border(e){this._border=e,this.borderColorAnnotation=new io(e==null?void 0:e.color)}get border(){return this._border}clone(){return new he({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}toJSON(){return{tableCell:Vt({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing})}}renderStyle(e){const t=this.backgroundColorAnnotation.renderStyle().color,n={padding:this.padding,border:this.borderStr,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing};return t&&(n.backgroundColor=t),e!=null&&e.standalone?Vt(n,{cleanEmptyString:!0}):Vt(this.removeDefaultValues(n),{cleanEmptyString:!0})}renderClass(){return null}removeDefaultValues(e){const t=Object.assign({},e);return t.padding===he.DEFAULT_PADDING&&delete t.padding,t.border===`${he.DEFAULT_BORDER.style} ${he.DEFAULT_BORDER.width} ${he.DEFAULT_BORDER.color}`&&delete t.border,t.textAlign===he.DEFAULT_HORIZONTAL_TEXT_ALIGN&&delete t.textAlign,t.verticalAlign===he.DEFAULT_VERTICAL_TEXT_ALIGN&&delete t.verticalAlign,t.minWidth===he.DEFAULT_CELL_MIN_WIDTH&&delete t.minWidth,t.boxSizing===he.DEFAULT_BOX_SIZING&&delete t.boxSizing,t}}he.DEFAULT_PADDING="12px";he.DEFAULT_BORDER={style:"solid",width:"1px",color:"#ddd"};he.DEFAULT_BORDER_RGB_COLOR="rgb(221, 221, 221)";he.DEFAULT_HORIZONTAL_TEXT_ALIGN="left";he.DEFAULT_VERTICAL_TEXT_ALIGN="middle";he.DEFAULT_CELL_MIN_WIDTH="55px";he.DEFAULT_BOX_SIZING="border-box";class He extends it{constructor(e,t){super(e),this.dtoName=He.dtoName,this.type="table-cell",this.children=[];const{autoMatchFormat:n}=t||{autoMatchFormat:!0};n&&this.annotationMap.set(Et.CELL,new he)}static from(e,t){var n;const i=new He(e.id,t);return super.convertAnnotationsToMap(i.annotationMap,Object.assign({},e.annotations)),!((n=e.annotations)===null||n===void 0)&&n.tableCell&&i.annotationMap.set(...he.from(e.annotations.tableCell,t==null?void 0:t.autoMatchFormat)),i.children=super.generateBlockChildren(e.children,t,i),i}clone(e){const t=new He(this.id);return t.children=this.children.map(n=>n.clone(t)),t.parent=e,t.annotationMap=super.cloneAnnotations(),t}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}get rowSpan(){const e=this.getCustomAttributeByName("rowspan");return isNaN(Number(e))?1:Math.max(Number(e),1)}get colSpan(){const e=this.getCustomAttributeByName("colspan");return isNaN(Number(e))?1:Math.max(Number(e),1)}toHtml(e){const t=this.children.map(i=>i.toHtml(e)).join("");return`<td${super.generateAttributeString(e)}>${t}</td>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map(e=>e.toJSON())})}getCustomAttributeByName(e){const t=this.getCustomAttributesAnnotation();if(t)return(t.toJSON().customAttribute||{})[e]}}He.dtoName="RTETableCellBlock";class Qi extends he{constructor(e={},t=!0){super(e,t)}static from(e,t){return[Et.CELL,new Qi(e,t)]}static getDefaultBackgroundColor(){return Br.isDarkMode()?cs.dark:cs.light}clone(){return new Qi({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}renderStyle(e){var t;const n=super.renderStyle(e);return Vt(Object.assign(Object.assign({},n),{backgroundColor:(t=n.backgroundColor)!==null&&t!==void 0?t:Qi.getDefaultBackgroundColor()}))}}class ke extends He{constructor(e,t){super(e,t),this.dtoName=ke.dtoName,this.type="table-head-cell";const{autoMatchFormat:n}=t||{autoMatchFormat:!0};n&&this.annotationMap.set(Et.CELL,new Qi)}static from(e,t){var n;const i=new ke(e.id,t);return super.convertAnnotationsToMap(i.annotationMap,Object.assign({},e.annotations)),!((n=e.annotations)===null||n===void 0)&&n.tableCell&&i.annotationMap.set(...Qi.from(e.annotations.tableCell,t==null?void 0:t.autoMatchFormat)),i.children=super.generateBlockChildren(e.children,t,i),i}clone(e){const t=new ke(this.id);return t.children=this.children.map(n=>n.clone(t)),t.parent=e,t.annotationMap=super.cloneAnnotations(),t}toHtml(e){const t=this.children.map(i=>i.toHtml(e)).join("");return`<th${super.generateAttributeString(e)}>${t}</th>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map(e=>e.toJSON())})}}ke.dtoName="RTETableHeadCellBlock";const cy="MERGE_CELLS";class H6 extends ue{constructor(e,t,n,i,s){super(),this.type=cy,this.isFlushable=!0,this.targetCell=e,this.mergeCells=t,this.colSpan=n,this.rowSpan=i,this.direction=s}}var Wt;(function(r){r.MERGE_CELLS="MERGE_CELLS",r.MERGE_CELL_UP="MERGE_CELL_UP",r.MERGE_CELL_RIGHT="MERGE_CELL_RIGHT",r.MERGE_CELL_DOWN="MERGE_CELL_DOWN",r.MERGE_CELL_LEFT="MERGE_CELL_LEFT"})(Wt||(Wt={}));class j6 extends gl{canHandle(e){return e[0]===jt.MERGE_CELLS}execute(e,t){const n=t.tableSelection.getSelectedCells(),i=e[1];switch(i){case Wt.MERGE_CELL_UP:case Wt.MERGE_CELL_RIGHT:case Wt.MERGE_CELL_DOWN:case Wt.MERGE_CELL_LEFT:{const s=this.getDirectionMergeCells(i,n[0]);this.handleMergeCells(s,i)}break;default:n.length>1&&this.handleMergeCells(n,Wt.MERGE_CELLS);break}}getDirectionMergeCells(e,t){const n=z6(t,e);if(!n)return[t];switch(e){case Wt.MERGE_CELL_UP:return[n,t];case Wt.MERGE_CELL_DOWN:return[t,n];case Wt.MERGE_CELL_LEFT:return[n,t];default:return[t,n]}}handleMergeCells(e,t){if(e.length<2)return;const n=uy(e),{minRow:i,maxRow:s,minCol:a,maxCol:o,targetCell:l}=n,c=o-a+1,u=s-i+1,d=new H6(l,e,c,u,t);this.applyActionOnTable(d,l)}applyActionOnTable(e,t){const n=bn(t,Le);n&&n.apply(e)}}function bn(r,e){return r?r instanceof e?r:bn(r.parent,e):null}function $6(r,e){return{id:Q(),type:"table-body",children:Array.from({length:r},()=>V6(e))}}function V6(r){return{id:Q(),type:"table-row",children:Array.from({length:r},()=>cd("table-cell"))}}function wn(r){return r.children.filter(e=>e instanceof Dt||e instanceof Nt).flatMap(e=>e.children)}function yg(r){if(!r||!r.children||!r.children[0])return null;const e=r.children[0];return e instanceof ls?e:yg(e)}function dy(r,e){for(const t of r){const n=t.children.find(i=>i.id===e);if(n)return n}return null}function cd(r){const e=Q();return{id:e,type:r,children:[{id:`${e}-p`,type:"paragraph",nodes:[{id:`${e}-p-t`,type:"text",text:""}]}]}}function or(r){return{colSpan:r.colSpan,rowSpan:r.rowSpan}}function Wn(r,e,t){const n=t??Sn(e);for(let i=0;i<n.length;i++){const s=n[i];for(let a=0;a<s.length;a++)if(s[a]===r.id)return a}return-1}function Sn(r){const e=[];return r.forEach((t,n)=>{e[n]||(e[n]=[]);let i=0;t.children.forEach(s=>{const{colSpan:a,rowSpan:o}=or(s);for(;e[n][i]!==void 0;)i++;for(let l=0;l<o;l++)for(let c=0;c<a;c++)e[n+l]||(e[n+l]=[]),e[n+l][i+c]=s.id;i+=a})}),e}function z6(r,e){if(!r)return null;const t=r.parent,n=t.parent.children,i=n.indexOf(t),{colSpan:s,rowSpan:a}=or(r),o=Wn(r,n);let l=i,c=o;switch(e){case Wt.MERGE_CELL_LEFT:c=o-1;break;case Wt.MERGE_CELL_RIGHT:c=o+s;break;case Wt.MERGE_CELL_UP:l=i-1;break;default:l=i+a;break}return U6(n,l,c)}function U6(r,e,t){const n=Sn(r);for(let i=0;i<r.length;i++){const s=r[i];for(const a of s.children){const{colSpan:o,rowSpan:l}=or(a),c=Wn(a,r,n),u=i,d=i+l-1,g=c+o-1,_=e>=u&&e<=d,y=t>=c&&t<=g;if(_&&y)return a}}return null}function uy(r){const i=r[0].parent.parent.children,s=Sn(i);let a=Number.POSITIVE_INFINITY,o=-1,l=Number.POSITIVE_INFINITY,c=-1;const u=new Set;r.forEach(g=>{const _=g.parent,y=i.indexOf(_),b=Wn(g,i,s),{colSpan:p,rowSpan:f}=or(g),h=y,m=y+f-1,v=b,w=b+p-1;for(let C=h;C<=m;C++)for(let E=v;E<=w;E++)u.add(`${C},${E}`);a=Math.min(a,h),o=Math.max(o,m),l=Math.min(l,v),c=Math.max(c,w)});const d=r[0];return{minRow:a,maxRow:o,minCol:l,maxCol:c,targetCell:d,coveredPositions:u}}function hy(r){const e=wn(r);let t=0;const n=e[0];for(const i of n.children){const{colSpan:s}=or(i);t+=s}return t}function RP(r){if(r.length===1)return!0;const e=uy(r),{minRow:t,maxRow:n,minCol:i,maxCol:s,coveredPositions:a}=e,o=(n-t+1)*(s-i+1);return a.size===o}function jr(r,e,t,n,i){const s=r.annotationMap.get(nt.CUSTOM_ATTRIBUTE),a=s?Object.assign({},s.customAttribute):{};delete a.colspan,delete a.rowspan,e>1&&(a.colspan=String(e));const o=hy(n)+(i?1:0);if(t>1&&e!==o&&(a.rowspan=String(t)),Object.keys(a).length>0){const l=new an(a);r.annotationMap.set(nt.CUSTOM_ATTRIBUTE,l)}else r.annotationMap.delete(nt.CUSTOM_ATTRIBUTE)}function bg(r){const e=cd(r);return r==="table-head-cell"?ke.from(e):He.from(e)}function W6(r,e,t){for(let n=0;n<t;n++){const i=r[n],s=e.children.find(a=>a.id===i);if(s&&!(s instanceof ke))return n}return-1}function fy(r){const e=new Map;return r.forEach(t=>{for(let n=0;n<t.length;n++){const i=t[n];i&&!e.has(i)&&e.set(i,n)}}),e}function G6(r,e,t,n){if(r.length===0)return[0,-1];const i=t||wn(e),s=n??Sn(i);let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return r.forEach(l=>{const c=Wn(l,i,s);a=Math.min(a,c),o=Math.max(o,c)}),[a,o]}var ti;(function(r){r.HEADER_ROW="HEADER_ROW",r.ADD_ROW_ABOVE="ADD_ROW_ABOVE",r.ADD_ROW_BELOW="ADD_ROW_BELOW",r.DELETE_ROW="DELETE_ROW",r.SELECT_ROW="SELECT_ROW"})(ti||(ti={}));class K6 extends gl{canHandle(e){return e[0]===jt.ROW}execute(e,t){const n=e[1];switch(n){case ti.ADD_ROW_ABOVE:case ti.ADD_ROW_BELOW:this.handleInsertRow(n,t);break;case ti.DELETE_ROW:this.handleDeleteRow(t);break;case ti.HEADER_ROW:this.handleToggleHeader(t);break;case ti.SELECT_ROW:this.handleSelectRow(t);break}}handleInsertRow(e,t){const n=this.getAllSelectedRows(t);if(n.length>0){const i=e===ti.ADD_ROW_ABOVE?In.ABOVE:In.BELOW,s=i===In.ABOVE?n[0]:n[n.length-1],a=s.parent instanceof Dt,o=this.shouldInsertHeaderRow(s,i)||a?new P6(i,n):new M6(i,n);this.applyActionToTable(n[0],o)}}shouldInsertHeaderRow(e,t){if(t===In.ABOVE)return e.parent instanceof Nt;{const n=e.parent;return n instanceof Nt&&n.children[n.children.length-1]!==e}}handleDeleteRow(e){const t=this.getAllSelectedRows(e);if(t.length){const n=new B6(t);this.applyActionToTable(t[0],n)}}handleToggleHeader(e){const t=this.getAllSelectedRows(e);if(t.length>0){const n=new F6(t);this.applyActionToTable(t[0],n)}}handleSelectRow(e){const t=this.getAllSelectedRows(e);if(t.length>0&&e&&e.tableSelection){const n=t.flatMap(i=>i.children);e.tableSelection.setSelectedCells(n)}}getAllSelectedRows(e){const t=new Set;if(e&&e.tableSelection){const{tableSelection:n}=e;n.getSelectedCells().forEach(s=>{const a=bn(s,St);a&&t.add(a)})}return Array.from(t)}applyActionToTable(e,t){const n=bn(e,Le);n&&n.apply(t)}}const py="REPLACE_TABLE_CELL";class q6 extends ue{constructor(e){super(),this.isFlushable=!0,this.type=py,this.payload=e}}const gy="SPLIT_TABLE_CELL";class X6 extends ue{constructor(e){super(),this.isFlushable=!0,this.type=gy,this.payload=e}}class Zd extends ne{getBoundaryCellColumnRange(e,t,n){let i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return e.forEach(a=>{const o=Wn(a,t,n);i=Math.min(i,o),s=Math.max(s,o)}),[i,s]}}class my extends Zd{static isFullHeaderSelection(e){if(e.length===0)return!1;const t=e[0],n=bn(t,Le);if(n){const i=wn(n),s=Sn(i),a=new Map;i.forEach(c=>{c.children.forEach(u=>a.set(u.id,u))});const[o,l]=G6(e,n,i,s);for(const c of s)for(let u=o;u<=l;u++){const d=a.get(c[u]);if(d&&!(d instanceof ke))return!1}return!0}return!1}handleAction(e,t){const n=e.headerOn,i=wn(t),s=Sn(i),[a,o]=this.getBoundaryCellColumnRange(e.tableCellHeaderRange,i,s);(n||!n&&a>0)&&this.toggleHeadRows(t,i,s,n,o,a),this.toggleBodyRows(t,i,s,n,a,o);const c=this.getRootContent(t);if(c&&e.tableCellHeaderRange[0].parent){const u=e.tableCellHeaderRange[0].parent.getFirstNode();u&&c.apply(new xt(u,0))}}toggleHeadRows(e,t,n,i,s,a){var o;const c=(((o=e.children.find(u=>u instanceof Nt))===null||o===void 0?void 0:o.children)||[]).length;for(let u=0;u<c;u++){const d=t[u],g=i?s:a-1;this.toggleCellType(e,d,n[u],0,g,()=>!0,_=>ke.from(_.toJSON()))}}toggleBodyRows(e,t,n,i,s,a){var o;const l=n[0].length,c=((o=e.children.find(d=>d instanceof Dt))===null||o===void 0?void 0:o.children)||[],u=t.length-c.length;for(let d=0;d<c.length;d++){const g=d+u,_=t[g],y=n[g],b=W6(y,_,l);if(i){b>-1&&this.toggleCellType(e,_,y,b,a,f=>!(f instanceof ke),f=>ke.from(f.toJSON()));continue}const p=b===-1?l-1:b-1;this.toggleCellType(e,_,y,s,p,f=>f instanceof ke,f=>He.from(f.toJSON()))}}toggleCellType(e,t,n,i,s,a,o){for(let l=i;l<=s;l++){const c=n[l],u=t.children.find(d=>d.id===c);if(u&&a(u)){const d=n.indexOf(c),g=o(u).type,_={table:e,cell:u,col:l,cellStartCol:d,endCol:s,targetCellType:g},y=d+u.colSpan-1;if(y>s||d<l){if(t.apply(new X6(_)),y>s)return;l=y;continue}t.apply(new q6(_))}u&&(l+=u.colSpan-1)}}}const vy="DELETE_TABLE_COLUMN";class Z6 extends ue{constructor(e){super(),this.isFlushable=!0,this.type=vy,this.tableCellDeleteRange=e}}const _y="INSERT_TABLE_COLUMN";var so;(function(r){r.LEFT="LEFT",r.RIGHT="RIGHT"})(so||(so={}));class Y6 extends ue{constructor(e,t){super(),this.isFlushable=!0,this.type=_y,this.tableCellInsertRange=t,this.insertDirection=e}}const yy="SELECT_TABLE_COLUMN";class J6 extends ue{constructor(e,t){super(),this.type=yy,this.tableCellSelectRange=e,this.selectCellCallback=t}}const by="TOGGLE_HEADER_TABLE_COLUMN";class Q6 extends ue{constructor(e,t){super(),this.isFlushable=!0,this.type=by,this.headerOn=!1,this.tableCellHeaderRange=e,this.headerOn=t}}var ri;(function(r){r.HEADER_COLUMN="HEADER_COLUMN",r.ADD_COLUMN_LEFT="ADD_COLUMN_LEFT",r.ADD_COLUMN_RIGHT="ADD_COLUMN_RIGHT",r.DELETE_COLUMN="DELETE_COLUMN",r.SELECT_COLUMN="SELECT_COLUMN"})(ri||(ri={}));class eT extends gl{canHandle(e){return e[0]===jt.COLUMN}execute(e,t){const n=t.tableSelection.getSelectedCells();if(!n||n.length===0)return;const i=e[1];switch(i){case ri.ADD_COLUMN_LEFT:case ri.ADD_COLUMN_RIGHT:this.handleInsertColumn(i,n);break;case ri.DELETE_COLUMN:this.handleDeleteColumn(n);break;case ri.SELECT_COLUMN:this.handleSelectColumn(n,t);break;case ri.HEADER_COLUMN:this.handleToggleHeaderColumn(n);break}}handleInsertColumn(e,t){const n=new Y6(e===ri.ADD_COLUMN_LEFT?so.LEFT:so.RIGHT,t);this.applyActionOnTable(n,t[0])}handleDeleteColumn(e){const t=new Z6(e);this.applyActionOnTable(t,e[0])}handleSelectColumn(e,t){const n=new J6(e,i=>{t.tableSelection.setSelectedCells(i)});this.applyActionOnTable(n,e[0])}handleToggleHeaderColumn(e){const t=!my.isFullHeaderSelection(e),n=new Q6(e,t);this.applyActionOnTable(n,e[0])}applyActionOnTable(e,t){const n=bn(t,Le);n&&n.apply(e)}}const Af="SPLIT_CELL_HORIZONTALLY";class tT extends ue{constructor(){super(),this.isFlushable=!0,this.type=Af}}const Rf="SPLIT_CELL_VERTICALLY";class rT extends ue{constructor(){super(),this.isFlushable=!0,this.type=Rf}}var dd;(function(r){r.SPLIT_CELL_HORIZONTALLY="SPLIT_CELL_HORIZONTALLY",r.SPLIT_CELL_VERTICALLY="SPLIT_CELL_VERTICALLY"})(dd||(dd={}));class nT extends gl{canHandle(e){return e[0]===jt.SPLIT_CELL}execute(e,t){const n=t.tableSelection.getSelectedCells();if(n&&n.length===1){const i=n[0];switch(e[1]){case dd.SPLIT_CELL_HORIZONTALLY:this.handleSplitCellHorizontally(i);break;case dd.SPLIT_CELL_VERTICALLY:this.handleSplitCellVertically(i);break}}}handleSplitCellHorizontally(e){const t=new tT;e.apply(t)}handleSplitCellVertically(e){const t=new rT;e.apply(t)}}class iT{call(e,...t){let n=null;return Ke.notify(e,{args:t,resultCallback:i=>{n=i}}),n}register(e,t){const n=new dl(this.isAcceptableObserver.bind(this),i=>{const s=t(...i.args);i.resultCallback(s)});Ke.register(e,n)}unRegister(e){Ke.clearObserversBySubject(e)}isAcceptableObserver(e){return!0}}const wy=new iT,P0={0:0,"size-4":4,"size-8":8,"size-12":12,"size-16":16,"size-20":20,"size-24":24,"size-32":32,"size-40":40,"size-48":48,"size-64":64,"size-72":72,"size-80":80,"size-112":112,"size-2":2};function OP(r){return typeof r=="number"?r:r&&!isNaN(Number(r.replace("px","")))?Number(r.replace("px","")):0}function DP(r){return typeof r=="number"?r+"px":r}function Wi(r){return isNaN(Number(r))?Object.keys(P0).includes(r)?`${P0[r]}px`:r:`${r}px`}const F0=(r,e,t)=>{let n;return function(...i){n&&clearTimeout(n),n=setTimeout(function(){r.apply(t,i)},e)}};class sT extends ue{constructor(e,t){super(),this.type=J.REPLACE_SELECTED_TEXT,this.textToBeInsert="",this.textToBeInsert=e,this.currentRange=t}}const oT=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaLoaderController is called",canAccept:(r,e)=>r==="VegaLoaderController"&&e==="load",payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaLoaderController is called",canAccept:(r,e)=>r==="VegaLoaderController"&&e==="close",payloadValue:()=>!0}];var aT=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class oo{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=Tn(oo,["load","close"],oT)}load(e={}){let t=e.containerSelector||"body",n=document.querySelector(t);if(n&&oo.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY.includes(n.tagName)&&(t="body",n=document.querySelector("body")),!n)return rt.error("Container is not found by selector: ",t),null;const i=this.createLoadingIndicator(e.indicatorOptions),s=this.createLoader(t);return s.append(i),this.appendLoader(s,n)}close(e){const t=this.findLoader(e);if(t){if(t.dataset.container){const n=document.querySelector(t.dataset.container);n&&n.dataset.vegaLoaderOriginPosition&&(n.style.position=n.dataset.vegaLoaderOriginPosition)}t.remove()}}findLoader(e){var t,n;let i;if(e.includes(">>>")){const[s,a]=e.split(">>>");i=(n=(t=document.querySelector(s))===null||t===void 0?void 0:t.shadowRoot)===null||n===void 0?void 0:n.getElementById(a)}else i=document.getElementById(e);return i}createLoader(e){const t=document.createElement("vega-loader-wrapper");return t.className=g5([e==="body"?"fixed-wrapper":"absolute-wrapper"]),t.dataset.container=e,t.id=`vega-loader-${Q()}`,t}createLoadingIndicator(e={}){const t=document.createElement("vega-loading-indicator");return Object.assign(t,e),t}appendLoader(e,t){return t.dataset.vegaLoaderOriginPosition=t.style.position,t.style.position="relative",t.shadowRoot?(t.shadowRoot.append(e),`${e.dataset.container}>>>${e.id}`):(t.append(e),e.id)}}oo.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY=["VEGA-MODAL"];aT([xn()],oo.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const lT=new oo,cT=[{payloadKey:"IS_OPEN_METHOD_CALLED",payloadDescription:"Indicate if the method open of public API VegaNotifyController is called",canAccept:(r,e)=>r==="VegaNotifyController"&&e==="open",payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaNotifyController is called",canAccept:(r,e)=>r==="VegaNotifyController"&&e==="close",payloadValue:()=>!0},{payloadKey:"IS_CLOSEALL_METHOD_CALLED",payloadDescription:"Indicate if the method closeAll of public API VegaNotifyController is called",canAccept:(r,e)=>r==="VegaNotifyController"&&e==="closeAll",payloadValue:()=>!0}];var Sy=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class ao{constructor(){this.resizeObserverSlimmer=b_(ao,cl,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:e=>{var t;!(e[0].contentRect.height>0)&&(!((t=this.container)===null||t===void 0)&&t.classList.contains("hydrated"))&&(wf.removeZIndex(this.container,"top"),this.container.remove(),this.container=null)},target:()=>this.container}]),this.vegaPublicAPIRuntimeMetricsSlimmer=Tn(ao,["open","close","closeAll"],cT)}async open(e){const t=this.createPageNotification(e);return this.getContainer().append(t),t.id}async closeAll(){this.container&&Array.from(this.container.children).forEach(e=>{e.close()})}async close(e){await document.getElementById(e).close()}connectResizeObserver(){}createPageNotification(e){const t=document.createElement("vega-page-notification");return Object.keys(e).forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),t.style.marginBottom=v0()===Xi.MOBILE?"12px":"16px",t.id=`vega-page-notification-${Q()}`,t}getContainer(){return this.container?this.container:(this.container=document.createElement("vega-page-notification-list"),wf.setZIndex(this.container,"top"),v0()===Xi.MOBILE?this.container.classList.add("vega-page-notification-list-bottom"):this.container.classList.add("vega-page-notification-list-topRight"),document.body.append(this.container),this.connectResizeObserver(),this.container)}}Sy([IC()],ao.prototype,"resizeObserverSlimmer",void 0);Sy([xn()],ao.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const dT=new ao,uT=[{payloadKey:"IS_SETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method setSemantics of public API VegaEventManager is called",canAccept:(r,e)=>r==="VegaEventManager"&&e==="setSemantics",payloadValue:()=>!0},{payloadKey:"IS_GETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method getSemantics of public API VegaEventManager is called",canAccept:(r,e)=>r==="VegaEventManager"&&e==="getSemantics",payloadValue:()=>!0},{payloadKey:"IS_GETENABLEDEVENTIDSBYCOMPONENT_METHOD_CALLED",payloadDescription:"Indicate if the method getEnabledEventIdsByComponent of public API VegaEventManager is called",canAccept:(r,e)=>r==="VegaEventManager"&&e==="getEnabledEventIdsByComponent",payloadValue:()=>!0},{payloadKey:"globalEventIsNative",payloadDescription:"Indicate if the vega components will emit events without the vega prefix",canAccept:(r,e)=>r==="VegaEventManager"&&e==="setSemantics",payloadValue:r=>{const e=r;return!!(e.global&&e.global.namespace==="native")}},{payloadKey:"eventOfSpecificComponentsIsNative",payloadDescription:"Indicate if the vega components will emit events with the vega prefix, but special components will emit events without vega prefix",canAccept:(r,e)=>r==="VegaEventManager"&&e==="setSemantics",payloadValue:r=>{const e=r;if(e.components){const t=Object.keys(e.components);return t.length>0&&e.components[t[0]].namespace==="native"}return!1}},{payloadKey:"eventOfSpecificComponentsIsVega",payloadDescription:"Indicate if the vega components will emit events without the vega prefix, but special components will emit events with vega prefix",canAccept:(r,e)=>r==="VegaEventManager"&&e==="setSemantics",payloadValue:r=>{const e=r;if(e.global&&e.components){const t=Object.keys(e.components);return e.global.namespace==="native"&&t.length>0&&e.components[t[0]].namespace==="vega"}return!1}},{payloadKey:"globalJqueryDelegatedEventIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(r,e)=>r==="VegaEventManager"&&e==="setSemantics",payloadValue:r=>{const e=r;return!!(e.global&&e.global.jqueryDelegatedEvent===!0)}},{payloadKey:"jqueryDelegatedEventIsCustomStrategy",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(r,e)=>r==="VegaEventManager"&&e==="setSemantics",payloadValue:r=>{const e=r;return!!(e.global&&Array.isArray(e.global.jqueryDelegatedEvent)&&e.global.jqueryDelegatedEvent.length>0)}},{payloadKey:"jqueryDelegatedEventOfSpecialComponentsIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(r,e)=>r==="VegaEventManager"&&e==="setSemantics",payloadValue:r=>{const e=r;if(e.components){const t=Object.keys(e.components);return t.length>0&&e.components[t[0]].jqueryDelegatedEvent===!0}return!1}}];var hT=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class Yd{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=Tn(Yd,["setSemantics","getSemantics","getEnabledEventIdsByComponent"],uT)}setSemantics(e){Zu.setSemantics(e)}getSemantics(e){return Zu.getSemantics(e)}getEnabledEventIdsByComponent(e){return Zu.getEnabledEventIdsByComponent(e)}}hT([xn()],Yd.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const fT=new Yd,pT=[{payloadKey:"IS_OVERRIDEZINDEXBASICVALUES_METHOD_CALLED",payloadDescription:"Indicate if the method overrideZIndexBasicValues of public API ZIndexManager is called",canAccept:(r,e)=>r==="VegaZIndexManager"&&e==="overrideZIndexBasicValues",payloadValue:()=>!0},{payloadKey:"zIndexBasicValuesGreatThanTenThousand",payloadDescription:"Indicate if the basic z-index value is great than ten thousand",canAccept:(r,e)=>r==="VegaZIndexManager"&&e==="overrideZIndexBasicValues",payloadValue:r=>r.base>1e4}];var gT=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class Jd{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=Tn(Jd,["overrideZIndexBasicValues"],pT)}overrideZIndexBasicValues(e){wf.overrideZIndexBasicValues(e)}}gT([xn()],Jd.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const mT=new Jd,vT=[{payloadKey:"IS_WAITFORVEGA_METHOD_CALLED",payloadDescription:"Indicate if the method waitForVega of public API WaitForVegaHandler is called",canAccept:(r,e)=>r==="WaitForVegaHandler"&&e==="handle",payloadValue:()=>!0}];var _T=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class Qd{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=Tn(Qd,["handle"],vT)}async handle(){return await Promise.all(Array.from(document.querySelectorAll("*:not(.hydrated)")).filter(e=>e.tagName.startsWith("VEGA")).map(e=>{var t;return(t=e.componentOnReady)===null||t===void 0?void 0:t.call(e)}))}}_T([xn()],Qd.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const yT=new Qd,bT=async()=>yT.handle(),wT=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaSkeletonLoaderController is called",canAccept:(r,e)=>r==="VegaSkeletonLoaderController"&&e==="load",payloadValue:()=>!0},{payloadKey:"IS_UNLOAD_METHOD_CALLED",payloadDescription:"Indicate if the method unLoad of public API VegaSkeletonLoaderController is called",canAccept:(r,e)=>r==="VegaSkeletonLoaderController"&&e==="unLoad",payloadValue:()=>!0},{payloadKey:"IS_UNLOADALL_METHOD_CALLED",payloadDescription:"Indicate if the method unLoadAll of public API VegaSkeletonLoaderController is called",canAccept:(r,e)=>r==="VegaSkeletonLoaderController"&&e==="unLoadAll",payloadValue:()=>!0}];var ST=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class lo{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=Tn(lo,["load","unLoad","unLoadAll"],wT),this.loaderMap=new Map}load({target:e,type:t="text",width:n,height:i,items:s,layout:a}){const o=Array.from(document.body.querySelectorAll(e)),l=`vega-skeleton-loader-${Q()}`,c=[];return o.forEach(u=>{const d=s?s.map(this.createSkeleton):[this.createSkeleton({type:t,width:n,height:i})],g=(a?[this.wrapLayout(d,a)]:d).map(_=>(_.dataset[lo.LOADER_DATA_SET_KEY]=l,_));c.push(...g),u.append(...g)}),this.loaderMap.set(l,c),l}unLoad(e){this.loaderMap.has(e)&&(this.loaderMap.get(e).forEach(t=>t.remove()),this.loaderMap.delete(e))}unLoadAll(){for(const e of this.loaderMap.values())e.forEach(t=>t.remove());this.loaderMap.clear()}createSkeleton(e){const{type:t,width:n,height:i}=e,s=document.createElement("vega-skeleton");return Object.assign(s,{animated:!0,type:t,width:n,height:i}),s}wrapLayout(e,t){const n=document.createElement("vega-flex");return Object.assign(n,Object.assign({className:"vega-skeleton-loader-template-container"},t.props)),Object.assign(n.style,t.style),n.append(...e),n}}lo.LOADER_DATA_SET_KEY="vegaSkeletonLoaderKey";ST([xn()],lo.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const CT=new lo,ET=[{payloadKey:"IS_INIT_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.init is called",canAccept:(r,e)=>r==="TranslationController"&&e==="init",payloadValue:()=>!0},{payloadKey:"IS_CHANGE_LANGUAGE_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.changeLanguage is called",canAccept:(r,e)=>r==="TranslationController"&&e==="changeLanguage",payloadValue:()=>!0}];var xT=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class eu{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=Tn(eu,["init","changeLanguage"],ET)}get currentLanguage(){return vr.currentLanguage}init(e){vr.init(e)}changeLanguage(e){vr.changeLanguage(e)}}xT([xn()],eu.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const TT=new eu;class kT{constructor(){this.extensionContextMap=new WeakMap}updateExtensionContext(e){if(e&&e.host){let t=e;const n=this.extensionContextMap.get(e.host);n&&(t=Object.assign(Object.assign({},n),e)),this.extensionContextMap.set(e.host,t)}}getExtensionContext(e){return e?this.extensionContextMap.get(e):null}}const tu=new kT;class Jt extends R6{injectRTEScopeStyles(){return""}render(e,t,n){var i;const s=this.doRender(n,e,t);return this.fallbackRegisterRef(s,e),this.appendChildren(((i=s.childrenContainerGetter)===null||i===void 0?void 0:i.call(s))||s,e,t,n),s}useRef(e){return e[Jt.REGISTER_REF_FLAG]=!0,function(t){t&&Pe.register(t,e)}}getDTORenderer(e){return _c.getRTERenderer(e)}getExtensionContext(e){return tu.getExtensionContext(e)}appendChildren(e,t,n,i){Array.isArray(t.children)&&t.children.length&&!e.$children$&&(e.$children$=t.children.map(s=>this.renderChildren(s,n,i)).filter(Te))}renderChildren(e,t,n){const i=this.getDTORenderer(e.type);if(i)return i.render(e,t,n)}fallbackRegisterRef(e,t){!t[Jt.REGISTER_REF_FLAG]&&e.$attrs$&&!e.$attrs$.ref&&(e.$attrs$.ref=this.useRef(t))}}Jt.REGISTER_REF_FLAG="__registeredRef__";const H0=new WeakSet,Qu=new WeakMap;class se{constructor(){this.extensionContext=null,this.hasCustomStylesRenderers=new Set}static registerActionHandleStrategy(e,t,n){q.register(t,e,n)}static registerActionHandlerInterceptor(e,t,n){sd.register(t,e,n)}static registerFilterStylesStrategy(e,t){pe.register(e,t)}static attachAnnotationFromJson(e,t,n){var i,s;const a=(i=Qu.get(e))!==null&&i!==void 0?i:new Map,o=(s=a.get(t))!==null&&s!==void 0?s:new Set;if(o.add(n),a.set(t,o),Qu.set(e,a),H0.has(e))return;H0.add(e);const l=e.from.bind(e);e.from=function(u,d){const g=l(u,d),_=u.annotations,y=Qu.get(e);return _&&y&&y.forEach((b,p)=>{const f=_[p];b.forEach(h=>{h(g,f,u,d)})}),g}}prepareBeforeLoad(e){}initialExtensionAfterLoad(e){this.extensionContext=e,tu.updateExtensionContext(e)}destroyExtension(){}collectExtensionRendererStyles(){let e="";return this.hasCustomStylesRenderers.size>0&&this.hasCustomStylesRenderers.forEach(t=>{e+=`${t.injectRTEScopeStyles()}
|
|
82
|
+
`}),e}registerNode(e,t){qe.registerRTEDTOClass(e,t)}registerRenderer(e,t){_c.registerRTEDTORenderer(e,t),t instanceof Jt&&t.injectRTEScopeStyles()&&this.hasCustomStylesRenderers.add(t)}registerToolbarButtonRenderer(e,t,n){n?_c.registerRTEToolbarButtonRendererForHost(n,e,t):_c.registerRTEToolbarButtonRenderer(e,t)}registerBlockBasicStrategies(e){_o.registerBlockBasicStrategies(e)}unRegisterStrategy(e,t){q.unregister(e,t)}unRegisterInterceptor(e,t,n){sd.unregister(e,t,n)}registerElementToBlockDTOClassStrategy(e){_t.registerElementToBlockStrategy(e)}registerElementToNodeDTOClassStrategy(e){_t.registerElementToNodeStrategy(e)}getElementToNodeDTOClassStrategies(){return _t.getElementToNodeStrategies()}registerAnnotationHandler(e){ze.registerHandler(e)}}class gs{constructor(){this.dropdownEl=null,this.itemsContainerEl=null,this.buttonEl=null}isHidden(e){return e.sourceEditMode}getExtensionContext(e){return tu.getExtensionContext(e)}renderDropdown(e,t,n,i){return e("vega-dropdown",Object.assign({trigger:"click",searchable:!1,maxWidth:"200",itemDisplayRule:"ellipsis",ref:s=>{this.dropdownEl=s,rn.addUniqueObserverToNode(s,Cf,a=>{const o=a;this.handleDropdownClick(o.detail,t)})}},n),i)}renderDropdownListTemplate(e,t){return e("div",{slot:"items",onMouseDown:this.preventDefault,onKeyDown:n=>this.handleItemsKeyDown(n),ref:n=>{this.itemsContainerEl=n},class:"rte-dropdown-list"},[e("style",{nonce:yn.nonce},".rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }"),...t.map(n=>"children"in n?this.renderDropdownGroup(e,n):this.renderDropdownItem(e,n))])}renderDropdownItem(e,t){return e("vega-dropdown-item",{key:t.key,itemKey:t.key,label:t.label,prefixIcon:t.icon})}renderDropdownGroup(e,t){return e("vega-dropdown-group",{key:t.key,label:t.label,divide:!1},t.children.map(n=>"children"in n?this.renderDropdownGroup(e,n):this.renderDropdownItem(e,n)))}renderButton(e,t,n){const{icon:i,label:s,showArrowIcon:a,tooltip:o}=n,l=this.isDisabled(t),c=e("vega-rich-text-editor-toolbar-button",{disabled:l,icon:i,hidden:this.isHidden(t),selected:this.isSelected(t),ref:u=>{this.buttonEl=u,rn.addUniqueObserverToNode(u,bt,()=>this.handleButtonClick(t))},onMouseDown:this.preventDefault,onKeyDown:u=>this.handleButtonKeyDown(u)},[this.renderButtonLabel(e,t,s),a?e("vega-icon",{size:"size-8",color:l?"text-disabled":"text-secondary",style:{marginLeft:"8px"},icon:pl.getIconKey("chevron-down")}):null].filter(Te));return o!=null&&o.text?e("vega-tooltip",{text:t.translation.t(o.text),placement:["bottom","top"]},[c]):c}renderButtonLabel(e,t,n){if(n){const i=this.isDisabled(t);return e("vega-font",{variant:"font-field-label-sm",color:i?"text-disabled":"text-primary"},n)}return null}isDisabled(e){return e.host.disabled}isSelected(e){return!1}preventDefault(e){e.preventDefault()}getListItemByKey(e,t){for(const n of e)if("children"in n){const i=this.getListItemByKey(n.children,t);if(i)return i}else if(n.key===t)return n;return null}handleButtonKeyDown(e){this.dropdownEl&&(e.code==="Enter"||e.code==="Space"?(e.preventDefault(),e.stopPropagation(),this.dropdownEl.dispatchEvent(new MouseEvent("click",{bubbles:!0}))):(e.code==="ArrowDown"||e.code==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.dropdownEl.show().then(()=>{this.focusDropdownItem(e.code==="ArrowDown"?"first":"last")})))}handleItemsKeyDown(e){var t,n,i;if(e.code==="Escape"){e.preventDefault(),e.stopPropagation(),this.dropdownEl&&this.dropdownEl.hide(),(t=this.buttonEl)===null||t===void 0||t.focus();return}if(e.code!=="ArrowDown"&&e.code!=="ArrowUp")return;e.preventDefault(),e.stopPropagation();const s=this.getDropdownItems();if(s.length===0)return;const a=s.findIndex(c=>{var u,d;return((u=c.shadowRoot)===null||u===void 0?void 0:u.querySelector("li"))===((d=c.shadowRoot)===null||d===void 0?void 0:d.activeElement)}),o=e.code==="ArrowDown"?1:-1,l=a===-1?e.code==="ArrowDown"?0:s.length-1:a+o;for(let c=0;c<s.length;c++){const u=(l+c*o+s.length)%s.length;if(!s[u].disabled){(i=(n=s[u].shadowRoot)===null||n===void 0?void 0:n.querySelector("li"))===null||i===void 0||i.focus();return}}}focusDropdownItem(e){var t,n;const i=this.getDropdownItems(),s=e==="first"?i:[...i].reverse();for(const a of s)if(!a.disabled){(n=(t=a.shadowRoot)===null||t===void 0?void 0:t.querySelector("li"))===null||n===void 0||n.focus();return}}getDropdownItems(){return this.itemsContainerEl?Array.from(this.itemsContainerEl.querySelectorAll("vega-dropdown-item")):[]}}class LT extends ue{constructor(e,t){super(),this.type="INSERT_TOKEN_NODE",this.rteRange=null,this.actionHandleResult=!1,this.rteRange=e,this.token=t}}class AT extends gs{constructor(e){super(),this.tokenList=[],this.tokenList=e}render(e,t){return this.renderDropdown(e,t,{},[this.renderButton(e,t,{label:"Tokens",showArrowIcon:!0,tooltip:{text:"Insert token"}}),this.renderDropdownListTemplate(e,this.tokenList)])}isDisabled(e){const t=this.getExtensionContext(e.host);if(t){const{host:n,getSelectedNodes:i}=t,[s]=i();return s?n.disabled||!q.canHandle("INSERT_TOKEN_NODE",s.parent):n.disabled}return!1}handleButtonClick(e){}handleDropdownClick(e,t){const n=this.getListItemByKey(this.tokenList,e),{rteRange:i}=t,{startNode:s}=i;if(s&&s.parent){const a=new LT(i,n);s.parent.apply(a),a.actionHandleResult&&this.flushEditorUI(t)}}flushEditorUI(e){const t=this.getExtensionContext(e.host);if(t){const{host:n,flushValue:i}=t;i(n.value)}}}class es extends ye{constructor(e,t,n,i,s){super(e,n,i,s),this.dtoName=es.dtoName,this.type="token",this.token=t,this.text=n}static from(e,t){const n=new es(e.id,e.token,e.text,t);return e.annotations&&(n.annotationMap=this.generateTextAnnotationMap(e.annotations)),n}toJSON(){const e=super.toJSON();return Object.assign({id:this.id,type:this.type,text:this.text,token:this.token},e.annotations?{annotations:e.annotations}:{})}isContentEditable(){return!1}clone(e){return new es(this.id,this.token,this.text,e,this.annotationMap)}toHtml(){return`<span class="token" contenteditable="false" template-token-key="${this.token}" token-key="${this.token}"${super.generateAttributeString()}>${this.text}</span>`}}es.dtoName="RTETokenNode";class RT extends Jt{doRender(e,t,n){const{id:i,token:s}=t;return e("span",Object.assign(Object.assign({key:i,"template-token-key":s,"token-key":s,contenteditable:"false",style:t.getStyles(),class:`token ${t.getClasses()}`},this.additionalAttributes(t)),{ref:this.useRef(t),onClick:a=>{a.preventDefault(),n&&n.editable!==!1&&this.handleTokenElementClick(a,t,n.host)}}),t.text)}injectRTEScopeStyles(){return"span[token-key]{padding: 0 2px; margin: 0 1px; background-color: rgba(var(--v-bg-status-info, 205,209,211))}"}handleTokenElementClick(e,t,n){e.preventDefault(),n&&n.value.apply(new xt(t,void 0,!0))}additionalAttributes(e){const t=e.getCustomAttributesAnnotation();let n={wrapped:"true"};return t&&(n=Object.assign(Object.assign({},n),t.render())),n}}class OT extends gs{constructor(e,t,n=""){super(),this.languageList=[],this.languageChangeCallback=null,this.selectedLanguage="",this.labelRef=null,this.handleDropdownClick=i=>{this.setSelectedLanguage(i),typeof this.languageChangeCallback=="function"&&this.languageChangeCallback(i)},this.languageList=e,this.languageChangeCallback=t,this.selectedLanguage=n}setSelectedLanguage(e){this.selectedLanguage=e,this.labelRef&&(this.labelRef.textContent=this.getLanguageLabelByKey(e))}isHidden(){return!1}render(e,t){return this.renderDropdown(e,t,{source:this.languageList},[this.renderButton(e,t,{label:this.getLanguageLabelByKey(this.selectedLanguage),showArrowIcon:!0,tooltip:{text:"Select language"}})])}renderButtonLabel(e,t,n){const i=this.isDisabled(t);return e("vega-font",{variant:"font-field-label-sm",color:i?"text-disabled":"text-primary",ref:s=>{this.labelRef=s}},n)}handleButtonClick(e){}getLanguageLabelByKey(e){var t;const n=this.getListItemByKey(this.languageList,e);return(t=n==null?void 0:n.label)!==null&&t!==void 0?t:"Select Language"}}class DT extends se{constructor(e,t){super(),this.languageToolbarButtonRenderer=null,this.languageState={selectedLanguage:"",contentMap:{}},this.languageChangeCallBack=n=>{const i=this.languageState.selectedLanguage;this.extensionContext&&i&&(this.languageState.contentMap[i]=this.getRTELatestValue(this.extensionContext.host)),this.languageState.selectedLanguage=n,this.applyLanguageContent(n,this.languageState.contentMap)},this.languageList=e,t&&(this.languageState=Object.assign(Object.assign({},this.languageState),t)),!this.languageState.selectedLanguage&&e.length>0&&(this.languageState.selectedLanguage=e[0].key)}prepareBeforeLoad(e){this.languageToolbarButtonRenderer=new OT(this.languageList,this.languageChangeCallBack,this.languageState.selectedLanguage),this.registerToolbarButtonRenderer("languages",this.languageToolbarButtonRenderer,e)}initialExtensionAfterLoad(e){super.initialExtensionAfterLoad(e);const{selectedLanguage:t,contentMap:n}=this.languageState;this.languageToolbarButtonRenderer&&this.languageToolbarButtonRenderer.setSelectedLanguage(t),n&&n[t]&&this.applyLanguageContent(this.languageState.selectedLanguage,this.languageState.contentMap)}setState(e){const{selectedLanguage:t,contentMap:n}=e;this.languageToolbarButtonRenderer&&this.languageToolbarButtonRenderer.setSelectedLanguage(t),this.languageState.selectedLanguage=t,this.languageState.contentMap=Object.assign({},n),this.applyLanguageContent(t,n)}getState(){const{selectedLanguage:e,contentMap:t}=this.languageState;return this.extensionContext&&(t[e]=this.getRTELatestValue(this.extensionContext.host)),this.languageState}applyLanguageContent(e,t){if(this.extensionContext&&t){let n=t[e];const{host:i,flushValue:s}=this.extensionContext;n?n=n instanceof De?n:De.fromJSON(n,i.sourceEditConfig):n=De.createEmptyContent(),i.value!==n&&s(n,!0)}}getRTELatestValue(e){var t;let n=e.value;if(this.extensionContext&&this.extensionContext.isSourceEditMode()&&e.shadowRoot){const i=e.shadowRoot.querySelector(".source-view-container vega-code-block");if(i){let s;e.sourceEditConfig&&(s={autoMatchFormat:(t=e.sourceEditConfig.autoMatchFormat)!==null&&t!==void 0?t:!0,filterInlineStyles:e.sourceEditConfig.filterInlineStyles}),n=De.fromHtml(i.value.code,s)}}return n}}const Ms="INSERT_FUNCTION_BLOCK";class NT extends ue{constructor(e){super(),this.type=Ms,this.functionType=e}}class Kt extends it{constructor(e){super(e),this.dtoName=Kt.dtoName,this.type="function-block",this.children=[]}static from(e,t){const n=new Kt(e.id),i={customClass:["statement"]};let{annotations:s}=e;return s=s?Object.assign(Object.assign({},s),i):i,super.convertAnnotationsToMap(n.annotationMap,s),n.children=this.generateBlockChildren(e.children,t,n),n}toHtml(){return`<div class="statement">${this.children.map(t=>t instanceof te?`<div class="statementelement"${this.getFunctionContentStyle(t)}>${t.getChildrenHtml()}</div>`:t.toHtml()).join("")}</div>`}clone(e){const t=new Kt(Q());return t.parent=e,t.children=this.children.map(n=>n.clone(t)),t.annotationMap=super.cloneAnnotations(),t}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,children:this.children.map(e=>e.toJSON())})}getFunctionContentStyle(e){const t=new Ma(e);let n=t.toCssText({standalone:!0});const i=e.getAnnotationByType("TEXT_STYLE");if(i&&i.textStyle==="paragraph"){const s=t.toCssText(void 0,void 0,i.renderStyle({standalone:!0}));n=n.replace(s,"").trim()}return n?` style="${n}"`:""}}Kt.dtoName="RTEFunctionBlock";class IT extends ne{handleAction(e,t){const{functionType:n}=e,i=this.getFunctionBlock(n),s=this.createNewParagraph(""),a=this.getReferenceBlock(t);a?a.parent.apply(new we(a,i,s)):t.apply(new Re([i,s])),s&&(e.nextFocusNode=s.children[0])}getFunctionBlock(e){const t=Q();return Kt.from({id:t,type:"function-block",children:[{id:`${t}-1`,type:"logic-control-block",statementText:e.toUpperCase()},{id:`${t}-2`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${t}-2-1`,type:"text",text:" "}]},{id:`${t}-3`,type:"logic-control-block",statementText:"SHOW"},{id:`${t}-4`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${t}-4-1`,type:"text",text:" "}]}]})}getReferenceBlock(e){if(!(e instanceof De)){const t=e.parent;return t instanceof Kt?t:e}}}class Ga extends ls{constructor(e,t,n){super(e),this.dtoName=Ga.dtoName,this.type="logic-control-node",this.text="",this.text=t,this.parent=n}clone(){return new Ga(this.id,this.text,this.parent)}toHtml(){return this.text}toJSON(){return{id:this.id,type:this.type,text:this.text}}getRangeEndOffset(){return 1}getRangeContainer(){const e=Pe.getDOMByEntity(this);if(e)return e.parentElement}isContentEditable(){return!1}}Ga.dtoName="RTELogicControlNode";class Qr extends it{constructor(e,t,n){super(e),this.dtoName=Qr.dtoName,this.type="logic-control-block",this.children=[],this.statementText="",this.statementText=t,this.children=[new Ga(`${e}-node-1`,t,this)],n&&(this.parent=n)}static from(e){return new Qr(e.id,e.statementText)}isNotEmpty(){return!0}getLastNode(){return this.children[this.children.length-1]}toHtml(){return`<div class='statementsyntax' contenteditable='false'>${this.statementText}</div>`}clone(e){return new Qr(this.id,this.statementText,e)}toJSON(){return{id:this.id,type:this.type,statementText:this.statementText}}}Qr.dtoName="RTELogicControlBlock";class ru extends gs{render(e,t){return this.renderDropdown(e,t,{},[this.renderButton(e,t,{label:"Functions",showArrowIcon:!0,tooltip:{text:"Insert function"}}),this.renderDropdownListTemplate(e,ru.FUNCTION_LIST)])}isDisabled(e){const t=this.getExtensionContext(e.host);if(t){const{host:n,getSelectedNodes:i}=t,s=i()[0];let a=!0;return s&&(a=q.canHandle(Ms,s.parent)),n.disabled||!a}return!1}handleButtonClick(){throw new Error("Method not implemented.")}handleDropdownClick(e,t){if(t){const n=this.getExtensionContext(t.host);if(n){const{host:i,getSelectedNodes:s}=n,a=s()[0],o=new NT(e);a?a.parent&&a.parent.apply(o):i.value.apply(o),o.nextFocusNode&&i.value.apply(new xt(o.nextFocusNode,1))}}}}ru.FUNCTION_LIST=[{key:"IF",label:"Conditional"},{key:"FOREACH",label:"Foreach"}];class BT extends Jt{doRender(e,t){return e("div",{key:t.id,class:"statementsyntax",ref:this.useRef(t)},e("span",{key:`${t.id}-1`,contenteditable:"false",ref:this.useRef(t.children[0])},t.statementText))}}class Cy extends hr{constructor(){super(...arguments),this.blockClassName="statementsyntax"}canHandle(e,t){const n=e[t];return n&&n.nodeType===Node.ELEMENT_NODE&&n.classList.contains(this.blockClassName)&&this.isFunctionBlockChild(n)?1:0}handle(e){const t=e[0];return Qr.from({id:Q(),type:"logic-control-block",statementText:t.innerText})}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isFunctionBlockChild(e){return!!(e.parentElement&&e.parentElement.classList.contains("statement"))}}class MT extends fs{canHandle(e,t){const n=e[t];return n&&n.tagName==="DIV"&&n.classList.contains("statement")&&n.childNodes.length&&n.querySelector(".statementsyntax")?1:0}handle(){return Kt.from({id:Q(),type:"function-block",annotations:{customClass:["statement"]},children:[]})}appendChildBlocks(e,t){e.children=t.map(n=>(n.parent=e,n))}shouldProceedToElementChildren(){return!0}}class PT extends Cy{constructor(){super(...arguments),this.blockClassName="statementelement"}handle(e,t){const n=e[0],i=ze.generate(te,n),s=Array.from(e[0].childNodes);return te.from({id:Q(),type:"paragraph",annotations:Object.assign({customClass:[this.blockClassName]},i),nodes:this.generateChildNodes(s,void 0,t)})}}const FT="div.statement{padding:2px 4px;background:rgba(var(--v-bg-accent3-secondary, 255, 239, 200));border:1px solid rgba(var(--v-bg-accent3-primary, 255, 220, 131));border-radius:4px;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;gap:4px}div.statement .statementsyntax{padding:3px 0;line-height:22px}.rich-text-content div.statement .statementsyntax,.rich-text-content div.statement .statementelement{display:inline-block}div.statement+div.statement{margin-top:2px}div.statement .statementsyntax span{color:rgb(38, 42, 255);font-weight:bold}div.statement .statementelement{padding:2px 4px;background:rgba(var(--v-bg-secondary, 245, 247, 247));border:1px solid rgba(var(--v-border-color-input-field, 171, 198, 216));border-radius:4px;margin:0;min-width:8px}";class HT extends Jt{doRender(e,t){return e("div",{key:t.id,class:this.getElementClassName(t),ref:this.useRef(t)})}injectRTEScopeStyles(){return FT}getElementClassName(e){let t=e.getClasses();return t.indexOf("statement")<0&&(t="statement "+t),t.trim()}}class ml{}class Ey extends ml{canIntercept(e,t){return t.parent&&t.parent instanceof Kt}intercept(e,t,n){const i=new Y_(n.children[0],0);i.isFlushable=!0,n.parent.apply(i)}}class jT extends ne{handleAction(e,t){const n=this.createNewParagraph("");n&&(t.parent.apply(new we(t,n)),e.newBlock=n,this.focusToNextLine(n))}focusToNextLine(e){const t=this.getRootContent(e);t&&t.apply(new xt(e.children[0],1))}}const xy="PASTE_PLAIN_TEXT";class $T extends ue{constructor(e,t,n){super(),this.type=xy,this.blocksToBeInserted=e,this.startNode=t,this.startOffset=n}}class VT extends Ey{intercept(e,t,n){const{blocksToBeInserted:i,rteRange:s}=t;let{startNode:a,startOffset:o}=t;s&&(a=s.startNode,o=s.startOffset);const l=new $T(i,a,o);n.apply(l)}}class zT extends ne{handleAction(e,t){const{blocksToBeInserted:n,startNode:i,startOffset:s}=e;if(i instanceof ye){const a=n.flatMap(o=>o instanceof te?(this.copyLinkGroupAnnotations(t.annotationMap,o.annotationMap),o.children):[]);a.length>0&&(s>0?t.apply(new we(i,...a)):t.apply(new Ve(i,...a)),this.focusToNextLine(a[a.length-1],a[a.length-1].getRangeEndOffset()))}}focusToNextLine(e,t){const n=this.getRootContent(e);n&&n.apply(new xt(e,t))}copyLinkGroupAnnotations(e,t){if(t&&t.has(Je.LINK_GROUP)){const n=t.get(Je.LINK_GROUP);e.has(Je.LINK_GROUP)?n.linkGroups.forEach((i,s)=>{e.get(Je.LINK_GROUP).linkGroups.set(s,i)}):e.set(Je.LINK_GROUP,t.get(Je.LINK_GROUP))}}}const UT=new Cy,WT=new PT,GT=new MT;class KT extends se{constructor(){super(),this.registerBlockBasicStrategies(Qr.name),this.registerBlockBasicStrategies(Kt.name),this.preventFunctionBlockDefaultInsertNewParagraph(),this.registerNode("logic-control-block",Qr),this.registerRenderer("logic-control-block",new BT),this.registerNode("function-block",Kt),this.registerRenderer("function-block",new HT),this.registerElementToBlockDTOClassStrategy(UT),this.registerElementToBlockDTOClassStrategy(WT),this.registerElementToBlockDTOClassStrategy(GT)}prepareBeforeLoad(e){this.registerToolbarButtonRenderer("functions",new ru,e)}preventFunctionBlockDefaultInsertNewParagraph(){this.unRegisterStrategy(J.INSERT_NEW_PARAGRAPH,Qr.name),this.unRegisterStrategy(J.APPEND_CHILDREN,Kt.name),this.unRegisterStrategy(J.INSERT_CHILDREN_AFTER,Kt.name),this.unRegisterStrategy(J.INSERT_CHILDREN_BEFORE,Kt.name),this.unRegisterStrategy(J.PASTE_CONTENT,Qr.name),se.registerActionHandleStrategy(Kt.name,J.INSERT_NEW_PARAGRAPH,new jT)}}(()=>{const r=new IT;se.registerActionHandleStrategy(De.name,Ms,r),se.registerActionHandleStrategy(te.name,Ms,r),se.registerActionHandleStrategy(Ye.name,Ms,r),se.registerActionHandleStrategy(Qr.name,Ms,r),se.registerActionHandleStrategy(te.name,xy,new zT),se.registerActionHandlerInterceptor(te.name,J.INSERT_NEW_PARAGRAPH,new Ey),se.registerActionHandlerInterceptor(te.name,J.PASTE_CONTENT,new VT)})();const qT=".v-rte--extension-table-container{display:table}table.v-rte--extension-table{border-collapse:collapse}table.v-rte--extension-table th,table.v-rte--extension-table td{border:1px solid #ddd;padding:12px;text-align:left;vertical-align:middle;min-width:55px;box-sizing:border-box;position:relative}table.v-rte--extension-table th{background-color:#f2f2f2}.rte-table-setting-popover,.rte-table-dynamic-popover{display:block}table.v-rte--extension-table .v-rte-table-cell-focused::after,table.v-rte--extension-table .v-rte-table-cell-selected::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;background-color:rgba(158, 207, 250, 0.3)}table.v-rte--extension-table:has(.v-rte-table-cell-selected){caret-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::selection{background-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::-moz-selection{background-color:transparent}.v-rte--extension-table-caption{padding:8px;border:1px solid #ddd;border-bottom:none;background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));position:relative;display:table-caption;caption-side:top;min-height:22px;text-align:center;word-break:break-word;overflow-wrap:break-word}.v-rte--extension-table-caption.showPlaceholder::before{position:absolute;left:0;right:0;content:attr(data-placeholder);font-family:'Inter', sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",yc="DELETE_TABLE_BLOCK";class XT extends ue{constructor(e){super(),this.isFlushable=!0,this.type=yc,this.tableBlock=e}}class co extends dr{constructor(){super(...arguments),this.type=Et.CAPTION}static getDefaultStyles(){return{padding:"8px",border:"1px solid #ddd",borderBottom:"none",position:"relative",textAlign:"center",minHeight:"22px"}}clone(){return new co}renderClass(e){return e!=null&&e.standalone?null:"v-rte--extension-table-caption"}renderStyle(e){return e!=null&&e.standalone?Object.assign(Object.assign({},co.getDefaultStyles()),{backgroundColor:this.getCaptionBackgroundColor()}):null}toJSON(){return{caption:!0}}getCaptionBackgroundColor(){return Br.isDarkMode()?cs.dark:cs.light}}var ZT=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t};class $r extends it{constructor(e,t){super(e),this.dtoName=$r.dtoName,this.type="table-caption";const{autoMatchFormat:n}=t||{autoMatchFormat:!0};n&&this.annotationMap.set(Et.CAPTION,new co)}static from(e,t){const n=new $r(e.id,t),i=e.annotations||{},{caption:s}=i,a=ZT(i,["caption"]);return s&&n.annotationMap.set(Et.CAPTION,new co),super.convertAnnotationsToMap(n.annotationMap,Object.assign({},a)),n.children=super.generateBlockChildren(e.children,t,n),n}clone(e){const t=new $r(this.id);return t.children=this.children.map(n=>n.clone(t)),t.parent=e,t.annotationMap=super.cloneAnnotations(),t}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0&&this.children.some(e=>e.isNotEmpty())}toHtml(e){const t=this.children.map(i=>i.toHtml(e)).join("");return`<caption${super.generateAttributeString(e)}>${t}</caption>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map(e=>e.toJSON())})}}q.register(J.INSERT_CHILDREN_BEFORE,$r.name,new Gd),q.register(J.PASTE_CONTENT,$r.name,new J_);$r.dtoName="RTETableCaptionBlock";const YT="TOGGLE_TABLE_CAPTION";class JT extends ue{constructor(e){super(),this.type=YT,this.isFlushable=!0,this.shouldEnable=e}}class QT extends gl{canHandle(e){return e[0]===jt.CAPTION}execute(e,t,n){const i=e[1]==="rte-table-caption",s=new JT(i),a=n.getCaption();if(i){const o=a&&a.isNotEmpty()?a:this.createCaptionBlock(a==null?void 0:a.id);(!a||o!==a)&&n.setCaption(o),s.nextFocusNode=o.getLastNode()}else a&&(n.setCaption(null),s.nextFocusNode=n.getFirstNode());this.syncCursorPosition(n,s.nextFocusNode)}syncCursorPosition(e,t){super.syncCursorPosition(e,t)}createCaptionBlock(e){const t={id:e??Q(),type:"table-caption",children:[{id:Q(),type:"paragraph",nodes:[{id:Q(),type:"text",text:""}]}]};return $r.from(t)}}class nu{static generateTablePropertiesForm(e){const t=e.annotationMap.get(Et.TABLE);let n={borderStyle:"none",borderColor:"",borderWidth:"",backgroundColor:"",width:"",height:"",textAlign:"center"};if(t){const i=t.toJSON().table,{style:s="none",color:a="",width:o=""}=i.border||{style:"none",color:"",width:""};n={backgroundColor:i.backgroundColor||"",width:i.width||"",height:i.height||"",textAlign:i.alignment,borderStyle:s,borderColor:a,borderWidth:o}}return n}updateCursorPosition(e,t){e&&t&&e.host.value.apply(new xt(t,0))}}var e8=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t};class wg extends Yt{constructor(e){super(),this.isFlushable=!0;const{textAlign:t,width:n,borderWidth:i,borderColor:s,borderStyle:a,height:o}=e,l=e8(e,["textAlign","width","borderWidth","borderColor","borderStyle","height"]);this.tableProperties=Object.assign(Object.assign({},l),{alignment:t,border:{style:a,color:s,width:i?Wi(i):""},width:n?Wi(n):"",height:o?Wi(o):""})}toAnnotation(){return new Gt(this.tableProperties)}}class t8 extends nu{handle(e,t,n,i){t.apply(new wg(n)),this.updateCursorPosition(e,i)}}class r8 extends nu{handle(e,t,n,i){e&&e.host&&(e.flushValue(e.host.value),this.updateCursorPosition(e,i))}}class n8 extends nu{handle(e,t,n){const i=new wg(n);i.isFlushable=!1,t.apply(i)}}class Sg extends Yt{constructor(e,t){super(),this.isFlushable=!0,this.cellAnnotation=e,this.originAnnotation=t}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}updateOriginAnnotation(){Object.keys(this.cellAnnotation).forEach(e=>{this.originAnnotation[e]=this.cellAnnotation[e]})}}class Ty extends Sg{constructor(e,t){super(e,t),this.isFlushable=!0}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}}var j0=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t};class Ka{static getStyleCollectionFromCell(e){return e.reduce((t,n)=>{const i=n.getAnnotationByType(Et.CELL);if(t[n.id]={},i){const s=i.toJSON().tableCell,{border:a}=s,o=j0(s,["border"]),l={};a&&(l.borderStyle=a.style,l.borderColor=a.color,l.borderWidth=a.width),t[n.id]=Vt(Object.assign(Object.assign({},o),l))}return t},{})}static convertStyleMapToFormField(e){const t={};for(const s in e){const a=e[s];for(const o in a)t[o]?t[o].push(a[o]):t[o]=[a[o]]}const n=Object.keys(e).length,i={};for(const s in t){const a=t[s],o=new Set(a);a.length===n&&o.size===1&&(i[s]=a[0])}return i}applyProperties(e,t,n){e.tableSelection.getSelectedCells().forEach(s=>{const a=t[s.id];if(a){const o=this.convertToVegaTableCellAnnotation(Object.assign({},a));this.applyAnnotation(s,o,n)}})}updateCursorPosition(e,t){e&&t&&e.host.value.apply(new xt(t,0))}convertToVegaTableCellAnnotation(e){const{borderStyle:t,borderWidth:n,borderColor:i}=e,s=j0(e,["borderStyle","borderWidth","borderColor"]),a=Vt({style:t,width:n?Wi(n):"",color:i});return Vt(Object.assign(Object.assign({},s),{backgroundColor:s.backgroundColor||"",padding:s.padding?Wi(s.padding):"",width:s.width?Wi(s.width):"",height:s.height?Wi(s.height):"",verticalAlign:s.verticalAlign||"",textAlign:s.textAlign||"",border:a}))}applyAnnotation(e,t,n){const i=e.getAnnotationByType(Et.CELL)||new he({},!1),s=e instanceof ke?new Ty(t,i):new Sg(t,i);s.isFlushable=n,e.apply(s)}}class i8 extends Ka{handle(e,t,n){e&&e.host&&(e.flushValue(e.host.value),this.updateCursorPosition(e,n))}}class s8 extends Ka{handle(e,t){this.applyProperties(e,t,!1)}}class o8 extends Ka{handle(e,t,n){this.applyProperties(e,t,!0),this.updateCursorPosition(e,n)}}class Cg{constructor(e){this.renderContext=e}getTableExtensionContext(){return this.renderContext?tu.getExtensionContext(this.renderContext.host):null}}class a8 extends Cg{constructor(e,t){super(t),this.popoverCloseType="none",this.tablePropertiesHandlerMap={save:new r8,cancel:new t8,change:new n8},this.cellPropertiesHandlerMap={save:new i8,cancel:new o8,change:new s8},this.handleTablePropertiesUpdate=n=>{const i=n.type.replace("vega","").toLowerCase();this.popoverCloseType=i,i!=="change"&&this.hide();const s=this.getTableExtensionContext();s&&this.tablePropertiesHandlerMap[i].handle(s,this.currentTableBlock,n.detail,this.currentFocusNode),i==="change"&&this.popoverRef.show(!0)},this.handleCellPropertiesUpdate=n=>{const i=n.type.replace("vega","").toLowerCase();this.popoverCloseType=i,i!=="change"&&this.hide();const s=this.getTableExtensionContext();s&&this.cellPropertiesHandlerMap[i].handle(s,n.detail,this.currentFocusNode),i==="change"&&this.popoverRef.show(!0)},this.tableColorSchema=e}destroy(){this.selectionAnchorRef&&this.selectionAnchorRef.parentNode&&(rn.removeUniqueObserverFromNode(this.selectionAnchorRef,Ef),this.selectionAnchorRef.parentNode.removeChild(this.selectionAnchorRef),this.selectionAnchorRef=null)}async show(e){let t=this.getTableRef();const n=this.getTableExtensionContext();let i=[];if(n&&(i=n.tableSelection.getSelectedCells()),e===jt.CELL&&i.length>1){const s=this.getOrCreateSelectionAnchor(i,t);s&&(t=s)}else e===jt.CELL&&i.length===1&&(t=Pe.getDOMByEntity(i[0]));this.updateContent(e),this.storeCurrentFocusNode(),wy.call(Zt.getSubject(this.popoverRef,E_),t),await this.popoverRef.show()}async hide(){await this.popoverRef.hide()}reTarget(e,t){this.getTableRef=t,this.currentTableBlock=e}render(){const e=br();if(e){const t=e.createElement("vega-popover");t.trigger="click",t.isScreenPosition=!0,t.className="rte-table-dynamic-popover",rn.addUniqueObserverToNode(t,w_,()=>{const a=this.getTableExtensionContext();this.popoverCloseType==="change"&&a&&a.flushValue(a.host.value)});const n=e.createElement("div");n.setAttribute("slot","popover"),n.className="rte-table-dynamic-popover-content";const i=e.createElement("vega-rich-text-table-properties");i.colors=this.tableColorSchema,i.type=jt.TABLE,i.setAttribute("type",jt.TABLE),i.addEventListener("vegaCancel",this.handleTablePropertiesUpdate),i.addEventListener("vegaChange",this.handleTablePropertiesUpdate),i.addEventListener("vegaSave",this.handleTablePropertiesUpdate);const s=e.createElement("vega-rich-text-table-properties");return s.colors=this.tableColorSchema,s.type=jt.CELL,s.setAttribute("type",jt.CELL),s.addEventListener("vegaCancel",this.handleCellPropertiesUpdate),s.addEventListener("vegaChange",this.handleCellPropertiesUpdate),s.addEventListener("vegaSave",this.handleCellPropertiesUpdate),n.appendChild(i),n.appendChild(s),t.appendChild(n),this.popoverRef=t,this.tablePropertiesFormRef=i,this.cellPropertiesFormRef=s,t}}updateContent(e){this.popoverCloseType="none";const t=this.getTableExtensionContext();e==="TABLE"?(this.tablePropertiesFormRef.classList.remove("vega-hidden"),this.cellPropertiesFormRef.classList.add("vega-hidden"),this.tablePropertiesFormRef.defaultValue=nu.generateTablePropertiesForm(this.currentTableBlock)):e==="CELL"&&(this.cellPropertiesFormRef.classList.remove("vega-hidden"),this.tablePropertiesFormRef.classList.add("vega-hidden"),t&&(this.cellPropertiesFormRef.styleMap=Ka.getStyleCollectionFromCell(t.tableSelection.getSelectedCells())),this.cellPropertiesFormRef.defaultValue=Ka.convertStyleMapToFormField(this.cellPropertiesFormRef.styleMap)),t&&t.getSelection().removeAllRanges()}storeCurrentFocusNode(){const e=this.getTableExtensionContext();e&&(this.currentFocusNode=e.getSelectedNodes()[0])}getOrCreateSelectionAnchor(e,t){const n=br();if(n&&t){const i=t.closest(".rich-text-content"),s=i.getBoundingClientRect();let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;e.map(g=>Pe.getDOMByEntity(g)).filter(Te).forEach(g=>{const _=g.getBoundingClientRect();a=Math.min(a,_.left-s.left),o=Math.max(o,_.right-s.left),l=Math.min(l,_.top-s.top),c=Math.max(c,_.bottom-s.top)});const u=o-a,d=c-l;return this.selectionAnchorRef=i.querySelector(".rte-table-selection-popover-anchor"),this.selectionAnchorRef||(this.selectionAnchorRef=n.createElement("div"),this.selectionAnchorRef.className="rte-table-selection-popover-anchor",this.selectionAnchorRef.style.position="absolute",this.selectionAnchorRef.style.pointerEvents="none",i.appendChild(this.selectionAnchorRef),rn.addUniqueObserverToNode(this.selectionAnchorRef,Ef,()=>{this.destroy()})),this.selectionAnchorRef.style.left=`${a}px`,this.selectionAnchorRef.style.top=`${l}px`,this.selectionAnchorRef.style.width=`${u}px`,this.selectionAnchorRef.style.height=`${d}px`,this.selectionAnchorRef}}}class l8 extends Cg{constructor(e){super(e),this.settingHandlers=[new K6,new QT,new eT,new j6,new nT],this.handleTableClick=(t,n,i)=>{const a=t.target.closest("table");a===i()&&(t.stopPropagation(),this.reTarget(n,i),this.tableDynamicPopover.hide(),wy.call(Zt.getSubject(this.popoverRef,E_),a),this.popoverRef.show(!0))},this.syncSelectedCells=()=>{this.tableSettingRef&&(this.tableSettingRef.selectedCells=this.getTableSelectedCells())},this.handleSettingMenuClick=t=>{const n=this.settingHandlers.find(i=>i.canHandle(t.detail));if(n){const i=this.getTableExtensionContext();i&&n.execute(t.detail,i,this.tableBlock),t.detail[0]===jt.CAPTION&&this.updateTableSettingCaption()}(t.detail[0]===jt.TABLE||t.detail[0]===jt.CELL)&&(this.popoverRef.hide(),this.tableDynamicPopover.show(t.detail[0]))},this.handleTableSettingPopoverShow=()=>{this.syncSelectedCells()},this.tableDynamicPopover=new a8(Hr.getTableColors(),e)}destroy(){this.tableDynamicPopover.destroy(),this.popoverContainer&&this.popoverContainer.remove()}render(){const e=br();if(e&&this.renderContext){this.popoverContainer=e.createElement("div"),this.renderContext.host.appendChild(this.popoverContainer);const t=this.tableDynamicPopover.render(),n=e.createElement("vega-popover");n.trigger="click",n.isScreenPosition=!0,n.className="rte-table-setting-popover",rn.addUniqueObserverToNode(n,jd,this.handleTableSettingPopoverShow);const i=e.createElement("div");i.setAttribute("slot","popover");const s=e.createElement("vega-rich-text-table-setting");s.addEventListener("vegaClick",this.handleSettingMenuClick),i.appendChild(s),n.appendChild(i),this.popoverContainer.appendChild(n),this.popoverContainer.appendChild(t),this.popoverRef=n,this.tableSettingRef=s}}updateTableSettingCaption(){const e=this.tableBlock.hasCaption();this.tableSettingRef&&this.tableSettingRef.hasCaption!==e&&(this.tableSettingRef.hasCaption=e)}reTarget(e,t){this.tableSettingRef&&(this.tableBlock=e,this.tableSettingRef.target=t(),this.tableSettingRef.selectedCells=this.getTableSelectedCells(),this.tableDynamicPopover.reTarget(e,t))}getTableSelectedCells(){let e=[];const t=this.getTableExtensionContext();if(t&&t.tableSelection){const{tableSelection:n}=t;e=n.getSelectedCells()}return e}}class c8 extends Jt{doRender(e,t,n){let i;const s=this.renderTable(e,t,u=>i=u);this.renderTableToolbar(n);const a=t.getAnnotationByType(Et.TABLE),o=n.editable?[e("vega-rich-text-table-selection-widget",{onVegaRemove:u=>{u.stopPropagation(),this.handleTableRemove(t,i)},onClick:u=>{this.tableToolbar&&this.tableToolbar.handleTableClick(u,t,()=>i)},onMouseLeave:()=>{this.tableToolbar&&this.tableToolbar.syncSelectedCells()}},[e("div",{contentEditable:!0,ref:this.useRef(t)},[s])])]:[s],l={};if(a){const u=a.renderStyle();l.width=u.width,l.margin=u.margin}const c=e("div",{class:"v-rte--extension-table-container",style:Object.assign({},l)},o);return c.childrenContainerGetter=()=>s,c}destroy(){this.destroyTableToolbar()}injectRTEScopeStyles(){return qT}renderTable(e,t,n){var i;return e("table",Object.assign(Object.assign({key:t.id},(i=t.getCustomAttributesAnnotation())===null||i===void 0?void 0:i.render()),{style:t.getStyles(),class:t.getClasses(),ref:s=>{this.useRef(t)(s),n(s)}}))}handleTableRemove(e,t){e.parent.apply(new XT(e)),this.destroySelectionAnchor(t)}destroySelectionAnchor(e){const t=e.closest(".rich-text-content");if(t){const n=t.querySelector(".rte-table-selection-popover-anchor");n&&Ke.notify(Zt.getSubject(n,Ef),{host:n})}}renderTableToolbar(e){if(!e.editable){this.destroyTableToolbar();return}this.tableToolbar||(this.tableToolbar=new l8(e),this.tableToolbar.render())}destroyTableToolbar(){var e;(e=this.tableToolbar)===null||e===void 0||e.destroy(),this.tableToolbar=null}}class d8 extends Jt{doRender(e,t){return e("thead",{key:t.id,ref:this.useRef(t)})}}class u8 extends Jt{doRender(e,t){return e("tr",{key:t.id,ref:this.useRef(t)})}}class ky extends Jt{doRender(e,t,n){return this.renderByCellType(e,t,n,"td")}renderByCellType(e,t,n,i){var s;return e(i,Object.assign(Object.assign(Object.assign({key:`${t.id}-${i}`,ref:this.useRef(t)},(s=t.getCustomAttributesAnnotation())===null||s===void 0?void 0:s.render()),{style:t.getStyles(n),class:t.getClasses()}),n.editable?this.onSelectionListeners(t,n):void 0))}onSelectionListeners(e,t){return{onMouseDown:n=>{const i=ed(n.target,"table"),a=ed(n.currentTarget,"table")===i,o=n.target.closest("td, th");if(a&&o){const l=this.getExtensionContext(t.host);l&&l.tableSelection.focusCell(o)}},onMouseMove:n=>{n.stopPropagation(),n.preventDefault();const i=this.getExtensionContext(t.host);i&&i.tableSelection.dragOver(e)},onMouseUp:()=>{const n=this.getExtensionContext(t.host);n&&n.tableSelection.endDrag()}}}}class h8 extends Jt{doRender(e,t){return e("tbody",{key:t.id,ref:this.useRef(t)})}}class f8 extends ky{doRender(e,t,n){return super.renderByCellType(e,t,n,"th")}}const oa="INSERT_TABLE_BLOCK";class p8 extends ue{constructor(e,t){super(),this.type=oa,this.rowCount=e,this.columnCount=t}}const g8={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M48 264V160H232V264H48zm0 48H232V432H64c-8.8 0-16-7.2-16-16V312zM280 432V312H464V416c0 8.8-7.2 16-16 16H280zM464 264H280V160H464V264zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"/></svg>'};class m8 extends Cg{constructor(){super(...arguments),this.hoveredRows=1,this.hoveredCols=1}render(e,t){return e("vega-popover",{trigger:"click",alignment:"start",placement:"bottom",showArrow:!1,ref:n=>{n&&(this.tablePickerPopoverRef=n,rn.addUniqueObserverToNode(n,jd,()=>{this.resetPicker()}))}},[e("div",{slot:"popover"},[this.generatePickerStyles(e),this.generateTableSizeGrid(e)]),e("div",{slot:"popover-content"},t)])}generateTableSizeGrid(e){const i=[];for(let s=1;s<=10;s++)for(let a=1;a<=10;a++)i.push(e("button",{class:"rte-table-picker__cell","data-row":s,"data-col":a,onMouseenter:this.handlePickerCellHover.bind(this,s,a),onClick:this.handlePickerClick.bind(this,s,a)},[]));return e("div",{class:"rte-table-picker"},[e("div",{class:"rte-table-picker__grid",ref:s=>{s&&(this.tablePickerGridRef=s)},style:{gridTemplateColumns:"repeat(10, 16px)",gridTemplateRows:"repeat(10, 16px)"}},i),e("div",{class:"rte-table-picker__hint"},e("vega-hint",{ref:s=>{s&&(this.selectedHintRef=s)}},[`${this.hoveredRows} × ${this.hoveredCols}`]))])}generatePickerStyles(e){return e("style",{},[`
|
|
83
|
+
.rte-table-picker__grid { display: grid; gap: 2px; }
|
|
84
|
+
.rte-table-picker__cell {
|
|
85
|
+
box-sizing: border-box;
|
|
86
|
+
border: 1px solid #ccc;
|
|
87
|
+
background-color: transparent;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
}
|
|
90
|
+
.rte-table-picker__cell:hover {
|
|
91
|
+
background-color: #cae1fc;
|
|
92
|
+
}
|
|
93
|
+
.rte-table-picker__cell.active {
|
|
94
|
+
background-color: #cae1fc;
|
|
95
|
+
}
|
|
96
|
+
.rte-table-picker__hint {
|
|
97
|
+
text-align: center;
|
|
98
|
+
}
|
|
99
|
+
`])}createTable(e,t){const n=this.getTableExtensionContext();if(n){const{host:i,getSelectedNodes:s}=n,a=s()[0],o=new p8(e,t);a?a.parent&&a.parent.apply(o):i.value.apply(o),o.nextFocusNode&&i.value.apply(new xt(o.nextFocusNode,1))}}handlePickerClick(e,t){this.createTable(e,t),this.tablePickerPopoverRef.hide()}handlePickerCellHover(e,t){this.hoveredRows=e,this.hoveredCols=t,Array.from(this.tablePickerGridRef.children).forEach(n=>{const i=Number(n.dataset.row),s=Number(n.dataset.col);i<=this.hoveredRows&&s<=this.hoveredCols?n.classList.add("active"):n.classList.remove("active")}),this.selectedHintRef.textContent=`${this.hoveredRows} × ${this.hoveredCols}`}resetPicker(){this.handlePickerCellHover(1,1)}}class v8 extends gs{render(e,t){return new m8(t).render(e,super.renderButton(e,t,{showArrowIcon:!0,icon:"rte-table",tooltip:{text:"Insert table"}}))}isDisabled(e){let t=super.isDisabled(e);const n=this.getExtensionContext(e.host);if(n){const{host:i,getSelectedNodes:s}=n,a=s()[0];let o=!0;a&&(o=q.canHandle(oa,a.parent)&&q.canHandle(J.INSERT_CHILDREN_AFTER,a.parent.parent)),t=i.disabled||!o}return t}handleButtonClick(){}handleDropdownClick(){}}pl.register({"rte-table":g8});class _8 extends ne{handleAction(e,t){const n=this.createTableBlock(e.rowCount,e.columnCount),i=super.createNewParagraph(""),s=this.getReferenceBlock(t);s?s.parent.apply(new we(s,n,i)):t.apply(new Re([n,i])),e.nextFocusNode=n.getFirstNode()}createTableBlock(e,t){const n=Math.max(e,1),i=Math.max(t,1);return Le.from({id:Q(),type:"table-block",children:[$6(n,i)]})}getReferenceBlock(e){if(!(e instanceof De))return e}}class y8 extends ml{canIntercept(e,t){const n=t.parent;return n instanceof He&&n.children.length===1&&e.startOffset===0}intercept(){}}class b8 extends ne{handleAction(e){const t=e.tableBlock,n=t.parent,i=super.getRootContent(t),s=super.createNewParagraph("");n.apply(new we(t,s)),n.apply(new _e(t)),i&&i.apply(new xt(s.getLastNode()))}}class $0 extends ml{canIntercept(e,t){return e.entityToBeRemoved&&t.children.length===1}intercept(e,t,n){if(!(t.entityToBeRemoved instanceof te)){const i=te.from({id:Q(),type:"paragraph",nodes:[{id:Q(),type:"text",text:""}]});n.children=[],n.apply(new Re([i]));return}t.entityToBeRemoved.apply(new Re([new ye(Q(),"",t.entityToBeRemoved)]))}}const w8="Enter table caption";class S8 extends Jt{doRender(e,t){return e("caption",{key:t.id,ref:this.useRef(t),style:t.getStyles(),class:[t.getClasses(),t.isNotEmpty()?null:"showPlaceholder"].filter(Te).join(" "),"data-placeholder":w8})}}class sn extends ne{getRowsMaxCellCount(e){let t=0;for(const n of e){let i=0;for(const s of n.children)i+=s.colSpan;t=Math.max(t,i)}return t}getRowCellStartCols(e){const t=this.getRowsMaxCellCount(e),n=new Array(e.length),i=new Array(t).fill(0);for(let s=0;s<e.length;s++){const o=e[s].children,l=new Array(o.length);let c=0;for(let u=0;u<o.length;u++){const d=o[u];for(;c<i.length&&i[c]>0;)c++;l[u]=c;const g=Math.max(d.colSpan,sn.DEFAULT_CELLSPAN);if(d.rowSpan>sn.DEFAULT_CELLSPAN)for(let _=0;_<g;_++){const y=c+_;y<i.length&&(i[y]=Math.max(i[y],d.rowSpan))}c+=g}n[s]=l;for(let u=0;u<i.length;u++)i[u]>0&&i[u]--}return n}updateCellSpan(e,t,n){const i=e.getCustomAttributesAnnotation();if(n<=sn.DEFAULT_CELLSPAN){if(i){const s=i.render();delete s[t],e.annotationMap.set(nt.CUSTOM_ATTRIBUTE,new an(s))}}else{const s=i?i.render():{};s[t]=n.toString(),e.annotationMap.set(nt.CUSTOM_ATTRIBUTE,new an(s))}}insertMovedCells(e,t,n){e.forEach((i,s)=>{const a=t[s];if(a){const o=n[s]||[];i.sort((l,c)=>l.logicalStartCol===c.logicalStartCol?c.cellIndex-l.cellIndex:c.logicalStartCol-l.logicalStartCol),i.forEach(l=>{const{cell:c,logicalStartCol:u}=l;if(a.children.length===0){a.apply(new Re([c])),o[0]=u;return}const d=o.findIndex(g=>g>=u);if(d===-1){const g=a.children[a.children.length-1];a.apply(new we(g,c)),o.push(u)}else d===0?(a.apply(new Ve(a.children[0],c)),o.unshift(u)):(a.apply(new Ve(a.children[d],c)),o.splice(d,0,u))})}})}splitRowsBySection(e){const t=[],n=[];return e.forEach(i=>{i.parent instanceof Nt?t.push(i):n.push(i)}),[t,n]}buildSelectedIndices(e,t){return new Set(e.map(n=>t.indexOf(n)).filter(n=>n>=0))}intersectsRemovalRange(e,t,n,i){return e<=i&&t>=n}countRemovedRows(e,t,n){let i=0;for(let s=e;s<=t;s++)n.has(s)&&i++;return i}getHeadCellLength(e){let t=0;for(let n=0;n<e.children.length;n++){const i=e.children[n];if(i instanceof ke)t+=i.colSpan;else break}return t}getTheStartSpanCell(e,t,n,i){const s={rowIndex:n};for(let a=n;a>=0;a--){const o=t[a];if(o.includes(i)){s.cell=e[a].children[o.indexOf(i)],s.rowIndex=a;break}}return s}getDefaultCellBlockTemplate(e,t,n=1){const i=Vt({colspan:t>1?t.toString():null,rowspan:n>1?n.toString():null}),s=Q(),a={id:s,type:e,children:[{id:`${s}-p`,type:"paragraph",nodes:[{id:`${s}-p-t`,type:"text",text:""}]}]};return Object.keys(i).length>0&&(a.annotations={customAttribute:i}),a}getSortedValuesByNumericKey(e){return Array.from(e.entries()).sort(([t],[n])=>t-n).map(([,t])=>t)}}sn.DEFAULT_CELLSPAN=1;class C8 extends sn{handleAction(e,t){const{rowsToBeRemoved:n}=e,i=this.getFutureFocusRow(n[0],n[n.length-1],t),s=this.splitRowsBySection(n);if(this.removeRows(s[0]),this.removeRows(s[1]),i){const a=this.getRootContent(t);if(a){const o=i.getLastNode();a.apply(new xt(o,o.getRangeEndOffset()))}}}removeRows(e){if(e.length===0)return;const t=e[0].parent,n=t.children,i=this.buildSelectedIndices(e,n);if(i.size>0){if(n.length===e.length){t.parent.apply(new _e(t));return}const s=Math.min(...i),a=Math.max(...i),o=this.getRowCellStartCols(n),l=this.collectCellsToMove(n,o,i,s,a);this.insertMovedCells(l,n,o),e.forEach(c=>{c.parent.apply(new _e(c))})}}collectCellsToMove(e,t,n,i,s){const a=new Map,o=e.length;for(let l=0;l<o;l++){const c=e[l],u=c.children.length;for(let d=0;d<u;d++){const g=c.children[d],_=g.rowSpan;if(_<=sn.DEFAULT_CELLSPAN)continue;const y=l+_-1;if(!this.intersectsRemovalRange(l,y,i,s))continue;const b=this.countRemovedRows(l,y,n),p=_-b;if(l<i&&y>=i){this.updateCellSpan(g,"rowspan",p);continue}if(l>=i&&y>s){const f=s+1;if(f<o&&!n.has(f)){const h=t[l][d];a.has(f)||a.set(f,[]),a.get(f).push({cell:this.cloneCellWithRowSpan(g,p),newRowSpan:p,cellIndex:d,logicalStartCol:h})}}}}return a}cloneCellWithRowSpan(e,t){const n=e.clone(e.parent);return this.updateCellSpan(n,"rowspan",t),n}getFutureFocusRow(e,t,n){const i=n.children.filter(o=>o instanceof Nt||o instanceof Dt).flatMap(o=>o.children),s=i.indexOf(e),a=i.indexOf(t);if(i[s-1])return i[s-1];if(i[a+1])return i[a+1]}}class aa{constructor(){this.dragging=!1,this.anchorCell=null,this.selectedCells=new Set,this.syncRTESelectionWithDebounce=F0(this.syncRTESelection,100,this),this.handleSelectionChangeWithDebounce=F0(this.handleSelectionChange,10,this),this.filterSelectedCell=(e,t)=>{const n=new Set;if(e.intersectsNode(t)){if(t.nodeType===Node.TEXT_NODE){const i=Pe.getEntityByDOM(t.parentElement);if(i){const s=bn(i.parent,He);if(s)return n.add(s),Array.from(n)}}t.childNodes.forEach(i=>this.filterSelectedCell(e,i).forEach(s=>{n.add(s)}))}return Array.from(n)},this.updateSelectedStyles=(e,t)=>{const n=t===1?"v-rte-table-cell-focused":"v-rte-table-cell-selected",i=Pe.getDOMByEntity(e);i&&i.classList.add(n)},this.handleDocMouseUp=()=>{this.endDrag();const e=br();e&&e.removeEventListener("mouseup",this.handleDocMouseUp)},this.handleContentClick=()=>{this.clearSelection();const e=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");e&&e.removeEventListener("mousedown",this.handleContentClick,!0)}}static computeRectRange(e,t){const n=e.parent,i=t.parent,s=n.parent,a=i.parent,o=s.parent,l=a.parent;if(o!==l)return[];const c=[];o.children.forEach(A=>{A.children.forEach(k=>c.push(k))});const{grid:d,cellMeta:g}=aa.buildCellGrid(c),_=g.get(e),y=g.get(t);if(!_||!y)return[];const b=_.row,p=_.row+_.rowSpan-1,f=_.col,h=_.col+_.colSpan-1,m=y.row,v=y.row+y.rowSpan-1,w=y.col,C=y.col+y.colSpan-1,E=Math.min(b,m),S=Math.max(p,v),x=Math.min(f,w),L=Math.max(h,C),P=new Set;for(let A=E;A<=S;A++){const k=d[A];for(let B=x;B<=L;B++){const N=k[B];N&&P.add(N)}}return Array.from(P)}static getCellSpan(e){let t=1,n=1;const i=e.getAnnotationByType(nt.CUSTOM_ATTRIBUTE);if(i&&i.customAttribute){const s=i.customAttribute;s.rowSpan&&(t=parseInt(s.rowSpan,10)),s.colSpan&&(n=parseInt(s.colSpan,10))}if(t===1&&n===1){const s=Pe.getDOMByEntity(e);if(s){const a=s.getAttribute("rowSpan"),o=s.getAttribute("colSpan");a&&(t=parseInt(a,10)),o&&(n=parseInt(o,10))}}return{rowSpan:Number.isFinite(t)&&t>0?t:1,colSpan:Number.isFinite(n)&&n>0?n:1}}static buildCellGrid(e){const t=[],n=new Map;for(let i=0;i<e.length;i++){const s=e[i];t[i]||(t[i]=[]);let a=0;for(let o=0;o<s.children.length;o++){const l=s.children[o];for(;t[i][a];)a+=1;const{rowSpan:c,colSpan:u}=aa.getCellSpan(l);n.set(l,{row:i,col:a,rowSpan:c,colSpan:u});for(let d=0;d<c;d++){const g=i+d;t[g]||(t[g]=[]);for(let _=0;_<u;_++)t[g][a+_]=l}a+=u}}return{grid:t,cellMeta:n}}destroy(){this.removeSelectionChangeListener()}init(e){this.context=e,this.addSelectionChangeListener()}setSelectedCells(e){const t=Array.from(this.selectedCells)[0]||e[0];this.updateSelectedCells(e),this.emitCellSelectionChange(t,e)}getSelectedCells(){return Array.from(this.selectedCells)}focusCell(e){const t=Pe.getEntityByDOM(e);t&&(this.anchorCell=t,this.setSelectedCells([t]),this.addListeners())}dragOver(e){if(!this.anchorCell)return;const t=aa.computeRectRange(this.anchorCell,e);t.length>1&&this.startDrag(),this.dragging&&(this.preventTextSelection(t),this.updateSelectedCells(t,{debounceSync:!0}))}endDrag(){this.dragging=!1,this.anchorCell=null}emitCellSelectionChange(e,t){const n=bn(e,Le);if(n){const i=Pe.getDOMByEntity(n);i&&Ke.notify(Zt.getSubject(i,UE),{host:i,detail:t})}}clearSelection(){this.selectedCells.forEach(e=>{const t=Pe.getDOMByEntity(e);t&&t.classList.remove("v-rte-table-cell-selected","v-rte-table-cell-focused")}),this.selectedCells.clear()}addSelectionChangeListener(){const e=br();e&&e.addEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}removeSelectionChangeListener(){const e=br();e&&e.removeEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}handleSelectionChange(){if(this.dragging){this.syncRTESelectionWithDebounce();return}const e=this.context.getSelection();if(e.rangeCount>0){const t=e.getRangeAt(0),n=t.commonAncestorContainer;if(!!ed(n,"table")){const s=this.filterSelectedCell(t,n);this.setSelectedCells(s)}}}startDrag(){this.dragging=!0}updateSelectedCells(e,{debounceSync:t}={}){this.clearSelection(),e.forEach(n=>{this.selectedCells.add(n),this.updateSelectedStyles(n,e.length)}),t?this.syncRTESelectionWithDebounce():this.syncRTESelection()}syncRTESelection(){const e=Array.from(this.selectedCells),t=e.flatMap(n=>n.children.flatMap(i=>i.children.flatMap(s=>{if(s instanceof ls)return s}))).filter(Te);e.length>1&&this.context.setSelectedNodes(t,{startNode:t[0],endNode:t[t.length-1],startOffset:0,endOffset:t[t.length-1].getRangeEndOffset()})}preventTextSelection(e){const t=this.context.getSelection();if(t.removeAllRanges(),e.length>0){const n=Pe.getDOMByEntity(e[0]);if(n){const i=new Range;i.setStart(n,0),i.setEnd(n,0),t.addRange(i)}}}addListeners(){const e=br();e&&e.addEventListener("mouseup",this.handleDocMouseUp);const t=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");t&&t.addEventListener("mousedown",this.handleContentClick,!0)}}class E8 extends sn{handleAction(e,t){const{selectedRows:n}=e,[i,s]=this.splitRowsBySection(n);s.length>0?this.convertToHeaderRows(s,t):this.revertToBodyRows(i,t);const a=this.getRootContent(t);if(a){const o=n[0].getFirstNode();o&&a.apply(new xt(o,0))}}convertToHeaderRows(e,t){let n=t.children.find(u=>u instanceof Nt);const i=e[0].parent;n||(n=Nt.from({id:Q(),type:"table-head",children:[]}),t.apply(new Ve(i,n)));const s=i.children.indexOf(e[e.length-1]),a=i.children.slice(0,s+1),o=this.buildSelectedIndices(a,i.children),l=Math.min(...o),c=Math.max(...o);if(o.size>0){if(o.size<i.children.length){const u=this.getRowCellStartCols(i.children),d=this.collectCellsToMove(i.children,u,o,l,c);this.insertMovedCells(d,i.children,u)}this.convertBodyRowsToHeaderRows(i,n,a)}}convertBodyRowsToHeaderRows(e,t,n){for(let i=0;i<n.length;i++){const s=n[i];s.children=s.children.map(a=>this.convertTdToTh(a)),e.apply(new _e(s))}t.apply(new Re(n))}revertToBodyRows(e,t){let n=t.children.find(l=>l instanceof Dt);const i=e[0].parent;n||(n=Dt.from({id:Q(),type:"table-body",children:[]}),t.apply(new we(i,n)));const s=i.children.indexOf(e[0]),a=i.children.slice(s),o=this.buildSelectedIndices(a,i.children);if(o.size>0){const l=this.getRowCellStartCols(i.children),c=this.collectCellsToMove(i.children,l,o,Math.min(...o),Math.max(...o));this.insertMovedCells(c,i.children,l),this.convertHeadRowsToBodyRows(i,n,a)}}convertHeadRowsToBodyRows(e,t,n){const i=t.children[0],s=this.getRowCellStartCols(n);for(let a=0;a<n.length;a++){const o=n[a];e.apply(new _e(o));const l=i?this.getHeadCellLength(i):0;o.children=this.convertThToTd(o,s[a],l),i&&t.apply(new Ve(i,o))}i||t.apply(new Re(n))}collectCellsToMove(e,t,n,i,s){const a=new Map,o=e.length;for(let l=0;l<o;l++){const c=e[l],u=c.children.length;for(let d=0;d<u;d++){const g=c.children[d],_=g.rowSpan;if(_<=sn.DEFAULT_CELLSPAN)continue;const y=l+_-1;if(!this.intersectsRemovalRange(l,y,i,s))continue;const b=this.countRemovedRows(l,y,n),p=_-b;if(l<i&&y>=i){this.updateCellSpan(g,"rowspan",p);const f=i;if(f<o&&n.has(f)){const h=t[l][d];a.has(f)||a.set(f,[]),a.get(f).push({cell:this.cloneCellWithRowSpan(g,b),newRowSpan:b,cellIndex:d,logicalStartCol:h})}continue}if(l>=i&&y>s){this.updateCellSpan(g,"rowspan",b);const f=s+1;if(f<o&&!n.has(f)){const h=t[l][d];a.has(f)||a.set(f,[]),a.get(f).push({cell:this.cloneCellWithRowSpan(g,p),newRowSpan:p,cellIndex:d,logicalStartCol:h})}}}}return a}convertTdToTh(e){if(e instanceof ke)return e;const t=ke.from(e.toJSON());return t.parent=e.parent,t}convertThToTd(e,t,n){return e.children.map((i,s)=>{let a=i;const o=t[s]<n,l=i.toJSON();return a=o?i:He.from(this.deleteHeadCellDefaultBackground(l)),a.parent=e,a})}cloneCellWithRowSpan(e,t){const n=e.clone(e.parent);n.id=Q(),n.children=[];const i=this.createNewParagraph("");return i&&n.apply(new Re([i])),this.updateCellSpan(n,"rowspan",t),n}deleteHeadCellDefaultBackground(e){var t;if(e&&e.annotations&&e.annotations.customStyle){delete e.annotations.tableCell;const n=e.annotations.customStyle.backgroundColor,i=Qi.getDefaultBackgroundColor();n&&(n===i||((t=Up(n))===null||t===void 0?void 0:t.toUpperCase())===i)&&delete e.annotations.customStyle.backgroundColor}return e}}class x8 extends Zd{handleAction(e,t){const{insertDirection:n,tableCellInsertRange:i}=e,s=new Set(i.map(_=>_.id)),a=wn(t),o=Sn(a),[l,c]=this.getBoundaryCellColumnRange(i,a,o),u=n===so.LEFT?l:c+1,d=this.hasSelectedCellInsideTargetColumn(a,o,u,s),g=new Set;a.forEach((_,y)=>{if(g.has(y))return;const b=this.findExpandableCell(_,y,u,o,n,s,d);if(b){const f=b.rowSpan;if(jr(b,b.colSpan+1,b.rowSpan,t,!0),f>1)for(let h=1;h<f;h++)g.add(y+h);return}const p=this.findInsertPosition(_,y,u,o,a);if(p){const f=this.generateTableCell(p.templateCell);p.before?_.apply(new Ve(p.anchorCell,f)):_.apply(new we(p.anchorCell,f))}})}findExpandableCell(e,t,n,i,s,a,o){const l=i[t],c=e.children.reduce((u,d)=>u+(a.has(d.id)?1:0),0);for(const u of e.children){const d=l.indexOf(u.id),g=d+u.colSpan,_=n===g,y=t+u.rowSpan>=i.length,b=a.has(u.id),p=n>d&&n<g;if(s===so.LEFT?p:p&&!(b&&y)||_&&u.colSpan>1&&b&&!y&&c===1&&!o)return u}return null}hasSelectedCellInsideTargetColumn(e,t,n,i){for(let s=0;s<e.length;s++){const a=e[s],o=t[s];for(const l of a.children){if(!i.has(l.id))continue;const c=o.indexOf(l.id),u=c+l.colSpan;if(n>c&&n<u)return!0}}return!1}findInsertPosition(e,t,n,i,s){const a=i[t];let o=e.children[0];if(n>=0&&n<a.length){const c=a[n],u=dy(s,c);u&&(o=u)}let l=0;for(let c=0;c<e.children.length;c++){const u=e.children[c];for(;l<a.length&&a[l]!==u.id;)l++;if(l>=n)return{anchorCell:u,templateCell:o,before:!0};const d=l+u.colSpan;if(d>n||c===e.children.length-1)return{anchorCell:u,templateCell:o,before:!1};l=d}return null}generateTableCell(e){return e instanceof ke?ke.from(cd(e.type)):He.from(cd(e.type))}}class T8 extends Zd{handleAction(e,t){const n=wn(t),i=Sn(n),[s,a]=this.getBoundaryCellColumnRange(e.tableCellDeleteRange,n,i),l=e.tableCellDeleteRange[e.tableCellDeleteRange.length-1].parent,c=Math.max(n.indexOf(l),0),{coveredCellIds:u,coveredCells:d,adjustmentCellInfo:g}=this.getDeleteCellsInfo(n,s,a,i),_=this.findNextFocusableCell(n,i,s,a,u,c);this.deleteCells(d,g,t);const y=this.getRootContent(t),b=yg(_);y&&b&&y.apply(new xt(b))}getDeleteCellsInfo(e,t,n,i){const s=[],a=new Set,o=[],l=fy(i);return e.forEach(c=>{c.children.forEach(u=>{const d=l.get(u.id);if(d===void 0)return;const{colSpan:g,rowSpan:_}=or(u),y=this.getColumnOverlapCount(d,g,t,n);if(y<=0)return;if(y===g){s.push(u),a.add(u.id);return}const b=Math.max(1,g-y);o.push({cell:u,nextColSpan:b,rowSpan:_})})}),{coveredCells:s,coveredCellIds:a,adjustmentCellInfo:o}}findNextFocusableCell(e,t,n,i,s,a){for(let o=0;o<e.length;o++){const l=(a+o)%e.length,c=t[l],u=this.findFocusableCellIdInGridRow(c,n,i,s);if(!u)continue;const d=dy(e,u);if(d)return d}return null}findFocusableCellIdInGridRow(e,t,n,i){for(let s=n+1;s<e.length;s++){const a=e[s];if(a&&!i.has(a))return a}for(let s=t-1;s>=0;s--){const a=e[s];if(a&&!i.has(a))return a}return null}deleteCells(e,t,n){e.forEach(s=>{s.parent.apply(new _e(s))});const i=new Set;t.forEach(({cell:s,nextColSpan:a,rowSpan:o})=>{i.add(s.id),jr(s,a,o,n)}),this.normalizeRemainingCellSpans(n,i)}normalizeRemainingCellSpans(e,t){wn(e).forEach(i=>{i.children.forEach(s=>{const{colSpan:a,rowSpan:o}=or(s);if(t.has(s.id)){const l=hy(e);if(!(o>1&&a===l))return}jr(s,a,o,e)})})}getColumnOverlapCount(e,t,n,i){const s=e+t-1,a=Math.max(e,n),o=Math.min(s,i);return a<=o?o-a+1:0}}const Ly="CREATE_SEGMENT_TABLE_CELL";class eh extends ue{constructor(e){super(),this.isFlushable=!0,this.type=Ly,this.payload=e}}class k8 extends ne{handleAction(e,t){const{table:n,sourceCell:i,colSpan:s,cellType:a,keepSourceContent:o}=e.payload,l=o?this.convertCellType(i,a):bg(a);jr(l,s,i.rowSpan,n),t.apply(new Ve(i,l))}convertCellType(e,t){return t==="table-head-cell"?ke.from(e.toJSON()):He.from(e.toJSON())}}class L8 extends ne{handleAction(e,t){const{cell:n,targetCellType:i}=e.payload,s=i==="table-head-cell"?ke.from(n.toJSON()):He.from(n.toJSON());t.apply(new Ve(n,s)),t.apply(new _e(n))}}class A8 extends ne{handleAction(e,t){const{table:n,cell:i,col:s,cellStartCol:a,endCol:o,targetCellType:l}=e.payload,c=a+i.colSpan-1,u=s>a?s-a:0,d=Math.min(o,c),g=d-s+1,_=c-d;u>0&&t.apply(new eh({table:n,sourceCell:i,colSpan:u,cellType:i.type,keepSourceContent:!0})),t.apply(new eh({table:n,sourceCell:i,colSpan:g,cellType:l,keepSourceContent:u===0})),_>0&&t.apply(new eh({table:n,sourceCell:i,colSpan:_,cellType:i.type,keepSourceContent:u===0&&g===i.colSpan})),t.apply(new _e(i))}}class R8 extends Zd{handleAction(e,t){const n=wn(t),i=Sn(n),s=fy(i),[a,o]=this.getBoundaryCellColumnRange(e.tableCellSelectRange,n,i),l=[],c=new Set;n.forEach(u=>{u.children.forEach(d=>{const g=s.get(d.id);g!==void 0&&g>=a&&g<=o&&!c.has(d.id)&&(c.add(d.id),l.push(d))})}),e.selectCellCallback(l)}}class O8 extends ml{canIntercept(e){return e.childrenToBeInserted.some(t=>!(t instanceof He))}intercept(){}}class D8 extends ne{handleAction(e,t){const{targetCell:n,mergeCells:i,colSpan:s,rowSpan:a,direction:o}=e;this.mergeContentToTargetCell(n,i),jr(n,s,a,t),this.deleteOtherSelectedCells(i,n),o!==Wt.MERGE_CELL_LEFT&&o!==Wt.MERGE_CELL_RIGHT&&a>1&&this.clearRowSpanIfUniformAcrossRow(n,t,a);const l=this.getRootContent(t),c=yg(n);l&&c&&l.apply(new xt(c))}mergeContentToTargetCell(e,t){const n=t.flatMap(a=>a.children),i=n.filter(a=>a.isNotEmpty()),s=i.length>0?i:[n[0]];e.children=s.map(a=>a.clone(e))}deleteOtherSelectedCells(e,t){e.forEach(n=>{n!==t&&n.parent.apply(new _e(n))})}clearRowSpanIfUniformAcrossRow(e,t,n){const s=e.parent.parent.children,a=Sn(s),o=[];for(let l=0;l<a.length;l++)a[l].includes(e.id)&&o.push(l);if(o.length>1){const l=o[0],c=l+n-1,u=new Set;let d=Number.POSITIVE_INFINITY;for(let g=0;g<a[0].length;g++){let _=a[l][g],y=1,b=!1;for(let p=l+1;p<=c;p++){if(a[p][g]===_){y++;continue}y>1&&(b=!0,d=Math.min(d,y),u.add(_)),y=1,_=a[p][g]}if(y<2&&!b){u.clear();break}y>1&&(d=Math.min(d,y),u.add(_))}u.size>0&&s.forEach(g=>{g.children.forEach(_=>{if(u.has(_.id)){const{rowSpan:y,colSpan:b}=or(_),p=y-d+1;jr(_,b,p,t)}})})}}}class N8 extends fs{canHandle(e,t){const n=e[t];return n&&n.tagName==="TABLE"?1:0}handle(e,t){return Le.from({id:Q(),type:"table-block",annotations:ze.generate(Le,e[0],t),children:[]},t)}appendChildBlocks(e,t){e.children=t.map(n=>(n.parent=e,n))}shouldProceedToElementChildren(){return!0}}class I8 extends hr{canHandle(e,t){const n=e[t];return n&&n.tagName==="THEAD"?1:0}handle(e,t){return Nt.from({id:Q(),type:"table-head",annotations:ze.generate(Nt,e[0],t),children:[]},t)}appendChildBlocks(e,t){e.children=t.map(n=>(n.parent=e,n))}shouldProceedToElementChildren(){return!0}}class B8 extends hr{canHandle(e,t){const n=e[t];return n&&n.tagName==="TBODY"?1:0}handle(e,t){return Dt.from({id:Q(),type:"table-body",annotations:ze.generate(Dt,e[0],t),children:[]},t)}appendChildBlocks(e,t){e.children=t.map(n=>(n.parent=e,n))}shouldProceedToElementChildren(){return!0}}class M8 extends hr{canHandle(e,t){const n=e[t];return n&&n.tagName==="TR"?1:0}handle(e,t){return St.from({id:Q(),type:"table-row",annotations:ze.generate(St,e[0],t),children:[]},t)}appendChildBlocks(e,t){e.children=t.map(n=>(n.parent=e,n))}shouldProceedToElementChildren(){return!0}}class P8 extends hr{canHandle(e,t){const n=e[t];return n&&(n.tagName==="TD"||n.tagName==="TH")?1:0}handle(e,t){const n=e[0],i=[{id:Q(),type:"paragraph",annotations:{internalWrapper:t&&!t.autoMatchFormat},nodes:[{id:Q(),type:"text",annotations:{plainText:t&&!t.autoMatchFormat},text:""}]}];return n.tagName==="TH"?ke.from({id:Q(),type:"table-head-cell",annotations:this.getTableHeadCellAnnotations(n,t),children:i},t):He.from({id:Q(),type:"table-cell",annotations:ze.generate(He,n,t),children:i},t)}appendChildBlocks(e,t){e.children=t.map(n=>(n.parent=e,n))}shouldProceedToElementChildren(){return!0}getTableHeadCellAnnotations(e,t){const n=ze.generate(ke,e,t);return n&&n.tableCell&&Hr.getColorKey(n.tableCell.backgroundColor,!0)===cs.key&&(delete n.tableCell.backgroundColor,n.customStyle&&delete n.customStyle.backgroundColor),n}}class F8 extends fs{canHandle(e,t){const n=e[t];return n&&n.parentElement&&n.parentElement.tagName==="TABLE"&&n.tagName==="CAPTION"?1:0}handle(e,t){const n=this.getTableCaptionAnnotations(e[0],t);return $r.from({id:Q(),type:"table-caption",annotations:Object.assign(Object.assign({},n),{caption:!0}),children:[]},t)}appendChildBlocks(e,t){e.children=t.map(n=>(n.parent=e,n))}shouldProceedToElementChildren(){return!0}getTableCaptionAnnotations(e,t){const n=ze.generate($r,e,t);return n&&n.customStyle&&n.customStyle.backgroundColor&&Hr.getColorKey(n.customStyle.backgroundColor,!0)===cs.key&&delete n.customStyle.backgroundColor,n}}class Ay extends Tt{getBackgroundColor(e){return e.style.backgroundColor?Hr.getColorKey(e.style.backgroundColor)||e.style.backgroundColor:null}getBorder(e){const t=e.style,n=t.borderStyle,i=t.borderWidth,s=t.borderColor;if(s||n||i){const a=s==="initial"?"":s;return{style:n==="initial"?"":n,width:i==="initial"?"":i,color:Hr.getColorKey(a)||a}}return null}getWidth(e){if(e.style.width)return e.style.width;const t=e.getAttribute("width");return t?/^\d+$/.test(t)?`${t}px`:t:null}getHeight(e){if(e.style.height)return e.style.height;const t=e.getAttribute("height");return t?/^\d+$/.test(t)?`${t}px`:t:null}}class H8 extends Ay{canHandle(e){return e.dtoName==="RTETableBlock"}handle(e){const t=Vt({backgroundColor:this.getBackgroundColor(e),border:this.getBorder(e),width:this.getWidth(e),height:this.getHeight(e),alignment:this.getAlignment(e)});return Object.keys(t).length>0?{table:t}:{}}getAlignment(e){const t=e.classList;if(t.contains("v-rte--extension-table-align-left"))return"left";if(t.contains("v-rte--extension-table-align-center"))return"center";if(t.contains("v-rte--extension-table-align-right"))return"right";const n=e.style,i=n.marginLeft,s=n.marginRight;if(i==="auto"&&s==="auto")return"center";if(i==="0"||i==="0px")return"left";if(s==="0"||s==="0px")return"right";const a=e.getAttribute("align");return a&&["left","center","right"].includes(a)?a:null}}class Ry extends Ay{canHandle(e){return e.dtoName==="RTETableCellBlock"}handle(e){const t=Vt({backgroundColor:this.getBackgroundColor(e),padding:this.getPadding(e),border:this.getBorder(e),width:this.getWidth(e),height:this.getHeight(e),textAlign:this.getTextAlign(e),verticalAlign:this.getVerticalAlign(e),minWidth:this.getMinWidth(e),boxSizing:this.getBoxSizing(e)});return Object.keys(t).length>0?{tableCell:t}:{}}getMinWidth(e){return e.style.minWidth?e.style.minWidth:null}getBoxSizing(e){return e.style.boxSizing?e.style.boxSizing:null}getPadding(e){return e.style.padding?e.style.padding:null}getTextAlign(e){if(e.style.textAlign){const n=e.style.textAlign;if(["left","center","right","justify"].includes(n))return n}const t=e.getAttribute("align");return t&&["left","center","right","justify"].includes(t)?t:null}getVerticalAlign(e){if(e.style.verticalAlign){const t=e.style.verticalAlign;if(["top","middle","bottom"].includes(t))return t}return null}}class j8 extends Ry{canHandle(e){return e.dtoName==="RTETableHeadCellBlock"}}class $8 extends ne{handleAction(e,t){const n=e.toAnnotation(),i=this.getDOMByEntity(t);if(i){const s=i.closest(".v-rte--extension-table-container"),{backgroundColorAnnotation:a,width:o,height:l}=n;i.style.backgroundColor=a.renderStyle().color,i.style.border=n.borderStr,i.style.width=o,i.style.height=l;const c=n.renderAlignmentStyle().margin;i.style.margin=c,s&&(s.style.width=o,s.style.height=l,s.style.margin=c),this.updateCustomStyleAnnotation(t,["backgroundColor","border","width","height","margin"])}}}class V0 extends ne{handleAction(e,t){const n=e.toAnnotation(),i=this.getDOMByEntity(t);if(i){const{width:s,height:a,borderStr:o,padding:l,textAlign:c,verticalAlign:u}=n,d=n.renderStyle().backgroundColor||"";i.style.backgroundColor=d,i.style.border=o,i.style.width=s,i.style.height=a,i.style.padding=l,i.style.textAlign=c,i.style.verticalAlign=u,this.updateCustomStyleAnnotation(t,["backgroundColor","border","width","height","padding","textAlign","verticalAlign"])}}}class z0 extends ne{handleAction(e,t){const n=t.parent,i=n.parent,s=bn(n,Le),a=wn(s),o=a.indexOf(n),{colSpan:l,rowSpan:c}=or(t),u=Wn(t,a),d=Math.ceil(c/2),g=Math.max(1,c-d),_=c===1;jr(t,l,d,s);const y=o+d,b=bg(t.type);if(jr(b,l,g,s),_){const p=this.createNewRowWithCell(i,b),f=i.children.indexOf(n);i.apply(new we(i.children[f],p)),a.splice(y,0,p),this.updateCellsSpanningThroughInsertionPoint(a,y,t,s)}else{const p=a[y],f=this.findInsertPosition(p,u,a,y);p.children.splice(f,0,b),b.parent=p}}findInsertPosition(e,t,n,i){let s=0;for(let o=0;o<i;o++){const l=n[o];for(const c of l.children){const{colSpan:u,rowSpan:d}=or(c);o+d>i&&Wn(c,n)<t&&(s+=u)}}let a=s;for(let o=0;o<e.children.length;o++){if(a>=t)return o;const l=e.children[o],{colSpan:c}=or(l);a+=c}return e.children.length}createNewRowWithCell(e,t){const n={id:Q(),type:"table-row",children:[]},i=St.from(n);return i.parent=e,i.children.push(t),t.parent=i,i}updateCellsSpanningThroughInsertionPoint(e,t,n,i){for(let s=0;s<t;s++){const a=e[s];for(const o of a.children){if(o===n)continue;const{colSpan:l,rowSpan:c}=or(o);s+c>=t&&jr(o,l,c+1,i)}}}}class U0 extends ne{handleAction(e,t){const n=t.parent,i=bn(n,Le),s=wn(i),a=s.indexOf(n),{colSpan:o,rowSpan:l}=or(t),c=Wn(t,s),u=c+o-1,d=Math.ceil(o/2),g=Math.floor(o/2);jr(t,d,l,i);const _=bg(t.type);jr(_,g,l,i),n.apply(new we(t,_));const y=o===1?1:0;y>0&&this.updateOtherRowsCells(s,a,c,u,l,y,i)}updateOtherRowsCells(e,t,n,i,s,a,o){for(let l=0;l<e.length;l++){const c=e[l];if(!(l>=t&&l<t+s))for(const u of c.children){const d=Wn(u,e),{colSpan:g,rowSpan:_}=or(u);if(d+g-1>=n&&d<=i){jr(u,g+a,_,o);break}}}}}class V8 extends sn{handleAction(e,t){const{selectedRows:n}=e,i=n[n.length-1];let s=t.children.find(_=>_ instanceof Dt);const a={id:Q(),type:"table-row",children:[]};let o=0,l=null;s?(l=s.children[0],o=this.getHeadCellLength(l)):(s=Dt.from({id:Q(),type:"table-body",children:[]}),t.apply(new Re([s])));const c=i.parent.children,u=this.getRowsMaxCellCount(c);if(this.getRowsMaxCellCount([i])<u){const _=c.indexOf(i),y=this.getRowCellStartCols(c),b=new Map;for(let p=0;p<u;p++){const f=p<o?"table-head-cell":"table-cell",{cell:h}=this.getTheStartSpanCell(c,y,_,p);if(h){const m=h.colSpan;b.set(p,this.getDefaultCellBlockTemplate(f,m)),p+=m-1}}a.children=this.getSortedValuesByNumericKey(b)}else a.children=this.createTableCells(i,o);const g=l?new Ve(l,St.from(a)):new Re([St.from(a)]);s.apply(g)}createTableCells(e,t){const n=[];let i=0;for(const s of e.children){const o=i<t?"table-head-cell":"table-cell";n.push(this.getDefaultCellBlockTemplate(o,s.colSpan)),i+=s.colSpan}return n}}class z8 extends sn{handleAction(e){const{insertDirection:t,selectedRows:n}=e,i=t===In.ABOVE?n[0]:n[n.length-1],s={id:Q(),type:"table-row",children:[]},a=i.parent.children,o=this.getRowsMaxCellCount(a),l=a.indexOf(i),c=this.getRowCellStartCols(a),u=new Map;for(let _=0;_<o;_++){const{cell:y,rowIndex:b}=this.getTheStartSpanCell(a,c,l,_);if(y){const{colSpan:p,rowSpan:f}=y;if(t===In.ABOVE?b!==l:b+f>l+1){this.updateCellSpan(y,"rowspan",f+1),_+=p-1;continue}u.set(_,this.getDefaultCellBlockTemplate(y.type,p)),_+=p-1}}s.children=this.getSortedValuesByNumericKey(u);const d=St.from(s),g=t===In.ABOVE?new Ve(i,d):new we(i,d);i.parent.apply(g)}}class U8 extends ml{canIntercept(e,t){return!!t.parent}intercept(e,t,n){const i=this.createNewParagraph("");i&&(t.startOffset===0?n.parent.apply(new Ve(n,i)):n.parent.apply(new we(n,i)),t.newBlock=i)}createNewParagraph(e){const t=qe.getRTEBlockClass("paragraph");if(t)return t.from({id:Q(),type:"paragraph",nodes:[{id:Q(),type:"text",text:e}]})}}class W8 extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=Gt.getDefaultStyles(),this.elementTagName="table"}canFilter(e){return this.isTableBlock(e.dtoName)}canRefill(e,t){return this.isTableBlock(e)&&t.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableBlock(e){return e==="RTETableBlock"}}class G8 extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=co.getDefaultStyles(),this.elementTagName="table caption"}canFilter(e){return this.isTableCaption(e.dtoName)}canRefill(e,t){return this.isTableCaption(e)&&t.nodeName==="CAPTION"}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableCaption(e){return e==="RTETableCaptionBlock"}}class W0 extends dt{constructor(e="td"){super(),this.stylesToBeFiltered=he.getDefaultStyles(),this.elementTagName="",this.stylesWithRGBColor=he.getDefaultStyles(!1),this.cellBlockClassName="",this.elementTagName=e,this.cellBlockClassName=e==="td"?"RTETableCellBlock":"RTETableHeadCellBlock"}canFilter(e){return this.isTableCell(e.dtoName)}filterAndDeleteStyles(e,t){return this.convertDefaultBorderColorFromRGBToHex(e),super.filterAndDeleteStyles(e,t)}canRefill(e,t){return this.isTableCell(e)&&t.nodeName===this.elementTagName.toUpperCase()}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableCell(e){return e===this.cellBlockClassName}convertDefaultBorderColorFromRGBToHex(e){const t=this.stylesWithRGBColor.border;e&&e.border&&e.border===t&&(e.border=this.stylesToBeFiltered.border)}}class K8 extends se{constructor(e=iy){super(),this.toolbarButtonRenderer=new v8,this.tableBlockRenderer=new c8,this.tableRowBlockRenderer=new u8,this.tableCellRenderer=new ky,this.tableHeadCellRenderer=new f8,this.tableSelection=new aa,Hr.setTableColors(e),this.registerToolbarButtonRenderer("table",this.toolbarButtonRenderer),this.registerBlockBasicStrategies(Le.name),this.registerBlockBasicStrategies(Nt.name),this.registerBlockBasicStrategies(ke.name),this.registerBlockBasicStrategies(St.name),this.registerBlockBasicStrategies(He.name),this.registerBlockBasicStrategies(Dt.name),this.registerRenderer("table-block",this.tableBlockRenderer),this.registerRenderer("table-head",new d8),this.registerRenderer("table-head-cell",this.tableHeadCellRenderer),this.registerRenderer("table-row",this.tableRowBlockRenderer),this.registerRenderer("table-cell",this.tableCellRenderer),this.registerRenderer("table-body",new h8),this.registerRenderer("table-caption",new S8),this.registerNode("table-block",Le),this.registerNode("table-head",Nt),this.registerNode("table-head-cell",ke),this.registerNode("table-row",St),this.registerNode("table-cell",He),this.registerNode("table-body",Dt),this.registerNode("table-caption",$r),this.registerElementToBlockDTOClassStrategy(new N8),this.registerElementToBlockDTOClassStrategy(new I8),this.registerElementToBlockDTOClassStrategy(new B8),this.registerElementToBlockDTOClassStrategy(new M8),this.registerElementToBlockDTOClassStrategy(new P8),this.registerElementToBlockDTOClassStrategy(new F8),this.registerAnnotationHandler(new H8),this.registerAnnotationHandler(new Ry),this.registerAnnotationHandler(new j8)}initialExtensionAfterLoad(e){this.tableSelection.init(e);const t=Object.assign(Object.assign({},e),{tableSelection:this.tableSelection});super.initialExtensionAfterLoad(t)}destroyExtension(){this.tableBlockRenderer.destroy(),this.tableSelection.destroy()}}(()=>{const r=new _8,e=new b8;se.registerActionHandleStrategy(De.name,oa,r),se.registerActionHandleStrategy(De.name,yc,e),se.registerActionHandleStrategy(He.name,yc,e),se.registerActionHandleStrategy(ke.name,yc,e),se.registerActionHandleStrategy(te.name,oa,r),se.registerActionHandleStrategy(Ye.name,oa,r),se.registerActionHandleStrategy(Le.name,oy,new V8),se.registerActionHandleStrategy(Le.name,ay,new z8),se.registerActionHandleStrategy(Le.name,sy,new C8),se.registerActionHandleStrategy(Le.name,ly,new E8),se.registerActionHandleStrategy(Le.name,_y,new x8),se.registerActionHandleStrategy(Le.name,vy,new T8),se.registerActionHandleStrategy(Le.name,by,new my),se.registerActionHandleStrategy(St.name,gy,new A8),se.registerActionHandleStrategy(St.name,Ly,new k8),se.registerActionHandleStrategy(St.name,py,new L8),se.registerActionHandleStrategy(He.name,Af,new z0),se.registerActionHandleStrategy(He.name,Rf,new U0),se.registerActionHandleStrategy(ke.name,Af,new z0),se.registerActionHandleStrategy(ke.name,Rf,new U0),se.registerActionHandleStrategy(Le.name,yy,new R8),se.registerActionHandleStrategy(Le.name,cy,new D8),se.registerActionHandleStrategy(Le.name,wg.name,new $8),se.registerActionHandleStrategy(He.name,Sg.name,new V0),se.registerActionHandleStrategy(ke.name,Ty.name,new V0),se.registerActionHandlerInterceptor(te.name,J.DELETE_BLOCK_CONTENT,new y8),se.registerActionHandlerInterceptor(St.name,J.INSERT_CHILDREN_BEFORE,new O8),se.registerActionHandlerInterceptor(He.name,J.DELETE_CHILDREN,new $0),se.registerActionHandlerInterceptor(ke.name,J.DELETE_CHILDREN,new $0),se.registerActionHandlerInterceptor(Le.name,J.INSERT_NEW_PARAGRAPH,new U8),se.registerFilterStylesStrategy(Le.dtoName,new W8),se.registerFilterStylesStrategy($r.dtoName,new G8),se.registerFilterStylesStrategy(He.dtoName,new W0),se.registerFilterStylesStrategy(ke.dtoName,new W0("th"))})();class ud extends nn{constructor(e,t,n){super(e,n),this.type="horizontal-line",this.parent=t}toJSON(){return{id:this.id,type:"horizontal-line"}}clone(e){return new ud(this.id,e,super.cloneAnnotations())}toHtml(){return"<hr>"}}class q8{static isHorizontalLineBlock(e){return e==="RTEHorizontalLineBlock"}}const Oy={display:"inline-block",width:"100%",height:"4px",backgroundColor:"rgb(222, 222, 222)",borderWidth:"0px"};class X8 extends dt{constructor(){super(...arguments),this.stylesToBeFiltered=Oy,this.elementTagName="hr"}canFilter(e){return q8.isHorizontalLineBlock(e.dtoName)}canRefill(e,t){return t.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}var hd;(function(r){r.HORIZONTAL_LINE="HORIZONTAL_LINE"})(hd||(hd={}));class la extends dr{constructor(){super(...arguments),this.type=hd.HORIZONTAL_LINE}static from(){return[hd.HORIZONTAL_LINE,new la]}static getDefaultStyles(){return Oy}toJSON(){return null}clone(){return new la}renderClass(e){return e!=null&&e.standalone?null:"v-rte-horizontal-line-hr"}renderStyle(e){return e!=null&&e.standalone?la.getDefaultStyles():null}}class Sr extends it{constructor(e,t){super(e),this.dtoName=Sr.dtoName,this.type="horizontal-line",this.children=[];const{autoMatchFormat:n=!0}=t??{};n&&(this.annotationMap=new Map([la.from()]))}static from(e,t={autoMatchFormat:!0}){var n,i;const s=new Sr(e.id,t),a=((i=(n=e.children)===null||n===void 0?void 0:n[0])===null||i===void 0?void 0:i.id)||Q(),o=new ud(a,s);return s.children=[o],e.annotations&&it.convertAnnotationsToMap(s.annotationMap,e.annotations),s}static create(e,t={autoMatchFormat:!0}){const n=new Sr(Q(),t),i=new ud(Q(),n);return n.children=[i],e&&it.convertAnnotationsToMap(n.annotationMap,e),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"horizontal-line",children:this.children.map(e=>e.toJSON())})}toHtml(e){return`<hr${super.generateAttributeString(e)}>`}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1]}clone(e){const t=new Sr(this.id);return t.children=this.children.map(n=>n.clone(t)),t.annotationMap=super.cloneAnnotations(),t.parent=e,t}}Sr.dtoName="RTEHorizontalLineBlock";const Z8=".v-rte-horizontal-line{padding:8px 0;overflow:hidden}.v-rte-horizontal-line .v-rte-horizontal-line-hr{display:inline-block;width:100%;height:4px;border-width:0px;background-color:rgb(222, 222, 222)}";class Y8 extends Jt{doRender(e,t,n){const i=t.children[0],s=t.getStyles(n),a=t.getClasses(n),o=[nn.DECORATOR_NODE_CLASS,a].filter(Boolean).join(" ");return e("div",{key:t.id,class:`v-rte-horizontal-line ${nn.DECORATOR_CONTAINER_CLASS}`,ref:this.useRef(t)},[e("hr",{key:(i==null?void 0:i.id)||t.id+"-hr",class:o,style:Object.keys(s).length>0?s:void 0,ref:i?this.useRef(i):void 0})])}injectRTEScopeStyles(){return Z8}}const J8={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M0 224H32 608h32v64H608 32 0V224z"/></svg>'},Ps="INSERT_HORIZONTAL_LINE_BLOCK";class Q8 extends ue{constructor(e,t=0){super(),this.type=Ps,this.splitPointNode=e,this.startOffsetOfNode=t}}class ek extends gs{render(e,t){return this.renderButton(e,t,{icon:"horizontal-line",tooltip:{text:vr.t("Horizontal line")}})}isDisabled(e){const t=this.getExtensionContext(e.host);if(t){const{host:n,getSelectedNodes:i}=t,[s]=i();return s?n.disabled||!q.canHandle(Ps,s.parent):n.disabled}return!1}handleButtonClick(e){if(this.isDisabled(e))return;const t=this.getExtensionContext(e.host);if(t){const{host:n,getSelectedNodes:i,flushValue:s}=t,o=i()[0],l=e.rteRange.startOffset,c=new Q8(o,l);o?o.parent&&o.parent.apply(c):n.value.apply(c),c.nextFocusNode&&n.value.apply(new xt(c.nextFocusNode,0)),s(n.value)}}handleDropdownClick(){}}pl.register({"horizontal-line":J8});class tk extends fs{canHandle(e,t){return e[t].tagName==="HR"?1:0}handle(e,t){const n=e[0],i=ze.generate(Sr,n,t);return Sr.create(i,t)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class rk extends ne{handleAction(e,t){const n=Sr.create();if(e.splitPointNode instanceof ye){const i=e.splitPointNode,s=e.startOffsetOfNode;if(this.isCaretPositionAtBlockEnd(t,i,s))this.insertAfterWithFocus(e,t,n);else if(this.isCaretPositionAtBlockStart(t,i,s))t.parent.apply(new Ve(t,n)),e.nextFocusNode=t.getFirstNode();else{const a=new vo(i,s);t.apply(a);const o=this.getNextSiblingBlock(t);t.parent.apply(new we(t,n)),e.nextFocusNode=o.getFirstNode()}}else if(e.splitPointNode)this.insertAfterWithFocus(e,t,n);else{const i=super.createNewParagraph("");t.apply(new Re([n,i])),e.nextFocusNode=i.children[0]}}insertAfterWithFocus(e,t,n){const i=this.getNextSiblingBlock(t),s=i==null?void 0:i.getFirstNode();if(s instanceof ye)t.parent.apply(new we(t,n)),e.nextFocusNode=s;else{const a=super.createNewParagraph("");t.parent.apply(new we(t,n,a)),e.nextFocusNode=a.children[0]}}getNextSiblingBlock(e){const n=e.parent.children,i=n.indexOf(e);return n[i+1]}}class nk extends se{constructor(){super(),this.blockRenderer=new Y8,this.toolbarButtonRenderer=new ek,this.registerBlockBasicStrategies(Sr.name),this.registerNode("horizontal-line",Sr),this.registerRenderer("horizontal-line",this.blockRenderer),this.registerToolbarButtonRenderer("horizontalLine",this.toolbarButtonRenderer),this.registerElementToBlockDTOClassStrategy(new tk),se.registerFilterStylesStrategy(Sr.dtoName,new X8)}}(()=>{const r=new rk;se.registerActionHandleStrategy(De.name,Ps,r),se.registerActionHandleStrategy(te.name,Ps,r),se.registerActionHandleStrategy(Ye.name,Ps,r),se.registerActionHandleStrategy(Sr.name,Ps,r)})();const ik=[{character:"←",title:"leftwards simple arrow"},{character:"→",title:"rightwards simple arrow"},{character:"↑",title:"upwards simple arrow"},{character:"↓",title:"downwards simple arrow"},{character:"⇐",title:"leftwards double arrow"},{character:"⇒",title:"rightwards double arrow"},{character:"⇑",title:"upwards double arrow"},{character:"⇓",title:"downwards double arrow"},{character:"⇠",title:"leftwards dashed arrow"},{character:"⇢",title:"rightwards dashed arrow"},{character:"⇡",title:"upwards dashed arrow"},{character:"⇣",title:"downwards dashed arrow"},{character:"⇤",title:"leftwards arrow to bar"},{character:"⇥",title:"rightwards arrow to bar"},{character:"⤒",title:"upwards arrow to bar"},{character:"⤓",title:"downwards arrow to bar"},{character:"↨",title:"up down arrow with base"},{character:"🔙",title:"back with leftwards arrow above"},{character:"🔚",title:"end with leftwards arrow above"},{character:"🔛",title:"on with exclamation mark with left right arrow above"},{character:"🔜",title:"soon with rightwards arrow above"},{character:"🔝",title:"top with upwards arrow above"}],sk=[{character:"$",title:"Dollar sign"},{character:"€",title:"Euro sign"},{character:"¥",title:"Yen sign"},{character:"£",title:"Pound sign"},{character:"¢",title:"Cent sign"},{character:"₠",title:"Euro-currency sign"},{character:"₡",title:"Colon sign"},{character:"₢",title:"Cruzeiro sign"},{character:"₣",title:"French franc sign"},{character:"₤",title:"Lira sign"},{character:"¤",title:"Currency sign"},{character:"₿",title:"Bitcoin sign"},{character:"₥",title:"Mill sign"},{character:"₦",title:"Naira sign"},{character:"₧",title:"Peseta sign"},{character:"₨",title:"Rupee sign"},{character:"₩",title:"Won sign"},{character:"₪",title:"New sheqel sign"},{character:"₫",title:"Dong sign"},{character:"₭",title:"Kip sign"},{character:"₮",title:"Tugrik sign"},{character:"₯",title:"Drachma sign"},{character:"₰",title:"German penny sign"},{character:"₱",title:"Peso sign"},{character:"₲",title:"Guarani sign"},{character:"₳",title:"Austral sign"},{character:"₴",title:"Hryvnia sign"},{character:"₵",title:"Cedi sign"},{character:"₶",title:"Livre tournois sign"},{character:"₷",title:"Spesmilo sign"},{character:"₸",title:"Tenge sign"},{character:"₹",title:"Indian rupee sign"},{character:"₺",title:"Turkish lira sign"},{character:"₻",title:"Nordic mark sign"},{character:"₼",title:"Manat sign"},{character:"₽",title:"Ruble sign"}],ok=[{character:"Ā",title:"Latin capital letter a with macron"},{character:"ā",title:"Latin small letter a with macron"},{character:"Ă",title:"Latin capital letter a with breve"},{character:"ă",title:"Latin small letter a with breve"},{character:"Ą",title:"Latin capital letter a with ogonek"},{character:"ą",title:"Latin small letter a with ogonek"},{character:"Ć",title:"Latin capital letter c with acute"},{character:"ć",title:"Latin small letter c with acute"},{character:"Ĉ",title:"Latin capital letter c with circumflex"},{character:"ĉ",title:"Latin small letter c with circumflex"},{character:"Ċ",title:"Latin capital letter c with dot above"},{character:"ċ",title:"Latin small letter c with dot above"},{character:"Č",title:"Latin capital letter c with caron"},{character:"č",title:"Latin small letter c with caron"},{character:"Ď",title:"Latin capital letter d with caron"},{character:"ď",title:"Latin small letter d with caron"},{character:"Đ",title:"Latin capital letter d with stroke"},{character:"đ",title:"Latin small letter d with stroke"},{character:"Ē",title:"Latin capital letter e with macron"},{character:"ē",title:"Latin small letter e with macron"},{character:"Ĕ",title:"Latin capital letter e with breve"},{character:"ĕ",title:"Latin small letter e with breve"},{character:"Ė",title:"Latin capital letter e with dot above"},{character:"ė",title:"Latin small letter e with dot above"},{character:"Ę",title:"Latin capital letter e with ogonek"},{character:"ę",title:"Latin small letter e with ogonek"},{character:"Ě",title:"Latin capital letter e with caron"},{character:"ě",title:"Latin small letter e with caron"},{character:"Ĝ",title:"Latin capital letter g with circumflex"},{character:"ĝ",title:"Latin small letter g with circumflex"},{character:"Ğ",title:"Latin capital letter g with breve"},{character:"ğ",title:"Latin small letter g with breve"},{character:"Ġ",title:"Latin capital letter g with dot above"},{character:"ġ",title:"Latin small letter g with dot above"},{character:"Ģ",title:"Latin capital letter g with cedilla"},{character:"ģ",title:"Latin small letter g with cedilla"},{character:"Ĥ",title:"Latin capital letter h with circumflex"},{character:"ĥ",title:"Latin small letter h with circumflex"},{character:"Ħ",title:"Latin capital letter h with stroke"},{character:"ħ",title:"Latin small letter h with stroke"},{character:"Ĩ",title:"Latin capital letter i with tilde"},{character:"ĩ",title:"Latin small letter i with tilde"},{character:"Ī",title:"Latin capital letter i with macron"},{character:"ī",title:"Latin small letter i with macron"},{character:"Ĭ",title:"Latin capital letter i with breve"},{character:"ĭ",title:"Latin small letter i with breve"},{character:"Į",title:"Latin capital letter i with ogonek"},{character:"į",title:"Latin small letter i with ogonek"},{character:"İ",title:"Latin capital letter i with dot above"},{character:"ı",title:"Latin small letter dotless i"},{character:"IJ",title:"Latin capital ligature ij"},{character:"ij",title:"Latin small ligature ij"},{character:"Ĵ",title:"Latin capital letter j with circumflex"},{character:"ĵ",title:"Latin small letter j with circumflex"},{character:"Ķ",title:"Latin capital letter k with cedilla"},{character:"ķ",title:"Latin small letter k with cedilla"},{character:"ĸ",title:"Latin small letter kra"},{character:"Ĺ",title:"Latin capital letter l with acute"},{character:"ĺ",title:"Latin small letter l with acute"},{character:"Ļ",title:"Latin capital letter l with cedilla"},{character:"ļ",title:"Latin small letter l with cedilla"},{character:"Ľ",title:"Latin capital letter l with caron"},{character:"ľ",title:"Latin small letter l with caron"},{character:"Ŀ",title:"Latin capital letter l with middle dot"},{character:"ŀ",title:"Latin small letter l with middle dot"},{character:"Ł",title:"Latin capital letter l with stroke"},{character:"ł",title:"Latin small letter l with stroke"},{character:"Ń",title:"Latin capital letter n with acute"},{character:"ń",title:"Latin small letter n with acute"},{character:"Ņ",title:"Latin capital letter n with cedilla"},{character:"ņ",title:"Latin small letter n with cedilla"},{character:"Ň",title:"Latin capital letter n with caron"},{character:"ň",title:"Latin small letter n with caron"},{character:"ʼn",title:"Latin small letter n preceded by apostrophe"},{character:"Ŋ",title:"Latin capital letter eng"},{character:"ŋ",title:"Latin small letter eng"},{character:"Ō",title:"Latin capital letter o with macron"},{character:"ō",title:"Latin small letter o with macron"},{character:"Ŏ",title:"Latin capital letter o with breve"},{character:"ŏ",title:"Latin small letter o with breve"},{character:"Ő",title:"Latin capital letter o with double acute"},{character:"ő",title:"Latin small letter o with double acute"},{character:"Œ",title:"Latin capital ligature oe"},{character:"œ",title:"Latin small ligature oe"},{character:"Ŕ",title:"Latin capital letter r with acute"},{character:"ŕ",title:"Latin small letter r with acute"},{character:"Ŗ",title:"Latin capital letter r with cedilla"},{character:"ŗ",title:"Latin small letter r with cedilla"},{character:"Ř",title:"Latin capital letter r with caron"},{character:"ř",title:"Latin small letter r with caron"},{character:"Ś",title:"Latin capital letter s with acute"},{character:"ś",title:"Latin small letter s with acute"},{character:"Ŝ",title:"Latin capital letter s with circumflex"},{character:"ŝ",title:"Latin small letter s with circumflex"},{character:"Ş",title:"Latin capital letter s with cedilla"},{character:"ş",title:"Latin small letter s with cedilla"},{character:"Š",title:"Latin capital letter s with caron"},{character:"š",title:"Latin small letter s with caron"},{character:"Ţ",title:"Latin capital letter t with cedilla"},{character:"ţ",title:"Latin small letter t with cedilla"},{character:"Ť",title:"Latin capital letter t with caron"},{character:"ť",title:"Latin small letter t with caron"},{character:"Ŧ",title:"Latin capital letter t with stroke"},{character:"ŧ",title:"Latin small letter t with stroke"},{character:"Ũ",title:"Latin capital letter u with tilde"},{character:"ũ",title:"Latin small letter u with tilde"},{character:"Ū",title:"Latin capital letter u with macron"},{character:"ū",title:"Latin small letter u with macron"},{character:"Ŭ",title:"Latin capital letter u with breve"},{character:"ŭ",title:"Latin small letter u with breve"},{character:"Ů",title:"Latin capital letter u with ring above"},{character:"ů",title:"Latin small letter u with ring above"},{character:"Ű",title:"Latin capital letter u with double acute"},{character:"ű",title:"Latin small letter u with double acute"},{character:"Ų",title:"Latin capital letter u with ogonek"},{character:"ų",title:"Latin small letter u with ogonek"},{character:"Ŵ",title:"Latin capital letter w with circumflex"},{character:"ŵ",title:"Latin small letter w with circumflex"},{character:"Ŷ",title:"Latin capital letter y with circumflex"},{character:"ŷ",title:"Latin small letter y with circumflex"},{character:"Ÿ",title:"Latin capital letter y with diaeresis"},{character:"Ź",title:"Latin capital letter z with acute"},{character:"ź",title:"Latin small letter z with acute"},{character:"Ż",title:"Latin capital letter z with dot above"},{character:"ż",title:"Latin small letter z with dot above"},{character:"Ž",title:"Latin capital letter z with caron"},{character:"ž",title:"Latin small letter z with caron"},{character:"ſ",title:"Latin small letter long s"}],ak=[{character:"<",title:"Less-than sign"},{character:">",title:"Greater-than sign"},{character:"≤",title:"Less-than or equal to"},{character:"≥",title:"Greater-than or equal to"},{character:"–",title:"En dash"},{character:"—",title:"Em dash"},{character:"¯",title:"Macron"},{character:"‾",title:"Overline"},{character:"°",title:"Degree sign"},{character:"−",title:"Minus sign"},{character:"±",title:"Plus-minus sign"},{character:"÷",title:"Division sign"},{character:"⁄",title:"Fraction slash"},{character:"×",title:"Multiplication sign"},{character:"ƒ",title:"Latin small letter f with hook"},{character:"∫",title:"Integral"},{character:"∑",title:"N-ary summation"},{character:"∞",title:"Infinity"},{character:"√",title:"Square root"},{character:"∼",title:"Tilde operator"},{character:"≅",title:"Approximately equal to"},{character:"≈",title:"Almost equal to"},{character:"≠",title:"Not equal to"},{character:"≡",title:"Identical to"},{character:"∈",title:"Element of"},{character:"∉",title:"Not an element of"},{character:"∋",title:"Contains as member"},{character:"∏",title:"N-ary product"},{character:"∧",title:"Logical and"},{character:"∨",title:"Logical or"},{character:"¬",title:"Not sign"},{character:"∩",title:"Intersection"},{character:"∪",title:"Union"},{character:"∂",title:"Partial differential"},{character:"∀",title:"For all"},{character:"∃",title:"There exists"},{character:"∅",title:"Empty set"},{character:"∇",title:"Nabla"},{character:"∗",title:"Asterisk operator"},{character:"∝",title:"Proportional to"},{character:"∠",title:"Angle"},{character:"¼",title:"Vulgar fraction one quarter"},{character:"½",title:"Vulgar fraction one half"},{character:"¾",title:"Vulgar fraction three quarters"}],lk=[{character:"‹",title:"Single left-pointing angle quotation mark"},{character:"›",title:"Single right-pointing angle quotation mark"},{character:"«",title:"Left-pointing double angle quotation mark"},{character:"»",title:"Right-pointing double angle quotation mark"},{character:"‘",title:"Left single quotation mark"},{character:"’",title:"Right single quotation mark"},{character:"“",title:"Left double quotation mark"},{character:"”",title:"Right double quotation mark"},{character:"‚",title:"Single low-9 quotation mark"},{character:"„",title:"Double low-9 quotation mark"},{character:"¡",title:"Inverted exclamation mark"},{character:"¿",title:"Inverted question mark"},{character:"‥",title:"Two dot leader"},{character:"…",title:"Horizontal ellipsis"},{character:"‡",title:"Double dagger"},{character:"‰",title:"Per mille sign"},{character:"‱",title:"Per ten thousand sign"},{character:"‼",title:"Double exclamation mark"},{character:"⁈",title:"Question exclamation mark"},{character:"⁉",title:"Exclamation question mark"},{character:"⁇",title:"Double question mark"},{character:"©",title:"Copyright sign"},{character:"®",title:"Registered sign"},{character:"™",title:"Trade mark sign"},{character:"§",title:"Section sign"},{character:"¶",title:"Paragraph sign"},{character:"⁋",title:"Reversed paragraph sign"}],Dy={key:"latin",label:"Latin",characters:ok},Ny={key:"mathematical",label:"Mathematical",characters:ak},Iy={key:"arrows",label:"Arrows",characters:ik},By={key:"currency",label:"Currency",characters:sk},My={key:"text",label:"Text",characters:lk},Py=[By,My,Ny,Iy,Dy],ck={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M224 80C126.8 80 48 158.8 48 256c0 63.7 33.8 119.5 84.6 150.4c11.4 7 19.4 19.6 19.4 34.2c0 21.8-17.6 39.4-39.4 39.4H24c-13.3 0-24-10.7-24-24s10.7-24 24-24H85.4C33.4 391 0 327.4 0 256C0 132.3 100.3 32 224 32s224 100.3 224 224c0 71.4-33.4 135-85.4 176H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H335.4c-21.8 0-39.4-17.6-39.4-39.4c0-14.6 8-27.2 19.4-34.2C366.2 375.5 400 319.7 400 256c0-97.2-78.8-176-176-176z"/></svg>'};class dk extends gs{constructor(e){super(),this.panelRef=null,this.categories=e}render(e,t){return e("vega-popover",{trigger:"click",alignment:"start",placement:"bottom",showArrow:!1,isScreenPosition:!0,ref:n=>{n&&rn.addUniqueObserverToNode(n,jd,()=>{this.handlePopoverShow()})}},[e("div",{slot:"popover"},[e("vega-rich-text-special-characters-panel",{categories:this.categories,ref:n=>{n&&(this.panelRef=n,rn.addUniqueObserverToNode(n,bt,i=>{this.insertCharacter(t,i.detail)}))}})]),e("div",{slot:"popover-content"},this.renderButton(e,t,{icon:"rte-special-characters",tooltip:{text:"Special Characters"}}))])}handleButtonClick(){}handleDropdownClick(){}handlePopoverShow(){this.panelRef&&this.panelRef.resetPanel()}insertCharacter(e,t){const n=e.rteRange,i=n.startNode;if(!i)return;const s=this.isCaretOnLineBreak(i,n)?this.insertAtLineBreak(i,t,n):this.insertAtTextNode(i,t,n);e.host.value.apply(new xt(s.node,s.offset))}isCaretOnLineBreak(e,t){return e instanceof ye&&e.text===`
|
|
100
|
+
`&&t.startOffset===t.endOffset}insertAtTextNode(e,t,n){const i=new sT(t,n);return i.isFlushable=!0,e.apply(i),{node:e,offset:Math.min(n.startOffset+t.length,e.getRangeEndOffset())}}insertAtLineBreak(e,t,n){return{node:this.insertTextToLineBreakNode(e,t,n),offset:t.length}}insertTextToLineBreakNode(e,t,n){const i=e.parent,s=i.children.indexOf(e);if(n.startOffset===0&&i.children[s+1]){const o=e.cloneWithText(t),l=new Ve(e,o);return l.isFlushable=!0,i.apply(l),o}const a=new ig(t);return a.isFlushable=!0,e.apply(a),e}}pl.register({"rte-special-characters":ck});class uk extends se{constructor(e){super(),this.categories=this.buildCategories(e)}prepareBeforeLoad(e){this.registerToolbarButtonRenderer("special-characters",new dk(this.categories),e)}buildCategories(e){const n=(e==null?void 0:e.includeDefaults)!==!1?Py:[];return e!=null&&e.categories?[...n,...e.categories]:n}}const Eg=[{title:"0.5",value:"0.5"},{title:"1",value:"1"},{title:"1.5",value:"1.5"},{title:"2",value:"2"},{title:"2.5",value:"2.5"}];var xi;(function(r){r.LINE_HEIGHT="LINE_HEIGHT"})(xi||(xi={}));class Xs extends dr{constructor(e){super(),this.type=xi.LINE_HEIGHT,this.lineHeight=e}static from(e){return[xi.LINE_HEIGHT,new Xs(e)]}static getDefaultStyles(e){return{lineHeight:e}}toJSON(){return{lineHeight:this.lineHeight}}renderClass(){return null}clone(){return new Xs(this.lineHeight)}renderStyle(){return Xs.getDefaultStyles(this.lineHeight)}}class Of extends Yt{constructor(e){super(),this.isFlushable=!0,this.lineHeight=e}toAnnotation(){return new Xs(this.lineHeight)}}class hk extends ne{handleAction(e,t){this.updateCustomStyleAnnotation(t,["lineHeight"])}}const fk={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M113.8 39.9c-4.6-5.1-11-7.9-17.8-7.9s-13.3 2.9-17.8 7.9l-72 80c-8.9 9.9-8.1 25 1.8 33.9s25 8.1 33.9-1.8L72 118.5V393.5L41.8 359.9c-8.9-9.9-24-10.7-33.9-1.8s-10.7 24-1.8 33.9l72 80c4.6 5.1 11 7.9 17.8 7.9s13.3-2.9 17.8-7.9l72-80c8.9-9.9 8.1-25-1.8-33.9s-25-8.1-33.9 1.8L120 393.5V118.5l30.2 33.5c8.9 9.9 24 10.7 33.9 1.8s10.7-24 1.8-33.9l-72-80zM248 72c-13.3 0-24 10.7-24 24s10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248zm0 160c-13.3 0-24 10.7-24 24s10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248zM224 416c0 13.3 10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248c-13.3 0-24 10.7-24 24z"/></svg>'};class pk extends gs{constructor(e){super(),this.options=e}render(e,t){const n=this.options.map(i=>{var s;return{key:i.value,label:(s=i.title)!==null&&s!==void 0?s:i.value}});return this.renderDropdown(e,t,{selectType:"single",selectedSourceKey:this.getSelectedSourceValue(t)},[this.renderButton(e,t,{icon:"line-height",showArrowIcon:!0,tooltip:{text:vr.t("Line Height")}}),this.renderDropdownListTemplate(e,n)])}isSelected(){return!1}isDisabled(e){var t;if(e.host.disabled)return!0;const n=this.getExtensionContext(e.host);return((t=n==null?void 0:n.getSelectedNodes())!==null&&t!==void 0?t:[]).some(a=>{var o;return((o=a.getAnnotationByType(ce.CODE))===null||o===void 0?void 0:o.code)||a.parent instanceof $t})?!0:this.getSelectedBlocks(e).some(a=>a instanceof $t||a instanceof Ye||!q.canHandle(Of.name,a))}handleDropdownClick(e,t){const n=e;this.getSelectedBlocks(t).forEach(s=>{s.apply(new Of(n))})}handleButtonClick(){}getSelectedSourceValue(e){const t=this.getSelectedBlocks(e);if(t.length===0)return"";const n=t[0].getAnnotationByType(xi.LINE_HEIGHT);return t.every(s=>{const a=s.getAnnotationByType(xi.LINE_HEIGHT);return(a==null?void 0:a.lineHeight)===(n==null?void 0:n.lineHeight)})&&n?n.lineHeight:""}getSelectedBlocks(e){var t,n;const i=this.getExtensionContext(e.host),s=(t=i==null?void 0:i.getSelectedNodes())!==null&&t!==void 0?t:[],a=[];return s.forEach(o=>{o.parent instanceof it&&!a.includes(o.parent)&&a.push(o.parent)}),a.length===0&&((n=e.rteRange.startNode)===null||n===void 0?void 0:n.parent)instanceof it&&a.push(e.rteRange.startNode.parent),a}}pl.register({"line-height":fk});const gk=new Set([te.name,de.name]);class mk extends Tt{constructor(e=Eg){super(),this.allowedLineHeights=new Set(e.map(t=>t.value))}canHandle(e){return gk.has(e.name)}handle(e){var t,n;const i=(n=(t=e==null?void 0:e.style.lineHeight)===null||t===void 0?void 0:t.trim())!==null&&n!==void 0?n:"";return i?this.allowedLineHeights.has(i)?{lineHeight:i}:{}:{}}}class vk extends dt{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(e){const t=e,n=t.lineHeight,i=t.customStyle;return n&&i&&i.lineHeight===n&&delete i.lineHeight,i&&Object.keys(i).length===0&&delete t.customStyle,e}}const Fy=new WeakMap,G0=new WeakSet;function _k(r,e){const t=r.annotationMap.get(xi.LINE_HEIGHT);if(!t||e.has(t.lineHeight))return;const n=t.lineHeight;r.annotationMap.delete(xi.LINE_HEIGHT);const i=r.annotationMap.get(nt.CUSTOM_STYLE);i?i.customStyle=Object.assign(Object.assign({},i.customStyle),{lineHeight:n}):r.annotationMap.set(...Wr.from({lineHeight:n}))}function yk(r){G0.has(r)||(G0.add(r),se.attachAnnotationFromJson(r,"lineHeight",(e,t)=>{if(typeof t!="string"||t==="")return;e.annotationMap.set(...Xs.from(t));const n=Fy.get(r);n&&n.size>0&&_k(e,n)}))}function bk(r,e){Fy.set(r,new Set(e.map(t=>t.value)))}class wk extends se{constructor(e=Eg){super(),this.options=e,this.toolbarButtonRenderer=null,this.registerAnnotationHandler(new mk(this.options)),[te,de].forEach(t=>{bk(t,this.options)})}prepareBeforeLoad(e){this.toolbarButtonRenderer=new pk(this.options),this.registerToolbarButtonRenderer("lineHeight",this.toolbarButtonRenderer,e)}}[te,de].forEach(r=>{se.registerActionHandleStrategy(r.name,Of.name,new hk),pe.register(r.name,new vk),yk(r)});class Sk extends ue{constructor(e,t){super(),this.type=J.INSERT_NODE_TO_NEAREST_ROOT,this.rteRange=e,this.nodeToBeInserted=t}}class Ck extends ne{handleAction(e,t){const{rteRange:n,token:i}=e;if(n&&n.startNode){const{key:s,label:a,customAttrs:o={wrapped:"true"}}=i,l=new es(Q(),s,a,t);l.annotationMap.set("CUSTOM_ATTRIBUTE",new an(o)),t.apply(new Sk(n,l)),e.actionHandleResult=!0}}}var Ek=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t};class xk extends fs{canHandle(e,t){const n=e[t];return n.nodeName==="SPAN"&&n.classList.contains("token")&&n.hasAttribute("token-key")?1:0}handle(e){const t=e[0],n=t.getAttribute("token-key"),i=t.textContent,s=ze.generate(ye,t),{customAttribute:a,customClass:o}=s,l=Ek(s,["customAttribute","customClass"]);return{id:Q(),type:"token",token:n,text:i,annotations:Object.assign(Object.assign({},l),{customAttribute:this.createCustomAttrs(a)})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}createCustomAttrs(e){const t=Object.assign(Object.assign({},e),{contenteditable:null,"template-token-key":null,"token-key":null,wrapped:e.wrapped==="false"?"false":"true"});return Vt(t)}}const Tk=new xk;class kk extends se{constructor(e=[]){super(),this.tokenRenderer=new RT,this.tokenList=e,this.registerNode("token",es),this.registerRenderer("token",this.tokenRenderer),this.registerElementToNodeDTOClassStrategy(Tk)}prepareBeforeLoad(e){this.registerToolbarButtonRenderer("token",new AT(this.tokenList),e)}}(()=>{const r=new Ck;se.registerActionHandleStrategy(te.name,"INSERT_TOKEN_NODE",r),se.registerActionHandleStrategy(de.name,"INSERT_TOKEN_NODE",r)})();const Lk=[{payloadKey:"IS_OPEN_METHOD_CALLED",payloadDescription:"Indicate if the method open of public API VegaDialogController is called",canAccept:(r,e)=>r==="VegaDialogController"&&e==="open",payloadValue:()=>!0}];var Ak=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},Rk=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t};class iu{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=Tn(iu,["open"],Lk)}open(e){const t=document.createElement("vega-dialog"),{isVerticallyCenter:n,isVerticallyCentered:i,showCloseButton:s,size:a,title:o,handleClose:l}=e,c=Rk(e,["isVerticallyCenter","isVerticallyCentered","showCloseButton","size","title","handleClose"]);return t.id=`vega-dialog-${Q()}`,t.dialogTitle=o,t.modalProps={isVerticallyCenter:n,isVerticallyCentered:i,showCloseButton:s,size:a,handleClose:l},Object.keys(c).forEach(u=>{c[u]!==void 0&&(t[u]=c[u])}),document.body.append(t),t}}Ak([xn()],iu.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ok=new iu;class Dk{constructor(){this.overrideDefault=!1}}class Fi extends Dk{static validateCreditCardDigits(e){const t=T5(e).reverse();return t.length<12||t.length>19?!1:k5(t,i=>i%2===0).reduce(x5,0)%10===0}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Unexpected type of input: ${typeof e}: ${e}`);const t=this.formatCreditCardNumber(e),n=this.isValidVisaCreditCard(e)||this.isValidAmexCreditCard(e)||this.isValidDiscoverCreditCard(e)||this.isValidMasterCardCreditCard(e)||!this.isSupportedCreditCardType(t)&&Fi.validateCreditCardDigits(t);return{isValid:n,message:n?"":"Credit card number is invalid"}}canEvaluate(e,t){return t?this.isAcceptedInputType(e)&&!t.disabled&&t.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isValidVisaCreditCard(e){const t=this.formatCreditCardNumber(e);return L0.test(t)&&(t.length===13||t.length===16||t.length===19)&&Fi.validateCreditCardDigits(t)}isValidMasterCardCreditCard(e){const t=this.formatCreditCardNumber(e);return A0.test(t)&&t.length===16&&Fi.validateCreditCardDigits(t)}isValidAmexCreditCard(e){const t=this.formatCreditCardNumber(e);return R0.test(t)&&t.length===15&&Fi.validateCreditCardDigits(t)}isValidDiscoverCreditCard(e){const t=this.formatCreditCardNumber(e);return O0.test(t)&&t.length===16&&Fi.validateCreditCardDigits(t)}isAcceptedInputType(e){return typeof e=="string"}formatCreditCardNumber(e){return e.replace(/\s/g,"")}isSupportedCreditCardType(e){return L0.test(e)||A0.test(e)||R0.test(e)||O0.test(e)}}var Df;(function(r){r.Angular="angular",r.Vue="vue",r.React="react",r.Next="next",r.VanillaJs="vanilla-js"})(Df||(Df={}));class Nk{constructor(){this.vegaVersion="2.89.0",this.framework=Df.VanillaJs}getVegaEnv(){return{version:this.vegaVersion,framework:this.framework}}setVegaFramework(e){this.framework=e}}const Ik=new Nk;var xg=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class su extends ol{constructor(e){super(),this.originalWatchers=new Map,this.hasDisconnected=!1,this.isEnabled=Ra.isEnabled("VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD")&&Ra.isEnabled("VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD"),this.component=e.component}connectedCallback(){if(!this.isEnabled||this.hasDisconnected)return;const e=this.component.constructor.watchers;for(const t in e)e[t].forEach(i=>{if(!this.originalWatchers.has(i)){const s=this.component[i];this.originalWatchers.set(i,s),this.component[i]=function(){}}})}disconnectedCallback(){this.isEnabled&&(this.hasDisconnected=!0)}componentDidLoad(){this.isEnabled&&this.originalWatchers.forEach((e,t)=>{const n=e;this.component[t]=function(...i){return n.apply(this,i)}})}}xg([En("connectedCallback")],su.prototype,"connectedCallback",null);xg([En("disconnectedCallback")],su.prototype,"disconnectedCallback",null);xg([En("componentDidLoad")],su.prototype,"componentDidLoad",null);var Hy=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class Tg extends ol{constructor(e){super(),this.component=e.component}connectedCallback(){this.observer=new dl(this.isAcceptable.bind(this),()=>{_C(this.component)}),Ke.register(td,this.observer)}disconnectedCallback(){this.observer&&(Ke.unregister(td,this.observer),this.observer=null)}isAcceptable(){var e,t;const n=this.component.host;return(t=(e=vr.getConnectedComponents().get(n.tagName))===null||e===void 0?void 0:e.has(n))!==null&&t!==void 0?t:!1}}Hy([En("connectedCallback")],Tg.prototype,"connectedCallback",null);Hy([En("disconnectedCallback")],Tg.prototype,"disconnectedCallback",null);var Bk=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class jy extends ol{constructor(e){super(),this.component=e.component}connectedCallback(){const e=this.component.host.shadowRoot,t=e.insertBefore;e.insertBefore=function(n,i){if(n.nodeName==="STYLE"){const s=yn.nonce;s!==void 0&&n.setAttribute("nonce",s)}return t.call(this,n,i)}}}Bk([En("connectedCallback")],jy.prototype,"connectedCallback",null);function Mk(){Pk(),Fk(),Hk(),jk(),$k(),Vk(),zk(),Uk(),Wk(),Gk(),Kk(),qk(),Xk(),Zk(),Yk(),Jk(),Qk(),eL(),tL(),rL(),nL(),iL()}function Pk(){globalThis.VegaDisabledFeatureKeys&&Ra.disable(...globalThis.VegaDisabledFeatureKeys)}function Fk(){globalThis.VegaEnabledFeatureKeys&&Ra.enable(...globalThis.VegaEnabledFeatureKeys)}function Hk(){globalThis.VegaLoader=lT}function jk(){globalThis.VegaNotify=dT}function $k(){globalThis.VegaThemeManager=_g}function Vk(){globalThis.setVegaLogLevel=RC}function zk(){globalThis.VegaDialog=Ok}function Uk(){d_.register([su,Tg,jy])}function Wk(){globalThis.VegaEventManager=fT}function Gk(){Object.keys(rd).forEach(r=>{const{url:e}=rd[r],t=`vega-typography-${r}`;if(!document.querySelector(`#${t}`)){const n=document.createElement("link");n.id=t,n.href=e,n.rel="stylesheet",document.head.append(n)}})}function Kk(){globalThis.VegaIconManager=Lf}function qk(){globalThis.VegaZIndexManager=mT}function Xk(){globalThis.ValidCreditCardNumberRule=Fi}function Zk(){globalThis.VegaEnvInfo=Ik.getVegaEnv(),Y(()=>Promise.resolve().then(()=>__),void 0,import.meta.url).then(r=>{r.default.init(Ra)})}function Yk(){globalThis.waitForVega=bT}function Jk(){globalThis.VegaSkeletonLoader=CT}function Qk(){globalThis.VegaTranslation=TT,globalThis.VegaTranslationResourceEN=mc}function eL(){globalThis.VegaRTEContent=De,globalThis.VegaRTETokenExtension=kk,globalThis.VegaRTELanguageExtension=DT,globalThis.VegaRTEPresetToolbarItems=Kx,globalThis.VegaRTEDefaultLineHeightOptions=Eg,globalThis.VegaRTEFunctionExtension=KT,globalThis.VegaRTETableExtension=K8,globalThis.VegaRTEHorizontalLineExtension=nk,globalThis.VegaRTESpecialCharactersExtension=uk,globalThis.VegaRTESpecialCharactersEssentials=Py,globalThis.VegaRTESpecialCharactersLatin=Dy,globalThis.VegaRTESpecialCharactersMathematical=Ny,globalThis.VegaRTESpecialCharactersArrows=Iy,globalThis.VegaRTESpecialCharactersCurrency=By,globalThis.VegaRTESpecialCharactersText=My,globalThis.VegaRTELineHeightExtension=wk}function tL(){Y(()=>import("./public-rules-09387dcf-BYyE4A0Y.js"),__vite__mapDeps([138,109,111,91,86,42,134,124,83,96]),import.meta.url).then(r=>{Object.entries(r).forEach(([e,t])=>{globalThis[e]=t})})}function rL(){globalThis.VegaThemeManagerApplyBranding&&_g.applyBranding(globalThis.VegaThemeManagerApplyBranding)}function nL(){globalThis.setVegaNonce=px}function iL(){yn.patchHeadInsertBeforeWithNonceToStencil()}const sL=Mk,oL=()=>K2(),aL=(r,e)=>typeof window>"u"?Promise.resolve():oL().then(()=>(sL(),xC(JSON.parse('[["vega-pagination",[[1,"vega-pagination",{"current":[1538],"total":[2],"pageSize":[1026,"page-size"],"extensions":[16],"layout":[1],"pageSizeSelectorOptions":[1040],"dropdownProps":[16],"currentBreakpoint":[32],"pageCount":[32],"isAllActive":[32]}]]],["vega-page-notification_2",[[1,"vega-page-notification",{"notificationTitle":[1,"title"],"message":[1],"type":[1],"duration":[2],"showCloseButton":[4,"show-close-button"],"actionButtons":[16],"close":[64]}],[1,"vega-page-notification-list"]]],["vega-color-picker",[[1,"vega-color-picker",{"value":[1537],"hint":[1],"disabled":[516],"required":[516],"optional":[516],"label":[1],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"validationRules":[16],"colors":[16],"isInline":[4,"is-inline"],"columns":[2]}]]],["vega-stepper",[[1,"vega-stepper",{"stepperId":[513,"id"],"max":[514],"min":[514],"value":[1538],"label":[1],"inputDisabled":[4,"input-disabled"],"disabled":[516],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"buttonVariant":[1,"button-variant"]}]]],["vega-app-header-button",[[1,"vega-app-header-button",{"dropdown":[16],"size":[1],"labelConfig":[16],"label":[513],"showLabel":[4,"show-label"],"avatar":[16],"avatarPosition":[1,"avatar-position"],"showBorder":[4,"show-border"],"showMenuArrowIcon":[4,"show-menu-arrow-icon"],"selected":[4],"isDropdownShow":[32],"currentBreakpoint":[32]}]]],["vega-button-link",[[1,"vega-button-link",{"link":[1],"size":[1],"icon":[513],"iconType":[1,"icon-type"],"iconAlign":[1,"icon-align"],"label":[1537],"disabled":[4],"danger":[4],"eventful":[4],"target":[1]}]]],["vega-chip",[[1,"vega-chip",{"text":[1],"clickable":[4],"variant":[1],"size":[1],"bgColor":[1,"bg-color"],"textColor":[1,"text-color"],"statusColor":[1,"status-color"],"chipType":[1,"chip-type"],"showCloseIcon":[4,"show-close-icon"],"icon":[1],"iconAlign":[1,"icon-align"],"iconColor":[1,"icon-color"],"currentBreakpoint":[32],"currentSize":[32]}]]],["vega-item-toggle",[[1,"vega-item-toggle",{"itemToggleStatusMap":[16],"statusMap":[16],"isToggled":[1028,"is-toggled"],"toggleItemStatus":[32]}]]],["vega-checkbox_2",[[1,"vega-checkbox",{"identifier":[1],"value":[1032],"checked":[1028],"indeterminate":[1540],"disabled":[516],"size":[1],"required":[516],"isValid":[1540,"is-valid"],"groupDisabled":[32],"showError":[32],"setValue":[64]}],[1,"vega-checkbox-group",{"label":[1],"value":[1040],"vegaFlexProp":[16],"disabled":[516],"required":[516],"hint":[1],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"validationRules":[16]}]]],["vega-hint",[[1,"vega-hint"]]],["vega-textarea",[[1,"vega-textarea",{"placeholder":[1],"hint":[1],"disabled":[516],"label":[1],"labelSuffixButtonConfig":[16],"showCounter":[4,"show-counter"],"value":[1537],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"required":[1540],"maxLength":[514,"max-length"],"minLength":[514,"min-length"],"optional":[516],"resizable":[4],"rows":[2],"validationRules":[16],"currentCharCount":[32]},[[0,"input","handleValueTextarea"]]]]],["vega-toggle-switch",[[1,"vega-toggle-switch",{"checked":[1540],"value":[1540],"size":[1],"label":[1],"required":[516],"optional":[516],"disabled":[516],"validationRules":[16],"autoValidation":[516,"auto-validation"],"isValid":[1540,"is-valid"]}]]],["vega-button-group_2",[[1,"vega-button-group",{"variant":[1],"size":[1],"iconAlign":[1,"icon-align"],"disabled":[4],"allItemsDisabled":[32]}],[1,"vega-button-group-item",{"icon":[1],"label":[1],"iconOnly":[4,"icon-only"],"disabled":[516],"itemKey":[1,"item-key"],"dropdownProps":[16],"dropdownSource":[16],"variant":[32],"size":[32],"iconAlign":[32],"parentDisabled":[32],"allItemsDisabled":[32]}]]],["vega-loader-wrapper_2",[[1,"vega-loading-indicator",{"shape":[1],"size":[1],"mode":[1],"percent":[2],"label":[1],"hint":[1],"status":[1],"currentBreakpoint":[32]}],[1,"vega-loader-wrapper"]]],["vega-radio_2",[[1,"vega-radio-group",{"label":[1],"value":[1537],"name":[1],"vegaFlexProp":[16],"required":[516],"hint":[1],"isValid":[1540,"is-valid"],"disabled":[516],"autoValidation":[516,"auto-validation"],"validationRules":[16]}],[1,"vega-radio",{"value":[1],"name":[1],"checked":[1028],"disabled":[4],"size":[1],"groupDisabled":[32],"showError":[32]}]]],["vega-carousel",[[1,"vega-carousel",{"perPage":[2,"per-page"],"itemsPerPage":[2,"items-per-page"],"showSlider":[4,"show-slider"],"spacing":[1],"canSwipe":[4,"can-swipe"],"page":[32],"totalPages":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}]]],["vega-input-credit-card",[[1,"vega-input-credit-card",{"required":[1540],"disabled":[516],"label":[1],"hint":[1],"size":[1],"placeholder":[1],"hideCardNumberOnBlur":[4,"hide-card-number-on-blur"],"autoValidation":[516,"auto-validation"],"validationRules":[16],"isValid":[1540,"is-valid"],"value":[1537]}]]],["vega-table_11",[[1,"vega-table",{"columns":[16],"groupColumns":[16],"dataSource":[1040],"rowSelection":[1040],"rowExpandable":[4,"row-expandable"],"rowClickable":[4,"row-clickable"],"rowDraggable":[4,"row-draggable"],"rowDivider":[4,"row-divider"],"columnDivider":[4,"column-divider"],"striped":[4],"density":[1],"paddingX":[16],"showHeader":[4,"show-header"],"pagination":[16],"emptyDescription":[1,"empty-description"],"rowKey":[1,"row-key"],"scrollConfig":[16],"sortConfig":[16],"showEditError":[4,"show-edit-error"],"selectedRowKeySet":[32],"expandedRowKeySet":[32],"currentBreakpoint":[32],"sortersMap":[32],"currentData":[32],"currentClickedRowKey":[32],"currentPage":[32],"pageSize":[32],"editingRows":[32],"isSelectedAll":[32],"isTemplateRenderMode":[32],"columnStructureModel":[32],"expandableRows":[32],"hasExpandableRow":[32],"openExpandRow":[64],"closeExpandRow":[64],"closeAllExpandRow":[64],"toggleExpandRow":[64],"clearSelection":[64],"getSelection":[64],"setSelection":[64],"startRowEditMode":[64],"stopRowEditMode":[64],"stopAllRowEditMode":[64],"getRowData":[64],"getRowsData":[64],"getFormRef":[64],"addNewRow":[64],"saveEditRow":[64],"saveAllEditRows":[64],"getEditingRowsKey":[64],"removeRow":[64]}],[1,"vega-table-body"],[1,"vega-table-cell",{"textAlign":[1,"text-align"],"breakpoint":[1],"overflow":[1],"width":[1],"currentBreakpoint":[32],"density":[32],"rowDivider":[32],"columnDivider":[32],"clickable":[32],"checked":[32],"striped":[32],"expanded":[32],"renderInput":[32]}],[1,"vega-table-expand-row",{"rowKey":[1,"row-key"],"striped":[4],"currentBreakpoint":[32],"withMultipleSelection":[32],"withRowDraggable":[32],"expanded":[32],"checked":[32],"colSpan":[32]}],[1,"vega-table-foot",{"fixed":[32],"rowDivider":[32]}],[1,"vega-table-foot-cell",{"breakpoint":[1],"textAlign":[1,"text-align"],"width":[1],"currentBreakpoint":[32],"density":[32],"columnDivider":[32]}],[1,"vega-table-foot-row",{"currentBreakpoint":[32],"hasExpandableRow":[32],"selectionType":[32],"paddingX":[32],"columnDivider":[32],"draggable":[32],"density":[32]}],[1,"vega-table-head",{"fixed":[32]}],[1,"vega-table-head-cell",{"breakpoint":[1],"sorter":[1],"sortOrder":[1025,"sort-order"],"textAlign":[1,"text-align"],"width":[1],"sortConfig":[16],"pinned":[1],"currentBreakpoint":[32],"density":[32],"columnDivider":[32],"renderInput":[32]}],[1,"vega-table-head-row",{"selectAllDisabled":[4,"select-all-disabled"],"hideSelectAll":[4,"hide-select-all"],"currentBreakpoint":[32],"hasExpandableRow":[32],"selectionType":[32],"paddingX":[32],"checkedAll":[32],"columnDivider":[32],"density":[32],"isEmptyTable":[32],"isTemplateRenderMode":[32],"renderInput":[32],"draggable":[32]}],[1,"vega-table-row",{"rowKey":[1,"row-key"],"striped":[4],"rowDivider":[4,"row-divider"],"currentBreakpoint":[32],"clicked":[32],"hasExpandableRow":[32],"expandable":[32],"clickable":[32],"paddingX":[32],"selectionType":[32],"checked":[32],"expanded":[32],"columnDivider":[32],"density":[32],"draggable":[32]}]]],["vega-dropdown_5",[[1,"vega-dropdown",{"size":[8],"trigger":[1],"translocation":[16],"source":[1040],"positionRelativeTo":[1,"position-relative-to"],"selectType":[1,"select-type"],"selectedSourceKey":[1025,"selected-source-key"],"prefixIconSlot":[4,"prefix-icon-slot"],"maxHeight":[2,"max-height"],"searchable":[4],"matchTargetWidth":[4,"match-target-width"],"minWidth":[8,"min-width"],"maxWidth":[8,"max-width"],"itemDisplayRule":[1,"item-display-rule"],"itemTooltipProps":[16],"matchContainerHeight":[4,"match-container-height"],"caseSensitive":[4,"case-sensitive"],"dynamicOption":[4,"dynamic-option"],"useDefaultFilter":[4,"use-default-filter"],"isLoading":[4,"is-loading"],"placement":[1],"alignment":[1],"isLazyLoading":[4,"is-lazy-loading"],"searchTriggerBy":[1,"search-trigger-by"],"isScreenPosition":[4,"is-screen-position"],"resettable":[4],"virtualizationThreshold":[2,"virtualization-threshold"],"preserveValueIfNotInSource":[4,"preserve-value-if-not-in-source"],"searchNoResultsText":[1,"search-no-results-text"],"searchString":[32],"isDropdownShow":[32],"sourceForRender":[32],"show":[64],"hide":[64],"search":[64],"clearSelection":[64],"getSelection":[64],"setSelection":[64]}],[1,"vega-dropdown-content-box"],[1,"vega-dropdown-group",{"label":[1],"divide":[4]}],[1,"vega-dropdown-item",{"label":[1],"itemKey":[513,"item-key"],"count":[2],"prefixIcon":[1,"prefix-icon"],"disabled":[4],"height":[2],"danger":[4],"selectType":[32],"prefixIconSlot":[32],"selected":[32],"itemDisplayRule":[32],"itemTooltipProps":[32]}],[1,"vega-virtual-scroll",{"source":[16],"approxItemHeight":[2,"approx-item-height"],"viewportMaxHeight":[2,"viewport-max-height"],"isLoading":[4,"is-loading"],"virtualizationThreshold":[2,"virtualization-threshold"],"sourceItemIdentifier":[1,"source-item-identifier"],"renderItem":[16],"positionConfig":[32],"scrollTop":[32],"scrollToIndex":[64]}]]],["vega-left-nav_5",[[1,"vega-left-nav",{"open":[1028],"headerConfig":[16],"source":[16],"footnote":[1],"showAsOverlay":[4,"show-as-overlay"],"autoCollapseOnOverlay":[4,"auto-collapse-on-overlay"],"autoCollapseGroups":[8,"auto-collapse-groups"],"currentBranding":[32],"openState":[32],"toggle":[64]}],[1,"vega-left-nav-group",{"icon":[1],"label":[1],"openByDefault":[4,"open-by-default"],"itemKey":[1,"item-key"],"autoCollapseGroups":[32]}],[1,"vega-left-nav-link",{"icon":[1],"selected":[1540],"customSelectionEnabled":[4,"custom-selection-enabled"],"url":[1],"counterBadge":[16],"itemKey":[1,"item-key"],"target":[1]}],[1,"vega-left-nav-section",{"sectionHeader":[16],"itemKey":[1,"item-key"]}],[1,"vega-nav-card",{"source":[16],"maxHeight":[520,"max-height"],"currentMaxHeight":[32]}]]],["vega-calendar_4",[[1,"vega-calendar",{"viewMode":[1025,"view-mode"],"events":[16],"timeFormat":[1,"time-format"],"isDateDisabled":[16],"moreActionDropdownProps":[16],"showEventColorBar":[4,"show-event-color-bar"],"showSwitchView":[4,"show-switch-view"],"enableDateClick":[4,"enable-date-click"],"showWeekends":[4,"show-weekends"],"enabledEventPreview":[4,"enabled-event-preview"],"timezone":[1],"eventEditable":[4,"event-editable"],"getEventPreviewActions":[16],"calendarView":[32],"currentPeriod":[32],"postOperationDate":[32],"showAllEventsInDayOrWeekView":[32],"calendarEvents":[32]}],[1,"vega-calendar-event",{"calendarEvent":[16],"timeFormat":[32],"slotMode":[32],"showColorBar":[32]}],[1,"vega-calendar-event-preview",{"previewPayload":[32],"currentEvent":[32],"eventActions":[32]}],[1,"vega-calendar-event-slot",{"eventKey":[513,"event-key"]}]]],["vega-rich-text-editor_4",[[1,"vega-rich-text-editor",{"label":[1],"required":[516],"optional":[516],"placeholder":[1],"disabled":[4],"hint":[1],"rows":[2],"value":[1040],"toolbarItems":[16],"allowSourceEdit":[4,"allow-source-edit"],"sourceEditConfig":[16],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"validationRules":[16],"textStyleItems":[16],"extensions":[16],"richTextContentEditable":[32],"selectionMap":[32],"isInDarkMode":[32],"sourceView":[32]}],[1,"vega-rich-text-editor-toolbar-button",{"disabled":[4],"hidden":[4],"selected":[4],"showArrowIcon":[4,"show-arrow-icon"],"icon":[1],"iconColor":[1,"icon-color"]}],[1,"vega-rich-text-image-editor",{"alt":[513],"size":[1537],"currentPage":[32],"selected":[32]}],[1,"vega-rich-text-link-editor",{"status":[1025],"record":[16],"resetStatusAfterHide":[4,"reset-status-after-hide"],"target":[16],"show":[64]}]]],["vega-rich-text-table-properties_3",[[1,"vega-rich-text-table-properties",{"defaultValue":[16],"styleMap":[16],"type":[513],"colors":[16],"isInDarkMode":[32]}],[1,"vega-rich-text-table-selection-widget",{"isSelected":[32]}],[1,"vega-rich-text-table-setting",{"hasCaption":[4,"has-caption"],"selectedCells":[1040],"target":[16],"isColumnDropdownOpen":[32],"isMergeCellsDropdownOpen":[32]}]]],["vega-date-picker_2",[[1,"vega-date-picker",{"mode":[1],"value":[1537],"label":[1],"required":[516],"optional":[516],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"format":[1],"size":[1],"validationRules":[16],"minDate":[1537,"min-date"],"maxDate":[1537,"max-date"],"placeholder":[1],"clearButton":[4,"clear-button"],"readOnly":[4,"read-only"],"allowRepick":[4,"allow-repick"],"dropdownConfig":[16],"showClearIcon":[4,"show-clear-icon"],"showYearMonthDropdowns":[4,"show-year-month-dropdowns"],"disabled":[516],"timezone":[1],"isDateDisabled":[16],"isMobileDevice":[32],"isCalendarShow":[32],"doClose":[64],"doOpen":[64]}],[1,"vega-date-picker-calendar",{"size":[1],"fillContainer":[4,"fill-container"],"mode":[1],"selection":[1025],"format":[1],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"clearButton":[4,"clear-button"],"staticHeight":[4,"static-height"],"timezone":[1],"showYearMonthDropdowns":[4,"show-year-month-dropdowns"],"yearMonthDropdownProps":[16],"dualMonths":[4,"dual-months"],"isDateDisabled":[16],"dateIndicator":[16],"currentSize":[32],"isMobileDevice":[32],"today":[32],"currentPeriod":[32],"hoverDate":[32],"calendarSelection":[32],"maxCalendarDate":[32],"minCalendarDate":[32],"isDualMonths":[32],"reset":[64],"triggerRepick":[64]}]]],["vega-popover_2",[[1,"vega-popover",{"size":[8],"placement":[1],"alignment":[1],"positionRelativeTo":[1,"position-relative-to"],"trigger":[1],"showArrow":[4,"show-arrow"],"isScreenPosition":[4,"is-screen-position"],"padding":[1],"isPopoverShow":[32],"show":[64],"hide":[64]}],[1,"vega-popover-content-box",{"showArrow":[4,"show-arrow"],"padding":[1]}]]],["vega-progress-tracker_2",[[1,"vega-progress-tracker",{"current":[1026],"direction":[1],"steps":[16],"completedStepArray":[16],"completedSteps":[16],"canClickStep":[4,"can-click-step"],"allowNoCurrentStep":[4,"allow-no-current-step"],"currentSteps":[32],"currentDirection":[32],"nextStep":[64],"prevStep":[64],"setCurrent":[64],"getCurrent":[64]}],[1,"vega-progress-tracker-step",{"stepKey":[513,"step-key"],"clickable":[516],"progressStatus":[32],"isCurrent":[32]}]]],["vega-selection-chip_2",[[1,"vega-selection-chip",{"label":[1],"size":[1],"variant":[1],"disabled":[1028],"checked":[1540],"block":[4],"disabledTooltip":[16],"swatchColor":[1,"swatch-color"],"value":[1],"showError":[32],"currentBreakpoint":[32],"selectType":[32]}],[1,"vega-selection-chip-group",{"label":[1],"hint":[1],"selectType":[1,"select-type"],"value":[1025],"required":[4],"disabled":[4],"validationRules":[16],"isValid":[1540,"is-valid"]}]]],["vega-selection-tile_2",[[1,"vega-selection-tile",{"titleText":[1,"title"],"note":[1],"prefixIcon":[1,"prefix-icon"],"disabled":[1028],"checked":[1028],"selectType":[1025,"select-type"],"value":[1],"showError":[32],"distributeEvenly":[32]}],[1,"vega-selection-tile-group",{"label":[1],"hint":[1],"distributeEvenly":[4,"distribute-evenly"],"selectType":[1,"select-type"],"value":[1025],"layout":[1],"required":[4],"optional":[516],"disabled":[4],"validationRules":[16],"isValid":[1540,"is-valid"]}]]],["vega-tab-group_2",[[1,"vega-tab-group",{"selectedTabDataTarget":[1025,"selected-tab-data-target"],"gap":[1],"showCloseButton":[4,"show-close-button"],"tabItems":[1040],"positionRelativeTo":[1,"position-relative-to"],"variant":[1],"overflow":[1],"tabPages":[32],"tabWidthArray":[32],"currentPageIndex":[32]}],[1,"vega-tab-group-panel",{"isActive":[4,"is-active"]}]]],["vega-time-picker_2",[[1,"vega-time-picker",{"label":[1],"mode":[1],"required":[516],"optional":[516],"placeholder":[1],"increments":[2],"timeFormat":[513,"time-format"],"value":[1537],"size":[1],"disabled":[516],"readOnly":[4,"read-only"],"showClearIcon":[4,"show-clear-icon"],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"validationRules":[16],"positionRelativeTo":[1,"position-relative-to"],"dropdownSource":[32],"isDropdownShow":[32],"selectedTimeValue":[32]}],[1,"vega-time-picker-dropdown"]]],["vega-accordion",[[1,"vega-accordion",{"drawsBackground":[4,"draws-background"],"prefixIcon":[1,"prefix-icon"],"accordionTitle":[1,"accordion-title"],"titleBackgroundColor":[1,"title-background-color"],"expandIconAlign":[1,"expand-icon-align"],"expand":[1028],"iconPosition":[1,"icon-position"],"showExpandIcon":[4,"show-expand-icon"],"groupId":[1,"group-id"]}]]],["vega-app-footer",[[1,"vega-app-footer",{"content":[1],"termOfUseLabel":[1,"term-of-use-label"],"termOfUseUrl":[1,"term-of-use-url"],"termOfUseUrlTarget":[1,"term-of-use-url-target"],"termOfUseUrlId":[1,"term-of-use-url-id"],"privacyPolicyLabel":[1,"privacy-policy-label"],"privacyPolicyUrl":[1,"privacy-policy-url"],"privacyPolicyUrlTarget":[1,"privacy-policy-url-target"],"privacyPolicyUrlId":[1,"privacy-policy-url-id"],"hideDefaultLinks":[4,"hide-default-links"],"additionalLinks":[16],"showDisclaimer":[4,"show-disclaimer"],"disclaimerUrlTarget":[1,"disclaimer-url-target"],"currentBranding":[32]}]]],["vega-backdrop",[[1,"vega-backdrop",{"color":[1],"visible":[4],"duration":[2]}]]],["vega-banner",[[1,"vega-banner",{"type":[1],"bannerTitle":[1,"banner-title"],"content":[1],"actionButtons":[16],"showCloseButton":[4,"show-close-button"],"isOpen":[4,"is-open"],"doClose":[64]}]]],["vega-bar-chart",[[1,"vega-bar-chart",{"options":[16]}]]],["vega-brand-logo",[[1,"vega-brand-logo",{"name":[1],"size":[1],"theme":[1],"isInDarkMode":[32]}]]],["vega-breadcrumb",[[1,"vega-breadcrumb",{"maxItems":[8,"max-items"],"items":[16],"compactOnMobile":[4,"compact-on-mobile"],"lastItemClickable":[4,"last-item-clickable"]}]]],["vega-card",[[1,"vega-card",{"padding":[1],"margin":[1],"variant":[1],"backgroundColor":[1,"background-color"]}]]],["vega-code-block",[[1,"vega-code-block",{"readOnly":[4,"read-only"],"disabled":[4],"showCopyButton":[4,"show-copy-button"],"showLineNumber":[4,"show-line-number"],"value":[1040],"doFocus":[64]}]]],["vega-color-swatch",[[1,"vega-color-swatch",{"color":[1],"selected":[1540],"label":[1],"size":[1],"disabled":[516],"variant":[1],"shape":[1]}]]],["vega-color-swatch-picker",[[1,"vega-color-swatch-picker",{"value":[1025],"label":[1],"disabled":[4],"required":[516],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"validationRules":[16],"colors":[16],"swatchGridColumns":[8,"swatch-grid-columns"],"showInput":[4,"show-input"],"inputPlaceholder":[1,"input-placeholder"],"inputPrefixIcon":[1,"input-prefix-icon"],"showClearButton":[4,"show-clear-button"],"inputFormatter":[1,"input-formatter"],"internalColor":[32],"isPopoverOpen":[32]}]]],["vega-combo-box",[[1,"vega-combo-box",{"label":[1],"required":[516],"optional":[516],"source":[1040],"value":[1040],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"validationRules":[16],"disabled":[516],"placeholder":[1],"hint":[1],"size":[1],"containerMaxHeight":[520,"container-max-height"],"vegaDropdownProps":[16],"useDefaultFilter":[4,"use-default-filter"],"currentBreakpoint":[32],"close":[64],"open":[64]}]]],["vega-counter-badge",[[1,"vega-counter-badge",{"dot":[4],"color":[1],"count":[2],"offset":[16]}]]],["vega-divider",[[1,"vega-divider",{"direction":[1],"variant":[1],"margin":[1],"currentBreakpoint":[32]}]]],["vega-field-error",[[1,"vega-field-error",{"message":[1]}]]],["vega-file-uploader",[[1,"vega-file-uploader",{"label":[1],"variant":[1],"hint":[1],"value":[1040],"disabled":[4],"maxCount":[2,"max-count"],"required":[4],"optional":[516],"validationRules":[16],"autoValidation":[516,"auto-validation"],"isValid":[1540,"is-valid"],"accept":[1]}]]],["vega-flag-icon",[[1,"vega-flag-icon",{"country":[1],"size":[1]}]]],["vega-image-uploader",[[1,"vega-image-uploader",{"value":[1040],"accept":[1],"status":[1537],"showPreviewButton":[4,"show-preview-button"],"showRemoveButton":[4,"show-remove-button"],"showReplaceButton":[4,"show-replace-button"],"disabled":[516],"required":[516],"optional":[516],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"validationRules":[16],"label":[1],"hint":[1],"actionTitle":[1,"action-title"],"actionSubTitle":[1,"action-sub-title"],"width":[8],"height":[8],"isInDarkMode":[32],"getContentURL":[64]}]]],["vega-input-numeric",[[1,"vega-input-numeric",{"prefixText":[1,"prefix-text"],"suffixText":[1,"suffix-text"],"prefixIcon":[1,"prefix-icon"],"value":[1025],"size":[1],"placeholder":[1],"thousandComma":[4,"thousand-comma"],"integerOnly":[4,"integer-only"],"disabled":[4],"minorIncrement":[2,"minor-increment"],"majorIncrement":[2,"major-increment"],"label":[1],"hint":[1],"required":[4],"optional":[516],"validationRules":[16],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"showClearIcon":[4,"show-clear-icon"],"min":[514],"max":[514],"isCompactInputWidth":[32]}]]],["vega-input-passcode",[[1,"vega-input-passcode",{"label":[1],"disabled":[516],"size":[1],"hint":[1],"length":[2],"inputType":[1,"input-type"],"value":[1537],"required":[1540],"optional":[516],"validationRules":[16],"autoValidation":[516,"auto-validation"],"isValid":[1540,"is-valid"],"vegaInputValues":[32]}]]],["vega-input-phone-number",[[1,"vega-input-phone-number",{"label":[1],"size":[1],"required":[1540],"optional":[516],"disabled":[516],"countryCode":[1537,"country-code"],"allowedCountryCodes":[16],"emptyValueEnabled":[4,"empty-value-enabled"],"value":[1537],"validationRules":[16],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"placeholder":[1],"hint":[1],"phoneNumberInputValue":[32]}]]],["vega-input-range",[[1,"vega-input-range",{"label":[1],"value":[1040],"prefixIcon":[513,"prefix-icon"],"showClearIcon":[4,"show-clear-icon"],"min":[514],"max":[514],"required":[1540],"optional":[516],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"validationRules":[16],"size":[1],"placeholder":[16],"disabled":[516],"hint":[1],"stack":[1]}]]],["vega-line-chart",[[1,"vega-line-chart",{"options":[16],"reRender":[64]}]]],["vega-pie-chart",[[1,"vega-pie-chart",{"options":[16],"reRender":[64]}]]],["vega-rich-text-content",[[1,"vega-rich-text-content",{"content":[1040],"extensions":[16],"placeholder":[32],"contentEditable":[32],"extensionStyles":[32],"isInDarkMode":[32],"vegaFocus":[64]}]]],["vega-rich-text-special-characters-panel",[[1,"vega-rich-text-special-characters-panel",{"categories":[16],"activeCategoryKey":[32],"hoveredItem":[32],"focusedCellIndex":[32],"resetPanel":[64]}]]],["vega-section-title",[[1,"vega-section-title",{"titleText":[1,"title"],"description":[1],"icon":[1],"iconAlign":[1,"icon-align"],"iconColor":[1,"icon-color"],"size":[1]}]]],["vega-segment-control",[[1,"vega-segment-control",{"block":[4],"size":[1],"segments":[16],"selected":[1025],"variant":[1],"isOverflowBlockSegments":[32]}]]],["vega-signature-capture",[[1,"vega-signature-capture",{"mode":[1],"label":[1],"required":[516],"optional":[516],"showClearBtn":[4,"show-clear-btn"],"placeholder":[1],"placeholderIcon":[1,"placeholder-icon"],"disabled":[4],"value":[1040],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"validationRules":[16],"height":[8],"currentBreakpoint":[32],"isDrawing":[32],"clear":[64]}]]],["vega-skeleton",[[1,"vega-skeleton",{"type":[513],"width":[8],"height":[8],"animated":[4],"corners":[1]}]]],["vega-slot-container",[[1,"vega-slot-container"]]],["vega-dialog_2",[[1,"vega-dialog",{"dialogTitle":[1,"dialog-title"],"content":[1],"type":[1],"okButton":[16],"handleOk":[16],"cancelButton":[16],"handleCancel":[16],"showCancel":[4,"show-cancel"],"modalProps":[16],"currentBreakpoint":[32]}],[1,"vega-modal",{"backdrop":[1],"size":[8],"height":[8],"open":[1028],"animation":[4],"modalTitle":[1,"modal-title"],"backdropColor":[1,"backdrop-color"],"isVerticallyCenter":[4,"is-vertically-center"],"isVerticallyCentered":[4,"is-vertically-centered"],"showCloseButton":[4,"show-close-button"],"padding":[1],"margin":[1],"contentMaxHeight":[8,"content-max-height"],"handleClose":[16],"currentBreakpoint":[32],"openState":[32],"sectionPaddingState":[32],"modal":[64]},[[10,"click","listenDataTarget"],[0,"click","listenDataDismiss"],[1,"mousedown","listenMouseDown"],[1,"mouseup","listenMouseUp"]]]]],["vega-font",[[1,"vega-font",{"variant":[1],"color":[1],"disableResponsive":[4,"disable-responsive"],"textAlign":[1,"text-align"],"as":[1],"currentBreakpoint":[32]}]]],["vega-form",[[1,"vega-form",{"isValid":[1028,"is-valid"],"isTouched":[1028,"is-touched"],"disableBlurValidation":[1028,"disable-blur-validation"],"useNativeForm":[4,"use-native-form"],"action":[1],"method":[1],"valid":[64],"getValue":[64],"setValue":[64],"reset":[64],"setValidationStates":[64]}]]],["vega-grid",[[1,"vega-grid",{"column":[8],"row":[8],"gap":[1],"justifyItems":[1,"justify-items"]}]]],["vega-input-select",[[1,"vega-input-select",{"label":[1],"labelSuffixButtonConfig":[16],"required":[516],"optional":[516],"selectedLabel":[16],"selectType":[1,"select-type"],"source":[1040],"value":[1537],"isValid":[1540,"is-valid"],"autoValidation":[4,"auto-validation"],"validationRules":[16],"prefixIcon":[1,"prefix-icon"],"disabled":[516],"placeholder":[1],"hint":[1],"vegaDropdownProps":[16],"selectedLabelTooltipProps":[16],"dropdownItemTooltipProps":[16],"size":[1],"sourceLazyLoadCallback":[16],"isDropdownShow":[32],"currentBreakpoint":[32],"isLazyLoading":[32],"selectedItem":[32],"doClose":[64],"doOpen":[64],"doChange":[64]}]]],["vega-pagination-page-selector-mobile",[[1,"vega-pagination-page-selector-mobile",{"type":[1],"pageCount":[2,"page-count"],"current":[1538],"total":[2]}]]],["vega-pagination-page-size-selector-mobile",[[1,"vega-pagination-page-size-selector-mobile",{"type":[1],"pageSize":[1026,"page-size"],"pageSizeSelectorOptions":[1040],"total":[2],"current":[1538],"dropdownProps":[16],"isAllActive":[4,"is-all-active"]}]]],["vega-sidenav_3",[[1,"vega-sidenav",{"source":[16],"footnote":[1],"headerConfig":[16],"openByDefault":[1,"open-by-default"],"openState":[32],"toggle":[64]},[[10,"click","collapseSidenavByBackDropClick"]]],[1,"vega-sidenav-group",{"icon":[1],"label":[1],"openState":[32]}],[1,"vega-sidenav-link",{"icon":[1],"selected":[1540],"url":[1],"showSideBarOnClickLink":[4,"show-side-bar-on-click-link"],"openState":[32]}]]],["vega-button",[[1,"vega-button",{"size":[1],"variant":[1],"icon":[1],"iconAlign":[1,"icon-align"],"label":[1025],"disabled":[4],"danger":[4],"block":[4],"type":[1],"loading":[4],"currentBreakpoint":[32]}]]],["vega-box",[[1,"vega-box",{"padding":[1],"margin":[1],"display":[1],"border":[1],"borderStyle":[1,"border-style"],"shadow":[1],"borderColor":[1,"border-color"],"backgroundColor":[1,"background-color"],"width":[8],"height":[8],"minHeight":[8,"min-height"],"maxHeight":[8,"max-height"],"responsiveClass":[1,"responsive-class"],"corners":[1],"flexBasis":[1,"flex-basis"],"flexGrow":[8,"flex-grow"],"flexShrink":[8,"flex-shrink"],"order":[8],"flex":[8],"alignSelf":[1,"align-self"],"justifySelf":[1,"justify-self"],"gridColumn":[8,"grid-column"],"gridRow":[8,"grid-row"],"gridArea":[8,"grid-area"],"currentBreakpoint":[32]}]]],["vega-tooltip_2",[[1,"vega-tooltip-content-box",{"text":[1]}],[1,"vega-tooltip",{"size":[8],"minWidth":[8,"min-width"],"maxWidth":[8,"max-width"],"trigger":[1],"content":[1],"text":[1],"placement":[1],"alignment":[1],"positionRelativeTo":[1,"position-relative-to"],"disableInteractive":[4,"disable-interactive"],"isTooltipShow":[32]}]]],["vega-icon",[[1,"vega-icon",{"icon":[513],"size":[1],"color":[1]}]]],["vega-button-circle",[[1,"vega-button-circle",{"size":[1],"variant":[1],"icon":[513],"label":[513],"disabled":[4],"danger":[4],"type":[1],"iconColor":[1,"icon-color"],"showTooltip":[4,"show-tooltip"],"tooltip":[16]}]]],["vega-input",[[1,"vega-input",{"label":[513],"labelSuffixButtonProps":[16],"labelSuffixButtonConfig":[16],"value":[1537],"valueUpdateTrigger":[1,"value-update-trigger"],"type":[513],"name":[1],"autocomplete":[1],"inputmode":[1],"enterkeyhint":[1],"readOnly":[4,"read-only"],"prefixIcon":[513,"prefix-icon"],"email":[516],"required":[1540],"optional":[516],"min":[514],"max":[514],"minLength":[514,"min-length"],"maxLength":[514,"max-length"],"showClearIcon":[4,"show-clear-icon"],"isValid":[1540,"is-valid"],"autoValidation":[516,"auto-validation"],"validationRules":[16],"size":[1],"placeholder":[1],"disabled":[516],"hint":[1],"maskConfig":[16],"disableCopyPaste":[4,"disable-copy-paste"],"suggestionsDropdownSource":[16],"prefixText":[32],"suffixText":[32],"isCompactInputWidth":[32],"isPasswordDisplay":[32],"suggestionsDropdownConfig":[32],"doFocus":[64],"doBlur":[64],"showSuggestionsDropdown":[64],"hideSuggestionsDropdown":[64]}]]],["vega-field-label",[[1,"vega-field-label",{"suffixButtonProps":[16],"suffixButtonConfig":[16],"label":[1025],"isFieldRequired":[4,"is-field-required"],"disabled":[4],"optional":[4]}]]],["vega-text",[[1,"vega-text",{"overflow":[1],"text":[1],"tooltip":[16]}]]],["vega-flex",[[1,"vega-flex",{"gap":[1],"margin":[1],"breakpoint":[1],"direction":[1],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"],"flexWrap":[1,"flex-wrap"],"flex":[8],"flexBasis":[1,"flex-basis"],"flexGrow":[8,"flex-grow"],"flexShrink":[8,"flex-shrink"],"useNativeFlex":[4,"use-native-flex"],"currentBreakpoint":[32]}]]]]'),e)));(function(){if(typeof window<"u"&&window.Reflect!==void 0&&window.customElements!==void 0){var r=HTMLElement;window.HTMLElement=function(){return Reflect.construct(r,[],this.constructor)},HTMLElement.prototype=r.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,r)}})();const $y="vega-sandbox-theme";function Vy(){try{const r=localStorage.getItem($y);return r==="light"||r==="dark"?r:null}catch{return null}}function lL(){return typeof window>"u"||!window.matchMedia||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function cL(){return Vy()??lL()}let uo=cL();const Nf=new Set;function zy(){for(const r of Nf)r()}function kg(r){if(typeof document>"u")return;const e=document.documentElement;e.classList.toggle("dark",r==="dark"),e.setAttribute("data-theme",r)}kg(uo);let Mo=null;function dL(){if(Mo==null||Mo(),Mo=null,typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{Vy()===null&&(uo=r.matches?"dark":"light",kg(uo),zy())};r.addEventListener("change",e),Mo=()=>r.removeEventListener("change",e)}dL();function uL(){return uo}function hL(r){try{localStorage.setItem($y,r)}catch{}uo=r,kg(r),zy()}function Uy(){hL(uo==="dark"?"light":"dark")}function fL(r){return Nf.add(r),()=>{Nf.delete(r)}}function ou(){return j.useSyncExternalStore(fL,uL)}const pL="_container_1n6ep_1",gL="_header_1n6ep_11",mL="_newFileBtn_1n6ep_24",vL="_tree_1n6ep_39",_L="_fileRow_1n6ep_46",yL="_dirRow_1n6ep_47",bL="_selected_1n6ep_66",wL="_icon_1n6ep_81",SL="_dirIcon_1n6ep_82",CL="_arrow_1n6ep_87",EL="_name_1n6ep_94",xL="_contextMenu_1n6ep_101",TL="_contextItem_1n6ep_113",kL="_contextItemDisabled_1n6ep_134",LL="_contextItemDanger_1n6ep_143",AL="_contextDivider_1n6ep_151",RL="_headerMenu_1n6ep_159",OL="_renameInput_1n6ep_173",DL="_focused_1n6ep_189",NL="_treeDragging_1n6ep_196",IL="_treeDraggingDisabled_1n6ep_218",Ce={container:pL,header:gL,newFileBtn:mL,tree:vL,fileRow:_L,dirRow:yL,selected:bL,icon:wL,dirIcon:SL,arrow:CL,name:EL,contextMenu:xL,contextItem:TL,contextItemDisabled:kL,contextItemDanger:LL,contextDivider:AL,headerMenu:RL,renameInput:OL,focused:DL,treeDragging:NL,treeDraggingDisabled:IL},Wy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3edefault_file%3c/title%3e%3cpath%20d='M20.414,2H5V30H27V8.586ZM7,28V4H19v6h6V28Z'%20style='fill:%23c5c5c5'/%3e%3c/svg%3e",BL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3edefault_folder%3c/title%3e%3cpath%20d='M27.5,5.5H18.2L16.1,9.7H4.4V26.5H29.6V5.5Zm0,4.2H19.3l1.1-2.1h7.1Z'%20style='fill:%23c09553'/%3e%3c/svg%3e",th="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_js%3c/title%3e%3cpath%20d='M18.774,19.7a3.727,3.727,0,0,0,3.376,2.078c1.418,0,2.324-.709,2.324-1.688,0-1.173-.931-1.589-2.491-2.272l-.856-.367c-2.469-1.052-4.11-2.37-4.11-5.156,0-2.567,1.956-4.52,5.012-4.52A5.058,5.058,0,0,1,26.9,10.52l-2.665,1.711a2.327,2.327,0,0,0-2.2-1.467,1.489,1.489,0,0,0-1.638,1.467c0,1.027.636,1.442,2.1,2.078l.856.366c2.908,1.247,4.549,2.518,4.549,5.376,0,3.081-2.42,4.769-5.671,4.769a6.575,6.575,0,0,1-6.236-3.5ZM6.686,20c.538.954,1.027,1.76,2.2,1.76,1.124,0,1.834-.44,1.834-2.15V7.975h3.422V19.658c0,3.543-2.078,5.156-5.11,5.156A5.312,5.312,0,0,1,3.9,21.688Z'%20style='fill:%23f5de19'/%3e%3c/svg%3e",rh="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_typescript%3c/title%3e%3cpath%20d='M23.827,8.243A4.424,4.424,0,0,1,26.05,9.524a5.853,5.853,0,0,1,.852,1.143c.011.045-1.534,1.083-2.471,1.662-.034.023-.169-.124-.322-.35a2.014,2.014,0,0,0-1.67-1c-1.077-.074-1.771.49-1.766,1.433a1.3,1.3,0,0,0,.153.666c.237.49.677.784,2.059,1.383,2.544,1.095,3.636,1.817,4.31,2.843a5.158,5.158,0,0,1,.416,4.333,4.764,4.764,0,0,1-3.932,2.815,10.9,10.9,0,0,1-2.708-.028,6.531,6.531,0,0,1-3.616-1.884,6.278,6.278,0,0,1-.926-1.371,2.655,2.655,0,0,1,.327-.208c.158-.09.756-.434,1.32-.761L19.1,19.6l.214.312a4.771,4.771,0,0,0,1.35,1.292,3.3,3.3,0,0,0,3.458-.175,1.545,1.545,0,0,0,.2-1.974c-.276-.395-.84-.727-2.443-1.422a8.8,8.8,0,0,1-3.349-2.055,4.687,4.687,0,0,1-.976-1.777,7.116,7.116,0,0,1-.062-2.268,4.332,4.332,0,0,1,3.644-3.374A9,9,0,0,1,23.827,8.243ZM15.484,9.726l.011,1.454h-4.63V24.328H7.6V11.183H2.97V9.755A13.986,13.986,0,0,1,3.01,8.289c.017-.023,2.832-.034,6.245-.028l6.211.017Z'%20style='fill:%23007acc'/%3e%3c/svg%3e",ML="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_reactjs%3c/title%3e%3ccircle%20cx='16'%20cy='15.974'%20r='2.5'%20style='fill:%2300d8ff'/%3e%3cpath%20d='M16,21.706a28.385,28.385,0,0,1-8.88-1.2,11.3,11.3,0,0,1-3.657-1.958A3.543,3.543,0,0,1,2,15.974c0-1.653,1.816-3.273,4.858-4.333A28.755,28.755,0,0,1,16,10.293a28.674,28.674,0,0,1,9.022,1.324,11.376,11.376,0,0,1,3.538,1.866A3.391,3.391,0,0,1,30,15.974c0,1.718-2.03,3.459-5.3,4.541A28.8,28.8,0,0,1,16,21.706Zm0-10.217a27.948,27.948,0,0,0-8.749,1.282c-2.8.977-4.055,2.313-4.055,3.2,0,.928,1.349,2.387,4.311,3.4A27.21,27.21,0,0,0,16,20.51a27.6,27.6,0,0,0,8.325-1.13C27.4,18.361,28.8,16.9,28.8,15.974a2.327,2.327,0,0,0-1.01-1.573,10.194,10.194,0,0,0-3.161-1.654A27.462,27.462,0,0,0,16,11.489Z'%20style='fill:%2300d8ff'/%3e%3cpath%20d='M10.32,28.443a2.639,2.639,0,0,1-1.336-.328c-1.432-.826-1.928-3.208-1.327-6.373a28.755,28.755,0,0,1,3.4-8.593h0A28.676,28.676,0,0,1,16.71,5.995a11.376,11.376,0,0,1,3.384-2.133,3.391,3.391,0,0,1,2.878,0c1.489.858,1.982,3.486,1.287,6.859a28.806,28.806,0,0,1-3.316,8.133,28.385,28.385,0,0,1-5.476,7.093,11.3,11.3,0,0,1-3.523,2.189A4.926,4.926,0,0,1,10.32,28.443Zm1.773-14.7a27.948,27.948,0,0,0-3.26,8.219c-.553,2.915-.022,4.668.75,5.114.8.463,2.742.024,5.1-2.036a27.209,27.209,0,0,0,5.227-6.79,27.6,27.6,0,0,0,3.181-7.776c.654-3.175.089-5.119-.713-5.581a2.327,2.327,0,0,0-1.868.089A10.194,10.194,0,0,0,17.5,6.9a27.464,27.464,0,0,0-5.4,6.849Z'%20style='fill:%2300d8ff'/%3e%3cpath%20d='M21.677,28.456c-1.355,0-3.076-.82-4.868-2.361a28.756,28.756,0,0,1-5.747-7.237h0a28.676,28.676,0,0,1-3.374-8.471,11.376,11.376,0,0,1-.158-4A3.391,3.391,0,0,1,8.964,3.9c1.487-.861,4.01.024,6.585,2.31a28.8,28.8,0,0,1,5.39,6.934,28.384,28.384,0,0,1,3.41,8.287,11.3,11.3,0,0,1,.137,4.146,3.543,3.543,0,0,1-1.494,2.555A2.59,2.59,0,0,1,21.677,28.456Zm-9.58-10.2a27.949,27.949,0,0,0,5.492,6.929c2.249,1.935,4.033,2.351,4.8,1.9.8-.465,1.39-2.363.782-5.434A27.212,27.212,0,0,0,19.9,13.74,27.6,27.6,0,0,0,14.755,7.1c-2.424-2.152-4.39-2.633-5.191-2.169a2.327,2.327,0,0,0-.855,1.662,10.194,10.194,0,0,0,.153,3.565,27.465,27.465,0,0,0,3.236,8.1Z'%20style='fill:%2300d8ff'/%3e%3c/svg%3e",PL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_reactts%3c/title%3e%3ccircle%20cx='16'%20cy='15.974'%20r='2.5'%20style='fill:%23007acc'/%3e%3cpath%20d='M16,21.706a28.385,28.385,0,0,1-8.88-1.2,11.3,11.3,0,0,1-3.657-1.958A3.543,3.543,0,0,1,2,15.974c0-1.653,1.816-3.273,4.858-4.333A28.755,28.755,0,0,1,16,10.293a28.674,28.674,0,0,1,9.022,1.324,11.376,11.376,0,0,1,3.538,1.866A3.391,3.391,0,0,1,30,15.974c0,1.718-2.03,3.459-5.3,4.541A28.8,28.8,0,0,1,16,21.706Zm0-10.217a27.948,27.948,0,0,0-8.749,1.282c-2.8.977-4.055,2.313-4.055,3.2,0,.928,1.349,2.387,4.311,3.4A27.21,27.21,0,0,0,16,20.51a27.6,27.6,0,0,0,8.325-1.13C27.4,18.361,28.8,16.9,28.8,15.974a2.327,2.327,0,0,0-1.01-1.573,10.194,10.194,0,0,0-3.161-1.654A27.462,27.462,0,0,0,16,11.489Z'%20style='fill:%23007acc'/%3e%3cpath%20d='M10.32,28.443a2.639,2.639,0,0,1-1.336-.328c-1.432-.826-1.928-3.208-1.327-6.373a28.755,28.755,0,0,1,3.4-8.593h0A28.676,28.676,0,0,1,16.71,5.995a11.376,11.376,0,0,1,3.384-2.133,3.391,3.391,0,0,1,2.878,0c1.489.858,1.982,3.486,1.287,6.859a28.806,28.806,0,0,1-3.316,8.133,28.385,28.385,0,0,1-5.476,7.093,11.3,11.3,0,0,1-3.523,2.189A4.926,4.926,0,0,1,10.32,28.443Zm1.773-14.7a27.948,27.948,0,0,0-3.26,8.219c-.553,2.915-.022,4.668.75,5.114.8.463,2.742.024,5.1-2.036a27.209,27.209,0,0,0,5.227-6.79,27.6,27.6,0,0,0,3.181-7.776c.654-3.175.089-5.119-.713-5.581a2.327,2.327,0,0,0-1.868.089A10.194,10.194,0,0,0,17.5,6.9a27.464,27.464,0,0,0-5.4,6.849Z'%20style='fill:%23007acc'/%3e%3cpath%20d='M21.677,28.456c-1.355,0-3.076-.82-4.868-2.361a28.756,28.756,0,0,1-5.747-7.237h0a28.676,28.676,0,0,1-3.374-8.471,11.376,11.376,0,0,1-.158-4A3.391,3.391,0,0,1,8.964,3.9c1.487-.861,4.01.024,6.585,2.31a28.8,28.8,0,0,1,5.39,6.934,28.384,28.384,0,0,1,3.41,8.287,11.3,11.3,0,0,1,.137,4.146,3.543,3.543,0,0,1-1.494,2.555A2.59,2.59,0,0,1,21.677,28.456Zm-9.58-10.2a27.949,27.949,0,0,0,5.492,6.929c2.249,1.935,4.033,2.351,4.8,1.9.8-.465,1.39-2.363.782-5.434A27.212,27.212,0,0,0,19.9,13.74,27.6,27.6,0,0,0,14.755,7.1c-2.424-2.152-4.39-2.633-5.191-2.169a2.327,2.327,0,0,0-.855,1.662,10.194,10.194,0,0,0,.153,3.565,27.465,27.465,0,0,0,3.236,8.1Z'%20style='fill:%23007acc'/%3e%3c/svg%3e",FL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_vue%3c/title%3e%3cpath%20d='M24.4,3.925H30L16,28.075,2,3.925H12.71L16,9.525l3.22-5.6Z'%20style='fill:%2341b883'/%3e%3cpath%20d='M2,3.925l14,24.15L30,3.925H24.4L16,18.415,7.53,3.925Z'%20style='fill:%2341b883'/%3e%3cpath%20d='M7.53,3.925,16,18.485l8.4-14.56H19.22L16,9.525l-3.29-5.6Z'%20style='fill:%2335495e'/%3e%3c/svg%3e",K0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_html%3c/title%3e%3cpolygon%20points='5.902%2027.201%203.655%202%2028.345%202%2026.095%2027.197%2015.985%2030%205.902%2027.201'%20style='fill:%23e44f26'/%3e%3cpolygon%20points='16%2027.858%2024.17%2025.593%2026.092%204.061%2016%204.061%2016%2027.858'%20style='fill:%23f1662a'/%3e%3cpolygon%20points='16%2013.407%2011.91%2013.407%2011.628%2010.242%2016%2010.242%2016%207.151%2015.989%207.151%208.25%207.151%208.324%207.981%209.083%2016.498%2016%2016.498%2016%2013.407'%20style='fill:%23ebebeb'/%3e%3cpolygon%20points='16%2021.434%2015.986%2021.438%2012.544%2020.509%2012.324%2018.044%2010.651%2018.044%209.221%2018.044%209.654%2022.896%2015.986%2024.654%2016%2024.65%2016%2021.434'%20style='fill:%23ebebeb'/%3e%3cpolygon%20points='15.989%2013.407%2015.989%2016.498%2019.795%2016.498%2019.437%2020.507%2015.989%2021.437%2015.989%2024.653%2022.326%2022.896%2022.372%2022.374%2023.098%2014.237%2023.174%2013.407%2022.341%2013.407%2015.989%2013.407'%20style='fill:%23fff'/%3e%3cpolygon%20points='15.989%207.151%2015.989%209.071%2015.989%2010.235%2015.989%2010.242%2023.445%2010.242%2023.445%2010.242%2023.455%2010.242%2023.517%209.548%2023.658%207.981%2023.732%207.151%2015.989%207.151'%20style='fill:%23fff'/%3e%3c/svg%3e",HL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%20aria-labelledby='css-logo-title%20css-logo-description'%3e%3ctitle%3eCSS%20Logo%3c/title%3e%3cg%20style='display:inline'%3e%3cpath%20fill='%23639'%20d='M1.995%201.994h23.52a4.48%204.48%200%200%201%204.48%204.48v19.04a4.48%204.48%200%200%201-4.48%204.48H6.475a4.48%204.48%200%200%201-4.48-4.48Z'/%3e%3cpath%20fill='%23fff'%20d='M9.079%2024.87v-4.704c0-1.876%201.204-2.884%203.024-2.884%201.792-.028%202.912%201.148%202.856%203.136h-2.072c.056-.756-.28-1.316-.84-1.288-.7%200-.896.476-.896%201.372v4.088c0%20.868.28%201.288.896%201.316.644%200%20.896-.644.84-1.372h2.072c.112%202.044-1.176%203.248-2.996%203.22-1.764%200-2.884-.98-2.884-2.884zm6.636-.336h1.932c.028.896.308%201.456.924%201.456.616%200%20.84-.364.84-1.204%200-.7-.308-1.092-1.064-1.456l-.728-.336c-1.288-.616-1.82-1.372-1.82-2.884%200-1.68%201.064-2.856%202.8-2.856%201.736%200%202.66%201.204%202.688%203.164h-1.876c0-.812-.168-1.372-.784-1.372-.56%200-.84.28-.84.98s.252.98.924%201.26l.672.308c1.428.672%202.044%201.54%202.044%203.164%200%201.932-1.092%202.996-2.884%202.996-1.792%200-2.8-1.232-2.828-3.22zm6.328%200h1.96c0%20.896.308%201.456.896%201.456.588%200%20.84-.364.84-1.204%200-.7-.28-1.092-1.064-1.456l-.728-.336c-1.288-.616-1.792-1.372-1.792-2.884%200-1.68%201.036-2.856%202.8-2.856%201.764%200%202.632%201.204%202.688%203.164h-1.876c-.028-.812-.196-1.372-.812-1.372-.56%200-.812.28-.812.98s.224.98.896%201.26l.7.308c1.4.672%202.016%201.54%202.016%203.164%200%201.932-1.092%202.996-2.884%202.996-1.792%200-2.8-1.232-2.828-3.22z'/%3e%3c/g%3e%3c/svg%3e",jL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_scss%3c/title%3e%3cpath%20d='M16.171,18.7c-.481.221-1.008.509-2.063,1.088-.4.225-.818.45-1.207.662-.027-.027-.055-.061-.082-.089-2.087-2.23-5.947-3.805-5.783-6.8.061-1.091.436-3.955,7.413-7.433,5.742-2.83,10.311-2.046,11.1-.307C26.683,8.3,23.1,12.913,17.17,13.582a4.469,4.469,0,0,1-3.751-.948c-.314-.341-.361-.361-.477-.293-.191.1-.068.409,0,.586a3.5,3.5,0,0,0,2.141,1.684,11.4,11.4,0,0,0,6.956-.689c3.594-1.391,6.4-5.258,5.578-8.5-.825-3.287-6.281-4.371-11.443-2.537a26,26,0,0,0-8.79,5.047c-2.844,2.66-3.294,4.972-3.11,5.94.662,3.437,5.4,5.674,7.3,7.331-.1.055-.184.1-.259.143-.948.471-4.562,2.36-5.463,4.358-1.023,2.264.164,3.887.948,4.105a5.832,5.832,0,0,0,6.281-2.544,6.3,6.3,0,0,0,.559-5.8,5.03,5.03,0,0,1,.716-.477c.484-.286.945-.568,1.354-.786l0,0a10.475,10.475,0,0,1,4.475-.989c3.246.382,3.887,2.407,3.764,3.26a2.157,2.157,0,0,1-1.03,1.459c-.225.143-.3.191-.28.293.027.15.136.143.327.116a2.535,2.535,0,0,0,1.766-2.257c.1-2-1.807-4.194-5.183-4.174a7.753,7.753,0,0,0-2.946.587q-.225.093-.437.2Zm-4.825,7.839c-1.078,1.173-2.578,1.616-3.226,1.241-.7-.4-.423-2.135.9-3.376a17.18,17.18,0,0,1,2.53-1.889c.157-.1.389-.232.668-.4.048-.027.075-.041.075-.041l.164-.1A4.658,4.658,0,0,1,11.346,26.539Z'%20style='fill:%23cd6799'/%3e%3c/svg%3e",$L="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_sass%3c/title%3e%3cpath%20d='M26.11,17.572a5.8,5.8,0,0,0-2.537.588,5.345,5.345,0,0,1-.568-1.314,3.53,3.53,0,0,1-.051-1.1,9.811,9.811,0,0,1,.332-1.192c-.005-.051-.061-.292-.624-.3s-1.048.107-1.1.256a6.171,6.171,0,0,0-.235.834,19.686,19.686,0,0,1-1.713,3.294,3.186,3.186,0,0,1-.44-2.066,9.811,9.811,0,0,1,.332-1.192c-.005-.051-.061-.292-.624-.3s-1.048.107-1.1.256-.118.5-.235.834-1.483,3.386-1.841,4.173c-.184.4-.343.726-.455.946h0a.233.233,0,0,1-.02.041c-.1.189-.153.292-.153.292v.005c-.077.138-.159.266-.2.266a1.711,1.711,0,0,1,.01-.869c.2-1.059.69-2.705.685-2.762,0-.031.092-.317-.317-.465a.508.508,0,0,0-.578.1c-.036,0-.061.087-.061.087s.445-1.851-.849-1.851a3.855,3.855,0,0,0-2.475,1.683c-.348.189-1.089.593-1.882,1.028-.3.169-.614.338-.905.5-.02-.02-.041-.046-.061-.066C6.87,17.6,3.975,16.416,4.1,14.171c.046-.818.327-2.966,5.559-5.575,4.306-2.122,7.733-1.534,8.326-.23.849,1.862-1.836,5.319-6.285,5.82a3.351,3.351,0,0,1-2.813-.711c-.235-.256-.271-.271-.358-.22-.143.077-.051.307,0,.44a2.626,2.626,0,0,0,1.606,1.263,8.55,8.55,0,0,0,5.217-.517c2.7-1.043,4.8-3.943,4.184-6.372-.619-2.465-4.71-3.278-8.582-1.9A19.5,19.5,0,0,0,4.359,9.952c-2.133,1.995-2.47,3.728-2.332,4.455.5,2.578,4.051,4.255,5.472,5.5-.072.041-.138.077-.194.107-.711.353-3.421,1.77-4.1,3.268-.767,1.7.123,2.915.711,3.079a4.374,4.374,0,0,0,4.71-1.908A4.725,4.725,0,0,0,9.049,20.1a.107.107,0,0,0-.02-.031l.557-.327c.363-.215.721-.414,1.028-.578a6.74,6.74,0,0,0-.363,1.862,3.886,3.886,0,0,0,.834,2.7.921.921,0,0,0,.675.22c.6,0,.875-.5,1.176-1.094.368-.726.7-1.57.7-1.57s-.414,2.281.711,2.281c.409,0,.823-.532,1.008-.8v.005s.01-.015.031-.051l.066-.107v-.01c.164-.286.532-.936,1.079-2.015.706-1.391,1.386-3.13,1.386-3.13a8.888,8.888,0,0,0,.271,1.13,10.643,10.643,0,0,0,.583,1.309c-.164.23-.266.358-.266.358l.005.005c-.133.174-.276.363-.435.547a16.3,16.3,0,0,0-1.314,1.647.447.447,0,0,0,.123.6,1.116,1.116,0,0,0,.685.113,3.147,3.147,0,0,0,1.028-.235,3.45,3.45,0,0,0,.885-.465,1.98,1.98,0,0,0,.849-1.744,3.521,3.521,0,0,0-.322-1.233c.051-.072.1-.143.148-.215a23.428,23.428,0,0,0,1.534-2.649,8.888,8.888,0,0,0,.271,1.13,7.57,7.57,0,0,0,.5,1.125A4.861,4.861,0,0,0,20.965,20.8c-.322.931-.072,1.35.4,1.447a1.425,1.425,0,0,0,.747-.153,3.4,3.4,0,0,0,.946-.486,2.126,2.126,0,0,0,1.043-1.729,3.268,3.268,0,0,0-.235-1.023,5.356,5.356,0,0,1,2.716-.312c2.434.286,2.915,1.805,2.823,2.445a1.618,1.618,0,0,1-.772,1.094c-.169.107-.225.143-.21.22.02.113.1.107.245.087A1.9,1.9,0,0,0,30,20.7c.077-1.5-1.355-3.145-3.887-3.13ZM7.33,23.9c-.808.88-1.933,1.212-2.419.931-.522-.3-.317-1.6.675-2.532a12.884,12.884,0,0,1,1.9-1.417c.118-.072.292-.174.5-.3l.056-.031h0l.123-.077A3.493,3.493,0,0,1,7.33,23.9Zm5.881-4c-.281.685-.869,2.44-1.227,2.342-.307-.082-.5-1.412-.061-2.726a6.193,6.193,0,0,1,.956-1.754c.44-.491.926-.655,1.043-.455a9.062,9.062,0,0,1-.711,2.593Zm4.853,2.322c-.118.061-.23.1-.281.072-.036-.02.051-.1.051-.1s.609-.655.849-.951c.138-.174.3-.378.476-.609V20.7c0,.782-.757,1.309-1.094,1.524Zm3.744-.854c-.087-.061-.072-.266.22-.905a3.408,3.408,0,0,1,.834-1.074,1.448,1.448,0,0,1,.082.471,1.547,1.547,0,0,1-1.135,1.509Z'%20style='fill:%23cd6799'/%3e%3c/svg%3e",VL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%3e%3cdefs%3e%3clinearGradient%20id='a'%20x1='-3.609'%20y1='-492.685'%20x2='-3.609'%20y2='-480.271'%20gradientTransform='translate(19.712%20502.891)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.15'%20stop-color='%232a4f84'/%3e%3cstop%20offset='0.388'%20stop-color='%23294e82'/%3e%3cstop%20offset='1'%20stop-color='%23172e4e'/%3e%3c/linearGradient%3e%3c/defs%3e%3ctitle%3efile_type_less%3c/title%3e%3cpath%20d='M28.559,20.226a2.4,2.4,0,0,1-2.394,2.394H6.04a2.4,2.4,0,0,1-2.394-2.394V12.6A2.4,2.4,0,0,1,6.04,10.206H26.165A2.4,2.4,0,0,1,28.559,12.6Z'%20style='fill:url(%23a)'/%3e%3cpath%20d='M24.349,16.25a1.972,1.972,0,0,1,1.578,1.891,1.69,1.69,0,0,1-.653,1.4,2.934,2.934,0,0,1-1.862.559,4.558,4.558,0,0,1-2.241-.618,1.986,1.986,0,0,1,.16-.669,1.83,1.83,0,0,1,.35-.576,3.7,3.7,0,0,0,1.649.493.965.965,0,0,0,.51-.112.339.339,0,0,0,.178-.3q0-.353-.546-.529l-.653-.247q-1.482-.54-1.482-1.762a1.753,1.753,0,0,1,.623-1.416,2.587,2.587,0,0,1,1.678-.648,5.094,5.094,0,0,1,1.15.147,4.555,4.555,0,0,1,1.032.472,1.668,1.668,0,0,1-.13.722,1.22,1.22,0,0,1-.38.558,4.261,4.261,0,0,0-1.66-.446.544.544,0,0,0-.362.106.338.338,0,0,0-.124.27q0,.282.451.446l.736.259Z'%20style='fill:%23f6f6f6'/%3e%3cpath%20d='M19.1,16.25a1.972,1.972,0,0,1,1.577,1.891,1.691,1.691,0,0,1-.652,1.4,2.937,2.937,0,0,1-1.862.559,4.56,4.56,0,0,1-2.241-.618,1.981,1.981,0,0,1,.16-.669,1.821,1.821,0,0,1,.35-.576,3.7,3.7,0,0,0,1.649.493.963.963,0,0,0,.51-.112.34.34,0,0,0,.178-.3q0-.353-.546-.529l-.653-.247q-1.482-.54-1.482-1.762a1.752,1.752,0,0,1,.623-1.416,2.585,2.585,0,0,1,1.677-.648,5.088,5.088,0,0,1,1.15.147,4.552,4.552,0,0,1,1.032.472,1.668,1.668,0,0,1-.13.722,1.22,1.22,0,0,1-.38.558,4.263,4.263,0,0,0-1.661-.446.543.543,0,0,0-.362.106.339.339,0,0,0-.124.27q0,.282.451.446l.736.259Z'%20style='fill:%23f6f6f6'/%3e%3cpath%20d='M15.264,16.333a2.822,2.822,0,0,0-.172-1,2.239,2.239,0,0,0-.492-.787,2.28,2.28,0,0,0-.777-.517,2.737,2.737,0,0,0-1.026-.314,2.8,2.8,0,0,0-1.18.361,2.256,2.256,0,0,0-.83.646,2.765,2.765,0,0,0-.487.969,4.4,4.4,0,0,0-.16,1.216,5.681,5.681,0,0,0,.13,1.257,2.628,2.628,0,0,0,.445,1,2.107,2.107,0,0,0,.818.657,2.935,2.935,0,0,0,1.251.277,3.952,3.952,0,0,0,2.324-.712,1.865,1.865,0,0,0-.484-1.081,6.188,6.188,0,0,1-.857.262,3.208,3.208,0,0,1-.656.079,1.017,1.017,0,0,1-.815-.29,1.187,1.187,0,0,1-.271-.77h3.083A4.447,4.447,0,0,0,15.264,16.333Zm-3.248.081a2.433,2.433,0,0,1,.218-1,.632.632,0,0,1,.559-.264.66.66,0,0,1,.582.282,1.749,1.749,0,0,1,.194.856v.13H12.016Z'%20style='fill:%23f6f6f6'/%3e%3cpath%20d='M29.18,17.2a1.605,1.605,0,0,0-.53,1.265v2.051a1.81,1.81,0,0,1-.683,1.557,2.8,2.8,0,0,1-1.654.549l-.373,0V21.594a1.241,1.241,0,0,0,.595-.334,1.369,1.369,0,0,0,.419-1.047V18.556a2.545,2.545,0,0,1,.257-1.323,2.5,2.5,0,0,1,1.2-.838,2.528,2.528,0,0,1-1.324-1.179,2.956,2.956,0,0,1-.135-1.165V12.533a1.458,1.458,0,0,0-.366-1.054,1.152,1.152,0,0,0-.648-.314v-.96c.445,0,.669,0,.928,0a1.676,1.676,0,0,1,1.023.442,2,2,0,0,1,.673,1.009,2.33,2.33,0,0,1,.086.7v1.757a1.846,1.846,0,0,0,.5,1.383,2.113,2.113,0,0,0,.854.479v.794a1.943,1.943,0,0,0-.82.426Z'%20style='fill:%23f6f6f6;stroke:%23404040;stroke-miterlimit:10;stroke-width:0.25px'/%3e%3cpath%20d='M5.594,10.206H5.26a1.673,1.673,0,0,0-1.023.442,1.71,1.71,0,0,0-.673,1.009,3.531,3.531,0,0,0-.038.7v1.757A1.867,1.867,0,0,1,2.981,15.5,2.847,2.847,0,0,1,2,15.977v.793a2.552,2.552,0,0,1,.947.426,1.638,1.638,0,0,1,.577,1.265v2.051A1.781,1.781,0,0,0,4.16,22.07a2.8,2.8,0,0,0,1.654.55l.421,0V21.594a1.47,1.47,0,0,1-.643-.334,1.355,1.355,0,0,1-.371-1.047V18.557a2.516,2.516,0,0,0-.305-1.323,2.5,2.5,0,0,0-1.2-.838,2.529,2.529,0,0,0,1.324-1.178,2.857,2.857,0,0,0,.183-1.165V12.534A1.462,1.462,0,0,1,5.54,11.48a1.313,1.313,0,0,1,.575-.271l.428,0V10.206H5.594Z'%20style='fill:%23f6f6f6;stroke:%23404040;stroke-miterlimit:10;stroke-width:0.25px'/%3e%3cpath%20d='M9.537,18.529h-.32c-.348,0-.479-.183-.479-.551V11.219a1.256,1.256,0,0,0-.268-.856c-.15-.164-.411-.162-.783-.162H6.964l-.085,0v8.106a1.875,1.875,0,0,0,.352,1.24,1.441,1.441,0,0,0,1.145.393,7.859,7.859,0,0,0,1.269-.118,2.23,2.23,0,0,0,.036-.509,2.278,2.278,0,0,0-.142-.782Z'%20style='fill:%23f6f6f6'/%3e%3c/svg%3e",nh="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_json%3c/title%3e%3cpath%20d='M4.014,14.976a2.51,2.51,0,0,0,1.567-.518A2.377,2.377,0,0,0,6.386,13.1,15.261,15.261,0,0,0,6.6,10.156q.012-2.085.075-2.747a5.236,5.236,0,0,1,.418-1.686,3.025,3.025,0,0,1,.755-1.018A3.046,3.046,0,0,1,9,4.125,6.762,6.762,0,0,1,10.544,4h.7V5.96h-.387a2.338,2.338,0,0,0-1.723.468A3.4,3.4,0,0,0,8.709,8.52a36.054,36.054,0,0,1-.137,4.133,4.734,4.734,0,0,1-.768,2.06A4.567,4.567,0,0,1,6.1,16a3.809,3.809,0,0,1,1.992,1.754,8.861,8.861,0,0,1,.618,3.865q0,2.435.05,2.9A1.755,1.755,0,0,0,9.264,25.7a2.639,2.639,0,0,0,1.592.337h.387V28h-.7a5.655,5.655,0,0,1-1.773-.2,2.97,2.97,0,0,1-1.324-.93,3.353,3.353,0,0,1-.681-1.63A24.175,24.175,0,0,1,6.6,22.006,16.469,16.469,0,0,0,6.386,18.9a2.408,2.408,0,0,0-.805-1.361,2.489,2.489,0,0,0-1.567-.524Z'%20style='fill:%23f5de19'/%3e%3cpath%20d='M27.986,17.011a2.489,2.489,0,0,0-1.567.524,2.408,2.408,0,0,0-.805,1.361,16.469,16.469,0,0,0-.212,3.109,24.175,24.175,0,0,1-.169,3.234,3.353,3.353,0,0,1-.681,1.63,2.97,2.97,0,0,1-1.324.93,5.655,5.655,0,0,1-1.773.2h-.7V26.04h.387a2.639,2.639,0,0,0,1.592-.337,1.755,1.755,0,0,0,.506-1.186q.05-.462.05-2.9a8.861,8.861,0,0,1,.618-3.865A3.809,3.809,0,0,1,25.9,16a4.567,4.567,0,0,1-1.7-1.286,4.734,4.734,0,0,1-.768-2.06,36.054,36.054,0,0,1-.137-4.133,3.4,3.4,0,0,0-.425-2.092,2.338,2.338,0,0,0-1.723-.468h-.387V4h.7A6.762,6.762,0,0,1,23,4.125a3.046,3.046,0,0,1,1.149.581,3.025,3.025,0,0,1,.755,1.018,5.236,5.236,0,0,1,.418,1.686q.062.662.075,2.747a15.261,15.261,0,0,0,.212,2.947,2.377,2.377,0,0,0,.805,1.355,2.51,2.51,0,0,0,1.567.518Z'%20style='fill:%23f5de19'/%3e%3c/svg%3e",q0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_yaml%3c/title%3e%3cpath%20d='M2,12.218c.755,0,1.51-.008,2.264,0l.053.038Q5.7,13.638,7.078,15.014c.891-.906,1.8-1.794,2.7-2.7.053-.052.11-.113.192-.1.608,0,1.215,0,1.823,0a1.4,1.4,0,0,1,.353.019c-.7.67-1.377,1.369-2.069,2.05L5.545,18.8c-.331.324-.648.663-.989.975-.754.022-1.511.007-2.266.007,1.223-1.209,2.431-2.433,3.658-3.637C4.627,14.841,3.318,13.525,2,12.218Z'%20style='fill:%23ffe885'/%3e%3cpath%20d='M12.7,12.218c.613,0,1.226,0,1.839,0q0,3.783,0,7.566c-.611,0-1.222.012-1.832-.008,0-1.664,0-3.329,0-4.994-1.6,1.607-3.209,3.2-4.811,4.8-.089.08-.166.217-.305.194-.824-.006-1.649,0-2.474,0Q8.916,16,12.7,12.218Z'%20style='fill:%23ffe885'/%3e%3cpath%20d='M14.958,12.22c.47-.009.939,0,1.409,0,.836.853,1.69,1.689,2.536,2.532q1.268-1.267,2.539-2.532.7,0,1.4,0-.008,3.784,0,7.567c-.471,0-.943.006-1.414,0q.008-2.387,0-4.773c-.844.843-1.676,1.7-2.526,2.536-.856-.835-1.687-1.695-2.532-2.541,0,1.594-.006,3.188.006,4.781-.472,0-.943.005-1.415,0Q14.958,16,14.958,12.22Z'%20style='fill:%23ffe885'/%3e%3cpath%20d='M23.259,12.217c.472,0,.944-.007,1.416,0q-.007,3.083,0,6.166c1.26,0,2.521,0,3.782,0,.063.006.144-.012.191.045.448.454.907.9,1.353,1.354q-3.371.007-6.741,0Q23.267,16,23.259,12.217Z'%20style='fill:%23ffe885'/%3e%3c/svg%3e",zL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_xml%3c/title%3e%3cpath%20d='M20.42,21.157l2.211,2.211L30,16,22.631,8.631,20.42,10.843,25.58,16Z'%20style='fill:%23f1662a'/%3e%3cpath%20d='M11.58,10.843,9.369,8.631,2,16l7.369,7.369,2.211-2.211L6.42,16Z'%20style='fill:%23f1662a'/%3e%3cpath%20d='M17.411,7.677l1.6.437-4.42,16.209-1.6-.437,4.42-16.209Z'%20style='fill:%23f1662a'/%3e%3c/svg%3e",UL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_toml%3c/title%3e%3cpath%20d='M22.76,6.83v3.25h-5V25.17H14.26V10.08h-5V6.83Z'%20style='fill:%237f7f7f'/%3e%3cpath%20d='M2,2H8.2V5.09H5.34v21.8H8.2V30H2Z'%20style='fill:%23bfbfbf'/%3e%3cpath%20d='M30,30H23.8V26.91h2.86V5.11H23.8V2H30Z'%20style='fill:%23bfbfbf'/%3e%3c/svg%3e",WL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_light_ini%3c/title%3e%3cpath%20d='M23.265,24.381l.9-.894c4.164.136,4.228-.01,4.411-.438l1.144-2.785L29.805,20l-.093-.231c-.049-.122-.2-.486-2.8-2.965V15.5c3-2.89,2.936-3.038,2.765-3.461L28.538,9.225c-.171-.422-.236-.587-4.37-.474l-.9-.93a20.166,20.166,0,0,0-.141-4.106l-.116-.263-2.974-1.3c-.438-.2-.592-.272-3.4,2.786l-1.262-.019c-2.891-3.086-3.028-3.03-3.461-2.855L9.149,3.182c-.433.175-.586.237-.418,4.437l-.893.89c-4.162-.136-4.226.012-4.407.438L2.285,11.733,2.195,12l.094.232c.049.12.194.48,2.8,2.962l0,1.3c-3,2.89-2.935,3.038-2.763,3.462l1.138,2.817c.174.431.236.584,4.369.476l.9.935a20.243,20.243,0,0,0,.137,4.1l.116.265,2.993,1.308c.435.182.586.247,3.386-2.8l1.262.016c2.895,3.09,3.043,3.03,3.466,2.859l2.759-1.115C23.288,28.644,23.44,28.583,23.265,24.381ZM11.407,17.857a4.957,4.957,0,1,1,6.488,2.824A5.014,5.014,0,0,1,11.407,17.857Z'%20style='fill:%2340535b'/%3e%3c/svg%3e",GL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_light_config%3c/title%3e%3cpath%20d='M23.265,24.381l.9-.894c4.164.136,4.228-.01,4.411-.438l1.144-2.785L29.805,20l-.093-.231c-.049-.122-.2-.486-2.8-2.965V15.5c3-2.89,2.936-3.038,2.765-3.461L28.538,9.225c-.171-.422-.236-.587-4.37-.474l-.9-.93a20.166,20.166,0,0,0-.141-4.106l-.116-.263-2.974-1.3c-.438-.2-.592-.272-3.4,2.786l-1.262-.019c-2.891-3.086-3.028-3.03-3.461-2.855L9.149,3.182c-.433.175-.586.237-.418,4.437l-.893.89c-4.162-.136-4.226.012-4.407.438L2.285,11.733,2.195,12l.094.232c.049.12.194.48,2.8,2.962l0,1.3c-3,2.89-2.935,3.038-2.763,3.462l1.138,2.817c.174.431.236.584,4.369.476l.9.935a20.243,20.243,0,0,0,.137,4.1l.116.265,2.993,1.308c.435.182.586.247,3.386-2.8l1.262.016c2.895,3.09,3.043,3.03,3.466,2.859l2.759-1.115C23.288,28.644,23.44,28.583,23.265,24.381ZM11.407,17.857a4.957,4.957,0,1,1,6.488,2.824A5.014,5.014,0,0,1,11.407,17.857Z'%20style='fill:%2340535b'/%3e%3c/svg%3e",X0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_markdown%3c/title%3e%3crect%20x='2.5'%20y='7.955'%20width='27'%20height='16.091'%20style='fill:none;stroke:%23755838'/%3e%3cpolygon%20points='5.909%2020.636%205.909%2011.364%208.636%2011.364%2011.364%2014.773%2014.091%2011.364%2016.818%2011.364%2016.818%2020.636%2014.091%2020.636%2014.091%2015.318%2011.364%2018.727%208.636%2015.318%208.636%2020.636%205.909%2020.636'%20style='fill:%23755838'/%3e%3cpolygon%20points='22.955%2020.636%2018.864%2016.136%2021.591%2016.136%2021.591%2011.364%2024.318%2011.364%2024.318%2016.136%2027.045%2016.136%2022.955%2020.636'%20style='fill:%23755838'/%3e%3c/svg%3e",KL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_sql%3c/title%3e%3cpath%20d='M8.562,15.256A21.159,21.159,0,0,0,16,16.449a21.159,21.159,0,0,0,7.438-1.194c1.864-.727,2.525-1.535,2.525-2V9.7a10.357,10.357,0,0,1-2.084,1.076A22.293,22.293,0,0,1,16,12.078a22.36,22.36,0,0,1-7.879-1.3A10.28,10.28,0,0,1,6.037,9.7v3.55C6.037,13.724,6.7,14.528,8.562,15.256Z'%20style='fill:%23ffda44'/%3e%3cpath%20d='M8.562,21.961a15.611,15.611,0,0,0,2.6.741A24.9,24.9,0,0,0,16,23.155a24.9,24.9,0,0,0,4.838-.452,15.614,15.614,0,0,0,2.6-.741c1.864-.727,2.525-1.535,2.525-2v-3.39a10.706,10.706,0,0,1-1.692.825A23.49,23.49,0,0,1,16,18.74a23.49,23.49,0,0,1-8.271-1.348,10.829,10.829,0,0,1-1.692-.825V19.96C6.037,20.426,6.7,21.231,8.562,21.961Z'%20style='fill:%23ffda44'/%3e%3cpath%20d='M16,30c5.5,0,9.963-1.744,9.963-3.894V23.269a10.5,10.5,0,0,1-1.535.762l-.157.063A23.487,23.487,0,0,1,16,25.445a23.422,23.422,0,0,1-8.271-1.351c-.054-.02-.106-.043-.157-.063a10.5,10.5,0,0,1-1.535-.762v2.837C6.037,28.256,10.5,30,16,30Z'%20style='fill:%23ffda44'/%3e%3cellipse%20cx='16'%20cy='5.894'%20rx='9.963'%20ry='3.894'%20style='fill:%23ffda44'/%3e%3c/svg%3e",Vl="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_shell%3c/title%3e%3cpath%20d='M29.4,27.6H2.5V4.5H29.4Zm-25.9-1H28.4V5.5H3.5Z'%20style='fill:%23d9b400'/%3e%3cpolygon%20points='6.077%2019.316%205.522%2018.484%2010.366%2015.255%205.479%2011.184%206.12%2010.416%2012.035%2015.344%206.077%2019.316'%20style='fill:%23d9b400'/%3e%3crect%20x='12.7'%20y='18.2'%20width='7.8'%20height='1'%20style='fill:%23d9b400'/%3e%3crect%20x='2.5'%20y='5.5'%20width='26.9'%20height='1.9'%20style='fill:%23d9b400'/%3e%3c/svg%3e",qL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%3e%3cdefs%3e%3clinearGradient%20id='a'%20x1='-133.268'%20y1='-202.91'%20x2='-133.198'%20y2='-202.84'%20gradientTransform='translate(25243.061%2038519.17)%20scale(189.38%20189.81)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23387eb8'/%3e%3cstop%20offset='1'%20stop-color='%23366994'/%3e%3c/linearGradient%3e%3clinearGradient%20id='b'%20x1='-133.575'%20y1='-203.203'%20x2='-133.495'%20y2='-203.133'%20gradientTransform='translate(25309.061%2038583.42)%20scale(189.38%20189.81)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23ffe052'/%3e%3cstop%20offset='1'%20stop-color='%23ffc331'/%3e%3c/linearGradient%3e%3c/defs%3e%3ctitle%3efile_type_python%3c/title%3e%3cpath%20d='M15.885,2.1c-7.1,0-6.651,3.07-6.651,3.07V8.36h6.752v1H6.545S2,8.8,2,16.005s4.013,6.912,4.013,6.912H8.33V19.556s-.13-4.013,3.9-4.013h6.762s3.772.06,3.772-3.652V5.8s.572-3.712-6.842-3.712h0ZM12.153,4.237a1.214,1.214,0,1,1-1.183,1.244v-.02a1.214,1.214,0,0,1,1.214-1.214h0Z'%20style='fill:url(%23a)'/%3e%3cpath%20d='M16.085,29.91c7.1,0,6.651-3.08,6.651-3.08V23.65H15.985v-1h9.47S30,23.158,30,15.995s-4.013-6.912-4.013-6.912H23.64V12.4s.13,4.013-3.9,4.013H12.975S9.2,16.356,9.2,20.068V26.2s-.572,3.712,6.842,3.712h.04Zm3.732-2.147A1.214,1.214,0,1,1,21,26.519v.03a1.214,1.214,0,0,1-1.214,1.214h.03Z'%20style='fill:url(%23b)'/%3e%3c/svg%3e",XL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20254.5%20225'%3e%3ctitle%3efile_type_go%3c/title%3e%3cpath%20d='M-46.926,89c-.621,0-.777-.311-.466-.777l3.262-4.194a2.225,2.225,0,0,1,1.708-.777H13.026c.621,0,.777.466.466.932l-2.64,4.038a2.367,2.367,0,0,1-1.553.932Z'%20style='fill:%2300acd7'/%3e%3cpath%20d='M-70.379,103.285c-.621,0-.777-.311-.466-.777l3.262-4.194a2.225,2.225,0,0,1,1.708-.777H4.95a.714.714,0,0,1,.777.932L4.484,102.2a1.358,1.358,0,0,1-1.4.932Z'%20style='fill:%2300acd7'/%3e%3cpath%20d='M-32.792,117.574c-.621,0-.777-.466-.466-.932l2.174-3.883a2.06,2.06,0,0,1,1.553-.932H1.533c.621,0,.932.466.932,1.087l-.311,3.728a1.167,1.167,0,0,1-1.087,1.087Z'%20style='fill:%2300acd7'/%3e%3cpath%20d='M128.426,86.2c-9.785,2.485-16.464,4.349-26.093,6.834-2.33.621-2.485.777-4.5-1.553-2.33-2.64-4.038-4.349-7.3-5.9-9.785-4.815-19.259-3.417-28.112,2.33-10.561,6.834-16,16.929-15.842,29.51.155,12.425,8.7,22.676,20.968,24.385,10.561,1.4,19.414-2.33,26.4-10.251,1.4-1.708,2.64-3.572,4.194-5.747H68.163c-3.262,0-4.038-2.019-2.951-4.659,2.019-4.815,5.747-12.891,7.921-16.929a4.194,4.194,0,0,1,3.883-2.485h56.535c-.311,4.194-.311,8.387-.932,12.581a66.239,66.239,0,0,1-12.736,30.442C108.7,159.51,94.1,168.673,75.618,171.158c-15.221,2.019-29.355-.932-41.78-10.251a48.785,48.785,0,0,1-19.725-34.48c-2.019-16.929,2.951-32.15,13.2-45.508C38.342,66.475,52.942,57.312,70.8,54.05c14.6-2.64,28.578-.932,41.159,7.61a48.686,48.686,0,0,1,18.017,21.9C130.911,84.958,130.289,85.735,128.426,86.2Z'%20style='fill:%2300acd7'/%3e%3cpath%20d='M179.835,172.09c-14.134-.311-27.025-4.349-37.9-13.668a48.711,48.711,0,0,1-16.774-29.976c-2.8-17.551,2.019-33.082,12.581-46.905,11.338-14.91,25.006-22.676,43.488-25.938,15.842-2.8,30.753-1.243,44.265,7.921,12.27,8.387,19.88,19.725,21.9,34.635,2.64,20.968-3.417,38.052-17.861,52.652a71.17,71.17,0,0,1-37.276,19.88C188.067,171.469,183.874,171.624,179.835,172.09ZM216.8,109.343a44.7,44.7,0,0,0-.466-5.125c-2.8-15.376-16.929-24.074-31.684-20.657-14.444,3.262-23.763,12.425-27.18,27.025a25.579,25.579,0,0,0,14.289,29.355c8.542,3.728,17.085,3.262,25.317-.932C209.345,132.64,216.024,122.7,216.8,109.343Z'%20style='fill:%2300acd7'/%3e%3c/svg%3e",ZL=""+new URL("rust-D4Lh77kM.svg",import.meta.url).href,YL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_jar%3c/title%3e%3cpath%20d='M12.7,23.56s-1.07.622.761.833a16.023,16.023,0,0,0,5.8-.246A10.088,10.088,0,0,0,20.8,24.9c-5.481,2.349-12.405-.136-8.1-1.339'%20style='fill:%235382a1'/%3e%3cpath%20d='M12.026,20.494s-1.2.888.633,1.078a22.618,22.618,0,0,0,7.481-.359,3.32,3.32,0,0,0,1.152.7c-6.627,1.938-14.009.153-9.266-1.421'%20style='fill:%235382a1'/%3e%3cpath%20d='M17.673,15.294a2.051,2.051,0,0,1-.355,2.954s3.429-1.77,1.854-3.987c-1.471-2.067-2.6-3.095,3.508-6.636,0,0-9.586,2.394-5.007,7.669'%20style='fill:%23e76f00'/%3e%3cpath%20d='M24.922,25.827s.792.652-.872,1.157c-3.164.958-13.168,1.248-15.948.038-1-.435.874-1.038,1.464-1.164a3.8,3.8,0,0,1,.966-.108c-1.111-.783-7.181,1.537-3.083,2.2,11.176,1.812,20.372-.816,17.473-2.124'%20style='fill:%235382a1'/%3e%3cpath%20d='M13.211,17.318s-5.089,1.209-1.8,1.648a38.225,38.225,0,0,0,6.731-.072c2.106-.178,4.221-.555,4.221-.555a8.934,8.934,0,0,0-1.28.685C15.913,20.382,5.93,19.75,8.8,18.359a9.629,9.629,0,0,1,4.407-1.042'%20style='fill:%235382a1'/%3e%3cpath%20d='M22.34,22.421c5.253-2.73,2.824-5.353,1.129-5a3.932,3.932,0,0,0-.6.161.957.957,0,0,1,.449-.346c3.354-1.179,5.933,3.478-1.083,5.322a.458.458,0,0,0,.106-.138'%20style='fill:%235382a1'/%3e%3cpath%20d='M19.172,1.906s2.909,2.91-2.759,7.386c-4.546,3.59-1.037,5.637,0,7.975-2.653-2.394-4.6-4.5-3.294-6.463,1.917-2.879,7.229-4.275,6.056-8.9'%20style='fill:%23e76f00'/%3e%3cpath%20d='M13.727,29.818c5.042.323,12.786-.179,12.969-2.565,0,0-.353.9-4.167,1.623a41.458,41.458,0,0,1-12.76.2s.645.533,3.959.746'%20style='fill:%235382a1'/%3e%3c/svg%3e",Z0="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20fill='none'%20version='1.1'%20viewBox='0%200%2032%2032'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m30%2030h-28v-28h28l-14.289%2013.794z'%20fill='url(%23a)'%20stroke-width='.58333'/%3e%3cdefs%3e%3cradialGradient%20id='a'%20cx='0'%20cy='0'%20r='1'%20gradientTransform='matrix(-28%200%200%20-28%2030%202)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E44857'%20offset='0'/%3e%3cstop%20stop-color='%23C711E1'%20offset='.50449'/%3e%3cstop%20stop-color='%237F52FF'%20offset='1'/%3e%3c/radialGradient%3e%3c/defs%3e%3c/svg%3e",JL="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%3e%3cdefs%3e%3clinearGradient%20id='a'%20x1='-134.494'%20y1='-171.82'%20x2='-134.497'%20y2='-171.89'%20gradientTransform='matrix(240,%200,%200,%20-205.6,%2032295,%20-35312.585)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23f88535'/%3e%3cstop%20offset='1'%20stop-color='%23fd2221'/%3e%3c/linearGradient%3e%3c/defs%3e%3ctitle%3efile_type_swift%3c/title%3e%3cpath%20d='M19.422,4.007s6.217,3.554,7.844,9.2c1.466,5.1.292,7.534.292,7.534a8.915,8.915,0,0,1,1.742,2.8,4.825,4.825,0,0,1,.29,4.453s-.1-2.08-3.2-2.511c-2.841-.4-3.874,2.366-9.3,2.232A18.435,18.435,0,0,1,2,19.354C4.651,20.8,8.124,23.045,12.449,22.7s5.228-1.674,5.228-1.674A66.9,66.9,0,0,1,4.891,7.643c3.4,2.845,11.822,8.507,11.626,8.363A75.826,75.826,0,0,1,8.092,6.24S20.728,16.629,21.745,16.563c.418-.861,2.579-5.318-2.324-12.557Z'%20style='fill:url(%23a)'/%3e%3c/svg%3e",QL=""+new URL("ruby-B9Na5RWH.svg",import.meta.url).href,eA="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_dartlang%3c/title%3e%3cpath%20d='M16.739,2.037a1.314,1.314,0,0,0-.916.377l-.013.01L7.22,7.389l8.566,8.566v.006l10.3,10.3,1.963-3.536L20.968,5.728l-3.3-3.3a1.307,1.307,0,0,0-.927-.388Z'%20style='fill:%2366c3fa'/%3e%3cpath%20d='M7.25,7.35,2.288,15.931l-.01.013a1.322,1.322,0,0,0-.378.919,1.3,1.3,0,0,0,.387.924L6.4,21.9l16.084,6.327,3.636-2.02-.1-.1-.025,0-10.083-10.1H15.9L7.25,7.35Z'%20style='fill:%23215896'/%3e%3cpath%20d='M7.192,7.362l8.764,8.773h.013l10.087,10.1,3.839-.732L29.9,14.14l-4.054-3.973a6.521,6.521,0,0,0-3.624-1.616l0-.044L7.192,7.362Z'%20style='fill:%23235997'/%3e%3cpath%20d='M7.256,7.411l8.768,8.768v.013L26.116,26.284l-.734,3.839H14.022l-3.971-4.056a6.522,6.522,0,0,1-1.614-3.625l-.044,0L7.256,7.411Z'%20style='fill:%2358b6f0'/%3e%3c/svg%3e",Po="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_cpp%3c/title%3e%3cpath%20d='M14.742,24.047a10.242,10.242,0,0,1-4.673.919A7.628,7.628,0,0,1,4.155,22.62,8.876,8.876,0,0,1,2,16.369,9.476,9.476,0,0,1,4.422,9.621a8.216,8.216,0,0,1,6.285-2.588,11.151,11.151,0,0,1,4.035.641v3.761A6.839,6.839,0,0,0,11,10.395,4.813,4.813,0,0,0,7.288,11.93a5.9,5.9,0,0,0-1.413,4.159A5.8,5.8,0,0,0,7.209,20.1a4.57,4.57,0,0,0,3.59,1.493,7.319,7.319,0,0,0,3.943-1.113Z'%20style='fill:%23984c93'/%3e%3cpolygon%20points='17.112%2014.829%2017.112%2012.485%2019.456%2012.485%2019.456%2014.829%2021.8%2014.829%2021.8%2017.172%2019.456%2017.172%2019.456%2019.515%2017.112%2019.515%2017.112%2017.172%2014.77%2017.172%2014.77%2014.828%2017.112%2014.829'%20style='fill:%23984c93'/%3e%3cpolygon%20points='25.313%2014.829%2025.313%2012.485%2027.657%2012.485%2027.657%2014.829%2030%2014.829%2030%2017.172%2027.657%2017.172%2027.657%2019.515%2025.313%2019.515%2025.313%2017.172%2022.971%2017.172%2022.971%2014.828%2025.313%2014.829'%20style='fill:%23984c93'/%3e%3c/svg%3e",tA="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_csharp%3c/title%3e%3cpath%20d='M19.792,7.071h2.553V9.624H24.9V7.071h2.552V9.624H30v2.552h-2.55v2.551H30V17.28H27.449v2.552H24.9v-2.55l-2.55,0,0,2.552H19.793v-2.55l-2.553,0V14.725h2.553V12.179H17.24V9.622h2.554Zm2.553,7.658H24.9V12.176H22.345Z'%20style='fill:%23368832'/%3e%3cpath%20d='M14.689,24.013a10.2,10.2,0,0,1-4.653.915,7.6,7.6,0,0,1-5.89-2.336A8.839,8.839,0,0,1,2,16.367,9.436,9.436,0,0,1,4.412,9.648a8.181,8.181,0,0,1,6.259-2.577,11.1,11.1,0,0,1,4.018.638v3.745a6.81,6.81,0,0,0-3.723-1.036,4.793,4.793,0,0,0-3.7,1.529,5.879,5.879,0,0,0-1.407,4.142,5.774,5.774,0,0,0,1.328,3.992,4.551,4.551,0,0,0,3.575,1.487,7.288,7.288,0,0,0,3.927-1.108Z'%20style='fill:%23368832'/%3e%3c/svg%3e",rA="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_svg%3c/title%3e%3cpath%20d='M7.674,14.488a2.218,2.218,0,1,0,0,3.137H24.326a2.218,2.218,0,1,0,0-3.137Z'%20style='fill:%23ffb13b;stroke:%23000;stroke-width:3.73000001907349px'/%3e%3cpath%20d='M11.222,9.06A2.218,2.218,0,1,0,9,11.278L20.778,23.052A2.218,2.218,0,1,0,23,20.834Z'%20style='fill:%23ffb13b;stroke:%23000;stroke-width:3.73000001907349px'/%3e%3cpath%20d='M17.568,7.73a2.218,2.218,0,1,0-3.137,0V24.382a2.218,2.218,0,1,0,3.137,0Z'%20style='fill:%23ffb13b;stroke:%23000;stroke-width:3.73000001907349px'/%3e%3cpath%20d='M23,11.278A2.218,2.218,0,1,0,20.778,9.06L9,20.834a2.218,2.218,0,1,0,2.218,2.218Z'%20style='fill:%23ffb13b;stroke:%23000;stroke-width:3.73000001907349px'/%3e%3cpath%20d='M7.674,14.488a2.218,2.218,0,1,0,0,3.137H24.326a2.218,2.218,0,1,0,0-3.137Z'%20style='fill:%23ffb13b'/%3e%3cpath%20d='M11.222,9.06A2.218,2.218,0,1,0,9,11.278L20.778,23.052A2.218,2.218,0,1,0,23,20.834Z'%20style='fill:%23ffb13b'/%3e%3cpath%20d='M17.568,7.73a2.218,2.218,0,1,0-3.137,0V24.382a2.218,2.218,0,1,0,3.137,0Z'%20style='fill:%23ffb13b'/%3e%3cpath%20d='M23,11.278A2.218,2.218,0,1,0,20.778,9.06L9,20.834a2.218,2.218,0,1,0,2.218,2.218Z'%20style='fill:%23ffb13b'/%3e%3cpath%20d='M2,16.056H30V25.95a4.035,4.035,0,0,1-4.106,4.106H6.106A4.035,4.035,0,0,1,2,25.95Z'/%3e%3cpath%20d='M6.2,23.045A3.628,3.628,0,1,1,12.4,20.48H10.27A1.5,1.5,0,1,0,7.7,21.541h0a1.6,1.6,0,0,0,1.062.441h0a4.118,4.118,0,0,1,2.566,1.063h0a3.628,3.628,0,1,1-6.194,2.565H7.264A1.5,1.5,0,1,0,9.83,24.55h0a1.948,1.948,0,0,0-1.063-.44h0A4.465,4.465,0,0,1,6.2,23.045Z'%20style='fill:%23fff'/%3e%3cpath%20d='M19.651,16.852,17.085,29.24H14.96L12.4,16.852H14.52l1.5,7.255,1.5-7.255Z'%20style='fill:%23fff'/%3e%3cpath%20d='M23.28,21.983h3.628v3.628h0a3.628,3.628,0,1,1-7.257,0h0V20.48h0a3.628,3.628,0,0,1,7.257,0H24.783a1.5,1.5,0,1,0-3.005,0v5.13h0a1.5,1.5,0,0,0,3.005,0h0v-1.5h-1.5V21.983Z'%20style='fill:%23fff'/%3e%3c/svg%3e",Ni="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_image%3c/title%3e%3cpath%20d='M30,5.851Q30,16,30,26.149H2Q2,16,2,5.851H30'%20style='fill:%232dcc9f'/%3e%3cpath%20d='M24.232,8.541a2.2,2.2,0,1,0,1.127.623,2.212,2.212,0,0,0-1.127-.623'%20style='fill:%23fff'/%3e%3cpath%20d='M18.111,20.1q-2.724-3.788-5.45-7.575Q8.619,18.147,4.579,23.766q5.449,0,10.9,0,1.316-1.832,2.634-3.663'%20style='fill:%23fff'/%3e%3cpath%20d='M22.057,16q-2.793,3.882-5.584,7.765,5.584,0,11.169,0Q24.851,19.882,22.057,16Z'%20style='fill:%23fff'/%3e%3c/svg%3e",zl="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_audio%3c/title%3e%3cpath%20d='M17.229,4a.9.9,0,0,0-.569.232l-7.6,6.32a1.158,1.158,0,0,1-.955.328H3.208A1.2,1.2,0,0,0,2,12.088v7.826A1.2,1.2,0,0,0,3.208,21.12H8.1a1.158,1.158,0,0,1,.955.328l7.6,6.32c.521.433,1.081.224,1.081-.289V4.522A.494.494,0,0,0,17.229,4ZM27,6.3,25.209,8.093a14.708,14.708,0,0,1,0,15.844l1.785,1.776A17.19,17.19,0,0,0,27,6.3Zm-4.333,4.323L20.905,12.4a6.035,6.035,0,0,1,0,7.237l1.756,1.756a8.554,8.554,0,0,0,.01-10.769Z'%20style='fill:%2300007f'/%3e%3c/svg%3e",Fo=""+new URL("video-BNtpQqFj.svg",import.meta.url).href,Ho="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_font%3c/title%3e%3cpath%20d='M12.677,17.781l-2.626-6.256L7.357,17.781ZM19.4,24.292H12.331V22.927l.458-.023a1.847,1.847,0,0,0,.972-.2.313.313,0,0,0,.145-.263,4.158,4.158,0,0,0-.419-1.4l-.812-1.931H7.322L6.4,21.259a3.319,3.319,0,0,0-.349,1.157c0,.036,0,.119.154.241a2.481,2.481,0,0,0,1.191.247l.448.033v1.354H2V22.981l.4-.07A2.188,2.188,0,0,0,3.4,22.593a6.318,6.318,0,0,0,1.18-2.066L10.155,7.491H11.2l5.512,13.174A5.255,5.255,0,0,0,17.761,22.5a1.959,1.959,0,0,0,1.19.4l.454.027Z'%20style='fill:%23cfcfcf'/%3e%3cpath%20d='M25.841,21.56V17.575a22.542,22.542,0,0,0-2.226.97,3.845,3.845,0,0,0-1.29,1.05,2.03,2.03,0,0,0-.388,1.2,1.951,1.951,0,0,0,.491,1.362,1.49,1.49,0,0,0,1.13.544A4.142,4.142,0,0,0,25.841,21.56Zm-3.333,2.949a2.833,2.833,0,0,1-2.139-.893,3.206,3.206,0,0,1-.833-2.285,2.959,2.959,0,0,1,.415-1.577,5,5,0,0,1,1.791-1.625,23.876,23.876,0,0,1,3.617-1.588v-.074a2.905,2.905,0,0,0-.383-1.833,1.325,1.325,0,0,0-1.075-.412,1.155,1.155,0,0,0-.816.26.687.687,0,0,0-.277.536l.023.646a1.62,1.62,0,0,1-.4,1.158,1.481,1.481,0,0,1-2.1-.019,1.634,1.634,0,0,1-.391-1.134,2.8,2.8,0,0,1,1.182-2.177,4.813,4.813,0,0,1,3.125-.932,5.381,5.381,0,0,1,2.508.524,2.628,2.628,0,0,1,1.213,1.346,6.391,6.391,0,0,1,.244,2.2v3.55a14.665,14.665,0,0,0,.051,1.749.661.661,0,0,0,.054.2c.085-.078.284-.225.864-.806L30,20.495v1.967l-.1.128c-.958,1.283-1.883,1.907-2.83,1.907a1.6,1.6,0,0,1-1.257-.557,1.788,1.788,0,0,1-.358-.74,9.688,9.688,0,0,1-1.433.977A3.579,3.579,0,0,1,22.508,24.509Z'%20style='fill:%23cfcfcf'/%3e%3c/svg%3e",jo=""+new URL("zip-B6t6sldd.svg",import.meta.url).href,nA="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_pdf2%3c/title%3e%3cpath%20d='M24.1,2.072h0l5.564,5.8V29.928H8.879V30H29.735V7.945L24.1,2.072'%20style='fill:%23909090'/%3e%3cpath%20d='M24.031,2H8.808V29.928H29.664V7.873L24.03,2'%20style='fill:%23f4f4f4'/%3e%3cpath%20d='M8.655,3.5H2.265v6.827h20.1V3.5H8.655'%20style='fill:%237a7b7c'/%3e%3cpath%20d='M22.472,10.211H2.395V3.379H22.472v6.832'%20style='fill:%23dd2025'/%3e%3cpath%20d='M9.052,4.534h-.03l-.207,0H7.745v4.8H8.773V7.715L9,7.728a2.042,2.042,0,0,0,.647-.117,1.427,1.427,0,0,0,.493-.291,1.224,1.224,0,0,0,.335-.454,2.13,2.13,0,0,0,.105-.908,2.237,2.237,0,0,0-.114-.644,1.173,1.173,0,0,0-.687-.65A2.149,2.149,0,0,0,9.37,4.56a2.232,2.232,0,0,0-.319-.026M8.862,6.828l-.089,0V5.348h.193a.57.57,0,0,1,.459.181.92.92,0,0,1,.183.558c0,.246,0,.469-.222.626a.942.942,0,0,1-.524.114'%20style='fill:%23464648'/%3e%3cpath%20d='M12.533,4.521c-.111,0-.219.008-.295.011L12,4.538h-.78v4.8h.918a2.677,2.677,0,0,0,1.028-.175,1.71,1.71,0,0,0,.68-.491,1.939,1.939,0,0,0,.373-.749,3.728,3.728,0,0,0,.114-.949,4.416,4.416,0,0,0-.087-1.127,1.777,1.777,0,0,0-.4-.733,1.63,1.63,0,0,0-.535-.4,2.413,2.413,0,0,0-.549-.178,1.282,1.282,0,0,0-.228-.017m-.182,3.937-.1,0V5.392h.013a1.062,1.062,0,0,1,.6.107,1.2,1.2,0,0,1,.324.4,1.3,1.3,0,0,1,.142.526c.009.22,0,.4,0,.549a2.926,2.926,0,0,1-.033.513,1.756,1.756,0,0,1-.169.5,1.13,1.13,0,0,1-.363.36.673.673,0,0,1-.416.106'%20style='fill:%23464648'/%3e%3cpath%20d='M17.43,4.538H15v4.8h1.028V7.434h1.3V6.542h-1.3V5.43h1.4V4.538'%20style='fill:%23464648'/%3e%3cpath%20d='M21.781,20.255s3.188-.578,3.188.511S22.994,21.412,21.781,20.255Zm-2.357.083a7.543,7.543,0,0,0-1.473.489l.4-.9c.4-.9.815-2.127.815-2.127a14.216,14.216,0,0,0,1.658,2.252,13.033,13.033,0,0,0-1.4.288Zm-1.262-6.5c0-.949.307-1.208.546-1.208s.508.115.517.939a10.787,10.787,0,0,1-.517,2.434A4.426,4.426,0,0,1,18.161,13.841ZM13.513,24.354c-.978-.585,2.051-2.386,2.6-2.444C16.11,21.911,14.537,24.966,13.513,24.354ZM25.9,20.895c-.01-.1-.1-1.207-2.07-1.16a14.228,14.228,0,0,0-2.453.173,12.542,12.542,0,0,1-2.012-2.655,11.76,11.76,0,0,0,.623-3.1c-.029-1.2-.316-1.888-1.236-1.878s-1.054.815-.933,2.013a9.309,9.309,0,0,0,.665,2.338s-.425,1.323-.987,2.639-.946,2.006-.946,2.006a9.622,9.622,0,0,0-2.725,1.4c-.824.767-1.159,1.356-.725,1.945.374.508,1.683.623,2.853-.91a22.549,22.549,0,0,0,1.7-2.492s1.784-.489,2.339-.623,1.226-.24,1.226-.24,1.629,1.639,3.2,1.581,1.495-.939,1.485-1.035'%20style='fill:%23dd2025'/%3e%3cpath%20d='M23.954,2.077V7.95h5.633L23.954,2.077Z'%20style='fill:%23909090'/%3e%3cpath%20d='M24.031,2V7.873h5.633L24.031,2Z'%20style='fill:%23f4f4f4'/%3e%3cpath%20d='M8.975,4.457h-.03l-.207,0H7.668v4.8H8.7V7.639l.228.013a2.042,2.042,0,0,0,.647-.117,1.428,1.428,0,0,0,.493-.291A1.224,1.224,0,0,0,10.4,6.79a2.13,2.13,0,0,0,.105-.908,2.237,2.237,0,0,0-.114-.644,1.173,1.173,0,0,0-.687-.65,2.149,2.149,0,0,0-.411-.105,2.232,2.232,0,0,0-.319-.026M8.785,6.751l-.089,0V5.271H8.89a.57.57,0,0,1,.459.181.92.92,0,0,1,.183.558c0,.246,0,.469-.222.626a.942.942,0,0,1-.524.114'%20style='fill:%23fff'/%3e%3cpath%20d='M12.456,4.444c-.111,0-.219.008-.295.011l-.235.006h-.78v4.8h.918a2.677,2.677,0,0,0,1.028-.175,1.71,1.71,0,0,0,.68-.491,1.939,1.939,0,0,0,.373-.749,3.728,3.728,0,0,0,.114-.949,4.416,4.416,0,0,0-.087-1.127,1.777,1.777,0,0,0-.4-.733,1.63,1.63,0,0,0-.535-.4,2.413,2.413,0,0,0-.549-.178,1.282,1.282,0,0,0-.228-.017m-.182,3.937-.1,0V5.315h.013a1.062,1.062,0,0,1,.6.107,1.2,1.2,0,0,1,.324.4,1.3,1.3,0,0,1,.142.526c.009.22,0,.4,0,.549a2.926,2.926,0,0,1-.033.513,1.756,1.756,0,0,1-.169.5,1.13,1.13,0,0,1-.363.36.673.673,0,0,1-.416.106'%20style='fill:%23fff'/%3e%3cpath%20d='M17.353,4.461h-2.43v4.8h1.028V7.357h1.3V6.465h-1.3V5.353h1.4V4.461'%20style='fill:%23fff'/%3e%3c/svg%3e",Y0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%3e%3cdefs%3e%3clinearGradient%20id='a'%20x1='4.494'%20y1='-2092.086'%20x2='13.832'%20y2='-2075.914'%20gradientTransform='translate(0%202100)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2318884f'/%3e%3cstop%20offset='0.5'%20stop-color='%23117e43'/%3e%3cstop%20offset='1'%20stop-color='%230b6631'/%3e%3c/linearGradient%3e%3c/defs%3e%3ctitle%3efile_type_excel%3c/title%3e%3cpath%20d='M19.581,15.35,8.512,13.4V27.809A1.192,1.192,0,0,0,9.705,29h19.1A1.192,1.192,0,0,0,30,27.809h0V22.5Z'%20style='fill:%23185c37'/%3e%3cpath%20d='M19.581,3H9.705A1.192,1.192,0,0,0,8.512,4.191h0V9.5L19.581,16l5.861,1.95L30,16V9.5Z'%20style='fill:%2321a366'/%3e%3cpath%20d='M8.512,9.5H19.581V16H8.512Z'%20style='fill:%23107c41'/%3e%3cpath%20d='M16.434,8.2H8.512V24.45h7.922a1.2,1.2,0,0,0,1.194-1.191V9.391A1.2,1.2,0,0,0,16.434,8.2Z'%20style='opacity:0.10000000149011612;isolation:isolate'/%3e%3cpath%20d='M15.783,8.85H8.512V25.1h7.271a1.2,1.2,0,0,0,1.194-1.191V10.041A1.2,1.2,0,0,0,15.783,8.85Z'%20style='opacity:0.20000000298023224;isolation:isolate'/%3e%3cpath%20d='M15.783,8.85H8.512V23.8h7.271a1.2,1.2,0,0,0,1.194-1.191V10.041A1.2,1.2,0,0,0,15.783,8.85Z'%20style='opacity:0.20000000298023224;isolation:isolate'/%3e%3cpath%20d='M15.132,8.85H8.512V23.8h6.62a1.2,1.2,0,0,0,1.194-1.191V10.041A1.2,1.2,0,0,0,15.132,8.85Z'%20style='opacity:0.20000000298023224;isolation:isolate'/%3e%3cpath%20d='M3.194,8.85H15.132a1.193,1.193,0,0,1,1.194,1.191V21.959a1.193,1.193,0,0,1-1.194,1.191H3.194A1.192,1.192,0,0,1,2,21.959V10.041A1.192,1.192,0,0,1,3.194,8.85Z'%20style='fill:url(%23a)'/%3e%3cpath%20d='M5.7,19.873l2.511-3.884-2.3-3.862H7.758L9.013,14.6c.116.234.2.408.238.524h.017c.082-.188.169-.369.26-.546l1.342-2.447h1.7l-2.359,3.84,2.419,3.905H10.821l-1.45-2.711A2.355,2.355,0,0,1,9.2,16.8H9.176a1.688,1.688,0,0,1-.168.351L7.515,19.873Z'%20style='fill:%23fff'/%3e%3cpath%20d='M28.806,3H19.581V9.5H30V4.191A1.192,1.192,0,0,0,28.806,3Z'%20style='fill:%2333c481'/%3e%3cpath%20d='M19.581,16H30v6.5H19.581Z'%20style='fill:%23107c41'/%3e%3c/svg%3e",J0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%3e%3cdefs%3e%3clinearGradient%20id='a'%20x1='4.494'%20y1='-1712.086'%20x2='13.832'%20y2='-1695.914'%20gradientTransform='translate(0%201720)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%232368c4'/%3e%3cstop%20offset='0.5'%20stop-color='%231a5dbe'/%3e%3cstop%20offset='1'%20stop-color='%231146ac'/%3e%3c/linearGradient%3e%3c/defs%3e%3ctitle%3efile_type_word%3c/title%3e%3cpath%20d='M28.806,3H9.705A1.192,1.192,0,0,0,8.512,4.191h0V9.5l11.069,3.25L30,9.5V4.191A1.192,1.192,0,0,0,28.806,3Z'%20style='fill:%2341a5ee'/%3e%3cpath%20d='M30,9.5H8.512V16l11.069,1.95L30,16Z'%20style='fill:%232b7cd3'/%3e%3cpath%20d='M8.512,16v6.5L18.93,23.8,30,22.5V16Z'%20style='fill:%23185abd'/%3e%3cpath%20d='M9.705,29h19.1A1.192,1.192,0,0,0,30,27.809h0V22.5H8.512v5.309A1.192,1.192,0,0,0,9.705,29Z'%20style='fill:%23103f91'/%3e%3cpath%20d='M16.434,8.2H8.512V24.45h7.922a1.2,1.2,0,0,0,1.194-1.191V9.391A1.2,1.2,0,0,0,16.434,8.2Z'%20style='opacity:0.10000000149011612;isolation:isolate'/%3e%3cpath%20d='M15.783,8.85H8.512V25.1h7.271a1.2,1.2,0,0,0,1.194-1.191V10.041A1.2,1.2,0,0,0,15.783,8.85Z'%20style='opacity:0.20000000298023224;isolation:isolate'/%3e%3cpath%20d='M15.783,8.85H8.512V23.8h7.271a1.2,1.2,0,0,0,1.194-1.191V10.041A1.2,1.2,0,0,0,15.783,8.85Z'%20style='opacity:0.20000000298023224;isolation:isolate'/%3e%3cpath%20d='M15.132,8.85H8.512V23.8h6.62a1.2,1.2,0,0,0,1.194-1.191V10.041A1.2,1.2,0,0,0,15.132,8.85Z'%20style='opacity:0.20000000298023224;isolation:isolate'/%3e%3cpath%20d='M3.194,8.85H15.132a1.193,1.193,0,0,1,1.194,1.191V21.959a1.193,1.193,0,0,1-1.194,1.191H3.194A1.192,1.192,0,0,1,2,21.959V10.041A1.192,1.192,0,0,1,3.194,8.85Z'%20style='fill:url(%23a)'/%3e%3cpath%20d='M6.9,17.988c.023.184.039.344.046.481h.028c.01-.13.032-.287.065-.47s.062-.338.089-.465l1.255-5.407h1.624l1.3,5.326a7.761,7.761,0,0,1,.162,1h.022a7.6,7.6,0,0,1,.135-.975l1.039-5.358h1.477l-1.824,7.748H10.591L9.354,14.742q-.054-.222-.122-.578t-.084-.52H9.127q-.021.189-.084.561c-.042.249-.075.432-.1.552L7.78,19.871H6.024L4.19,12.127h1.5l1.131,5.418A4.469,4.469,0,0,1,6.9,17.988Z'%20style='fill:%23fff'/%3e%3c/svg%3e",Q0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%3e%3cdefs%3e%3clinearGradient%20id='a'%20x1='4.494'%20y1='-1748.086'%20x2='13.832'%20y2='-1731.914'%20gradientTransform='translate(0%201756)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23ca4c28'/%3e%3cstop%20offset='0.5'%20stop-color='%23c5401e'/%3e%3cstop%20offset='1'%20stop-color='%23b62f14'/%3e%3c/linearGradient%3e%3c/defs%3e%3ctitle%3efile_type_powerpoint%3c/title%3e%3cpath%20d='M18.93,17.3,16.977,3h-.146A12.9,12.9,0,0,0,3.953,15.854V16Z'%20style='fill:%23ed6c47'/%3e%3cpath%20d='M17.123,3h-.146V16l6.511,2.6L30,16v-.146A12.9,12.9,0,0,0,17.123,3Z'%20style='fill:%23ff8f6b'/%3e%3cpath%20d='M30,16v.143A12.905,12.905,0,0,1,17.12,29h-.287A12.907,12.907,0,0,1,3.953,16.143V16Z'%20style='fill:%23d35230'/%3e%3cpath%20d='M17.628,9.389V23.26a1.2,1.2,0,0,1-.742,1.1,1.16,1.16,0,0,1-.45.091H7.027c-.182-.208-.358-.429-.521-.65a12.735,12.735,0,0,1-2.553-7.657v-.286A12.705,12.705,0,0,1,6.05,8.85c.143-.221.293-.442.456-.65h9.93A1.2,1.2,0,0,1,17.628,9.389Z'%20style='opacity:0.10000000149011612;isolation:isolate'/%3e%3cpath%20d='M16.977,10.04V23.911a1.15,1.15,0,0,1-.091.448,1.2,1.2,0,0,1-1.1.741H7.62q-.309-.314-.593-.65c-.182-.208-.358-.429-.521-.65a12.735,12.735,0,0,1-2.553-7.657v-.286A12.705,12.705,0,0,1,6.05,8.85h9.735A1.2,1.2,0,0,1,16.977,10.04Z'%20style='opacity:0.20000000298023224;isolation:isolate'/%3e%3cpath%20d='M16.977,10.04V22.611A1.2,1.2,0,0,1,15.785,23.8H6.506a12.735,12.735,0,0,1-2.553-7.657v-.286A12.705,12.705,0,0,1,6.05,8.85h9.735A1.2,1.2,0,0,1,16.977,10.04Z'%20style='opacity:0.20000000298023224;isolation:isolate'/%3e%3cpath%20d='M16.326,10.04V22.611A1.2,1.2,0,0,1,15.134,23.8H6.506a12.735,12.735,0,0,1-2.553-7.657v-.286A12.705,12.705,0,0,1,6.05,8.85h9.084A1.2,1.2,0,0,1,16.326,10.04Z'%20style='opacity:0.20000000298023224;isolation:isolate'/%3e%3cpath%20d='M3.194,8.85H15.132a1.193,1.193,0,0,1,1.194,1.191V21.959a1.193,1.193,0,0,1-1.194,1.191H3.194A1.192,1.192,0,0,1,2,21.959V10.041A1.192,1.192,0,0,1,3.194,8.85Z'%20style='fill:url(%23a)'/%3e%3cpath%20d='M9.293,12.028a3.287,3.287,0,0,1,2.174.636,2.27,2.27,0,0,1,.756,1.841,2.555,2.555,0,0,1-.373,1.376,2.49,2.49,0,0,1-1.059.935A3.607,3.607,0,0,1,9.2,17.15H7.687v2.8H6.141V12.028ZM7.686,15.94H9.017a1.735,1.735,0,0,0,1.177-.351,1.3,1.3,0,0,0,.4-1.025q0-1.309-1.525-1.31H7.686V15.94Z'%20style='fill:%23fff'/%3e%3c/svg%3e",ih="data:image/svg+xml,%3csvg%20viewBox='0%200%2032%2032'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3efile_type_npm%3c/title%3e%3cpath%20d='M2%202H30V30H2'%20fill='%23c12127'/%3e%3cpath%20d='M7.25%207.25h17.5v17.5h-3.5v-14H16v14H7.25'%20fill='%23fff'/%3e%3c/svg%3e",em="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_node%3c/title%3e%3cpath%20d='M16,30a2.151,2.151,0,0,1-1.076-.288L11.5,27.685c-.511-.286-.262-.387-.093-.446a6.828,6.828,0,0,0,1.549-.7.263.263,0,0,1,.255.019l2.631,1.563a.34.34,0,0,0,.318,0l10.26-5.922a.323.323,0,0,0,.157-.278V10.075a.331.331,0,0,0-.159-.283L16.158,3.875a.323.323,0,0,0-.317,0L5.587,9.794a.33.33,0,0,0-.162.281V21.916a.315.315,0,0,0,.161.274L8.4,23.814c1.525.762,2.459-.136,2.459-1.038V11.085a.3.3,0,0,1,.3-.3h1.3a.3.3,0,0,1,.3.3V22.777c0,2.035-1.108,3.2-3.038,3.2a4.389,4.389,0,0,1-2.363-.642L4.661,23.788a2.166,2.166,0,0,1-1.076-1.872V10.075A2.162,2.162,0,0,1,4.661,8.2L14.922,2.276a2.246,2.246,0,0,1,2.156,0L27.338,8.2a2.165,2.165,0,0,1,1.077,1.87V21.916a2.171,2.171,0,0,1-1.077,1.872l-10.26,5.924A2.152,2.152,0,0,1,16,30Z'%20style='fill:%2383cd29'/%3e%3cpath%20d='M14.054,17.953a.3.3,0,0,1,.3-.3h1.327a.3.3,0,0,1,.295.251c.2,1.351.8,2.032,3.513,2.032,2.161,0,3.082-.489,3.082-1.636,0-.661-.261-1.152-3.62-1.481-2.808-.278-4.544-.9-4.544-3.144,0-2.07,1.745-3.305,4.67-3.305,3.287,0,4.914,1.141,5.12,3.589a.3.3,0,0,1-.295.323H22.566a.3.3,0,0,1-.288-.232c-.319-1.421-1.1-1.875-3.2-1.875-2.36,0-2.634.822-2.634,1.438,0,.746.324.964,3.51,1.385,3.153.417,4.651,1.007,4.651,3.223,0,2.236-1.864,3.516-5.115,3.516C14.995,21.743,14.054,19.682,14.054,17.953Z'%20style='fill:%2383cd29'/%3e%3c/svg%3e",sh="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_tsconfig%3c/title%3e%3cpath%20d='M23.827,8.243A4.424,4.424,0,0,1,26.05,9.524a5.853,5.853,0,0,1,.852,1.143c.011.045-1.534,1.083-2.471,1.662-.034.023-.169-.124-.322-.35a2.014,2.014,0,0,0-1.67-1c-1.077-.074-1.771.49-1.766,1.433a1.3,1.3,0,0,0,.153.666c.237.49.677.784,2.059,1.383,2.544,1.1,3.636,1.817,4.31,2.843a5.158,5.158,0,0,1,.416,4.333,4.764,4.764,0,0,1-3.932,2.815,10.9,10.9,0,0,1-2.708-.028,6.531,6.531,0,0,1-3.616-1.884,6.278,6.278,0,0,1-.926-1.371,2.655,2.655,0,0,1,.327-.208c.158-.09.756-.434,1.32-.761l1.024-.6.214.312a4.771,4.771,0,0,0,1.35,1.292,3.3,3.3,0,0,0,3.458-.175,1.545,1.545,0,0,0,.2-1.974c-.276-.4-.84-.727-2.443-1.422a8.8,8.8,0,0,1-3.349-2.055,4.687,4.687,0,0,1-.976-1.777,7.116,7.116,0,0,1-.062-2.268,4.332,4.332,0,0,1,3.644-3.374A9,9,0,0,1,23.827,8.243ZM15.484,9.726l.011,1.454h-4.63V24.328H7.6V11.183H2.97V9.755a13.986,13.986,0,0,1,.04-1.466c.017-.023,2.832-.034,6.245-.028l6.211.017Z'%20style='fill:%23007acc'/%3e%3cpath%20d='M27.075,25.107l.363-.361c1.68.055,1.706,0,1.78-.177l.462-1.124.034-.107-.038-.093c-.02-.049-.081-.2-1.13-1.2v-.526c1.211-1.166,1.185-1.226,1.116-1.4l-.46-1.136c-.069-.17-.1-.237-1.763-.191l-.364-.367a8.138,8.138,0,0,0-.057-1.657l-.047-.106-1.2-.525c-.177-.081-.239-.11-1.372,1.124l-.509-.008c-1.167-1.245-1.222-1.223-1.4-1.152l-1.115.452c-.175.071-.236.1-.169,1.79l-.36.359c-1.68-.055-1.7,0-1.778.177L18.606,20l-.036.108.038.094c.02.048.078.194,1.13,1.2v.525c-1.211,1.166-1.184,1.226-1.115,1.4l.459,1.137c.07.174.1.236,1.763.192l.363.377a8.169,8.169,0,0,0,.055,1.654l.047.107,1.208.528c.176.073.236.1,1.366-1.13l.509.006c1.168,1.247,1.228,1.223,1.4,1.154l1.113-.45C27.082,26.827,27.143,26.8,27.075,25.107Zm-4.788-2.632a2,2,0,1,1,2.618,1.14A2.023,2.023,0,0,1,22.287,22.475Z'%20style='fill:%2399b8c4'/%3e%3c/svg%3e",Ii="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_eslint%3c/title%3e%3cpath%20d='M29.832,16.7,23.478,27.417A1.256,1.256,0,0,1,22.36,28H9.647a1.262,1.262,0,0,1-1.118-.59L2.173,16.71a1.256,1.256,0,0,1,0-1.272L8.527,4.676A1.344,1.344,0,0,1,9.647,4H22.356a1.344,1.344,0,0,1,1.118.678l6.354,10.786a1.2,1.2,0,0,1,0,1.238ZM24.57,20.9V11.286L16,6.466l-8.56,4.82V20.9L16,25.719Z'%20style='fill:%234b32c3'/%3e%3cpolygon%20points='21.802%2019.188%2016.055%2022.423%2010.313%2019.188%2010.313%2012.718%2016.055%209.482%2021.802%2012.718%2021.802%2019.188'%20style='fill:%238080f2'/%3e%3c/svg%3e",Ul="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%20stroke-linecap='round'%20stroke-width='1.33'%3e%3ctitle%3efile_type_prettier%3c/title%3e%3cpath%20d='m2.45%202.45h16.3m-16.3%205.42h9.48m10.8%200h1.35m-16.3%202.71h1.35m4.06%205.42h10.8m-21.7%202.71h5.42m-5.42%208.13h2.71'%20stroke='%2356b3b4'/%3e%3cpath%20d='m2.45%205.16h4.06m12.2%205.42h6.77m-23%205.42h1.35m6.77%202.71h5.42m-13.5%2010.8h6.77'%20stroke='%23ea5e5e'/%3e%3cpath%20d='m9.23%205.16h13.5m-20.3%205.42h2.71m13.5%202.71h6.77m-19%202.71h4.06m-4.06%205.42h12.2m-10.8%205.42h1.35'%20stroke='%23f7b93e'/%3e%3cpath%20d='m14.6%207.87h5.42m-17.6%205.42h6.77m9.48%205.42h4.06m-20.3%202.71h1.35m-1.35%202.71h6.77'%20stroke='%23bf85bf'/%3e%3cpath%20d='m21.4%202.45h8.13m-4.06%202.71h4.06m-2.71%202.71h2.71m-17.6%202.71h4.06m12.2%200h1.35m-17.6%202.71h4.06m12.2%200h1.35m-2.71%202.71h2.71m-4.06%202.71h4.06m-8.13%202.71h2.71m2.71%200h2.71m-17.6%202.71h2.71m2.71%200h12.2m-17.6%202.71h5.42m2.71%200h1.35m2.71%200h5.42m-17.6%202.71h8.13m2.71%200h6.77'%20stroke='%234d616e'%20opacity='.5'/%3e%3c/svg%3e",oh=""+new URL("babel-Dyqlk8mN.svg",import.meta.url).href,tm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%3e%3cdefs%3e%3cradialGradient%20id='a'%20cx='-236.884'%20cy='-171.086'%20r='0.006'%20gradientTransform='matrix(2157.515,%200,%200,%20-2491.283,%20511096.688,%20-426208.482)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2393b4e7'/%3e%3cstop%20offset='0.593'%20stop-color='%23b9d1f8'/%3e%3cstop%20offset='1'%20stop-color='%239cb6e0'/%3e%3c/radialGradient%3e%3c/defs%3e%3ctitle%3efile_type_webpack%3c/title%3e%3cpath%20d='M16,2.043,3.9,9.032V23.011L16,30l12.106-6.989V9.032Z'%20style='fill:url(%23a)'/%3e%3cpath%20d='M16,9.133,10,12.6v6.932L16,23l6-3.466V12.6Z'%20style='fill:%236f95db'/%3e%3cpath%20d='M16,2,3.869,9.037,16,15.642,28.131,9.08Zm0,14.548L3.869,22.981,16,29.974l12.088-7.037L16,16.548Z'%20style='fill:%23fff;fill-opacity:0.100000001490116'/%3e%3c/svg%3e",rm=""+new URL("gulp-BUg8jesr.svg",import.meta.url).href,ah=""+new URL("docker-CILJA9EV.svg",import.meta.url).href,Wl="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_git%3c/title%3e%3cpath%20d='M29.472,14.753,17.247,2.528a1.8,1.8,0,0,0-2.55,0L12.158,5.067l3.22,3.22a2.141,2.141,0,0,1,2.712,2.73l3.1,3.1a2.143,2.143,0,1,1-1.285,1.21l-2.895-2.895v7.617a2.141,2.141,0,1,1-1.764-.062V12.3a2.146,2.146,0,0,1-1.165-2.814L10.911,6.314,2.528,14.7a1.8,1.8,0,0,0,0,2.551L14.753,29.472a1.8,1.8,0,0,0,2.55,0L29.472,17.3a1.8,1.8,0,0,0,0-2.551'%20style='fill:%23dd4c35'/%3e%3cpath%20d='M12.158,5.067l3.22,3.22a2.141,2.141,0,0,1,2.712,2.73l3.1,3.1a2.143,2.143,0,1,1-1.285,1.21l-2.895-2.895v7.617a2.141,2.141,0,1,1-1.764-.062V12.3a2.146,2.146,0,0,1-1.165-2.814L10.911,6.314'%20style='fill:%23fff'/%3e%3c/svg%3e",lh=""+new URL("license-C5slmVrE.svg",import.meta.url).href,iA="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3ctitle%3efile_type_test%3c/title%3e%3cpath%20d='M26.4,24.383c-2.306-.538-3.109-3.31-1.771-6.111a11.927,11.927,0,0,1,2.956-3.706L28,14.221l.012.475a8.972,8.972,0,0,0,1,3.233,18.789,18.789,0,0,1,.833,2.175,4.255,4.255,0,0,1-.1,2.611,3.561,3.561,0,0,1-1.488,1.45A3.726,3.726,0,0,1,26.4,24.383Zm.468-4.753c.166-.191.207-.443.218-1.335l.014-1.1-.269.211a2.238,2.238,0,0,0-.846,1.867c.093.285.382.6.548.594A.686.686,0,0,0,26.869,19.631Z'%20style='fill:%23b70b0b'/%3e%3cpath%20d='M6.165,29.08A5.136,5.136,0,0,1,2.124,23c.339-1.427.269-1.344,7.635-9.049L16.7,6.691l.984.938.984.938-4,4.176-4,4.176,3.345-.072,3.345-.072,2.364-2.466,2.364-2.466.98.943.98.943-6.951,7.24c-6.377,6.642-7.009,7.269-7.657,7.59a5.185,5.185,0,0,1-3.27.524Zm19.55-16.646c-.183-.11-2.061-1.862-4.173-3.895L17.7,4.844l-.012-.561a1.15,1.15,0,0,1,.259-.9,1.32,1.32,0,0,1,1.385-.494,91.788,91.788,0,0,1,8.37,8.031,1.339,1.339,0,0,1-1.99,1.511Z'%20style='fill:%23b70b0b'/%3e%3cpath%20d='M4.1,23.621c-.353,2.277.959,3.823,3.439,3.486.255-.268,3.21-3.353,9.849-10.316-3.34.072-3.3-.074-6.641,0C4.066,23.717,3.933,23.667,4.1,23.621Z'%20style='fill:%23b70b0b'/%3e%3c/svg%3e",sA={display:"inline-block",verticalAlign:"middle",flexShrink:0},oA={js:th,mjs:th,cjs:th,jsx:ML,ts:rh,mts:rh,cts:rh,tsx:PL,vue:FL,html:K0,htm:K0,css:HL,scss:jL,sass:$L,less:VL,json:nh,jsonc:nh,json5:nh,yaml:q0,yml:q0,xml:zL,toml:UL,ini:WL,env:GL,sql:KL,md:X0,mdx:X0,sh:Vl,bash:Vl,zsh:Vl,fish:Vl,py:qL,go:XL,rs:ZL,java:YL,kt:Z0,kts:Z0,swift:JL,rb:QL,dart:eA,c:Po,h:Po,cpp:Po,cc:Po,hpp:Po,cs:tA,svg:rA,png:Ni,jpg:Ni,jpeg:Ni,gif:Ni,webp:Ni,ico:Ni,bmp:Ni,mp3:zl,wav:zl,ogg:zl,flac:zl,mp4:Fo,webm:Fo,mov:Fo,mkv:Fo,avi:Fo,woff:Ho,woff2:Ho,ttf:Ho,otf:Ho,eot:Ho,zip:jo,tar:jo,gz:jo,rar:jo,"7z":jo,pdf:nA,xls:Y0,xlsx:Y0,doc:J0,docx:J0,ppt:Q0,pptx:Q0},aA={"package.json":ih,"package-lock.json":ih,".npmrc":ih,".nvmrc":em,".node-version":em,"tsconfig.json":sh,"tsconfig.app.json":sh,"tsconfig.node.json":sh,".eslintrc":Ii,".eslintrc.js":Ii,".eslintrc.cjs":Ii,".eslintrc.json":Ii,"eslint.config.js":Ii,"eslint.config.mjs":Ii,"eslint.config.ts":Ii,".prettierrc":Ul,".prettierrc.js":Ul,".prettierrc.json":Ul,"prettier.config.js":Ul,".babelrc":oh,".babelrc.js":oh,"babel.config.js":oh,"webpack.config.js":tm,"webpack.config.ts":tm,"gulpfile.js":rm,"gulpfile.ts":rm,dockerfile:ah,"docker-compose.yml":ah,"docker-compose.yaml":ah,".gitignore":Wl,".gitattributes":Wl,".gitmodules":Wl,".gitkeep":Wl,license:lh,"license.md":lh,"license.txt":lh};function lA(r){return/\.(test|spec)\.(js|jsx|ts|tsx|mjs|cjs)$/i.test(r)}function cA(r){const e=r.toLowerCase(),t=aA[e];if(t)return t;if(lA(e))return iA;const n=e.includes(".")?e.split(".").pop():"";return oA[n]??Wy}function Lg({src:r,size:e=16,className:t,style:n,...i}){return M.jsx("img",{src:r,width:e,height:e,className:t,style:{...sA,...n},alt:"","aria-hidden":"true",draggable:!1,...i})}function Gy(r={}){return M.jsx(Lg,{src:Wy,...r})}function vl(r={}){return M.jsx(Lg,{src:BL,...r})}function dA({name:r,...e}){const t=(r.toLowerCase().split(".").pop()??"").replace(/[^a-z0-9]/g,"");return M.jsx(Lg,{src:cA(r),"data-ext":t,...e})}const uA={close:{d:"M3.5 3.5l9 9M12.5 3.5l-9 9",stroke:!0},edit:{d:"M11.5 2.5l2 2-7.5 7.5H4v-2zM10.5 3.5l2 2",stroke:!0},trash:{d:"M3.5 4.5h9M6 4.5V3a1 1 0 011-1h2a1 1 0 011 1v1.5M5 4.5l.7 8.2a1 1 0 001 .8h2.6a1 1 0 001-.8l.7-8.2M6.8 7v4M9.2 7v4",stroke:!0},refresh:{d:"M13 8a5 5 0 1 1-1.5-3.5M13 2v3h-3",stroke:!0},search:{d:"M7 2.5a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9zM10.5 10.5l3 3",stroke:!0},package:{d:"M2.5 5L8 2l5.5 3v6L8 14 2.5 11zM2.5 5L8 8M13.5 5L8 8M8 8v6",stroke:!0},warning:{d:"M8 2.5l6 11H2zM8 6.5v3M8 11.2v.6",stroke:!0},info:{d:"M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2zM8 7v4M8 4.8v.4",stroke:!0},check:{d:"M3 8.5l3 3 7-7",stroke:!0},sun:{d:"M8 5a3 3 0 1 0 0 6 3 3 0 0 0 0-6zM8 1.5v1.5M8 13v1.5M1.5 8h1.5M13 8h1.5M3.3 3.3l1 1M11.7 11.7l1 1M3.3 12.7l1-1M11.7 4.3l1-1",stroke:!0},moon:{d:"M13.5 10.2A5.5 5.5 0 1 1 5.8 2.5a4.5 4.5 0 0 0 7.7 7.7z",stroke:!0},fullscreen:{d:"M2.5 6V2.5H6M14 6V2.5H10M2.5 10v3.5H6M14 10v3.5H10",stroke:!0},"fullscreen-exit":{d:"M6 2.5V6H2.5M10 2.5V6H13.5M6 13.5V10H2.5M10 13.5V10H13.5",stroke:!0},replace:{d:"M3 5h7l-2-2M13 11H6l2 2",stroke:!0},kebab:{d:"M3.5 8a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7 8a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM10.5 8a1 1 0 1 1 2 0 1 1 0 0 1-2 0z"},add:{d:"M8 3v10M3 8h10",stroke:!0},play:{d:"M4 3l9 5-9 5z"},link:{d:"M6.5 9.5a2.5 2.5 0 0 1 0-3.5l2-2a2.5 2.5 0 0 1 3.5 3.5l-1 1M9.5 6.5a2.5 2.5 0 0 1 0 3.5l-2 2a2.5 2.5 0 0 1-3.5-3.5l1-1",stroke:!0},share:{d:"M9 2.5h4.5V7M13 3l-6 6M11 9v3.5H3V4.5h3.5",stroke:!0},history:{d:"M8 2.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11zM8 5v3.5l2 1.5",stroke:!0},rocket:{d:"M11 3l2 2-5 5-3-3zM3 13l1.5-1.5M5 11l-2 2M9 7l-1 1",stroke:!0},"arrow-up-right":{d:"M5 11l6-6M6 5h5v5",stroke:!0},"arrow-up":{d:"M8 12V4M5 7l3-3 3 3",stroke:!0},"arrow-down":{d:"M8 4v8M5 9l3 3 3-3",stroke:!0}};function be({name:r,size:e=16,className:t,style:n,...i}){const s=uA[r],a=i["aria-label"]==null,o=s.stroke?"none":"currentColor",l=s.stroke?"currentColor":"none";return M.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 16 16",fill:o,stroke:l,strokeWidth:s.stroke?1.4:0,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":a?!0:i["aria-hidden"],"aria-label":i["aria-label"],role:a?void 0:"img",style:{display:"inline-block",verticalAlign:"-0.15em",flexShrink:0,...n},children:M.jsx("path",{d:s.d})})}const hA="_backdrop_a035n_6",fA="_modal_a035n_17",pA="_header_a035n_31",gA="_title_a035n_39",mA="_closeBtn_a035n_45",vA="_body_a035n_61",_A="_message_a035n_68",yA="_input_a035n_77",bA="_error_a035n_98",wA="_actions_a035n_106",SA="_btn_a035n_114",CA="_btnPrimary_a035n_133",EA="_btnDanger_a035n_143",rr={backdrop:hA,modal:fA,header:pA,title:gA,closeBtn:mA,body:vA,message:_A,input:yA,error:bA,actions:wA,btn:SA,btnPrimary:CA,btnDanger:EA},If=new Set;let si=null;function Ky(){for(const r of If)r(si)}function qy(r){si&&(si.kind==="confirm"?si.resolve(!1):si.resolve(null)),si=r,Ky()}function xA(){si=null,Ky()}function Xy(r){return new Promise(e=>{qy({kind:"confirm",opts:r,resolve:e})})}function Gl(r){return new Promise(e=>{qy({kind:"prompt",opts:r,resolve:e})})}function nm(){const[r,e]=j.useState(si);return j.useEffect(()=>{const t=n=>e(n);return If.add(t),()=>{If.delete(t)}},[]),r?M.jsx(TA,{req:r,onClose:xA},Date.now()):null}function TA({req:r,onClose:e}){const t=j.useRef(null),n=j.useRef(null),[i,s]=j.useState(r.kind==="prompt"?r.opts.defaultValue??"":""),[a,o]=j.useState(null);j.useEffect(()=>{var b;if(r.kind==="prompt"){const p=t.current;if(!p)return;p.focus(),p.select()}else(b=n.current)==null||b.focus()},[r]);function l(){r.kind==="confirm"?r.resolve(!1):r.resolve(null),e()}function c(){var f,h;if(r.kind==="confirm"){r.resolve(!0),e();return}const b=i,p=((h=(f=r.opts).validate)==null?void 0:h.call(f,b))??null;if(p){o(p);return}r.resolve(b),e()}function u(b){b.key==="Escape"?(b.preventDefault(),l()):b.key==="Enter"&&r.kind==="prompt"&&(b.preventDefault(),c())}const d=r.kind==="prompt",g=r.opts.confirmLabel??(d?"OK":"Confirm"),_=r.opts.cancelLabel??"Cancel",y=r.kind==="confirm"&&r.opts.danger===!0;return M.jsx("div",{className:rr.backdrop,onClick:l,children:M.jsxs("div",{ref:n,className:rr.modal,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title",tabIndex:-1,onClick:b=>b.stopPropagation(),onKeyDown:u,children:[M.jsxs("div",{className:rr.header,children:[M.jsx("span",{className:rr.title,id:"dialog-title",children:r.opts.title}),M.jsx("button",{className:rr.closeBtn,onClick:l,title:"Close (Esc)","aria-label":"Close dialog",children:M.jsx(be,{name:"close"})})]}),M.jsxs("div",{className:rr.body,children:[r.opts.message&&M.jsx("p",{className:rr.message,children:r.opts.message}),d&&M.jsxs(M.Fragment,{children:[M.jsx("input",{ref:t,className:rr.input,value:i,placeholder:r.opts.placeholder,onChange:b=>{s(b.target.value),a&&o(null)},"aria-label":r.opts.title,"aria-invalid":a!=null}),a&&M.jsxs("div",{className:rr.error,role:"alert",children:[M.jsx(be,{name:"warning",size:12})," ",a]})]})]}),M.jsxs("div",{className:rr.actions,children:[M.jsx("button",{className:rr.btn,onClick:l,children:_}),M.jsx("button",{className:`${rr.btn} ${rr.btnPrimary} ${y?rr.btnDanger:""}`,onClick:c,autoFocus:!d,children:g})]})]})})}function kA(r){const e=[];for(const n of r){const i=n.split("/");let s=e;for(let a=0;a<i.length;a++){const o=i[a],l=a===i.length-1,c=s.find(u=>u.name===o);if(c)s=c.children;else{const u={name:o,path:i.slice(0,a+1).join("/"),isDir:!l,children:[]};s.push(u),s=u.children}}}const t=n=>n.sort((i,s)=>i.isDir!==s.isDir?i.isDir?-1:1:i.name.localeCompare(s.name)).map(i=>({...i,children:t(i.children)}));return t(e)}function Zy(r){return r===".gitkeep"}function Yy(r,e){const t=[];for(const n of r)!n.isDir&&Zy(n.name)||(t.push(n),n.isDir&&!e.has(n.path)&&t.push(...Yy(n.children,e)));return t}function LA({name:r}){return M.jsx("span",{className:Ce.icon,children:M.jsx(dA,{name:r})})}function AA({menu:r,onNewFile:e,onNewFolder:t,onRename:n,onDelete:i,onClose:s,disabled:a}){const o=j.useRef(null);return j.useEffect(()=>{const l=()=>s();return document.addEventListener("click",l),()=>document.removeEventListener("click",l)},[s]),M.jsxs("div",{ref:o,className:Ce.contextMenu,style:{top:r.y,left:r.x},onClick:l=>l.stopPropagation(),children:[M.jsxs("button",{className:`${Ce.contextItem} ${a?Ce.contextItemDisabled:""}`,onClick:()=>{a||(e(),s())},disabled:a,title:a?"Project is initializing. Please wait...":void 0,children:[M.jsx(Gy,{})," New File"]}),M.jsxs("button",{className:`${Ce.contextItem} ${a?Ce.contextItemDisabled:""}`,onClick:()=>{a||(t(),s())},disabled:a,title:a?"Project is initializing. Please wait...":void 0,children:[M.jsx(vl,{})," New Folder"]}),n&&M.jsxs("button",{className:`${Ce.contextItem} ${a?Ce.contextItemDisabled:""}`,onClick:()=>{a||(n(),s())},disabled:a,title:a?"Project is initializing. Please wait...":void 0,children:[M.jsx(be,{name:"edit"})," Rename"]}),i&&M.jsxs(M.Fragment,{children:[M.jsx("div",{className:Ce.contextDivider}),M.jsxs("button",{className:`${Ce.contextItem} ${Ce.contextItemDanger} ${a?Ce.contextItemDisabled:""}`,onClick:()=>{a||(i(),s())},disabled:a,title:a?"Project is initializing. Please wait...":void 0,children:[M.jsx(be,{name:"trash"})," Delete"]})]})]})}function im({initialValue:r,onCommit:e,onCancel:t}){const[n,i]=j.useState(r),s=j.useRef(null);j.useEffect(()=>{const o=s.current;if(!o)return;o.focus();const l=r.lastIndexOf(".");l>0?o.setSelectionRange(0,l):o.select()},[r]);const a=()=>{const o=n.trim();!o||o===r?t():e(o)};return M.jsx("input",{ref:s,className:Ce.renameInput,value:n,onChange:o=>i(o.target.value),onClick:o=>o.stopPropagation(),onKeyDown:o=>{o.stopPropagation(),o.key==="Enter"?(o.preventDefault(),a()):o.key==="Escape"&&(o.preventDefault(),t())},onBlur:a,"aria-label":"Rename"})}function Jy({node:r,selectedFile:e,focusedPath:t,depth:n,closedFolders:i,renamingPath:s,onSelect:a,onToggleFolder:o,onContextMenu:l,onRenameCommit:c,onRenameCancel:u}){const d=!i.has(r.path),g=t===r.path,_=s===r.path;return!r.isDir&&Zy(r.name)?null:r.isDir?M.jsxs("div",{children:[M.jsxs("div",{className:`${Ce.dirRow} ${g?Ce.focused:""}`,style:{paddingLeft:`${n*12+8}px`},onClick:()=>o(r.path),onContextMenu:y=>{y.preventDefault(),y.stopPropagation(),l(y,r)},children:[M.jsx("span",{className:Ce.arrow,children:d?"▾":"▸"}),M.jsx("span",{className:Ce.dirIcon,children:M.jsx(vl,{})}),_?M.jsx(im,{initialValue:r.name,onCommit:y=>c(r.path,y),onCancel:u}):M.jsx("span",{className:Ce.name,children:r.name})]}),d&&M.jsx("div",{children:r.children.map(y=>M.jsx(Jy,{node:y,selectedFile:e,focusedPath:t,depth:n+1,closedFolders:i,renamingPath:s,onSelect:a,onToggleFolder:o,onContextMenu:l,onRenameCommit:c,onRenameCancel:u},y.path))})]}):M.jsxs("div",{className:`${Ce.fileRow} ${e===r.path?Ce.selected:""} ${g?Ce.focused:""}`,style:{paddingLeft:`${n*12+8}px`},onClick:()=>{_||a(r.path)},onContextMenu:y=>{y.preventDefault(),y.stopPropagation(),l(y,r)},children:[M.jsx(LA,{name:r.name}),_?M.jsx(im,{initialValue:r.name,onCommit:y=>c(r.path,y),onCancel:u}):M.jsx("span",{className:Ce.name,children:r.name})]})}function RA({files:r,selectedFile:e,onSelect:t,onNewFile:n,onNewFolder:i,onRename:s,onDelete:a,onFileDrop:o,disabled:l}){const c=kA(r),[u,d]=j.useState(new Set),[g,_]=j.useState(null),[y,b]=j.useState(null),[p,f]=j.useState(!1),[h,m]=j.useState(!1),[v,w]=j.useState(null),C=j.useRef(null),E=R=>{w(R),b(null)},S=(R,O)=>{w(null),s(R,O)},x=()=>{w(null)},L=async R=>{await Xy({title:R.isDir?"Delete folder":"Delete file",message:`Delete "${R.name}"?
|
|
101
|
+
|
|
102
|
+
This cannot be undone.`,confirmLabel:"Delete",danger:!0})&&a(R.path)},P=R=>{d(O=>{const I=new Set(O);return I.has(R)?I.delete(R):I.add(R),I})},A=(R,O)=>{b({x:R.clientX,y:R.clientY,node:O})},k=R=>{R.preventDefault(),b({x:R.clientX,y:R.clientY,node:null})},B=y!=null&&y.node?y.node.isDir?y.node.path:y.node.path.includes("/")?y.node.path.substring(0,y.node.path.lastIndexOf("/")):"":"";j.useEffect(()=>{if(!p)return;const R=()=>f(!1);return document.addEventListener("click",R),()=>document.removeEventListener("click",R)},[p]);const N=R=>{var $,V;if(y||p){R.key==="Escape"&&(b(null),f(!1));return}const O=Yy(c,u);if(O.length===0)return;const I=g?O.findIndex(U=>U.path===g):-1;switch(R.key){case"ArrowDown":{R.preventDefault();const U=Math.min(I+1,O.length-1);_((($=O[U])==null?void 0:$.path)??null);break}case"ArrowUp":{R.preventDefault();const U=I<=0?0:I-1;_(((V=O[U])==null?void 0:V.path)??null);break}case"Enter":{if(R.preventDefault(),!g)break;const U=O.find(G=>G.path===g);if(!U)break;U.isDir?P(U.path):t(U.path);break}case"F2":{if(R.preventDefault(),l)return;if(!g)break;const U=O.find(G=>G.path===g);if(!U)break;E(U.path);break}case"Delete":case"Backspace":{if(R.preventDefault(),l)return;if(!g)break;const U=O.find(G=>G.path===g);if(!U)break;L(U);break}case"Escape":{_(null);break}}},F=R=>{if(!o)return;Array.from(R.dataTransfer.items).some(I=>I.kind==="file")&&(R.preventDefault(),m(!0))},H=()=>{m(!1)},T=async R=>{if(R.preventDefault(),m(!1),l){console.warn("[FileTree] Drop rejected: project is initializing");return}if(!o)return;const O=[],I=[];for(let $=0;$<R.dataTransfer.items.length;$++){const V=R.dataTransfer.items[$];if(V.kind==="file"){const U=V.webkitGetAsEntry();if(U)O.push(U);else{const G=V.getAsFile();G&&I.push(G)}}}if(O.length===0&&I.length===0)for(let $=0;$<R.dataTransfer.files.length;$++)I.push(R.dataTransfer.files[$]);console.log("[FileTree] Captured drop data synchronously",{entriesCount:O.length,filesCount:I.length});try{const{readDroppedEntries:$,readFilesFromFileList:V}=await Y(async()=>{const{readDroppedEntries:G,readFilesFromFileList:le}=await import("./fileDropUtils-RRUBaLqo.js");return{readDroppedEntries:G,readFilesFromFileList:le}},[],import.meta.url),U=O.length>0?await $(O):await V(I);console.log("[FileTree] Read files from drop",{fileCount:Object.keys(U).length,paths:Object.keys(U)}),Object.keys(U).length>0?(await o(U),console.log("[FileTree] onFileDrop completed successfully")):console.warn("[FileTree] No files were read from drop event")}catch($){console.error("[FileTree] File drop failed:",$)}};return M.jsxs("div",{className:Ce.container,children:[M.jsxs("div",{className:Ce.header,ref:C,children:[M.jsx("span",{children:"EXPLORER"}),M.jsxs("div",{style:{position:"relative"},children:[M.jsx("button",{className:Ce.newFileBtn,onClick:R=>{l||(R.stopPropagation(),f(O=>!O))},title:l?"Project is initializing. Please wait...":"New file / folder",disabled:l,children:"+"}),p&&M.jsxs("div",{className:Ce.headerMenu,children:[M.jsxs("button",{className:`${Ce.contextItem} ${l?Ce.contextItemDisabled:""}`,onClick:()=>{l||(n(),f(!1))},disabled:l,title:l?"Project is initializing. Please wait...":void 0,children:[M.jsx(Gy,{})," New File"]}),M.jsxs("button",{className:`${Ce.contextItem} ${l?Ce.contextItemDisabled:""}`,onClick:()=>{l||(i(),f(!1))},disabled:l,title:l?"Project is initializing. Please wait...":void 0,children:[M.jsx(vl,{})," New Folder"]})]})]})]}),M.jsx("div",{className:`${Ce.tree} ${h?l?Ce.treeDraggingDisabled:Ce.treeDragging:""}`,tabIndex:0,onKeyDown:N,onContextMenu:k,onBlur:()=>_(null),onDragOver:F,onDragLeave:H,onDrop:T,"aria-label":"File explorer",children:c.map(R=>M.jsx(Jy,{node:R,selectedFile:e,focusedPath:g,depth:0,closedFolders:u,renamingPath:v,onSelect:t,onToggleFolder:P,onContextMenu:A,onRenameCommit:S,onRenameCancel:x},R.path))}),y&&M.jsx(AA,{menu:y,onNewFile:()=>n(B),onNewFolder:()=>i(B),onRename:y.node?()=>E(y.node.path):void 0,onDelete:y.node?()=>void L(y.node):void 0,onClose:()=>b(null),disabled:l})]})}const OA="_wrapper_1xc8z_1",DA="_wrapperFullscreen_1xc8z_8",NA="_toolbar_1xc8z_15",IA="_label_1xc8z_25",BA="_frame_1xc8z_33",MA="_progressBar_1xc8z_39",PA="_iframe_1xc8z_51",FA="_loading_1xc8z_57",HA="_placeholder_1xc8z_58",jA="_spinner_1xc8z_69",$A="_addressBar_1xc8z_84",VA="_navBtn_1xc8z_101",zA="_themeBtn_1xc8z_116",UA="_themeBtnActive_1xc8z_130",Pt={wrapper:OA,wrapperFullscreen:DA,toolbar:NA,label:IA,frame:BA,progressBar:MA,iframe:PA,loading:FA,placeholder:HA,spinner:jA,addressBar:$A,navBtn:VA,themeBtn:zA,themeBtnActive:UA};function WA({url:r,loading:e,pointerEventsDisabled:t=!1}){const i=ou()==="dark",[s,a]=j.useState(!1),[o,l]=j.useState(r),[c,u]=j.useState(r??""),[d,g]=j.useState("idle"),_=j.useRef(null),y=j.useRef(null);j.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]);function b(){y.current&&clearTimeout(y.current),g("loading")}function p(){g("done"),y.current=setTimeout(()=>g("idle"),700)}j.useEffect(()=>{r&&(l(r),u(r),b())},[r]);function f(){var C,E;try{const S=(E=(C=_.current)==null?void 0:C.contentWindow)==null?void 0:E.location.href;S&&u(S)}catch{}p()}function h(C){const E=C.trim();if(!E)return;let S=E;E.startsWith("/")&&r&&(S=new URL(r).origin+E),b(),l(S),u(S)}function m(C){C.key==="Enter"&&h(c)}function v(){_.current&&o&&(b(),_.current.src=o)}const w=d==="loading"?{width:"85%",opacity:1,transition:"width 2.5s cubic-bezier(0.1, 0.05, 0, 1)"}:d==="done"?{width:"100%",opacity:0,transition:"width 0.2s ease-out, opacity 0.5s ease-out 0.15s"}:{width:0,opacity:0};return M.jsxs("div",{className:`${Pt.wrapper} ${s?Pt.wrapperFullscreen:""}`,children:[M.jsxs("div",{className:Pt.toolbar,children:[M.jsx("span",{className:Pt.label,children:"PREVIEW"}),r&&M.jsxs(M.Fragment,{children:[M.jsx("button",{className:Pt.navBtn,onClick:v,title:"Refresh preview","aria-label":"Refresh preview",children:M.jsx(be,{name:"refresh"})}),M.jsx("input",{className:Pt.addressBar,type:"text",value:c,onChange:C=>u(C.target.value),onKeyDown:m,spellCheck:!1,"aria-label":"Preview URL",placeholder:"Enter URL or path…"})]}),M.jsx("button",{className:`${Pt.themeBtn} ${i?Pt.themeBtnActive:""}`,onClick:()=>Uy(),title:i?"Switch sandbox to light theme":"Switch sandbox to dark theme","aria-label":"Toggle sandbox theme",children:M.jsx(be,{name:i?"sun":"moon"})}),r&&M.jsx("button",{className:`${Pt.themeBtn} ${s?Pt.themeBtnActive:""}`,onClick:()=>a(C=>!C),title:s?"Exit fullscreen":"Expand preview to fullscreen","aria-label":s?"Exit fullscreen":"Enter fullscreen",children:M.jsx(be,{name:s?"fullscreen-exit":"fullscreen"})})]}),M.jsxs("div",{className:Pt.frame,children:[o&&M.jsx("div",{className:Pt.progressBar,style:w,"aria-hidden":"true"}),e&&M.jsxs("div",{className:Pt.loading,children:[M.jsx("div",{className:Pt.spinner}),M.jsx("p",{children:"Starting dev server…"})]}),o&&M.jsx("iframe",{ref:_,src:o,title:"Preview",className:Pt.iframe,style:t?{pointerEvents:"none"}:void 0,allow:"cross-origin-isolated",onLoad:f}),!r&&!e&&M.jsx("div",{className:Pt.placeholder,children:M.jsx("p",{children:"Preview will appear here once the dev server starts."})})]})]})}const GA="_overlay_143wx_1",KA="_modal_143wx_11",qA="_header_143wx_20",XA="_title_143wx_27",ZA="_closeBtn_143wx_33",YA="_grid_143wx_47",JA="_card_143wx_53",QA="_icon_143wx_74",e7="_iconImg_143wx_78",t7="_name_143wx_85",r7="_desc_143wx_91",Kr={overlay:GA,modal:KA,header:qA,title:XA,closeBtn:ZA,grid:YA,card:JA,icon:QA,iconImg:e7,name:t7,desc:r7};function Qy({templates:r,onSelect:e,onClose:t}){return M.jsx("div",{className:Kr.overlay,onClick:t,children:M.jsxs("div",{className:Kr.modal,onClick:n=>n.stopPropagation(),children:[M.jsxs("div",{className:Kr.header,children:[M.jsx("h2",{className:Kr.title,children:"Choose a Template"}),M.jsx("button",{className:Kr.closeBtn,onClick:t,"aria-label":"Close",children:M.jsx(be,{name:"close"})})]}),M.jsx("div",{className:Kr.grid,children:r.map(n=>M.jsxs("button",{className:Kr.card,onClick:()=>e(n),children:[n.iconUrl?M.jsx("img",{src:n.iconUrl,alt:n.icon,className:Kr.iconImg,width:36,height:36}):M.jsx("span",{className:Kr.icon,children:n.icon}),M.jsx("span",{className:Kr.name,children:n.name}),M.jsx("span",{className:Kr.desc,children:n.description})]},n.id))})]})})}var sm={},n7=function(r,e,t,n,i){var s=new Worker(sm[e]||(sm[e]=URL.createObjectURL(new Blob([r+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return s.onmessage=function(a){var o=a.data,l=o.$e$;if(l){var c=new Error(l[0]);c.code=l[1],c.stack=l[2],i(c,null)}else i(null,o)},s.postMessage(t,n),s},Ie=Uint8Array,qt=Uint16Array,_l=Int32Array,bo=new Ie([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),wo=new Ie([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),qa=new Ie([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),eb=function(r,e){for(var t=new qt(31),n=0;n<31;++n)t[n]=e+=1<<r[n-1];for(var i=new _l(t[30]),n=1;n<30;++n)for(var s=t[n];s<t[n+1];++s)i[s]=s-t[n]<<5|n;return{b:t,r:i}},tb=eb(bo,2),Ag=tb.b,fd=tb.r;Ag[28]=258,fd[258]=28;var rb=eb(wo,0),nb=rb.b,Bf=rb.r,Xa=new qt(32768);for(var je=0;je<32768;++je){var Yn=(je&43690)>>1|(je&21845)<<1;Yn=(Yn&52428)>>2|(Yn&13107)<<2,Yn=(Yn&61680)>>4|(Yn&3855)<<4,Xa[je]=((Yn&65280)>>8|(Yn&255)<<8)>>1}var Vr=function(r,e,t){for(var n=r.length,i=0,s=new qt(e);i<n;++i)r[i]&&++s[r[i]-1];var a=new qt(e);for(i=1;i<e;++i)a[i]=a[i-1]+s[i-1]<<1;var o;if(t){o=new qt(1<<e);var l=15-e;for(i=0;i<n;++i)if(r[i])for(var c=i<<4|r[i],u=e-r[i],d=a[r[i]-1]++<<u,g=d|(1<<u)-1;d<=g;++d)o[Xa[d]>>l]=c}else for(o=new qt(n),i=0;i<n;++i)r[i]&&(o[i]=Xa[a[r[i]-1]++]>>15-r[i]);return o},Gn=new Ie(288);for(var je=0;je<144;++je)Gn[je]=8;for(var je=144;je<256;++je)Gn[je]=9;for(var je=256;je<280;++je)Gn[je]=7;for(var je=280;je<288;++je)Gn[je]=8;var ho=new Ie(32);for(var je=0;je<32;++je)ho[je]=5;var ib=Vr(Gn,9,0),sb=Vr(Gn,9,1),ob=Vr(ho,5,0),ab=Vr(ho,5,1),bc=function(r){for(var e=r[0],t=1;t<r.length;++t)r[t]>e&&(e=r[t]);return e},Or=function(r,e,t){var n=e/8|0;return(r[n]|r[n+1]<<8)>>(e&7)&t},wc=function(r,e){var t=e/8|0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>(e&7)},yl=function(r){return(r+7)/8|0},Oi=function(r,e,t){return(e==null||e<0)&&(e=0),(t==null||t>r.length)&&(t=r.length),new Ie(r.subarray(e,t))},lb=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],We=function(r,e,t){var n=new Error(e||lb[r]);if(n.code=r,Error.captureStackTrace&&Error.captureStackTrace(n,We),!t)throw n;return n},cb=function(r,e,t,n){var i=r.length,s=n?n.length:0;if(!i||e.f&&!e.l)return t||new Ie(0);var a=!t,o=a||e.i!=2,l=e.i;a&&(t=new Ie(i*3));var c=function(ae){var ee=t.length;if(ae>ee){var me=new Ie(Math.max(ee*2,ae));me.set(t),t=me}},u=e.f||0,d=e.p||0,g=e.b||0,_=e.l,y=e.d,b=e.m,p=e.n,f=i*8;do{if(!_){u=Or(r,d,1);var h=Or(r,d+1,3);if(d+=3,h)if(h==1)_=sb,y=ab,b=9,p=5;else if(h==2){var C=Or(r,d,31)+257,E=Or(r,d+10,15)+4,S=C+Or(r,d+5,31)+1;d+=14;for(var x=new Ie(S),L=new Ie(19),P=0;P<E;++P)L[qa[P]]=Or(r,d+P*3,7);d+=E*3;for(var A=bc(L),k=(1<<A)-1,B=Vr(L,A,1),P=0;P<S;){var N=B[Or(r,d,k)];d+=N&15;var m=N>>4;if(m<16)x[P++]=m;else{var F=0,H=0;for(m==16?(H=3+Or(r,d,3),d+=2,F=x[P-1]):m==17?(H=3+Or(r,d,7),d+=3):m==18&&(H=11+Or(r,d,127),d+=7);H--;)x[P++]=F}}var T=x.subarray(0,C),R=x.subarray(C);b=bc(T),p=bc(R),_=Vr(T,b,1),y=Vr(R,p,1)}else We(1);else{var m=yl(d)+4,v=r[m-4]|r[m-3]<<8,w=m+v;if(w>i){l&&We(0);break}o&&c(g+v),t.set(r.subarray(m,w),g),e.b=g+=v,e.p=d=w*8,e.f=u;continue}if(d>f){l&&We(0);break}}o&&c(g+131072);for(var O=(1<<b)-1,I=(1<<p)-1,$=d;;$=d){var F=_[wc(r,d)&O],V=F>>4;if(d+=F&15,d>f){l&&We(0);break}if(F||We(2),V<256)t[g++]=V;else if(V==256){$=d,_=null;break}else{var U=V-254;if(V>264){var P=V-257,G=bo[P];U=Or(r,d,(1<<G)-1)+Ag[P],d+=G}var le=y[wc(r,d)&I],D=le>>4;le||We(3),d+=le&15;var R=nb[D];if(D>3){var G=wo[D];R+=wc(r,d)&(1<<G)-1,d+=G}if(d>f){l&&We(0);break}o&&c(g+131072);var z=g+U;if(g<R){var K=s-R,W=Math.min(R,z);for(K+g<0&&We(3);g<W;++g)t[g]=n[K+g]}for(;g<z;++g)t[g]=t[g-R]}}e.l=_,e.p=$,e.b=g,e.f=u,_&&(u=1,e.m=b,e.d=y,e.n=p)}while(!u);return g!=t.length&&a?Oi(t,0,g):t.subarray(0,g)},un=function(r,e,t){t<<=e&7;var n=e/8|0;r[n]|=t,r[n+1]|=t>>8},Ss=function(r,e,t){t<<=e&7;var n=e/8|0;r[n]|=t,r[n+1]|=t>>8,r[n+2]|=t>>16},Sc=function(r,e){for(var t=[],n=0;n<r.length;++n)r[n]&&t.push({s:n,f:r[n]});var i=t.length,s=t.slice();if(!i)return{t:Og,l:0};if(i==1){var a=new Ie(t[0].s+1);return a[t[0].s]=1,{t:a,l:1}}t.sort(function(w,C){return w.f-C.f}),t.push({s:-1,f:25001});var o=t[0],l=t[1],c=0,u=1,d=2;for(t[0]={s:-1,f:o.f+l.f,l:o,r:l};u!=i-1;)o=t[t[c].f<t[d].f?c++:d++],l=t[c!=u&&t[c].f<t[d].f?c++:d++],t[u++]={s:-1,f:o.f+l.f,l:o,r:l};for(var g=s[0].s,n=1;n<i;++n)s[n].s>g&&(g=s[n].s);var _=new qt(g+1),y=pd(t[u-1],_,0);if(y>e){var n=0,b=0,p=y-e,f=1<<p;for(s.sort(function(C,E){return _[E.s]-_[C.s]||C.f-E.f});n<i;++n){var h=s[n].s;if(_[h]>e)b+=f-(1<<y-_[h]),_[h]=e;else break}for(b>>=p;b>0;){var m=s[n].s;_[m]<e?b-=1<<e-_[m]++-1:++n}for(;n>=0&&b;--n){var v=s[n].s;_[v]==e&&(--_[v],++b)}y=e}return{t:new Ie(_),l:y}},pd=function(r,e,t){return r.s==-1?Math.max(pd(r.l,e,t+1),pd(r.r,e,t+1)):e[r.s]=t},Mf=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new qt(++e),n=0,i=r[0],s=1,a=function(l){t[n++]=l},o=1;o<=e;++o)if(r[o]==i&&o!=e)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=r[o]}return{c:t.subarray(0,n),n:e}},Cs=function(r,e){for(var t=0,n=0;n<e.length;++n)t+=r[n]*e[n];return t},Rg=function(r,e,t){var n=t.length,i=yl(e+2);r[i]=n&255,r[i+1]=n>>8,r[i+2]=r[i]^255,r[i+3]=r[i+1]^255;for(var s=0;s<n;++s)r[i+s+4]=t[s];return(i+4+n)*8},Pf=function(r,e,t,n,i,s,a,o,l,c,u){un(e,u++,t),++i[256];for(var d=Sc(i,15),g=d.t,_=d.l,y=Sc(s,15),b=y.t,p=y.l,f=Mf(g),h=f.c,m=f.n,v=Mf(b),w=v.c,C=v.n,E=new qt(19),S=0;S<h.length;++S)++E[h[S]&31];for(var S=0;S<w.length;++S)++E[w[S]&31];for(var x=Sc(E,7),L=x.t,P=x.l,A=19;A>4&&!L[qa[A-1]];--A);var k=c+5<<3,B=Cs(i,Gn)+Cs(s,ho)+a,N=Cs(i,g)+Cs(s,b)+a+14+3*A+Cs(E,L)+2*E[16]+3*E[17]+7*E[18];if(l>=0&&k<=B&&k<=N)return Rg(e,u,r.subarray(l,l+c));var F,H,T,R;if(un(e,u,1+(N<B)),u+=2,N<B){F=Vr(g,_,0),H=g,T=Vr(b,p,0),R=b;var O=Vr(L,P,0);un(e,u,m-257),un(e,u+5,C-1),un(e,u+10,A-4),u+=14;for(var S=0;S<A;++S)un(e,u+3*S,L[qa[S]]);u+=3*A;for(var I=[h,w],$=0;$<2;++$)for(var V=I[$],S=0;S<V.length;++S){var U=V[S]&31;un(e,u,O[U]),u+=L[U],U>15&&(un(e,u,V[S]>>5&127),u+=V[S]>>12)}}else F=ib,H=Gn,T=ob,R=ho;for(var S=0;S<o;++S){var G=n[S];if(G>255){var U=G>>18&31;Ss(e,u,F[U+257]),u+=H[U+257],U>7&&(un(e,u,G>>23&31),u+=bo[U]);var le=G&31;Ss(e,u,T[le]),u+=R[le],le>3&&(Ss(e,u,G>>5&8191),u+=wo[le])}else Ss(e,u,F[G]),u+=H[G]}return Ss(e,u,F[256]),u+H[256]},db=new _l([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Og=new Ie(0),ub=function(r,e,t,n,i,s){var a=s.z||r.length,o=new Ie(n+a+5*(1+Math.ceil(a/7e3))+i),l=o.subarray(n,o.length-i),c=s.l,u=(s.r||0)&7;if(e){u&&(l[0]=s.r>>3);for(var d=db[e-1],g=d>>13,_=d&8191,y=(1<<t)-1,b=s.p||new qt(32768),p=s.h||new qt(y+1),f=Math.ceil(t/3),h=2*f,m=function(ot){return(r[ot]^r[ot+1]<<f^r[ot+2]<<h)&y},v=new _l(25e3),w=new qt(288),C=new qt(32),E=0,S=0,x=s.i||0,L=0,P=s.w||0,A=0;x+2<a;++x){var k=m(x),B=x&32767,N=p[k];if(b[B]=N,p[k]=B,P<=x){var F=a-x;if((E>7e3||L>24576)&&(F>423||!c)){u=Pf(r,l,0,v,w,C,S,L,A,x-A,u),L=E=S=0,A=x;for(var H=0;H<286;++H)w[H]=0;for(var H=0;H<30;++H)C[H]=0}var T=2,R=0,O=_,I=B-N&32767;if(F>2&&k==m(x-I))for(var $=Math.min(g,F)-1,V=Math.min(32767,x),U=Math.min(258,F);I<=V&&--O&&B!=N;){if(r[x+T]==r[x+T-I]){for(var G=0;G<U&&r[x+G]==r[x+G-I];++G);if(G>T){if(T=G,R=I,G>$)break;for(var le=Math.min(I,G-2),D=0,H=0;H<le;++H){var z=x-I+H&32767,K=b[z],W=z-K&32767;W>D&&(D=W,N=z)}}}B=N,N=b[B],I+=B-N&32767}if(R){v[L++]=268435456|fd[T]<<18|Bf[R];var ae=fd[T]&31,ee=Bf[R]&31;S+=bo[ae]+wo[ee],++w[257+ae],++C[ee],P=x+T,++E}else v[L++]=r[x],++w[r[x]]}}for(x=Math.max(x,P);x<a;++x)v[L++]=r[x],++w[r[x]];u=Pf(r,l,c,v,w,C,S,L,A,x-A,u),c||(s.r=u&7|l[u/8|0]<<3,u-=7,s.h=p,s.p=b,s.i=x,s.w=P)}else{for(var x=s.w||0;x<a+c;x+=65535){var me=x+65535;me>=a&&(l[u/8|0]=c,me=a),u=Rg(l,u+1,r.subarray(x,me))}s.i=a}return Oi(o,0,n+yl(u)+i)},i7=function(){for(var r=new Int32Array(256),e=0;e<256;++e){for(var t=e,n=9;--n;)t=(t&1&&-306674912)^t>>>1;r[e]=t}return r}(),hb=function(){var r=-1;return{p:function(e){for(var t=r,n=0;n<e.length;++n)t=i7[t&255^e[n]]^t>>>8;r=t},d:function(){return~r}}},fb=function(r,e,t,n,i){if(!i&&(i={l:1},e.dictionary)){var s=e.dictionary.subarray(-32768),a=new Ie(s.length+r.length);a.set(s),a.set(r,s.length),r=a,i.w=s.length}return ub(r,e.level==null?6:e.level,e.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,t,n,i)},au=function(r,e){var t={};for(var n in r)t[n]=r[n];for(var n in e)t[n]=e[n];return t},om=function(r,e,t){for(var n=r(),i=r.toString(),s=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<n.length;++a){var o=n[a],l=s[a];if(typeof o=="function"){e+=";"+l+"=";var c=o.toString();if(o.prototype)if(c.indexOf("[native code]")!=-1){var u=c.indexOf(" ",8)+1;e+=c.slice(u,c.indexOf("(",u))}else{e+=c;for(var d in o.prototype)e+=";"+l+".prototype."+d+"="+o.prototype[d].toString()}else e+=c}else t[l]=o}return e},Kl=[],s7=function(r){var e=[];for(var t in r)r[t].buffer&&e.push((r[t]=new r[t].constructor(r[t])).buffer);return e},o7=function(r,e,t,n){if(!Kl[t]){for(var i="",s={},a=r.length-1,o=0;o<a;++o)i=om(r[o],i,s);Kl[t]={c:om(r[a],i,s),e:s}}var l=au({},Kl[t].e);return n7(Kl[t].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",t,l,s7(l),n)},a7=function(){return[Ie,qt,_l,bo,wo,qa,Ag,nb,sb,ab,Xa,lb,Vr,bc,Or,wc,yl,Oi,We,cb,du,lu,pb]},l7=function(){return[Ie,qt,_l,bo,wo,qa,fd,Bf,ib,Gn,ob,ho,Xa,db,Og,Vr,un,Ss,Sc,pd,Mf,Cs,Rg,Pf,yl,Oi,ub,fb,cu,lu]},lu=function(r){return postMessage(r,[r.buffer])},pb=function(r){return r&&{out:r.size&&new Ie(r.size),dictionary:r.dictionary}},gb=function(r,e,t,n,i,s){var a=o7(t,n,i,function(o,l){a.terminate(),s(o,l)});return a.postMessage([r,e],e.consume?[r.buffer]:[]),function(){a.terminate()}},Jr=function(r,e){return r[e]|r[e+1]<<8},mt=function(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16|r[e+3]<<24)>>>0},ch=function(r,e){return mt(r,e)+mt(r,e+4)*4294967296},Lt=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8};function c7(r,e,t){return t||(t=e,e={}),typeof t!="function"&&We(7),gb(r,e,[l7],function(n){return lu(cu(n.data[0],n.data[1]))},0,t)}function cu(r,e){return fb(r,e||{},0,0)}function d7(r,e,t){return t||(t=e,e={}),typeof t!="function"&&We(7),gb(r,e,[a7],function(n){return lu(du(n.data[0],pb(n.data[1])))},1,t)}function du(r,e){return cb(r,{i:2},e&&e.out,e&&e.dictionary)}var Dg=function(r,e,t,n){for(var i in r){var s=r[i],a=e+i,o=n;Array.isArray(s)&&(o=au(n,s[1]),s=s[0]),ArrayBuffer.isView(s)?t[a]=[s,o]:(t[a+="/"]=[new Ie(0),o],Dg(s,a,t,n))}},am=typeof TextEncoder<"u"&&new TextEncoder,Ff=typeof TextDecoder<"u"&&new TextDecoder,u7=0;try{Ff.decode(Og,{stream:!0}),u7=1}catch{}var h7=function(r){for(var e="",t=0;;){var n=r[t++],i=(n>127)+(n>223)+(n>239);if(t+i>r.length)return{s:e,r:Oi(r,t-1)};i?i==3?(n=((n&15)<<18|(r[t++]&63)<<12|(r[t++]&63)<<6|r[t++]&63)-65536,e+=String.fromCharCode(55296|n>>10,56320|n&1023)):i&1?e+=String.fromCharCode((n&31)<<6|r[t++]&63):e+=String.fromCharCode((n&15)<<12|(r[t++]&63)<<6|r[t++]&63):e+=String.fromCharCode(n)}};function Za(r,e){var t;if(am)return am.encode(r);for(var n=r.length,i=new Ie(r.length+(r.length>>1)),s=0,a=function(c){i[s++]=c},t=0;t<n;++t){if(s+5>i.length){var o=new Ie(s+8+(n-t<<1));o.set(i),i=o}var l=r.charCodeAt(t);l<128||e?a(l):l<2048?(a(192|l>>6),a(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|r.charCodeAt(++t)&1023,a(240|l>>18),a(128|l>>12&63),a(128|l>>6&63),a(128|l&63)):(a(224|l>>12),a(128|l>>6&63),a(128|l&63))}return Oi(i,0,s)}function mb(r,e){if(e){for(var t="",n=0;n<r.length;n+=16384)t+=String.fromCharCode.apply(null,r.subarray(n,n+16384));return t}else{if(Ff)return Ff.decode(r);var i=h7(r),s=i.s,t=i.r;return t.length&&We(8),s}}var vb=function(r,e){return e+30+Jr(r,e+26)+Jr(r,e+28)},_b=function(r,e,t){var n=Jr(r,e+28),i=Jr(r,e+30),s=mb(r.subarray(e+46,e+46+n),!(Jr(r,e+8)&2048)),a=e+46+n,o=f7(r,a,i,t,mt(r,e+20),mt(r,e+24),mt(r,e+42)),l=o[0],c=o[1],u=o[2];return[Jr(r,e+10),l,c,s,a+i+Jr(r,e+32),u]},f7=function(r,e,t,n,i,s,a){var o=i==4294967295,l=s==4294967295,c=a==4294967295,u=e+t,d=o+l+c;if(n&&d){for(;e+4<u;e+=4+Jr(r,e+2))if(Jr(r,e)==1)return[o?ch(r,e+4+8*l):i,l?ch(r,e+4):s,c?ch(r,e+4+8*(l+o)):a,1];n<2&&We(13)}return[i,s,a,0]},Ya=function(r){var e=0;if(r)for(var t in r){var n=r[t].length;n>65535&&We(9),e+=n+4}return e},gd=function(r,e,t,n,i,s,a,o){var l=n.length,c=t.extra,u=o&&o.length,d=Ya(c);Lt(r,e,a!=null?33639248:67324752),e+=4,a!=null&&(r[e++]=20,r[e++]=t.os),r[e]=20,e+=2,r[e++]=t.flag<<1|(s<0&&8),r[e++]=i&&8,r[e++]=t.compression&255,r[e++]=t.compression>>8;var g=new Date(t.mtime==null?Date.now():t.mtime),_=g.getFullYear()-1980;if((_<0||_>119)&&We(10),Lt(r,e,_<<25|g.getMonth()+1<<21|g.getDate()<<16|g.getHours()<<11|g.getMinutes()<<5|g.getSeconds()>>1),e+=4,s!=-1&&(Lt(r,e,t.crc),Lt(r,e+4,s<0?-s-2:s),Lt(r,e+8,t.size)),Lt(r,e+12,l),Lt(r,e+14,d),e+=16,a!=null&&(Lt(r,e,u),Lt(r,e+6,t.attrs),Lt(r,e+10,a),e+=14),r.set(n,e),e+=l,d)for(var y in c){var b=c[y],p=b.length;Lt(r,e,+y),Lt(r,e+2,p),r.set(b,e+4),e+=4+p}return u&&(r.set(o,e),e+=u),e},yb=function(r,e,t,n,i){Lt(r,e,101010256),Lt(r,e+8,t),Lt(r,e+10,t),Lt(r,e+12,n),Lt(r,e+16,i)};function p7(r,e,t){t||(t=e,e={}),typeof t!="function"&&We(7);var n={};Dg(r,"",n,e);var i=Object.keys(n),s=i.length,a=0,o=0,l=s,c=new Array(s),u=[],d=function(){for(var p=0;p<u.length;++p)u[p]()},g=function(p,f){md(function(){t(p,f)})};md(function(){g=t});var _=function(){var p=new Ie(o+22),f=a,h=o-a;o=0;for(var m=0;m<l;++m){var v=c[m];try{var w=v.c.length;gd(p,o,v,v.f,v.u,w);var C=30+v.f.length+Ya(v.extra),E=o+C;p.set(v.c,E),gd(p,a,v,v.f,v.u,w,o,v.m),a+=16+C+(v.m?v.m.length:0),o=E+w}catch(S){return g(S,null)}}yb(p,a,c.length,h,f),g(null,p)};s||_();for(var y=function(p){var f=i[p],h=n[f],m=h[0],v=h[1],w=hb(),C=m.length;w.p(m);var E=Za(f),S=E.length,x=v.comment,L=x&&Za(x),P=L&&L.length,A=Ya(v.extra),k=v.level==0?0:8,B=function(N,F){if(N)d(),g(N,null);else{var H=F.length;c[p]=au(v,{size:C,crc:w.d(),c:F,f:E,m:L,u:S!=f.length||L&&x.length!=P,compression:k}),a+=30+S+A+H,o+=76+2*(S+A)+(P||0)+H,--s||_()}};if(S>65535&&B(We(11,0,1),null),!k)B(null,m);else if(C<16e4)try{B(null,cu(m,v))}catch(N){B(N,null)}else u.push(c7(m,v,B))},b=0;b<l;++b)y(b);return d}function g7(r,e){e||(e={});var t={},n=[];Dg(r,"",t,e);var i=0,s=0;for(var a in t){var o=t[a],l=o[0],c=o[1],u=c.level==0?0:8,d=Za(a),g=d.length,_=c.comment,y=_&&Za(_),b=y&&y.length,p=Ya(c.extra);g>65535&&We(11);var f=u?cu(l,c):l,h=f.length,m=hb();m.p(l),n.push(au(c,{size:l.length,crc:m.d(),c:f,f:d,m:y,u:g!=a.length||y&&_.length!=b,o:i,compression:u})),i+=30+g+p+h,s+=76+2*(g+p)+(b||0)+h}for(var v=new Ie(s+22),w=i,C=s-i,E=0;E<n.length;++E){var d=n[E];gd(v,d.o,d,d.f,d.u,d.c.length);var S=30+d.f.length+Ya(d.extra);v.set(d.c,d.o+S),gd(v,i,d,d.f,d.u,d.c.length,d.o,d.m),i+=16+S+(d.m?d.m.length:0)}return yb(v,i,n.length,C,w),v}var md=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(r){r()};function m7(r,e,t){t||(t=e,e={}),typeof t!="function"&&We(7);var n=[],i=function(){for(var p=0;p<n.length;++p)n[p]()},s={},a=function(p,f){md(function(){t(p,f)})};md(function(){a=t});for(var o=r.length-22;mt(r,o)!=101010256;--o)if(!o||r.length-o>65558)return a(We(13,0,1),null),i;var l=Jr(r,o+8);if(l){var c=l,u=mt(r,o+16),d=mt(r,o-20)==117853008;if(d){var g=mt(r,o-12);d=mt(r,g)==101075792,d&&(c=l=mt(r,g+32),u=mt(r,g+48))}for(var _=e&&e.filter,y=function(p){var f=_b(r,u,d),h=f[0],m=f[1],v=f[2],w=f[3],C=f[4],E=f[5],S=vb(r,E);u=C;var x=function(P,A){P?(i(),a(P,null)):(A&&(s[w]=A),--l||a(null,s))};if(!_||_({name:w,size:m,originalSize:v,compression:h}))if(!h)x(null,Oi(r,S,S+m));else if(h==8){var L=r.subarray(S,S+m);if(v<524288||m>.8*v)try{x(null,du(L,{out:new Ie(v)}))}catch(P){x(P,null)}else n.push(d7(L,{size:v},x))}else x(We(14,"unknown compression type "+h,1),null);else x(null,null)},b=0;b<c;++b)y(b)}else a(null,{});return i}function v7(r,e){for(var t={},n=r.length-22;mt(r,n)!=101010256;--n)(!n||r.length-n>65558)&&We(13);var i=Jr(r,n+8);if(!i)return{};var s=mt(r,n+16),a=mt(r,n-20)==117853008;if(a){var o=mt(r,n-12);a=mt(r,o)==101075792,a&&(i=mt(r,o+32),s=mt(r,o+48))}for(var l=0;l<i;++l){var c=_b(r,s,a),u=c[0],d=c[1],g=c[2],_=c[3],y=c[4],b=c[5],p=vb(r,b);s=y,u?u==8?t[_]=du(r.subarray(p,p+d),{out:new Ie(g)}):We(14,"unknown compression type "+u):t[_]=Oi(r,p,p+d)}return t}const Ng="vega-sandbox-nm-v1.zip",Ig="vega-sandbox-nm-v1-meta.json",lm=50;async function _7(r){const e=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(r));return Array.from(new Uint8Array(e)).map(t=>t.toString(16).padStart(2,"0")).join("").slice(0,16)}async function Bg(){try{return await navigator.storage.getDirectory()}catch{return null}}async function y7(r){try{const t=await(await(await r.getFileHandle(Ig)).getFile()).text();return JSON.parse(t)}catch{return null}}async function bb(r,e){const t=await r.fs.readdir(e,{withFileTypes:!0}),n=[];for(const i of t){const s=`${e}/${i.name}`;i.isDirectory()?n.push(...await bb(r,s)):n.push(s)}return n}function b7(r){const e={};for(const[t,n]of Object.entries(r)){const i=t.split("/");let s=e;for(let a=0;a<i.length-1;a++){const o=i[a];o in s||(s[o]={directory:{}}),s=s[o].directory}s[i[i.length-1]]={file:{contents:n}}}return e}async function w7(r){const e={},t=[],n=async i=>{try{const s=await r.fs.readFile(`${i}/package.json`,"utf-8"),a=JSON.parse(s);if(!a.bin)return;const o=typeof a.bin=="string"?{[a.name??i.split("/").pop()??i]:a.bin}:a.bin,l=i.replace(/^node_modules\//,"");for(const[c,u]of Object.entries(o)){const d=`../${l}/${u.replace(/^\.\//,"")}`;e[c]={file:{symlink:d}},t.push(`${i}/${u.replace(/^\.\//,"")}`)}}catch{}};try{const i=await r.fs.readdir("node_modules");for(const s of i)if(s!==".bin")if(s.startsWith("@"))try{const a=await r.fs.readdir(`node_modules/${s}`);for(const o of a)await n(`node_modules/${s}/${o}`)}catch{}else await n(`node_modules/${s}`)}catch{return[]}return Object.keys(e).length===0?[]:(await r.mount({node_modules:{directory:{".bin":{directory:e}}}}),t)}async function S7(r,e,t){var s;const n=await Bg();if(!n)return!1;const i=await y7(n);if(!i||i.hash!==e)return!1;try{t==null||t(`\r
|
|
103
|
+
\x1B[36m♻ Restoring node_modules from cache...\x1B[0m\r
|
|
104
|
+
`);const a=await n.getFileHandle(Ng);let o=new Uint8Array(await(await a.getFile()).arrayBuffer());const l=await new Promise((g,_)=>{m7(o,(y,b)=>{y?_(y):g(b)})});o=new Uint8Array(0);const c=Object.keys(l).length;t==null||t(`\x1B[36m♻ Mounting ${c} cached files...\x1B[0m\r
|
|
105
|
+
`);const u={};for(const[g,_]of Object.entries(l)){const y=g.split("/"),b=y[0]==="node_modules"&&((s=y[1])!=null&&s.startsWith("@"))?`${y[1]}/${y[2]??""}`:y[1]??y[0];u[b]||(u[b]={}),u[b][g]=_}for(const g of Object.values(u))await r.mount(b7(g));const d=await w7(r);try{if(d.length>0)for(let _=0;_<d.length;_+=50){const y=d.slice(_,_+50);await(await r.spawn("chmod",["+x",...y])).exit}}catch{}return t==null||t(`\x1B[32m✔ node_modules restored from cache\x1B[0m\r
|
|
106
|
+
`),!0}catch(a){console.warn("[nodeModulesCache] Restore failed:",a);try{await r.fs.rm("node_modules",{recursive:!0})}catch{}return!1}}async function C7(r,e,t){const n=await Bg();if(n)try{t==null||t(`\r
|
|
107
|
+
\x1B[2m💾 Caching node_modules for next load...\x1B[0m\r
|
|
108
|
+
`);const i=await bb(r,"node_modules");t==null||t(`\x1B[2m💾 Reading ${i.length} files...\x1B[0m\r
|
|
109
|
+
`);const s={};for(let _=0;_<i.length;_+=lm){const y=i.slice(_,_+lm),b=await Promise.all(y.map(async p=>({p,data:await r.fs.readFile(p)})));for(const{p,data:f}of b)s[p]=f}t==null||t(`\x1B[2m💾 Compressing...\x1B[0m\r
|
|
110
|
+
`);const a=await new Promise((_,y)=>{p7(s,{level:6},(b,p)=>{b?y(b):_(p)})}),l=await(await n.getFileHandle(Ng,{create:!0})).createWritable();await l.write(new Blob([new Uint8Array(a)])),await l.close();const u=await(await n.getFileHandle(Ig,{create:!0})).createWritable(),d={hash:e,savedAt:Date.now()};await u.write(JSON.stringify(d)),await u.close();const g=(a.length/1024/1024).toFixed(1);t==null||t(`\x1B[2m✔ node_modules cached (${g} MB) — future loads will skip npm install\x1B[0m\r
|
|
111
|
+
`)}catch(i){console.warn("[nodeModulesCache] Save failed:",i)}}async function E7(){const r=await Bg();if(r)try{try{await r.removeEntry(Ng)}catch{}try{await r.removeEntry(Ig)}catch{}}catch(e){console.warn("[nodeModulesCache] Clear failed:",e)}}const wb="vega-sandbox-projects",vd="vega-sandbox-current",Mg="vega-sandbox-project-";function x7(){return Date.now().toString(36)+Math.random().toString(36).slice(2,8)}function Ti(){try{const r=localStorage.getItem(wb);return r?JSON.parse(r):[]}catch{return[]}}function Sb(r){try{localStorage.setItem(wb,JSON.stringify(r))}catch{}}function _r(r){const e=Date.now(),t=r.id??x7(),n={...r,id:t,createdAt:r.createdAt??e,updatedAt:e};try{localStorage.setItem(Mg+t,JSON.stringify(n))}catch{}const i=Ti(),s=i.findIndex(o=>o.id===t),a={id:t,name:n.name,createdAt:n.createdAt,updatedAt:e};return s>=0?i[s]=a:i.unshift(a),Sb(i),n}function Cb(r){try{const e=localStorage.getItem(Mg+r);return e?JSON.parse(e):null}catch{return null}}function T7(r){localStorage.removeItem(Mg+r);const e=Ti().filter(t=>t.id!==r);Sb(e),localStorage.getItem(vd)===r&&localStorage.removeItem(vd),E7()}function k7(r){return Ti().some(e=>e.id===r)}function L7(r,e){const t=Cb(r);t&&_r({...t,name:e})}function A7(){return localStorage.getItem(vd)}function dh(r){localStorage.setItem(vd,r)}function Eb(){const r="vega-sandbox-state",e=localStorage.getItem(r);if(!e)return null;try{const t=JSON.parse(e),n=_r({...t,name:"Restored Project"});return localStorage.removeItem(r),n}catch{return null}}const Pg="vega-sandbox-tab-",R7=4e3,xb=12e3,Tb="vega-sandbox-focus";function cm(r){return Pg+r}function O7(){return Date.now().toString(36)+Math.random().toString(36).slice(2,8)}function D7(r){const e=O7(),t=()=>{try{localStorage.setItem(cm(e),JSON.stringify({tabId:e,projectId:r,ts:Date.now()}))}catch{}};t();const n=window.setInterval(t,R7),i=()=>{try{localStorage.removeItem(cm(e))}catch{}},s=()=>i();return window.addEventListener("beforeunload",s),window.addEventListener("pagehide",s),{tabId:e,dispose:()=>{window.clearInterval(n),window.removeEventListener("beforeunload",s),window.removeEventListener("pagehide",s),i()}}}function N7(){const r=Date.now(),e=[],t=[];for(let n=0;n<localStorage.length;n++){const i=localStorage.key(n);if(!(!i||!i.startsWith(Pg)))try{const s=localStorage.getItem(i);if(!s)continue;const a=JSON.parse(s);if(typeof a.projectId!="string"||typeof a.ts!="number"||typeof a.tabId!="string"){t.push(i);continue}if(r-a.ts>xb){t.push(i);continue}e.push(a)}catch{t.push(i)}}for(const n of t)try{localStorage.removeItem(n)}catch{}return e}function dm(){const r={};for(const e of N7())r[e.projectId]||(r[e.projectId]=e.tabId);return r}function kb(r){if(!(typeof BroadcastChannel>"u"))try{const e=new BroadcastChannel(Tb);e.postMessage({type:"focus",projectId:r}),e.close()}catch{}}function I7(r,e){if(typeof BroadcastChannel>"u")return()=>{};let t=null;try{t=new BroadcastChannel(Tb),t.onmessage=n=>{const i=n.data;(i==null?void 0:i.type)==="focus"&&i.projectId===r&&e()}}catch{return()=>{}}return()=>{try{t==null||t.close()}catch{}}}const um={TAB_KEY_PREFIX:Pg,STALE_MS:xb};function Lb(){const[r,e]=j.useState(Ti),[t,n]=j.useState(dm),i=j.useCallback(()=>{e(Ti()),n(dm())},[]);return j.useEffect(()=>{const s=c=>{(c.key===null||c.key==="vega-sandbox-projects"||c.key.startsWith(um.TAB_KEY_PREFIX))&&i()},a=()=>{document.visibilityState==="visible"&&i()},o=()=>i();window.addEventListener("storage",s),document.addEventListener("visibilitychange",a),window.addEventListener("focus",o);const l=window.setInterval(i,um.STALE_MS+1e3);return()=>{window.removeEventListener("storage",s),document.removeEventListener("visibilitychange",a),window.removeEventListener("focus",o),window.clearInterval(l)}},[i]),{projects:r,openTabs:t,refresh:i}}const B7="_row_work5_1",M7="_row_popup_work5_11",P7="_row_welcome_work5_18",F7="_rowActive_work5_29",H7="_name_work5_36",j7="_nameText_work5_51",$7="_activeDot_work5_57",V7="_openElsewhere_work5_63",z7="_time_work5_69",U7="_menuBtn_work5_75",W7="_renameInput_work5_92",G7="_menu_work5_75",K7="_menuItem_work5_114",q7="_menuItemDanger_work5_135",nr={row:B7,row_popup:M7,row_welcome:P7,rowActive:F7,name:H7,nameText:j7,activeDot:$7,openElsewhere:V7,time:z7,menuBtn:U7,renameInput:W7,menu:G7,menuItem:K7,menuItemDanger:q7};function Ab({project:r,isCurrent:e,isOpenElsewhere:t,timeLabel:n,variant:i,onOpen:s,onMutated:a}){const[o,l]=j.useState(!1),[c,u]=j.useState(null),[d,g]=j.useState(!1),[_,y]=j.useState(r.name),b=j.useRef(null);j.useEffect(()=>{if(!o)return;const C=()=>{l(!1),u(null)};return document.addEventListener("click",C),()=>document.removeEventListener("click",C)},[o]);const p=()=>{_.trim()&&_.trim()!==r.name&&(L7(r.id,_.trim()),a()),g(!1)},f=async()=>{l(!1),u(null),await Xy({title:"Delete project",message:`Delete project "${r.name}"?
|
|
112
|
+
|
|
113
|
+
This cannot be undone.`,confirmLabel:"Delete",danger:!0})&&(T7(r.id),a())},h=()=>{g(!0),y(r.name),l(!1),u(null)},m=C=>{if(C.stopPropagation(),o)l(!1),u(null);else{const E=C.currentTarget.getBoundingClientRect();l(!0),u({top:E.bottom+4,right:window.innerWidth-E.right})}},v=`${nr.row} ${nr[`row_${i}`]} ${e?nr.rowActive:""}`,w=e?"Current project":t?"Open in another tab — click to switch to it":"Open this project";return M.jsxs("div",{className:v,"data-project-id":r.id,children:[d?M.jsx("input",{className:nr.renameInput,value:_,autoFocus:!0,onChange:C=>y(C.target.value),onKeyDown:C=>{C.key==="Enter"&&p(),C.key==="Escape"&&g(!1)},onBlur:p}):M.jsxs("button",{className:nr.name,onClick:()=>s(r),title:w,children:[e&&M.jsx("span",{className:nr.activeDot,title:"Current project",children:"●"}),M.jsx("span",{className:nr.nameText,children:r.name}),!e&&t&&M.jsx("span",{className:nr.openElsewhere,title:"Open in another tab","aria-label":"Open in another tab",children:M.jsx(be,{name:"arrow-up-right",size:12})})]}),M.jsx("span",{className:nr.time,children:n}),M.jsx("button",{ref:b,className:nr.menuBtn,onClick:m,title:"More options","aria-label":"More options",children:M.jsx(be,{name:"kebab"})}),o&&c&&U2.createPortal(M.jsxs("div",{className:nr.menu,style:{position:"fixed",top:c.top,right:c.right},onClick:C=>C.stopPropagation(),children:[M.jsxs("button",{className:nr.menuItem,onClick:h,children:[M.jsx(be,{name:"edit"})," Rename"]}),M.jsxs("button",{className:`${nr.menuItem} ${nr.menuItemDanger}`,onClick:f,children:[M.jsx(be,{name:"trash"})," Delete"]})]}),document.body)]})}const X7="_overlay_1kzm8_1",Z7="_modal_1kzm8_11",Y7="_header_1kzm8_22",J7="_title_1kzm8_31",Q7="_closeBtn_1kzm8_37",eR="_newRow_1kzm8_51",tR="_newBtn_1kzm8_57",rR="_list_1kzm8_73",nR="_empty_1kzm8_78",Ln={overlay:X7,modal:Z7,header:Y7,title:J7,closeBtn:Q7,newRow:eR,newBtn:tR,list:rR,empty:nR};function iR(r){const e=Date.now()-r,t=Math.floor(e/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;const n=Math.floor(t/60);return n<24?`${n}h ago`:`${Math.floor(n/24)}d ago`}function sR({currentProjectId:r,onSelect:e,onNewProject:t,onClose:n}){const{projects:i,openTabs:s,refresh:a}=Lb(),o=c=>{if(c.id===r){n();return}if(s[c.id]){kb(c.id),n();return}e(c.id),n()},l=()=>{if(a(),!Ti().some(c=>c.id===r)){const c=new URL(window.location.origin+window.location.pathname);c.searchParams.delete("project"),window.location.replace(c.toString())}};return M.jsx("div",{className:Ln.overlay,onClick:n,children:M.jsxs("div",{className:Ln.modal,onClick:c=>c.stopPropagation(),children:[M.jsxs("div",{className:Ln.header,children:[M.jsxs("span",{className:Ln.title,children:[M.jsx(vl,{})," Projects"]}),M.jsx("button",{className:Ln.closeBtn,onClick:n,title:"Close","aria-label":"Close",children:M.jsx(be,{name:"close"})})]}),M.jsx("div",{className:Ln.newRow,children:M.jsxs("button",{className:Ln.newBtn,onClick:()=>{t(),n()},children:[M.jsx(be,{name:"add"})," New Project"]})}),M.jsxs("div",{className:Ln.list,children:[i.length===0&&M.jsx("div",{className:Ln.empty,children:"No saved projects yet."}),i.map(c=>M.jsx(Ab,{project:c,isCurrent:c.id===r,isOpenElsewhere:!!s[c.id]&&c.id!==r,timeLabel:iR(c.updatedAt),variant:"popup",onOpen:o,onMutated:l},c.id))]})]})})}const hm=2*1024*1024,oR=new TextEncoder;function aR(r){const e=Object.values(r).reduce((t,n)=>t+oR.encode(n).length,0);return{feasible:e<=hm,totalBytes:e,limitBytes:hm}}function fm(r){return r<1024?`${r} B`:r<1024*1024?`${Math.round(r/1024)} KB`:`${(r/(1024*1024)).toFixed(1)} MB`}const lR="_menu_1l3gu_5",cR="_menuBtn_1l3gu_10",dR="_menuBtnOpen_1l3gu_25",uR="_dropdown_1l3gu_34",hR="_item_1l3gu_47",fR="_separator_1l3gu_75",_s={menu:lR,menuBtn:cR,menuBtnOpen:dR,dropdown:uR,item:hR,separator:fR};function pm({label:r,title:e,items:t,id:n}){const[i,s]=j.useState(!1),a=j.useRef(null);return j.useEffect(()=>{if(!i)return;function o(c){a.current&&!a.current.contains(c.target)&&s(!1)}function l(c){c.key==="Escape"&&s(!1)}return document.addEventListener("mousedown",o),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",l)}},[i]),M.jsxs("div",{className:_s.menu,ref:a,children:[M.jsx("button",{type:"button",className:`${_s.menuBtn} ${i?_s.menuBtnOpen:""}`,onClick:()=>s(o=>!o),"aria-haspopup":"menu","aria-expanded":i,title:e,id:n,children:r}),i&&M.jsx("div",{className:_s.dropdown,role:"menu",children:t.map((o,l)=>o.type==="separator"?M.jsx("div",{className:_s.separator,role:"separator"},`sep-${l}`):M.jsx("button",{type:"button",role:"menuitem",className:_s.item,disabled:o.disabled,title:o.title,onClick:()=>{s(!1),o.onClick()},children:o.label},`item-${l}`))})]})}const pR="_root_72r6e_1",gR="_header_72r6e_11",mR="_logo_72r6e_24",vR="_logoText_72r6e_30",_R="_statusBadge_72r6e_52",yR="_headerActions_72r6e_111",bR="_headerRight_72r6e_117",wR="_projectNameLabel_72r6e_124",SR="_themeToggleBtn_72r6e_134",CR="_layout_72r6e_163",ER="_sidebar_72r6e_172",xR="_sidebarDragger_72r6e_182",TR="_draggerActive_72r6e_208",kR="_editorPane_72r6e_218",LR="_editorContainer_72r6e_260",AR="_terminalDragger_72r6e_267",RR="_terminalPane_72r6e_300",OR="_previewPane_72r6e_308",DR="_dragger_72r6e_208",NR="_tabBar_72r6e_352",IR="_tab_72r6e_352",BR="_tabActive_72r6e_381",MR="_tabName_72r6e_387",PR="_tabClose_72r6e_393",FR="_emptyEditor_72r6e_410",HR="_restoreBadge_72r6e_419",jR="_transientBadge_72r6e_431",$R="_dropOverlay_72r6e_464",VR="_dropMessage_72r6e_476",xe={root:pR,header:gR,logo:mR,logoText:vR,statusBadge:_R,headerActions:yR,headerRight:bR,projectNameLabel:wR,themeToggleBtn:SR,layout:CR,sidebar:ER,sidebarDragger:xR,draggerActive:TR,editorPane:kR,editorContainer:LR,terminalDragger:AR,terminalPane:RR,previewPane:OR,dragger:DR,tabBar:NR,tab:IR,tabActive:BR,tabName:MR,tabClose:PR,emptyEditor:FR,restoreBadge:HR,transientBadge:jR,dropOverlay:$R,dropMessage:VR},zR={idle:"Initializing",installing:"Installing",starting:"Starting",running:"Running",error:"Error"},UR={importing:"Importing…",done:"Imported",error:"Import failed"};function WR({projectName:r,status:e,restoredFromSave:t,copyToast:n,shareFeasibility:i,importStatus:s,onProjectNameClick:a,onCloneProject:o,onImportZip:l,onExportZip:c,onCopyLink:u,onShowHelp:d}){const g=ou(),_=i.feasible?"Copy a shareable link to this sandbox":`Sandbox too large to share via URL (${fm(i.totalBytes)} > ${fm(i.limitBytes)}). Use Export ZIP instead.`,y=[{label:"Manage Projects...",onClick:a,title:"View, rename, delete, or create projects"},{label:"Clone Project",onClick:o,title:"Clone project to new tab"},{type:"separator"},{label:"Import ZIP...",onClick:l},{label:"Export ZIP...",onClick:c},{type:"separator"},{label:"Copy Share Link",onClick:u,disabled:!i.feasible,title:_}],b=[{label:"Help & Info",onClick:d}],p=UR[s];return M.jsxs("header",{className:xe.header,children:[M.jsx("div",{className:xe.logo,children:M.jsx("button",{type:"button",className:xe.logoText,onClick:()=>{const f=new URL(window.location.origin+window.location.pathname);window.location.assign(f.toString())},title:"Go to Welcome page",children:"Vega Sandbox"})}),M.jsxs("div",{className:xe.headerActions,children:[M.jsx(pm,{label:"Project",title:"Project actions",items:y,id:"header-menu-project"}),M.jsx(pm,{label:"Help",title:"Help & info (?)",items:b,id:"header-menu-help"})]}),M.jsxs("div",{className:xe.headerRight,children:[p&&M.jsx("div",{className:xe.transientBadge,"data-import-status":s,role:"status","aria-live":"polite",children:p}),n&&M.jsxs("div",{className:xe.transientBadge,"data-copy-toast":"true",role:"status","aria-live":"polite",children:[M.jsx(be,{name:"check"})," Copied"]}),t&&M.jsxs("div",{className:xe.restoreBadge,title:"Session restored from last visit",children:[M.jsx(be,{name:"history"})," Restored"]}),M.jsx("span",{className:xe.projectNameLabel,title:"Current project (open Project → Manage Projects to switch)",children:r}),M.jsx("div",{className:xe.statusBadge,"data-status":e,children:zR[e]}),M.jsx("button",{type:"button",className:xe.themeToggleBtn,onClick:()=>Uy(),title:g==="dark"?"Switch to light theme":"Switch to dark theme","aria-label":"Toggle sandbox theme",children:M.jsx(be,{name:g==="dark"?"sun":"moon"})})]})]})}function gm(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function GR(r){if(Array.isArray(r))return r}function KR(r,e,t){return(e=eO(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function qR(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,s,a,o=[],l=!0,c=!1;try{if(s=(t=t.call(r)).next,e!==0)for(;!(l=(n=s.call(t)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}function XR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
114
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function vm(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?mm(Object(t),!0).forEach(function(n){KR(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):mm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ZR(r,e){if(r==null)return{};var t,n,i=YR(r,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(n=0;n<s.length;n++)t=s[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}function YR(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function JR(r,e){return GR(r)||qR(r,e)||tO(r,e)||XR()}function QR(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function eO(r){var e=QR(r,"string");return typeof e=="symbol"?e:e+""}function tO(r,e){if(r){if(typeof r=="string")return gm(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?gm(r,e):void 0}}function rO(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function _m(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function ym(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?_m(Object(t),!0).forEach(function(n){rO(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):_m(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function nO(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return function(n){return e.reduceRight(function(i,s){return s(i)},n)}}function Go(r){return function e(){for(var t=this,n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return i.length>=r.length?r.apply(this,i):function(){for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return e.apply(t,[].concat(i,o))}}}function _d(r){return{}.toString.call(r).includes("Object")}function iO(r){return!Object.keys(r).length}function Ja(r){return typeof r=="function"}function sO(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function oO(r,e){return _d(e)||wi("changeType"),Object.keys(e).some(function(t){return!sO(r,t)})&&wi("changeField"),e}function aO(r){Ja(r)||wi("selectorType")}function lO(r){Ja(r)||_d(r)||wi("handlerType"),_d(r)&&Object.values(r).some(function(e){return!Ja(e)})&&wi("handlersType")}function cO(r){r||wi("initialIsRequired"),_d(r)||wi("initialType"),iO(r)&&wi("initialContent")}function dO(r,e){throw new Error(r[e]||r.default)}var uO={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},wi=Go(dO)(uO),ql={changes:oO,selector:aO,handler:lO,initial:cO};function hO(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ql.initial(r),ql.handler(e);var t={current:r},n=Go(gO)(t,e),i=Go(pO)(t),s=Go(ql.changes)(r),a=Go(fO)(t);function o(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return ql.selector(c),c(t.current)}function l(c){nO(n,i,s,a)(c)}return[o,l]}function fO(r,e){return Ja(e)?e(r.current):e}function pO(r,e){return r.current=ym(ym({},r.current),e),e}function gO(r,e,t){return Ja(e)?e(r.current):Object.keys(t).forEach(function(n){var i;return(i=e[n])===null||i===void 0?void 0:i.call(e,r.current[n])}),t}var mO={create:hO},vO={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function _O(r){return function e(){for(var t=this,n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return i.length>=r.length?r.apply(this,i):function(){for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return e.apply(t,[].concat(i,o))}}}function yO(r){return{}.toString.call(r).includes("Object")}function bO(r){return r||bm("configIsRequired"),yO(r)||bm("configType"),r.urls?(wO(),{paths:{vs:r.urls.monacoBase}}):r}function wO(){console.warn(Rb.deprecation)}function SO(r,e){throw new Error(r[e]||r.default)}var Rb={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
115
|
+
You are using deprecated way of configuration.
|
|
116
|
+
|
|
117
|
+
Instead of using
|
|
118
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
119
|
+
use
|
|
120
|
+
monaco.config({ paths: { vs: '...' } })
|
|
121
|
+
|
|
122
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
123
|
+
`},bm=_O(SO)(Rb),CO={config:bO},EO=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){return t.reduceRight(function(s,a){return a(s)},i)}};function Ob(r,e){return Object.keys(e).forEach(function(t){e[t]instanceof Object&&r[t]&&Object.assign(e[t],Ob(r[t],e[t]))}),vm(vm({},r),e)}var xO={type:"cancelation",msg:"operation is manually canceled"};function uh(r){var e=!1,t=new Promise(function(n,i){r.then(function(s){return e?i(xO):n(s)}),r.catch(i)});return t.cancel=function(){return e=!0},t}var TO=["monaco"],kO=mO.create({config:vO,isInitialized:!1,resolve:null,reject:null,monaco:null}),Db=JR(kO,2),bl=Db[0],uu=Db[1];function LO(r){var e=CO.config(r),t=e.monaco,n=ZR(e,TO);uu(function(i){return{config:Ob(i.config,n),monaco:t}})}function AO(){var r=bl(function(e){var t=e.monaco,n=e.isInitialized,i=e.resolve;return{monaco:t,isInitialized:n,resolve:i}});if(!r.isInitialized){if(uu({isInitialized:!0}),r.monaco)return r.resolve(r.monaco),uh(hh);if(window.monaco&&window.monaco.editor)return Nb(window.monaco),r.resolve(window.monaco),uh(hh);EO(RO,DO)(NO)}return uh(hh)}function RO(r){return document.body.appendChild(r)}function OO(r){var e=document.createElement("script");return r&&(e.src=r),e}function DO(r){var e=bl(function(n){var i=n.config,s=n.reject;return{config:i,reject:s}}),t=OO("".concat(e.config.paths.vs,"/loader.js"));return t.onload=function(){return r()},t.onerror=e.reject,t}function NO(){var r=bl(function(t){var n=t.config,i=t.resolve,s=t.reject;return{config:n,resolve:i,reject:s}}),e=window.require;e.config(r.config),e(["vs/editor/editor.main"],function(t){var n=t.m||t;Nb(n),r.resolve(n)},function(t){r.reject(t)})}function Nb(r){bl().monaco||uu({monaco:r})}function IO(){return bl(function(r){var e=r.monaco;return e})}var hh=new Promise(function(r,e){return uu({resolve:r,reject:e})}),Ib={config:LO,init:AO,__getMonacoInstance:IO},BO={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},fh=BO,MO={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},PO=MO;function FO({children:r}){return js.createElement("div",{style:PO.container},r)}var HO=FO,jO=HO;function $O({width:r,height:e,isEditorReady:t,loading:n,_ref:i,className:s,wrapperProps:a}){return js.createElement("section",{style:{...fh.wrapper,width:r,height:e},...a},!t&&js.createElement(jO,null,n),js.createElement("div",{ref:i,style:{...fh.fullWidth,...!t&&fh.hide},className:s}))}var VO=$O,Bb=j.memo(VO);function zO(r){j.useEffect(r,[])}var Mb=zO;function UO(r,e,t=!0){let n=j.useRef(!0);j.useEffect(n.current||!t?()=>{n.current=!1}:r,e)}var mr=UO;function ca(){}function Fs(r,e,t,n){return WO(r,n)||GO(r,e,t,n)}function WO(r,e){return r.editor.getModel(Pb(r,e))}function GO(r,e,t,n){return r.editor.createModel(e,t,n?Pb(r,n):void 0)}function Pb(r,e){return r.Uri.parse(e)}function KO({original:r,modified:e,language:t,originalLanguage:n,modifiedLanguage:i,originalModelPath:s,modifiedModelPath:a,keepCurrentOriginalModel:o=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:u="Loading...",options:d={},height:g="100%",width:_="100%",className:y,wrapperProps:b={},beforeMount:p=ca,onMount:f=ca}){let[h,m]=j.useState(!1),[v,w]=j.useState(!0),C=j.useRef(null),E=j.useRef(null),S=j.useRef(null),x=j.useRef(f),L=j.useRef(p),P=j.useRef(!1);Mb(()=>{let N=Ib.init();return N.then(F=>(E.current=F)&&w(!1)).catch(F=>(F==null?void 0:F.type)!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>C.current?B():N.cancel()}),mr(()=>{if(C.current&&E.current){let N=C.current.getOriginalEditor(),F=Fs(E.current,r||"",n||t||"text",s||"");F!==N.getModel()&&N.setModel(F)}},[s],h),mr(()=>{if(C.current&&E.current){let N=C.current.getModifiedEditor(),F=Fs(E.current,e||"",i||t||"text",a||"");F!==N.getModel()&&N.setModel(F)}},[a],h),mr(()=>{let N=C.current.getModifiedEditor();N.getOption(E.current.editor.EditorOption.readOnly)?N.setValue(e||""):e!==N.getValue()&&(N.executeEdits("",[{range:N.getModel().getFullModelRange(),text:e||"",forceMoveMarkers:!0}]),N.pushUndoStop())},[e],h),mr(()=>{var N,F;(F=(N=C.current)==null?void 0:N.getModel())==null||F.original.setValue(r||"")},[r],h),mr(()=>{let{original:N,modified:F}=C.current.getModel();E.current.editor.setModelLanguage(N,n||t||"text"),E.current.editor.setModelLanguage(F,i||t||"text")},[t,n,i],h),mr(()=>{var N;(N=E.current)==null||N.editor.setTheme(c)},[c],h),mr(()=>{var N;(N=C.current)==null||N.updateOptions(d)},[d],h);let A=j.useCallback(()=>{var H;if(!E.current)return;L.current(E.current);let N=Fs(E.current,r||"",n||t||"text",s||""),F=Fs(E.current,e||"",i||t||"text",a||"");(H=C.current)==null||H.setModel({original:N,modified:F})},[t,e,i,r,n,s,a]),k=j.useCallback(()=>{var N;!P.current&&S.current&&(C.current=E.current.editor.createDiffEditor(S.current,{automaticLayout:!0,...d}),A(),(N=E.current)==null||N.editor.setTheme(c),m(!0),P.current=!0)},[d,c,A]);j.useEffect(()=>{h&&x.current(C.current,E.current)},[h]),j.useEffect(()=>{!v&&!h&&k()},[v,h,k]);function B(){var F,H,T,R;let N=(F=C.current)==null?void 0:F.getModel();o||((H=N==null?void 0:N.original)==null||H.dispose()),l||((T=N==null?void 0:N.modified)==null||T.dispose()),(R=C.current)==null||R.dispose()}return js.createElement(Bb,{width:_,height:g,isEditorReady:h,loading:u,_ref:S,className:y,wrapperProps:b})}var qO=KO;j.memo(qO);function XO(r){let e=j.useRef();return j.useEffect(()=>{e.current=r},[r]),e.current}var ZO=XO,Xl=new Map;function YO({defaultValue:r,defaultLanguage:e,defaultPath:t,value:n,language:i,path:s,theme:a="light",line:o,loading:l="Loading...",options:c={},overrideServices:u={},saveViewState:d=!0,keepCurrentModel:g=!1,width:_="100%",height:y="100%",className:b,wrapperProps:p={},beforeMount:f=ca,onMount:h=ca,onChange:m,onValidate:v=ca}){let[w,C]=j.useState(!1),[E,S]=j.useState(!0),x=j.useRef(null),L=j.useRef(null),P=j.useRef(null),A=j.useRef(h),k=j.useRef(f),B=j.useRef(),N=j.useRef(n),F=ZO(s),H=j.useRef(!1),T=j.useRef(!1);Mb(()=>{let I=Ib.init();return I.then($=>(x.current=$)&&S(!1)).catch($=>($==null?void 0:$.type)!=="cancelation"&&console.error("Monaco initialization: error:",$)),()=>L.current?O():I.cancel()}),mr(()=>{var $,V,U,G;let I=Fs(x.current,r||n||"",e||i||"",s||t||"");I!==(($=L.current)==null?void 0:$.getModel())&&(d&&Xl.set(F,(V=L.current)==null?void 0:V.saveViewState()),(U=L.current)==null||U.setModel(I),d&&((G=L.current)==null||G.restoreViewState(Xl.get(s))))},[s],w),mr(()=>{var I;(I=L.current)==null||I.updateOptions(c)},[c],w),mr(()=>{!L.current||n===void 0||(L.current.getOption(x.current.editor.EditorOption.readOnly)?L.current.setValue(n):n!==L.current.getValue()&&(T.current=!0,L.current.executeEdits("",[{range:L.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),L.current.pushUndoStop(),T.current=!1))},[n],w),mr(()=>{var $,V;let I=($=L.current)==null?void 0:$.getModel();I&&i&&((V=x.current)==null||V.editor.setModelLanguage(I,i))},[i],w),mr(()=>{var I;o!==void 0&&((I=L.current)==null||I.revealLine(o))},[o],w),mr(()=>{var I;(I=x.current)==null||I.editor.setTheme(a)},[a],w);let R=j.useCallback(()=>{var I;if(!(!P.current||!x.current)&&!H.current){k.current(x.current);let $=s||t,V=Fs(x.current,n||r||"",e||i||"",$||"");L.current=(I=x.current)==null?void 0:I.editor.create(P.current,{model:V,automaticLayout:!0,...c},u),d&&L.current.restoreViewState(Xl.get($)),x.current.editor.setTheme(a),o!==void 0&&L.current.revealLine(o),C(!0),H.current=!0}},[r,e,t,n,i,s,c,u,d,a,o]);j.useEffect(()=>{w&&A.current(L.current,x.current)},[w]),j.useEffect(()=>{!E&&!w&&R()},[E,w,R]),N.current=n,j.useEffect(()=>{var I,$;w&&m&&((I=B.current)==null||I.dispose(),B.current=($=L.current)==null?void 0:$.onDidChangeModelContent(V=>{T.current||m(L.current.getValue(),V)}))},[w,m]),j.useEffect(()=>{if(w){let I=x.current.editor.onDidChangeMarkers($=>{var U;let V=(U=L.current.getModel())==null?void 0:U.uri;if(V&&$.find(G=>G.path===V.path)){let G=x.current.editor.getModelMarkers({resource:V});v==null||v(G)}});return()=>{I==null||I.dispose()}}return()=>{}},[w,v]);function O(){var I,$;(I=B.current)==null||I.dispose(),g?d&&Xl.set(s,L.current.saveViewState()):($=L.current.getModel())==null||$.dispose(),L.current.dispose()}return js.createElement(Bb,{width:_,height:y,isEditorReady:w,loading:l,_ref:P,className:b,wrapperProps:p})}var JO=YO,QO=j.memo(JO),e9=QO,Fb={exports:{}};(function(r,e){(function(t,n){r.exports=n()})(self,()=>(()=>{var t={4567:function(a,o,l){var c=this&&this.__decorate||function(m,v,w,C){var E,S=arguments.length,x=S<3?v:C===null?C=Object.getOwnPropertyDescriptor(v,w):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(m,v,w,C);else for(var L=m.length-1;L>=0;L--)(E=m[L])&&(x=(S<3?E(x):S>3?E(v,w,x):E(v,w))||x);return S>3&&x&&Object.defineProperty(v,w,x),x},u=this&&this.__param||function(m,v){return function(w,C){v(w,C,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const d=l(9042),g=l(6114),_=l(9924),y=l(844),b=l(5596),p=l(4725),f=l(3656);let h=o.AccessibilityManager=class extends y.Disposable{constructor(m,v){super(),this._terminal=m,this._renderService=v,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let w=0;w<this._terminal.rows;w++)this._rowElements[w]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[w]);if(this._topBoundaryFocusListener=w=>this._handleBoundaryFocus(w,0),this._bottomBoundaryFocusListener=w=>this._handleBoundaryFocus(w,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=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new _.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(w=>this._handleResize(w.rows))),this.register(this._terminal.onRender(w=>this._refreshRows(w.start,w.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(w=>this._handleChar(w))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
124
|
+
`))),this.register(this._terminal.onA11yTab(w=>this._handleTab(w))),this.register(this._terminal.onKey(w=>this._handleKey(w.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new b.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,f.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,y.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(m){for(let v=0;v<m;v++)this._handleChar(" ")}_handleChar(m){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==m&&(this._charsToAnnounce+=m):this._charsToAnnounce+=m,m===`
|
|
125
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)),g.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,g.isMac&&this._liveRegion.remove()}_handleKey(m){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(m)||this._charsToConsume.push(m)}_refreshRows(m,v){this._liveRegionDebouncer.refresh(m,v,this._terminal.rows)}_renderRows(m,v){const w=this._terminal.buffer,C=w.lines.length.toString();for(let E=m;E<=v;E++){const S=w.translateBufferLineToString(w.ydisp+E,!0),x=(w.ydisp+E+1).toString(),L=this._rowElements[E];L&&(S.length===0?L.innerText=" ":L.textContent=S,L.setAttribute("aria-posinset",x),L.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(m,v){const w=m.target,C=this._rowElements[v===0?1:this._rowElements.length-2];if(w.getAttribute("aria-posinset")===(v===0?"1":`${this._terminal.buffer.lines.length}`)||m.relatedTarget!==C)return;let E,S;if(v===0?(E=w,S=this._rowElements.pop(),this._rowContainer.removeChild(S)):(E=this._rowElements.shift(),S=w,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),S.removeEventListener("focus",this._bottomBoundaryFocusListener),v===0){const x=this._createAccessibilityTreeNode();this._rowElements.unshift(x),this._rowContainer.insertAdjacentElement("afterbegin",x)}else{const x=this._createAccessibilityTreeNode();this._rowElements.push(x),this._rowContainer.appendChild(x)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(v===0?-1:1),this._rowElements[v===0?1:this._rowElements.length-2].focus(),m.preventDefault(),m.stopImmediatePropagation()}_handleResize(m){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let v=this._rowContainer.children.length;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);for(;this._rowElements.length>m;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const m=document.createElement("div");return m.setAttribute("role","listitem"),m.tabIndex=-1,this._refreshRowDimensions(m),m}_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 m=0;m<this._terminal.rows;m++)this._refreshRowDimensions(this._rowElements[m])}}_refreshRowDimensions(m){m.style.height=`${this._renderService.dimensions.css.cell.height}px`}};o.AccessibilityManager=h=c([u(1,p.IRenderService)],h)},3614:(a,o)=>{function l(g){return g.replace(/\r?\n/g,"\r")}function c(g,_){return _?"\x1B[200~"+g+"\x1B[201~":g}function u(g,_,y,b){g=c(g=l(g),y.decPrivateModes.bracketedPasteMode&&b.rawOptions.ignoreBracketedPasteMode!==!0),y.triggerDataEvent(g,!0),_.value=""}function d(g,_,y){const b=y.getBoundingClientRect(),p=g.clientX-b.left-10,f=g.clientY-b.top-10;_.style.width="20px",_.style.height="20px",_.style.left=`${p}px`,_.style.top=`${f}px`,_.style.zIndex="1000",_.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=l,o.bracketTextForPaste=c,o.copyHandler=function(g,_){g.clipboardData&&g.clipboardData.setData("text/plain",_.selectionText),g.preventDefault()},o.handlePasteEvent=function(g,_,y,b){g.stopPropagation(),g.clipboardData&&u(g.clipboardData.getData("text/plain"),_,y,b)},o.paste=u,o.moveTextAreaUnderMouseCursor=d,o.rightClickHandler=function(g,_,y,b,p){d(g,_,y),p&&b.rightClickSelect(g),_.value=b.selectionText,_.select()}},7239:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const c=l(1505);o.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(u,d,g){this._css.set(u,d,g)}getCss(u,d){return this._css.get(u,d)}setColor(u,d,g){this._color.set(u,d,g)}getColor(u,d){return this._color.get(u,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(l,c,u,d){l.addEventListener(c,u,d);let g=!1;return{dispose:()=>{g||(g=!0,l.removeEventListener(c,u,d))}}}},6465:function(a,o,l){var c=this&&this.__decorate||function(p,f,h,m){var v,w=arguments.length,C=w<3?f:m===null?m=Object.getOwnPropertyDescriptor(f,h):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(p,f,h,m);else for(var E=p.length-1;E>=0;E--)(v=p[E])&&(C=(w<3?v(C):w>3?v(f,h,C):v(f,h))||C);return w>3&&C&&Object.defineProperty(f,h,C),C},u=this&&this.__param||function(p,f){return function(h,m){f(h,m,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier2=void 0;const d=l(3656),g=l(8460),_=l(844),y=l(2585);let b=o.Linkifier2=class extends _.Disposable{get currentLink(){return this._currentLink}constructor(p){super(),this._bufferService=p,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,_.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,_.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(p){return this._linkProviders.push(p),{dispose:()=>{const f=this._linkProviders.indexOf(p);f!==-1&&this._linkProviders.splice(f,1)}}}attachToDom(p,f,h){this._element=p,this._mouseService=f,this._renderService=h,this.register((0,d.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,d.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(p){if(this._lastMouseEvent=p,!this._element||!this._mouseService)return;const f=this._positionFromMouseEvent(p,this._element,this._mouseService);if(!f)return;this._isMouseOut=!1;const h=p.composedPath();for(let m=0;m<h.length;m++){const v=h[m];if(v.classList.contains("xterm"))break;if(v.classList.contains("xterm-hover"))return}this._lastBufferCell&&f.x===this._lastBufferCell.x&&f.y===this._lastBufferCell.y||(this._handleHover(f),this._lastBufferCell=f)}_handleHover(p){if(this._activeLine!==p.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(p,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,p)||(this._clearCurrentLink(),this._askForLink(p,!0))}_askForLink(p,f){var h,m;this._activeProviderReplies&&f||((h=this._activeProviderReplies)===null||h===void 0||h.forEach(w=>{w==null||w.forEach(C=>{C.link.dispose&&C.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=p.y);let v=!1;for(const[w,C]of this._linkProviders.entries())f?!((m=this._activeProviderReplies)===null||m===void 0)&&m.get(w)&&(v=this._checkLinkProviderResult(w,p,v)):C.provideLinks(p.y,E=>{var S,x;if(this._isMouseOut)return;const L=E==null?void 0:E.map(P=>({link:P}));(S=this._activeProviderReplies)===null||S===void 0||S.set(w,L),v=this._checkLinkProviderResult(w,p,v),((x=this._activeProviderReplies)===null||x===void 0?void 0:x.size)===this._linkProviders.length&&this._removeIntersectingLinks(p.y,this._activeProviderReplies)})}_removeIntersectingLinks(p,f){const h=new Set;for(let m=0;m<f.size;m++){const v=f.get(m);if(v)for(let w=0;w<v.length;w++){const C=v[w],E=C.link.range.start.y<p?0:C.link.range.start.x,S=C.link.range.end.y>p?this._bufferService.cols:C.link.range.end.x;for(let x=E;x<=S;x++){if(h.has(x)){v.splice(w--,1);break}h.add(x)}}}}_checkLinkProviderResult(p,f,h){var m;if(!this._activeProviderReplies)return h;const v=this._activeProviderReplies.get(p);let w=!1;for(let C=0;C<p;C++)this._activeProviderReplies.has(C)&&!this._activeProviderReplies.get(C)||(w=!0);if(!w&&v){const C=v.find(E=>this._linkAtPosition(E.link,f));C&&(h=!0,this._handleNewLink(C))}if(this._activeProviderReplies.size===this._linkProviders.length&&!h)for(let C=0;C<this._activeProviderReplies.size;C++){const E=(m=this._activeProviderReplies.get(C))===null||m===void 0?void 0:m.find(S=>this._linkAtPosition(S.link,f));if(E){h=!0,this._handleNewLink(E);break}}return h}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(p){if(!this._element||!this._mouseService||!this._currentLink)return;const f=this._positionFromMouseEvent(p,this._element,this._mouseService);f&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,f)&&this._currentLink.link.activate(p,this._currentLink.link.text)}_clearCurrentLink(p,f){this._element&&this._currentLink&&this._lastMouseEvent&&(!p||!f||this._currentLink.link.range.start.y>=p&&this._currentLink.link.range.end.y<=f)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,_.disposeArray)(this._linkCacheDisposables))}_handleNewLink(p){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const f=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);f&&this._linkAtPosition(p.link,f)&&(this._currentLink=p,this._currentLink.state={decorations:{underline:p.link.decorations===void 0||p.link.decorations.underline,pointerCursor:p.link.decorations===void 0||p.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,p.link,this._lastMouseEvent),p.link.decorations={},Object.defineProperties(p.link.decorations,{pointerCursor:{get:()=>{var h,m;return(m=(h=this._currentLink)===null||h===void 0?void 0:h.state)===null||m===void 0?void 0:m.decorations.pointerCursor},set:h=>{var m,v;!((m=this._currentLink)===null||m===void 0)&&m.state&&this._currentLink.state.decorations.pointerCursor!==h&&(this._currentLink.state.decorations.pointerCursor=h,this._currentLink.state.isHovered&&((v=this._element)===null||v===void 0||v.classList.toggle("xterm-cursor-pointer",h)))}},underline:{get:()=>{var h,m;return(m=(h=this._currentLink)===null||h===void 0?void 0:h.state)===null||m===void 0?void 0:m.decorations.underline},set:h=>{var m,v,w;!((m=this._currentLink)===null||m===void 0)&&m.state&&((w=(v=this._currentLink)===null||v===void 0?void 0:v.state)===null||w===void 0?void 0:w.decorations.underline)!==h&&(this._currentLink.state.decorations.underline=h,this._currentLink.state.isHovered&&this._fireUnderlineEvent(p.link,h))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(h=>{if(!this._currentLink)return;const m=h.start===0?0:h.start+1+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.ydisp+1+h.end;if(this._currentLink.link.range.start.y>=m&&this._currentLink.link.range.end.y<=v&&(this._clearCurrentLink(m,v),this._lastMouseEvent&&this._element)){const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._askForLink(w,!1)}})))}_linkHover(p,f,h){var m;!((m=this._currentLink)===null||m===void 0)&&m.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!0),this._currentLink.state.decorations.pointerCursor&&p.classList.add("xterm-cursor-pointer")),f.hover&&f.hover(h,f.text)}_fireUnderlineEvent(p,f){const h=p.range,m=this._bufferService.buffer.ydisp,v=this._createLinkUnderlineEvent(h.start.x-1,h.start.y-m-1,h.end.x,h.end.y-m-1,void 0);(f?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(v)}_linkLeave(p,f,h){var m;!((m=this._currentLink)===null||m===void 0)&&m.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!1),this._currentLink.state.decorations.pointerCursor&&p.classList.remove("xterm-cursor-pointer")),f.leave&&f.leave(h,f.text)}_linkAtPosition(p,f){const h=p.range.start.y*this._bufferService.cols+p.range.start.x,m=p.range.end.y*this._bufferService.cols+p.range.end.x,v=f.y*this._bufferService.cols+f.x;return h<=v&&v<=m}_positionFromMouseEvent(p,f,h){const m=h.getCoords(p,f,this._bufferService.cols,this._bufferService.rows);if(m)return{x:m[0],y:m[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(p,f,h,m,v){return{x1:p,y1:f,x2:h,y2:m,cols:this._bufferService.cols,fg:v}}};o.Linkifier2=b=c([u(0,y.IBufferService)],b)},9042:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,o,l){var c=this&&this.__decorate||function(b,p,f,h){var m,v=arguments.length,w=v<3?p:h===null?h=Object.getOwnPropertyDescriptor(p,f):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(b,p,f,h);else for(var C=b.length-1;C>=0;C--)(m=b[C])&&(w=(v<3?m(w):v>3?m(p,f,w):m(p,f))||w);return v>3&&w&&Object.defineProperty(p,f,w),w},u=this&&this.__param||function(b,p){return function(f,h){p(f,h,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const d=l(511),g=l(2585);let _=o.OscLinkProvider=class{constructor(b,p,f){this._bufferService=b,this._optionsService=p,this._oscLinkService=f}provideLinks(b,p){var f;const h=this._bufferService.buffer.lines.get(b-1);if(!h)return void p(void 0);const m=[],v=this._optionsService.rawOptions.linkHandler,w=new d.CellData,C=h.getTrimmedLength();let E=-1,S=-1,x=!1;for(let L=0;L<C;L++)if(S!==-1||h.hasContent(L)){if(h.loadCell(L,w),w.hasExtendedAttrs()&&w.extended.urlId){if(S===-1){S=L,E=w.extended.urlId;continue}x=w.extended.urlId!==E}else S!==-1&&(x=!0);if(x||S!==-1&&L===C-1){const P=(f=this._oscLinkService.getLinkData(E))===null||f===void 0?void 0:f.uri;if(P){const A={start:{x:S+1,y:b},end:{x:L+(x||L!==C-1?0:1),y:b}};let k=!1;if(!(v!=null&&v.allowNonHttpProtocols))try{const B=new URL(P);["http:","https:"].includes(B.protocol)||(k=!0)}catch{k=!0}k||m.push({text:P,range:A,activate:(B,N)=>v?v.activate(B,N,A):y(0,N),hover:(B,N)=>{var F;return(F=v==null?void 0:v.hover)===null||F===void 0?void 0:F.call(v,B,N,A)},leave:(B,N)=>{var F;return(F=v==null?void 0:v.leave)===null||F===void 0?void 0:F.call(v,B,N,A)}})}x=!1,w.hasExtendedAttrs()&&w.extended.urlId?(S=L,E=w.extended.urlId):(S=-1,E=-1)}}p(m)}};function y(b,p){if(confirm(`Do you want to navigate to ${p}?
|
|
126
|
+
|
|
127
|
+
WARNING: This link could potentially be dangerous`)){const f=window.open();if(f){try{f.opener=null}catch{}f.location.href=p}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=_=c([u(0,g.IBufferService),u(1,g.IOptionsService),u(2,g.IOscLinkService)],_)},6193:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(l,c){this._parentWindow=l,this._renderCallback=c,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(l){return this._refreshCallbacks.push(l),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(l,c,u){this._rowCount=u,l=l!==void 0?l:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const l=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,c),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const l of this._refreshCallbacks)l(0);this._refreshCallbacks=[]}}},5596:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ScreenDprMonitor=void 0;const c=l(844);class u extends c.Disposable{constructor(g){super(),this._parentWindow=g,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,c.toDisposable)(()=>{this.clearListener()}))}setListener(g){this._listener&&this.clearListener(),this._listener=g,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var g;this._outerListener&&((g=this._resolutionMediaMatchList)===null||g===void 0||g.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)}}o.ScreenDprMonitor=u},3236:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const c=l(3614),u=l(3656),d=l(6465),g=l(9042),_=l(3730),y=l(1680),b=l(3107),p=l(5744),f=l(2950),h=l(1296),m=l(428),v=l(4269),w=l(5114),C=l(8934),E=l(3230),S=l(9312),x=l(4725),L=l(6731),P=l(8055),A=l(8969),k=l(8460),B=l(844),N=l(6114),F=l(8437),H=l(2584),T=l(7399),R=l(5941),O=l(9074),I=l(2585),$=l(5435),V=l(4567),U=typeof window<"u"?window.document:null;class G extends A.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(D={}){super(D),this.browser=N,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new B.MutableDisposable),this._onCursorMove=this.register(new k.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new k.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new k.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new k.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new k.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new k.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new k.EventEmitter),this._onBlur=this.register(new k.EventEmitter),this._onA11yCharEmitter=this.register(new k.EventEmitter),this._onA11yTabEmitter=this.register(new k.EventEmitter),this._onWillOpen=this.register(new k.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(d.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(_.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(O.DecorationService),this._instantiationService.setService(I.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((z,K)=>this.refresh(z,K))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(z=>this._reportWindowsOptions(z))),this.register(this._inputHandler.onColor(z=>this._handleColorEvent(z))),this.register((0,k.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,k.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,k.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,k.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(z=>this._afterResize(z.cols,z.rows))),this.register((0,B.toDisposable)(()=>{var z,K;this._customKeyEventHandler=void 0,(K=(z=this.element)===null||z===void 0?void 0:z.parentNode)===null||K===void 0||K.removeChild(this.element)}))}_handleColorEvent(D){if(this._themeService)for(const z of D){let K,W="";switch(z.index){case 256:K="foreground",W="10";break;case 257:K="background",W="11";break;case 258:K="cursor",W="12";break;default:K="ansi",W="4;"+z.index}switch(z.type){case 0:const ae=P.color.toColorRGB(K==="ansi"?this._themeService.colors.ansi[z.index]:this._themeService.colors[K]);this.coreService.triggerDataEvent(`${H.C0.ESC}]${W};${(0,R.toRgbString)(ae)}${H.C1_ESCAPED.ST}`);break;case 1:if(K==="ansi")this._themeService.modifyColors(ee=>ee.ansi[z.index]=P.rgba.toColor(...z.color));else{const ee=K;this._themeService.modifyColors(me=>me[ee]=P.rgba.toColor(...z.color))}break;case 2:this._themeService.restoreColor(z.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(D){D?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(D){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(H.C0.ESC+"[I"),this.updateCursorStyle(D),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var D;return(D=this.textarea)===null||D===void 0?void 0:D.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(H.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const D=this.buffer.ybase+this.buffer.y,z=this.buffer.lines.get(D);if(!z)return;const K=Math.min(this.buffer.x,this.cols-1),W=this._renderService.dimensions.css.cell.height,ae=z.getWidth(K),ee=this._renderService.dimensions.css.cell.width*ae,me=this.buffer.y*this._renderService.dimensions.css.cell.height,ot=K*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ot+"px",this.textarea.style.top=me+"px",this.textarea.style.width=ee+"px",this.textarea.style.height=W+"px",this.textarea.style.lineHeight=W+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,u.addDisposableDomListener)(this.element,"copy",z=>{this.hasSelection()&&(0,c.copyHandler)(z,this._selectionService)}));const D=z=>(0,c.handlePasteEvent)(z,this.textarea,this.coreService,this.optionsService);this.register((0,u.addDisposableDomListener)(this.textarea,"paste",D)),this.register((0,u.addDisposableDomListener)(this.element,"paste",D)),N.isFirefox?this.register((0,u.addDisposableDomListener)(this.element,"mousedown",z=>{z.button===2&&(0,c.rightClickHandler)(z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,u.addDisposableDomListener)(this.element,"contextmenu",z=>{(0,c.rightClickHandler)(z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),N.isLinux&&this.register((0,u.addDisposableDomListener)(this.element,"auxclick",z=>{z.button===1&&(0,c.moveTextAreaUnderMouseCursor)(z,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,u.addDisposableDomListener)(this.textarea,"keyup",D=>this._keyUp(D),!0)),this.register((0,u.addDisposableDomListener)(this.textarea,"keydown",D=>this._keyDown(D),!0)),this.register((0,u.addDisposableDomListener)(this.textarea,"keypress",D=>this._keyPress(D),!0)),this.register((0,u.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,u.addDisposableDomListener)(this.textarea,"compositionupdate",D=>this._compositionHelper.compositionupdate(D))),this.register((0,u.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,u.addDisposableDomListener)(this.textarea,"input",D=>this._inputEvent(D),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(D){var z;if(!D)throw new Error("Terminal requires a parent element.");D.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=D.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),D.appendChild(this.element);const K=U.createDocumentFragment();this._viewportElement=U.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),K.appendChild(this._viewportElement),this._viewportScrollArea=U.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=U.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=U.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),K.appendChild(this.screenElement),this.textarea=U.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),N.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this._instantiationService.createInstance(w.CoreBrowserService,this.textarea,(z=this._document.defaultView)!==null&&z!==void 0?z:window),this._instantiationService.setService(x.ICoreBrowserService,this._coreBrowserService),this.register((0,u.addDisposableDomListener)(this.textarea,"focus",W=>this._handleTextAreaFocus(W))),this.register((0,u.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(m.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(x.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(x.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(v.CharacterJoinerService),this._instantiationService.setService(x.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(E.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(x.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(W=>this._onRender.fire(W))),this.onResize(W=>this._renderService.resize(W.cols,W.rows)),this._compositionView=U.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(f.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(K);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(C.MouseService),this._instantiationService.setService(x.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(y.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(W=>this.scrollLines(W.amount,W.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(S.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(x.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(W=>this.scrollLines(W.amount,W.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(W=>this._renderService.handleSelectionChanged(W.start,W.end,W.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(W=>{this.textarea.value=W,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(W=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(b.BufferDecorationRenderer,this.screenElement)),this.register((0,u.addDisposableDomListener)(this.element,"mousedown",W=>this._selectionService.handleMouseDown(W))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",W=>this._handleScreenReaderModeOptionChange(W))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(p.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",W=>{!this._overviewRulerRenderer&&W&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(p.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(h.DomRenderer,this.element,this.screenElement,this._viewportElement,this.linkifier2)}bindMouse(){const D=this,z=this.element;function K(ee){const me=D._mouseService.getMouseReportCoords(ee,D.screenElement);if(!me)return!1;let ot,tr;switch(ee.overrideType||ee.type){case"mousemove":tr=32,ee.buttons===void 0?(ot=3,ee.button!==void 0&&(ot=ee.button<3?ee.button:3)):ot=1&ee.buttons?0:4&ee.buttons?1:2&ee.buttons?2:3;break;case"mouseup":tr=0,ot=ee.button<3?ee.button:3;break;case"mousedown":tr=1,ot=ee.button<3?ee.button:3;break;case"wheel":if(D.viewport.getLinesScrolled(ee)===0)return!1;tr=ee.deltaY<0?0:1,ot=4;break;default:return!1}return!(tr===void 0||ot===void 0||ot>4)&&D.coreMouseService.triggerMouseEvent({col:me.col,row:me.row,x:me.x,y:me.y,button:ot,action:tr,ctrl:ee.ctrlKey,alt:ee.altKey,shift:ee.shiftKey})}const W={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ae={mouseup:ee=>(K(ee),ee.buttons||(this._document.removeEventListener("mouseup",W.mouseup),W.mousedrag&&this._document.removeEventListener("mousemove",W.mousedrag)),this.cancel(ee)),wheel:ee=>(K(ee),this.cancel(ee,!0)),mousedrag:ee=>{ee.buttons&&K(ee)},mousemove:ee=>{ee.buttons||K(ee)}};this.register(this.coreMouseService.onProtocolChange(ee=>{ee?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ee)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&ee?W.mousemove||(z.addEventListener("mousemove",ae.mousemove),W.mousemove=ae.mousemove):(z.removeEventListener("mousemove",W.mousemove),W.mousemove=null),16&ee?W.wheel||(z.addEventListener("wheel",ae.wheel,{passive:!1}),W.wheel=ae.wheel):(z.removeEventListener("wheel",W.wheel),W.wheel=null),2&ee?W.mouseup||(z.addEventListener("mouseup",ae.mouseup),W.mouseup=ae.mouseup):(this._document.removeEventListener("mouseup",W.mouseup),z.removeEventListener("mouseup",W.mouseup),W.mouseup=null),4&ee?W.mousedrag||(W.mousedrag=ae.mousedrag):(this._document.removeEventListener("mousemove",W.mousedrag),W.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,u.addDisposableDomListener)(z,"mousedown",ee=>{if(ee.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ee))return K(ee),W.mouseup&&this._document.addEventListener("mouseup",W.mouseup),W.mousedrag&&this._document.addEventListener("mousemove",W.mousedrag),this.cancel(ee)})),this.register((0,u.addDisposableDomListener)(z,"wheel",ee=>{if(!W.wheel){if(!this.buffer.hasScrollback){const me=this.viewport.getLinesScrolled(ee);if(me===0)return;const ot=H.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ee.deltaY<0?"A":"B");let tr="";for(let ms=0;ms<Math.abs(me);ms++)tr+=ot;return this.coreService.triggerDataEvent(tr,!0),this.cancel(ee,!0)}return this.viewport.handleWheel(ee)?this.cancel(ee):void 0}},{passive:!1})),this.register((0,u.addDisposableDomListener)(z,"touchstart",ee=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ee),this.cancel(ee)},{passive:!0})),this.register((0,u.addDisposableDomListener)(z,"touchmove",ee=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ee)?void 0:this.cancel(ee)},{passive:!1}))}refresh(D,z){var K;(K=this._renderService)===null||K===void 0||K.refreshRows(D,z)}updateCursorStyle(D){var z;!((z=this._selectionService)===null||z===void 0)&&z.shouldColumnSelect(D)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(D,z,K=0){var W;K===1?(super.scrollLines(D,z,K),this.refresh(0,this.rows-1)):(W=this.viewport)===null||W===void 0||W.scrollLines(D)}paste(D){(0,c.paste)(D,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(D){this._customKeyEventHandler=D}registerLinkProvider(D){return this.linkifier2.registerLinkProvider(D)}registerCharacterJoiner(D){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const z=this._characterJoinerService.register(D);return this.refresh(0,this.rows-1),z}deregisterCharacterJoiner(D){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(D)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(D){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+D)}registerDecoration(D){return this._decorationService.registerDecoration(D)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(D,z,K){this._selectionService.setSelection(D,z,K)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var D;(D=this._selectionService)===null||D===void 0||D.clearSelection()}selectAll(){var D;(D=this._selectionService)===null||D===void 0||D.selectAll()}selectLines(D,z){var K;(K=this._selectionService)===null||K===void 0||K.selectLines(D,z)}_keyDown(D){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(D)===!1)return!1;const z=this.browser.isMac&&this.options.macOptionIsMeta&&D.altKey;if(!z&&!this._compositionHelper.keydown(D))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;z||D.key!=="Dead"&&D.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const K=(0,T.evaluateKeyboardEvent)(D,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(D),K.type===3||K.type===2){const W=this.rows-1;return this.scrollLines(K.type===2?-W:W),this.cancel(D,!0)}return K.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,D)||(K.cancel&&this.cancel(D,!0),!K.key||!!(D.key&&!D.ctrlKey&&!D.altKey&&!D.metaKey&&D.key.length===1&&D.key.charCodeAt(0)>=65&&D.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(K.key!==H.C0.ETX&&K.key!==H.C0.CR||(this.textarea.value=""),this._onKey.fire({key:K.key,domEvent:D}),this._showCursor(),this.coreService.triggerDataEvent(K.key,!0),!this.optionsService.rawOptions.screenReaderMode||D.altKey||D.ctrlKey?this.cancel(D,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(D,z){const K=D.isMac&&!this.options.macOptionIsMeta&&z.altKey&&!z.ctrlKey&&!z.metaKey||D.isWindows&&z.altKey&&z.ctrlKey&&!z.metaKey||D.isWindows&&z.getModifierState("AltGraph");return z.type==="keypress"?K:K&&(!z.keyCode||z.keyCode>47)}_keyUp(D){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(D)===!1||(function(z){return z.keyCode===16||z.keyCode===17||z.keyCode===18}(D)||this.focus(),this.updateCursorStyle(D),this._keyPressHandled=!1)}_keyPress(D){let z;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(D)===!1)return!1;if(this.cancel(D),D.charCode)z=D.charCode;else if(D.which===null||D.which===void 0)z=D.keyCode;else{if(D.which===0||D.charCode===0)return!1;z=D.which}return!(!z||(D.altKey||D.ctrlKey||D.metaKey)&&!this._isThirdLevelShift(this.browser,D)||(z=String.fromCharCode(z),this._onKey.fire({key:z,domEvent:D}),this._showCursor(),this.coreService.triggerDataEvent(z,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(D){if(D.data&&D.inputType==="insertText"&&(!D.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const z=D.data;return this.coreService.triggerDataEvent(z,!0),this.cancel(D),!0}return!1}resize(D,z){D!==this.cols||z!==this.rows?super.resize(D,z):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(D,z){var K,W;(K=this._charSizeService)===null||K===void 0||K.measure(),(W=this.viewport)===null||W===void 0||W.syncScrollArea(!0)}clear(){var D;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let z=1;z<this.rows;z++)this.buffer.lines.push(this.buffer.getBlankLine(F.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(D=this.viewport)===null||D===void 0||D.reset(),this.refresh(0,this.rows-1)}}reset(){var D,z;this.options.rows=this.rows,this.options.cols=this.cols;const K=this._customKeyEventHandler;this._setup(),super.reset(),(D=this._selectionService)===null||D===void 0||D.reset(),this._decorationService.reset(),(z=this.viewport)===null||z===void 0||z.reset(),this._customKeyEventHandler=K,this.refresh(0,this.rows-1)}clearTextureAtlas(){var D;(D=this._renderService)===null||D===void 0||D.clearTextureAtlas()}_reportFocus(){var D;!((D=this.element)===null||D===void 0)&&D.classList.contains("focus")?this.coreService.triggerDataEvent(H.C0.ESC+"[I"):this.coreService.triggerDataEvent(H.C0.ESC+"[O")}_reportWindowsOptions(D){if(this._renderService)switch(D){case $.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const z=this._renderService.dimensions.css.canvas.width.toFixed(0),K=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${H.C0.ESC}[4;${K};${z}t`);break;case $.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const W=this._renderService.dimensions.css.cell.width.toFixed(0),ae=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${H.C0.ESC}[6;${ae};${W}t`)}}cancel(D,z){if(this.options.cancelEvents||z)return D.preventDefault(),D.stopPropagation(),!1}}o.Terminal=G},9924:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(l,c=1e3){this._renderCallback=l,this._debounceThresholdMS=c,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(l,c,u){this._rowCount=u,l=l!==void 0?l:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c;const d=Date.now();if(d-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=d,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=d-this._lastRefreshMs,_=this._debounceThresholdMS-g;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},_)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const l=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,c)}}},1680:function(a,o,l){var c=this&&this.__decorate||function(f,h,m,v){var w,C=arguments.length,E=C<3?h:v===null?v=Object.getOwnPropertyDescriptor(h,m):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(f,h,m,v);else for(var S=f.length-1;S>=0;S--)(w=f[S])&&(E=(C<3?w(E):C>3?w(h,m,E):w(h,m))||E);return C>3&&E&&Object.defineProperty(h,m,E),E},u=this&&this.__param||function(f,h){return function(m,v){h(m,v,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const d=l(3656),g=l(4725),_=l(8460),y=l(844),b=l(2585);let p=o.Viewport=class extends y.Disposable{constructor(f,h,m,v,w,C,E,S){super(),this._viewportElement=f,this._scrollArea=h,this._bufferService=m,this._optionsService=v,this._charSizeService=w,this._renderService=C,this._coreBrowserService=E,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new _.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(x=>this._activeBuffer=x.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(x=>this._renderDimensions=x)),this._handleThemeChange(S.colors),this.register(S.onChangeColors(x=>this._handleThemeChange(x))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(f){this._viewportElement.style.backgroundColor=f.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(f){if(f)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderService.dimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const h=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.css.canvas.height);this._lastRecordedBufferHeight!==h&&(this._lastRecordedBufferHeight=h,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const f=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==f&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=f),this._refreshAnimationFrame=null}syncScrollArea(f=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(f);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(f)}_handleScroll(f){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const h=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const f=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(f*(this._smoothScrollState.target-this._smoothScrollState.origin)),f<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(f,h){const m=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(h<0&&this._viewportElement.scrollTop!==0||h>0&&m<this._lastRecordedBufferHeight)||(f.cancelable&&f.preventDefault(),!1)}handleWheel(f){const h=this._getPixelsScrolled(f);return h!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+h:this._smoothScrollState.target+=h,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=h,this._bubbleScroll(f,h))}scrollLines(f){if(f!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const h=f*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+h,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:f,suppressScrollEvent:!1})}_getPixelsScrolled(f){if(f.deltaY===0||f.shiftKey)return 0;let h=this._applyScrollModifier(f.deltaY,f);return f.deltaMode===WheelEvent.DOM_DELTA_LINE?h*=this._currentRowHeight:f.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(h*=this._currentRowHeight*this._bufferService.rows),h}getBufferElements(f,h){var m;let v,w="";const C=[],E=h??this._bufferService.buffer.lines.length,S=this._bufferService.buffer.lines;for(let x=f;x<E;x++){const L=S.get(x);if(!L)continue;const P=(m=S.get(x+1))===null||m===void 0?void 0:m.isWrapped;if(w+=L.translateToString(!P),!P||x===S.length-1){const A=document.createElement("div");A.textContent=w,C.push(A),w.length>0&&(v=A),w=""}}return{bufferElements:C,cursorElement:v}}getLinesScrolled(f){if(f.deltaY===0||f.shiftKey)return 0;let h=this._applyScrollModifier(f.deltaY,f);return f.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(h/=this._currentRowHeight+0,this._wheelPartialScroll+=h,h=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):f.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(h*=this._bufferService.rows),h}_applyScrollModifier(f,h){const m=this._optionsService.rawOptions.fastScrollModifier;return m==="alt"&&h.altKey||m==="ctrl"&&h.ctrlKey||m==="shift"&&h.shiftKey?f*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:f*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(f){this._lastTouchY=f.touches[0].pageY}handleTouchMove(f){const h=this._lastTouchY-f.touches[0].pageY;return this._lastTouchY=f.touches[0].pageY,h!==0&&(this._viewportElement.scrollTop+=h,this._bubbleScroll(f,h))}};o.Viewport=p=c([u(2,b.IBufferService),u(3,b.IOptionsService),u(4,g.ICharSizeService),u(5,g.IRenderService),u(6,g.ICoreBrowserService),u(7,g.IThemeService)],p)},3107:function(a,o,l){var c=this&&this.__decorate||function(p,f,h,m){var v,w=arguments.length,C=w<3?f:m===null?m=Object.getOwnPropertyDescriptor(f,h):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(p,f,h,m);else for(var E=p.length-1;E>=0;E--)(v=p[E])&&(C=(w<3?v(C):w>3?v(f,h,C):v(f,h))||C);return w>3&&C&&Object.defineProperty(f,h,C),C},u=this&&this.__param||function(p,f){return function(h,m){f(h,m,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const d=l(3656),g=l(4725),_=l(844),y=l(2585);let b=o.BufferDecorationRenderer=class extends _.Disposable{constructor(p,f,h,m){super(),this._screenElement=p,this._bufferService=f,this._decorationService=h,this._renderService=m,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register((0,d.addDisposableDomListener)(window,"resize",()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(v=>this._removeDecoration(v))),this.register((0,_.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(const p of this._decorationService.decorations)this._renderDecoration(p);this._dimensionsChanged=!1}_renderDecoration(p){this._refreshStyle(p),this._dimensionsChanged&&this._refreshXPosition(p)}_createElement(p){var f,h;const m=document.createElement("div");m.classList.add("xterm-decoration"),m.classList.toggle("xterm-decoration-top-layer",((f=p==null?void 0:p.options)===null||f===void 0?void 0:f.layer)==="top"),m.style.width=`${Math.round((p.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,m.style.height=(p.options.height||1)*this._renderService.dimensions.css.cell.height+"px",m.style.top=(p.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",m.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=(h=p.options.x)!==null&&h!==void 0?h:0;return v&&v>this._bufferService.cols&&(m.style.display="none"),this._refreshXPosition(p,m),m}_refreshStyle(p){const f=p.marker.line-this._bufferService.buffers.active.ydisp;if(f<0||f>=this._bufferService.rows)p.element&&(p.element.style.display="none",p.onRenderEmitter.fire(p.element));else{let h=this._decorationElements.get(p);h||(h=this._createElement(p),p.element=h,this._decorationElements.set(p,h),this._container.appendChild(h),p.onDispose(()=>{this._decorationElements.delete(p),h.remove()})),h.style.top=f*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",p.onRenderEmitter.fire(h)}}_refreshXPosition(p,f=p.element){var h;if(!f)return;const m=(h=p.options.x)!==null&&h!==void 0?h:0;(p.options.anchor||"left")==="right"?f.style.right=m?m*this._renderService.dimensions.css.cell.width+"px":"":f.style.left=m?m*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(p){var f;(f=this._decorationElements.get(p))===null||f===void 0||f.remove(),this._decorationElements.delete(p),p.dispose()}};o.BufferDecorationRenderer=b=c([u(1,y.IBufferService),u(2,y.IDecorationService),u(3,g.IRenderService)],b)},5871:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(l){if(l.options.overviewRulerOptions){for(const c of this._zones)if(c.color===l.options.overviewRulerOptions.color&&c.position===l.options.overviewRulerOptions.position){if(this._lineIntersectsZone(c,l.marker.line))return;if(this._lineAdjacentToZone(c,l.marker.line,l.options.overviewRulerOptions.position))return void this._addLineToZone(c,l.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=l.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=l.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=l.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=l.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:l.options.overviewRulerOptions.color,position:l.options.overviewRulerOptions.position,startBufferLine:l.marker.line,endBufferLine:l.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(l){this._linePadding=l}_lineIntersectsZone(l,c){return c>=l.startBufferLine&&c<=l.endBufferLine}_lineAdjacentToZone(l,c,u){return c>=l.startBufferLine-this._linePadding[u||"full"]&&c<=l.endBufferLine+this._linePadding[u||"full"]}_addLineToZone(l,c){l.startBufferLine=Math.min(l.startBufferLine,c),l.endBufferLine=Math.max(l.endBufferLine,c)}}},5744:function(a,o,l){var c=this&&this.__decorate||function(v,w,C,E){var S,x=arguments.length,L=x<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,C):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(v,w,C,E);else for(var P=v.length-1;P>=0;P--)(S=v[P])&&(L=(x<3?S(L):x>3?S(w,C,L):S(w,C))||L);return x>3&&L&&Object.defineProperty(w,C,L),L},u=this&&this.__param||function(v,w){return function(C,E){w(C,E,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const d=l(5871),g=l(3656),_=l(4725),y=l(844),b=l(2585),p={full:0,left:0,center:0,right:0},f={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let m=o.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(v,w,C,E,S,x,L){var P;super(),this._viewportElement=v,this._screenElement=w,this._bufferService=C,this._decorationService=E,this._renderService=S,this._optionsService=x,this._coreBrowseService=L,this._colorZoneStore=new d.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(P=this._viewportElement.parentElement)===null||P===void 0||P.insertBefore(this._canvas,this._viewportElement);const A=this._canvas.getContext("2d");if(!A)throw new Error("Ctx cannot be null");this._ctx=A,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)(()=>{var k;(k=this._canvas)===null||k===void 0||k.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register((0,g.addDisposableDomListener)(this._coreBrowseService.window,"resize",()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){const v=Math.floor(this._canvas.width/3),w=Math.ceil(this._canvas.width/3);f.full=this._canvas.width,f.left=v,f.center=w,f.right=v,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=f.left,h.right=f.left+f.center}_refreshDrawHeightConstants(){p.full=Math.round(2*this._coreBrowseService.dpr);const v=this._canvas.height/this._bufferService.buffer.lines.length,w=Math.round(Math.max(Math.min(v,12),6)*this._coreBrowseService.dpr);p.left=w,p.center=w,p.right=w}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowseService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowseService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const w of this._decorationService.decorations)this._colorZoneStore.addDecoration(w);this._ctx.lineWidth=1;const v=this._colorZoneStore.zones;for(const w of v)w.position!=="full"&&this._renderColorZone(w);for(const w of v)w.position==="full"&&this._renderColorZone(w);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(v){this._ctx.fillStyle=v.color,this._ctx.fillRect(h[v.position||"full"],Math.round((this._canvas.height-1)*(v.startBufferLine/this._bufferService.buffers.active.lines.length)-p[v.position||"full"]/2),f[v.position||"full"],Math.round((this._canvas.height-1)*((v.endBufferLine-v.startBufferLine)/this._bufferService.buffers.active.lines.length)+p[v.position||"full"]))}_queueRefresh(v,w){this._shouldUpdateDimensions=v||this._shouldUpdateDimensions,this._shouldUpdateAnchor=w||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowseService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};o.OverviewRulerRenderer=m=c([u(2,b.IBufferService),u(3,b.IDecorationService),u(4,_.IRenderService),u(5,b.IOptionsService),u(6,_.ICoreBrowserService)],m)},2950:function(a,o,l){var c=this&&this.__decorate||function(b,p,f,h){var m,v=arguments.length,w=v<3?p:h===null?h=Object.getOwnPropertyDescriptor(p,f):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(b,p,f,h);else for(var C=b.length-1;C>=0;C--)(m=b[C])&&(w=(v<3?m(w):v>3?m(p,f,w):m(p,f))||w);return v>3&&w&&Object.defineProperty(p,f,w),w},u=this&&this.__param||function(b,p){return function(f,h){p(f,h,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const d=l(4725),g=l(2585),_=l(2584);let y=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(b,p,f,h,m,v){this._textarea=b,this._compositionView=p,this._bufferService=f,this._optionsService=h,this._coreService=m,this._renderService=v,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(b){this._compositionView.textContent=b.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(b){if(this._isComposing||this._isSendingComposition){if(b.keyCode===229||b.keyCode===16||b.keyCode===17||b.keyCode===18)return!1;this._finalizeComposition(!1)}return b.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(b){if(this._compositionView.classList.remove("active"),this._isComposing=!1,b){const p={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let f;this._isSendingComposition=!1,p.start+=this._dataAlreadySent.length,f=this._isComposing?this._textarea.value.substring(p.start,p.end):this._textarea.value.substring(p.start),f.length>0&&this._coreService.triggerDataEvent(f,!0)}},0)}else{this._isSendingComposition=!1;const p=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(p,!0)}}_handleAnyTextareaChanges(){const b=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const p=this._textarea.value,f=p.replace(b,"");this._dataAlreadySent=f,p.length>b.length?this._coreService.triggerDataEvent(f,!0):p.length<b.length?this._coreService.triggerDataEvent(`${_.C0.DEL}`,!0):p.length===b.length&&p!==b&&this._coreService.triggerDataEvent(p,!0)}},0)}updateCompositionElements(b){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const p=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),f=this._renderService.dimensions.css.cell.height,h=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,m=p*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=m+"px",this._compositionView.style.top=h+"px",this._compositionView.style.height=f+"px",this._compositionView.style.lineHeight=f+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const v=this._compositionView.getBoundingClientRect();this._textarea.style.left=m+"px",this._textarea.style.top=h+"px",this._textarea.style.width=Math.max(v.width,1)+"px",this._textarea.style.height=Math.max(v.height,1)+"px",this._textarea.style.lineHeight=v.height+"px"}b||setTimeout(()=>this.updateCompositionElements(!0),0)}}};o.CompositionHelper=y=c([u(2,g.IBufferService),u(3,g.IOptionsService),u(4,g.ICoreService),u(5,d.IRenderService)],y)},9806:(a,o)=>{function l(c,u,d){const g=d.getBoundingClientRect(),_=c.getComputedStyle(d),y=parseInt(_.getPropertyValue("padding-left")),b=parseInt(_.getPropertyValue("padding-top"));return[u.clientX-g.left-y,u.clientY-g.top-b]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=l,o.getCoords=function(c,u,d,g,_,y,b,p,f){if(!y)return;const h=l(c,u,d);return h?(h[0]=Math.ceil((h[0]+(f?b/2:0))/b),h[1]=Math.ceil(h[1]/p),h[0]=Math.min(Math.max(h[0],1),g+(f?1:0)),h[1]=Math.min(Math.max(h[1],1),_),h):void 0}},9504:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const c=l(2584);function u(p,f,h,m){const v=p-d(p,h),w=f-d(f,h),C=Math.abs(v-w)-function(E,S,x){let L=0;const P=E-d(E,x),A=S-d(S,x);for(let k=0;k<Math.abs(P-A);k++){const B=g(E,S)==="A"?-1:1,N=x.buffer.lines.get(P+B*k);N!=null&&N.isWrapped&&L++}return L}(p,f,h);return b(C,y(g(p,f),m))}function d(p,f){let h=0,m=f.buffer.lines.get(p),v=m==null?void 0:m.isWrapped;for(;v&&p>=0&&p<f.rows;)h++,m=f.buffer.lines.get(--p),v=m==null?void 0:m.isWrapped;return h}function g(p,f){return p>f?"A":"B"}function _(p,f,h,m,v,w){let C=p,E=f,S="";for(;C!==h||E!==m;)C+=v?1:-1,v&&C>w.cols-1?(S+=w.buffer.translateBufferLineToString(E,!1,p,C),C=0,p=0,E++):!v&&C<0&&(S+=w.buffer.translateBufferLineToString(E,!1,0,p+1),C=w.cols-1,p=C,E--);return S+w.buffer.translateBufferLineToString(E,!1,p,C)}function y(p,f){const h=f?"O":"[";return c.C0.ESC+h+p}function b(p,f){p=Math.floor(p);let h="";for(let m=0;m<p;m++)h+=f;return h}o.moveToCellSequence=function(p,f,h,m){const v=h.buffer.x,w=h.buffer.y;if(!h.buffer.hasScrollback)return function(S,x,L,P,A,k){return u(x,P,A,k).length===0?"":b(_(S,x,S,x-d(x,A),!1,A).length,y("D",k))}(v,w,0,f,h,m)+u(w,f,h,m)+function(S,x,L,P,A,k){let B;B=u(x,P,A,k).length>0?P-d(P,A):x;const N=P,F=function(H,T,R,O,I,$){let V;return V=u(R,O,I,$).length>0?O-d(O,I):T,H<R&&V<=O||H>=R&&V<O?"C":"D"}(S,x,L,P,A,k);return b(_(S,B,L,N,F==="C",A).length,y(F,k))}(v,w,p,f,h,m);let C;if(w===f)return C=v>p?"D":"C",b(Math.abs(v-p),y(C,m));C=w>f?"D":"C";const E=Math.abs(w-f);return b(function(S,x){return x.cols-S}(w>f?p:v,h)+(E-1)*h.cols+1+((w>f?v:p)-1),y(C,m))}},1296:function(a,o,l){var c=this&&this.__decorate||function(A,k,B,N){var F,H=arguments.length,T=H<3?k:N===null?N=Object.getOwnPropertyDescriptor(k,B):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(A,k,B,N);else for(var R=A.length-1;R>=0;R--)(F=A[R])&&(T=(H<3?F(T):H>3?F(k,B,T):F(k,B))||T);return H>3&&T&&Object.defineProperty(k,B,T),T},u=this&&this.__param||function(A,k){return function(B,N){k(B,N,A)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const d=l(3787),g=l(2550),_=l(2223),y=l(6171),b=l(4725),p=l(8055),f=l(8460),h=l(844),m=l(2585),v="xterm-dom-renderer-owner-",w="xterm-rows",C="xterm-fg-",E="xterm-bg-",S="xterm-focus",x="xterm-selection";let L=1,P=o.DomRenderer=class extends h.Disposable{constructor(A,k,B,N,F,H,T,R,O,I){super(),this._element=A,this._screenElement=k,this._viewportElement=B,this._linkifier2=N,this._charSizeService=H,this._optionsService=T,this._bufferService=R,this._coreBrowserService=O,this._themeService=I,this._terminalClass=L++,this._rowElements=[],this.onRequestRedraw=this.register(new f.EventEmitter).event,this._rowContainer=document.createElement("div"),this._rowContainer.classList.add(w),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=document.createElement("div"),this._selectionContainer.classList.add(x),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,y.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors($=>this._injectCss($))),this._injectCss(this._themeService.colors),this._rowFactory=F.createInstance(d.DomRendererRowFactory,document),this._element.classList.add(v+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline($=>this._handleLinkHover($))),this.register(this._linkifier2.onHideLinkUnderline($=>this._handleLinkLeave($))),this.register((0,h.toDisposable)(()=>{this._element.classList.remove(v+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new g.WidthCache(document),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const A=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*A,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*A),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/A),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/A),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const B of this._rowElements)B.style.width=`${this.dimensions.css.canvas.width}px`,B.style.height=`${this.dimensions.css.cell.height}px`,B.style.lineHeight=`${this.dimensions.css.cell.height}px`,B.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const k=`${this._terminalSelector} .${w} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=k,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(A){this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let k=`${this._terminalSelector} .${w} { color: ${A.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;k+=`${this._terminalSelector} .${w} .xterm-dim { color: ${p.color.multiplyOpacity(A.foreground,.5).css};}`,k+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`,k+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",k+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${A.cursor.css}; color: ${A.cursorAccent.css}; } 50% { background-color: inherit; color: ${A.cursor.css}; }}`,k+=`${this._terminalSelector} .${w}.${S} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${w}.${S} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-block { background-color: ${A.cursor.css}; color: ${A.cursorAccent.css};}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${A.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${A.cursor.css} inset;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${A.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,k+=`${this._terminalSelector} .${x} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${x} div { position: absolute; background-color: ${A.selectionBackgroundOpaque.css};}${this._terminalSelector} .${x} div { position: absolute; background-color: ${A.selectionInactiveBackgroundOpaque.css};}`;for(const[B,N]of A.ansi.entries())k+=`${this._terminalSelector} .${C}${B} { color: ${N.css}; }${this._terminalSelector} .${C}${B}.xterm-dim { color: ${p.color.multiplyOpacity(N,.5).css}; }${this._terminalSelector} .${E}${B} { background-color: ${N.css}; }`;k+=`${this._terminalSelector} .${C}${_.INVERTED_DEFAULT_COLOR} { color: ${p.color.opaque(A.background).css}; }${this._terminalSelector} .${C}${_.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${p.color.multiplyOpacity(p.color.opaque(A.background),.5).css}; }${this._terminalSelector} .${E}${_.INVERTED_DEFAULT_COLOR} { background-color: ${A.foreground.css}; }`,this._themeStyleElement.textContent=k}_setDefaultSpacing(){const A=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${A}px`,this._rowFactory.defaultSpacing=A}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(A,k){for(let B=this._rowElements.length;B<=k;B++){const N=document.createElement("div");this._rowContainer.appendChild(N),this._rowElements.push(N)}for(;this._rowElements.length>k;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(A,k){this._refreshRowElements(A,k),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(S)}handleFocus(){this._rowContainer.classList.add(S),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(A,k,B){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(A,k,B),this.renderRows(0,this._bufferService.rows-1),!A||!k)return;const N=A[1]-this._bufferService.buffer.ydisp,F=k[1]-this._bufferService.buffer.ydisp,H=Math.max(N,0),T=Math.min(F,this._bufferService.rows-1);if(H>=this._bufferService.rows||T<0)return;const R=document.createDocumentFragment();if(B){const O=A[0]>k[0];R.appendChild(this._createSelectionElement(H,O?k[0]:A[0],O?A[0]:k[0],T-H+1))}else{const O=N===H?A[0]:0,I=H===F?k[0]:this._bufferService.cols;R.appendChild(this._createSelectionElement(H,O,I));const $=T-H-1;if(R.appendChild(this._createSelectionElement(H+1,0,this._bufferService.cols,$)),H!==T){const V=F===T?k[0]:this._bufferService.cols;R.appendChild(this._createSelectionElement(T,0,V))}}this._selectionContainer.appendChild(R)}_createSelectionElement(A,k,B,N=1){const F=document.createElement("div");return F.style.height=N*this.dimensions.css.cell.height+"px",F.style.top=A*this.dimensions.css.cell.height+"px",F.style.left=k*this.dimensions.css.cell.width+"px",F.style.width=this.dimensions.css.cell.width*(B-k)+"px",F}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const A of this._rowElements)A.replaceChildren()}renderRows(A,k){const B=this._bufferService.buffer,N=B.ybase+B.y,F=Math.min(B.x,this._bufferService.cols-1),H=this._optionsService.rawOptions.cursorBlink,T=this._optionsService.rawOptions.cursorStyle,R=this._optionsService.rawOptions.cursorInactiveStyle;for(let O=A;O<=k;O++){const I=O+B.ydisp,$=this._rowElements[O],V=B.lines.get(I);if(!$||!V)break;$.replaceChildren(...this._rowFactory.createRow(V,I,I===N,T,R,F,H,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${v}${this._terminalClass}`}_handleLinkHover(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!0)}_handleLinkLeave(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!1)}_setCellUnderline(A,k,B,N,F,H){B<0&&(A=0),N<0&&(k=0);const T=this._bufferService.rows-1;B=Math.max(Math.min(B,T),0),N=Math.max(Math.min(N,T),0),F=Math.min(F,this._bufferService.cols);const R=this._bufferService.buffer,O=R.ybase+R.y,I=Math.min(R.x,F-1),$=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,U=this._optionsService.rawOptions.cursorInactiveStyle;for(let G=B;G<=N;++G){const le=G+R.ydisp,D=this._rowElements[G],z=R.lines.get(le);if(!D||!z)break;D.replaceChildren(...this._rowFactory.createRow(z,le,le===O,V,U,I,$,this.dimensions.css.cell.width,this._widthCache,H?G===B?A:0:-1,H?(G===N?k:F)-1:-1))}}};o.DomRenderer=P=c([u(4,m.IInstantiationService),u(5,b.ICharSizeService),u(6,m.IOptionsService),u(7,m.IBufferService),u(8,b.ICoreBrowserService),u(9,b.IThemeService)],P)},3787:function(a,o,l){var c=this&&this.__decorate||function(C,E,S,x){var L,P=arguments.length,A=P<3?E:x===null?x=Object.getOwnPropertyDescriptor(E,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(C,E,S,x);else for(var k=C.length-1;k>=0;k--)(L=C[k])&&(A=(P<3?L(A):P>3?L(E,S,A):L(E,S))||A);return P>3&&A&&Object.defineProperty(E,S,A),A},u=this&&this.__param||function(C,E){return function(S,x){E(S,x,C)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const d=l(2223),g=l(643),_=l(511),y=l(2585),b=l(8055),p=l(4725),f=l(4269),h=l(6171),m=l(3734);let v=o.DomRendererRowFactory=class{constructor(C,E,S,x,L,P,A){this._document=C,this._characterJoinerService=E,this._optionsService=S,this._coreBrowserService=x,this._coreService=L,this._decorationService=P,this._themeService=A,this._workCell=new _.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(C,E,S){this._selectionStart=C,this._selectionEnd=E,this._columnSelectMode=S}createRow(C,E,S,x,L,P,A,k,B,N,F){const H=[],T=this._characterJoinerService.getJoinedCharacters(E),R=this._themeService.colors;let O,I=C.getNoBgTrimmedLength();S&&I<P+1&&(I=P+1);let $=0,V="",U=0,G=0,le=0,D=!1,z=0,K=!1,W=0;const ae=[],ee=N!==-1&&F!==-1;for(let me=0;me<I;me++){C.loadCell(me,this._workCell);let ot=this._workCell.getWidth();if(ot===0)continue;let tr=!1,ms=me,fe=this._workCell;if(T.length>0&&me===T[0][0]){tr=!0;const Xe=T.shift();fe=new f.JoinedCellData(this._workCell,C.translateToString(!0,Xe[0],Xe[1]),Xe[1]-Xe[0]),ms=Xe[1]-1,ot=fe.getWidth()}const Co=this._isCellInSelection(me,E),fu=S&&me===P,pu=ee&&me>=N&&me<=F;let gu=!1;this._decorationService.forEachDecorationAtCell(me,E,void 0,Xe=>{gu=!0});let wl=fe.getChars()||g.WHITESPACE_CELL_CHAR;if(wl===" "&&(fe.isUnderline()||fe.isOverline())&&(wl=" "),W=ot*k-B.get(wl,fe.isBold(),fe.isItalic()),O){if($&&(Co&&K||!Co&&!K&&fe.bg===U)&&(Co&&K&&R.selectionForeground||fe.fg===G)&&fe.extended.ext===le&&pu===D&&W===z&&!fu&&!tr&&!gu){V+=wl,$++;continue}$&&(O.textContent=V),O=this._document.createElement("span"),$=0,V=""}else O=this._document.createElement("span");if(U=fe.bg,G=fe.fg,le=fe.extended.ext,D=pu,z=W,K=Co,tr&&P>=me&&P<=ms&&(P=me),!this._coreService.isCursorHidden&&fu){if(ae.push("xterm-cursor"),this._coreBrowserService.isFocused)A&&ae.push("xterm-cursor-blink"),ae.push(x==="bar"?"xterm-cursor-bar":x==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":ae.push("xterm-cursor-outline");break;case"block":ae.push("xterm-cursor-block");break;case"bar":ae.push("xterm-cursor-bar");break;case"underline":ae.push("xterm-cursor-underline")}}if(fe.isBold()&&ae.push("xterm-bold"),fe.isItalic()&&ae.push("xterm-italic"),fe.isDim()&&ae.push("xterm-dim"),V=fe.isInvisible()?g.WHITESPACE_CELL_CHAR:fe.getChars()||g.WHITESPACE_CELL_CHAR,fe.isUnderline()&&(ae.push(`xterm-underline-${fe.extended.underlineStyle}`),V===" "&&(V=" "),!fe.isUnderlineColorDefault()))if(fe.isUnderlineColorRGB())O.style.textDecorationColor=`rgb(${m.AttributeData.toColorRGB(fe.getUnderlineColor()).join(",")})`;else{let Xe=fe.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&fe.isBold()&&Xe<8&&(Xe+=8),O.style.textDecorationColor=R.ansi[Xe].css}fe.isOverline()&&(ae.push("xterm-overline"),V===" "&&(V=" ")),fe.isStrikethrough()&&ae.push("xterm-strikethrough"),pu&&(O.style.textDecoration="underline");let Ar=fe.getFgColor(),Eo=fe.getFgColorMode(),ln=fe.getBgColor(),xo=fe.getBgColorMode();const mu=!!fe.isInverse();if(mu){const Xe=Ar;Ar=ln,ln=Xe;const m3=Eo;Eo=xo,xo=m3}let qn,vu,Xn,To=!1;switch(this._decorationService.forEachDecorationAtCell(me,E,void 0,Xe=>{Xe.options.layer!=="top"&&To||(Xe.backgroundColorRGB&&(xo=50331648,ln=Xe.backgroundColorRGB.rgba>>8&16777215,qn=Xe.backgroundColorRGB),Xe.foregroundColorRGB&&(Eo=50331648,Ar=Xe.foregroundColorRGB.rgba>>8&16777215,vu=Xe.foregroundColorRGB),To=Xe.options.layer==="top")}),!To&&Co&&(qn=this._coreBrowserService.isFocused?R.selectionBackgroundOpaque:R.selectionInactiveBackgroundOpaque,ln=qn.rgba>>8&16777215,xo=50331648,To=!0,R.selectionForeground&&(Eo=50331648,Ar=R.selectionForeground.rgba>>8&16777215,vu=R.selectionForeground)),To&&ae.push("xterm-decoration-top"),xo){case 16777216:case 33554432:Xn=R.ansi[ln],ae.push(`xterm-bg-${ln}`);break;case 50331648:Xn=b.rgba.toColor(ln>>16,ln>>8&255,255&ln),this._addStyle(O,`background-color:#${w((ln>>>0).toString(16),"0",6)}`);break;default:mu?(Xn=R.foreground,ae.push(`xterm-bg-${d.INVERTED_DEFAULT_COLOR}`)):Xn=R.background}switch(qn||fe.isDim()&&(qn=b.color.multiplyOpacity(Xn,.5)),Eo){case 16777216:case 33554432:fe.isBold()&&Ar<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ar+=8),this._applyMinimumContrast(O,Xn,R.ansi[Ar],fe,qn,void 0)||ae.push(`xterm-fg-${Ar}`);break;case 50331648:const Xe=b.rgba.toColor(Ar>>16&255,Ar>>8&255,255&Ar);this._applyMinimumContrast(O,Xn,Xe,fe,qn,vu)||this._addStyle(O,`color:#${w(Ar.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(O,Xn,R.foreground,fe,qn,void 0)||mu&&ae.push(`xterm-fg-${d.INVERTED_DEFAULT_COLOR}`)}ae.length&&(O.className=ae.join(" "),ae.length=0),fu||tr||gu?O.textContent=V:$++,W!==this.defaultSpacing&&(O.style.letterSpacing=`${W}px`),H.push(O),me=ms}return O&&$&&(O.textContent=V),H}_applyMinimumContrast(C,E,S,x,L,P){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,h.excludeFromContrastRatioDemands)(x.getCode()))return!1;const A=this._getContrastCache(x);let k;if(L||P||(k=A.getColor(E.rgba,S.rgba)),k===void 0){const B=this._optionsService.rawOptions.minimumContrastRatio/(x.isDim()?2:1);k=b.color.ensureContrastRatio(L||E,P||S,B),A.setColor((L||E).rgba,(P||S).rgba,k??null)}return!!k&&(this._addStyle(C,`color:${k.css}`),!0)}_getContrastCache(C){return C.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(C,E){C.setAttribute("style",`${C.getAttribute("style")||""}${E};`)}_isCellInSelection(C,E){const S=this._selectionStart,x=this._selectionEnd;return!(!S||!x)&&(this._columnSelectMode?S[0]<=x[0]?C>=S[0]&&E>=S[1]&&C<x[0]&&E<=x[1]:C<S[0]&&E>=S[1]&&C>=x[0]&&E<=x[1]:E>S[1]&&E<x[1]||S[1]===x[1]&&E===S[1]&&C>=S[0]&&C<x[0]||S[1]<x[1]&&E===x[1]&&C<x[0]||S[1]<x[1]&&E===S[1]&&C>=S[0])}};function w(C,E,S){for(;C.length<S;)C=E+C;return C}o.DomRendererRowFactory=v=c([u(1,p.ICharacterJoinerService),u(2,y.IOptionsService),u(3,p.ICoreBrowserService),u(4,y.ICoreService),u(5,y.IDecorationService),u(6,p.IThemeService)],v)},2550:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(l){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=l.createElement("div"),this._container.style.position="absolute",this._container.style.top="-50000px",this._container.style.width="50000px",this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const c=l.createElement("span"),u=l.createElement("span");u.style.fontWeight="bold";const d=l.createElement("span");d.style.fontStyle="italic";const g=l.createElement("span");g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[c,u,d,g],this._container.appendChild(c),this._container.appendChild(u),this._container.appendChild(d),this._container.appendChild(g),l.body.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(l,c,u,d){l===this._font&&c===this._fontSize&&u===this._weight&&d===this._weightBold||(this._font=l,this._fontSize=c,this._weight=u,this._weightBold=d,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${u}`,this._measureElements[1].style.fontWeight=`${d}`,this._measureElements[2].style.fontWeight=`${u}`,this._measureElements[3].style.fontWeight=`${d}`,this.clear())}get(l,c,u){let d=0;if(!c&&!u&&l.length===1&&(d=l.charCodeAt(0))<256)return this._flat[d]!==-9999?this._flat[d]:this._flat[d]=this._measure(l,0);let g=l;c&&(g+="B"),u&&(g+="I");let _=this._holey.get(g);if(_===void 0){let y=0;c&&(y|=1),u&&(y|=2),_=this._measure(l,y),this._holey.set(g,_)}return _}_measure(l,c){const u=this._measureElements[c];return u.textContent=l.repeat(32),u.offsetWidth/32}}},2223:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const c=l(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},6171:(a,o)=>{function l(c){return 57508<=c&&c<=57558}Object.defineProperty(o,"__esModule",{value:!0}),o.createRenderDimensions=o.excludeFromContrastRatioDemands=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(c){if(!c)throw new Error("value must not be falsy");return c},o.isPowerlineGlyph=l,o.isRestrictedPowerlineGlyph=function(c){return 57520<=c&&c<=57527},o.excludeFromContrastRatioDemands=function(c){return l(c)||function(u){return 9472<=u&&u<=9631}(c)},o.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}}}}},456:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(l){this._bufferService=l,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?l%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)-1]:[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[l,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[Math.max(l,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const l=this.selectionStart,c=this.selectionEnd;return!(!l||!c)&&(l[1]>c[1]||l[1]===c[1]&&l[0]>c[0])}handleTrim(l){return this.selectionStart&&(this.selectionStart[1]-=l),this.selectionEnd&&(this.selectionEnd[1]-=l),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,o,l){var c=this&&this.__decorate||function(p,f,h,m){var v,w=arguments.length,C=w<3?f:m===null?m=Object.getOwnPropertyDescriptor(f,h):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(p,f,h,m);else for(var E=p.length-1;E>=0;E--)(v=p[E])&&(C=(w<3?v(C):w>3?v(f,h,C):v(f,h))||C);return w>3&&C&&Object.defineProperty(f,h,C),C},u=this&&this.__param||function(p,f){return function(h,m){f(h,m,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const d=l(2585),g=l(8460),_=l(844);let y=o.CharSizeService=class extends _.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(p,f,h){super(),this._optionsService=h,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new b(p,f,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const p=this._measureStrategy.measure();p.width===this.width&&p.height===this.height||(this.width=p.width,this.height=p.height,this._onCharSizeChange.fire())}};o.CharSizeService=y=c([u(2,d.IOptionsService)],y);class b{constructor(f,h,m){this._document=f,this._parentElement=h,this._optionsService=m,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`;const f={height:Number(this._measureElement.offsetHeight),width:Number(this._measureElement.offsetWidth)};return f.width!==0&&f.height!==0&&(this._result.width=f.width/32,this._result.height=Math.ceil(f.height)),this._result}}},4269:function(a,o,l){var c=this&&this.__decorate||function(f,h,m,v){var w,C=arguments.length,E=C<3?h:v===null?v=Object.getOwnPropertyDescriptor(h,m):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(f,h,m,v);else for(var S=f.length-1;S>=0;S--)(w=f[S])&&(E=(C<3?w(E):C>3?w(h,m,E):w(h,m))||E);return C>3&&E&&Object.defineProperty(h,m,E),E},u=this&&this.__param||function(f,h){return function(m,v){h(m,v,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const d=l(3734),g=l(643),_=l(511),y=l(2585);class b extends d.AttributeData{constructor(h,m,v){super(),this.content=0,this.combinedData="",this.fg=h.fg,this.bg=h.bg,this.combinedData=m,this._width=v}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(h){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=b;let p=o.CharacterJoinerService=class Hb{constructor(h){this._bufferService=h,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new _.CellData}register(h){const m={id:this._nextCharacterJoinerId++,handler:h};return this._characterJoiners.push(m),m.id}deregister(h){for(let m=0;m<this._characterJoiners.length;m++)if(this._characterJoiners[m].id===h)return this._characterJoiners.splice(m,1),!0;return!1}getJoinedCharacters(h){if(this._characterJoiners.length===0)return[];const m=this._bufferService.buffer.lines.get(h);if(!m||m.length===0)return[];const v=[],w=m.translateToString(!0);let C=0,E=0,S=0,x=m.getFg(0),L=m.getBg(0);for(let P=0;P<m.getTrimmedLength();P++)if(m.loadCell(P,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==x||this._workCell.bg!==L){if(P-C>1){const A=this._getJoinedRanges(w,S,E,m,C);for(let k=0;k<A.length;k++)v.push(A[k])}C=P,S=E,x=this._workCell.fg,L=this._workCell.bg}E+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-C>1){const P=this._getJoinedRanges(w,S,E,m,C);for(let A=0;A<P.length;A++)v.push(P[A])}return v}_getJoinedRanges(h,m,v,w,C){const E=h.substring(m,v);let S=[];try{S=this._characterJoiners[0].handler(E)}catch(x){console.error(x)}for(let x=1;x<this._characterJoiners.length;x++)try{const L=this._characterJoiners[x].handler(E);for(let P=0;P<L.length;P++)Hb._mergeRanges(S,L[P])}catch(L){console.error(L)}return this._stringRangesToCellRanges(S,w,C),S}_stringRangesToCellRanges(h,m,v){let w=0,C=!1,E=0,S=h[w];if(S){for(let x=v;x<this._bufferService.cols;x++){const L=m.getWidth(x),P=m.getString(x).length||g.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!C&&S[0]<=E&&(S[0]=x,C=!0),S[1]<=E){if(S[1]=x,S=h[++w],!S)break;S[0]<=E?(S[0]=x,C=!0):C=!1}E+=P}}S&&(S[1]=this._bufferService.cols)}}static _mergeRanges(h,m){let v=!1;for(let w=0;w<h.length;w++){const C=h[w];if(v){if(m[1]<=C[0])return h[w-1][1]=m[1],h;if(m[1]<=C[1])return h[w-1][1]=Math.max(m[1],C[1]),h.splice(w,1),h;h.splice(w,1),w--}else{if(m[1]<=C[0])return h.splice(w,0,m),h;if(m[1]<=C[1])return C[0]=Math.min(m[0],C[0]),h;m[0]<C[1]&&(C[0]=Math.min(m[0],C[0]),v=!0)}}return v?h[h.length-1][1]=m[1]:h.push(m),h}};o.CharacterJoinerService=p=c([u(0,y.IBufferService)],p)},5114:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0,o.CoreBrowserService=class{constructor(l,c){this._textarea=l,this.window=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}},8934:function(a,o,l){var c=this&&this.__decorate||function(y,b,p,f){var h,m=arguments.length,v=m<3?b:f===null?f=Object.getOwnPropertyDescriptor(b,p):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(y,b,p,f);else for(var w=y.length-1;w>=0;w--)(h=y[w])&&(v=(m<3?h(v):m>3?h(b,p,v):h(b,p))||v);return m>3&&v&&Object.defineProperty(b,p,v),v},u=this&&this.__param||function(y,b){return function(p,f){b(p,f,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const d=l(4725),g=l(9806);let _=o.MouseService=class{constructor(y,b){this._renderService=y,this._charSizeService=b}getCoords(y,b,p,f,h){return(0,g.getCoords)(window,y,b,p,f,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,h)}getMouseReportCoords(y,b){const p=(0,g.getCoordsRelativeToElement)(window,y,b);if(this._charSizeService.hasValidSize)return p[0]=Math.min(Math.max(p[0],0),this._renderService.dimensions.css.canvas.width-1),p[1]=Math.min(Math.max(p[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(p[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(p[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(p[0]),y:Math.floor(p[1])}}};o.MouseService=_=c([u(0,d.IRenderService),u(1,d.ICharSizeService)],_)},3230:function(a,o,l){var c=this&&this.__decorate||function(v,w,C,E){var S,x=arguments.length,L=x<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,C):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(v,w,C,E);else for(var P=v.length-1;P>=0;P--)(S=v[P])&&(L=(x<3?S(L):x>3?S(w,C,L):S(w,C))||L);return x>3&&L&&Object.defineProperty(w,C,L),L},u=this&&this.__param||function(v,w){return function(C,E){w(C,E,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const d=l(3656),g=l(6193),_=l(5596),y=l(4725),b=l(8460),p=l(844),f=l(7226),h=l(2585);let m=o.RenderService=class extends p.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(v,w,C,E,S,x,L,P){if(super(),this._rowCount=v,this._charSizeService=E,this._renderer=this.register(new p.MutableDisposable),this._pausedResizeTask=new f.DebouncedIdleTask,this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new b.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new b.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new b.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new b.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new g.RenderDebouncer(L.window,(A,k)=>this._renderRows(A,k)),this.register(this._renderDebouncer),this._screenDprMonitor=new _.ScreenDprMonitor(L.window),this._screenDprMonitor.setListener(()=>this.handleDevicePixelRatioChange()),this.register(this._screenDprMonitor),this.register(x.onResize(()=>this._fullRefresh())),this.register(x.buffers.onBufferActivate(()=>{var A;return(A=this._renderer.value)===null||A===void 0?void 0:A.clear()})),this.register(C.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(S.onDecorationRegistered(()=>this._fullRefresh())),this.register(S.onDecorationRemoved(()=>this._fullRefresh())),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],()=>{this.clear(),this.handleResize(x.cols,x.rows),this._fullRefresh()})),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(x.buffer.y,x.buffer.y,!0))),this.register((0,d.addDisposableDomListener)(L.window,"resize",()=>this.handleDevicePixelRatioChange())),this.register(P.onChangeColors(()=>this._fullRefresh())),"IntersectionObserver"in L.window){const A=new L.window.IntersectionObserver(k=>this._handleIntersectionChange(k[k.length-1]),{threshold:0});A.observe(w),this.register({dispose:()=>A.disconnect()})}}_handleIntersectionChange(v){this._isPaused=v.isIntersecting===void 0?v.intersectionRatio===0:!v.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(v,w,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(v,w,this._rowCount))}_renderRows(v,w){this._renderer.value&&(v=Math.min(v,this._rowCount-1),w=Math.min(w,this._rowCount-1),this._renderer.value.renderRows(v,w),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:v,end:w}),this._onRender.fire({start:v,end:w}),this._isNextRenderRedrawOnly=!0)}resize(v,w){this._rowCount=w,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(v){this._renderer.value=v,this._renderer.value.onRequestRedraw(w=>this.refreshRows(w.start,w.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh()}addRefreshCallback(v){return this._renderDebouncer.addRefreshCallback(v)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var v,w;this._renderer.value&&((w=(v=this._renderer.value).clearTextureAtlas)===null||w===void 0||w.call(v),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(v,w){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value.handleResize(v,w)):this._renderer.value.handleResize(v,w),this._fullRefresh())}handleCharSizeChanged(){var v;(v=this._renderer.value)===null||v===void 0||v.handleCharSizeChanged()}handleBlur(){var v;(v=this._renderer.value)===null||v===void 0||v.handleBlur()}handleFocus(){var v;(v=this._renderer.value)===null||v===void 0||v.handleFocus()}handleSelectionChanged(v,w,C){var E;this._selectionState.start=v,this._selectionState.end=w,this._selectionState.columnSelectMode=C,(E=this._renderer.value)===null||E===void 0||E.handleSelectionChanged(v,w,C)}handleCursorMove(){var v;(v=this._renderer.value)===null||v===void 0||v.handleCursorMove()}clear(){var v;(v=this._renderer.value)===null||v===void 0||v.clear()}};o.RenderService=m=c([u(2,h.IOptionsService),u(3,y.ICharSizeService),u(4,h.IDecorationService),u(5,h.IBufferService),u(6,y.ICoreBrowserService),u(7,y.IThemeService)],m)},9312:function(a,o,l){var c=this&&this.__decorate||function(S,x,L,P){var A,k=arguments.length,B=k<3?x:P===null?P=Object.getOwnPropertyDescriptor(x,L):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(S,x,L,P);else for(var N=S.length-1;N>=0;N--)(A=S[N])&&(B=(k<3?A(B):k>3?A(x,L,B):A(x,L))||B);return k>3&&B&&Object.defineProperty(x,L,B),B},u=this&&this.__param||function(S,x){return function(L,P){x(L,P,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const d=l(9806),g=l(9504),_=l(456),y=l(4725),b=l(8460),p=l(844),f=l(6114),h=l(4841),m=l(511),v=l(2585),w=" ",C=new RegExp(w,"g");let E=o.SelectionService=class extends p.Disposable{constructor(S,x,L,P,A,k,B,N,F){super(),this._element=S,this._screenElement=x,this._linkifier=L,this._bufferService=P,this._coreService=A,this._mouseService=k,this._optionsService=B,this._renderService=N,this._coreBrowserService=F,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new m.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new b.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new b.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new b.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=H=>this._handleMouseMove(H),this._mouseUpListener=H=>this._handleMouseUp(H),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(H=>this._handleTrim(H)),this.register(this._bufferService.buffers.onBufferActivate(H=>this._handleBufferActivate(H))),this.enable(),this._model=new _.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,p.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const S=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;return!(!S||!x||S[0]===x[0]&&S[1]===x[1])}get selectionText(){const S=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;if(!S||!x)return"";const L=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(S[0]===x[0])return"";const A=S[0]<x[0]?S[0]:x[0],k=S[0]<x[0]?x[0]:S[0];for(let B=S[1];B<=x[1];B++){const N=L.translateBufferLineToString(B,!0,A,k);P.push(N)}}else{const A=S[1]===x[1]?x[0]:void 0;P.push(L.translateBufferLineToString(S[1],!0,S[0],A));for(let k=S[1]+1;k<=x[1]-1;k++){const B=L.lines.get(k),N=L.translateBufferLineToString(k,!0);B!=null&&B.isWrapped?P[P.length-1]+=N:P.push(N)}if(S[1]!==x[1]){const k=L.lines.get(x[1]),B=L.translateBufferLineToString(x[1],!0,0,x[0]);k&&k.isWrapped?P[P.length-1]+=B:P.push(B)}}return P.map(A=>A.replace(C," ")).join(f.isWindows?`\r
|
|
128
|
+
`:`
|
|
129
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(S){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),f.isLinux&&S&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(S){const x=this._getMouseBufferCoords(S),L=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!!(L&&P&&x)&&this._areCoordsInSelection(x,L,P)}isCellInSelection(S,x){const L=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!(!L||!P)&&this._areCoordsInSelection([S,x],L,P)}_areCoordsInSelection(S,x,L){return S[1]>x[1]&&S[1]<L[1]||x[1]===L[1]&&S[1]===x[1]&&S[0]>=x[0]&&S[0]<L[0]||x[1]<L[1]&&S[1]===L[1]&&S[0]<L[0]||x[1]<L[1]&&S[1]===x[1]&&S[0]>=x[0]}_selectWordAtCursor(S,x){var L,P;const A=(P=(L=this._linkifier.currentLink)===null||L===void 0?void 0:L.link)===null||P===void 0?void 0:P.range;if(A)return this._model.selectionStart=[A.start.x-1,A.start.y-1],this._model.selectionStartLength=(0,h.getRangeLength)(A,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const k=this._getMouseBufferCoords(S);return!!k&&(this._selectWordAt(k,x),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(S,x){this._model.clearSelection(),S=Math.max(S,0),x=Math.min(x,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,S],this._model.selectionEnd=[this._bufferService.cols,x],this.refresh(),this._onSelectionChange.fire()}_handleTrim(S){this._model.handleTrim(S)&&this.refresh()}_getMouseBufferCoords(S){const x=this._mouseService.getCoords(S,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(x)return x[0]--,x[1]--,x[1]+=this._bufferService.buffer.ydisp,x}_getMouseEventScrollAmount(S){let x=(0,d.getCoordsRelativeToElement)(this._coreBrowserService.window,S,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return x>=0&&x<=L?0:(x>L&&(x-=L),x=Math.min(Math.max(x,-50),50),x/=50,x/Math.abs(x)+Math.round(14*x))}shouldForceSelection(S){return f.isMac?S.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:S.shiftKey}handleMouseDown(S){if(this._mouseDownTimeStamp=S.timeStamp,(S.button!==2||!this.hasSelection)&&S.button===0){if(!this._enabled){if(!this.shouldForceSelection(S))return;S.stopPropagation()}S.preventDefault(),this._dragScrollAmount=0,this._enabled&&S.shiftKey?this._handleIncrementalClick(S):S.detail===1?this._handleSingleClick(S):S.detail===2?this._handleDoubleClick(S):S.detail===3&&this._handleTripleClick(S),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(S){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(S))}_handleSingleClick(S){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(S)?3:0,this._model.selectionStart=this._getMouseBufferCoords(S),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const x=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);x&&x.length!==this._model.selectionStart[0]&&x.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(S){this._selectWordAtCursor(S,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(S){const x=this._getMouseBufferCoords(S);x&&(this._activeSelectionMode=2,this._selectLineAt(x[1]))}shouldColumnSelect(S){return S.altKey&&!(f.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(S){if(S.stopImmediatePropagation(),!this._model.selectionStart)return;const x=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(S),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(S),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const P=L.lines.get(this._model.selectionEnd[1]);P&&P.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}x&&x[0]===this._model.selectionEnd[0]&&x[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const S=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(S.ydisp+this._bufferService.rows,S.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=S.ydisp),this.refresh()}}_handleMouseUp(S){const x=S.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&x<500&&S.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(S,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const P=(0,g.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(P,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const S=this._model.finalSelectionStart,x=this._model.finalSelectionEnd,L=!(!S||!x||S[0]===x[0]&&S[1]===x[1]);L?S&&x&&(this._oldSelectionStart&&this._oldSelectionEnd&&S[0]===this._oldSelectionStart[0]&&S[1]===this._oldSelectionStart[1]&&x[0]===this._oldSelectionEnd[0]&&x[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(S,x,L)):this._oldHasSelection&&this._fireOnSelectionChange(S,x,L)}_fireOnSelectionChange(S,x,L){this._oldSelectionStart=S,this._oldSelectionEnd=x,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(S){this.clearSelection(),this._trimListener.dispose(),this._trimListener=S.activeBuffer.lines.onTrim(x=>this._handleTrim(x))}_convertViewportColToCharacterIndex(S,x){let L=x;for(let P=0;x>=P;P++){const A=S.loadCell(P,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:A>1&&x!==P&&(L+=A-1)}return L}setSelection(S,x,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[S,x],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(S){this._isClickInSelection(S)||(this._selectWordAtCursor(S,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(S,x,L=!0,P=!0){if(S[0]>=this._bufferService.cols)return;const A=this._bufferService.buffer,k=A.lines.get(S[1]);if(!k)return;const B=A.translateBufferLineToString(S[1],!1);let N=this._convertViewportColToCharacterIndex(k,S[0]),F=N;const H=S[0]-N;let T=0,R=0,O=0,I=0;if(B.charAt(N)===" "){for(;N>0&&B.charAt(N-1)===" ";)N--;for(;F<B.length&&B.charAt(F+1)===" ";)F++}else{let U=S[0],G=S[0];k.getWidth(U)===0&&(T++,U--),k.getWidth(G)===2&&(R++,G++);const le=k.getString(G).length;for(le>1&&(I+=le-1,F+=le-1);U>0&&N>0&&!this._isCharWordSeparator(k.loadCell(U-1,this._workCell));){k.loadCell(U-1,this._workCell);const D=this._workCell.getChars().length;this._workCell.getWidth()===0?(T++,U--):D>1&&(O+=D-1,N-=D-1),N--,U--}for(;G<k.length&&F+1<B.length&&!this._isCharWordSeparator(k.loadCell(G+1,this._workCell));){k.loadCell(G+1,this._workCell);const D=this._workCell.getChars().length;this._workCell.getWidth()===2?(R++,G++):D>1&&(I+=D-1,F+=D-1),F++,G++}}F++;let $=N+H-T+O,V=Math.min(this._bufferService.cols,F-N+T+R-O-I);if(x||B.slice(N,F).trim()!==""){if(L&&$===0&&k.getCodePoint(0)!==32){const U=A.lines.get(S[1]-1);if(U&&k.isWrapped&&U.getCodePoint(this._bufferService.cols-1)!==32){const G=this._getWordAt([this._bufferService.cols-1,S[1]-1],!1,!0,!1);if(G){const le=this._bufferService.cols-G.start;$-=le,V+=le}}}if(P&&$+V===this._bufferService.cols&&k.getCodePoint(this._bufferService.cols-1)!==32){const U=A.lines.get(S[1]+1);if(U!=null&&U.isWrapped&&U.getCodePoint(0)!==32){const G=this._getWordAt([0,S[1]+1],!1,!1,!0);G&&(V+=G.length)}}return{start:$,length:V}}}_selectWordAt(S,x){const L=this._getWordAt(S,x);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,S[1]--;this._model.selectionStart=[L.start,S[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(S){const x=this._getWordAt(S,!0);if(x){let L=S[1];for(;x.start<0;)x.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,L]}}_isCharWordSeparator(S){return S.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(S.getChars())>=0}_selectLineAt(S){const x=this._bufferService.buffer.getWrappedRangeForLine(S),L={start:{x:0,y:x.first},end:{x:this._bufferService.cols-1,y:x.last}};this._model.selectionStart=[0,x.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,h.getRangeLength)(L,this._bufferService.cols)}};o.SelectionService=E=c([u(3,v.IBufferService),u(4,v.ICoreService),u(5,y.IMouseService),u(6,v.IOptionsService),u(7,y.IRenderService),u(8,y.ICoreBrowserService)],E)},4725:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const c=l(8343);o.ICharSizeService=(0,c.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),o.IMouseService=(0,c.createDecorator)("MouseService"),o.IRenderService=(0,c.createDecorator)("RenderService"),o.ISelectionService=(0,c.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,c.createDecorator)("ThemeService")},6731:function(a,o,l){var c=this&&this.__decorate||function(E,S,x,L){var P,A=arguments.length,k=A<3?S:L===null?L=Object.getOwnPropertyDescriptor(S,x):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(E,S,x,L);else for(var B=E.length-1;B>=0;B--)(P=E[B])&&(k=(A<3?P(k):A>3?P(S,x,k):P(S,x))||k);return A>3&&k&&Object.defineProperty(S,x,k),k},u=this&&this.__param||function(E,S){return function(x,L){S(x,L,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const d=l(7239),g=l(8055),_=l(8460),y=l(844),b=l(2585),p=g.css.toColor("#ffffff"),f=g.css.toColor("#000000"),h=g.css.toColor("#ffffff"),m=g.css.toColor("#000000"),v={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const E=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],S=[0,95,135,175,215,255];for(let x=0;x<216;x++){const L=S[x/36%6|0],P=S[x/6%6|0],A=S[x%6];E.push({css:g.channels.toCss(L,P,A),rgba:g.channels.toRgba(L,P,A)})}for(let x=0;x<24;x++){const L=8+10*x;E.push({css:g.channels.toCss(L,L,L),rgba:g.channels.toRgba(L,L,L)})}return E})());let w=o.ThemeService=class extends y.Disposable{get colors(){return this._colors}constructor(E){super(),this._optionsService=E,this._contrastCache=new d.ColorContrastCache,this._halfContrastCache=new d.ColorContrastCache,this._onChangeColors=this.register(new _.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:p,background:f,cursor:h,cursorAccent:m,selectionForeground:void 0,selectionBackgroundTransparent:v,selectionBackgroundOpaque:g.color.blend(f,v),selectionInactiveBackgroundTransparent:v,selectionInactiveBackgroundOpaque:g.color.blend(f,v),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(E={}){const S=this._colors;if(S.foreground=C(E.foreground,p),S.background=C(E.background,f),S.cursor=C(E.cursor,h),S.cursorAccent=C(E.cursorAccent,m),S.selectionBackgroundTransparent=C(E.selectionBackground,v),S.selectionBackgroundOpaque=g.color.blend(S.background,S.selectionBackgroundTransparent),S.selectionInactiveBackgroundTransparent=C(E.selectionInactiveBackground,S.selectionBackgroundTransparent),S.selectionInactiveBackgroundOpaque=g.color.blend(S.background,S.selectionInactiveBackgroundTransparent),S.selectionForeground=E.selectionForeground?C(E.selectionForeground,g.NULL_COLOR):void 0,S.selectionForeground===g.NULL_COLOR&&(S.selectionForeground=void 0),g.color.isOpaque(S.selectionBackgroundTransparent)&&(S.selectionBackgroundTransparent=g.color.opacity(S.selectionBackgroundTransparent,.3)),g.color.isOpaque(S.selectionInactiveBackgroundTransparent)&&(S.selectionInactiveBackgroundTransparent=g.color.opacity(S.selectionInactiveBackgroundTransparent,.3)),S.ansi=o.DEFAULT_ANSI_COLORS.slice(),S.ansi[0]=C(E.black,o.DEFAULT_ANSI_COLORS[0]),S.ansi[1]=C(E.red,o.DEFAULT_ANSI_COLORS[1]),S.ansi[2]=C(E.green,o.DEFAULT_ANSI_COLORS[2]),S.ansi[3]=C(E.yellow,o.DEFAULT_ANSI_COLORS[3]),S.ansi[4]=C(E.blue,o.DEFAULT_ANSI_COLORS[4]),S.ansi[5]=C(E.magenta,o.DEFAULT_ANSI_COLORS[5]),S.ansi[6]=C(E.cyan,o.DEFAULT_ANSI_COLORS[6]),S.ansi[7]=C(E.white,o.DEFAULT_ANSI_COLORS[7]),S.ansi[8]=C(E.brightBlack,o.DEFAULT_ANSI_COLORS[8]),S.ansi[9]=C(E.brightRed,o.DEFAULT_ANSI_COLORS[9]),S.ansi[10]=C(E.brightGreen,o.DEFAULT_ANSI_COLORS[10]),S.ansi[11]=C(E.brightYellow,o.DEFAULT_ANSI_COLORS[11]),S.ansi[12]=C(E.brightBlue,o.DEFAULT_ANSI_COLORS[12]),S.ansi[13]=C(E.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),S.ansi[14]=C(E.brightCyan,o.DEFAULT_ANSI_COLORS[14]),S.ansi[15]=C(E.brightWhite,o.DEFAULT_ANSI_COLORS[15]),E.extendedAnsi){const x=Math.min(S.ansi.length-16,E.extendedAnsi.length);for(let L=0;L<x;L++)S.ansi[L+16]=C(E.extendedAnsi[L],o.DEFAULT_ANSI_COLORS[L+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(E){this._restoreColor(E),this._onChangeColors.fire(this.colors)}_restoreColor(E){if(E!==void 0)switch(E){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[E]=this._restoreColors.ansi[E]}else for(let S=0;S<this._restoreColors.ansi.length;++S)this._colors.ansi[S]=this._restoreColors.ansi[S]}modifyColors(E){E(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function C(E,S){if(E!==void 0)try{return g.css.toColor(E)}catch{}return S}o.ThemeService=w=c([u(0,b.IOptionsService)],w)},6349:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const c=l(8460),u=l(844);class d extends u.Disposable{constructor(_){super(),this._maxLength=_,this.onDeleteEmitter=this.register(new c.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new c.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new c.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(_){if(this._maxLength===_)return;const y=new Array(_);for(let b=0;b<Math.min(_,this.length);b++)y[b]=this._array[this._getCyclicIndex(b)];this._array=y,this._maxLength=_,this._startIndex=0}get length(){return this._length}set length(_){if(_>this._length)for(let y=this._length;y<_;y++)this._array[y]=void 0;this._length=_}get(_){return this._array[this._getCyclicIndex(_)]}set(_,y){this._array[this._getCyclicIndex(_)]=y}push(_){this._array[this._getCyclicIndex(this._length)]=_,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(_,y,...b){if(y){for(let p=_;p<this._length-y;p++)this._array[this._getCyclicIndex(p)]=this._array[this._getCyclicIndex(p+y)];this._length-=y,this.onDeleteEmitter.fire({index:_,amount:y})}for(let p=this._length-1;p>=_;p--)this._array[this._getCyclicIndex(p+b.length)]=this._array[this._getCyclicIndex(p)];for(let p=0;p<b.length;p++)this._array[this._getCyclicIndex(_+p)]=b[p];if(b.length&&this.onInsertEmitter.fire({index:_,amount:b.length}),this._length+b.length>this._maxLength){const p=this._length+b.length-this._maxLength;this._startIndex+=p,this._length=this._maxLength,this.onTrimEmitter.fire(p)}else this._length+=b.length}trimStart(_){_>this._length&&(_=this._length),this._startIndex+=_,this._length-=_,this.onTrimEmitter.fire(_)}shiftElements(_,y,b){if(!(y<=0)){if(_<0||_>=this._length)throw new Error("start argument out of range");if(_+b<0)throw new Error("Cannot shift elements in list beyond index 0");if(b>0){for(let f=y-1;f>=0;f--)this.set(_+f+b,this.get(_+f));const p=_+y+b-this._length;if(p>0)for(this._length+=p;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let p=0;p<y;p++)this.set(_+p+b,this.get(_+p))}}_getCyclicIndex(_){return(this._startIndex+_)%this._maxLength}}o.CircularList=d},1439:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function l(c,u=5){if(typeof c!="object")return c;const d=Array.isArray(c)?[]:{};for(const g in c)d[g]=u<=1?c[g]:c[g]&&l(c[g],u-1);return d}},8055:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;const c=l(6114);let u=0,d=0,g=0,_=0;var y,b,p,f,h;function m(w){const C=w.toString(16);return C.length<2?"0"+C:C}function v(w,C){return w<C?(C+.05)/(w+.05):(w+.05)/(C+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},function(w){w.toCss=function(C,E,S,x){return x!==void 0?`#${m(C)}${m(E)}${m(S)}${m(x)}`:`#${m(C)}${m(E)}${m(S)}`},w.toRgba=function(C,E,S,x=255){return(C<<24|E<<16|S<<8|x)>>>0}}(y||(o.channels=y={})),function(w){function C(E,S){return _=Math.round(255*S),[u,d,g]=h.toChannels(E.rgba),{css:y.toCss(u,d,g,_),rgba:y.toRgba(u,d,g,_)}}w.blend=function(E,S){if(_=(255&S.rgba)/255,_===1)return{css:S.css,rgba:S.rgba};const x=S.rgba>>24&255,L=S.rgba>>16&255,P=S.rgba>>8&255,A=E.rgba>>24&255,k=E.rgba>>16&255,B=E.rgba>>8&255;return u=A+Math.round((x-A)*_),d=k+Math.round((L-k)*_),g=B+Math.round((P-B)*_),{css:y.toCss(u,d,g),rgba:y.toRgba(u,d,g)}},w.isOpaque=function(E){return(255&E.rgba)==255},w.ensureContrastRatio=function(E,S,x){const L=h.ensureContrastRatio(E.rgba,S.rgba,x);if(L)return h.toColor(L>>24&255,L>>16&255,L>>8&255)},w.opaque=function(E){const S=(255|E.rgba)>>>0;return[u,d,g]=h.toChannels(S),{css:y.toCss(u,d,g),rgba:S}},w.opacity=C,w.multiplyOpacity=function(E,S){return _=255&E.rgba,C(E,_*S/255)},w.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}}(b||(o.color=b={})),function(w){let C,E;if(!c.isNode){const S=document.createElement("canvas");S.width=1,S.height=1;const x=S.getContext("2d",{willReadFrequently:!0});x&&(C=x,C.globalCompositeOperation="copy",E=C.createLinearGradient(0,0,1,1))}w.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return u=parseInt(S.slice(1,2).repeat(2),16),d=parseInt(S.slice(2,3).repeat(2),16),g=parseInt(S.slice(3,4).repeat(2),16),h.toColor(u,d,g);case 5:return u=parseInt(S.slice(1,2).repeat(2),16),d=parseInt(S.slice(2,3).repeat(2),16),g=parseInt(S.slice(3,4).repeat(2),16),_=parseInt(S.slice(4,5).repeat(2),16),h.toColor(u,d,g,_);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const x=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(x)return u=parseInt(x[1]),d=parseInt(x[2]),g=parseInt(x[3]),_=Math.round(255*(x[5]===void 0?1:parseFloat(x[5]))),h.toColor(u,d,g,_);if(!C||!E)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=E,C.fillStyle=S,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[u,d,g,_]=C.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:y.toRgba(u,d,g,_),css:S}}}(p||(o.css=p={})),function(w){function C(E,S,x){const L=E/255,P=S/255,A=x/255;return .2126*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.7152*(P<=.03928?P/12.92:Math.pow((P+.055)/1.055,2.4))+.0722*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))}w.relativeLuminance=function(E){return C(E>>16&255,E>>8&255,255&E)},w.relativeLuminance2=C}(f||(o.rgb=f={})),function(w){function C(S,x,L){const P=S>>24&255,A=S>>16&255,k=S>>8&255;let B=x>>24&255,N=x>>16&255,F=x>>8&255,H=v(f.relativeLuminance2(B,N,F),f.relativeLuminance2(P,A,k));for(;H<L&&(B>0||N>0||F>0);)B-=Math.max(0,Math.ceil(.1*B)),N-=Math.max(0,Math.ceil(.1*N)),F-=Math.max(0,Math.ceil(.1*F)),H=v(f.relativeLuminance2(B,N,F),f.relativeLuminance2(P,A,k));return(B<<24|N<<16|F<<8|255)>>>0}function E(S,x,L){const P=S>>24&255,A=S>>16&255,k=S>>8&255;let B=x>>24&255,N=x>>16&255,F=x>>8&255,H=v(f.relativeLuminance2(B,N,F),f.relativeLuminance2(P,A,k));for(;H<L&&(B<255||N<255||F<255);)B=Math.min(255,B+Math.ceil(.1*(255-B))),N=Math.min(255,N+Math.ceil(.1*(255-N))),F=Math.min(255,F+Math.ceil(.1*(255-F))),H=v(f.relativeLuminance2(B,N,F),f.relativeLuminance2(P,A,k));return(B<<24|N<<16|F<<8|255)>>>0}w.ensureContrastRatio=function(S,x,L){const P=f.relativeLuminance(S>>8),A=f.relativeLuminance(x>>8);if(v(P,A)<L){if(A<P){const N=C(S,x,L),F=v(P,f.relativeLuminance(N>>8));if(F<L){const H=E(S,x,L);return F>v(P,f.relativeLuminance(H>>8))?N:H}return N}const k=E(S,x,L),B=v(P,f.relativeLuminance(k>>8));if(B<L){const N=C(S,x,L);return B>v(P,f.relativeLuminance(N>>8))?k:N}return k}},w.reduceLuminance=C,w.increaseLuminance=E,w.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]},w.toColor=function(S,x,L,P){return{css:y.toCss(S,x,L,P),rgba:y.toRgba(S,x,L,P)}}}(h||(o.rgba=h={})),o.toPaddedHex=m,o.contrastRatio=v},8969:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const c=l(844),u=l(2585),d=l(4348),g=l(7866),_=l(744),y=l(7302),b=l(6975),p=l(8460),f=l(1753),h=l(1480),m=l(7994),v=l(9282),w=l(5435),C=l(5981),E=l(2660);let S=!1;class x extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new p.EventEmitter),this._onScroll.event(P=>{var A;(A=this._onScrollApi)===null||A===void 0||A.fire(P.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(P){for(const A in P)this.optionsService.options[A]=P[A]}constructor(P){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new p.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new p.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new p.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new p.EventEmitter),this._instantiationService=new d.InstantiationService,this.optionsService=this.register(new y.OptionsService(P)),this._instantiationService.setService(u.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(_.BufferService)),this._instantiationService.setService(u.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(u.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(b.CoreService)),this._instantiationService.setService(u.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(f.CoreMouseService)),this._instantiationService.setService(u.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(h.UnicodeService)),this._instantiationService.setService(u.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(m.CharsetService),this._instantiationService.setService(u.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(E.OscLinkService),this._instantiationService.setService(u.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new w.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,p.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,p.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,p.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,p.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(A=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(A=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new C.WriteBuffer((A,k)=>this._inputHandler.parse(A,k))),this.register((0,p.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(P,A){this._writeBuffer.write(P,A)}writeSync(P,A){this._logService.logLevel<=u.LogLevelEnum.WARN&&!S&&(this._logService.warn("writeSync is unreliable and will be removed soon."),S=!0),this._writeBuffer.writeSync(P,A)}resize(P,A){isNaN(P)||isNaN(A)||(P=Math.max(P,_.MINIMUM_COLS),A=Math.max(A,_.MINIMUM_ROWS),this._bufferService.resize(P,A))}scroll(P,A=!1){this._bufferService.scroll(P,A)}scrollLines(P,A,k){this._bufferService.scrollLines(P,A,k)}scrollPages(P){this.scrollLines(P*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(P){const A=P-this._bufferService.buffer.ydisp;A!==0&&this.scrollLines(A)}registerEscHandler(P,A){return this._inputHandler.registerEscHandler(P,A)}registerDcsHandler(P,A){return this._inputHandler.registerDcsHandler(P,A)}registerCsiHandler(P,A){return this._inputHandler.registerCsiHandler(P,A)}registerOscHandler(P,A){return this._inputHandler.registerOscHandler(P,A)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let P=!1;const A=this.optionsService.rawOptions.windowsPty;A&&A.buildNumber!==void 0&&A.buildNumber!==void 0?P=A.backend==="conpty"&&A.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(P=!0),P?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const P=[];P.push(this.onLineFeed(v.updateWindowsModeWrappedState.bind(null,this._bufferService))),P.push(this.registerCsiHandler({final:"H"},()=>((0,v.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)(()=>{for(const A of P)A.dispose()})}}}o.CoreTerminal=x},8460:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===l)return void this._listeners.splice(c,1)}}})),this._event}fire(l,c){const u=[];for(let d=0;d<this._listeners.length;d++)u.push(this._listeners[d]);for(let d=0;d<u.length;d++)u[d].call(void 0,l,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(l,c){return l(u=>c.fire(u))}},5435:function(a,o,l){var c=this&&this.__decorate||function(H,T,R,O){var I,$=arguments.length,V=$<3?T:O===null?O=Object.getOwnPropertyDescriptor(T,R):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(H,T,R,O);else for(var U=H.length-1;U>=0;U--)(I=H[U])&&(V=($<3?I(V):$>3?I(T,R,V):I(T,R))||V);return $>3&&V&&Object.defineProperty(T,R,V),V},u=this&&this.__param||function(H,T){return function(R,O){T(R,O,H)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const d=l(2584),g=l(7116),_=l(2015),y=l(844),b=l(482),p=l(8437),f=l(8460),h=l(643),m=l(511),v=l(3734),w=l(2585),C=l(6242),E=l(6351),S=l(5941),x={"(":0,")":1,"*":2,"+":3,"-":1,".":2},L=131072;function P(H,T){if(H>24)return T.setWinLines||!1;switch(H){case 1:return!!T.restoreWin;case 2:return!!T.minimizeWin;case 3:return!!T.setWinPosition;case 4:return!!T.setWinSizePixels;case 5:return!!T.raiseWin;case 6:return!!T.lowerWin;case 7:return!!T.refreshWin;case 8:return!!T.setWinSizeChars;case 9:return!!T.maximizeWin;case 10:return!!T.fullscreenWin;case 11:return!!T.getWinState;case 13:return!!T.getWinPosition;case 14:return!!T.getWinSizePixels;case 15:return!!T.getScreenSizePixels;case 16:return!!T.getCellSizePixels;case 18:return!!T.getWinSizeChars;case 19:return!!T.getScreenSizeChars;case 20:return!!T.getIconTitle;case 21:return!!T.getWinTitle;case 22:return!!T.pushTitle;case 23:return!!T.popTitle;case 24:return!!T.setWinLines}return!1}var A;(function(H){H[H.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",H[H.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(A||(o.WindowsOptionsReportType=A={}));let k=0;class B extends y.Disposable{getAttrData(){return this._curAttrData}constructor(T,R,O,I,$,V,U,G,le=new _.EscapeSequenceParser){super(),this._bufferService=T,this._charsetService=R,this._coreService=O,this._logService=I,this._optionsService=$,this._oscLinkService=V,this._coreMouseService=U,this._unicodeService=G,this._parser=le,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new b.StringToUtf32,this._utf8Decoder=new b.Utf8ToUtf32,this._workCell=new m.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=p.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=p.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new f.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new f.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new f.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new f.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new f.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new f.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new f.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new f.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new f.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new f.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new f.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new f.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new N(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(D=>this._activeBuffer=D.activeBuffer)),this._parser.setCsiHandlerFallback((D,z)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(D),params:z.toArray()})}),this._parser.setEscHandlerFallback(D=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(D)})}),this._parser.setExecuteHandlerFallback(D=>{this._logService.debug("Unknown EXECUTE code: ",{code:D})}),this._parser.setOscHandlerFallback((D,z,K)=>{this._logService.debug("Unknown OSC code: ",{identifier:D,action:z,data:K})}),this._parser.setDcsHandlerFallback((D,z,K)=>{z==="HOOK"&&(K=K.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(D),action:z,payload:K})}),this._parser.setPrintHandler((D,z,K)=>this.print(D,z,K)),this._parser.registerCsiHandler({final:"@"},D=>this.insertChars(D)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},D=>this.scrollLeft(D)),this._parser.registerCsiHandler({final:"A"},D=>this.cursorUp(D)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},D=>this.scrollRight(D)),this._parser.registerCsiHandler({final:"B"},D=>this.cursorDown(D)),this._parser.registerCsiHandler({final:"C"},D=>this.cursorForward(D)),this._parser.registerCsiHandler({final:"D"},D=>this.cursorBackward(D)),this._parser.registerCsiHandler({final:"E"},D=>this.cursorNextLine(D)),this._parser.registerCsiHandler({final:"F"},D=>this.cursorPrecedingLine(D)),this._parser.registerCsiHandler({final:"G"},D=>this.cursorCharAbsolute(D)),this._parser.registerCsiHandler({final:"H"},D=>this.cursorPosition(D)),this._parser.registerCsiHandler({final:"I"},D=>this.cursorForwardTab(D)),this._parser.registerCsiHandler({final:"J"},D=>this.eraseInDisplay(D,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},D=>this.eraseInDisplay(D,!0)),this._parser.registerCsiHandler({final:"K"},D=>this.eraseInLine(D,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},D=>this.eraseInLine(D,!0)),this._parser.registerCsiHandler({final:"L"},D=>this.insertLines(D)),this._parser.registerCsiHandler({final:"M"},D=>this.deleteLines(D)),this._parser.registerCsiHandler({final:"P"},D=>this.deleteChars(D)),this._parser.registerCsiHandler({final:"S"},D=>this.scrollUp(D)),this._parser.registerCsiHandler({final:"T"},D=>this.scrollDown(D)),this._parser.registerCsiHandler({final:"X"},D=>this.eraseChars(D)),this._parser.registerCsiHandler({final:"Z"},D=>this.cursorBackwardTab(D)),this._parser.registerCsiHandler({final:"`"},D=>this.charPosAbsolute(D)),this._parser.registerCsiHandler({final:"a"},D=>this.hPositionRelative(D)),this._parser.registerCsiHandler({final:"b"},D=>this.repeatPrecedingCharacter(D)),this._parser.registerCsiHandler({final:"c"},D=>this.sendDeviceAttributesPrimary(D)),this._parser.registerCsiHandler({prefix:">",final:"c"},D=>this.sendDeviceAttributesSecondary(D)),this._parser.registerCsiHandler({final:"d"},D=>this.linePosAbsolute(D)),this._parser.registerCsiHandler({final:"e"},D=>this.vPositionRelative(D)),this._parser.registerCsiHandler({final:"f"},D=>this.hVPosition(D)),this._parser.registerCsiHandler({final:"g"},D=>this.tabClear(D)),this._parser.registerCsiHandler({final:"h"},D=>this.setMode(D)),this._parser.registerCsiHandler({prefix:"?",final:"h"},D=>this.setModePrivate(D)),this._parser.registerCsiHandler({final:"l"},D=>this.resetMode(D)),this._parser.registerCsiHandler({prefix:"?",final:"l"},D=>this.resetModePrivate(D)),this._parser.registerCsiHandler({final:"m"},D=>this.charAttributes(D)),this._parser.registerCsiHandler({final:"n"},D=>this.deviceStatus(D)),this._parser.registerCsiHandler({prefix:"?",final:"n"},D=>this.deviceStatusPrivate(D)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},D=>this.softReset(D)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},D=>this.setCursorStyle(D)),this._parser.registerCsiHandler({final:"r"},D=>this.setScrollRegion(D)),this._parser.registerCsiHandler({final:"s"},D=>this.saveCursor(D)),this._parser.registerCsiHandler({final:"t"},D=>this.windowOptions(D)),this._parser.registerCsiHandler({final:"u"},D=>this.restoreCursor(D)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},D=>this.insertColumns(D)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},D=>this.deleteColumns(D)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},D=>this.selectProtected(D)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},D=>this.requestMode(D,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},D=>this.requestMode(D,!1)),this._parser.setExecuteHandler(d.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(d.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(d.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(d.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(d.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(d.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(d.C1.IND,()=>this.index()),this._parser.setExecuteHandler(d.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(d.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new C.OscHandler(D=>(this.setTitle(D),this.setIconName(D),!0))),this._parser.registerOscHandler(1,new C.OscHandler(D=>this.setIconName(D))),this._parser.registerOscHandler(2,new C.OscHandler(D=>this.setTitle(D))),this._parser.registerOscHandler(4,new C.OscHandler(D=>this.setOrReportIndexedColor(D))),this._parser.registerOscHandler(8,new C.OscHandler(D=>this.setHyperlink(D))),this._parser.registerOscHandler(10,new C.OscHandler(D=>this.setOrReportFgColor(D))),this._parser.registerOscHandler(11,new C.OscHandler(D=>this.setOrReportBgColor(D))),this._parser.registerOscHandler(12,new C.OscHandler(D=>this.setOrReportCursorColor(D))),this._parser.registerOscHandler(104,new C.OscHandler(D=>this.restoreIndexedColor(D))),this._parser.registerOscHandler(110,new C.OscHandler(D=>this.restoreFgColor(D))),this._parser.registerOscHandler(111,new C.OscHandler(D=>this.restoreBgColor(D))),this._parser.registerOscHandler(112,new C.OscHandler(D=>this.restoreCursorColor(D))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const D in g.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:D},()=>this.selectCharset("("+D)),this._parser.registerEscHandler({intermediates:")",final:D},()=>this.selectCharset(")"+D)),this._parser.registerEscHandler({intermediates:"*",final:D},()=>this.selectCharset("*"+D)),this._parser.registerEscHandler({intermediates:"+",final:D},()=>this.selectCharset("+"+D)),this._parser.registerEscHandler({intermediates:"-",final:D},()=>this.selectCharset("-"+D)),this._parser.registerEscHandler({intermediates:".",final:D},()=>this.selectCharset("."+D)),this._parser.registerEscHandler({intermediates:"/",final:D},()=>this.selectCharset("/"+D));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(D=>(this._logService.error("Parsing error: ",D),D)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new E.DcsHandler((D,z)=>this.requestStatusString(D,z)))}_preserveStack(T,R,O,I){this._parseStack.paused=!0,this._parseStack.cursorStartX=T,this._parseStack.cursorStartY=R,this._parseStack.decodedLength=O,this._parseStack.position=I}_logSlowResolvingAsync(T){this._logService.logLevel<=w.LogLevelEnum.WARN&&Promise.race([T,new Promise((R,O)=>setTimeout(()=>O("#SLOW_TIMEOUT"),5e3))]).catch(R=>{if(R!=="#SLOW_TIMEOUT")throw R;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(T,R){let O,I=this._activeBuffer.x,$=this._activeBuffer.y,V=0;const U=this._parseStack.paused;if(U){if(O=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,R))return this._logSlowResolvingAsync(O),O;I=this._parseStack.cursorStartX,$=this._parseStack.cursorStartY,this._parseStack.paused=!1,T.length>L&&(V=this._parseStack.position+L)}if(this._logService.logLevel<=w.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof T=="string"?` "${T}"`:` "${Array.prototype.map.call(T,G=>String.fromCharCode(G)).join("")}"`),typeof T=="string"?T.split("").map(G=>G.charCodeAt(0)):T),this._parseBuffer.length<T.length&&this._parseBuffer.length<L&&(this._parseBuffer=new Uint32Array(Math.min(T.length,L))),U||this._dirtyRowTracker.clearRange(),T.length>L)for(let G=V;G<T.length;G+=L){const le=G+L<T.length?G+L:T.length,D=typeof T=="string"?this._stringDecoder.decode(T.substring(G,le),this._parseBuffer):this._utf8Decoder.decode(T.subarray(G,le),this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,D))return this._preserveStack(I,$,D,G),this._logSlowResolvingAsync(O),O}else if(!U){const G=typeof T=="string"?this._stringDecoder.decode(T,this._parseBuffer):this._utf8Decoder.decode(T,this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,G))return this._preserveStack(I,$,G,0),this._logSlowResolvingAsync(O),O}this._activeBuffer.x===I&&this._activeBuffer.y===$||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(T,R,O){let I,$;const V=this._charsetService.charset,U=this._optionsService.rawOptions.screenReaderMode,G=this._bufferService.cols,le=this._coreService.decPrivateModes.wraparound,D=this._coreService.modes.insertMode,z=this._curAttrData;let K=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&O-R>0&&K.getWidth(this._activeBuffer.x-1)===2&&K.setCellFromCodePoint(this._activeBuffer.x-1,0,1,z.fg,z.bg,z.extended);for(let W=R;W<O;++W){if(I=T[W],$=this._unicodeService.wcwidth(I),I<127&&V){const ae=V[String.fromCharCode(I)];ae&&(I=ae.charCodeAt(0))}if(U&&this._onA11yChar.fire((0,b.stringFromCodePoint)(I)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),$||!this._activeBuffer.x){if(this._activeBuffer.x+$-1>=G){if(le){for(;this._activeBuffer.x<G;)K.setCellFromCodePoint(this._activeBuffer.x++,0,1,z.fg,z.bg,z.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),K=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=G-1,$===2)continue}if(D&&(K.insertCells(this._activeBuffer.x,$,this._activeBuffer.getNullCell(z),z),K.getWidth(G-1)===2&&K.setCellFromCodePoint(G-1,h.NULL_CELL_CODE,h.NULL_CELL_WIDTH,z.fg,z.bg,z.extended)),K.setCellFromCodePoint(this._activeBuffer.x++,I,$,z.fg,z.bg,z.extended),$>0)for(;--$;)K.setCellFromCodePoint(this._activeBuffer.x++,0,0,z.fg,z.bg,z.extended)}else K.getWidth(this._activeBuffer.x-1)?K.addCodepointToCell(this._activeBuffer.x-1,I):K.addCodepointToCell(this._activeBuffer.x-2,I)}O-R>0&&(K.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<G&&O-R>0&&K.getWidth(this._activeBuffer.x)===0&&!K.hasContent(this._activeBuffer.x)&&K.setCellFromCodePoint(this._activeBuffer.x,0,1,z.fg,z.bg,z.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(T,R){return T.final!=="t"||T.prefix||T.intermediates?this._parser.registerCsiHandler(T,R):this._parser.registerCsiHandler(T,O=>!P(O.params[0],this._optionsService.rawOptions.windowOptions)||R(O))}registerDcsHandler(T,R){return this._parser.registerDcsHandler(T,new E.DcsHandler(R))}registerEscHandler(T,R){return this._parser.registerEscHandler(T,R)}registerOscHandler(T,R){return this._parser.registerOscHandler(T,new C.OscHandler(R))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var T;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(!((T=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||T===void 0)&&T.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);R.hasWidth(this._activeBuffer.x)&&!R.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const T=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-T),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(T=this._bufferService.cols-1){this._activeBuffer.x=Math.min(T,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(T,R){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=T,this._activeBuffer.y=this._activeBuffer.scrollTop+R):(this._activeBuffer.x=T,this._activeBuffer.y=R),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(T,R){this._restrictCursor(),this._setCursor(this._activeBuffer.x+T,this._activeBuffer.y+R)}cursorUp(T){const R=this._activeBuffer.y-this._activeBuffer.scrollTop;return R>=0?this._moveCursor(0,-Math.min(R,T.params[0]||1)):this._moveCursor(0,-(T.params[0]||1)),!0}cursorDown(T){const R=this._activeBuffer.scrollBottom-this._activeBuffer.y;return R>=0?this._moveCursor(0,Math.min(R,T.params[0]||1)):this._moveCursor(0,T.params[0]||1),!0}cursorForward(T){return this._moveCursor(T.params[0]||1,0),!0}cursorBackward(T){return this._moveCursor(-(T.params[0]||1),0),!0}cursorNextLine(T){return this.cursorDown(T),this._activeBuffer.x=0,!0}cursorPrecedingLine(T){return this.cursorUp(T),this._activeBuffer.x=0,!0}cursorCharAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(T){return this._setCursor(T.length>=2?(T.params[1]||1)-1:0,(T.params[0]||1)-1),!0}charPosAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(T){return this._moveCursor(T.params[0]||1,0),!0}linePosAbsolute(T){return this._setCursor(this._activeBuffer.x,(T.params[0]||1)-1),!0}vPositionRelative(T){return this._moveCursor(0,T.params[0]||1),!0}hVPosition(T){return this.cursorPosition(T),!0}tabClear(T){const R=T.params[0];return R===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:R===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let R=T.params[0]||1;for(;R--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let R=T.params[0]||1;for(;R--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(T){const R=T.params[0];return R===1&&(this._curAttrData.bg|=536870912),R!==2&&R!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(T,R,O,I=!1,$=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);V.replaceCells(R,O,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),$),I&&(V.isWrapped=!1)}_resetBufferLine(T,R=!1){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);O&&(O.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),R),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+T),O.isWrapped=!1)}eraseInDisplay(T,R=!1){let O;switch(this._restrictCursor(this._bufferService.cols),T.params[0]){case 0:for(O=this._activeBuffer.y,this._dirtyRowTracker.markDirty(O),this._eraseInBufferLine(O++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,R);O<this._bufferService.rows;O++)this._resetBufferLine(O,R);this._dirtyRowTracker.markDirty(O);break;case 1:for(O=this._activeBuffer.y,this._dirtyRowTracker.markDirty(O),this._eraseInBufferLine(O,0,this._activeBuffer.x+1,!0,R),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(O+1).isWrapped=!1);O--;)this._resetBufferLine(O,R);this._dirtyRowTracker.markDirty(0);break;case 2:for(O=this._bufferService.rows,this._dirtyRowTracker.markDirty(O-1);O--;)this._resetBufferLine(O,R);this._dirtyRowTracker.markDirty(0);break;case 3:const I=this._activeBuffer.lines.length-this._bufferService.rows;I>0&&(this._activeBuffer.lines.trimStart(I),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-I,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-I,0),this._onScroll.fire(0))}return!0}eraseInLine(T,R=!1){switch(this._restrictCursor(this._bufferService.cols),T.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,R);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,R);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,R)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(T){this._restrictCursor();let R=T.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=this._activeBuffer.ybase+this._activeBuffer.y,I=this._bufferService.rows-1-this._activeBuffer.scrollBottom,$=this._bufferService.rows-1+this._activeBuffer.ybase-I+1;for(;R--;)this._activeBuffer.lines.splice($-1,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(T){this._restrictCursor();let R=T.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=this._activeBuffer.ybase+this._activeBuffer.y;let I;for(I=this._bufferService.rows-1-this._activeBuffer.scrollBottom,I=this._bufferService.rows-1+this._activeBuffer.ybase-I;R--;)this._activeBuffer.lines.splice(O,1),this._activeBuffer.lines.splice(I,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(T){this._restrictCursor();const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return R&&(R.insertCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(T){this._restrictCursor();const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return R&&(R.deleteCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(T){let R=T.params[0]||1;for(;R--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(T){let R=T.params[0]||1;for(;R--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(p.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=T.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);I.deleteCells(0,R,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=T.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);I.insertCells(0,R,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=T.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);I.insertCells(this._activeBuffer.x,R,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=T.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);I.deleteCells(this._activeBuffer.x,R,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(T){this._restrictCursor();const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return R&&(R.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(T.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(T){if(!this._parser.precedingCodepoint)return!0;const R=T.params[0]||1,O=new Uint32Array(R);for(let I=0;I<R;++I)O[I]=this._parser.precedingCodepoint;return this.print(O,0,O.length),!0}sendDeviceAttributesPrimary(T){return T.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(T){return T.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(T.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0}_is(T){return(this._optionsService.rawOptions.termName+"").indexOf(T)===0}setMode(T){for(let R=0;R<T.length;R++)switch(T.params[R]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(T){for(let R=0;R<T.length;R++)switch(T.params[R]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(T){for(let R=0;R<T.length;R++)switch(T.params[R]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(T){for(let R=0;R<T.length;R++)switch(T.params[R]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),T.params[R]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(T,R){const O=this._coreService.decPrivateModes,{activeProtocol:I,activeEncoding:$}=this._coreMouseService,V=this._coreService,{buffers:U,cols:G}=this._bufferService,{active:le,alt:D}=U,z=this._optionsService.rawOptions,K=me=>me?1:2,W=T.params[0];return ae=W,ee=R?W===2?4:W===4?K(V.modes.insertMode):W===12?3:W===20?K(z.convertEol):0:W===1?K(O.applicationCursorKeys):W===3?z.windowOptions.setWinLines?G===80?2:G===132?1:0:0:W===6?K(O.origin):W===7?K(O.wraparound):W===8?3:W===9?K(I==="X10"):W===12?K(z.cursorBlink):W===25?K(!V.isCursorHidden):W===45?K(O.reverseWraparound):W===66?K(O.applicationKeypad):W===67?4:W===1e3?K(I==="VT200"):W===1002?K(I==="DRAG"):W===1003?K(I==="ANY"):W===1004?K(O.sendFocus):W===1005?4:W===1006?K($==="SGR"):W===1015?4:W===1016?K($==="SGR_PIXELS"):W===1048?1:W===47||W===1047||W===1049?K(le===D):W===2004?K(O.bracketedPasteMode):0,V.triggerDataEvent(`${d.C0.ESC}[${R?"":"?"}${ae};${ee}$y`),!0;var ae,ee}_updateAttrColor(T,R,O,I,$){return R===2?(T|=50331648,T&=-16777216,T|=v.AttributeData.fromColorRGB([O,I,$])):R===5&&(T&=-50331904,T|=33554432|255&O),T}_extractColor(T,R,O){const I=[0,0,-1,0,0,0];let $=0,V=0;do{if(I[V+$]=T.params[R+V],T.hasSubParams(R+V)){const U=T.getSubParams(R+V);let G=0;do I[1]===5&&($=1),I[V+G+1+$]=U[G];while(++G<U.length&&G+V+1+$<I.length);break}if(I[1]===5&&V+$>=2||I[1]===2&&V+$>=5)break;I[1]&&($=1)}while(++V+R<T.length&&V+$<I.length);for(let U=2;U<I.length;++U)I[U]===-1&&(I[U]=0);switch(I[0]){case 38:O.fg=this._updateAttrColor(O.fg,I[1],I[3],I[4],I[5]);break;case 48:O.bg=this._updateAttrColor(O.bg,I[1],I[3],I[4],I[5]);break;case 58:O.extended=O.extended.clone(),O.extended.underlineColor=this._updateAttrColor(O.extended.underlineColor,I[1],I[3],I[4],I[5])}return V}_processUnderline(T,R){R.extended=R.extended.clone(),(!~T||T>5)&&(T=1),R.extended.underlineStyle=T,R.fg|=268435456,T===0&&(R.fg&=-268435457),R.updateExtended()}_processSGR0(T){T.fg=p.DEFAULT_ATTR_DATA.fg,T.bg=p.DEFAULT_ATTR_DATA.bg,T.extended=T.extended.clone(),T.extended.underlineStyle=0,T.extended.underlineColor&=-67108864,T.updateExtended()}charAttributes(T){if(T.length===1&&T.params[0]===0)return this._processSGR0(this._curAttrData),!0;const R=T.length;let O;const I=this._curAttrData;for(let $=0;$<R;$++)O=T.params[$],O>=30&&O<=37?(I.fg&=-50331904,I.fg|=16777216|O-30):O>=40&&O<=47?(I.bg&=-50331904,I.bg|=16777216|O-40):O>=90&&O<=97?(I.fg&=-50331904,I.fg|=16777224|O-90):O>=100&&O<=107?(I.bg&=-50331904,I.bg|=16777224|O-100):O===0?this._processSGR0(I):O===1?I.fg|=134217728:O===3?I.bg|=67108864:O===4?(I.fg|=268435456,this._processUnderline(T.hasSubParams($)?T.getSubParams($)[0]:1,I)):O===5?I.fg|=536870912:O===7?I.fg|=67108864:O===8?I.fg|=1073741824:O===9?I.fg|=2147483648:O===2?I.bg|=134217728:O===21?this._processUnderline(2,I):O===22?(I.fg&=-134217729,I.bg&=-134217729):O===23?I.bg&=-67108865:O===24?(I.fg&=-268435457,this._processUnderline(0,I)):O===25?I.fg&=-536870913:O===27?I.fg&=-67108865:O===28?I.fg&=-1073741825:O===29?I.fg&=2147483647:O===39?(I.fg&=-67108864,I.fg|=16777215&p.DEFAULT_ATTR_DATA.fg):O===49?(I.bg&=-67108864,I.bg|=16777215&p.DEFAULT_ATTR_DATA.bg):O===38||O===48||O===58?$+=this._extractColor(T,$,I):O===53?I.bg|=1073741824:O===55?I.bg&=-1073741825:O===59?(I.extended=I.extended.clone(),I.extended.underlineColor=-1,I.updateExtended()):O===100?(I.fg&=-67108864,I.fg|=16777215&p.DEFAULT_ATTR_DATA.fg,I.bg&=-67108864,I.bg|=16777215&p.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",O);return!0}deviceStatus(T){switch(T.params[0]){case 5:this._coreService.triggerDataEvent(`${d.C0.ESC}[0n`);break;case 6:const R=this._activeBuffer.y+1,O=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[${R};${O}R`)}return!0}deviceStatusPrivate(T){if(T.params[0]===6){const R=this._activeBuffer.y+1,O=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[?${R};${O}R`)}return!0}softReset(T){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=p.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(T){const R=T.params[0]||1;switch(R){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const O=R%2==1;return this._optionsService.options.cursorBlink=O,!0}setScrollRegion(T){const R=T.params[0]||1;let O;return(T.length<2||(O=T.params[1])>this._bufferService.rows||O===0)&&(O=this._bufferService.rows),O>R&&(this._activeBuffer.scrollTop=R-1,this._activeBuffer.scrollBottom=O-1,this._setCursor(0,0)),!0}windowOptions(T){if(!P(T.params[0],this._optionsService.rawOptions.windowOptions))return!0;const R=T.length>1?T.params[1]:0;switch(T.params[0]){case 14:R!==2&&this._onRequestWindowsOptionsReport.fire(A.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(A.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${d.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:R!==0&&R!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),R!==0&&R!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:R!==0&&R!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),R!==0&&R!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(T){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(T){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(T){return this._windowTitle=T,this._onTitleChange.fire(T),!0}setIconName(T){return this._iconName=T,!0}setOrReportIndexedColor(T){const R=[],O=T.split(";");for(;O.length>1;){const I=O.shift(),$=O.shift();if(/^\d+$/.exec(I)){const V=parseInt(I);if(F(V))if($==="?")R.push({type:0,index:V});else{const U=(0,S.parseColor)($);U&&R.push({type:1,index:V,color:U})}}}return R.length&&this._onColor.fire(R),!0}setHyperlink(T){const R=T.split(";");return!(R.length<2)&&(R[1]?this._createHyperlink(R[0],R[1]):!R[0]&&this._finishHyperlink())}_createHyperlink(T,R){this._getCurrentLinkId()&&this._finishHyperlink();const O=T.split(":");let I;const $=O.findIndex(V=>V.startsWith("id="));return $!==-1&&(I=O[$].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:I,uri:R}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(T,R){const O=T.split(";");for(let I=0;I<O.length&&!(R>=this._specialColors.length);++I,++R)if(O[I]==="?")this._onColor.fire([{type:0,index:this._specialColors[R]}]);else{const $=(0,S.parseColor)(O[I]);$&&this._onColor.fire([{type:1,index:this._specialColors[R],color:$}])}return!0}setOrReportFgColor(T){return this._setOrReportSpecialColor(T,0)}setOrReportBgColor(T){return this._setOrReportSpecialColor(T,1)}setOrReportCursorColor(T){return this._setOrReportSpecialColor(T,2)}restoreIndexedColor(T){if(!T)return this._onColor.fire([{type:2}]),!0;const R=[],O=T.split(";");for(let I=0;I<O.length;++I)if(/^\d+$/.exec(O[I])){const $=parseInt(O[I]);F($)&&R.push({type:2,index:$})}return R.length&&this._onColor.fire(R),!0}restoreFgColor(T){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(T){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(T){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),!0}selectCharset(T){return T.length!==2?(this.selectDefaultCharset(),!0):(T[0]==="/"||this._charsetService.setgCharset(x[T[0]],g.CHARSETS[T[1]]||g.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const T=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,T,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=p.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=p.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(T){return this._charsetService.setgLevel(T),!0}screenAlignmentPattern(){const T=new m.CellData;T.content=4194373,T.fg=this._curAttrData.fg,T.bg=this._curAttrData.bg,this._setCursor(0,0);for(let R=0;R<this._bufferService.rows;++R){const O=this._activeBuffer.ybase+this._activeBuffer.y+R,I=this._activeBuffer.lines.get(O);I&&(I.fill(T),I.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(T,R){const O=this._bufferService.buffer,I=this._optionsService.rawOptions;return($=>(this._coreService.triggerDataEvent(`${d.C0.ESC}${$}${d.C0.ESC}\\`),!0))(T==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:T==='"p'?'P1$r61;1"p':T==="r"?`P1$r${O.scrollTop+1};${O.scrollBottom+1}r`:T==="m"?"P1$r0m":T===" q"?`P1$r${{block:2,underline:4,bar:6}[I.cursorStyle]-(I.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(T,R){this._dirtyRowTracker.markRangeDirty(T,R)}}o.InputHandler=B;let N=class{constructor(H){this._bufferService=H,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(H){H<this.start?this.start=H:H>this.end&&(this.end=H)}markRangeDirty(H,T){H>T&&(k=H,H=T,T=k),H<this.start&&(this.start=H),T>this.end&&(this.end=T)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function F(H){return 0<=H&&H<256}N=c([u(0,w.IBufferService)],N)},844:(a,o)=>{function l(c){for(const u of c)u.dispose();c.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.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)}},o.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===void 0||u.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)===null||c===void 0||c.dispose(),this._value=void 0}},o.toDisposable=function(c){return{dispose:c}},o.disposeArray=l,o.getDisposeArrayDisposable=function(c){return{dispose:()=>l(c)}}},1505:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(u,d,g){this._data[u]||(this._data[u]={}),this._data[u][d]=g}get(u,d){return this._data[u]?this._data[u][d]:void 0}clear(){this._data={}}}o.TwoKeyMap=l,o.FourKeyMap=class{constructor(){this._data=new l}set(c,u,d,g,_){this._data.get(c,u)||this._data.set(c,u,new l),this._data.get(c,u).set(d,g,_)}get(c,u,d,g){var _;return(_=this._data.get(c,u))===null||_===void 0?void 0:_.get(d,g)}clear(){this._data.clear()}}},6114:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof navigator>"u";const l=o.isNode?"node":navigator.userAgent,c=o.isNode?"node":navigator.platform;o.isFirefox=l.includes("Firefox"),o.isLegacyEdge=l.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(l),o.getSafariVersion=function(){if(!o.isSafari)return 0;const u=l.match(/Version\/(\d+)/);return u===null||u.length<2?0:parseInt(u[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),o.isIpad=c==="iPad",o.isIphone=c==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),o.isLinux=c.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(l)},6106:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let l=0;o.SortedList=class{constructor(c){this._getKey=c,this._array=[]}clear(){this._array.length=0}insert(c){this._array.length!==0?(l=this._search(this._getKey(c)),this._array.splice(l,0,c)):this._array.push(c)}delete(c){if(this._array.length===0)return!1;const u=this._getKey(c);if(u===void 0||(l=this._search(u),l===-1)||this._getKey(this._array[l])!==u)return!1;do if(this._array[l]===c)return this._array.splice(l,1),!0;while(++l<this._array.length&&this._getKey(this._array[l])===u);return!1}*getKeyIterator(c){if(this._array.length!==0&&(l=this._search(c),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===c))do yield this._array[l];while(++l<this._array.length&&this._getKey(this._array[l])===c)}forEachByKey(c,u){if(this._array.length!==0&&(l=this._search(c),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===c))do u(this._array[l]);while(++l<this._array.length&&this._getKey(this._array[l])===c)}values(){return[...this._array].values()}_search(c){let u=0,d=this._array.length-1;for(;d>=u;){let g=u+d>>1;const _=this._getKey(this._array[g]);if(_>c)d=g-1;else{if(!(_<c)){for(;g>0&&this._getKey(this._array[g-1])===c;)g--;return g}u=g+1}}return u}}},7226:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const c=l(6114);class u{constructor(){this._tasks=[],this._i=0}enqueue(_){this._tasks.push(_),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(_){this._idleCallback=void 0;let y=0,b=0,p=_.timeRemaining(),f=0;for(;this._i<this._tasks.length;){if(y=Date.now(),this._tasks[this._i]()||this._i++,y=Math.max(1,Date.now()-y),b=Math.max(y,b),f=_.timeRemaining(),1.5*b>f)return p-y<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(p-y))}ms`),void this._start();p=f}this.clear()}}class d extends u{_requestCallback(_){return setTimeout(()=>_(this._createDeadline(16)))}_cancelCallback(_){clearTimeout(_)}_createDeadline(_){const y=Date.now()+_;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}o.PriorityTaskQueue=d,o.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends u{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:d,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const c=l(643);o.updateWindowsModeWrappedState=function(u){const d=u.buffer.lines.get(u.buffer.ybase+u.buffer.y-1),g=d==null?void 0:d.get(u.cols-1),_=u.buffer.lines.get(u.buffer.ybase+u.buffer.y);_&&g&&(_.isWrapped=g[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&g[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new l;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}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)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}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)==0}isBgDefault(){return(50331648&this.bg)==0}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)==50331648: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)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}o.AttributeData=l;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}constructor(d=0,g=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=g}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=c},9092:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const c=l(6349),u=l(7226),d=l(3734),g=l(8437),_=l(4634),y=l(511),b=l(643),p=l(4863),f=l(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(h,m,v){this._hasScrollback=h,this._optionsService=m,this._bufferService=v,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=f.DEFAULT_CHARSET,this.markers=[],this._nullCell=y.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),this._whitespaceCell=y.CellData.fromCharData([0,b.WHITESPACE_CELL_CHAR,b.WHITESPACE_CELL_WIDTH,b.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new u.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(h){return h?(this._nullCell.fg=h.fg,this._nullCell.bg=h.bg,this._nullCell.extended=h.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new d.ExtendedAttrs),this._nullCell}getWhitespaceCell(h){return h?(this._whitespaceCell.fg=h.fg,this._whitespaceCell.bg=h.bg,this._whitespaceCell.extended=h.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new d.ExtendedAttrs),this._whitespaceCell}getBlankLine(h,m){return new g.BufferLine(this._bufferService.cols,this.getNullCell(h),m)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const h=this.ybase+this.y-this.ydisp;return h>=0&&h<this._rows}_getCorrectBufferLength(h){if(!this._hasScrollback)return h;const m=h+this._optionsService.rawOptions.scrollback;return m>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:m}fillViewportRows(h){if(this.lines.length===0){h===void 0&&(h=g.DEFAULT_ATTR_DATA);let m=this._rows;for(;m--;)this.lines.push(this.getBlankLine(h))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(h,m){const v=this.getNullCell(g.DEFAULT_ATTR_DATA);let w=0;const C=this._getCorrectBufferLength(m);if(C>this.lines.maxLength&&(this.lines.maxLength=C),this.lines.length>0){if(this._cols<h)for(let S=0;S<this.lines.length;S++)w+=+this.lines.get(S).resize(h,v);let E=0;if(this._rows<m)for(let S=this._rows;S<m;S++)this.lines.length<m+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(h,v)):this.ybase>0&&this.lines.length<=this.ybase+this.y+E+1?(this.ybase--,E++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(h,v)));else for(let S=this._rows;S>m;S--)this.lines.length>m+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(C<this.lines.maxLength){const S=this.lines.length-C;S>0&&(this.lines.trimStart(S),this.ybase=Math.max(this.ybase-S,0),this.ydisp=Math.max(this.ydisp-S,0),this.savedY=Math.max(this.savedY-S,0)),this.lines.maxLength=C}this.x=Math.min(this.x,h-1),this.y=Math.min(this.y,m-1),E&&(this.y+=E),this.savedX=Math.min(this.savedX,h-1),this.scrollTop=0}if(this.scrollBottom=m-1,this._isReflowEnabled&&(this._reflow(h,m),this._cols>h))for(let E=0;E<this.lines.length;E++)w+=+this.lines.get(E).resize(h,v);this._cols=h,this._rows=m,this._memoryCleanupQueue.clear(),w>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let h=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,h=!1);let m=0;for(;this._memoryCleanupPosition<this.lines.length;)if(m+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),m>100)return!0;return h}get _isReflowEnabled(){const h=this._optionsService.rawOptions.windowsPty;return h&&h.buildNumber?this._hasScrollback&&h.backend==="conpty"&&h.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(h,m){this._cols!==h&&(h>this._cols?this._reflowLarger(h,m):this._reflowSmaller(h,m))}_reflowLarger(h,m){const v=(0,_.reflowLargerGetLinesToRemove)(this.lines,this._cols,h,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(v.length>0){const w=(0,_.reflowLargerCreateNewLayout)(this.lines,v);(0,_.reflowLargerApplyNewLayout)(this.lines,w.layout),this._reflowLargerAdjustViewport(h,m,w.countRemoved)}}_reflowLargerAdjustViewport(h,m,v){const w=this.getNullCell(g.DEFAULT_ATTR_DATA);let C=v;for(;C-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<m&&this.lines.push(new g.BufferLine(h,w))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-v,0)}_reflowSmaller(h,m){const v=this.getNullCell(g.DEFAULT_ATTR_DATA),w=[];let C=0;for(let E=this.lines.length-1;E>=0;E--){let S=this.lines.get(E);if(!S||!S.isWrapped&&S.getTrimmedLength()<=h)continue;const x=[S];for(;S.isWrapped&&E>0;)S=this.lines.get(--E),x.unshift(S);const L=this.ybase+this.y;if(L>=E&&L<E+x.length)continue;const P=x[x.length-1].getTrimmedLength(),A=(0,_.reflowSmallerGetNewLineLengths)(x,this._cols,h),k=A.length-x.length;let B;B=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+k):Math.max(0,this.lines.length-this.lines.maxLength+k);const N=[];for(let I=0;I<k;I++){const $=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);N.push($)}N.length>0&&(w.push({start:E+x.length+C,newLines:N}),C+=N.length),x.push(...N);let F=A.length-1,H=A[F];H===0&&(F--,H=A[F]);let T=x.length-k-1,R=P;for(;T>=0;){const I=Math.min(R,H);if(x[F]===void 0)break;if(x[F].copyCellsFrom(x[T],R-I,H-I,I,!0),H-=I,H===0&&(F--,H=A[F]),R-=I,R===0){T--;const $=Math.max(T,0);R=(0,_.getWrappedLineTrimmedLength)(x,$,this._cols)}}for(let I=0;I<x.length;I++)A[I]<h&&x[I].setCell(A[I],v);let O=k-B;for(;O-- >0;)this.ybase===0?this.y<m-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+C)-m&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+k,this.ybase+m-1)}if(w.length>0){const E=[],S=[];for(let F=0;F<this.lines.length;F++)S.push(this.lines.get(F));const x=this.lines.length;let L=x-1,P=0,A=w[P];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+C);let k=0;for(let F=Math.min(this.lines.maxLength-1,x+C-1);F>=0;F--)if(A&&A.start>L+k){for(let H=A.newLines.length-1;H>=0;H--)this.lines.set(F--,A.newLines[H]);F++,E.push({index:L+1,amount:A.newLines.length}),k+=A.newLines.length,A=w[++P]}else this.lines.set(F,S[L--]);let B=0;for(let F=E.length-1;F>=0;F--)E[F].index+=B,this.lines.onInsertEmitter.fire(E[F]),B+=E[F].amount;const N=Math.max(0,x+C-this.lines.maxLength);N>0&&this.lines.onTrimEmitter.fire(N)}}translateBufferLineToString(h,m,v=0,w){const C=this.lines.get(h);return C?C.translateToString(m,v,w):""}getWrappedRangeForLine(h){let m=h,v=h;for(;m>0&&this.lines.get(m).isWrapped;)m--;for(;v+1<this.lines.length&&this.lines.get(v+1).isWrapped;)v++;return{first:m,last:v}}setupTabStops(h){for(h!=null?this.tabs[h]||(h=this.prevStop(h)):(this.tabs={},h=0);h<this._cols;h+=this._optionsService.rawOptions.tabStopWidth)this.tabs[h]=!0}prevStop(h){for(h==null&&(h=this.x);!this.tabs[--h]&&h>0;);return h>=this._cols?this._cols-1:h<0?0:h}nextStop(h){for(h==null&&(h=this.x);!this.tabs[++h]&&h<this._cols;);return h>=this._cols?this._cols-1:h<0?0:h}clearMarkers(h){this._isClearing=!0;for(let m=0;m<this.markers.length;m++)this.markers[m].line===h&&(this.markers[m].dispose(),this.markers.splice(m--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let h=0;h<this.markers.length;h++)this.markers[h].dispose(),this.markers.splice(h--,1);this._isClearing=!1}addMarker(h){const m=new p.Marker(h);return this.markers.push(m),m.register(this.lines.onTrim(v=>{m.line-=v,m.line<0&&m.dispose()})),m.register(this.lines.onInsert(v=>{m.line>=v.index&&(m.line+=v.amount)})),m.register(this.lines.onDelete(v=>{m.line>=v.index&&m.line<v.index+v.amount&&m.dispose(),m.line>v.index&&(m.line-=v.amount)})),m.register(m.onDispose(()=>this._removeMarker(m))),m}_removeMarker(h){this._isClearing||this.markers.splice(this.markers.indexOf(h),1)}}},8437:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const c=l(3734),u=l(511),d=l(643),g=l(482);o.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);let _=0;class y{constructor(p,f,h=!1){this.isWrapped=h,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*p);const m=f||u.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]);for(let v=0;v<p;++v)this.setCell(v,m);this.length=p}get(p){const f=this._data[3*p+0],h=2097151&f;return[this._data[3*p+1],2097152&f?this._combined[p]:h?(0,g.stringFromCodePoint)(h):"",f>>22,2097152&f?this._combined[p].charCodeAt(this._combined[p].length-1):h]}set(p,f){this._data[3*p+1]=f[d.CHAR_DATA_ATTR_INDEX],f[d.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[p]=f[1],this._data[3*p+0]=2097152|p|f[d.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*p+0]=f[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|f[d.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(p){return this._data[3*p+0]>>22}hasWidth(p){return 12582912&this._data[3*p+0]}getFg(p){return this._data[3*p+1]}getBg(p){return this._data[3*p+2]}hasContent(p){return 4194303&this._data[3*p+0]}getCodePoint(p){const f=this._data[3*p+0];return 2097152&f?this._combined[p].charCodeAt(this._combined[p].length-1):2097151&f}isCombined(p){return 2097152&this._data[3*p+0]}getString(p){const f=this._data[3*p+0];return 2097152&f?this._combined[p]:2097151&f?(0,g.stringFromCodePoint)(2097151&f):""}isProtected(p){return 536870912&this._data[3*p+2]}loadCell(p,f){return _=3*p,f.content=this._data[_+0],f.fg=this._data[_+1],f.bg=this._data[_+2],2097152&f.content&&(f.combinedData=this._combined[p]),268435456&f.bg&&(f.extended=this._extendedAttrs[p]),f}setCell(p,f){2097152&f.content&&(this._combined[p]=f.combinedData),268435456&f.bg&&(this._extendedAttrs[p]=f.extended),this._data[3*p+0]=f.content,this._data[3*p+1]=f.fg,this._data[3*p+2]=f.bg}setCellFromCodePoint(p,f,h,m,v,w){268435456&v&&(this._extendedAttrs[p]=w),this._data[3*p+0]=f|h<<22,this._data[3*p+1]=m,this._data[3*p+2]=v}addCodepointToCell(p,f){let h=this._data[3*p+0];2097152&h?this._combined[p]+=(0,g.stringFromCodePoint)(f):(2097151&h?(this._combined[p]=(0,g.stringFromCodePoint)(2097151&h)+(0,g.stringFromCodePoint)(f),h&=-2097152,h|=2097152):h=f|4194304,this._data[3*p+0]=h)}insertCells(p,f,h,m){if((p%=this.length)&&this.getWidth(p-1)===2&&this.setCellFromCodePoint(p-1,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new c.ExtendedAttrs),f<this.length-p){const v=new u.CellData;for(let w=this.length-p-f-1;w>=0;--w)this.setCell(p+f+w,this.loadCell(p+w,v));for(let w=0;w<f;++w)this.setCell(p+w,h)}else for(let v=p;v<this.length;++v)this.setCell(v,h);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new c.ExtendedAttrs)}deleteCells(p,f,h,m){if(p%=this.length,f<this.length-p){const v=new u.CellData;for(let w=0;w<this.length-p-f;++w)this.setCell(p+w,this.loadCell(p+f+w,v));for(let w=this.length-f;w<this.length;++w)this.setCell(w,h)}else for(let v=p;v<this.length;++v)this.setCell(v,h);p&&this.getWidth(p-1)===2&&this.setCellFromCodePoint(p-1,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new c.ExtendedAttrs),this.getWidth(p)!==0||this.hasContent(p)||this.setCellFromCodePoint(p,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new c.ExtendedAttrs)}replaceCells(p,f,h,m,v=!1){if(v)for(p&&this.getWidth(p-1)===2&&!this.isProtected(p-1)&&this.setCellFromCodePoint(p-1,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new c.ExtendedAttrs),f<this.length&&this.getWidth(f-1)===2&&!this.isProtected(f)&&this.setCellFromCodePoint(f,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new c.ExtendedAttrs);p<f&&p<this.length;)this.isProtected(p)||this.setCell(p,h),p++;else for(p&&this.getWidth(p-1)===2&&this.setCellFromCodePoint(p-1,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new c.ExtendedAttrs),f<this.length&&this.getWidth(f-1)===2&&this.setCellFromCodePoint(f,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new c.ExtendedAttrs);p<f&&p<this.length;)this.setCell(p++,h)}resize(p,f){if(p===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const h=3*p;if(p>this.length){if(this._data.buffer.byteLength>=4*h)this._data=new Uint32Array(this._data.buffer,0,h);else{const m=new Uint32Array(h);m.set(this._data),this._data=m}for(let m=this.length;m<p;++m)this.setCell(m,f)}else{this._data=this._data.subarray(0,h);const m=Object.keys(this._combined);for(let w=0;w<m.length;w++){const C=parseInt(m[w],10);C>=p&&delete this._combined[C]}const v=Object.keys(this._extendedAttrs);for(let w=0;w<v.length;w++){const C=parseInt(v[w],10);C>=p&&delete this._extendedAttrs[C]}}return this.length=p,4*h*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const p=new Uint32Array(this._data.length);return p.set(this._data),this._data=p,1}return 0}fill(p,f=!1){if(f)for(let h=0;h<this.length;++h)this.isProtected(h)||this.setCell(h,p);else{this._combined={},this._extendedAttrs={};for(let h=0;h<this.length;++h)this.setCell(h,p)}}copyFrom(p){this.length!==p.length?this._data=new Uint32Array(p._data):this._data.set(p._data),this.length=p.length,this._combined={};for(const f in p._combined)this._combined[f]=p._combined[f];this._extendedAttrs={};for(const f in p._extendedAttrs)this._extendedAttrs[f]=p._extendedAttrs[f];this.isWrapped=p.isWrapped}clone(){const p=new y(0);p._data=new Uint32Array(this._data),p.length=this.length;for(const f in this._combined)p._combined[f]=this._combined[f];for(const f in this._extendedAttrs)p._extendedAttrs[f]=this._extendedAttrs[f];return p.isWrapped=this.isWrapped,p}getTrimmedLength(){for(let p=this.length-1;p>=0;--p)if(4194303&this._data[3*p+0])return p+(this._data[3*p+0]>>22);return 0}getNoBgTrimmedLength(){for(let p=this.length-1;p>=0;--p)if(4194303&this._data[3*p+0]||50331648&this._data[3*p+2])return p+(this._data[3*p+0]>>22);return 0}copyCellsFrom(p,f,h,m,v){const w=p._data;if(v)for(let E=m-1;E>=0;E--){for(let S=0;S<3;S++)this._data[3*(h+E)+S]=w[3*(f+E)+S];268435456&w[3*(f+E)+2]&&(this._extendedAttrs[h+E]=p._extendedAttrs[f+E])}else for(let E=0;E<m;E++){for(let S=0;S<3;S++)this._data[3*(h+E)+S]=w[3*(f+E)+S];268435456&w[3*(f+E)+2]&&(this._extendedAttrs[h+E]=p._extendedAttrs[f+E])}const C=Object.keys(p._combined);for(let E=0;E<C.length;E++){const S=parseInt(C[E],10);S>=f&&(this._combined[S-f+h]=p._combined[S])}}translateToString(p=!1,f=0,h=this.length){p&&(h=Math.min(h,this.getTrimmedLength()));let m="";for(;f<h;){const v=this._data[3*f+0],w=2097151&v;m+=2097152&v?this._combined[f]:w?(0,g.stringFromCodePoint)(w):d.WHITESPACE_CELL_CHAR,f+=v>>22||1}return m}}o.BufferLine=y},4841:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(l,c){if(l.start.y>l.end.y)throw new Error(`Buffer range end (${l.end.x}, ${l.end.y}) cannot be before start (${l.start.x}, ${l.start.y})`);return c*(l.end.y-l.start.y)+(l.end.x-l.start.x+1)}},4634:(a,o)=>{function l(c,u,d){if(u===c.length-1)return c[u].getTrimmedLength();const g=!c[u].hasContent(d-1)&&c[u].getWidth(d-1)===1,_=c[u+1].getWidth(0)===2;return g&&_?d-1:d}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(c,u,d,g,_){const y=[];for(let b=0;b<c.length-1;b++){let p=b,f=c.get(++p);if(!f.isWrapped)continue;const h=[c.get(b)];for(;p<c.length&&f.isWrapped;)h.push(f),f=c.get(++p);if(g>=b&&g<p){b+=h.length-1;continue}let m=0,v=l(h,m,u),w=1,C=0;for(;w<h.length;){const S=l(h,w,u),x=S-C,L=d-v,P=Math.min(x,L);h[m].copyCellsFrom(h[w],C,v,P,!1),v+=P,v===d&&(m++,v=0),C+=P,C===S&&(w++,C=0),v===0&&m!==0&&h[m-1].getWidth(d-1)===2&&(h[m].copyCellsFrom(h[m-1],d-1,v++,1,!1),h[m-1].setCell(d-1,_))}h[m].replaceCells(v,d,_);let E=0;for(let S=h.length-1;S>0&&(S>m||h[S].getTrimmedLength()===0);S--)E++;E>0&&(y.push(b+h.length-E),y.push(E)),b+=h.length-1}return y},o.reflowLargerCreateNewLayout=function(c,u){const d=[];let g=0,_=u[g],y=0;for(let b=0;b<c.length;b++)if(_===b){const p=u[++g];c.onDeleteEmitter.fire({index:b-y,amount:p}),b+=p-1,y+=p,_=u[++g]}else d.push(b);return{layout:d,countRemoved:y}},o.reflowLargerApplyNewLayout=function(c,u){const d=[];for(let g=0;g<u.length;g++)d.push(c.get(u[g]));for(let g=0;g<d.length;g++)c.set(g,d[g]);c.length=u.length},o.reflowSmallerGetNewLineLengths=function(c,u,d){const g=[],_=c.map((f,h)=>l(c,h,u)).reduce((f,h)=>f+h);let y=0,b=0,p=0;for(;p<_;){if(_-p<d){g.push(_-p);break}y+=d;const f=l(c,b,u);y>f&&(y-=f,b++);const h=c[b].getWidth(y-1)===2;h&&y--;const m=h?d-1:d;g.push(m),p+=m}return g},o.getWrappedLineTrimmedLength=l},5295:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const c=l(8460),u=l(844),d=l(9092);class g extends u.Disposable{constructor(y,b){super(),this._optionsService=y,this._bufferService=b,this._onBufferActivate=this.register(new c.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new d.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(y){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(y),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(y,b){this._normal.resize(y,b),this._alt.resize(y,b),this.setupTabStops(y)}setupTabStops(y){this._normal.setupTabStops(y),this._alt.setupTabStops(y)}}o.BufferSet=g},511:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const c=l(482),u=l(643),d=l(3734);class g extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(y){const b=new g;return b.setFromCharData(y),b}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(y){this.fg=y[u.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(y[u.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(y[u.CHAR_DATA_CHAR_INDEX].length===2){const p=y[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=p&&p<=56319){const f=y[u.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=f&&f<=57343?this.content=1024*(p-55296)+f-56320+65536|y[u.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=y[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[u.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=y[u.CHAR_DATA_CHAR_INDEX],this.content=2097152|y[u.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=g},643:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const c=l(8460),u=l(844);class d{get id(){return this._id}constructor(_){this.line=_,this.isDisposed=!1,this._disposables=[],this._id=d._nextId++,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,u.disposeArray)(this._disposables),this._disposables.length=0)}register(_){return this._disposables.push(_),_}}o.Marker=d,d._nextId=1},7116:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,o)=>{var l,c,u;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
|
|
130
|
+
`,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL=""}(l||(o.C0=l={})),function(d){d.PAD="",d.HOP="",d.BPH="",d.NBH="",d.IND="",d.NEL="
",d.SSA="",d.ESA="",d.HTS="",d.HTJ="",d.VTS="",d.PLD="",d.PLU="",d.RI="",d.SS2="",d.SS3="",d.DCS="",d.PU1="",d.PU2="",d.STS="",d.CCH="",d.MW="",d.SPA="",d.EPA="",d.SOS="",d.SGCI="",d.SCI="",d.CSI="",d.ST="",d.OSC="",d.PM="",d.APC=""}(c||(o.C1=c={})),function(d){d.ST=`${l.ESC}\\`}(u||(o.C1_ESCAPED=u={}))},7399:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const c=l(2584),u={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(d,g,_,y){const b={type:0,cancel:!1,key:void 0},p=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?b.key=g?c.C0.ESC+"OA":c.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?b.key=g?c.C0.ESC+"OD":c.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?b.key=g?c.C0.ESC+"OC":c.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(b.key=g?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:if(d.altKey){b.key=c.C0.ESC+c.C0.DEL;break}b.key=c.C0.DEL;break;case 9:if(d.shiftKey){b.key=c.C0.ESC+"[Z";break}b.key=c.C0.HT,b.cancel=!0;break;case 13:b.key=d.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,b.cancel=!0;break;case 27:b.key=c.C0.ESC,d.altKey&&(b.key=c.C0.ESC+c.C0.ESC),b.cancel=!0;break;case 37:if(d.metaKey)break;p?(b.key=c.C0.ESC+"[1;"+(p+1)+"D",b.key===c.C0.ESC+"[1;3D"&&(b.key=c.C0.ESC+(_?"b":"[1;5D"))):b.key=g?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(d.metaKey)break;p?(b.key=c.C0.ESC+"[1;"+(p+1)+"C",b.key===c.C0.ESC+"[1;3C"&&(b.key=c.C0.ESC+(_?"f":"[1;5C"))):b.key=g?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(d.metaKey)break;p?(b.key=c.C0.ESC+"[1;"+(p+1)+"A",_||b.key!==c.C0.ESC+"[1;3A"||(b.key=c.C0.ESC+"[1;5A")):b.key=g?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(d.metaKey)break;p?(b.key=c.C0.ESC+"[1;"+(p+1)+"B",_||b.key!==c.C0.ESC+"[1;3B"||(b.key=c.C0.ESC+"[1;5B")):b.key=g?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(b.key=c.C0.ESC+"[2~");break;case 46:b.key=p?c.C0.ESC+"[3;"+(p+1)+"~":c.C0.ESC+"[3~";break;case 36:b.key=p?c.C0.ESC+"[1;"+(p+1)+"H":g?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:b.key=p?c.C0.ESC+"[1;"+(p+1)+"F":g?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:d.shiftKey?b.type=2:d.ctrlKey?b.key=c.C0.ESC+"[5;"+(p+1)+"~":b.key=c.C0.ESC+"[5~";break;case 34:d.shiftKey?b.type=3:d.ctrlKey?b.key=c.C0.ESC+"[6;"+(p+1)+"~":b.key=c.C0.ESC+"[6~";break;case 112:b.key=p?c.C0.ESC+"[1;"+(p+1)+"P":c.C0.ESC+"OP";break;case 113:b.key=p?c.C0.ESC+"[1;"+(p+1)+"Q":c.C0.ESC+"OQ";break;case 114:b.key=p?c.C0.ESC+"[1;"+(p+1)+"R":c.C0.ESC+"OR";break;case 115:b.key=p?c.C0.ESC+"[1;"+(p+1)+"S":c.C0.ESC+"OS";break;case 116:b.key=p?c.C0.ESC+"[15;"+(p+1)+"~":c.C0.ESC+"[15~";break;case 117:b.key=p?c.C0.ESC+"[17;"+(p+1)+"~":c.C0.ESC+"[17~";break;case 118:b.key=p?c.C0.ESC+"[18;"+(p+1)+"~":c.C0.ESC+"[18~";break;case 119:b.key=p?c.C0.ESC+"[19;"+(p+1)+"~":c.C0.ESC+"[19~";break;case 120:b.key=p?c.C0.ESC+"[20;"+(p+1)+"~":c.C0.ESC+"[20~";break;case 121:b.key=p?c.C0.ESC+"[21;"+(p+1)+"~":c.C0.ESC+"[21~";break;case 122:b.key=p?c.C0.ESC+"[23;"+(p+1)+"~":c.C0.ESC+"[23~";break;case 123:b.key=p?c.C0.ESC+"[24;"+(p+1)+"~":c.C0.ESC+"[24~";break;default:if(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(_&&!y||!d.altKey||d.metaKey)!_||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?b.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(b.key=c.C0.US),d.key==="@"&&(b.key=c.C0.NUL)):d.keyCode===65&&(b.type=1);else{const f=u[d.keyCode],h=f==null?void 0:f[d.shiftKey?1:0];if(h)b.key=c.C0.ESC+h;else if(d.keyCode>=65&&d.keyCode<=90){const m=d.ctrlKey?d.keyCode-64:d.keyCode+32;let v=String.fromCharCode(m);d.shiftKey&&(v=v.toUpperCase()),b.key=c.C0.ESC+v}else if(d.keyCode===32)b.key=c.C0.ESC+(d.ctrlKey?c.C0.NUL:" ");else if(d.key==="Dead"&&d.code.startsWith("Key")){let m=d.code.slice(3,4);d.shiftKey||(m=m.toLowerCase()),b.key=c.C0.ESC+m,b.cancel=!0}}else d.keyCode>=65&&d.keyCode<=90?b.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?b.key=c.C0.NUL:d.keyCode>=51&&d.keyCode<=55?b.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?b.key=c.C0.DEL:d.keyCode===219?b.key=c.C0.ESC:d.keyCode===220?b.key=c.C0.FS:d.keyCode===221&&(b.key=c.C0.GS)}return b}},482:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},o.utf32ToString=function(l,c=0,u=l.length){let d="";for(let g=c;g<u;++g){let _=l[g];_>65535?(_-=65536,d+=String.fromCharCode(55296+(_>>10))+String.fromCharCode(_%1024+56320)):d+=String.fromCharCode(_)}return d},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,c){const u=l.length;if(!u)return 0;let d=0,g=0;if(this._interim){const _=l.charCodeAt(g++);56320<=_&&_<=57343?c[d++]=1024*(this._interim-55296)+_-56320+65536:(c[d++]=this._interim,c[d++]=_),this._interim=0}for(let _=g;_<u;++_){const y=l.charCodeAt(_);if(55296<=y&&y<=56319){if(++_>=u)return this._interim=y,d;const b=l.charCodeAt(_);56320<=b&&b<=57343?c[d++]=1024*(y-55296)+b-56320+65536:(c[d++]=y,c[d++]=b)}else y!==65279&&(c[d++]=y)}return d}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,c){const u=l.length;if(!u)return 0;let d,g,_,y,b=0,p=0,f=0;if(this.interim[0]){let v=!1,w=this.interim[0];w&=(224&w)==192?31:(240&w)==224?15:7;let C,E=0;for(;(C=63&this.interim[++E])&&E<4;)w<<=6,w|=C;const S=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=S-E;for(;f<x;){if(f>=u)return 0;if(C=l[f++],(192&C)!=128){f--,v=!0;break}this.interim[E++]=C,w<<=6,w|=63&C}v||(S===2?w<128?f--:c[b++]=w:S===3?w<2048||w>=55296&&w<=57343||w===65279||(c[b++]=w):w<65536||w>1114111||(c[b++]=w)),this.interim.fill(0)}const h=u-4;let m=f;for(;m<u;){for(;!(!(m<h)||128&(d=l[m])||128&(g=l[m+1])||128&(_=l[m+2])||128&(y=l[m+3]));)c[b++]=d,c[b++]=g,c[b++]=_,c[b++]=y,m+=4;if(d=l[m++],d<128)c[b++]=d;else if((224&d)==192){if(m>=u)return this.interim[0]=d,b;if(g=l[m++],(192&g)!=128){m--;continue}if(p=(31&d)<<6|63&g,p<128){m--;continue}c[b++]=p}else if((240&d)==224){if(m>=u)return this.interim[0]=d,b;if(g=l[m++],(192&g)!=128){m--;continue}if(m>=u)return this.interim[0]=d,this.interim[1]=g,b;if(_=l[m++],(192&_)!=128){m--;continue}if(p=(15&d)<<12|(63&g)<<6|63&_,p<2048||p>=55296&&p<=57343||p===65279)continue;c[b++]=p}else if((248&d)==240){if(m>=u)return this.interim[0]=d,b;if(g=l[m++],(192&g)!=128){m--;continue}if(m>=u)return this.interim[0]=d,this.interim[1]=g,b;if(_=l[m++],(192&_)!=128){m--;continue}if(m>=u)return this.interim[0]=d,this.interim[1]=g,this.interim[2]=_,b;if(y=l[m++],(192&y)!=128){m--;continue}if(p=(7&d)<<18|(63&g)<<12|(63&_)<<6|63&y,p<65536||p>1114111)continue;c[b++]=p}}return b}}},225:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const l=[[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]],c=[[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 u;o.UnicodeV6=class{constructor(){if(this.version="6",!u){u=new Uint8Array(65536),u.fill(1),u[0]=0,u.fill(0,1,32),u.fill(0,127,160),u.fill(2,4352,4448),u[9001]=2,u[9002]=2,u.fill(2,11904,42192),u[12351]=1,u.fill(2,44032,55204),u.fill(2,63744,64256),u.fill(2,65040,65050),u.fill(2,65072,65136),u.fill(2,65280,65377),u.fill(2,65504,65511);for(let d=0;d<l.length;++d)u.fill(0,l[d][0],l[d][1]+1)}}wcwidth(d){return d<32?0:d<127?1:d<65536?u[d]:function(g,_){let y,b=0,p=_.length-1;if(g<_[0][0]||g>_[p][1])return!1;for(;p>=b;)if(y=b+p>>1,g>_[y][1])b=y+1;else{if(!(g<_[y][0]))return!0;p=y-1}return!1}(d,c)?0:d>=131072&&d<=196605||d>=196608&&d<=262141?2:1}}},5981:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const c=l(8460),u=l(844);class d extends u.Disposable{constructor(_){super(),this._action=_,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(_,y){if(y!==void 0&&this._syncCalls>y)return void(this._syncCalls=0);if(this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let b;for(this._isSyncWriting=!0;b=this._writeBuffer.shift();){this._action(b);const p=this._callbacks.shift();p&&p()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(_,y){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(y),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(y)}_innerWrite(_=0,y=!0){const b=_||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const p=this._writeBuffer[this._bufferOffset],f=this._action(p,y);if(f){const m=v=>Date.now()-b>=12?setTimeout(()=>this._innerWrite(0,v)):this._innerWrite(b,v);return void f.catch(v=>(queueMicrotask(()=>{throw v}),Promise.resolve(!1))).then(m)}const h=this._callbacks[this._bufferOffset];if(h&&h(),this._bufferOffset++,this._pendingData-=p.length,Date.now()-b>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=d},5941:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const l=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,c=/^[\da-f]+$/;function u(d,g){const _=d.toString(16),y=_.length<2?"0"+_:_;switch(g){case 4:return _[0];case 8:return y;case 12:return(y+y).slice(0,3);default:return y+y}}o.parseColor=function(d){if(!d)return;let g=d.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const _=l.exec(g);if(_){const y=_[1]?15:_[4]?255:_[7]?4095:65535;return[Math.round(parseInt(_[1]||_[4]||_[7]||_[10],16)/y*255),Math.round(parseInt(_[2]||_[5]||_[8]||_[11],16)/y*255),Math.round(parseInt(_[3]||_[6]||_[9]||_[12],16)/y*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),c.exec(g)&&[3,6,9,12].includes(g.length))){const _=g.length/3,y=[0,0,0];for(let b=0;b<3;++b){const p=parseInt(g.slice(_*b,_*b+_),16);y[b]=_===1?p<<4:_===2?p:_===3?p>>4:p>>8}return y}},o.toRgbString=function(d,g=16){const[_,y,b]=d;return`rgb:${u(_,g)}/${u(y,g)}/${u(b,g)}`}},5770:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const c=l(482),u=l(8742),d=l(5770),g=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(y,b){this._handlers[y]===void 0&&(this._handlers[y]=[]);const p=this._handlers[y];return p.push(b),{dispose:()=>{const f=p.indexOf(b);f!==-1&&p.splice(f,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}reset(){if(this._active.length)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].unhook(!1);this._stack.paused=!1,this._active=g,this._ident=0}hook(y,b){if(this.reset(),this._ident=y,this._active=this._handlers[y]||g,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].hook(b);else this._handlerFb(this._ident,"HOOK",b)}put(y,b,p){if(this._active.length)for(let f=this._active.length-1;f>=0;f--)this._active[f].put(y,b,p);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(y,b,p))}unhook(y,b=!0){if(this._active.length){let p=!1,f=this._active.length-1,h=!1;if(this._stack.paused&&(f=this._stack.loopPosition-1,p=b,h=this._stack.fallThrough,this._stack.paused=!1),!h&&p===!1){for(;f>=0&&(p=this._active[f].unhook(y),p!==!0);f--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!1,p;f--}for(;f>=0;f--)if(p=this._active[f].unhook(!1),p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!0,p}else this._handlerFb(this._ident,"UNHOOK",y);this._active=g,this._ident=0}};const _=new u.Params;_.addParam(0),o.DcsHandler=class{constructor(y){this._handler=y,this._data="",this._params=_,this._hitLimit=!1}hook(y){this._params=y.length>1||y.params[0]?y.clone():_,this._data="",this._hitLimit=!1}put(y,b,p){this._hitLimit||(this._data+=(0,c.utf32ToString)(y,b,p),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(y){let b=!1;if(this._hitLimit)b=!1;else if(y&&(b=this._handler(this._data,this._params),b instanceof Promise))return b.then(p=>(this._params=_,this._data="",this._hitLimit=!1,p));return this._params=_,this._data="",this._hitLimit=!1,b}}},2015:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const c=l(844),u=l(8742),d=l(6242),g=l(6351);class _{constructor(f){this.table=new Uint8Array(f)}setDefault(f,h){this.table.fill(f<<4|h)}add(f,h,m,v){this.table[h<<8|f]=m<<4|v}addMany(f,h,m,v){for(let w=0;w<f.length;w++)this.table[h<<8|f[w]]=m<<4|v}}o.TransitionTable=_;const y=160;o.VT500_TRANSITION_TABLE=function(){const p=new _(4095),f=Array.apply(null,Array(256)).map((E,S)=>S),h=(E,S)=>f.slice(E,S),m=h(32,127),v=h(0,24);v.push(25),v.push.apply(v,h(28,32));const w=h(0,14);let C;for(C in p.setDefault(1,0),p.addMany(m,0,2,0),w)p.addMany([24,26,153,154],C,3,0),p.addMany(h(128,144),C,3,0),p.addMany(h(144,152),C,3,0),p.add(156,C,0,0),p.add(27,C,11,1),p.add(157,C,4,8),p.addMany([152,158,159],C,0,7),p.add(155,C,11,3),p.add(144,C,11,9);return p.addMany(v,0,3,0),p.addMany(v,1,3,1),p.add(127,1,0,1),p.addMany(v,8,0,8),p.addMany(v,3,3,3),p.add(127,3,0,3),p.addMany(v,4,3,4),p.add(127,4,0,4),p.addMany(v,6,3,6),p.addMany(v,5,3,5),p.add(127,5,0,5),p.addMany(v,2,3,2),p.add(127,2,0,2),p.add(93,1,4,8),p.addMany(m,8,5,8),p.add(127,8,5,8),p.addMany([156,27,24,26,7],8,6,0),p.addMany(h(28,32),8,0,8),p.addMany([88,94,95],1,0,7),p.addMany(m,7,0,7),p.addMany(v,7,0,7),p.add(156,7,0,0),p.add(127,7,0,7),p.add(91,1,11,3),p.addMany(h(64,127),3,7,0),p.addMany(h(48,60),3,8,4),p.addMany([60,61,62,63],3,9,4),p.addMany(h(48,60),4,8,4),p.addMany(h(64,127),4,7,0),p.addMany([60,61,62,63],4,0,6),p.addMany(h(32,64),6,0,6),p.add(127,6,0,6),p.addMany(h(64,127),6,0,0),p.addMany(h(32,48),3,9,5),p.addMany(h(32,48),5,9,5),p.addMany(h(48,64),5,0,6),p.addMany(h(64,127),5,7,0),p.addMany(h(32,48),4,9,5),p.addMany(h(32,48),1,9,2),p.addMany(h(32,48),2,9,2),p.addMany(h(48,127),2,10,0),p.addMany(h(48,80),1,10,0),p.addMany(h(81,88),1,10,0),p.addMany([89,90,92],1,10,0),p.addMany(h(96,127),1,10,0),p.add(80,1,11,9),p.addMany(v,9,0,9),p.add(127,9,0,9),p.addMany(h(28,32),9,0,9),p.addMany(h(32,48),9,9,12),p.addMany(h(48,60),9,8,10),p.addMany([60,61,62,63],9,9,10),p.addMany(v,11,0,11),p.addMany(h(32,128),11,0,11),p.addMany(h(28,32),11,0,11),p.addMany(v,10,0,10),p.add(127,10,0,10),p.addMany(h(28,32),10,0,10),p.addMany(h(48,60),10,8,10),p.addMany([60,61,62,63],10,0,11),p.addMany(h(32,48),10,9,12),p.addMany(v,12,0,12),p.add(127,12,0,12),p.addMany(h(28,32),12,0,12),p.addMany(h(32,48),12,9,12),p.addMany(h(48,64),12,0,11),p.addMany(h(64,127),12,12,13),p.addMany(h(64,127),10,12,13),p.addMany(h(64,127),9,12,13),p.addMany(v,13,13,13),p.addMany(m,13,13,13),p.add(127,13,0,13),p.addMany([27,156,24,26],13,14,0),p.add(y,0,2,0),p.add(y,8,5,8),p.add(y,6,0,6),p.add(y,11,0,11),p.add(y,13,13,13),p}();class b extends c.Disposable{constructor(f=o.VT500_TRANSITION_TABLE){super(),this._transitions=f,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new u.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(h,m,v)=>{},this._executeHandlerFb=h=>{},this._csiHandlerFb=(h,m)=>{},this._escHandlerFb=h=>{},this._errorHandlerFb=h=>h,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,c.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new d.OscParser),this._dcsParser=this.register(new g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(f,h=[64,126]){let m=0;if(f.prefix){if(f.prefix.length>1)throw new Error("only one byte as prefix supported");if(m=f.prefix.charCodeAt(0),m&&60>m||m>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(f.intermediates){if(f.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let w=0;w<f.intermediates.length;++w){const C=f.intermediates.charCodeAt(w);if(32>C||C>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");m<<=8,m|=C}}if(f.final.length!==1)throw new Error("final must be a single byte");const v=f.final.charCodeAt(0);if(h[0]>v||v>h[1])throw new Error(`final must be in range ${h[0]} .. ${h[1]}`);return m<<=8,m|=v,m}identToString(f){const h=[];for(;f;)h.push(String.fromCharCode(255&f)),f>>=8;return h.reverse().join("")}setPrintHandler(f){this._printHandler=f}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(f,h){const m=this._identifier(f,[48,126]);this._escHandlers[m]===void 0&&(this._escHandlers[m]=[]);const v=this._escHandlers[m];return v.push(h),{dispose:()=>{const w=v.indexOf(h);w!==-1&&v.splice(w,1)}}}clearEscHandler(f){this._escHandlers[this._identifier(f,[48,126])]&&delete this._escHandlers[this._identifier(f,[48,126])]}setEscHandlerFallback(f){this._escHandlerFb=f}setExecuteHandler(f,h){this._executeHandlers[f.charCodeAt(0)]=h}clearExecuteHandler(f){this._executeHandlers[f.charCodeAt(0)]&&delete this._executeHandlers[f.charCodeAt(0)]}setExecuteHandlerFallback(f){this._executeHandlerFb=f}registerCsiHandler(f,h){const m=this._identifier(f);this._csiHandlers[m]===void 0&&(this._csiHandlers[m]=[]);const v=this._csiHandlers[m];return v.push(h),{dispose:()=>{const w=v.indexOf(h);w!==-1&&v.splice(w,1)}}}clearCsiHandler(f){this._csiHandlers[this._identifier(f)]&&delete this._csiHandlers[this._identifier(f)]}setCsiHandlerFallback(f){this._csiHandlerFb=f}registerDcsHandler(f,h){return this._dcsParser.registerHandler(this._identifier(f),h)}clearDcsHandler(f){this._dcsParser.clearHandler(this._identifier(f))}setDcsHandlerFallback(f){this._dcsParser.setHandlerFallback(f)}registerOscHandler(f,h){return this._oscParser.registerHandler(f,h)}clearOscHandler(f){this._oscParser.clearHandler(f)}setOscHandlerFallback(f){this._oscParser.setHandlerFallback(f)}setErrorHandler(f){this._errorHandler=f}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(f,h,m,v,w){this._parseStack.state=f,this._parseStack.handlers=h,this._parseStack.handlerPos=m,this._parseStack.transition=v,this._parseStack.chunkPos=w}parse(f,h,m){let v,w=0,C=0,E=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,E=this._parseStack.chunkPos+1;else{if(m===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const S=this._parseStack.handlers;let x=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(m===!1&&x>-1){for(;x>=0&&(v=S[x](this._params),v!==!0);x--)if(v instanceof Promise)return this._parseStack.handlerPos=x,v}this._parseStack.handlers=[];break;case 4:if(m===!1&&x>-1){for(;x>=0&&(v=S[x](),v!==!0);x--)if(v instanceof Promise)return this._parseStack.handlerPos=x,v}this._parseStack.handlers=[];break;case 6:if(w=f[this._parseStack.chunkPos],v=this._dcsParser.unhook(w!==24&&w!==26,m),v)return v;w===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(w=f[this._parseStack.chunkPos],v=this._oscParser.end(w!==24&&w!==26,m),v)return v;w===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,E=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let S=E;S<h;++S){switch(w=f[S],C=this._transitions.table[this.currentState<<8|(w<160?w:y)],C>>4){case 2:for(let k=S+1;;++k){if(k>=h||(w=f[k])<32||w>126&&w<y){this._printHandler(f,S,k),S=k-1;break}if(++k>=h||(w=f[k])<32||w>126&&w<y){this._printHandler(f,S,k),S=k-1;break}if(++k>=h||(w=f[k])<32||w>126&&w<y){this._printHandler(f,S,k),S=k-1;break}if(++k>=h||(w=f[k])<32||w>126&&w<y){this._printHandler(f,S,k),S=k-1;break}}break;case 3:this._executeHandlers[w]?this._executeHandlers[w]():this._executeHandlerFb(w),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:S,code:w,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const x=this._csiHandlers[this._collect<<8|w];let L=x?x.length-1:-1;for(;L>=0&&(v=x[L](this._params),v!==!0);L--)if(v instanceof Promise)return this._preserveStack(3,x,L,C,S),v;L<0&&this._csiHandlerFb(this._collect<<8|w,this._params),this.precedingCodepoint=0;break;case 8:do switch(w){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(w-48)}while(++S<h&&(w=f[S])>47&&w<60);S--;break;case 9:this._collect<<=8,this._collect|=w;break;case 10:const P=this._escHandlers[this._collect<<8|w];let A=P?P.length-1:-1;for(;A>=0&&(v=P[A](),v!==!0);A--)if(v instanceof Promise)return this._preserveStack(4,P,A,C,S),v;A<0&&this._escHandlerFb(this._collect<<8|w),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|w,this._params);break;case 13:for(let k=S+1;;++k)if(k>=h||(w=f[k])===24||w===26||w===27||w>127&&w<y){this._dcsParser.put(f,S,k),S=k-1;break}break;case 14:if(v=this._dcsParser.unhook(w!==24&&w!==26),v)return this._preserveStack(6,[],0,C,S),v;w===27&&(C|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(let k=S+1;;k++)if(k>=h||(w=f[k])<32||w>127&&w<y){this._oscParser.put(f,S,k),S=k-1;break}break;case 6:if(v=this._oscParser.end(w!==24&&w!==26),v)return this._preserveStack(5,[],0,C,S),v;w===27&&(C|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&C}}}o.EscapeSequenceParser=b},6242:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const c=l(5770),u=l(482),d=[];o.OscParser=class{constructor(){this._state=0,this._active=d,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,_){this._handlers[g]===void 0&&(this._handlers[g]=[]);const y=this._handlers[g];return y.push(_),{dispose:()=>{const b=y.indexOf(_);b!==-1&&y.splice(b,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=d}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=d,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||d,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,_,y){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(g,_,y);else this._handlerFb(this._id,"PUT",(0,u.utf32ToString)(g,_,y))}start(){this.reset(),this._state=1}put(g,_,y){if(this._state!==3){if(this._state===1)for(;_<y;){const b=g[_++];if(b===59){this._state=2,this._start();break}if(b<48||57<b)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+b-48}this._state===2&&y-_>0&&this._put(g,_,y)}}end(g,_=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let y=!1,b=this._active.length-1,p=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,y=_,p=this._stack.fallThrough,this._stack.paused=!1),!p&&y===!1){for(;b>=0&&(y=this._active[b].end(g),y!==!0);b--)if(y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,y;b--}for(;b>=0;b--)if(y=this._active[b].end(!1),y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,y}else this._handlerFb(this._id,"END",g);this._active=d,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,_,y){this._hitLimit||(this._data+=(0,u.utf32ToString)(g,_,y),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let _=!1;if(this._hitLimit)_=!1;else if(g&&(_=this._handler(this._data),_ instanceof Promise))return _.then(y=>(this._data="",this._hitLimit=!1,y));return this._data="",this._hitLimit=!1,_}}},8742:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const l=2147483647;class c{static fromArray(d){const g=new c;if(!d.length)return g;for(let _=Array.isArray(d[0])?1:0;_<d.length;++_){const y=d[_];if(Array.isArray(y))for(let b=0;b<y.length;++b)g.addSubParam(y[b]);else g.addParam(y)}return g}constructor(d=32,g=32){if(this.maxLength=d,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const d=new c(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d}toArray(){const d=[];for(let g=0;g<this.length;++g){d.push(this.params[g]);const _=this._subParamsIdx[g]>>8,y=255&this._subParamsIdx[g];y-_>0&&d.push(Array.prototype.slice.call(this._subParams,_,y))}return d}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>l?l:d}}addSubParam(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>l?l:d,this._subParamsIdx[this.length-1]++}}hasSubParams(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0}getSubParams(d){const g=this._subParamsIdx[d]>>8,_=255&this._subParamsIdx[d];return _-g>0?this._subParams.subarray(g,_):null}getSubParamsAll(){const d={};for(let g=0;g<this.length;++g){const _=this._subParamsIdx[g]>>8,y=255&this._subParamsIdx[g];y-_>0&&(d[g]=this._subParams.slice(_,y))}return d}addDigit(d){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const _=this._digitIsSub?this._subParams:this.params,y=_[g-1];_[g-1]=~y?Math.min(10*y+d,l):d}}o.Params=c},5741:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()}loadAddon(l,c){const u={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(u),c.dispose=()=>this._wrappedAddonDispose(u),c.activate(l)}_wrappedAddonDispose(l){if(l.isDisposed)return;let c=-1;for(let u=0;u<this._addons.length;u++)if(this._addons[u]===l){c=u;break}if(c===-1)throw new Error("Could not dispose an addon that has not been loaded");l.isDisposed=!0,l.dispose.apply(l.instance),this._addons.splice(c,1)}}},8771:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const c=l(3785),u=l(511);o.BufferApiView=class{constructor(d,g){this._buffer=d,this.type=g}init(d){return this._buffer=d,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(d){const g=this._buffer.lines.get(d);if(g)return new c.BufferLineApiView(g)}getNullCell(){return new u.CellData}}},3785:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const c=l(511);o.BufferLineApiView=class{constructor(u){this._line=u}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(u,d){if(!(u<0||u>=this._line.length))return d?(this._line.loadCell(u,d),d):this._line.loadCell(u,new c.CellData)}translateToString(u,d,g){return this._line.translateToString(u,d,g)}}},8285:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const c=l(8771),u=l(8460),d=l(844);class g extends d.Disposable{constructor(y){super(),this._core=y,this._onBufferChange=this.register(new u.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=g},7975:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(l){this._core=l}registerCsiHandler(l,c){return this._core.registerCsiHandler(l,u=>c(u.toArray()))}addCsiHandler(l,c){return this.registerCsiHandler(l,c)}registerDcsHandler(l,c){return this._core.registerDcsHandler(l,(u,d)=>c(u,d.toArray()))}addDcsHandler(l,c){return this.registerDcsHandler(l,c)}registerEscHandler(l,c){return this._core.registerEscHandler(l,c)}addEscHandler(l,c){return this.registerEscHandler(l,c)}registerOscHandler(l,c){return this._core.registerOscHandler(l,c)}addOscHandler(l,c){return this.registerOscHandler(l,c)}}},7090:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(l){this._core=l}register(l){this._core.unicodeService.register(l)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(l){this._core.unicodeService.activeVersion=l}}},744:function(a,o,l){var c=this&&this.__decorate||function(p,f,h,m){var v,w=arguments.length,C=w<3?f:m===null?m=Object.getOwnPropertyDescriptor(f,h):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(p,f,h,m);else for(var E=p.length-1;E>=0;E--)(v=p[E])&&(C=(w<3?v(C):w>3?v(f,h,C):v(f,h))||C);return w>3&&C&&Object.defineProperty(f,h,C),C},u=this&&this.__param||function(p,f){return function(h,m){f(h,m,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const d=l(8460),g=l(844),_=l(5295),y=l(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let b=o.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(p){super(),this.isUserScrolling=!1,this._onResize=this.register(new d.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(p.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(p.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new _.BufferSet(p,this))}resize(p,f){this.cols=p,this.rows=f,this.buffers.resize(p,f),this._onResize.fire({cols:p,rows:f})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(p,f=!1){const h=this.buffer;let m;m=this._cachedBlankLine,m&&m.length===this.cols&&m.getFg(0)===p.fg&&m.getBg(0)===p.bg||(m=h.getBlankLine(p,f),this._cachedBlankLine=m),m.isWrapped=f;const v=h.ybase+h.scrollTop,w=h.ybase+h.scrollBottom;if(h.scrollTop===0){const C=h.lines.isFull;w===h.lines.length-1?C?h.lines.recycle().copyFrom(m):h.lines.push(m.clone()):h.lines.splice(w+1,0,m.clone()),C?this.isUserScrolling&&(h.ydisp=Math.max(h.ydisp-1,0)):(h.ybase++,this.isUserScrolling||h.ydisp++)}else{const C=w-v+1;h.lines.shiftElements(v+1,C-1,-1),h.lines.set(w,m.clone())}this.isUserScrolling||(h.ydisp=h.ybase),this._onScroll.fire(h.ydisp)}scrollLines(p,f,h){const m=this.buffer;if(p<0){if(m.ydisp===0)return;this.isUserScrolling=!0}else p+m.ydisp>=m.ybase&&(this.isUserScrolling=!1);const v=m.ydisp;m.ydisp=Math.max(Math.min(m.ydisp+p,m.ybase),0),v!==m.ydisp&&(f||this._onScroll.fire(m.ydisp))}};o.BufferService=b=c([u(0,y.IOptionsService)],b)},7994:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(l){this.glevel=l,this.charset=this._charsets[l]}setgCharset(l,c){this._charsets[l]=c,this.glevel===l&&(this.charset=c)}}},1753:function(a,o,l){var c=this&&this.__decorate||function(m,v,w,C){var E,S=arguments.length,x=S<3?v:C===null?C=Object.getOwnPropertyDescriptor(v,w):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(m,v,w,C);else for(var L=m.length-1;L>=0;L--)(E=m[L])&&(x=(S<3?E(x):S>3?E(v,w,x):E(v,w))||x);return S>3&&x&&Object.defineProperty(v,w,x),x},u=this&&this.__param||function(m,v){return function(w,C){v(w,C,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const d=l(2585),g=l(8460),_=l(844),y={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:m=>m.button!==4&&m.action===1&&(m.ctrl=!1,m.alt=!1,m.shift=!1,!0)},VT200:{events:19,restrict:m=>m.action!==32},DRAG:{events:23,restrict:m=>m.action!==32||m.button!==3},ANY:{events:31,restrict:m=>!0}};function b(m,v){let w=(m.ctrl?16:0)|(m.shift?4:0)|(m.alt?8:0);return m.button===4?(w|=64,w|=m.action):(w|=3&m.button,4&m.button&&(w|=64),8&m.button&&(w|=128),m.action===32?w|=32:m.action!==0||v||(w|=3)),w}const p=String.fromCharCode,f={DEFAULT:m=>{const v=[b(m,!1)+32,m.col+32,m.row+32];return v[0]>255||v[1]>255||v[2]>255?"":`\x1B[M${p(v[0])}${p(v[1])}${p(v[2])}`},SGR:m=>{const v=m.action===0&&m.button!==4?"m":"M";return`\x1B[<${b(m,!0)};${m.col};${m.row}${v}`},SGR_PIXELS:m=>{const v=m.action===0&&m.button!==4?"m":"M";return`\x1B[<${b(m,!0)};${m.x};${m.y}${v}`}};let h=o.CoreMouseService=class extends _.Disposable{constructor(m,v){super(),this._bufferService=m,this._coreService=v,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const w of Object.keys(y))this.addProtocol(w,y[w]);for(const w of Object.keys(f))this.addEncoding(w,f[w]);this.reset()}addProtocol(m,v){this._protocols[m]=v}addEncoding(m,v){this._encodings[m]=v}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(m){if(!this._protocols[m])throw new Error(`unknown protocol "${m}"`);this._activeProtocol=m,this._onProtocolChange.fire(this._protocols[m].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(m){if(!this._encodings[m])throw new Error(`unknown encoding "${m}"`);this._activeEncoding=m}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(m){if(m.col<0||m.col>=this._bufferService.cols||m.row<0||m.row>=this._bufferService.rows||m.button===4&&m.action===32||m.button===3&&m.action!==32||m.button!==4&&(m.action===2||m.action===3)||(m.col++,m.row++,m.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,m,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(m))return!1;const v=this._encodings[this._activeEncoding](m);return v&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(v):this._coreService.triggerDataEvent(v,!0)),this._lastEvent=m,!0}explainEvents(m){return{down:!!(1&m),up:!!(2&m),drag:!!(4&m),move:!!(8&m),wheel:!!(16&m)}}_equalEvents(m,v,w){if(w){if(m.x!==v.x||m.y!==v.y)return!1}else if(m.col!==v.col||m.row!==v.row)return!1;return m.button===v.button&&m.action===v.action&&m.ctrl===v.ctrl&&m.alt===v.alt&&m.shift===v.shift}};o.CoreMouseService=h=c([u(0,d.IBufferService),u(1,d.ICoreService)],h)},6975:function(a,o,l){var c=this&&this.__decorate||function(h,m,v,w){var C,E=arguments.length,S=E<3?m:w===null?w=Object.getOwnPropertyDescriptor(m,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(h,m,v,w);else for(var x=h.length-1;x>=0;x--)(C=h[x])&&(S=(E<3?C(S):E>3?C(m,v,S):C(m,v))||S);return E>3&&S&&Object.defineProperty(m,v,S),S},u=this&&this.__param||function(h,m){return function(v,w){m(v,w,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const d=l(1439),g=l(8460),_=l(844),y=l(2585),b=Object.freeze({insertMode:!1}),p=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let f=o.CoreService=class extends _.Disposable{constructor(h,m,v){super(),this._bufferService=h,this._logService=m,this._optionsService=v,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,d.clone)(b),this.decPrivateModes=(0,d.clone)(p)}reset(){this.modes=(0,d.clone)(b),this.decPrivateModes=(0,d.clone)(p)}triggerDataEvent(h,m=!1){if(this._optionsService.rawOptions.disableStdin)return;const v=this._bufferService.buffer;m&&this._optionsService.rawOptions.scrollOnUserInput&&v.ybase!==v.ydisp&&this._onRequestScrollToBottom.fire(),m&&this._onUserInput.fire(),this._logService.debug(`sending data "${h}"`,()=>h.split("").map(w=>w.charCodeAt(0))),this._onData.fire(h)}triggerBinaryEvent(h){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${h}"`,()=>h.split("").map(m=>m.charCodeAt(0))),this._onBinary.fire(h))}};o.CoreService=f=c([u(0,y.IBufferService),u(1,y.ILogService),u(2,y.IOptionsService)],f)},9074:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const c=l(8055),u=l(8460),d=l(844),g=l(6106);let _=0,y=0;class b extends d.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList(h=>h==null?void 0:h.marker.line),this._onDecorationRegistered=this.register(new u.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new u.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,d.toDisposable)(()=>this.reset()))}registerDecoration(h){if(h.marker.isDisposed)return;const m=new p(h);if(m){const v=m.marker.onDispose(()=>m.dispose());m.onDispose(()=>{m&&(this._decorations.delete(m)&&this._onDecorationRemoved.fire(m),v.dispose())}),this._decorations.insert(m),this._onDecorationRegistered.fire(m)}return m}reset(){for(const h of this._decorations.values())h.dispose();this._decorations.clear()}*getDecorationsAtCell(h,m,v){var w,C,E;let S=0,x=0;for(const L of this._decorations.getKeyIterator(m))S=(w=L.options.x)!==null&&w!==void 0?w:0,x=S+((C=L.options.width)!==null&&C!==void 0?C:1),h>=S&&h<x&&(!v||((E=L.options.layer)!==null&&E!==void 0?E:"bottom")===v)&&(yield L)}forEachDecorationAtCell(h,m,v,w){this._decorations.forEachByKey(m,C=>{var E,S,x;_=(E=C.options.x)!==null&&E!==void 0?E:0,y=_+((S=C.options.width)!==null&&S!==void 0?S:1),h>=_&&h<y&&(!v||((x=C.options.layer)!==null&&x!==void 0?x:"bottom")===v)&&w(C)})}}o.DecorationService=b;class p extends d.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=c.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=c.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(h){super(),this.options=h,this.onRenderEmitter=this.register(new u.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=h.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const c=l(2585),u=l(8343);class d{constructor(..._){this._entries=new Map;for(const[y,b]of _)this.set(y,b)}set(_,y){const b=this._entries.get(_);return this._entries.set(_,y),b}forEach(_){for(const[y,b]of this._entries.entries())_(y,b)}has(_){return this._entries.has(_)}get(_){return this._entries.get(_)}}o.ServiceCollection=d,o.InstantiationService=class{constructor(){this._services=new d,this._services.set(c.IInstantiationService,this)}setService(g,_){this._services.set(g,_)}getService(g){return this._services.get(g)}createInstance(g,..._){const y=(0,u.getServiceDependencies)(g).sort((f,h)=>f.index-h.index),b=[];for(const f of y){const h=this._services.get(f.id);if(!h)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${f.id}.`);b.push(h)}const p=y.length>0?y[0].index:_.length;if(_.length!==p)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${p+1} conflicts with ${_.length} static arguments`);return new g(..._,...b)}}},7866:function(a,o,l){var c=this&&this.__decorate||function(p,f,h,m){var v,w=arguments.length,C=w<3?f:m===null?m=Object.getOwnPropertyDescriptor(f,h):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(p,f,h,m);else for(var E=p.length-1;E>=0;E--)(v=p[E])&&(C=(w<3?v(C):w>3?v(f,h,C):v(f,h))||C);return w>3&&C&&Object.defineProperty(f,h,C),C},u=this&&this.__param||function(p,f){return function(h,m){f(h,m,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const d=l(844),g=l(2585),_={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let y,b=o.LogService=class extends d.Disposable{get logLevel(){return this._logLevel}constructor(p){super(),this._optionsService=p,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),y=this}_updateLogLevel(){this._logLevel=_[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(p){for(let f=0;f<p.length;f++)typeof p[f]=="function"&&(p[f]=p[f]())}_log(p,f,h){this._evalLazyOptionalParams(h),p.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+f,...h)}trace(p,...f){var h,m;this._logLevel<=g.LogLevelEnum.TRACE&&this._log((m=(h=this._optionsService.options.logger)===null||h===void 0?void 0:h.trace.bind(this._optionsService.options.logger))!==null&&m!==void 0?m:console.log,p,f)}debug(p,...f){var h,m;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log((m=(h=this._optionsService.options.logger)===null||h===void 0?void 0:h.debug.bind(this._optionsService.options.logger))!==null&&m!==void 0?m:console.log,p,f)}info(p,...f){var h,m;this._logLevel<=g.LogLevelEnum.INFO&&this._log((m=(h=this._optionsService.options.logger)===null||h===void 0?void 0:h.info.bind(this._optionsService.options.logger))!==null&&m!==void 0?m:console.info,p,f)}warn(p,...f){var h,m;this._logLevel<=g.LogLevelEnum.WARN&&this._log((m=(h=this._optionsService.options.logger)===null||h===void 0?void 0:h.warn.bind(this._optionsService.options.logger))!==null&&m!==void 0?m:console.warn,p,f)}error(p,...f){var h,m;this._logLevel<=g.LogLevelEnum.ERROR&&this._log((m=(h=this._optionsService.options.logger)===null||h===void 0?void 0:h.error.bind(this._optionsService.options.logger))!==null&&m!==void 0?m:console.error,p,f)}};o.LogService=b=c([u(0,g.IOptionsService)],b),o.setTraceLogger=function(p){y=p},o.traceCall=function(p,f,h){if(typeof h.value!="function")throw new Error("not supported");const m=h.value;h.value=function(...v){if(y.logLevel!==g.LogLevelEnum.TRACE)return m.apply(this,v);y.trace(`GlyphRenderer#${m.name}(${v.map(C=>JSON.stringify(C)).join(", ")})`);const w=m.apply(this,v);return y.trace(`GlyphRenderer#${m.name} return`,w),w}}},7302:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const c=l(8460),u=l(844),d=l(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:d.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const g=["normal","bold","100","200","300","400","500","600","700","800","900"];class _ extends u.Disposable{constructor(b){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;const p=Object.assign({},o.DEFAULT_OPTIONS);for(const f in b)if(f in p)try{const h=b[f];p[f]=this._sanitizeAndValidateOption(f,h)}catch(h){console.error(h)}this.rawOptions=p,this.options=Object.assign({},p),this._setupOptions()}onSpecificOptionChange(b,p){return this.onOptionChange(f=>{f===b&&p(this.rawOptions[b])})}onMultipleOptionChange(b,p){return this.onOptionChange(f=>{b.indexOf(f)!==-1&&p()})}_setupOptions(){const b=f=>{if(!(f in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${f}"`);return this.rawOptions[f]},p=(f,h)=>{if(!(f in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${f}"`);h=this._sanitizeAndValidateOption(f,h),this.rawOptions[f]!==h&&(this.rawOptions[f]=h,this._onOptionChange.fire(f))};for(const f in this.rawOptions){const h={get:b.bind(this,f),set:p.bind(this,f)};Object.defineProperty(this.options,f,h)}}_sanitizeAndValidateOption(b,p){switch(b){case"cursorStyle":if(p||(p=o.DEFAULT_OPTIONS[b]),!function(f){return f==="block"||f==="underline"||f==="bar"}(p))throw new Error(`"${p}" is not a valid value for ${b}`);break;case"wordSeparator":p||(p=o.DEFAULT_OPTIONS[b]);break;case"fontWeight":case"fontWeightBold":if(typeof p=="number"&&1<=p&&p<=1e3)break;p=g.includes(p)?p:o.DEFAULT_OPTIONS[b];break;case"cursorWidth":p=Math.floor(p);case"lineHeight":case"tabStopWidth":if(p<1)throw new Error(`${b} cannot be less than 1, value: ${p}`);break;case"minimumContrastRatio":p=Math.max(1,Math.min(21,Math.round(10*p)/10));break;case"scrollback":if((p=Math.min(p,4294967295))<0)throw new Error(`${b} cannot be less than 0, value: ${p}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(p<=0)throw new Error(`${b} cannot be less than or equal to 0, value: ${p}`);break;case"rows":case"cols":if(!p&&p!==0)throw new Error(`${b} must be numeric, value: ${p}`);break;case"windowsPty":p=p??{}}return p}}o.OptionsService=_},2660:function(a,o,l){var c=this&&this.__decorate||function(_,y,b,p){var f,h=arguments.length,m=h<3?y:p===null?p=Object.getOwnPropertyDescriptor(y,b):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(_,y,b,p);else for(var v=_.length-1;v>=0;v--)(f=_[v])&&(m=(h<3?f(m):h>3?f(y,b,m):f(y,b))||m);return h>3&&m&&Object.defineProperty(y,b,m),m},u=this&&this.__param||function(_,y){return function(b,p){y(b,p,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const d=l(2585);let g=o.OscLinkService=class{constructor(_){this._bufferService=_,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(_){const y=this._bufferService.buffer;if(_.id===void 0){const v=y.addMarker(y.ybase+y.y),w={data:_,id:this._nextId++,lines:[v]};return v.onDispose(()=>this._removeMarkerFromLink(w,v)),this._dataByLinkId.set(w.id,w),w.id}const b=_,p=this._getEntryIdKey(b),f=this._entriesWithId.get(p);if(f)return this.addLineToLink(f.id,y.ybase+y.y),f.id;const h=y.addMarker(y.ybase+y.y),m={id:this._nextId++,key:this._getEntryIdKey(b),data:b,lines:[h]};return h.onDispose(()=>this._removeMarkerFromLink(m,h)),this._entriesWithId.set(m.key,m),this._dataByLinkId.set(m.id,m),m.id}addLineToLink(_,y){const b=this._dataByLinkId.get(_);if(b&&b.lines.every(p=>p.line!==y)){const p=this._bufferService.buffer.addMarker(y);b.lines.push(p),p.onDispose(()=>this._removeMarkerFromLink(b,p))}}getLinkData(_){var y;return(y=this._dataByLinkId.get(_))===null||y===void 0?void 0:y.data}_getEntryIdKey(_){return`${_.id};;${_.uri}`}_removeMarkerFromLink(_,y){const b=_.lines.indexOf(y);b!==-1&&(_.lines.splice(b,1),_.lines.length===0&&(_.data.id!==void 0&&this._entriesWithId.delete(_.key),this._dataByLinkId.delete(_.id)))}};o.OscLinkService=g=c([u(0,d.IBufferService)],g)},8343:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const l="di$target",c="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(u){return u[c]||[]},o.createDecorator=function(u){if(o.serviceRegistry.has(u))return o.serviceRegistry.get(u);const d=function(g,_,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,p,f){p[l]===p?p[c].push({id:b,index:f}):(p[c]=[{id:b,index:f}],p[l]=p)})(d,g,y)};return d.toString=()=>u,o.serviceRegistry.set(u,d),d}},2585:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const c=l(8343);var u;o.IBufferService=(0,c.createDecorator)("BufferService"),o.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),o.ICoreService=(0,c.createDecorator)("CoreService"),o.ICharsetService=(0,c.createDecorator)("CharsetService"),o.IInstantiationService=(0,c.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(u||(o.LogLevelEnum=u={})),o.ILogService=(0,c.createDecorator)("LogService"),o.IOptionsService=(0,c.createDecorator)("OptionsService"),o.IOscLinkService=(0,c.createDecorator)("OscLinkService"),o.IUnicodeService=(0,c.createDecorator)("UnicodeService"),o.IDecorationService=(0,c.createDecorator)("DecorationService")},1480:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const c=l(8460),u=l(225);o.UnicodeService=class{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 g=0;const _=d.length;for(let y=0;y<_;++y){let b=d.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=_)return g+this.wcwidth(b);const p=d.charCodeAt(y);56320<=p&&p<=57343?b=1024*(b-55296)+p-56320+65536:g+=this.wcwidth(p)}g+=this.wcwidth(b)}return g}}}},n={};function i(a){var o=n[a];if(o!==void 0)return o.exports;var l=n[a]={exports:{}};return t[a].call(l.exports,l,l.exports,i),l.exports}var s={};return(()=>{var a=s;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const o=i(9042),l=i(3236),c=i(844),u=i(5741),d=i(8285),g=i(7975),_=i(7090),y=["cols","rows"];class b extends c.Disposable{constructor(f){super(),this._core=this.register(new l.Terminal(f)),this._addonManager=this.register(new u.AddonManager),this._publicOptions=Object.assign({},this._core.options);const h=v=>this._core.options[v],m=(v,w)=>{this._checkReadonlyOptions(v),this._core.options[v]=w};for(const v in this._core.options){const w={get:h.bind(this,v),set:m.bind(this,v)};Object.defineProperty(this._publicOptions,v,w)}}_checkReadonlyOptions(f){if(y.includes(f))throw new Error(`Option "${f}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new g.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new _.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new d.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const f=this._core.coreService.decPrivateModes;let h="none";switch(this._core.coreMouseService.activeProtocol){case"X10":h="x10";break;case"VT200":h="vt200";break;case"DRAG":h="drag";break;case"ANY":h="any"}return{applicationCursorKeysMode:f.applicationCursorKeys,applicationKeypadMode:f.applicationKeypad,bracketedPasteMode:f.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:h,originMode:f.origin,reverseWraparoundMode:f.reverseWraparound,sendFocusMode:f.sendFocus,wraparoundMode:f.wraparound}}get options(){return this._publicOptions}set options(f){for(const h in f)this._publicOptions[h]=f[h]}blur(){this._core.blur()}focus(){this._core.focus()}resize(f,h){this._verifyIntegers(f,h),this._core.resize(f,h)}open(f){this._core.open(f)}attachCustomKeyEventHandler(f){this._core.attachCustomKeyEventHandler(f)}registerLinkProvider(f){return this._core.registerLinkProvider(f)}registerCharacterJoiner(f){return this._checkProposedApi(),this._core.registerCharacterJoiner(f)}deregisterCharacterJoiner(f){this._checkProposedApi(),this._core.deregisterCharacterJoiner(f)}registerMarker(f=0){return this._verifyIntegers(f),this._core.registerMarker(f)}registerDecoration(f){var h,m,v;return this._checkProposedApi(),this._verifyPositiveIntegers((h=f.x)!==null&&h!==void 0?h:0,(m=f.width)!==null&&m!==void 0?m:0,(v=f.height)!==null&&v!==void 0?v:0),this._core.registerDecoration(f)}hasSelection(){return this._core.hasSelection()}select(f,h,m){this._verifyIntegers(f,h,m),this._core.select(f,h,m)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(f,h){this._verifyIntegers(f,h),this._core.selectLines(f,h)}dispose(){super.dispose()}scrollLines(f){this._verifyIntegers(f),this._core.scrollLines(f)}scrollPages(f){this._verifyIntegers(f),this._core.scrollPages(f)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(f){this._verifyIntegers(f),this._core.scrollToLine(f)}clear(){this._core.clear()}write(f,h){this._core.write(f,h)}writeln(f,h){this._core.write(f),this._core.write(`\r
|
|
131
|
+
`,h)}paste(f){this._core.paste(f)}refresh(f,h){this._verifyIntegers(f,h),this._core.refresh(f,h)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(f){this._addonManager.loadAddon(this,f)}static get strings(){return o}_verifyIntegers(...f){for(const h of f)if(h===1/0||isNaN(h)||h%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...f){for(const h of f)if(h&&(h===1/0||isNaN(h)||h%1!=0||h<0))throw new Error("This API only accepts positive integers")}}a.Terminal=b})(),s})())})(Fb);var t9=Fb.exports,jb={exports:{}};(function(r,e){(function(t,n){r.exports=n()})(self,()=>(()=>{var t={};return(()=>{var n=t;Object.defineProperty(n,"__esModule",{value:!0}),n.FitAddon=void 0,n.FitAddon=class{activate(i){this._terminal=i}dispose(){}fit(){const i=this.proposeDimensions();if(!i||!this._terminal||isNaN(i.cols)||isNaN(i.rows))return;const s=this._terminal._core;this._terminal.rows===i.rows&&this._terminal.cols===i.cols||(s._renderService.clear(),this._terminal.resize(i.cols,i.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const i=this._terminal._core,s=i._renderService.dimensions;if(s.css.cell.width===0||s.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:i.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),l=parseInt(o.getPropertyValue("height")),c=Math.max(0,parseInt(o.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),d=l-(parseInt(u.getPropertyValue("padding-top"))+parseInt(u.getPropertyValue("padding-bottom"))),g=c-(parseInt(u.getPropertyValue("padding-right"))+parseInt(u.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(g/s.css.cell.width)),rows:Math.max(1,Math.floor(d/s.css.cell.height))}}}})(),t})())})(jb);var r9=jb.exports;/**
|
|
132
|
+
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
133
|
+
* @license MIT
|
|
134
|
+
*
|
|
135
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
136
|
+
* @license MIT
|
|
137
|
+
*
|
|
138
|
+
* Originally forked from (with the author's permission):
|
|
139
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
140
|
+
* http://bellard.org/jslinux/
|
|
141
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
142
|
+
*/var n9=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(r){setTimeout(()=>{throw r.stack?wm.isErrorNoTelemetry(r)?new wm(r.message+`
|
|
143
|
+
|
|
144
|
+
`+r.stack):new Error(r.message+`
|
|
145
|
+
|
|
146
|
+
`+r.stack):r},0)}}addListener(r){return this.listeners.push(r),()=>{this._removeListener(r)}}emit(r){this.listeners.forEach(e=>{e(r)})}_removeListener(r){this.listeners.splice(this.listeners.indexOf(r),1)}setUnexpectedErrorHandler(r){this.unexpectedErrorHandler=r}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(r){this.unexpectedErrorHandler(r),this.emit(r)}onUnexpectedExternalError(r){this.unexpectedErrorHandler(r)}},i9=new n9;function ph(r){s9(r)||i9.onUnexpectedError(r)}var Hf="Canceled";function s9(r){return r instanceof o9?!0:r instanceof Error&&r.name===Hf&&r.message===Hf}var o9=class extends Error{constructor(){super(Hf),this.name=this.message}},wm=class jf extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof jf)return e;let t=new jf;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},a9;(r=>{function e(s){return s<0}r.isLessThan=e;function t(s){return s<=0}r.isLessThanOrEqual=t;function n(s){return s>0}r.isGreaterThan=n;function i(s){return s===0}r.isNeitherLessOrGreaterThan=i,r.greaterThan=1,r.lessThan=-1,r.neitherLessOrGreaterThan=0})(a9||(a9={}));function l9(r,e){let t=this,n=!1,i;return function(){return n||(n=!0,e||(i=r.apply(t,arguments))),i}}var $b;(r=>{function e(v){return v&&typeof v=="object"&&typeof v[Symbol.iterator]=="function"}r.is=e;let t=Object.freeze([]);function n(){return t}r.empty=n;function*i(v){yield v}r.single=i;function s(v){return e(v)?v:i(v)}r.wrap=s;function a(v){return v||t}r.from=a;function*o(v){for(let w=v.length-1;w>=0;w--)yield v[w]}r.reverse=o;function l(v){return!v||v[Symbol.iterator]().next().done===!0}r.isEmpty=l;function c(v){return v[Symbol.iterator]().next().value}r.first=c;function u(v,w){let C=0;for(let E of v)if(w(E,C++))return!0;return!1}r.some=u;function d(v,w){for(let C of v)if(w(C))return C}r.find=d;function*g(v,w){for(let C of v)w(C)&&(yield C)}r.filter=g;function*_(v,w){let C=0;for(let E of v)yield w(E,C++)}r.map=_;function*y(v,w){let C=0;for(let E of v)yield*w(E,C++)}r.flatMap=y;function*b(...v){for(let w of v)yield*w}r.concat=b;function p(v,w,C){let E=C;for(let S of v)E=w(E,S);return E}r.reduce=p;function*f(v,w,C=v.length){for(w<0&&(w+=v.length),C<0?C+=v.length:C>v.length&&(C=v.length);w<C;w++)yield v[w]}r.slice=f;function h(v,w=Number.POSITIVE_INFINITY){let C=[];if(w===0)return[C,v];let E=v[Symbol.iterator]();for(let S=0;S<w;S++){let x=E.next();if(x.done)return[C,r.empty()];C.push(x.value)}return[C,{[Symbol.iterator](){return E}}]}r.consume=h;async function m(v){let w=[];for await(let C of v)w.push(C);return Promise.resolve(w)}r.asyncToArray=m})($b||($b={}));function da(r){if($b.is(r)){let e=[];for(let t of r)if(t)try{t.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(r)?[]:r}else if(r)return r.dispose(),r}function Vb(...r){return So(()=>da(r))}function So(r){return{dispose:l9(()=>{r()})}}var zb=class Ub{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{da(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Ub.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),void 0)}};zb.DISABLE_DISPOSED_WARNING=!1;var Fg=zb,ki=class{constructor(){this._store=new Fg,this._store}dispose(){this._store.dispose()}_register(r){if(r===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(r)}};ki.None=Object.freeze({dispose(){}});var yd=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(r){var e;this._isDisposed||r===this._value||((e=this._value)==null||e.dispose(),this._value=r)}clear(){this.value=void 0}dispose(){var r;this._isDisposed=!0,(r=this._value)==null||r.dispose(),this._value=void 0}clearAndLeak(){let r=this._value;return this._value=void 0,r}},c9=globalThis.performance&&typeof globalThis.performance.now=="function",d9=class Wb{static create(e){return new Wb(e)}constructor(e){this._now=c9&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},Hg;(r=>{r.None=()=>ki.None;function e(A,k){return d(A,()=>{},0,void 0,!0,void 0,k)}r.defer=e;function t(A){return(k,B=null,N)=>{let F=!1,H;return H=A(T=>{if(!F)return H?H.dispose():F=!0,k.call(B,T)},null,N),F&&H.dispose(),H}}r.once=t;function n(A,k,B){return c((N,F=null,H)=>A(T=>N.call(F,k(T)),null,H),B)}r.map=n;function i(A,k,B){return c((N,F=null,H)=>A(T=>{k(T),N.call(F,T)},null,H),B)}r.forEach=i;function s(A,k,B){return c((N,F=null,H)=>A(T=>k(T)&&N.call(F,T),null,H),B)}r.filter=s;function a(A){return A}r.signal=a;function o(...A){return(k,B=null,N)=>{let F=Vb(...A.map(H=>H(T=>k.call(B,T))));return u(F,N)}}r.any=o;function l(A,k,B,N){let F=B;return n(A,H=>(F=k(F,H),F),N)}r.reduce=l;function c(A,k){let B,N={onWillAddFirstListener(){B=A(F.fire,F)},onDidRemoveLastListener(){B==null||B.dispose()}},F=new pn(N);return k==null||k.add(F),F.event}function u(A,k){return k instanceof Array?k.push(A):k&&k.add(A),A}function d(A,k,B=100,N=!1,F=!1,H,T){let R,O,I,$=0,V,U={leakWarningThreshold:H,onWillAddFirstListener(){R=A(le=>{$++,O=k(O,le),N&&!I&&(G.fire(O),O=void 0),V=()=>{let D=O;O=void 0,I=void 0,(!N||$>1)&&G.fire(D),$=0},typeof B=="number"?(clearTimeout(I),I=setTimeout(V,B)):I===void 0&&(I=0,queueMicrotask(V))})},onWillRemoveListener(){F&&$>0&&(V==null||V())},onDidRemoveLastListener(){V=void 0,R.dispose()}},G=new pn(U);return T==null||T.add(G),G.event}r.debounce=d;function g(A,k=0,B){return r.debounce(A,(N,F)=>N?(N.push(F),N):[F],k,void 0,!0,void 0,B)}r.accumulate=g;function _(A,k=(N,F)=>N===F,B){let N=!0,F;return s(A,H=>{let T=N||!k(H,F);return N=!1,F=H,T},B)}r.latch=_;function y(A,k,B){return[r.filter(A,k,B),r.filter(A,N=>!k(N),B)]}r.split=y;function b(A,k=!1,B=[],N){let F=B.slice(),H=A(O=>{F?F.push(O):R.fire(O)});N&&N.add(H);let T=()=>{F==null||F.forEach(O=>R.fire(O)),F=null},R=new pn({onWillAddFirstListener(){H||(H=A(O=>R.fire(O)),N&&N.add(H))},onDidAddFirstListener(){F&&(k?setTimeout(T):T())},onDidRemoveLastListener(){H&&H.dispose(),H=null}});return N&&N.add(R),R.event}r.buffer=b;function p(A,k){return(B,N,F)=>{let H=k(new h);return A(function(T){let R=H.evaluate(T);R!==f&&B.call(N,R)},void 0,F)}}r.chain=p;let f=Symbol("HaltChainable");class h{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push(B=>(k(B),B)),this}filter(k){return this.steps.push(B=>k(B)?B:f),this}reduce(k,B){let N=B;return this.steps.push(F=>(N=k(N,F),N)),this}latch(k=(B,N)=>B===N){let B=!0,N;return this.steps.push(F=>{let H=B||!k(F,N);return B=!1,N=F,H?F:f}),this}evaluate(k){for(let B of this.steps)if(k=B(k),k===f)break;return k}}function m(A,k,B=N=>N){let N=(...R)=>T.fire(B(...R)),F=()=>A.on(k,N),H=()=>A.removeListener(k,N),T=new pn({onWillAddFirstListener:F,onDidRemoveLastListener:H});return T.event}r.fromNodeEventEmitter=m;function v(A,k,B=N=>N){let N=(...R)=>T.fire(B(...R)),F=()=>A.addEventListener(k,N),H=()=>A.removeEventListener(k,N),T=new pn({onWillAddFirstListener:F,onDidRemoveLastListener:H});return T.event}r.fromDOMEventEmitter=v;function w(A){return new Promise(k=>t(A)(k))}r.toPromise=w;function C(A){let k=new pn;return A.then(B=>{k.fire(B)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}r.fromPromise=C;function E(A,k){return A(B=>k.fire(B))}r.forward=E;function S(A,k,B){return k(B),A(N=>k(N))}r.runAndSubscribe=S;class x{constructor(k,B){this._observable=k,this._counter=0,this._hasChanged=!1;let N={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};this.emitter=new pn(N),B&&B.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,B){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function L(A,k){return new x(A,k).emitter.event}r.fromObservable=L;function P(A){return(k,B,N)=>{let F=0,H=!1,T={beginUpdate(){F++},endUpdate(){F--,F===0&&(A.reportChanges(),H&&(H=!1,k.call(B)))},handlePossibleChange(){},handleChange(){H=!0}};A.addObserver(T),A.reportChanges();let R={dispose(){A.removeObserver(T)}};return N instanceof Fg?N.add(R):Array.isArray(N)&&N.push(R),R}}r.fromObservableLight=P})(Hg||(Hg={}));var $f=class Vf{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${Vf._idPool++}`,Vf.all.add(this)}start(e){this._stopWatch=new d9,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};$f.all=new Set,$f._idPool=0;var u9=$f,h9=-1,Gb=class Kb{constructor(e,t,n=(Kb._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){var e;(e=this._stacks)==null||e.clear()}check(e,t){let n=this.threshold;if(n<=0||t<n)return;this._stacks||(this._stacks=new Map);let i=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[s,a]=this.getMostFrequentStack(),o=`[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${a}):`;console.warn(o),console.warn(s);let l=new g9(o,s);this._errorHandler(l)}return()=>{let s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,i]of this._stacks)(!e||t<i)&&(e=[n,i],t=i);return e}};Gb._idPool=1;var f9=Gb,p9=class qb{constructor(e){this.value=e}static create(){let e=new Error;return new qb(e.stack??"")}print(){console.warn(this.value.split(`
|
|
147
|
+
`).slice(2).join(`
|
|
148
|
+
`))}},g9=class extends Error{constructor(r,e){super(r),this.name="ListenerLeakError",this.stack=e}},m9=class extends Error{constructor(r,e){super(r),this.name="ListenerRefusalError",this.stack=e}},v9=0,gh=class{constructor(r){this.value=r,this.id=v9++}},_9=2,y9,pn=class{constructor(r){var e,t,n,i;this._size=0,this._options=r,this._leakageMon=(e=this._options)!=null&&e.leakWarningThreshold?new f9((r==null?void 0:r.onListenerError)??ph,((t=this._options)==null?void 0:t.leakWarningThreshold)??h9):void 0,this._perfMon=(n=this._options)!=null&&n._profName?new u9(this._options._profName):void 0,this._deliveryQueue=(i=this._options)==null?void 0:i.deliveryQueue}dispose(){var r,e,t,n;this._disposed||(this._disposed=!0,((r=this._deliveryQueue)==null?void 0:r.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(t=(e=this._options)==null?void 0:e.onDidRemoveLastListener)==null||t.call(e),(n=this._leakageMon)==null||n.dispose())}get event(){return this._event??(this._event=(r,e,t)=>{var a,o,l,c,u;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let d=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(d);let g=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],_=new m9(`${d}. HINT: Stack shows most frequent listener (${g[1]}-times)`,g[0]);return(((a=this._options)==null?void 0:a.onListenerError)||ph)(_),ki.None}if(this._disposed)return ki.None;e&&(r=r.bind(e));let n=new gh(r),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=p9.create(),i=this._leakageMon.check(n.stack,this._size+1)),this._listeners?this._listeners instanceof gh?(this._deliveryQueue??(this._deliveryQueue=new b9),this._listeners=[this._listeners,n]):this._listeners.push(n):((l=(o=this._options)==null?void 0:o.onWillAddFirstListener)==null||l.call(o,this),this._listeners=n,(u=(c=this._options)==null?void 0:c.onDidAddFirstListener)==null||u.call(c,this)),this._size++;let s=So(()=>{i==null||i(),this._removeListener(n)});return t instanceof Fg?t.add(s):Array.isArray(t)&&t.push(s),s}),this._event}_removeListener(r){var i,s,a,o;if((s=(i=this._options)==null?void 0:i.onWillRemoveListener)==null||s.call(i,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(o=(a=this._options)==null?void 0:a.onDidRemoveLastListener)==null||o.call(a,this),this._size=0;return}let e=this._listeners,t=e.indexOf(r);if(t===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,e[t]=void 0;let n=this._deliveryQueue.current===this;if(this._size*_9<=e.length){let l=0;for(let c=0;c<e.length;c++)e[c]?e[l++]=e[c]:n&&(this._deliveryQueue.end--,l<this._deliveryQueue.i&&this._deliveryQueue.i--);e.length=l}}_deliver(r,e){var n;if(!r)return;let t=((n=this._options)==null?void 0:n.onListenerError)||ph;if(!t){r.value(e);return}try{r.value(e)}catch(i){t(i)}}_deliverQueue(r){let e=r.current._listeners;for(;r.i<r.end;)this._deliver(e[r.i++],r.value);r.reset()}fire(r){var e,t,n,i;if((e=this._deliveryQueue)!=null&&e.current&&(this._deliverQueue(this._deliveryQueue),(t=this._perfMon)==null||t.stop()),(n=this._perfMon)==null||n.start(this._size),this._listeners)if(this._listeners instanceof gh)this._deliver(this._listeners,r);else{let s=this._deliveryQueue;s.enqueue(this,r,this._listeners.length),this._deliverQueue(s)}(i=this._perfMon)==null||i.stop()}hasListeners(){return this._size>0}},b9=class{constructor(){this.i=-1,this.end=0}enqueue(r,e,t){this.i=0,this.end=t,this.current=r,this.value=e}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Xb=Object.freeze(function(r,e){let t=setTimeout(r.bind(e),0);return{dispose(){clearTimeout(t)}}}),w9;(r=>{function e(t){return t===r.None||t===r.Cancelled||t instanceof S9?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}r.isCancellationToken=e,r.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Hg.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Xb})})(w9||(w9={}));var S9=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Xb:(this._emitter||(this._emitter=new pn),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Hs="en",mh=!1,Zl,Cc=Hs,Sm=Hs,C9,qr,ts=globalThis,At,Am;typeof ts.vscode<"u"&&typeof ts.vscode.process<"u"?At=ts.vscode.process:typeof process<"u"&&typeof((Am=process==null?void 0:process.versions)==null?void 0:Am.node)=="string"&&(At=process);var Rm,E9=typeof((Rm=At==null?void 0:At.versions)==null?void 0:Rm.electron)=="string",x9=E9&&(At==null?void 0:At.type)==="renderer",Om;if(typeof At=="object"){At.platform,At.platform,mh=At.platform==="linux",mh&&At.env.SNAP&&At.env.SNAP_REVISION,At.env.CI||At.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Zl=Hs,Cc=Hs;let r=At.env.VSCODE_NLS_CONFIG;if(r)try{let e=JSON.parse(r);Zl=e.userLocale,Sm=e.osLocale,Cc=e.resolvedLanguage||Hs,C9=(Om=e.languagePack)==null?void 0:Om.translationsConfigFile}catch{}}else typeof navigator=="object"&&!x9?(qr=navigator.userAgent,qr.indexOf("Windows")>=0,qr.indexOf("Macintosh")>=0,(qr.indexOf("Macintosh")>=0||qr.indexOf("iPad")>=0||qr.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,mh=qr.indexOf("Linux")>=0,(qr==null?void 0:qr.indexOf("Mobi"))>=0,Cc=globalThis._VSCODE_NLS_LANGUAGE||Hs,Zl=navigator.language.toLowerCase(),Sm=Zl):console.error("Unable to resolve platform.");var Cn=qr,Jn=Cc,T9;(r=>{function e(){return Jn}r.value=e;function t(){return Jn.length===2?Jn==="en":Jn.length>=3?Jn[0]==="e"&&Jn[1]==="n"&&Jn[2]==="-":!1}r.isDefaultVariant=t;function n(){return Jn==="en"}r.isDefault=n})(T9||(T9={}));var k9=typeof ts.postMessage=="function"&&!ts.importScripts;(()=>{if(k9){let r=[];ts.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=r.length;n<i;n++){let s=r[n];if(s.id===t.data.vscodeScheduleAsyncWork){r.splice(n,1),s.callback();return}}});let e=0;return t=>{let n=++e;r.push({id:n,callback:t}),ts.postMessage({vscodeScheduleAsyncWork:n},"*")}}return r=>setTimeout(r)})();var L9=!!(Cn&&Cn.indexOf("Chrome")>=0);Cn&&Cn.indexOf("Firefox")>=0;!L9&&Cn&&Cn.indexOf("Safari")>=0;Cn&&Cn.indexOf("Edg/")>=0;Cn&&Cn.indexOf("Android")>=0;function Zb(r,e=0,t){let n=setTimeout(()=>{r()},e);return So(()=>{clearTimeout(n)})}var A9;(r=>{async function e(n){let i,s=await Promise.all(n.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return s}r.settled=e;function t(n){return new Promise(async(i,s)=>{try{await n(i,s)}catch(a){s(a)}})}r.withAsyncBody=t})(A9||(A9={}));var Cm=class Dr{static fromArray(e){return new Dr(t=>{t.emitMany(e)})}static fromPromise(e){return new Dr(async t=>{t.emitMany(await e)})}static fromPromises(e){return new Dr(async t=>{await Promise.all(e.map(async n=>t.emitOne(await n)))})}static merge(e){return new Dr(async t=>{await Promise.all(e.map(async n=>{for await(let i of n)t.emitOne(i)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new pn,queueMicrotask(async()=>{let n={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(e(n)),this.resolve()}catch(i){this.reject(i)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await Hg.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var t;return(t=this._onReturn)==null||t.call(this),{done:!0,value:void 0}}}}static map(e,t){return new Dr(async n=>{for await(let i of e)n.emitOne(t(i))})}map(e){return Dr.map(this,e)}static filter(e,t){return new Dr(async n=>{for await(let i of e)t(i)&&n.emitOne(i)})}filter(e){return Dr.filter(this,e)}static coalesce(e){return Dr.filter(e,t=>!!t)}coalesce(){return Dr.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return Dr.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};Cm.EMPTY=Cm.fromArray([]);var R9=class extends ki{constructor(r){super(),this._terminal=r,this._linesCacheTimeout=this._register(new yd),this._linesCacheDisposables=this._register(new yd),this._register(So(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=new Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=Vb(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=Zb(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(r){var e;return(e=this._linesCache)==null?void 0:e[r]}setLineInCache(r,e){this._linesCache&&(this._linesCache[r]=e)}translateBufferLineToStringWithWrap(r,e){var s;let t=[],n=[0],i=this._terminal.buffer.active.getLine(r);for(;i;){let a=this._terminal.buffer.active.getLine(r+1),o=a?a.isWrapped:!1,l=i.translateToString(!o&&e);if(o&&a){let c=i.getCell(i.length-1);c&&c.getCode()===0&&c.getWidth()===1&&((s=a.getCell(0))==null?void 0:s.getWidth())===2&&(l=l.slice(0,-1))}if(t.push(l),o)n.push(n[n.length-1]+l.length);else break;r++,i=a}return[t.join(""),n]}},O9=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(r){this._cachedSearchTerm=r}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(r){this._lastSearchOptions=r}isValidSearchTerm(r){return!!(r&&r.length>0)}didOptionsChange(r){return this._lastSearchOptions?r?this._lastSearchOptions.caseSensitive!==r.caseSensitive||this._lastSearchOptions.regex!==r.regex||this._lastSearchOptions.wholeWord!==r.wholeWord:!1:!0}shouldUpdateHighlighting(r,e){return e!=null&&e.decorations?this._cachedSearchTerm===void 0||r!==this._cachedSearchTerm||this.didOptionsChange(e):!1}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},D9=class{constructor(r,e){this._terminal=r,this._lineCache=e}find(r,e,t,n){if(!r||r.length===0){this._terminal.clearSelection();return}if(t>this._terminal.cols)throw new Error(`Invalid col: ${t} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let i={startRow:e,startCol:t},s=this._findInLine(r,i,n);if(!s)for(let a=e+1;a<this._terminal.buffer.active.baseY+this._terminal.rows&&(i.startRow=a,i.startCol=0,s=this._findInLine(r,i,n),!s);a++);return s}findNextWithSelection(r,e,t){if(!r||r.length===0){this._terminal.clearSelection();return}let n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let i=0,s=0;n&&(t===r?(i=n.end.x,s=n.end.y):(i=n.start.x,s=n.start.y)),this._lineCache.initLinesCache();let a={startRow:s,startCol:i},o=this._findInLine(r,a,e);if(!o)for(let l=s+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(a.startRow=l,a.startCol=0,o=this._findInLine(r,a,e),!o);l++);if(!o&&s!==0)for(let l=0;l<s&&(a.startRow=l,a.startCol=0,o=this._findInLine(r,a,e),!o);l++);return!o&&n&&(a.startRow=n.start.y,a.startCol=0,o=this._findInLine(r,a,e)),o}findPreviousWithSelection(r,e,t){if(!r||r.length===0){this._terminal.clearSelection();return}let n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let i=this._terminal.buffer.active.baseY+this._terminal.rows-1,s=this._terminal.cols,a=!0;this._lineCache.initLinesCache();let o={startRow:i,startCol:s},l;if(n&&(o.startRow=i=n.start.y,o.startCol=s=n.start.x,t!==r&&(l=this._findInLine(r,o,e,!1),l||(o.startRow=i=n.end.y,o.startCol=s=n.end.x))),l||(l=this._findInLine(r,o,e,a)),!l){o.startCol=Math.max(o.startCol,this._terminal.cols);for(let c=i-1;c>=0&&(o.startRow=c,l=this._findInLine(r,o,e,a),!l);c--);}if(!l&&i!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let c=this._terminal.buffer.active.baseY+this._terminal.rows-1;c>=i&&(o.startRow=c,l=this._findInLine(r,o,e,a),!l);c--);return l}_isWholeWord(r,e,t){return(r===0||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(e[r-1]))&&(r+t.length===e.length||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(e[r+t.length]))}_findInLine(r,e,t={},n=!1){var _;let i=e.startRow,s=e.startCol;if((_=this._terminal.buffer.active.getLine(i))!=null&&_.isWrapped){if(n){e.startCol+=this._terminal.cols;return}return e.startRow--,e.startCol+=this._terminal.cols,this._findInLine(r,e,t)}let a=this._lineCache.getLineFromCache(i);a||(a=this._lineCache.translateBufferLineToStringWithWrap(i,!0),this._lineCache.setLineInCache(i,a));let[o,l]=a,c=this._bufferColsToStringOffset(i,s),u=r,d=o;t.regex||(u=t.caseSensitive?r:r.toLowerCase(),d=t.caseSensitive?o:o.toLowerCase());let g=-1;if(t.regex){let y=RegExp(u,t.caseSensitive?"g":"gi"),b;if(n)for(;b=y.exec(d.slice(0,c));)g=y.lastIndex-b[0].length,r=b[0],y.lastIndex-=r.length-1;else b=y.exec(d.slice(c)),b&&b[0].length>0&&(g=c+(y.lastIndex-b[0].length),r=b[0])}else n?c-u.length>=0&&(g=d.lastIndexOf(u,c-u.length)):g=d.indexOf(u,c);if(g>=0){if(t.wholeWord&&!this._isWholeWord(g,d,r))return;let y=0;for(;y<l.length-1&&g>=l[y+1];)y++;let b=y;for(;b<l.length-1&&g+r.length>=l[b+1];)b++;let p=g-l[y],f=g+r.length-l[b],h=this._stringLengthToBufferSize(i+y,p),m=this._stringLengthToBufferSize(i+b,f)-h+this._terminal.cols*(b-y);return{term:r,col:h,row:i+y,size:m}}}_stringLengthToBufferSize(r,e){let t=this._terminal.buffer.active.getLine(r);if(!t)return 0;for(let n=0;n<e;n++){let i=t.getCell(n);if(!i)break;let s=i.getChars();s.length>1&&(e-=s.length-1);let a=t.getCell(n+1);a&&a.getWidth()===0&&e++}return e}_bufferColsToStringOffset(r,e){let t=r,n=0,i=this._terminal.buffer.active.getLine(t);for(;e>0&&i;){for(let s=0;s<e&&s<this._terminal.cols;s++){let a=i.getCell(s);if(!a)break;a.getWidth()&&(n+=a.getCode()===0?1:a.getChars().length)}if(t++,i=this._terminal.buffer.active.getLine(t),i&&!i.isWrapped)break;e-=this._terminal.cols}return n}},N9=class extends ki{constructor(r){super(),this._terminal=r,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(So(()=>this.clearHighlightDecorations()))}createHighlightDecorations(r,e){this.clearHighlightDecorations();for(let t of r){let n=this._createResultDecorations(t,e,!1);if(n)for(let i of n)this._storeDecoration(i,t)}}createActiveDecoration(r,e){let t=this._createResultDecorations(r,e,!0);if(t)return{decorations:t,match:r,dispose(){da(t)}}}clearHighlightDecorations(){da(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(r,e){this._highlightedLines.add(r.marker.line),this._highlightDecorations.push({decoration:r,match:e,dispose(){r.dispose()}})}_applyStyles(r,e,t){r.classList.contains("xterm-find-result-decoration")||(r.classList.add("xterm-find-result-decoration"),e&&(r.style.outline=`1px solid ${e}`)),t&&r.classList.add("xterm-find-active-result-decoration")}_createResultDecorations(r,e,t){let n=[],i=r.col,s=r.size,a=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+r.row;for(;s>0;){let l=Math.min(this._terminal.cols-i,s);n.push([a,i,l]),i=0,s-=l,a++}let o=[];for(let l of n){let c=this._terminal.registerMarker(l[0]),u=this._terminal.registerDecoration({marker:c,x:l[1],width:l[2],backgroundColor:t?e.activeMatchBackground:e.matchBackground,overviewRulerOptions:this._highlightedLines.has(c.line)?void 0:{color:t?e.activeMatchColorOverviewRuler:e.matchOverviewRuler,position:"center"}});if(u){let d=[];d.push(c),d.push(u.onRender(g=>this._applyStyles(g,t?e.activeMatchBorder:e.matchBorder,!1))),d.push(u.onDispose(()=>da(d))),o.push(u)}}return o.length===0?void 0:o}},I9=class extends ki{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new pn)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(r){this._selectedDecoration=r}updateResults(r,e){this._searchResults=r.slice(0,e)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&(this._selectedDecoration.dispose(),this._selectedDecoration=void 0)}findResultIndex(r){for(let e=0;e<this._searchResults.length;e++){let t=this._searchResults[e];if(t.row===r.row&&t.col===r.col&&t.size===r.size)return e}return-1}fireResultsChanged(r){if(!r)return;let e=-1;this._selectedDecoration&&(e=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:e,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},B9=class extends ki{constructor(r){super(),this._highlightTimeout=this._register(new yd),this._lineCache=this._register(new yd),this._state=new O9,this._resultTracker=this._register(new I9),this._highlightLimit=(r==null?void 0:r.highlightLimit)??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(r){this._terminal=r,this._lineCache.value=new R9(r),this._engine=new D9(r,this._lineCache.value),this._decorationManager=new N9(r),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(So(()=>this.clearDecorations()))}_updateMatches(){var r;this._highlightTimeout.clear(),this._state.cachedSearchTerm&&((r=this._state.lastSearchOptions)!=null&&r.decorations)&&(this._highlightTimeout.value=Zb(()=>{let e=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(e,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(r){var e;this._resultTracker.clearSelectedDecoration(),(e=this._decorationManager)==null||e.clearHighlightDecorations(),this._resultTracker.clearResults(),r||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(r,e,t){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=e,this._state.shouldUpdateHighlighting(r,e)&&this._highlightAllMatches(r,e);let n=this._findNextAndSelect(r,e,t);return this._fireResults(e),this._state.cachedSearchTerm=r,n}_highlightAllMatches(r,e){if(!this._terminal||!this._engine||!this._decorationManager)throw new Error("Cannot use addon until it has been loaded");if(!this._state.isValidSearchTerm(r)){this.clearDecorations();return}this.clearDecorations(!0);let t=[],n,i=this._engine.find(r,0,0,e);for(;i&&((n==null?void 0:n.row)!==i.row||(n==null?void 0:n.col)!==i.col)&&!(t.length>=this._highlightLimit);)n=i,t.push(n),i=this._engine.find(r,n.col+n.term.length>=this._terminal.cols?n.row+1:n.row,n.col+n.term.length>=this._terminal.cols?0:n.col+1,e);this._resultTracker.updateResults(t,this._highlightLimit),e.decorations&&this._decorationManager.createHighlightDecorations(t,e.decorations)}_findNextAndSelect(r,e,t){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(r))return this._terminal.clearSelection(),this.clearDecorations(),!1;let n=this._engine.findNextWithSelection(r,e,this._state.cachedSearchTerm);return this._selectResult(n,e==null?void 0:e.decorations,t==null?void 0:t.noScroll)}findPrevious(r,e,t){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=e,this._state.shouldUpdateHighlighting(r,e)&&this._highlightAllMatches(r,e);let n=this._findPreviousAndSelect(r,e,t);return this._fireResults(e),this._state.cachedSearchTerm=r,n}_fireResults(r){this._resultTracker.fireResultsChanged(!!(r!=null&&r.decorations))}_findPreviousAndSelect(r,e,t){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(r))return this._terminal.clearSelection(),this.clearDecorations(),!1;let n=this._engine.findPreviousWithSelection(r,e,this._state.cachedSearchTerm);return this._selectResult(n,e==null?void 0:e.decorations,t==null?void 0:t.noScroll)}_selectResult(r,e,t){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!r)return this._terminal.clearSelection(),!1;if(this._terminal.select(r.col,r.row,r.size),e){let n=this._decorationManager.createActiveDecoration(r,e);n&&(this._resultTracker.selectedDecoration=n)}if(!t&&(r.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||r.row<this._terminal.buffer.active.viewportY)){let n=r.row-this._terminal.buffer.active.viewportY;n-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(n)}return!0}};const M9="_wrapper_15opd_1",P9="_tabBar_15opd_8",F9="_clearBtn_15opd_24",H9="_terminal_15opd_38",j9="_terminalContainer_15opd_45",$9="_shellBadge_15opd_68",V9="_termTab_15opd_78",z9="_termTabActive_15opd_96",U9="_termTabClose_15opd_100",W9="_addTabBtn_15opd_109",G9="_searchBtn_15opd_124",K9="_searchBar_15opd_141",q9="_searchInputRow_15opd_157",X9="_searchInput_15opd_157",Z9="_searchToggleBtn_15opd_186",Y9="_searchToggleBtnActive_15opd_203",J9="_searchActions_15opd_208",Q9="_searchNavBtn_15opd_214",eD="_searchCloseBtn_15opd_238",ut={wrapper:M9,tabBar:P9,clearBtn:F9,terminal:H9,terminalContainer:j9,shellBadge:$9,termTab:V9,termTabActive:z9,termTabClose:U9,addTabBtn:W9,searchBtn:G9,searchBar:K9,searchInputRow:q9,searchInput:X9,searchToggleBtn:Z9,searchToggleBtnActive:Y9,searchActions:J9,searchNavBtn:Q9,searchCloseBtn:eD},Bi="tab-1";let vh=1;const Yb={dark:{background:"#04041c",foreground:"#fcfcfc",cursor:"#aeafad",selectionBackground:"rgba(255, 255, 255, 0.2)",selectionForeground:"#fcfcfc",black:"#04041c",red:"#f46464",green:"#6ac877",yellow:"#e7ba5c",blue:"#00bbff",magenta:"#c586c0",cyan:"#4ec9b0",white:"#fcfcfc",brightBlack:"#787c96",brightRed:"#f46464",brightGreen:"#b5cea8",brightYellow:"#e7ba5c",brightBlue:"#00ccff",brightMagenta:"#c586c0",brightCyan:"#4ec9b0",brightWhite:"#fcfcfc"},light:{background:"#fcfcfc",foreground:"#203645",cursor:"#1362e2",selectionBackground:"rgba(19, 98, 226, 0.3)",selectionForeground:"#203645",black:"#203645",red:"#c42929",green:"#228b22",yellow:"#d28e00",blue:"#1362e2",magenta:"#9333ea",cyan:"#0891b2",white:"#fcfcfc",brightBlack:"#637685",brightRed:"#dc2626",brightGreen:"#16a34a",brightYellow:"#ca8a04",brightBlue:"#0470ec",brightMagenta:"#a855f7",brightCyan:"#0ea5e9",brightWhite:"#ffffff"}};function tD(r){const e=new t9.Terminal({theme:Yb[r],fontFamily:"'Cascadia Code', 'Fira Code', Consolas, 'Courier New', monospace",fontSize:13,lineHeight:1.4,cursorBlink:!0,scrollback:2e3}),t=new r9.FitAddon,n=new B9;return e.loadAddon(t),e.loadAddon(n),{term:e,fitAddon:t,searchAddon:n}}const Jb=j.forwardRef((r,e)=>{const[t,n]=j.useState([{id:Bi,label:"Terminal 1"}]),[i,s]=j.useState(Bi),[a,o]=j.useState(!1),[l,c]=j.useState(!1),[u,d]=j.useState(""),[g,_]=j.useState(!1),y=j.useRef(null),b=ou(),p=j.useRef(b);j.useEffect(()=>{p.current=b;for(const{term:k}of f.current.values())k.options&&(k.options.theme=Yb[b])},[b]);const f=j.useRef(new Map),h=j.useRef(new Map),m=j.useRef(null),v=j.useRef(t);j.useEffect(()=>{v.current=t},[t]),j.useEffect(()=>()=>{for(const{term:k}of f.current.values())k.dispose();for(const k of h.current.values())k.disconnect()},[]);const w=j.useCallback((k,B)=>{var R;if(!B){(R=h.current.get(k))==null||R.disconnect(),h.current.delete(k);return}if(f.current.has(k))return;const{term:N,fitAddon:F,searchAddon:H}=tD(p.current);N.open(B),F.fit(),N.attachCustomKeyEventHandler(O=>O.type==="keydown"&&O.ctrlKey&&O.key==="f"?(O.preventDefault(),c(!0),setTimeout(()=>{var I;return(I=y.current)==null?void 0:I.focus()},50),!1):O.type==="keydown"&&O.ctrlKey&&O.key==="c"&&N.hasSelection()?(navigator.clipboard.writeText(N.getSelection()),!1):O.type==="keydown"&&O.ctrlKey&&O.key==="v"?(navigator.clipboard.readText().then(I=>{const $=f.current.get(k);$!=null&&$.input&&$.input.write(I)}),!1):!0);const T=new ResizeObserver(()=>F.fit());T.observe(B),h.current.set(k,T),f.current.set(k,{term:N,fitAddon:F,searchAddon:H,shellStarted:!1,input:null})},[]),C=j.useCallback(async(k,B)=>{const N=f.current.get(B);if(!N||N.shellStarted)return;N.shellStarted=!0;const{term:F}=N,H=await k.spawn("jsh",{terminal:{cols:F.cols,rows:F.rows}});H.output.pipeTo(new WritableStream({write(R){F.write(R)}}));const T=H.input.getWriter();N.input=T,F.onData(R=>void T.write(R)),F.onResize(({cols:R,rows:O})=>H.resize({cols:R,rows:O}))},[]),E=j.useCallback(()=>{vh+=1;const k=`tab-${vh}`,B=`Terminal ${vh}`;if(n(N=>[...N,{id:k,label:B}]),s(k),m.current){const N=m.current;setTimeout(()=>{C(N,k).catch(F=>{console.error(`Failed to spawn shell for ${k}:`,F);const H=f.current.get(k);H&&H.term.write(`\x1B[31mError: Failed to spawn shell - ${F.message}\x1B[0m\r
|
|
149
|
+
`)})},50)}},[C]),S=j.useCallback((k,B)=>{B.stopPropagation(),n(F=>F.length<=1?F:F.filter(H=>H.id!==k)),s(F=>{var T;if(F!==k)return F;const H=v.current.filter(R=>R.id!==k);return((T=H[H.length-1])==null?void 0:T.id)??Bi});const N=f.current.get(k);N&&(N.term.dispose(),f.current.delete(k))},[]);j.useImperativeHandle(e,()=>({write:k=>{var B;(B=f.current.get(Bi))==null||B.term.write(k)},clear:()=>{var k;return(k=f.current.get(Bi))==null?void 0:k.term.clear()},focus:()=>{var k;return(k=f.current.get(i))==null?void 0:k.term.focus()},spawnShell:async k=>{m.current=k,o(!0),await C(k,Bi)}}));const x=j.useCallback(()=>{const k=f.current.get(i);if(!k||!u)return;k.searchAddon.findNext(u,{caseSensitive:g,incremental:!1})||k.searchAddon.findNext(u,{caseSensitive:g,incremental:!1})},[i,u,g]),L=j.useCallback(()=>{const k=f.current.get(i);if(!k||!u)return;k.searchAddon.findPrevious(u,{caseSensitive:g,incremental:!1})||k.searchAddon.findPrevious(u,{caseSensitive:g,incremental:!1})},[i,u,g]),P=j.useCallback(k=>{var B;k.key==="Enter"?(k.preventDefault(),k.shiftKey?L():x()):k.key==="Escape"&&(k.preventDefault(),c(!1),(B=f.current.get(i))==null||B.term.focus())},[x,L,i]),A=j.useCallback(()=>{var k;c(!1),d(""),(k=f.current.get(i))==null||k.term.focus()},[i]);return j.useEffect(()=>{var k;l&&((k=y.current)==null||k.focus())},[l]),M.jsxs("div",{className:ut.wrapper,children:[M.jsxs("div",{className:ut.tabBar,children:[t.map(k=>M.jsxs("button",{className:`${ut.termTab} ${k.id===i?ut.termTabActive:""}`,onClick:()=>s(k.id),children:[a&&k.id===Bi&&M.jsx("span",{className:ut.shellBadge,children:"jsh"}),k.label,t.length>1&&M.jsx("span",{className:ut.termTabClose,onClick:B=>S(k.id,B),role:"button","aria-label":"Close terminal tab",children:M.jsx(be,{name:"close",size:12})})]},k.id)),M.jsx("button",{className:ut.addTabBtn,onClick:E,title:"New terminal","aria-label":"New terminal",children:M.jsx(be,{name:"add"})}),M.jsx("button",{className:ut.clearBtn,onClick:()=>{var k;return(k=f.current.get(i))==null?void 0:k.term.clear()},title:"Clear terminal","aria-label":"Clear terminal",children:M.jsx(be,{name:"trash"})}),M.jsx("button",{className:ut.searchBtn,onClick:()=>c(k=>!k),title:"Find (Ctrl+F)","aria-label":"Find in terminal",children:M.jsx(be,{name:"search"})})]}),t.map(k=>M.jsxs("div",{className:ut.terminalContainer,style:{display:k.id===i?"flex":"none"},onClick:()=>{var B;return(B=f.current.get(i))==null?void 0:B.term.focus()},children:[l&&M.jsxs("div",{className:ut.searchBar,onClick:B=>B.stopPropagation(),onKeyDown:P,children:[M.jsxs("div",{className:ut.searchInputRow,children:[M.jsx("input",{ref:y,className:ut.searchInput,placeholder:"Find",value:u,onChange:B=>d(B.target.value)}),M.jsx("button",{className:`${ut.searchToggleBtn} ${g?ut.searchToggleBtnActive:""}`,onClick:()=>_(B=>!B),title:"Match case (Alt+C)","aria-label":"Match case",children:"Aa"})]}),M.jsxs("div",{className:ut.searchActions,children:[M.jsx("button",{className:ut.searchNavBtn,onClick:L,disabled:!u,title:"Previous match (Shift+Enter)","aria-label":"Previous match",children:M.jsx(be,{name:"arrow-up",size:12})}),M.jsx("button",{className:ut.searchNavBtn,onClick:x,disabled:!u,title:"Next match (Enter)","aria-label":"Next match",children:M.jsx(be,{name:"arrow-down",size:12})}),M.jsx("button",{className:ut.searchCloseBtn,onClick:A,title:"Close (Esc)","aria-label":"Close search",children:M.jsx(be,{name:"close",size:12})})]})]}),M.jsx("div",{ref:B=>w(k.id,B),className:ut.terminal})]},k.id))]})});Jb.displayName="TerminalPanel";function hu(r){const e={};for(const[t,n]of Object.entries(r)){const i=t.split("/");let s=e;for(let a=0;a<i.length-1;a++){const o=i[a];s[o]||(s[o]={directory:{}}),s=s[o].directory}s[i[i.length-1]]={file:{contents:n}}}return e}const rD=hu({".npmrc":`legacy-peer-deps=true
|
|
150
|
+
fund=false
|
|
151
|
+
audit=false
|
|
152
|
+
omit=optional
|
|
153
|
+
package-lock=false
|
|
154
|
+
`,"index.html":`<!doctype html>
|
|
155
|
+
<html lang="en">
|
|
156
|
+
<head>
|
|
157
|
+
<meta charset="UTF-8" />
|
|
158
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
159
|
+
<title>Angular + Vega Demo</title>
|
|
160
|
+
</head>
|
|
161
|
+
<body>
|
|
162
|
+
<app-root>
|
|
163
|
+
<div style="font-family: sans-serif; padding: 2rem; max-width: 500px; margin: 0 auto">
|
|
164
|
+
<h1>Angular + Vega Demo</h1>
|
|
165
|
+
<p>Loading...</p>
|
|
166
|
+
</div>
|
|
167
|
+
</app-root>
|
|
168
|
+
<script type="module" src="/src/main.ts"><\/script>
|
|
169
|
+
</body>
|
|
170
|
+
</html>
|
|
171
|
+
`,"package.json":`{
|
|
172
|
+
"name": "vega-angular-demo",
|
|
173
|
+
"private": true,
|
|
174
|
+
"version": "0.0.0",
|
|
175
|
+
"type": "module",
|
|
176
|
+
"scripts": {
|
|
177
|
+
"dev": "vite --host"
|
|
178
|
+
},
|
|
179
|
+
"dependencies": {
|
|
180
|
+
"@angular/common": "^17.3.12",
|
|
181
|
+
"@angular/compiler": "^17.3.12",
|
|
182
|
+
"@angular/core": "^17.3.12",
|
|
183
|
+
"@angular/forms": "^17.3.12",
|
|
184
|
+
"@angular/platform-browser": "^17.3.12",
|
|
185
|
+
"@angular/platform-browser-dynamic": "^17.3.12",
|
|
186
|
+
"@globalpayments/vega-angular": "latest",
|
|
187
|
+
"rxjs": "^7.8.0",
|
|
188
|
+
"zone.js": "^0.14.0"
|
|
189
|
+
},
|
|
190
|
+
"devDependencies": {
|
|
191
|
+
"vite": "^5.4.2"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
`,"src/app.component.html":`<div style="font-family: sans-serif; padding: 2rem; max-width: 500px; margin: 0 auto">
|
|
195
|
+
<h1>Angular + Vega Demo</h1>
|
|
196
|
+
<p style="margin-bottom: 1rem">
|
|
197
|
+
Count: <strong>{{ count }}</strong>
|
|
198
|
+
</p>
|
|
199
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
200
|
+
<vega-button variant="primary" (vegaClick)="increment()">Increment</vega-button>
|
|
201
|
+
<vega-button variant="secondary" (vegaClick)="decrement()">Decrement</vega-button>
|
|
202
|
+
<vega-button danger="true" (vegaClick)="reset()">Reset</vega-button>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
`,"src/app.component.ts":`import { Component } from '@angular/core'
|
|
206
|
+
import template from './app.component.html?raw'
|
|
207
|
+
|
|
208
|
+
@Component({
|
|
209
|
+
selector: 'app-root',
|
|
210
|
+
template,
|
|
211
|
+
})
|
|
212
|
+
export class AppComponent {
|
|
213
|
+
count = 0
|
|
214
|
+
|
|
215
|
+
increment() {
|
|
216
|
+
this.count++
|
|
217
|
+
}
|
|
218
|
+
decrement() {
|
|
219
|
+
this.count--
|
|
220
|
+
}
|
|
221
|
+
reset() {
|
|
222
|
+
this.count = 0
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
`,"src/app.module.ts":`import { NgModule } from '@angular/core'
|
|
226
|
+
import { BrowserModule } from '@angular/platform-browser'
|
|
227
|
+
import { VegaComponentModule } from '@globalpayments/vega-angular'
|
|
228
|
+
import { AppComponent } from './app.component'
|
|
229
|
+
|
|
230
|
+
// Import VegaComponentModule in the App module per the recommended setup:
|
|
231
|
+
// https://vega.globalpayments.com/develop/angular-setup
|
|
232
|
+
@NgModule({
|
|
233
|
+
declarations: [AppComponent],
|
|
234
|
+
imports: [BrowserModule, VegaComponentModule],
|
|
235
|
+
bootstrap: [AppComponent],
|
|
236
|
+
})
|
|
237
|
+
export class AppModule {}
|
|
238
|
+
`,"src/main.ts":`import 'zone.js'
|
|
239
|
+
import '@angular/compiler'
|
|
240
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
|
|
241
|
+
import { AppModule } from './app.module'
|
|
242
|
+
|
|
243
|
+
platformBrowserDynamic().bootstrapModule(AppModule).catch(console.error)
|
|
244
|
+
`,"tsconfig.json":`{
|
|
245
|
+
"compilerOptions": {
|
|
246
|
+
"target": "ES2022",
|
|
247
|
+
"useDefineForClassFields": false,
|
|
248
|
+
"module": "ESNext",
|
|
249
|
+
"moduleResolution": "Bundler",
|
|
250
|
+
"experimentalDecorators": true,
|
|
251
|
+
"strict": true,
|
|
252
|
+
"skipLibCheck": true
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
`,"vite.config.js":`import { defineConfig } from 'vite'
|
|
256
|
+
|
|
257
|
+
export default defineConfig({
|
|
258
|
+
// Exclude Angular packages from Vite's esbuild dependency pre-bundling.
|
|
259
|
+
// Angular 17 ships pre-compiled ESM packages that can be served directly from
|
|
260
|
+
// node_modules without esbuild. Without this, Vite uses esbuild (WASM in
|
|
261
|
+
// WebContainer CI) to pre-bundle them, which is very slow.
|
|
262
|
+
// rxjs is excluded too so Vite doesn't try to pre-bundle it separately —
|
|
263
|
+
// @angular/core imports rxjs and both are served as raw ESM together.
|
|
264
|
+
optimizeDeps: {
|
|
265
|
+
exclude: [
|
|
266
|
+
'zone.js',
|
|
267
|
+
'@angular/compiler',
|
|
268
|
+
'@angular/core',
|
|
269
|
+
'@angular/common',
|
|
270
|
+
'@angular/forms',
|
|
271
|
+
'@angular/platform-browser',
|
|
272
|
+
'@angular/platform-browser-dynamic',
|
|
273
|
+
'rxjs',
|
|
274
|
+
'@globalpayments/vega-angular',
|
|
275
|
+
],
|
|
276
|
+
},
|
|
277
|
+
})
|
|
278
|
+
`}),nD=hu({"index.html":`<!doctype html>
|
|
279
|
+
<html lang="en">
|
|
280
|
+
<head>
|
|
281
|
+
<meta charset="UTF-8" />
|
|
282
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
283
|
+
<title>React + Vega Demo</title>
|
|
284
|
+
</head>
|
|
285
|
+
<body>
|
|
286
|
+
<div id="root"></div>
|
|
287
|
+
<script type="module" src="/src/main.jsx"><\/script>
|
|
288
|
+
</body>
|
|
289
|
+
</html>
|
|
290
|
+
`,"package.json":`{
|
|
291
|
+
"name": "vega-react-demo",
|
|
292
|
+
"private": true,
|
|
293
|
+
"version": "0.0.0",
|
|
294
|
+
"type": "module",
|
|
295
|
+
"scripts": {
|
|
296
|
+
"dev": "vite --host",
|
|
297
|
+
"test": "vitest run",
|
|
298
|
+
"test:watch": "vitest"
|
|
299
|
+
},
|
|
300
|
+
"dependencies": {
|
|
301
|
+
"@heartlandone/vega-react": "latest",
|
|
302
|
+
"react": "^18.3.1",
|
|
303
|
+
"react-dom": "^18.3.1"
|
|
304
|
+
},
|
|
305
|
+
"devDependencies": {
|
|
306
|
+
"@testing-library/jest-dom": "^6.4.2",
|
|
307
|
+
"@testing-library/react": "^16.0.0",
|
|
308
|
+
"@testing-library/user-event": "^14.5.2",
|
|
309
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
310
|
+
"jsdom": "^25.0.0",
|
|
311
|
+
"vite": "^5.4.2",
|
|
312
|
+
"vitest": "^2.0.0"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
`,"src/App.jsx":`import { useState } from 'react'
|
|
316
|
+
import { VegaButton } from '@heartlandone/vega-react'
|
|
317
|
+
|
|
318
|
+
export default function App() {
|
|
319
|
+
const [count, setCount] = useState(0)
|
|
320
|
+
|
|
321
|
+
return (
|
|
322
|
+
<div style={{ fontFamily: 'sans-serif', padding: '2rem', maxWidth: '500px', margin: '0 auto' }}>
|
|
323
|
+
<h1>React + Vega Demo</h1>
|
|
324
|
+
<p style={{ marginBottom: '1rem' }}>
|
|
325
|
+
Count: <strong>{count}</strong>
|
|
326
|
+
</p>
|
|
327
|
+
|
|
328
|
+
<div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>
|
|
329
|
+
<VegaButton
|
|
330
|
+
variant="primary"
|
|
331
|
+
onVegaClick={() => setCount((c) => c + 1)}
|
|
332
|
+
>
|
|
333
|
+
Increment
|
|
334
|
+
</VegaButton>
|
|
335
|
+
<VegaButton
|
|
336
|
+
variant="secondary"
|
|
337
|
+
onVegaClick={() => setCount((c) => c - 1)}
|
|
338
|
+
>
|
|
339
|
+
Decrement
|
|
340
|
+
</VegaButton>
|
|
341
|
+
<VegaButton
|
|
342
|
+
danger={true}
|
|
343
|
+
onVegaClick={() => setCount(0)}
|
|
344
|
+
>
|
|
345
|
+
Reset
|
|
346
|
+
</VegaButton>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
)
|
|
350
|
+
}
|
|
351
|
+
`,"src/App.test.jsx":`import { describe, it, expect } from 'vitest'
|
|
352
|
+
import { render, screen } from '@testing-library/react'
|
|
353
|
+
import App from './App.jsx'
|
|
354
|
+
|
|
355
|
+
describe('App', () => {
|
|
356
|
+
it('renders the heading', () => {
|
|
357
|
+
render(<App />)
|
|
358
|
+
expect(screen.getByText(/React \\+ Vega Demo/i)).toBeInTheDocument()
|
|
359
|
+
})
|
|
360
|
+
|
|
361
|
+
it('shows initial count of 0', () => {
|
|
362
|
+
render(<App />)
|
|
363
|
+
expect(screen.getByText('0')).toBeInTheDocument()
|
|
364
|
+
})
|
|
365
|
+
})
|
|
366
|
+
`,"src/index.css":`* {
|
|
367
|
+
box-sizing: border-box;
|
|
368
|
+
}
|
|
369
|
+
body {
|
|
370
|
+
margin: 0;
|
|
371
|
+
background: #f8fafc;
|
|
372
|
+
}
|
|
373
|
+
`,"src/main.jsx":`import { StrictMode } from 'react'
|
|
374
|
+
import { createRoot } from 'react-dom/client'
|
|
375
|
+
import App from './App.jsx'
|
|
376
|
+
import './index.css'
|
|
377
|
+
|
|
378
|
+
createRoot(document.getElementById('root')).render(
|
|
379
|
+
<StrictMode>
|
|
380
|
+
<App />
|
|
381
|
+
</StrictMode>
|
|
382
|
+
)
|
|
383
|
+
`,"src/setupTests.js":`import '@testing-library/jest-dom'
|
|
384
|
+
`,"vite.config.js":`import { defineConfig } from 'vite'
|
|
385
|
+
import react from '@vitejs/plugin-react'
|
|
386
|
+
|
|
387
|
+
export default defineConfig({
|
|
388
|
+
plugins: [react()],
|
|
389
|
+
test: {
|
|
390
|
+
environment: 'jsdom',
|
|
391
|
+
globals: true,
|
|
392
|
+
setupFiles: ['./src/setupTests.js'],
|
|
393
|
+
},
|
|
394
|
+
})
|
|
395
|
+
`}),iD=hu({"index.html":`<!doctype html>
|
|
396
|
+
<html lang="en">
|
|
397
|
+
<head>
|
|
398
|
+
<meta charset="UTF-8" />
|
|
399
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
400
|
+
<title>Vanilla JS + Vega Demo</title>
|
|
401
|
+
<link rel="stylesheet" href="/style.css" />
|
|
402
|
+
</head>
|
|
403
|
+
<body>
|
|
404
|
+
<div id="app">
|
|
405
|
+
<h1>Vanilla JS + Vega Demo</h1>
|
|
406
|
+
<p>Count: <strong id="count">0</strong></p>
|
|
407
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px">
|
|
408
|
+
<vega-button id="inc" variant="primary">Increment</vega-button>
|
|
409
|
+
<vega-button id="dec" variant="secondary">Decrement</vega-button>
|
|
410
|
+
<vega-button id="reset" danger>Reset</vega-button>
|
|
411
|
+
</div>
|
|
412
|
+
</div>
|
|
413
|
+
<script type="module" src="/src/main.js"><\/script>
|
|
414
|
+
</body>
|
|
415
|
+
</html>
|
|
416
|
+
`,"package.json":`{
|
|
417
|
+
"name": "vega-vanilla-demo",
|
|
418
|
+
"private": true,
|
|
419
|
+
"version": "0.0.0",
|
|
420
|
+
"type": "module",
|
|
421
|
+
"scripts": {
|
|
422
|
+
"dev": "vite --host",
|
|
423
|
+
"test": "vitest run",
|
|
424
|
+
"test:watch": "vitest"
|
|
425
|
+
},
|
|
426
|
+
"dependencies": {
|
|
427
|
+
"@heartlandone/vega": "latest"
|
|
428
|
+
},
|
|
429
|
+
"devDependencies": {
|
|
430
|
+
"jsdom": "^25.0.0",
|
|
431
|
+
"vite": "^5.4.2",
|
|
432
|
+
"vitest": "^2.0.0"
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
`,"src/counter.js":`/**
|
|
436
|
+
* Pure counter module — no DOM dependencies, easy to unit-test.
|
|
437
|
+
* @param {number} initialValue
|
|
438
|
+
*/
|
|
439
|
+
export function createCounter(initialValue = 0) {
|
|
440
|
+
let count = initialValue
|
|
441
|
+
|
|
442
|
+
return {
|
|
443
|
+
increment: () => ++count,
|
|
444
|
+
decrement: () => --count,
|
|
445
|
+
reset: () => (count = 0),
|
|
446
|
+
getCount: () => count,
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
`,"src/counter.test.js":`import { describe, it, expect } from 'vitest'
|
|
450
|
+
import { createCounter } from './counter.js'
|
|
451
|
+
|
|
452
|
+
describe('createCounter', () => {
|
|
453
|
+
it('starts at 0 by default', () => {
|
|
454
|
+
const c = createCounter()
|
|
455
|
+
expect(c.getCount()).toBe(0)
|
|
456
|
+
})
|
|
457
|
+
|
|
458
|
+
it('starts at a custom initial value', () => {
|
|
459
|
+
const c = createCounter(5)
|
|
460
|
+
expect(c.getCount()).toBe(5)
|
|
461
|
+
})
|
|
462
|
+
|
|
463
|
+
it('increments the count', () => {
|
|
464
|
+
const c = createCounter()
|
|
465
|
+
c.increment()
|
|
466
|
+
expect(c.getCount()).toBe(1)
|
|
467
|
+
})
|
|
468
|
+
|
|
469
|
+
it('decrements the count', () => {
|
|
470
|
+
const c = createCounter()
|
|
471
|
+
c.decrement()
|
|
472
|
+
expect(c.getCount()).toBe(-1)
|
|
473
|
+
})
|
|
474
|
+
|
|
475
|
+
it('resets to 0', () => {
|
|
476
|
+
const c = createCounter(10)
|
|
477
|
+
c.reset()
|
|
478
|
+
expect(c.getCount()).toBe(0)
|
|
479
|
+
})
|
|
480
|
+
|
|
481
|
+
it('chains multiple operations', () => {
|
|
482
|
+
const c = createCounter()
|
|
483
|
+
c.increment()
|
|
484
|
+
c.increment()
|
|
485
|
+
c.increment()
|
|
486
|
+
c.decrement()
|
|
487
|
+
expect(c.getCount()).toBe(2)
|
|
488
|
+
})
|
|
489
|
+
})
|
|
490
|
+
`,"src/main.js":`import '@heartlandone/vega/dist/vega/vega.esm.js'
|
|
491
|
+
import { createCounter } from './counter.js'
|
|
492
|
+
|
|
493
|
+
const counter = createCounter()
|
|
494
|
+
const display = document.getElementById('count')
|
|
495
|
+
|
|
496
|
+
function updateDisplay() {
|
|
497
|
+
display.textContent = counter.getCount()
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// Vega components fire a custom 'vegaClick' event
|
|
501
|
+
document.getElementById('inc').addEventListener('vegaClick', () => {
|
|
502
|
+
counter.increment()
|
|
503
|
+
updateDisplay()
|
|
504
|
+
})
|
|
505
|
+
|
|
506
|
+
document.getElementById('dec').addEventListener('vegaClick', () => {
|
|
507
|
+
counter.decrement()
|
|
508
|
+
updateDisplay()
|
|
509
|
+
})
|
|
510
|
+
|
|
511
|
+
document.getElementById('reset').addEventListener('vegaClick', () => {
|
|
512
|
+
counter.reset()
|
|
513
|
+
updateDisplay()
|
|
514
|
+
})
|
|
515
|
+
`,"style.css":`* {
|
|
516
|
+
box-sizing: border-box;
|
|
517
|
+
}
|
|
518
|
+
body {
|
|
519
|
+
margin: 0;
|
|
520
|
+
font-family: sans-serif;
|
|
521
|
+
background: #f8fafc;
|
|
522
|
+
padding: 2rem;
|
|
523
|
+
}
|
|
524
|
+
#app {
|
|
525
|
+
max-width: 500px;
|
|
526
|
+
margin: 0 auto;
|
|
527
|
+
}
|
|
528
|
+
`,"vite.config.js":`import { defineConfig } from 'vite'
|
|
529
|
+
|
|
530
|
+
export default defineConfig({
|
|
531
|
+
test: {
|
|
532
|
+
environment: 'jsdom',
|
|
533
|
+
globals: true,
|
|
534
|
+
},
|
|
535
|
+
})
|
|
536
|
+
`}),sD=hu({".npmrc":`fund=false
|
|
537
|
+
audit=false
|
|
538
|
+
omit=optional
|
|
539
|
+
ignore-scripts=true
|
|
540
|
+
package-lock=false
|
|
541
|
+
`,"index.html":`<!doctype html>
|
|
542
|
+
<html lang="en">
|
|
543
|
+
<head>
|
|
544
|
+
<meta charset="UTF-8" />
|
|
545
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
546
|
+
<title>Vue + Vega Demo</title>
|
|
547
|
+
</head>
|
|
548
|
+
<body>
|
|
549
|
+
<div id="app"></div>
|
|
550
|
+
<script type="module" src="/src/main.js"><\/script>
|
|
551
|
+
</body>
|
|
552
|
+
</html>
|
|
553
|
+
`,"package.json":`{
|
|
554
|
+
"name": "vega-vue-demo",
|
|
555
|
+
"private": true,
|
|
556
|
+
"version": "0.0.0",
|
|
557
|
+
"type": "module",
|
|
558
|
+
"scripts": {
|
|
559
|
+
"dev": "vite --host"
|
|
560
|
+
},
|
|
561
|
+
"dependencies": {
|
|
562
|
+
"@heartlandone/vega-vue": "latest",
|
|
563
|
+
"vue": "^3.5.13"
|
|
564
|
+
},
|
|
565
|
+
"devDependencies": {
|
|
566
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
567
|
+
"vite": "^5.4.2"
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
`,"src/App.vue":`<script setup>
|
|
571
|
+
import { ref } from 'vue'
|
|
572
|
+
import { VegaButton } from '@heartlandone/vega-vue'
|
|
573
|
+
|
|
574
|
+
const count = ref(0)
|
|
575
|
+
const increment = () => count.value++
|
|
576
|
+
const decrement = () => count.value--
|
|
577
|
+
const reset = () => { count.value = 0 }
|
|
578
|
+
<\/script>
|
|
579
|
+
|
|
580
|
+
<template>
|
|
581
|
+
<div style="font-family: sans-serif; padding: 2rem; max-width: 500px; margin: 0 auto">
|
|
582
|
+
<h1>Vue + Vega Demo</h1>
|
|
583
|
+
<p style="margin-bottom: 1rem">
|
|
584
|
+
Count: <strong>{{ count }}</strong>
|
|
585
|
+
</p>
|
|
586
|
+
|
|
587
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
588
|
+
<VegaButton variant="primary" @vegaClick="increment">Increment</VegaButton>
|
|
589
|
+
<VegaButton variant="secondary" @vegaClick="decrement">Decrement</VegaButton>
|
|
590
|
+
<VegaButton :danger="true" @vegaClick="reset">Reset</VegaButton>
|
|
591
|
+
</div>
|
|
592
|
+
</div>
|
|
593
|
+
</template>
|
|
594
|
+
`,"src/main.js":`import { createApp } from 'vue'
|
|
595
|
+
import App from './App.vue'
|
|
596
|
+
import { VegaComponentLibrary } from '@heartlandone/vega-vue'
|
|
597
|
+
|
|
598
|
+
const app = createApp(App).use(VegaComponentLibrary)
|
|
599
|
+
|
|
600
|
+
VegaComponentLibrary.isReady().then(() => {
|
|
601
|
+
app.mount('#app')
|
|
602
|
+
})
|
|
603
|
+
`,"vite.config.js":`import { defineConfig } from 'vite'
|
|
604
|
+
import vue from '@vitejs/plugin-vue'
|
|
605
|
+
|
|
606
|
+
export default defineConfig({
|
|
607
|
+
plugins: [vue()],
|
|
608
|
+
// Exclude Vega packages from Vite's esbuild pre-bundling.
|
|
609
|
+
// @heartlandone/vega-vue's VegaComponentLibrary uses Stencil's lazy loader
|
|
610
|
+
// which resolves chunk URLs relative to import.meta.url. When pre-bundled,
|
|
611
|
+
// the chunks end up at /@vite/deps/chunk-xxx.js (404 in WebContainer).
|
|
612
|
+
// Serving the packages directly from node_modules keeps the paths correct.
|
|
613
|
+
optimizeDeps: {
|
|
614
|
+
exclude: ['@heartlandone/vega', '@heartlandone/vega-vue'],
|
|
615
|
+
},
|
|
616
|
+
})
|
|
617
|
+
`}),zf=[{id:"react",name:"React",description:"React 18 + Vite + @heartlandone/vega-react with Vitest",icon:"React",iconUrl:"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/react/react-original.svg",files:nD,entryFile:"src/App.jsx"},{id:"vue",name:"Vue 3",description:"Vue 3 + Vite + @heartlandone/vega-vue with Vitest",icon:"Vue",iconUrl:"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/vuejs/vuejs-original.svg",files:sD,entryFile:"src/App.vue"},{id:"angular",name:"Angular",description:"Angular 17 + Vite + @globalpayments/vega-angular (uses NgModule + VegaComponentModule per the recommended setup guide)",icon:"Angular",iconUrl:"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/angular/angular-original.svg",files:rD,entryFile:"src/main.ts"},{id:"vanilla",name:"Vanilla JS",description:"Plain HTML + JS + Vega web components (CDN) with Vitest",icon:"JS",iconUrl:"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/javascript/javascript-original.svg",files:iD,entryFile:"index.html"}];function jg(r,e=""){const t=[];for(const[n,i]of Object.entries(r)){const s=e?`${e}/${n}`:n;i.file?t.push(s):i.directory&&t.push(...jg(i.directory,s))}return t}function oD(r,e){var i;const t=e.split("/");let n=r;for(let s=0;s<t.length;s++){const a=n[t[s]];if(!a)return"";if(s===t.length-1)return((i=a.file)==null?void 0:i.contents)??"";n=a.directory??{}}return""}function aD(r){const e=r.split(".").pop()??"";return{js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",css:"css",html:"html",json:"json",md:"markdown",vue:"html"}[e]??"plaintext"}function ua(r){return r.split("/").pop()??r}async function Qb(r,e="/"){const t=await r.fs.readdir(e,{withFileTypes:!0}),n=[];for(const i of t){const s=e==="/"?i.name:`${e}/${i.name}`;i.name==="node_modules"||i.name===".git"||(i.isDirectory()?n.push(...await Qb(r,s)):n.push(s.startsWith("/")?s.slice(1):s))}return n}function Qa(r){const e=jg(r.files),t={};for(const n of e)t[n]=oD(r.files,n);return{allFiles:e,contents:t}}function lD({openTabs:r,selectedFile:e,fileContents:t,tabValuesRef:n,readOnly:i,hideTerminal:s,termRef:a,terminalHeight:o,isDragging:l,handleTerminalDraggerMouseDown:c,monacoEditorRef:u,pendingRevealLineRef:d,onSelectTab:g,onCloseTab:_}){const y=ou();return M.jsxs("div",{className:xe.editorPane,children:[M.jsx("div",{className:xe.tabBar,children:r.map(b=>M.jsxs("div",{className:`${xe.tab} ${b===e?xe.tabActive:""}`,onClick:()=>g(b),children:[M.jsx("span",{className:xe.tabName,children:ua(b)}),M.jsx("button",{className:xe.tabClose,onClick:p=>_(b,p),title:"Close tab","aria-label":"Close tab",children:M.jsx(be,{name:"close",size:12})})]},b))}),M.jsx("div",{className:xe.editorContainer,children:e?M.jsx(e9,{defaultValue:t[e]??"",language:aD(e),theme:y==="dark"?"vs-dark":"vs",onChange:b=>{n.current[e]=b??""},onMount:b=>{n.current[e]=b.getValue(),u.current=b;const p=d.current;p!==null&&(d.current=null,b.revealLineInCenter(p),b.setPosition({lineNumber:p,column:1}),b.focus())},options:{minimap:{enabled:!1},fontSize:13,lineHeight:20,fontFamily:"'Cascadia Code', 'Fira Code', Consolas, monospace",fontLigatures:!0,wordWrap:"on",scrollBeyondLastLine:!1,tabSize:2,padding:{top:12},readOnly:i}},e):M.jsx("div",{className:xe.emptyEditor,children:"Open a file from the explorer"})}),!s&&M.jsxs(M.Fragment,{children:[M.jsx("div",{className:`${xe.terminalDragger} ${l?xe.draggerActive:""}`,onMouseDown:c,title:"Drag to resize terminal"}),M.jsx("div",{className:xe.terminalPane,style:o!==null?{height:`${o}px`}:void 0,children:M.jsx(Jb,{ref:a})})]})]})}const cD="_backdrop_5dtnv_1",dD="_modal_5dtnv_12",uD="_inputRow_5dtnv_24",hD="_icon_5dtnv_32",fD="_input_5dtnv_24",pD="_closeBtn_5dtnv_53",gD="_list_5dtnv_70",mD="_item_5dtnv_78",vD="_itemActive_5dtnv_88",_D="_itemName_5dtnv_92",yD="_itemPath_5dtnv_98",bD="_empty_5dtnv_106",Rr={backdrop:cD,modal:dD,inputRow:uD,icon:hD,input:fD,closeBtn:pD,list:gD,item:mD,itemActive:vD,itemName:_D,itemPath:yD,empty:bD};function wD({files:r,onSelect:e,onClose:t}){const[n,i]=j.useState(""),[s,a]=j.useState(0),o=j.useRef(null),l=j.useRef(null),c=n?r.filter(d=>d.toLowerCase().includes(n.toLowerCase())):r;j.useEffect(()=>{a(0)},[n]),j.useEffect(()=>{var d;(d=o.current)==null||d.focus()},[]),j.useEffect(()=>{var g;const d=(g=l.current)==null?void 0:g.children[s];d==null||d.scrollIntoView({block:"nearest"})},[s]);function u(d){if(d.key==="ArrowDown")d.preventDefault(),a(g=>Math.min(g+1,c.length-1));else if(d.key==="ArrowUp")d.preventDefault(),a(g=>Math.max(g-1,0));else if(d.key==="Enter"){d.preventDefault();const g=c[s];g&&(e(g),t())}else d.key==="Escape"&&t()}return M.jsx("div",{className:Rr.backdrop,onClick:t,children:M.jsxs("div",{className:Rr.modal,onClick:d=>d.stopPropagation(),children:[M.jsxs("div",{className:Rr.inputRow,children:[M.jsx("span",{className:Rr.icon,children:M.jsx(be,{name:"search"})}),M.jsx("input",{ref:o,className:Rr.input,placeholder:"Go to file…",value:n,onChange:d=>i(d.target.value),onKeyDown:u}),M.jsx("button",{className:Rr.closeBtn,onClick:t,title:"Close (Esc)","aria-label":"Close",children:M.jsx(be,{name:"close"})})]}),c.length===0?M.jsxs("div",{className:Rr.empty,children:['No files match "',n,'"']}):M.jsx("ul",{ref:l,className:Rr.list,children:c.map((d,g)=>M.jsxs("li",{className:`${Rr.item} ${g===s?Rr.itemActive:""}`,onClick:()=>{e(d),t()},onMouseEnter:()=>a(g),children:[M.jsx("span",{className:Rr.itemName,children:ua(d)}),M.jsx("span",{className:Rr.itemPath,children:d})]},d))})]})})}const SD="_backdrop_1jf83_1",CD="_modal_1jf83_12",ED="_header_1jf83_25",xD="_title_1jf83_33",TD="_closeBtn_1jf83_40",kD="_tabs_1jf83_56",LD="_tab_1jf83_56",AD="_tabActive_1jf83_83",RD="_content_1jf83_88",OD="_sectionDesc_1jf83_96",DD="_list_1jf83_101",ND="_row_1jf83_110",ID="_rowLabel_1jf83_116",BD="_kbd_1jf83_121",MD="_sep_1jf83_141",yt={backdrop:SD,modal:CD,header:ED,title:xD,closeBtn:TD,tabs:kD,tab:LD,tabActive:AD,content:RD,sectionDesc:OD,list:DD,row:ND,rowLabel:ID,kbd:BD,sep:MD},PD=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),Yl=PD?"⌘":"Ctrl",dn=[{id:"shortcuts",title:"Shortcuts",description:"Keyboard shortcuts available throughout the editor.",shortcuts:[{label:"Go to file",keys:[Yl,"P"]},{label:"Search in files",keys:[Yl,"Shift","F"]},{label:"Save current file",keys:[Yl,"S"]},{label:"Open this help dialog",keys:["?"]},{label:"Close modal / overlay",keys:["Esc"]}]},{id:"files",title:"Files & Editor",description:"Manage files and navigate the editor.",items:[{label:"File explorer",detail:"Create, rename, and delete files or folders from the left sidebar."},{label:"Tabs",detail:"Open files appear as tabs above the editor. Click the close icon to close a tab."},{label:"Drag & drop",detail:"Drop a ZIP archive anywhere on the window to import a sandbox."},{label:"Auto-save",detail:"Changes are persisted locally; use "+Yl+"+S to force a save."}]},{id:"sharing",title:"Sharing & Export",description:"Share your sandbox with others.",items:[{label:"Share",detail:"Copies a self-contained link to your sandbox to the clipboard."},{label:"ZIP menu",detail:"Export the current sandbox as a ZIP file, or import a ZIP from disk."},{label:"Size limit",detail:"URL sharing is disabled for sandboxes that exceed the URL length limit — export a ZIP instead."}]},{id:"projects",title:"Projects & Templates",description:"Work across multiple sandboxes.",items:[{label:"Project name",detail:"Click the project name in the header to open the project manager."},{label:"Clone",detail:"Open a copy of the current sandbox in a new browser tab."},{label:"Templates",detail:"Start a new project from a template via the project manager."},{label:"Run",detail:"Boots the WebContainer and runs the project preview."}]}];function FD(r){return r.shortcuts!==void 0}function HD({onClose:r}){const[e,t]=j.useState(dn[0].id),n=j.useRef(null);j.useEffect(()=>{var a;(a=n.current)==null||a.focus()},[]);function i(a){if(a.key==="Escape"){a.preventDefault(),r();return}if(a.key==="ArrowRight"){a.preventDefault();const o=dn.findIndex(l=>l.id===e);t(dn[(o+1)%dn.length].id)}else if(a.key==="ArrowLeft"){a.preventDefault();const o=dn.findIndex(l=>l.id===e);t(dn[(o-1+dn.length)%dn.length].id)}}const s=dn.find(a=>a.id===e);return M.jsx("div",{className:yt.backdrop,onClick:r,children:M.jsxs("div",{ref:n,className:yt.modal,role:"dialog","aria-modal":"true","aria-labelledby":"help-modal-title",tabIndex:-1,onClick:a=>a.stopPropagation(),onKeyDown:i,children:[M.jsxs("div",{className:yt.header,children:[M.jsxs("span",{className:yt.title,id:"help-modal-title",children:[M.jsx(be,{name:"info"})," Help & Info"]}),M.jsx("button",{className:yt.closeBtn,onClick:r,title:"Close (Esc)","aria-label":"Close help dialog",children:M.jsx(be,{name:"close"})})]}),M.jsx("div",{className:yt.tabs,role:"tablist","aria-label":"Help sections",children:dn.map(a=>M.jsx("button",{role:"tab","aria-selected":a.id===e,className:`${yt.tab} ${a.id===e?yt.tabActive:""}`,onClick:()=>t(a.id),children:a.title},a.id))}),M.jsxs("div",{className:yt.content,role:"tabpanel","aria-labelledby":`help-tab-${s.id}`,children:[s.description&&M.jsx("p",{className:yt.sectionDesc,children:s.description}),FD(s)?M.jsx("ul",{className:yt.list,children:s.shortcuts.map(a=>M.jsxs("li",{className:yt.row,children:[M.jsx("span",{className:yt.rowLabel,children:a.label}),M.jsx("span",{className:yt.kbd,children:a.keys.map((o,l)=>M.jsxs("span",{children:[l>0&&M.jsx("span",{className:yt.sep,children:" + "}),M.jsx("kbd",{children:o})]},l))})]},a.label))}):M.jsx("ul",{className:yt.list,children:s.items.map(a=>M.jsx("li",{className:yt.row,children:M.jsxs("span",{className:yt.rowLabel,children:[M.jsx("strong",{children:a.label})," — ",a.detail]})},a.label))})]})]})})}const jD="_panel_1ntov_1",$D="_header_1ntov_12",VD="_title_1ntov_21",zD="_headerActions_1ntov_29",UD="_iconBtn_1ntov_35",WD="_iconBtnActive_1ntov_51",GD="_inputs_1ntov_56",KD="_inputRow_1ntov_65",qD="_input_1ntov_56",XD="_toggleBtn_1ntov_92",ZD="_toggleBtnActive_1ntov_109",YD="_replaceAllBtn_1ntov_114",JD="_summary_1ntov_136",QD="_results_1ntov_143",eN="_fileGroup_1ntov_149",tN="_fileHeader_1ntov_153",rN="_collapseArrow_1ntov_167",nN="_fileName_1ntov_174",iN="_filePath_1ntov_180",sN="_matchCount_1ntov_189",oN="_replaceFileBtn_1ntov_198",aN="_matchRow_1ntov_214",lN="_lineNumber_1ntov_228",cN="_lineText_1ntov_236",dN="_highlight_1ntov_245",Oe={panel:jD,header:$D,title:VD,headerActions:zD,iconBtn:UD,iconBtnActive:WD,inputs:GD,inputRow:KD,input:qD,toggleBtn:XD,toggleBtnActive:ZD,replaceAllBtn:YD,summary:JD,results:QD,fileGroup:eN,fileHeader:tN,collapseArrow:rN,fileName:nN,filePath:iN,matchCount:sN,replaceFileBtn:oN,matchRow:aN,lineNumber:lN,lineText:cN,highlight:dN};function uN(r,e,t){if(!e)return[];const n=[],i=t?"g":"gi";let s;try{s=new RegExp(e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&"),i)}catch{return[]}for(const[a,o]of Object.entries(r)){const l=[],c=o.split(`
|
|
618
|
+
`);for(let u=0;u<c.length;u++){const d=c[u];s.lastIndex=0;let g;for(;(g=s.exec(d))!==null;)l.push({file:a,lineNumber:u+1,lineText:d,matchStart:g.index,matchEnd:g.index+g[0].length})}l.length>0&&n.push({file:a,matches:l})}return n}function hN(r,e,t,n){const i=n?"g":"gi";try{const s=new RegExp(e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&"),i);return r.replace(s,t)}catch{return r}}function fN({fileContents:r,onOpenFile:e,onReplaceInFile:t,onClose:n}){const[i,s]=j.useState(""),[a,o]=j.useState(""),[l,c]=j.useState(!1),[u,d]=j.useState(!1),[g,_]=j.useState(new Set),y=j.useRef(null);j.useEffect(()=>{var w;(w=y.current)==null||w.focus()},[]);const b=uN(r,i,l),p=b.reduce((w,C)=>w+C.matches.length,0);function f(w){w.key==="Escape"&&n()}function h(w){_(C=>{const E=new Set(C);return E.has(w)?E.delete(w):E.add(w),E})}function m(w){const C=r[w]??"",E=hN(C,i,a,l);t(w,E)}function v(){for(const{file:w}of b)m(w)}return M.jsxs("div",{className:Oe.panel,onKeyDown:f,children:[M.jsxs("div",{className:Oe.header,children:[M.jsx("span",{className:Oe.title,children:"Search"}),M.jsxs("div",{className:Oe.headerActions,children:[M.jsx("button",{className:`${Oe.iconBtn} ${u?Oe.iconBtnActive:""}`,onClick:()=>d(w=>!w),title:"Toggle replace","aria-label":"Toggle replace",children:M.jsx(be,{name:"replace"})}),M.jsx("button",{className:Oe.iconBtn,onClick:n,title:"Close (Esc)","aria-label":"Close search",children:M.jsx(be,{name:"close"})})]})]}),M.jsxs("div",{className:Oe.inputs,children:[M.jsxs("div",{className:Oe.inputRow,children:[M.jsx("input",{ref:y,className:Oe.input,placeholder:"Search",value:i,onChange:w=>s(w.target.value)}),M.jsx("button",{className:`${Oe.toggleBtn} ${l?Oe.toggleBtnActive:""}`,onClick:()=>c(w=>!w),title:"Match case",children:"Aa"})]}),u&&M.jsxs("div",{className:Oe.inputRow,children:[M.jsx("input",{className:Oe.input,placeholder:"Replace",value:a,onChange:w=>o(w.target.value)}),M.jsx("button",{className:Oe.replaceAllBtn,onClick:v,disabled:!i||b.length===0,title:"Replace all",children:"Replace All"})]})]}),i&&M.jsx("div",{className:Oe.summary,children:p===0?"No results":`${p} result${p===1?"":"s"} in ${b.length} file${b.length===1?"":"s"}`}),M.jsx("div",{className:Oe.results,children:b.map(({file:w,matches:C})=>{const E=g.has(w);return M.jsxs("div",{className:Oe.fileGroup,children:[M.jsxs("div",{className:Oe.fileHeader,onClick:()=>h(w),children:[M.jsx("span",{className:Oe.collapseArrow,children:E?"▶":"▼"}),M.jsx("span",{className:Oe.fileName,children:ua(w)}),M.jsx("span",{className:Oe.filePath,children:w}),M.jsx("span",{className:Oe.matchCount,children:C.length}),u&&M.jsx("button",{className:Oe.replaceFileBtn,onClick:S=>{S.stopPropagation(),m(w)},title:`Replace in ${ua(w)}`,"aria-label":`Replace in ${ua(w)}`,children:M.jsx(be,{name:"replace",size:12})})]}),!E&&C.map((S,x)=>M.jsxs("div",{className:Oe.matchRow,onClick:()=>e(w,S.lineNumber),title:`${w}:${S.lineNumber}`,children:[M.jsx("span",{className:Oe.lineNumber,children:S.lineNumber}),M.jsxs("span",{className:Oe.lineText,children:[S.lineText.slice(0,S.matchStart),M.jsx("mark",{className:Oe.highlight,children:S.lineText.slice(S.matchStart,S.matchEnd)}),S.lineText.slice(S.matchEnd)]})]},x))]},w)})})]})}function pN(){const r=new URLSearchParams(window.location.search);return{embed:r.has("embed"),hideTree:r.has("hideTree"),hideTerminal:r.has("hideTerminal"),readOnly:r.has("readOnly")}}const gN="https://stackblitz.com",mN=new Error;mN.stack="";const _h={};let Jl=null;const yh={get editorOrigin(){return Jl==null&&(Jl=new URL(globalThis.WEBCONTAINER_API_IFRAME_URL??gN).origin),Jl},set editorOrigin(r){Jl=new URL(r).origin},setQueryParam(r,e){_h[r]=e},get url(){const r=new URL(this.editorOrigin);r.pathname="/headless";for(const e in _h)r.searchParams.set(e,_h[e]);return r.searchParams.set("version","1.6.4"),r}};function vN(){let r,e;function t(){e=new Promise(n=>r=n)}return t(),{get promise(){return e},resolve(n){return r(n)},reset:t}}vN();var ha;(function(r){r.UncaughtException="PREVIEW_UNCAUGHT_EXCEPTION",r.UnhandledRejection="PREVIEW_UNHANDLED_REJECTION",r.ConsoleError="PREVIEW_CONSOLE_ERROR"})(ha||(ha={}));var _N=Object.defineProperty,yN=(r,e)=>{for(var t in e)_N(r,t,{get:e[t],enumerable:!0})},_n={};yN(_n,{createEndpoint:()=>e3,expose:()=>zg,proxy:()=>a3,proxyMarker:()=>$g,releaseProxy:()=>t3,transfer:()=>o3,transferHandlers:()=>Vg,windowEndpoint:()=>EN,wrap:()=>i3});var $g=Symbol("Comlink.proxy"),e3=Symbol("Comlink.endpoint"),t3=Symbol("Comlink.releaseProxy"),Uf=Symbol("Comlink.thrown"),r3=r=>typeof r=="object"&&r!==null||typeof r=="function",bN={canHandle:r=>r3(r)&&r[$g],serialize(r){const{port1:e,port2:t}=new MessageChannel;return zg(r,e),[t,[t]]},deserialize(r){return r.start(),i3(r)}},wN={canHandle:r=>r3(r)&&Uf in r,serialize({value:r}){let e;return r instanceof Error?e={isError:!0,value:{message:r.message,name:r.name,stack:r.stack}}:e={isError:!1,value:r},[e,[]]},deserialize(r){throw r.isError?Object.assign(new Error(r.value.message),r.value):r.value}},Vg=new Map([["proxy",bN],["throw",wN]]);function zg(r,e=self){e.addEventListener("message",function t(n){if(!n||!n.data)return;const{id:i,type:s,path:a}=Object.assign({path:[]},n.data),o=(n.data.argumentList||[]).map(Hi);let l;try{const c=a.slice(0,-1).reduce((d,g)=>d[g],r),u=a.reduce((d,g)=>d[g],r);switch(s){case 0:l=u;break;case 1:c[a.slice(-1)[0]]=Hi(n.data.value),l=!0;break;case 2:l=u.apply(c,o);break;case 3:{const d=new u(...o);l=a3(d)}break;case 4:{const{port1:d,port2:g}=new MessageChannel;zg(r,g),l=o3(d,[d])}break;case 5:l=void 0;break}}catch(c){l={value:c,[Uf]:0}}Promise.resolve(l).catch(c=>({value:c,[Uf]:0})).then(c=>{const[u,d]=Ug(c);e.postMessage(Object.assign(Object.assign({},u),{id:i}),d),s===5&&(e.removeEventListener("message",t),n3(e))})}),e.start&&e.start()}function SN(r){return r.constructor.name==="MessagePort"}function n3(r){SN(r)&&r.close()}function i3(r,e){return Wf(r,[],e)}function Ql(r){if(r)throw new Error("Proxy has been released and is not useable")}function Wf(r,e=[],t=function(){}){let n=!1;const i=new Proxy(t,{get(s,a){if(Ql(n),a===t3)return()=>ys(r,{type:5,path:e.map(o=>o.toString())}).then(()=>{n3(r),n=!0});if(a==="then"){if(e.length===0)return{then:()=>i};const o=ys(r,{type:0,path:e.map(l=>l.toString())}).then(Hi);return o.then.bind(o)}return Wf(r,[...e,a])},set(s,a,o){Ql(n);const[l,c]=Ug(o);return ys(r,{type:1,path:[...e,a].map(u=>u.toString()),value:l},c).then(Hi)},apply(s,a,o){Ql(n);const l=e[e.length-1];if(l===e3)return ys(r,{type:4}).then(Hi);if(l==="bind")return Wf(r,e.slice(0,-1));const[c,u]=Em(o);return ys(r,{type:2,path:e.map(d=>d.toString()),argumentList:c},u).then(Hi)},construct(s,a){Ql(n);const[o,l]=Em(a);return ys(r,{type:3,path:e.map(c=>c.toString()),argumentList:o},l).then(Hi)}});return i}function CN(r){return Array.prototype.concat.apply([],r)}function Em(r){const e=r.map(Ug);return[e.map(t=>t[0]),CN(e.map(t=>t[1]))]}var s3=new WeakMap;function o3(r,e){return s3.set(r,e),r}function a3(r){return Object.assign(r,{[$g]:!0})}function EN(r,e=self,t="*"){return{postMessage:(n,i)=>r.postMessage(n,t,i),addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}function Ug(r){for(const[e,t]of Vg)if(t.canHandle(r)){const[n,i]=t.serialize(r);return[{type:3,name:e,value:n},i]}return[{type:0,value:r},s3.get(r)||[]]}function Hi(r){switch(r.type){case 3:return Vg.get(r.name).deserialize(r.value);case 0:return r.value}}function ys(r,e,t){return new Promise(n=>{const i=xN();r.addEventListener("message",function s(a){!a.data||!a.data.id||a.data.id!==i||(r.removeEventListener("message",s),n(a.data))}),r.start&&r.start(),r.postMessage(Object.assign({id:i},e),t)})}function xN(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const TN=[ha.ConsoleError,ha.UncaughtException,ha.UnhandledRejection];function kN(r){return!(r==null||typeof r!="object"||!("type"in r)||!TN.includes(r.type))}function bs(r){const e=Object.create(null);return r?Object.assign(e,r):e}function l3(r){const e={d:{}};for(const t of Object.keys(r)){const n=r[t];if("file"in n){if("symlink"in n.file){e.d[t]={f:{l:n.file.symlink}};continue}const s=n.file.contents,a=typeof s=="string"?s:AN(s),o=typeof s=="string"?{}:{b:!0};e.d[t]={f:{c:a,...o}};continue}const i=l3(n.directory);e.d[t]=i}return e}function c3(r){const e=bs();if("f"in r)throw new Error("It is not possible to export a single file in the JSON format.");if("d"in r)for(const t of Object.keys(r.d)){const n=r.d[t];"d"in n?e[t]=bs({directory:c3(n)}):"f"in n&&("c"in n.f?e[t]=bs({file:bs({contents:n.f.b?LN(n.f.c):n.f.c})}):"l"in n.f&&(e[t]=bs({file:bs({symlink:n.f.l})})))}return e}function LN(r){const e=new Uint8Array(r.length);for(let t=0;t<r.length;t++)e[t]=r[t].charCodeAt(0);return e}function AN(r){let e="";for(let t=0;t<r.length;t++)e+=String.fromCharCode(r[t]);return e}let ec=null,tc=null,bh={};const d3=new TextDecoder,RN=new TextEncoder,fn=class fn{constructor(e,t,n,i){Be(this,"_instance");Be(this,"_runtimeInfo");Be(this,"fs");Be(this,"_tornDown",!1);Be(this,"_unsubscribeFromTokenChangedListener",()=>{});this._instance=e,this._runtimeInfo=i,this.fs=new MN(t)}async spawn(e,t,n){let i=[];Array.isArray(t)?i=t:n=t;let s,a=new ReadableStream;if((n==null?void 0:n.output)!==!1){const b=$N();s=b.push,a=b.stream}let o,l,c,u;const d=Ec(wh(s)),g=Ec(wh(o)),_=Ec(wh(c)),y=await this._instance.run({command:e,args:i,cwd:n==null?void 0:n.cwd,env:n==null?void 0:n.env,terminal:n==null?void 0:n.terminal},g,_,d);return new BN(y,a,l,u)}async export(e,t){const n={format:(t==null?void 0:t.format)??"json",includes:t==null?void 0:t.includes,excludes:t==null?void 0:t.excludes,external:!0},i=await this._instance.serialize(e,n);if(n.format==="json"){const s=JSON.parse(d3.decode(i));return c3(s)}return i}on(e,t){if(e==="preview-message"){const s=t;t=a=>{kN(a)&&s(a)}}const{listener:n,subscribe:i}=VN(t);return i(this._instance.on(e,_n.proxy(n)))}mount(e,t){const n=e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):RN.encode(JSON.stringify(l3(e)));return this._instance.loadFiles(_n.transfer(n,[n.buffer]),{mountPoints:t==null?void 0:t.mountPoint})}setPreviewScript(e,t){return this._instance.setPreviewScript(e,t)}get path(){return this._runtimeInfo.path}get workdir(){return this._runtimeInfo.cwd}teardown(){if(this._tornDown)throw new Error("WebContainer already torn down");this._tornDown=!0,this._unsubscribeFromTokenChangedListener();const e=async()=>{try{await this.fs._teardown(),await this._instance.teardown()}finally{this._instance[_n.releaseProxy](),fn._instance===this&&(fn._instance=null)}};fn._teardownPromise=e()}static async boot(e={}){await this._teardownPromise,fn._teardownPromise=null;const{workdirName:t}=e;if(window.crossOriginIsolated&&e.coep==="none"&&console.warn(`A Cross-Origin-Embedder-Policy header is required in cross origin isolated environments.
|
|
619
|
+
Set the 'coep' option to 'require-corp'.`),t!=null&&t.includes("/")||t===".."||t===".")throw new Error("workdirName should be a valid folder name");for(;ec;)await ec;if(fn._instance)throw new Error("Only a single WebContainer instance can be booted");const n=PN(e);ec=n.catch(()=>{});try{const i=await n;return fn._instance=i,i}finally{ec=null}}};Be(fn,"_instance",null),Be(fn,"_teardownPromise",null);let bd=fn;const ON=1,DN=2;class NN{constructor(e,t){Be(this,"name");Be(this,"_type");this.name=e,this._type=t}isFile(){return this._type===ON}isDirectory(){return this._type===DN}}class IN{constructor(e,t,n,i){Be(this,"_apiClient");Be(this,"_path");Be(this,"_options");Be(this,"_listener");Be(this,"_wrappedListener");Be(this,"_watcher");Be(this,"_closed",!1);this._apiClient=e,this._path=t,this._options=n,this._listener=i,this._apiClient._watchers.add(this),this._wrappedListener=(s,a)=>{this._listener&&!this._closed&&this._listener(s,a)},this._apiClient._fs.watch(this._path,this._options,Ec(this._wrappedListener)).then(s=>{if(this._watcher=s,this._closed)return this._teardown()}).catch(console.error)}async close(){this._closed||(this._closed=!0,this._apiClient._watchers.delete(this),await this._teardown())}async _teardown(){var e;await((e=this._watcher)==null?void 0:e.close().finally(()=>{var t;(t=this._watcher)==null||t[_n.releaseProxy]()}))}}class BN{constructor(e,t,n,i){Be(this,"output");Be(this,"input");Be(this,"exit");Be(this,"_process");Be(this,"stdout");Be(this,"stderr");this.output=t,this._process=e,this.input=new WritableStream({write:s=>{var a;(a=this._getProcess())==null||a.write(s).catch(()=>{})}}),this.exit=this._onExit(),this.stdout=n,this.stderr=i}kill(){var e;(e=this._process)==null||e.kill()}resize(e){var t;(t=this._getProcess())==null||t.resize(e)}async _onExit(){var e;try{return await this._process.onExit}finally{(e=this._process)==null||e[_n.releaseProxy](),this._process=null}}_getProcess(){return this._process==null&&console.warn("This process already exited"),this._process}}class MN{constructor(e){Be(this,"_fs");Be(this,"_watchers",new Set([]));this._fs=e}rm(...e){return this._fs.rm(...e)}async readFile(e,t){return await this._fs.readFile(e,t)}async rename(e,t){return await this._fs.rename(e,t)}async writeFile(e,t,n){if(t instanceof Uint8Array){const i=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);t=_n.transfer(new Uint8Array(i),[i])}await this._fs.writeFile(e,t,n)}async readdir(e,t){const n=await this._fs.readdir(e,t);return HN(n)||jN(n)?n:n.map(s=>new NN(s.name,s["Symbol(type)"]))}async mkdir(e,t){return await this._fs.mkdir(e,t)}watch(e,t,n){return typeof t=="function"&&(n=t,t=null),new IN(this,e,t,n)}async _teardown(){this._fs[_n.releaseProxy](),await Promise.all([...this._watchers].map(e=>e.close()))}}async function PN(r){const{serverPromise:e}=FN(r),n=await(await e).build({host:window.location.host,version:"1.6.4",workdirName:r.workdirName,forwardPreviewErrors:r.forwardPreviewErrors}),[i,s,a]=await Promise.all([n.fs(),n.previewScript(),n.runtimeInfo()]);return new bd(n,i,s,a)}function wh(r){if(r!=null)return e=>{e instanceof Uint8Array?r(d3.decode(e)):e==null&&r(null)}}function Ec(r){if(r!=null)return _n.proxy(r)}function FN(r){if(tc!=null)return r.coep!==bh.coep&&(console.warn(`Attempting to boot WebContainer with 'coep: ${r.coep}'`),console.warn(`First boot had 'coep: ${bh.coep}', new settings will not take effect!`)),{serverPromise:tc};r.coep&&yh.setQueryParam("coep",r.coep),r.experimentalNode&&yh.setQueryParam("experimental_node","1");const e=document.createElement("iframe");e.style.display="none",e.setAttribute("allow","cross-origin-isolated");const t=yh.url;e.src=t.toString();const{origin:n}=t;return bh={...r},tc=new Promise(i=>{const s=a=>{if(a.origin!==n)return;const{data:o}=a;if(o.type==="init"){i(_n.wrap(a.ports[0]));return}if(o.type==="warning"){console[o.level].call(console,o.message);return}};window.addEventListener("message",s)}),document.body.insertBefore(e,null),{serverPromise:tc}}function HN(r){return typeof r[0]=="string"}function jN(r){return r[0]instanceof Uint8Array}function $N(){let r=null;return{stream:new ReadableStream({start(n){r=n}}),push:n=>{n!=null?r==null||r.enqueue(n):(r==null||r.close(),r=null)}}}function VN(r){let e=!1,t=()=>{};return{subscribe(i){return i.then(s=>{t=s,e&&t()}),()=>{e=!0,t()}},listener:(...i)=>{e||r(...i)}}}async function zN(r,e,t,n,i){var c,u,d,g,_,y,b,p,f;const{startMessage:s,successMessage:a,failureMessage:o,spawnShellOnFailure:l=!0}=i??{};s&&((c=e.current)==null||c.write(s));try{const h=await r.spawn(t,n);h.output.pipeTo(new WritableStream({write(v){var w;(w=e.current)==null||w.write(v)}}));const m=await h.exit;if(m===0)return a&&((u=e.current)==null||u.write(a)),{exitCode:m,success:!0};{const v=`\r
|
|
620
|
+
\x1B[31m✖ ${t} ${n.join(" ")} failed (exit ${m})\x1B[0m\r
|
|
621
|
+
`;return(d=e.current)==null||d.write(o??v),l&&((g=e.current)==null||g.write(`\r
|
|
622
|
+
\x1B[33m⚠ Process failed. Spawning interactive shell for recovery...\x1B[0m\r
|
|
623
|
+
`),(_=e.current)==null||_.write(`\x1B[90m── You can fix the issue and re-run commands manually. ──\x1B[0m\r
|
|
624
|
+
\r
|
|
625
|
+
`),await((y=e.current)==null?void 0:y.spawnShell(r))),{exitCode:m,success:!1}}}catch(h){const m=h instanceof Error?h.message:String(h);return(b=e.current)==null||b.write(`\r
|
|
626
|
+
\x1B[31m✖ Failed to spawn ${t}: ${m}\x1B[0m\r
|
|
627
|
+
`),l&&((p=e.current)==null||p.write(`\r
|
|
628
|
+
\x1B[33m⚠ Spawning interactive shell for recovery...\x1B[0m\r
|
|
629
|
+
\r
|
|
630
|
+
`),await((f=e.current)==null?void 0:f.spawnShell(r))),{exitCode:-1,success:!1}}}function UN(r){const{activeTemplate:e,initialContents:t,saved:n,setFiles:i,projectId:s,projectName:a}=r,o=j.useRef(null),l=j.useRef(!1),c=j.useRef(null),u=j.useRef(!1),[d,g]=j.useState("idle"),[_,y]=j.useState(null),[b,p]=j.useState(!1),f=j.useCallback(async v=>{var E,S,x,L,P,A,k,B,N,F,H,T;let w=!1;try{await v.fs.readFile("angular.json","utf-8"),w=!0}catch{}if(!w){let R=!1;try{const O=await v.fs.readFile("package.json","utf-8"),I=JSON.parse(O);R=!!(((E=I.dependencies)==null?void 0:E["@angular/cli"])??((S=I.devDependencies)==null?void 0:S["@angular/cli"]))}catch{}if(R){(x=c.current)==null||x.write("\r\n\x1B[31m✖ This project depends on @angular/cli (Angular 6+) but is missing `angular.json`.\x1B[0m\r\n"),(L=c.current)==null||L.write(`\x1B[33m This usually means the zip was exported from CodeSandbox using the legacy
|
|
631
|
+
"angular-cli" template, which predates Angular 6 and strips \`angular.json\`.
|
|
632
|
+
Such a project cannot run anywhere — not just in vega-sandbox.
|
|
633
|
+
|
|
634
|
+
Please use a properly set up Angular project (e.g. \`ng new\`) or download
|
|
635
|
+
the source from the original repository instead of the CodeSandbox export.\x1B[0m\r
|
|
636
|
+
`),g("error"),(P=c.current)==null||P.spawnShell(v);return}}let C="dev";try{const R=await v.fs.readFile("package.json","utf-8"),I=JSON.parse(R).scripts??{},V=["dev","server","debug","start","serve"].find(U=>U in I)??Object.keys(I)[0];V&&(C=V,V!=="dev"&&((A=c.current)==null||A.write(`\x1B[33m⚠ No "dev" script found — using "${V}" instead\x1B[0m\r
|
|
637
|
+
`)))}catch{}g("starting"),(k=c.current)==null||k.write(`\r
|
|
638
|
+
\x1B[1;33m🚀 Starting dev server (${C})...\x1B[0m\r
|
|
639
|
+
`);try{const R=await v.spawn("npm",["run",C]);R.output.pipeTo(new WritableStream({write(O){var I;(I=c.current)==null||I.write(O)}})),R.exit.then(O=>{var I,$,V,U;O!==0&&((I=c.current)==null||I.write(`\r
|
|
640
|
+
\x1B[31m✖ Dev server exited with code ${O}\x1B[0m\r
|
|
641
|
+
`),($=c.current)==null||$.write(`\r
|
|
642
|
+
\x1B[33m⚠ Dev server crashed. Spawning interactive shell for recovery...\x1B[0m\r
|
|
643
|
+
`),(V=c.current)==null||V.write(`\x1B[90m── Fix the issue and restart with: npm run \${devScript} ──\x1B[0m\r
|
|
644
|
+
\r
|
|
645
|
+
`),g("error"),(U=c.current)==null||U.spawnShell(v))}),(B=c.current)==null||B.write(`\r
|
|
646
|
+
\x1B[90m── Interactive shell ready. Type commands below. ──\x1B[0m\r
|
|
647
|
+
\r
|
|
648
|
+
`),(N=c.current)==null||N.spawnShell(v)}catch(R){const O=R instanceof Error?R.message:String(R);(F=c.current)==null||F.write(`\r
|
|
649
|
+
\x1B[31m✖ Failed to start dev server: ${O}\x1B[0m\r
|
|
650
|
+
`),(H=c.current)==null||H.write(`\r
|
|
651
|
+
\x1B[33m⚠ Spawning interactive shell for recovery...\x1B[0m\r
|
|
652
|
+
\r
|
|
653
|
+
`),g("error"),(T=c.current)==null||T.spawnShell(v)}},[]),h=j.useCallback(async(v,w,C,E=!1)=>{var A,k;if(y(null),g("installing"),(A=c.current)==null||A.write(`\r
|
|
654
|
+
\x1B[1;34m📦 Loading project: ${a} (${s})...\x1B[0m\r
|
|
655
|
+
`),E){const B=await w.fs.readdir("/").catch(()=>[]);for(const N of B)N!=="node_modules"&&await w.fs.rm(N,{recursive:!0}).catch(()=>{})}const S=JSON.parse(JSON.stringify(v.files));await w.mount(S);for(const[B,N]of Object.entries(C)){const F=B.includes("/")?B.substring(0,B.lastIndexOf("/")):"";F&&await w.fs.mkdir(F,{recursive:!0}).catch(()=>{}),await w.fs.writeFile(B,N).catch(()=>{})}const x=new Set(Object.keys(C));for(const B of jg(v.files))x.has(B)||await w.fs.rm(B).catch(()=>{});(k=c.current)==null||k.write(`\x1B[32m✔ File system mounted\x1B[0m\r
|
|
656
|
+
`);const L=await _7(C["package.json"]??"");if(!await S7(w,L,B=>{var N;return(N=c.current)==null?void 0:N.write(B)})){if(!(await zN(w,c,"npm",["install","--include=optional","--ignore-scripts=false"],{startMessage:`\r
|
|
657
|
+
\x1B[1;33m📦 Running npm install...\x1B[0m\r
|
|
658
|
+
`,successMessage:`\x1B[32m✔ Dependencies installed\x1B[0m\r
|
|
659
|
+
`,failureMessage:`\r
|
|
660
|
+
\x1B[31m✖ npm install failed\x1B[0m\r
|
|
661
|
+
\x1B[33m💡 Tip: Fix the issue (e.g., update package.json) and run 'npm install' again.\x1B[0m\r
|
|
662
|
+
`})).success){g("error");return}p(!0),C7(w,L,N=>{var F;return(F=c.current)==null?void 0:F.write(N)}).finally(()=>p(!1))}await f(w)},[f,a,s]),m=j.useCallback(async()=>{var v,w,C;if(!(o.current||l.current)){l.current=!0,u.current=!0;try{(v=c.current)==null||v.write(`\r
|
|
663
|
+
\x1B[1;34m⚡ Booting WebContainer...\x1B[0m\r
|
|
664
|
+
`),n&&((w=c.current)==null||w.write(`\x1B[36m💾 Restoring saved session...\x1B[0m\r
|
|
665
|
+
`));const E=await bd.boot();o.current=E,E.on("server-ready",(S,x)=>{var L;(L=c.current)==null||L.write(`\r
|
|
666
|
+
\x1B[32m✔ Dev server ready at \x1B[4m${x}\x1B[0m\r
|
|
667
|
+
`),y(x),g("running")}),await h(e,E,t)}catch(E){(C=c.current)==null||C.write(`\r
|
|
668
|
+
\x1B[31m✖ Error: ${E}\x1B[0m\r
|
|
669
|
+
`),g("error")}finally{l.current=!1,u.current=!1}}},[e,h,t,n,y,g]);return j.useEffect(()=>{m()},[m]),j.useEffect(()=>{const v=setInterval(async()=>{if(!(!o.current||u.current))try{const w=await Qb(o.current);if(u.current)return;i(C=>{const E=w.filter(S=>!C.includes(S));return E.length>0?[...C,...E]:C})}catch{}},3e3);return()=>clearInterval(v)},[i]),{wcRef:o,termRef:c,isBootingRef:u,status:d,previewUrl:_,cacheSaving:b,setPreviewUrl:y,setStatus:g,setCacheSaving:p,boot:m,bootWithTemplate:h,startDevServer:f}}async function WN(r){const e=new CompressionStream("gzip"),t=e.writable.getWriter();t.write(new TextEncoder().encode(r)),t.close();const n=[],i=e.readable.getReader();for(;;){const{done:l,value:c}=await i.read();if(l)break;n.push(c)}const s=n.reduce((l,c)=>l+c.length,0),a=new Uint8Array(s);let o=0;for(const l of n)a.set(l,o),o+=l.length;return btoa(String.fromCharCode(...a)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function GN(r){const e=r.replace(/-/g,"+").replace(/_/g,"/"),t=atob(e),n=new Uint8Array(t.length);for(let d=0;d<t.length;d++)n[d]=t.charCodeAt(d);const i=new DecompressionStream("gzip"),s=i.writable.getWriter();s.write(n),s.close();const a=[],o=i.readable.getReader();for(;;){const{done:d,value:g}=await o.read();if(d)break;a.push(g)}const l=a.reduce((d,g)=>d+g.length,0),c=new Uint8Array(l);let u=0;for(const d of a)c.set(d,u),u+=d.length;return new TextDecoder().decode(c)}async function KN(r){return WN(JSON.stringify(r))}async function qN(r){if(!r)return null;try{const e=await GN(r);return JSON.parse(e)}catch{return null}}async function u3(r){const e=await KN(r),t=new URL(window.location.href);t.hash=e,history.replaceState(null,"",t.toString())}async function xm(){return qN(window.location.hash.slice(1))}function Tm(r){return!r||r.trim()===""?"Name cannot be empty.":r==="."||r===".."?'Name cannot be "." or "..".':r.includes("/")||r.includes("\\")?"Name cannot contain path separators (/ or \\).":null}function XN(r){const{initialFiles:e,initialContents:t,initialSelected:n,initialTabs:i,projectIdRef:s,projectNameRef:a,wcRef:o}=r,[l,c]=j.useState(e),[u,d]=j.useState(t),[g,_]=j.useState(n),[y,b]=j.useState(i),p=j.useRef({}),f=j.useCallback((L,P,A,k)=>{k7(s.current)&&(_r({id:s.current,name:a.current,files:L,fileContents:P,selectedFile:A,openTabs:k}),u3({files:L,fileContents:P,selectedFile:A,openTabs:k}))},[]),h=j.useCallback(async(L,P)=>{d(A=>{const k={...A,[L]:P};return f(l,k,g,y),k}),o.current&&await o.current.fs.writeFile(L,P)},[l,g,y,f,o]);j.useEffect(()=>{function L(P){if((P.ctrlKey||P.metaKey)&&P.key==="s"){P.preventDefault(),P.stopPropagation();const A=p.current[g];A!==void 0&&h(g,A)}}return window.addEventListener("keydown",L,!0),()=>window.removeEventListener("keydown",L,!0)},[g,h]);const m=j.useCallback(async L=>{const P=p.current[g],A=u[g];P!==void 0&&P!==A&&await h(g,P),_(L),b(k=>k.includes(L)?k:[...k,L])},[g,h,u]),v=j.useCallback(async(L,P)=>{P.stopPropagation();const A=p.current[L],k=u[L];A!==void 0&&A!==k&&await h(L,A),b(B=>{const N=B.filter(H=>H!==L);let F=g;return g===L&&N.length>0?(F=N[Math.min(B.indexOf(L),N.length-1)],_(F)):N.length===0&&(F="",_("")),N})},[g,h,u]),w=j.useCallback(async L=>{const P=await Gl({title:"New file",message:L?`Enter a name for the new file (will be created under ${L}).`:"Enter the path for the new file (relative to project root).",defaultValue:L?"index.jsx":"src/MyComponent.jsx",confirmLabel:"Create"});if(!P)return;const A=P.startsWith("/")?P.slice(1):P;if(L){const F=Tm(A);if(F){await Gl({title:"Invalid file name",message:F,confirmLabel:"OK"});return}}const k=L?`${L}/${A}`:A,B={...u,[k]:""},N=[...l,k];d(B),c(N),o.current&&await o.current.fs.writeFile(k,""),b(F=>{const H=F.includes(k)?F:[...F,k];return f(N,B,k,H),H}),_(k),p.current[k]=""},[u,l,f,o]),C=j.useCallback(async L=>{const P=await Gl({title:"New folder",message:L?`Enter a name for the new folder (will be created under ${L}).`:"Enter the path for the new folder (relative to project root).",defaultValue:L?"components":"src/components",confirmLabel:"Create"});if(!P)return;const A=P.startsWith("/")?P.slice(1):P;if(L){const H=Tm(A);if(H){await Gl({title:"Invalid folder name",message:H,confirmLabel:"OK"});return}}const k=L?`${L}/${A}`:A,B=`${k}/.gitkeep`,N={...u,[B]:""},F=[...l,B];d(N),c(F),o.current&&(await o.current.fs.mkdir(k,{recursive:!0}),await o.current.fs.writeFile(B,"")),f(F,N,g,y)},[u,l,g,y,f,o]),E=j.useCallback(async(L,P)=>{const A=L.includes("/")?L.substring(0,L.lastIndexOf("/")):"",k=A?`${A}/${P}`:P;if(l.some(N=>N.startsWith(L+"/"))){const N=L+"/",F=k+"/",H={},T={};o.current&&await o.current.fs.mkdir(k,{recursive:!0});const R=new Set;for(const V of l)if(V.startsWith(N)){const U=F+V.substring(N.length),G=U.lastIndexOf("/");G>0&&R.add(U.substring(0,G))}if(o.current)for(const V of R)await o.current.fs.mkdir(V,{recursive:!0}).catch(()=>{});for(const V of l)if(V.startsWith(N)){const U=V.substring(N.length),G=F+U;H[G]=u[V]??"",T[G]=p.current[V]??u[V]??"",o.current&&await o.current.fs.writeFile(G,u[V]??"")}else H[V]=u[V]??"";if(o.current)try{await o.current.fs.rm(L,{recursive:!0})}catch{}for(const V of Object.keys(p.current))V.startsWith(N)&&delete p.current[V];Object.assign(p.current,T);const O=l.map(V=>V.startsWith(N)?F+V.substring(N.length):V),I=y.map(V=>V.startsWith(N)?F+V.substring(N.length):V),$=g.startsWith(N)?F+g.substring(N.length):g;d(H),c(O),b(I),_($),f(O,H,$,I)}else{const N=u[L]??"";o.current&&(await o.current.fs.writeFile(k,N),await o.current.fs.rm(L)),p.current[k]=p.current[L]??N,delete p.current[L];const F={...u,[k]:N};delete F[L];const H=l.map(O=>O===L?k:O),T=y.map(O=>O===L?k:O),R=g===L?k:g;d(F),c(H),b(T),_(R),f(H,F,R,T)}},[u,l,y,g,f,o]),S=j.useCallback(async L=>{if(l.some(A=>A.startsWith(L+"/"))){const A=L+"/";o.current&&await o.current.fs.rm(L,{recursive:!0});for(const H of Object.keys(p.current))H.startsWith(A)&&delete p.current[H];const k={};for(const H of Object.keys(u))H.startsWith(A)||(k[H]=u[H]);const B=l.filter(H=>!H.startsWith(A)),N=y.filter(H=>!H.startsWith(A)),F=g.startsWith(A)?N[0]??"":g;d(k),c(B),b(N),_(F),f(B,k,F,N)}else{o.current&&await o.current.fs.rm(L),delete p.current[L];const A={...u};delete A[L];let k=l.filter(H=>H!==L);const B=y.filter(H=>H!==L),N=g===L?B[0]??"":g,F=L.includes("/")?L.substring(0,L.lastIndexOf("/")):"";if(F){const H=F+"/";if(!k.some(R=>R.startsWith(H))){const R=`${F}/.gitkeep`;k=[...k,R],A[R]="",o.current&&await o.current.fs.writeFile(R,"")}}d(A),c(k),b(B),_(N),f(k,A,N,B)}},[u,l,y,g,f,o]),x=j.useCallback(async L=>{console.log("[useEditorState] handleBulkAddFiles called",{newFilesCount:Object.keys(L).length,paths:Object.keys(L)});const P=[...l,...Object.keys(L).filter(k=>!l.includes(k))],A={...u,...L};if(d(A),c(P),console.log("[useEditorState] State updated",{totalFiles:P.length,addedFiles:P.length-l.length}),o.current){console.log("[useEditorState] Writing files to WebContainer...");for(const[k,B]of Object.entries(L)){const N=k.split("/");if(N.length>1){const F=N.slice(0,-1).join("/");try{await o.current.fs.mkdir(F,{recursive:!0})}catch{}}await o.current.fs.writeFile(k,B),console.log(`[useEditorState] Wrote file: ${k}`)}console.log("[useEditorState] All files written to WebContainer")}else console.warn("[useEditorState] WebContainer not available");f(P,A,g,y),console.log("[useEditorState] handleBulkAddFiles completed")},[u,l,g,y,f,o]);return{files:l,fileContents:u,selectedFile:g,openTabs:y,tabValuesRef:p,setFiles:c,setFileContents:d,setSelectedFile:_,setOpenTabs:b,persistState:f,saveCurrentFile:h,handleFileSelect:m,handleTabClose:v,handleNewFile:w,handleNewFolder:C,handleRename:E,handleDelete:S,handleBulkAddFiles:x}}function ZN(r){const e=r["sandbox.config.json"];if(e)try{const n=JSON.parse(e);if(n&&n.template==="static")return!0}catch{}const t=r["sandbox.config.js"];return!!(t&&/template\s*:\s*['"]static['"]/.test(t))}const YN=({files:r,fileContents:e})=>{const t=e["package.json"];if(!t)return{files:r,fileContents:e};let n;try{n=JSON.parse(t)}catch{return{files:r,fileContents:e}}const i=n.scripts??{},s=typeof i.dev=="string"&&i.dev.trim().length>0,a=r.includes("index.html");if(!(ZN(e)||!s&&a))return{files:r,fileContents:e};const u={...n.devDependencies??{}};"vite"in u||(u.vite="^7");const d={...i,dev:"vite --host"},g={...n,type:"module",scripts:d,devDependencies:u};return{files:r,fileContents:{...e,"package.json":JSON.stringify(g,null,2)}}},h3=[YN],JN=["node_modules/",".git/"],QN=[".gitkeep"];function Wg(r){return QN.includes(r.split("/").pop()??"")?!0:JN.some(e=>r.startsWith(e))}function eI(r,e){if(r.length===0)return{files:r,fileContents:e};const t=r[0].split("/")[0];if(!r.every(a=>a.startsWith(t+"/"))||t==="src")return{files:r,fileContents:e};const i=[],s={};for(const a of r){const o=a.slice(t.length+1);o&&(i.push(o),s[o]=e[a])}return{files:i,fileContents:s}}function tI(r,e="vega-sandbox"){const t={};for(const[o,l]of Object.entries(r))Wg(o)||(t[o]=Za(l));const n=g7(t,{level:6}),i=new Blob([n.buffer],{type:"application/zip"}),s=URL.createObjectURL(i),a=document.createElement("a");a.href=s,a.download=`${e}.zip`,a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s)}async function Gg(r){const e=await r.arrayBuffer(),t=v7(new Uint8Array(e)),n=[],i={};for(const[a,o]of Object.entries(t))if(!a.endsWith("/")&&!Wg(a))try{const l=mb(o),c=a.startsWith("./")?a.slice(2):a;n.push(c),i[c]=l}catch{}const s=eI(n,i);if(s.fileContents["package.json"]!==void 0){const a=s.fileContents["package.json"].trim();if(!a)throw new Error("package.json in ZIP is empty");try{JSON.parse(a)}catch{throw new Error("package.json in ZIP is not valid JSON")}}return h3.reduce((a,o)=>o(a),s)}function f3(){return new Promise(r=>{const e=document.createElement("input");e.type="file",e.accept=".zip",e.style.display="none",document.body.appendChild(e);const t=()=>document.body.removeChild(e);e.onchange=()=>{var n;r(((n=e.files)==null?void 0:n[0])??null),t()},e.oncancel=()=>{r(null),t()},e.click()})}async function rI(){if(!("showDirectoryPicker"in window))return null;try{return await window.showDirectoryPicker()}catch{return null}}async function p3(r,e=""){const t=[],n={};for await(const i of r.values()){const s=e?`${e}/${i.name}`:i.name;if(!Wg(s)){if(i.kind==="file")try{const l=await(await i.getFile()).text();t.push(s),n[s]=l}catch{}else if(i.kind==="directory"){const o=await p3(i,s);t.push(...o.files),Object.assign(n,o.fileContents)}}}return{files:t,fileContents:n}}async function nI(r){const{files:e,fileContents:t}=await p3(r);if(t["package.json"]!==void 0){const n=t["package.json"].trim();if(!n)throw new Error("package.json in folder is empty");try{JSON.parse(n)}catch{throw new Error("package.json in folder is not valid JSON")}}return h3.reduce((n,i)=>i(n),{files:e,fileContents:t})}function iI(r){const{initialProjectId:e,initialProjectName:t,saved:n,savedTemplate:i,editor:s,projectIdRef:a,projectNameRef:o}=r,[l]=j.useState(e),[c]=j.useState(t),[u]=j.useState(i),[d,g]=j.useState(!1),[_,y]=j.useState(!1),[b,p]=j.useState(!!n),[f,h]=j.useState(!1),[m,v]=j.useState("idle");a.current=l,o.current=c;const w=j.useRef(u);w.current=u,j.useEffect(()=>{const A=k=>{if(k.key!=="vega-sandbox-projects"&&k.key!==null)return;if(!Ti().some(N=>N.id===a.current)){const N=new URL(window.location.origin+window.location.pathname);N.searchParams.delete("project"),window.location.replace(N.toString())}};return window.addEventListener("storage",A),()=>window.removeEventListener("storage",A)},[]),j.useEffect(()=>{const A=new URL(window.location.href);A.searchParams.set("project",l),window.history.replaceState(null,"",A.toString())},[l]),j.useEffect(()=>{const A=async()=>{const k=new URLSearchParams(window.location.search).get("project");if(k&&k!==a.current){window.location.reload();return}const B=await xm();B&&(s.setFiles(B.files),s.setFileContents(B.fileContents),s.setSelectedFile(B.selectedFile),s.setOpenTabs(B.openTabs),p(!0),_r({id:a.current,name:o.current,files:B.files,fileContents:B.fileContents,selectedFile:B.selectedFile,openTabs:B.openTabs}))};return window.addEventListener("hashchange",A),()=>window.removeEventListener("hashchange",A)},[]),j.useEffect(()=>{xm().then(A=>{A?(s.setFiles(A.files),s.setFileContents(A.fileContents),s.setSelectedFile(A.selectedFile),s.setOpenTabs(A.openTabs),p(!0),_r({id:a.current,name:o.current,files:A.files,fileContents:A.fileContents,selectedFile:A.selectedFile,openTabs:A.openTabs})):u3({files:s.files,fileContents:s.fileContents,selectedFile:s.selectedFile,openTabs:s.openTabs})})},[]);const C=j.useCallback(async()=>{await navigator.clipboard.writeText(window.location.href),h(!0),setTimeout(()=>h(!1),2e3)},[]),E=j.useCallback(()=>{let A=c.toLowerCase().replace(/\s+/g,"-");try{const k=s.fileContents["package.json"];if(k){const B=JSON.parse(k);B.name&&typeof B.name=="string"&&(A=B.name)}}catch{}tI(s.fileContents,A)},[s.fileContents,c]),S=j.useCallback(()=>{const A=`${c} (copy)`,k=_r({name:A,files:s.files,fileContents:s.fileContents,selectedFile:s.selectedFile,openTabs:s.openTabs}),B=new URL(window.location.origin+window.location.pathname);B.searchParams.set("project",k.id),window.open(B.toString(),"_blank")},[c,s.files,s.fileContents,s.selectedFile,s.openTabs]),x=j.useCallback(A=>{const k=new URL(window.location.origin+window.location.pathname);k.searchParams.set("project",A),window.open(k.toString(),"_blank")},[]),L=j.useCallback(A=>{g(!1);const{allFiles:k,contents:B}=Qa(A),N=_r({name:A.name,files:k,fileContents:B,selectedFile:A.entryFile,openTabs:[A.entryFile]}),F=new URL(window.location.origin+window.location.pathname);F.searchParams.set("project",N.id),window.open(F.toString(),"_blank")},[]),P=j.useCallback(async()=>{const A=await f3();if(!A)return;v("importing");const k=A.name.replace(/\.zip$/i,"");try{const{files:B,fileContents:N}=await Gg(A);if(B.length===0)throw new Error("No text files found in ZIP");const F=B.find(R=>R==="src/App.jsx"||R==="src/App.tsx"||R==="src/App.vue")??B.find(R=>R==="index.html")??B[0],H=_r({name:k,files:B,fileContents:N,selectedFile:F,openTabs:[F]}),T=new URL(window.location.origin+window.location.pathname);T.searchParams.set("project",H.id),window.open(T.toString(),"_blank"),v("done"),setTimeout(()=>v("idle"),3e3)}catch(B){console.error("ZIP import failed:",B),v("error"),setTimeout(()=>v("idle"),3e3)}},[]);return{currentProjectId:l,projectName:c,activeTemplate:u,showTemplatePicker:d,setShowTemplatePicker:g,showProjectManager:_,setShowProjectManager:y,restoredFromSave:b,copyToast:f,importStatus:m,setImportStatus:v,handleCopyLink:C,handleCloneProject:S,handleExportZip:E,handleSwitchProject:x,handleSelectTemplate:L,handleImportZip:P}}function sI(r){const{setImportStatus:e}=r,[t,n]=j.useState(!1),i=j.useCallback(o=>{Array.from(o.dataTransfer.items).some(c=>c.kind==="file"&&(c.type==="application/zip"||c.type==="application/x-zip-compressed"))&&(o.preventDefault(),n(!0))},[]),s=j.useCallback(()=>n(!1),[]),a=j.useCallback(async o=>{o.preventDefault(),n(!1);const l=Array.from(o.dataTransfer.files).find(c=>c.name.endsWith(".zip"));if(l){e("importing");try{const{files:c,fileContents:u}=await Gg(l);if(c.length===0)throw new Error("No text files found");const d=c.find(b=>b==="src/App.jsx"||b==="src/App.tsx"||b==="src/App.vue")??c.find(b=>b==="index.html")??c[0],g=l.name.replace(/\.zip$/i,""),_=_r({name:g,files:c,fileContents:u,selectedFile:d,openTabs:[d]}),y=new URL(window.location.origin+window.location.pathname);y.searchParams.set("project",_.id),window.open(y.toString(),"_blank"),e("done"),setTimeout(()=>e("idle"),3e3)}catch{e("error"),setTimeout(()=>e("idle"),3e3)}}},[e]);return{isDraggingZip:t,handleDragOver:i,handleDragLeave:s,handleDrop:a}}const oI=180,aI=.8,lI=120,cI=.4,dI=100,uI=600;function hI(){const[r,e]=j.useState(null),[t,n]=j.useState(null),[i,s]=j.useState(null),[a,o]=j.useState(!1),l=j.useRef(!1),c=j.useRef(0),u=j.useRef(0),d=j.useCallback(v=>{v.preventDefault(),l.current=!0,o(!0),c.current=v.clientX;const w=v.currentTarget.parentElement;u.current=w?w.getBoundingClientRect().width:480;const C=S=>{if(!l.current)return;const x=c.current-S.clientX,L=u.current+x,P=Math.min(Math.max(L,oI),window.innerWidth*aI);e(P)},E=()=>{l.current=!1,o(!1),window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",E)};window.addEventListener("mousemove",C),window.addEventListener("mouseup",E)},[]),g=j.useRef(!1),_=j.useRef(0),y=j.useRef(0),b=j.useCallback(v=>{v.preventDefault(),g.current=!0,o(!0),_.current=v.clientX;const w=v.currentTarget.parentElement;y.current=w?w.getBoundingClientRect().width:200;const C=S=>{if(!g.current)return;const x=S.clientX-_.current,L=y.current+x,P=Math.min(Math.max(L,lI),window.innerWidth*cI);n(P)},E=()=>{g.current=!1,o(!1),window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",E)};window.addEventListener("mousemove",C),window.addEventListener("mouseup",E)},[]),p=j.useRef(!1),f=j.useRef(0),h=j.useRef(0),m=j.useCallback(v=>{v.preventDefault(),p.current=!0,o(!0),f.current=v.clientY;const C=v.currentTarget.nextElementSibling;h.current=C?C.getBoundingClientRect().height:220;const E=x=>{if(!p.current)return;const L=f.current-x.clientY,P=h.current+L,A=Math.min(Math.max(P,dI),uI);s(A)},S=()=>{p.current=!1,o(!1),window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",S)};window.addEventListener("mousemove",E),window.addEventListener("mouseup",S)},[]);return{previewWidth:r,sidebarWidth:t,terminalHeight:i,isDragging:a,handleDraggerMouseDown:d,handleSidebarDraggerMouseDown:b,handleTerminalDraggerMouseDown:m}}function km(r){return Qa(r).allFiles}function fI(r){const e=new URLSearchParams(window.location.search).get("project"),t=(()=>{const c=e??A7();if(c){const d=Cb(c);if(d)return dh(c),d}const u=Eb();return u?(dh(u.id),u):null})(),n=r,i=t?t.files:km(r),s=t?t.fileContents:Qa(r).contents,a=t?t.selectedFile:r.entryFile,o=t?t.openTabs:[r.entryFile],l=(t==null?void 0:t.id)??(()=>{const c=_r({name:r.name,files:km(r),fileContents:Qa(r).contents,selectedFile:r.entryFile,openTabs:[r.entryFile]});return dh(c.id),c.id})();return{saved:t,savedTemplate:n,initialFiles:i,initialContents:s,initialSelected:a,initialTabs:o,initialProjectId:l}}function pI(){const r=pN(),e=zf[0],t=j.useRef(fI(e)),{saved:n,savedTemplate:i,initialFiles:s,initialContents:a,initialSelected:o,initialTabs:l,initialProjectId:c}=t.current,u=j.useRef(c),d=j.useRef((n==null?void 0:n.name)??e.name),g=j.useRef(()=>{}),_=j.useCallback(O=>{g.current(O)},[]),y=UN({activeTemplate:i,initialContents:a,saved:n,setFiles:_,projectId:c,projectName:(n==null?void 0:n.name)??e.name}),b=XN({initialFiles:s,initialContents:a,initialSelected:o,initialTabs:l,projectIdRef:u,projectNameRef:d,wcRef:y.wcRef});g.current=b.setFiles;const p=iI({initialProjectId:c,initialProjectName:(n==null?void 0:n.name)??e.name,saved:n,savedTemplate:i,editor:b,projectIdRef:u,projectNameRef:d}),f=sI({setImportStatus:p.setImportStatus}),{previewWidth:h,sidebarWidth:m,terminalHeight:v,isDragging:w,handleDraggerMouseDown:C,handleSidebarDraggerMouseDown:E,handleTerminalDraggerMouseDown:S}=hI();j.useEffect(()=>{const{dispose:O}=D7(p.currentProjectId),I=I7(p.currentProjectId,()=>{try{window.focus()}catch{}});return()=>{O(),I()}},[p.currentProjectId]);const[x,L]=j.useState(!1),[P,A]=j.useState(!1),[k,B]=j.useState(!1),N=j.useRef(null),F=j.useRef(null);j.useEffect(()=>{function O(I){if((I.ctrlKey||I.metaKey)&&!I.shiftKey&&I.key.toLowerCase()==="p"&&(I.preventDefault(),L(!0)),(I.ctrlKey||I.metaKey)&&I.shiftKey&&I.key.toLowerCase()==="f"&&(I.preventDefault(),A($=>!$)),I.key==="?"&&!I.ctrlKey&&!I.metaKey&&!I.altKey){const $=I.target,V=$==null?void 0:$.tagName;V==="INPUT"||V==="TEXTAREA"||V==="SELECT"||($==null?void 0:$.isContentEditable)===!0||(I.preventDefault(),B(G=>!G))}}return window.addEventListener("keydown",O,!0),()=>window.removeEventListener("keydown",O,!0)},[]);const H=j.useCallback((O,I)=>{b.saveCurrentFile(O,I)},[b]),T=j.useCallback(async(O,I)=>{var $,V,U;O===b.selectedFile?(($=N.current)==null||$.revealLineInCenter(I),(V=N.current)==null||V.setPosition({lineNumber:I,column:1}),(U=N.current)==null||U.focus()):(F.current=I,await b.handleFileSelect(O))},[b]),R=j.useMemo(()=>aR(b.fileContents),[b.fileContents]);return M.jsxs("div",{className:xe.root,"data-cache-saving":y.cacheSaving||void 0,onDragOver:f.handleDragOver,onDragLeave:f.handleDragLeave,onDrop:f.handleDrop,children:[f.isDraggingZip&&M.jsx("div",{className:xe.dropOverlay,children:M.jsxs("div",{className:xe.dropMessage,children:[M.jsx(be,{name:"package",size:20})," Drop ZIP to import sandbox"]})}),x&&M.jsx(wD,{files:b.files,onSelect:b.handleFileSelect,onClose:()=>L(!1)}),k&&M.jsx(HD,{onClose:()=>B(!1)}),p.showTemplatePicker&&M.jsx(Qy,{templates:zf,onSelect:p.handleSelectTemplate,onClose:()=>p.setShowTemplatePicker(!1)}),p.showProjectManager&&M.jsx(sR,{currentProjectId:p.currentProjectId,onSelect:p.handleSwitchProject,onNewProject:()=>p.setShowTemplatePicker(!0),onClose:()=>p.setShowProjectManager(!1)}),!r.embed&&M.jsx(WR,{projectName:p.projectName,status:y.status,restoredFromSave:p.restoredFromSave,copyToast:p.copyToast,shareFeasibility:R,importStatus:p.importStatus,onProjectNameClick:()=>p.setShowProjectManager(!0),onCloneProject:p.handleCloneProject,onImportZip:p.handleImportZip,onExportZip:p.handleExportZip,onCopyLink:p.handleCopyLink,onShowHelp:()=>B(!0)}),M.jsxs("div",{className:xe.layout,style:h!==null||m!==null||P?{gridTemplateColumns:`${m??200}px${P?" 280px":""} 1fr ${h!==null?`${h}px`:"1fr"}`}:void 0,children:[!r.hideTree&&M.jsxs("div",{className:xe.sidebar,children:[M.jsx(RA,{files:b.files,selectedFile:b.selectedFile,onSelect:b.handleFileSelect,onNewFile:b.handleNewFile,onNewFolder:b.handleNewFolder,onRename:b.handleRename,onDelete:b.handleDelete,disabled:y.status==="installing",onFileDrop:b.handleBulkAddFiles}),M.jsx("div",{className:`${xe.sidebarDragger} ${w?xe.draggerActive:""}`,onMouseDown:E,title:"Drag to resize explorer"})]}),P&&M.jsx(fN,{fileContents:b.fileContents,onOpenFile:T,onReplaceInFile:H,onClose:()=>A(!1)}),M.jsx(lD,{openTabs:b.openTabs,selectedFile:b.selectedFile,fileContents:b.fileContents,tabValuesRef:b.tabValuesRef,readOnly:r.readOnly||y.status==="installing",hideTerminal:r.hideTerminal,termRef:y.termRef,terminalHeight:v,isDragging:w,handleTerminalDraggerMouseDown:S,monacoEditorRef:N,pendingRevealLineRef:F,onSelectTab:b.handleFileSelect,onCloseTab:b.handleTabClose}),M.jsxs("div",{className:xe.previewPane,children:[M.jsx("div",{className:`${xe.dragger} ${w?xe.draggerActive:""}`,onMouseDown:C,title:"Drag to resize preview"}),M.jsx(WA,{url:y.previewUrl,loading:y.status==="installing"||y.status==="starting",pointerEventsDisabled:w})]})]})]})}const gI="_overlay_te6sr_1",mI="_modal_te6sr_11",vI="_header_te6sr_20",_I="_title_te6sr_27",yI="_closeBtn_te6sr_33",bI="_grid_te6sr_47",wI="_card_te6sr_53",SI="_disabled_te6sr_70",CI="_icon_te6sr_80",EI="_name_te6sr_84",xI="_desc_te6sr_90",TI="_badge_te6sr_96",Ft={overlay:gI,modal:mI,header:vI,title:_I,closeBtn:yI,grid:bI,card:wI,disabled:SI,icon:CI,name:EI,desc:xI,badge:TI};function kI({onSelectZip:r,onSelectFolder:e,onClose:t,supportsFolderPicker:n}){return M.jsx("div",{className:Ft.overlay,onClick:t,children:M.jsxs("div",{className:Ft.modal,onClick:i=>i.stopPropagation(),children:[M.jsxs("div",{className:Ft.header,children:[M.jsx("h2",{className:Ft.title,children:"Import Project"}),M.jsx("button",{className:Ft.closeBtn,onClick:t,title:"Close",children:"✕"})]}),M.jsxs("div",{className:Ft.grid,children:[M.jsxs("button",{className:`${Ft.card} ${n?"":Ft.disabled}`,onClick:n?e:void 0,disabled:!n,children:[M.jsx("span",{className:Ft.icon,children:"📁"}),M.jsx("span",{className:Ft.name,children:"Folder"}),M.jsx("span",{className:Ft.desc,children:"Select a folder from your computer"}),!n&&M.jsx("span",{className:Ft.badge,children:"Requires Chrome 86+ / Safari 15.2+"})]}),M.jsxs("button",{className:Ft.card,onClick:r,children:[M.jsx("span",{className:Ft.icon,children:"📦"}),M.jsx("span",{className:Ft.name,children:"ZIP File"}),M.jsx("span",{className:Ft.desc,children:"Select a .zip archive"})]})]})]})})}const LI="_root_5nk1y_1",AI="_container_5nk1y_13",RI="_header_5nk1y_21",OI="_title_5nk1y_27",DI="_subtitle_5nk1y_34",NI="_section_5nk1y_40",II="_sectionTitle_5nk1y_46",BI="_actions_5nk1y_58",MI="_actionBtn_5nk1y_64",PI="_actionIcon_5nk1y_94",FI="_actionLabel_5nk1y_103",HI="_actionHint_5nk1y_109",jI="_error_5nk1y_114",$I="_empty_5nk1y_126",VI="_projectList_5nk1y_135",at={root:LI,container:AI,header:RI,title:OI,subtitle:DI,section:NI,sectionTitle:II,actions:BI,actionBtn:MI,actionIcon:PI,actionLabel:FI,actionHint:HI,error:jI,empty:$I,projectList:VI};function zI(r){const e=Date.now()-r,t=Math.floor(e/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;const n=Math.floor(t/60);return n<24?`${n}h ago`:`${Math.floor(n/24)}d ago`}function g3(r){const e=new URL(window.location.origin+window.location.pathname);return e.searchParams.set("project",r),e.toString()}function Sh(r){window.open(g3(r),"_blank"),window.close()}function UI(){const{projects:r,openTabs:e,refresh:t}=Lb(),[n,i]=j.useState(!1),[s,a]=j.useState(!1),[o,l]=j.useState(!1),[c,u]=j.useState(null),d=h=>{i(!1);const{allFiles:m,contents:v}=Qa(h),w=_r({name:h.name,files:m,fileContents:v,selectedFile:h.entryFile,openTabs:[h.entryFile]});Sh(w.id)},g=async()=>{const h=await f3();if(!h)return;l(!0),u(null);const m=h.name.replace(/\.zip$/i,"");try{const{files:v,fileContents:w}=await Gg(h);if(v.length===0)throw new Error("No text files found in ZIP");const C=v.find(S=>S==="src/App.jsx"||S==="src/App.tsx"||S==="src/App.vue")??v.find(S=>S==="index.html")??v[0],E=_r({name:m,files:v,fileContents:w,selectedFile:C,openTabs:[C]});Sh(E.id)}catch(v){console.error("ZIP import failed:",v),u(v instanceof Error?v.message:"Import failed")}finally{l(!1)}},_=async()=>{const h=await rI();if(!h)return;l(!0),u(null);const m=h.name;try{const{files:v,fileContents:w}=await nI(h);if(v.length===0)throw new Error("No text files found in folder");const C=v.find(S=>S==="src/App.jsx"||S==="src/App.tsx"||S==="src/App.vue")??v.find(S=>S==="index.html")??v[0],E=_r({name:m,files:v,fileContents:w,selectedFile:C,openTabs:[C]});Sh(E.id)}catch(v){console.error("Folder import failed:",v),u(v instanceof Error?v.message:"Import failed")}finally{l(!1)}},y=()=>{a(!0)},b=async()=>{a(!1),await g()},p=async()=>{a(!1),await _()},f=h=>{if(e[h.id]){kb(h.id),window.close();return}window.location.replace(g3(h.id))};return M.jsxs("div",{className:at.root,children:[M.jsxs("div",{className:at.container,children:[M.jsxs("header",{className:at.header,children:[M.jsx("h1",{className:at.title,children:"Vega Sandbox"}),M.jsx("p",{className:at.subtitle,children:"An in-browser playground for Vega templates and quick prototypes."})]}),M.jsxs("section",{className:at.section,children:[M.jsx("h2",{className:at.sectionTitle,children:"Start"}),M.jsxs("div",{className:at.actions,children:[M.jsxs("button",{className:at.actionBtn,onClick:()=>i(!0),children:[M.jsx("span",{className:at.actionIcon,children:M.jsx(be,{name:"add",size:20})}),M.jsx("span",{className:at.actionLabel,children:"New Project…"}),M.jsx("span",{className:at.actionHint,children:"Choose a template"})]}),M.jsxs("button",{className:at.actionBtn,onClick:y,disabled:o,children:[M.jsx("span",{className:at.actionIcon,children:M.jsx(be,{name:"package",size:20})}),M.jsx("span",{className:at.actionLabel,children:o?"Importing…":"Import Project…"}),M.jsx("span",{className:at.actionHint,children:"Import from ZIP or folder"})]})]}),c&&M.jsxs("div",{className:at.error,children:[M.jsx(be,{name:"warning"})," ",c]})]}),M.jsxs("section",{className:at.section,children:[M.jsxs("h2",{className:at.sectionTitle,children:[M.jsx(vl,{})," Recent Projects"]}),r.length===0?M.jsx("div",{className:at.empty,children:"No saved projects yet — create one to get started."}):M.jsx("div",{className:at.projectList,children:r.map(h=>M.jsx(Ab,{project:h,isCurrent:!1,isOpenElsewhere:!!e[h.id],timeLabel:zI(h.updatedAt),variant:"welcome",onOpen:f,onMutated:t},h.id))})]})]}),n&&M.jsx(Qy,{templates:zf,onSelect:d,onClose:()=>i(!1)}),s&&M.jsx(kI,{onSelectZip:b,onSelectFolder:p,onClose:()=>a(!1),supportsFolderPicker:"showDirectoryPicker"in window})]})}aL();function WI(){if(window.location.hash)return!1;const r=new URLSearchParams(window.location.search).get("project");return!(r&&Ti().some(e=>e.id===r))}const Lm=W2(document.getElementById("root"));if(WI()){const r=Eb();if(r){const e=new URL(window.location.origin+window.location.pathname);e.searchParams.set("project",r.id),window.location.replace(e.toString())}else Lm.render(M.jsxs(j.StrictMode,{children:[M.jsx(UI,{}),M.jsx(nm,{})]}))}else Lm.render(M.jsxs(j.StrictMode,{children:[M.jsx(pI,{}),M.jsx(nm,{})]}));export{uP as $,bB as A,Zt as B,Ke as C,rn as D,xM as E,qI as F,TM as G,oC as H,IC as I,wx as J,br as K,rt as L,c_ as M,rE as N,dl as O,cl as P,DP as Q,OP as R,Ku as S,BM as T,MB as U,E0 as V,aB as W,m5 as X,Se as Y,b0 as Z,w0 as _,ol as a,b_ as a$,XB as a0,EP as a1,hP as a2,OB as a3,$l as a4,z5 as a5,U5 as a6,V5 as a7,PB as a8,wB as a9,zB as aA,fP as aB,TE as aC,xE as aD,S_ as aE,jx as aF,DM as aG,RM as aH,OM as aI,vB as aJ,iE as aK,MC as aL,d_ as aM,BC as aN,qi as aO,JM as aP,R_ as aQ,QM as aR,A_ as aS,mP as aT,gP as aU,GE as aV,ox as aW,P5 as aX,XE as aY,Gp as aZ,JE as a_,SB as aa,xB as ab,y_ as ac,sB as ad,$B as ae,Lf as af,jB as ag,Y as ah,qu as ai,tE as aj,Ok as ak,v5 as al,Fi as am,gc as an,Wo as ao,L0 as ap,A0 as aq,R0 as ar,O0 as as,S0 as at,eE as au,Q5 as av,vr as aw,eM as ax,wy as ay,Dk as az,bt as b,_E as b$,Zu as b0,PE as b1,ix as b2,YM as b3,HM as b4,QE as b5,FM as b6,ZM as b7,PM as b8,MM as b9,tP as bA,eP as bB,ux as bC,wP as bD,_0 as bE,C_ as bF,Ik as bG,TP as bH,Ks as bI,VB as bJ,td as bK,Q as bL,nB as bM,KB as bN,GB as bO,Kp as bP,hM as bQ,lM as bR,J5 as bS,dM as bT,uM as bU,hB as bV,pE as bW,fE as bX,QB as bY,tM as bZ,mE as b_,XM as ba,T_ as bb,vP as bc,ax as bd,x_ as be,KM as bf,nP as bg,dP as bh,F5 as bi,qM as bj,_B as bk,Wi as bl,pP as bm,M5 as bn,cP as bo,B5 as bp,lP as bq,N5 as br,aP as bs,D5 as bt,oP as bu,O5 as bv,iP as bw,uB as bx,rP as by,I5 as bz,KI as c,pB as c$,yE as c0,fB as c1,xP as c2,De as c3,Pe as c4,_c as c5,Gx as c6,$t as c7,ce as c8,bi as c9,EB as cA,bE as cB,k0 as cC,Fe as cD,jM as cE,CE as cF,$5 as cG,VM as cH,$M as cI,tx as cJ,ex as cK,EE as cL,LM as cM,yP as cN,ia as cO,AM as cP,HB as cQ,bP as cR,fM as cS,wf as cT,mB as cU,gB as cV,cB as cW,dB as cX,EM as cY,k_ as cZ,nx as c_,nt as ca,ur as cb,nn as cc,Je as cd,R6 as ce,gM as cf,d4 as cg,f4 as ch,ng as ci,ue as cj,J as ck,ld as cl,jd as cm,w_ as cn,ye as co,t4 as cp,q as cq,Yt as cr,kf as cs,NM as ct,F0 as cu,wE as cv,pt as cw,y0 as cx,IB as cy,NB as cz,pl as d,rg as d$,SP as d0,CP as d1,E_ as d2,nE as d3,kM as d4,BB as d5,CB as d6,TB as d7,lB as d8,rx as d9,WM as dA,dE as dB,uE as dC,gE as dD,hE as dE,LE as dF,N0 as dG,qB as dH,CM as dI,wM as dJ,Yu as dK,nd as dL,id as dM,bM as dN,IM as dO,GM as dP,UM as dQ,Oa as dR,Da as dS,Kx as dT,LP as dU,vE as dV,kE as dW,$d as dX,te as dY,we as dZ,P_ as d_,vc as da,zM as db,UB as dc,FB as dd,f5 as de,yB as df,rM as dg,C0 as dh,UE as di,jt as dj,ri as dk,my as dl,bn as dm,Le as dn,G6 as dp,hy as dq,ti as dr,Nt as ds,Dt as dt,dd as du,RP as dv,Wt as dw,z6 as dx,AP as dy,na as dz,g5 as e,qp as e$,j_ as e0,V_ as e1,z_ as e2,Er as e3,$a as e4,Tr as e5,F_ as e6,$_ as e7,a4 as e8,ag as e9,sM as eA,oE as eB,SM as eC,cE as eD,_M as eE,vM as eF,mM as eG,yM as eH,LB as eI,AB as eJ,RB as eK,ZB as eL,YB as eM,kB as eN,JB as eO,pM as eP,_P as eQ,q5 as eR,Y5 as eS,W5 as eT,G5 as eU,K5 as eV,X5 as eW,Z5 as eX,Bx as eY,Ju as eZ,Wp as e_,Ye as ea,wr as eb,Re as ec,oM as ed,aM as ee,cM as ef,Ve as eg,ig as eh,_e as ei,sT as ej,Ei as ek,de as el,B4 as em,vo as en,ls as eo,Y_ as ep,Ud as eq,C6 as er,T4 as es,DB as et,oB as eu,iB as ev,WB as ew,sE as ex,nM as ey,iM as ez,En as f,zE as f0,it as f1,__ as f2,fC as g,Z2 as h,sP as i,Br as j,Cf as k,T0 as l,x0 as m,j5 as n,_C as o,aE as p,lE as q,XI as r,Vd as s,Jp as t,Ra as u,yn as v,Te as w,v0 as x,Xi as y,ed as z};
|