@heartlandone/vega 2.59.1 → 2.61.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.
- package/dist/cjs/{app-globals-64aff1a9.js → app-globals-7e624dd0.js} +5 -5
- package/dist/cjs/{child-nodes-event-prevent-slimmer-5df43771.js → child-nodes-event-prevent-slimmer-184fe3b2.js} +1 -1
- package/dist/cjs/{code-block-4bfae76d.js → code-block-ecb2df41.js} +3 -3
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-34f4577a.js → component-value-history-controller-slimmer.abstract-58a0f64c.js} +5 -5
- package/dist/cjs/{content-state-b82b74de.js → content-state-d7b8e70b.js} +4 -4
- package/dist/cjs/{design-token-0b1315f2.js → design-token-16f74439.js} +3 -3
- package/dist/cjs/{dom-node-subject-factory-bad99695.js → dom-node-subject-factory-4eb1fec2.js} +4 -0
- package/dist/cjs/{dom-node-subject-observer-factory-df6e6df0.js → dom-node-subject-observer-factory-15130e50.js} +1 -1
- package/dist/cjs/{element-appender-slimmer-f14737af.js → element-appender-slimmer-c4816142.js} +6 -6
- package/dist/cjs/{event-emit-slimmer-efc70b94.js → event-emit-slimmer-2da7c9d6.js} +3 -3
- package/dist/cjs/{form-field-controller-slimmer-772d1892.js → form-field-controller-slimmer-dab30e5c.js} +4 -4
- package/dist/cjs/{image-annotation-action-a3146135.js → image-annotation-action-7eaab3ce.js} +4 -4
- package/dist/cjs/{index-10199ee8.js → index-da628bba.js} +2 -2
- package/dist/cjs/index.cjs.js +13 -14
- package/dist/cjs/{inject-keyboard-manager-70382bae.js → inject-keyboard-manager-ad865c95.js} +1 -1
- package/dist/cjs/{internal-vega-event-manager-83065493.js → internal-vega-event-manager-7b87c2f4.js} +3 -3
- package/dist/cjs/{keyboard-manager-6858915b.js → keyboard-manager-7f4e1f43.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-faca2038.js → keyboard-manager-slimmer-138a90e5.js} +1 -1
- package/dist/cjs/loader.cjs.js +11 -12
- package/dist/cjs/{public-rules-26467413.js → public-rules-21622bd0.js} +6 -7
- package/dist/cjs/{responsive-format-facade-d2e03695.js → responsive-format-facade-0d22ff78.js} +3 -3
- package/dist/cjs/{rich-text-editor-required-rule-026c8c3f.js → rich-text-editor-required-rule-8d7e441a.js} +1 -1
- package/dist/cjs/{state-background-color-formatter-c57409ea.js → state-background-color-formatter-aa5570f6.js} +1 -1
- package/dist/cjs/string-format-strategy.abstract-07a95352.js +60 -0
- package/dist/cjs/{string-input-formatter-slimmer-1b757bad.js → string-input-formatter-slimmer-5a744e71.js} +4 -227
- package/dist/cjs/string-mask-strategy-6bdad95e.js +172 -0
- package/dist/cjs/{style-formatter-effb0730.js → style-formatter-a66813a2.js} +2 -2
- package/dist/cjs/{sub-state-notify-slimmer-943eb7cc.js → sub-state-notify-slimmer-9602b5bb.js} +2 -2
- package/dist/cjs/{sub-state-observer-slimmer-0788232a.js → sub-state-observer-slimmer-df7df5bb.js} +2 -2
- package/dist/cjs/{type-guard-aa8fdeaf.js → type-guard-f12b5bae.js} +13 -3
- package/dist/cjs/{valid-credit-card-number-rule-4a1b00b8.js → valid-credit-card-number-rule-ce5c9147.js} +9 -9
- package/dist/cjs/vega-accordion.cjs.entry.js +12 -13
- package/dist/cjs/vega-app-header-button.cjs.entry.js +13 -14
- package/dist/cjs/vega-banner.cjs.entry.js +4 -4
- package/dist/cjs/vega-box.cjs.entry.js +11 -12
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +5 -5
- package/dist/cjs/vega-button-circle.cjs.entry.js +13 -14
- package/dist/cjs/vega-button-group_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-button-link.cjs.entry.js +5 -5
- package/dist/cjs/vega-button.cjs.entry.js +11 -12
- package/dist/cjs/vega-calendar_4.cjs.entry.js +196 -82
- package/dist/cjs/vega-card.cjs.entry.js +10 -11
- package/dist/cjs/vega-carousel.cjs.entry.js +10 -11
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-chip.cjs.entry.js +13 -14
- package/dist/cjs/vega-code-block.cjs.entry.js +11 -12
- package/dist/cjs/vega-color-picker.cjs.entry.js +7 -7
- package/dist/cjs/vega-combo-box.cjs.entry.js +11 -12
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +369 -136
- package/dist/cjs/vega-dialog_2.cjs.entry.js +13 -14
- package/dist/cjs/vega-divider.cjs.entry.js +10 -11
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +16 -17
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +4 -4
- package/dist/cjs/vega-file-uploader.cjs.entry.js +7 -7
- package/dist/cjs/vega-flag-icon.cjs.entry.js +10 -11
- package/dist/cjs/vega-flex.cjs.entry.js +11 -12
- package/dist/cjs/vega-font.cjs.entry.js +10 -11
- package/dist/cjs/vega-form.cjs.entry.js +9 -9
- package/dist/cjs/vega-grid.cjs.entry.js +10 -11
- package/dist/cjs/vega-icon.cjs.entry.js +10 -11
- package/dist/cjs/vega-image-uploader.cjs.entry.js +13 -14
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +249 -20
- package/dist/cjs/vega-input-numeric.cjs.entry.js +12 -13
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +119 -30
- package/dist/cjs/vega-input-range.cjs.entry.js +8 -8
- package/dist/cjs/vega-input-select.cjs.entry.js +13 -14
- package/dist/cjs/vega-input.cjs.entry.js +24 -199
- package/dist/cjs/{vega-internal-event-id-ae6e2c13.js → vega-internal-event-id-9647aaf8.js} +2 -0
- package/dist/cjs/vega-item-toggle.cjs.entry.js +4 -4
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +14 -15
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +8 -9
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +5 -5
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination.cjs.entry.js +11 -12
- package/dist/cjs/vega-popover_2.cjs.entry.js +15 -16
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +4 -4
- package/dist/cjs/vega-radio_2.cjs.entry.js +11 -12
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +9 -10
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +18 -19
- package/dist/cjs/vega-segment-control.cjs.entry.js +4 -4
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +14 -15
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +12 -13
- package/dist/cjs/vega-signature-capture.cjs.entry.js +14 -15
- package/dist/cjs/{vega-skeleton-loader-controller-b1971f43.js → vega-skeleton-loader-controller-9c54f3aa.js} +1 -1
- package/dist/cjs/vega-stepper.cjs.entry.js +8 -8
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-table_8.cjs.entry.js +94 -76
- package/dist/cjs/vega-textarea.cjs.entry.js +8 -8
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +16 -17
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +7 -7
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +12 -13
- package/dist/cjs/vega.cjs.js +11 -12
- package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-date-block-renderer.abstract.js +82 -0
- package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.js +26 -21
- package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +51 -31
- package/dist/collection/components/vega-calendar/vega-calendar.js +83 -3
- package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-month-year-change-event-controller.js +139 -0
- package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-month-year-dropdown-renderer.js +21 -1
- package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +59 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +4 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker.js +102 -1
- package/dist/collection/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.js +4 -11
- package/dist/collection/components/vega-input/vega-input.css +4 -0
- package/dist/collection/components/vega-input/vega-input.js +1 -1
- package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +6 -3
- package/dist/collection/components/vega-input-phone-number/slimmers/renderers/phone-number-input-renderer.js +3 -16
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-children-controller.js +31 -16
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-body-renderer.js +8 -4
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-row-renderer.js +4 -1
- package/dist/collection/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-cell-state-controller.js +0 -16
- package/dist/collection/components/vega-table/vega-table-cell/slimmers/controllers/{vega-table-row-state-controller.js → vega-table-row-state-subscriber.js} +15 -14
- package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +3 -3
- package/dist/collection/components/vega-table/vega-table-expand-row/slimmers/renderers/vega-table-expand-row-renderer.js +4 -0
- package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.css +1 -1
- package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.js +20 -0
- package/dist/collection/components/vega-table/vega-table-row/slimmers/controllers/vega-table-row-state-controller.js +0 -7
- package/dist/collection/components/vega-table/vega-table-row/vega-table-row.css +1 -1
- package/dist/collection/components/vega-table/vega-table-row/vega-table-row.js +61 -1
- package/dist/collection/constants/card-config.js +4 -4
- package/dist/collection/constants/ui.js +2 -0
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +3 -3
- package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +2 -0
- package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
- package/dist/collection/helpers/formatter/string-formatter/credit-card-blur-mask-strategy.js +1 -1
- package/dist/collection/helpers/formatter/string-formatter/vega-phone-number-input-strategy.js +104 -0
- package/dist/collection/helpers/formatter/test/string-formatter/vega-phone-number-input-strategy.test.js +43 -0
- package/dist/collection/utils/spec-utils.js +28 -0
- package/dist/esm/{app-globals-05dbca3e.js → app-globals-ce54f0ac.js} +5 -5
- package/dist/esm/{child-nodes-event-prevent-slimmer-6b5b31f5.js → child-nodes-event-prevent-slimmer-2a3115ae.js} +1 -1
- package/dist/esm/{code-block-3d519665.js → code-block-89a4dd13.js} +3 -3
- package/dist/esm/{component-value-history-controller-slimmer.abstract-8b5be007.js → component-value-history-controller-slimmer.abstract-95b199df.js} +5 -5
- package/dist/esm/{content-state-73900a67.js → content-state-fc47457c.js} +4 -4
- package/dist/esm/{design-token-dbc8c235.js → design-token-eaa7c221.js} +3 -3
- package/dist/esm/{dom-node-subject-factory-202655e7.js → dom-node-subject-factory-3c2e13f1.js} +3 -1
- package/dist/esm/{dom-node-subject-observer-factory-999e21e3.js → dom-node-subject-observer-factory-1e456cd4.js} +1 -1
- package/dist/esm/{element-appender-slimmer-6ad38a9b.js → element-appender-slimmer-ce83db8a.js} +6 -6
- package/dist/esm/{event-emit-slimmer-40973ec2.js → event-emit-slimmer-4428ce26.js} +3 -3
- package/dist/esm/{form-field-controller-slimmer-47820eaa.js → form-field-controller-slimmer-6e69ca4e.js} +4 -4
- package/dist/esm/{image-annotation-action-4ebed11f.js → image-annotation-action-53812eb7.js} +4 -4
- package/dist/esm/{index-18a340fb.js → index-1d479c88.js} +2 -2
- package/dist/esm/index.js +13 -14
- package/dist/esm/{inject-keyboard-manager-a28dfee4.js → inject-keyboard-manager-109817bf.js} +1 -1
- package/dist/esm/{internal-vega-event-manager-526f8ed1.js → internal-vega-event-manager-a654cf8a.js} +3 -3
- package/dist/esm/{keyboard-manager-fa6355cb.js → keyboard-manager-ab521d22.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-818050ee.js → keyboard-manager-slimmer-cae3a002.js} +1 -1
- package/dist/esm/loader.js +11 -12
- package/dist/esm/{public-rules-f28aca10.js → public-rules-095284f6.js} +6 -7
- package/dist/esm/{responsive-format-facade-81b72f39.js → responsive-format-facade-86b6de3b.js} +3 -3
- package/dist/esm/{rich-text-editor-required-rule-c4ba68b8.js → rich-text-editor-required-rule-4e8d2db8.js} +1 -1
- package/dist/esm/{state-background-color-formatter-da5e76e8.js → state-background-color-formatter-0f01d27a.js} +1 -1
- package/dist/esm/string-format-strategy.abstract-452f4398.js +58 -0
- package/dist/esm/{string-input-formatter-slimmer-b144e8d7.js → string-input-formatter-slimmer-60897659.js} +5 -226
- package/dist/esm/string-mask-strategy-6232a1c1.js +170 -0
- package/dist/esm/{style-formatter-7d817448.js → style-formatter-a0719a8f.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-b3524c09.js → sub-state-notify-slimmer-ee730968.js} +2 -2
- package/dist/esm/{sub-state-observer-slimmer-c823d69c.js → sub-state-observer-slimmer-d474634d.js} +2 -2
- package/dist/esm/{type-guard-84b1f192.js → type-guard-12f7654b.js} +8 -2
- package/dist/esm/{valid-credit-card-number-rule-cc497bec.js → valid-credit-card-number-rule-81443274.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +12 -13
- package/dist/esm/vega-app-header-button.entry.js +13 -14
- package/dist/esm/vega-banner.entry.js +4 -4
- package/dist/esm/vega-box.entry.js +11 -12
- package/dist/esm/vega-breadcrumb.entry.js +5 -5
- package/dist/esm/vega-button-circle.entry.js +13 -14
- package/dist/esm/vega-button-group_2.entry.js +8 -8
- package/dist/esm/vega-button-link.entry.js +5 -5
- package/dist/esm/vega-button.entry.js +11 -12
- package/dist/esm/vega-calendar_4.entry.js +196 -82
- package/dist/esm/vega-card.entry.js +10 -11
- package/dist/esm/vega-carousel.entry.js +10 -11
- package/dist/esm/vega-checkbox_2.entry.js +8 -8
- package/dist/esm/vega-chip.entry.js +13 -14
- package/dist/esm/vega-code-block.entry.js +11 -12
- package/dist/esm/vega-color-picker.entry.js +7 -7
- package/dist/esm/vega-combo-box.entry.js +11 -12
- package/dist/esm/vega-date-picker_2.entry.js +368 -135
- package/dist/esm/vega-dialog_2.entry.js +13 -14
- package/dist/esm/vega-divider.entry.js +10 -11
- package/dist/esm/vega-dropdown_5.entry.js +16 -17
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-label.entry.js +4 -4
- package/dist/esm/vega-file-uploader.entry.js +7 -7
- package/dist/esm/vega-flag-icon.entry.js +10 -11
- package/dist/esm/vega-flex.entry.js +11 -12
- package/dist/esm/vega-font.entry.js +10 -11
- package/dist/esm/vega-form.entry.js +9 -9
- package/dist/esm/vega-grid.entry.js +10 -11
- package/dist/esm/vega-icon.entry.js +10 -11
- package/dist/esm/vega-image-uploader.entry.js +13 -14
- package/dist/esm/vega-input-credit-card.entry.js +248 -19
- package/dist/esm/vega-input-numeric.entry.js +12 -13
- package/dist/esm/vega-input-phone-number.entry.js +119 -30
- package/dist/esm/vega-input-range.entry.js +8 -8
- package/dist/esm/vega-input-select.entry.js +13 -14
- package/dist/esm/vega-input.entry.js +18 -193
- package/dist/esm/{vega-internal-event-id-b7c865de.js → vega-internal-event-id-5a143cd2.js} +2 -1
- package/dist/esm/vega-item-toggle.entry.js +4 -4
- package/dist/esm/vega-left-nav_5.entry.js +14 -15
- package/dist/esm/vega-loader-wrapper_2.entry.js +8 -9
- package/dist/esm/vega-page-notification_2.entry.js +2 -2
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +3 -3
- package/dist/esm/vega-pagination.entry.js +11 -12
- package/dist/esm/vega-popover_2.entry.js +15 -16
- package/dist/esm/vega-progress-tracker.entry.js +4 -4
- package/dist/esm/vega-radio_2.entry.js +11 -12
- package/dist/esm/vega-rich-text-content.entry.js +9 -10
- package/dist/esm/vega-rich-text-editor_4.entry.js +18 -19
- package/dist/esm/vega-segment-control.entry.js +4 -4
- package/dist/esm/vega-selection-chip_2.entry.js +14 -15
- package/dist/esm/vega-selection-tile_2.entry.js +9 -9
- package/dist/esm/vega-sidenav_3.entry.js +12 -13
- package/dist/esm/vega-signature-capture.entry.js +14 -15
- package/dist/esm/{vega-skeleton-loader-controller-38864fcd.js → vega-skeleton-loader-controller-394a6026.js} +1 -1
- package/dist/esm/vega-stepper.entry.js +8 -8
- package/dist/esm/vega-tab-group_2.entry.js +5 -5
- package/dist/esm/vega-table_8.entry.js +94 -76
- package/dist/esm/vega-textarea.entry.js +8 -8
- package/dist/esm/vega-time-picker_2.entry.js +16 -17
- package/dist/esm/vega-toggle-switch.entry.js +7 -7
- package/dist/esm/vega-tooltip_2.entry.js +12 -13
- package/dist/esm/vega.js +11 -12
- package/dist/types/components/vega-calendar/slimmers/common/renderers/vega-calendar-date-block-renderer.abstract.d.ts +58 -0
- package/dist/types/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.d.ts +10 -9
- package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +15 -8
- package/dist/types/components/vega-calendar/vega-calendar.d.ts +22 -2
- package/dist/types/components/vega-date-picker/slimmers/controllers/vega-date-picker-month-year-change-event-controller.d.ts +46 -0
- package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-month-year-dropdown-renderer.d.ts +12 -0
- package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +17 -0
- package/dist/types/components/vega-date-picker/types.d.ts +7 -0
- package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +31 -1
- package/dist/types/components/vega-input/types.d.ts +3 -10
- package/dist/types/components/vega-table/interface.d.ts +1 -0
- package/dist/types/components/vega-table/slimmers/controllers/vega-table-children-controller.d.ts +13 -1
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-body-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-row-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-cell-state-controller.d.ts +0 -1
- package/dist/types/components/vega-table/vega-table-cell/slimmers/controllers/{vega-table-row-state-controller.d.ts → vega-table-row-state-subscriber.d.ts} +3 -6
- package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +2 -2
- package/dist/types/components/vega-table/vega-table-expand-row/slimmers/renderers/vega-table-expand-row-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/vega-table-expand-row/vega-table-expand-row.d.ts +6 -0
- package/dist/types/components/vega-table/vega-table-row/slimmers/controllers/vega-table-row-state-controller.d.ts +0 -1
- package/dist/types/components/vega-table/vega-table-row/vega-table-row.d.ts +16 -4
- package/dist/types/components.d.ts +79 -3
- package/dist/types/constants/ui.d.ts +1 -1
- package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +2 -0
- package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
- package/dist/types/helpers/formatter/string-formatter/vega-phone-number-input-strategy.d.ts +49 -0
- package/dist/types/helpers/formatter/test/string-formatter/vega-phone-number-input-strategy.test.d.ts +1 -0
- package/dist/types/types/components.type.d.ts +1 -0
- package/dist/types/utils/spec-utils.d.ts +7 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/p-0070e970.entry.js +1 -0
- package/dist/vega/p-0169af6b.entry.js +1 -0
- package/dist/vega/{p-8baacfc5.js → p-03e9cbc8.js} +1 -1
- package/dist/vega/{p-70939752.entry.js → p-04341cd4.entry.js} +1 -1
- package/dist/vega/p-0664ca9c.js +1 -0
- package/dist/vega/{p-4a368e1e.js → p-074b73f8.js} +1 -1
- package/dist/vega/{p-4b7edf72.entry.js → p-08fb66a4.entry.js} +1 -1
- package/dist/vega/p-0cf35281.entry.js +1 -0
- package/dist/vega/{p-09ddae74.entry.js → p-0e75ddb2.entry.js} +1 -1
- package/dist/vega/{p-b5bef48a.js → p-0e954b9b.js} +1 -1
- package/dist/vega/{p-63c9eb58.js → p-129f5938.js} +1 -1
- package/dist/vega/p-13cb5a04.entry.js +1 -0
- package/dist/vega/{p-86f17433.js → p-18223240.js} +1 -1
- package/dist/vega/{p-1a195e28.js → p-19ce9ae6.js} +1 -1
- package/dist/vega/{p-b40adb9e.js → p-2608b9fe.js} +1 -1
- package/dist/vega/{p-0f0baac3.js → p-27dfa896.js} +1 -1
- package/dist/vega/p-27f922fe.entry.js +1 -0
- package/dist/vega/{p-61d1f3cb.entry.js → p-2c7b7dd6.entry.js} +1 -1
- package/dist/vega/p-310f9e76.entry.js +1 -0
- package/dist/vega/p-330d7ba8.js +1 -0
- package/dist/vega/{p-7f087c8b.js → p-34fdbe7a.js} +1 -1
- package/dist/vega/p-3a6abcd7.entry.js +1 -0
- package/dist/vega/p-3bf95faf.entry.js +13 -0
- package/dist/vega/{p-42033e59.js → p-3d6c302d.js} +1 -1
- package/dist/vega/p-42563036.entry.js +1 -0
- package/dist/vega/p-441a681b.js +1 -0
- package/dist/vega/p-4a357f30.entry.js +1 -0
- package/dist/vega/p-4e8b6eb6.entry.js +1 -0
- package/dist/vega/p-50dd3cf1.js +1 -0
- package/dist/vega/p-518722aa.js +1 -0
- package/dist/vega/p-5422fdc4.entry.js +1 -0
- package/dist/vega/p-5c36a6cb.entry.js +1 -0
- package/dist/vega/p-5d095f9b.entry.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-5f85811c.entry.js +1 -0
- package/dist/vega/p-5faa7313.entry.js +1 -0
- package/dist/vega/p-67101f43.entry.js +1 -0
- package/dist/vega/p-68806f9c.entry.js +1 -0
- package/dist/vega/{p-606d1f7c.entry.js → p-6cf490d9.entry.js} +1 -1
- package/dist/vega/{p-7a3b142b.js → p-6def20e1.js} +1 -1
- package/dist/vega/p-71f9c4d4.js +1 -0
- package/dist/vega/{p-436f7e27.js → p-743c5baf.js} +1 -1
- package/dist/vega/{p-847dbae4.entry.js → p-78d3f99b.entry.js} +1 -1
- package/dist/vega/{p-4474bc63.js → p-792715f3.js} +1 -1
- package/dist/vega/p-7a201c6e.entry.js +1 -0
- package/dist/vega/p-7c22a1c3.entry.js +1 -0
- package/dist/vega/p-7ecf65ec.js +1 -0
- package/dist/vega/{p-446d0317.entry.js → p-7f329473.entry.js} +1 -1
- package/dist/vega/{p-f6d25220.js → p-80f1b680.js} +1 -1
- package/dist/vega/p-824a06ba.js +1 -0
- package/dist/vega/{p-4fc18f2f.entry.js → p-82beb586.entry.js} +1 -1
- package/dist/vega/{p-0c247128.entry.js → p-84eb131b.entry.js} +1 -1
- package/dist/vega/p-867a4970.js +1 -0
- package/dist/vega/{p-d45f79ce.entry.js → p-909820dd.entry.js} +1 -1
- package/dist/vega/{p-fc8badd3.entry.js → p-927cab0c.entry.js} +1 -1
- package/dist/vega/{p-a7baad6d.entry.js → p-989e141d.entry.js} +1 -1
- package/dist/vega/{p-6f90d444.js → p-9ce249a9.js} +1 -1
- package/dist/vega/p-a29e5d32.js +1 -0
- package/dist/vega/{p-e9ad8223.entry.js → p-a3942d0b.entry.js} +1 -1
- package/dist/vega/p-a66533c1.entry.js +1 -0
- package/dist/vega/p-a9b831d8.entry.js +1 -0
- package/dist/vega/p-aeccc7f8.js +1 -0
- package/dist/vega/{p-b4be8573.entry.js → p-b1d0e4cb.entry.js} +1 -1
- package/dist/vega/p-b1faebe0.js +1 -0
- package/dist/vega/p-b34f9891.entry.js +1 -0
- package/dist/vega/p-b820e42f.entry.js +1 -0
- package/dist/vega/{p-ae21e5f5.entry.js → p-c4677b0c.entry.js} +1 -1
- package/dist/vega/p-c467fe81.entry.js +1 -0
- package/dist/vega/{p-bbb96a13.js → p-c5e862aa.js} +1 -1
- package/dist/vega/p-c7762c86.entry.js +1 -0
- package/dist/vega/{p-850a6305.entry.js → p-c9e57cf1.entry.js} +1 -1
- package/dist/vega/{p-1bd516c5.js → p-cd18f0fe.js} +1 -1
- package/dist/vega/p-d0b3e319.entry.js +1 -0
- package/dist/vega/p-d7b4ffed.entry.js +1 -0
- package/dist/vega/p-dc6f45af.entry.js +1 -0
- package/dist/vega/p-e4586f13.entry.js +1 -0
- package/dist/vega/p-e66aef91.entry.js +1 -0
- package/dist/vega/p-e71c4a09.entry.js +1 -0
- package/dist/vega/{p-9773c913.js → p-e764acd5.js} +1 -1
- package/dist/vega/p-ea66d9f7.entry.js +1 -0
- package/dist/vega/p-ec6819fe.entry.js +1 -0
- package/dist/vega/p-ec9a8f81.entry.js +1 -0
- package/dist/vega/p-ed01328c.entry.js +1 -0
- package/dist/vega/p-ed798cd4.entry.js +1 -0
- package/dist/vega/{p-27b5f69c.entry.js → p-edb71a72.entry.js} +1 -1
- package/dist/vega/{p-a204a2b2.js → p-f2a1fe6a.js} +1 -1
- package/dist/vega/{p-c81cb852.entry.js → p-f4e23c23.entry.js} +1 -1
- package/dist/vega/p-f825e8a2.entry.js +1 -0
- package/dist/vega/p-f9deb43e.entry.js +1 -0
- package/dist/vega/p-fb232e29.entry.js +1 -0
- package/dist/vega/{p-fe6ea6cf.entry.js → p-fdd930a9.entry.js} +1 -1
- package/dist/vega/{p-f47de801.entry.js → p-fe52c370.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +4 -3
- package/dist/cjs/card-config-2ee5505e.js +0 -65
- package/dist/cjs/regex-c1f70fd4.js +0 -15
- package/dist/esm/card-config-d2ad484e.js +0 -63
- package/dist/esm/regex-dfe11abf.js +0 -8
- package/dist/vega/p-0cd89fb6.js +0 -1
- package/dist/vega/p-12ed3141.entry.js +0 -1
- package/dist/vega/p-13eca7f3.entry.js +0 -1
- package/dist/vega/p-17d517c8.entry.js +0 -1
- package/dist/vega/p-1ff1deaf.entry.js +0 -1
- package/dist/vega/p-2004317b.entry.js +0 -1
- package/dist/vega/p-29e0d4c8.entry.js +0 -1
- package/dist/vega/p-369f38ed.entry.js +0 -1
- package/dist/vega/p-36ed226a.js +0 -1
- package/dist/vega/p-3a0a4d15.js +0 -1
- package/dist/vega/p-4452e085.js +0 -1
- package/dist/vega/p-490f5e3f.entry.js +0 -1
- package/dist/vega/p-4996b853.entry.js +0 -1
- package/dist/vega/p-49fd1009.js +0 -1
- package/dist/vega/p-4fb159d5.js +0 -1
- package/dist/vega/p-51cce3f9.entry.js +0 -1
- package/dist/vega/p-53d67971.entry.js +0 -1
- package/dist/vega/p-555804a0.entry.js +0 -1
- package/dist/vega/p-59e990c7.entry.js +0 -1
- package/dist/vega/p-5e2c9e69.js +0 -1
- package/dist/vega/p-675b9501.entry.js +0 -1
- package/dist/vega/p-707bb905.entry.js +0 -1
- package/dist/vega/p-7183bd72.entry.js +0 -1
- package/dist/vega/p-73b487b0.entry.js +0 -1
- package/dist/vega/p-76de6b00.entry.js +0 -1
- package/dist/vega/p-7b1bb372.entry.js +0 -1
- package/dist/vega/p-8a317208.entry.js +0 -1
- package/dist/vega/p-9479866e.entry.js +0 -1
- package/dist/vega/p-9f453b90.entry.js +0 -1
- package/dist/vega/p-a328d448.entry.js +0 -1
- package/dist/vega/p-ad1b22b4.entry.js +0 -1
- package/dist/vega/p-ae415e7e.entry.js +0 -1
- package/dist/vega/p-af464251.js +0 -1
- package/dist/vega/p-b5822a21.js +0 -1
- package/dist/vega/p-bca1f8f9.js +0 -1
- package/dist/vega/p-bdce4143.js +0 -1
- package/dist/vega/p-be8bbaa5.entry.js +0 -1
- package/dist/vega/p-bf6187f7.entry.js +0 -1
- package/dist/vega/p-c5c5509c.entry.js +0 -13
- package/dist/vega/p-c9c2c8c6.entry.js +0 -1
- package/dist/vega/p-ca30b996.js +0 -1
- package/dist/vega/p-cc20f01f.entry.js +0 -1
- package/dist/vega/p-d3bcaa82.entry.js +0 -1
- package/dist/vega/p-dbb06804.entry.js +0 -1
- package/dist/vega/p-dc5026e7.entry.js +0 -1
- package/dist/vega/p-df647e48.entry.js +0 -1
- package/dist/vega/p-e989ce94.entry.js +0 -1
- package/dist/vega/p-e9d2e0dc.entry.js +0 -1
- package/dist/vega/p-f6b11a21.entry.js +0 -1
- package/dist/vega/p-f8e62e5e.entry.js +0 -1
- package/dist/vega/p-fd6f90fd.entry.js +0 -1
- package/dist/vega/p-ffaee583.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,r as i,c as t,F as a,H as s,g as n}from"./p-48a58baf.js";import{e as o}from"./p-d27ae9ff.js";import{s as r}from"./p-519a7d55.js";import{a as d}from"./p-a4670e23.js";import{c as l,V as p,M as h,I as c}from"./p-6e1ab235.js";import{V as v,I as g}from"./p-d849e0f5.js";import{I as b}from"./p-074b73f8.js";import{g as f,P as m}from"./p-7d9cd9c8.js";import{c as x}from"./p-86194314.js";import{V as u}from"./p-f08a4adf.js";import{V as w}from"./p-8c46e116.js";import{c as k}from"./p-e764acd5.js";import{e as y}from"./p-272440e8.js";import{R as j}from"./p-03e9cbc8.js";import{D as S}from"./p-441a681b.js";import{v as C}from"./p-0e954b9b.js";import{c as O}from"./p-792715f3.js";import{J as z,a as R,d as B}from"./p-0664ca9c.js";import{C as I}from"./p-2d0d575f.js";import{O as L}from"./p-331a62d5.js";import{l as D}from"./p-8a877e12.js";import{S as V}from"./p-cd18f0fe.js";import{f as H}from"./p-575235c8.js";import{i as M}from"./p-aeccc7f8.js";import"./p-262ec334.js";import"./p-6a334573.js";import"./p-7e8f055d.js";import"./p-112455b1.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-b1faebe0.js";import"./p-d884c644.js";import"./p-0c667d6a.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-bf0ced3c.js";import"./p-3d6c302d.js";import"./p-34fdbe7a.js";import"./p-02841589.js";import"./p-bf19682d.js";class N extends p{constructor(){super(...arguments),this.backdropRef=null}updateBackdropAvailability(e){"open"===this.openState&&(null==e?void 0:e.showBackdrop)?this.append():(this.removeZIndex("base"),this.remove())}setZIndex(e){b.setZIndex(this.backdropRef,e)}removeZIndex(e){b.removeZIndex(this.backdropRef,e)}append(){let e=document.querySelector(`vega-backdrop.${N.backdropClassName}`);e||(e=document.createElement("vega-backdrop"),e.classList.add(N.backdropClassName),document.querySelector("body").append(e)),e.visible=this.getBackdropVisibleByBreakpoint(),this.backdropRef=e}remove(){this.backdropRef&&this.backdropRef.remove()}getBackdropVisibleByBreakpoint(){const e=f();return"S"===e||"M"===e}}N.backdropClassName="vega-sidenav-backdrop",function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l()],N.prototype,"openState",void 0);class $ extends p{constructor(){super(...arguments),this.collapseButtonRef=null,this.handleClickSidebarIcon=async()=>{await this.host.toggle()}}updateHandlerIconAvailability(e){this.collapseButtonRef&&(e?this.collapseButtonRef.classList.remove("disable-collapse"):this.collapseButtonRef.classList.add("disable-collapse"))}render(){const i=this.getButtonMaskImage();return e("i",{role:"button",onClick:this.handleClickSidebarIcon,onKeyDown:x(),class:"vega-handler-icon",tabIndex:0,"aria-label":"Handle Sidebar Icon",ref:e=>this.collapseButtonRef=e},e("style",null,i),e("vega-icon",{size:"size-16",icon:u.getIconKey("sidenav-chevron-right")}))}getButtonMaskImage(){const e=w.getIcon(u.getIconKey("sidenav-toggle-button-bg")).icon,i=`url(data:image/svg+xml,${globalThis.encodeURIComponent(e)})`;return`.vega-handler-icon{-webkit-mask-image:${i};mask-image:${i}}`}}u.register({"sidenav-chevron-right":{icon:'<svg width="26" height="43" viewBox="0 0 26 43" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.7444 22.3536L10.6711 28.4268C10.3782 28.7197 9.90333 28.7197 9.61045 28.4268L8.90211 27.7184C8.6097 27.426 8.60914 26.9521 8.90086 26.659L13.714 21.8232L8.90086 16.9874C8.60914 16.6943 8.6097 16.2204 8.90211 15.928L9.61045 15.2197C9.90336 14.9268 10.3782 14.9268 10.6711 15.2197L16.7443 21.2929C17.0372 21.5858 17.0372 22.0606 16.7444 22.3536Z" fill="currentColor"/></svg>',autoSize:!0},"sidenav-toggle-button-bg":{icon:'<svg width="26" height="43" viewBox="0 0 26 43" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 12C0 9.79086 1.79086 8 4 8H8V0L12.4853 4.48528C14.7357 6.73572 17.788 8 20.9706 8H22C24.2091 8 26 9.79086 26 12V31C26 33.2091 24.2091 35 22 35H20.9706C17.788 35 14.7357 36.2643 12.4853 38.5147L8 43V35H4C1.79086 35 0 33.2091 0 31V12Z" fill="currentColor"/></svg>'}}),function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l()],$.prototype,"host",void 0);var E=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};class U extends m{constructor(){super({callback:()=>{this.responsiveBehavior=this.getSidenavResponsiveBehavior(),this.backdropController.updateBackdropAvailability(this.responsiveBehavior),this.updateOverflowAvailability(),this.updateStatusOpenByDefault(!0),this.collapseButtonRenderer.updateHandlerIconAvailability(this.canCollapseSidenav())}})}toggleSidenav(){if(this.canCollapseSidenav())switch(this.openState){case"open":this.setSideNavOpenStatus("clickClose");break;case"close":this.setSideNavOpenStatus("clickOpen");break;case"hoverOpen":this.setSideNavOpenStatus("hoverClose")}}setSidenavRef(e){this.sidebar=e}setSideNavOpenStatus(e){let i=!1;switch(e){case"clickOpen":"close"===this.openState&&(this.openState="open",this.host.classList.add("open"),this.sidebar.classList.add("open"),i=!0);break;case"clickClose":"hoverOpen"!==this.openState&&"open"!==this.openState||(this.openState="close",this.host.classList.remove("open"),this.sidebar.classList.remove("open"),i=!0);break;case"hoverOpen":"close"===this.openState&&(this.openState="hoverOpen",this.host.classList.add("open"),this.sidebar.classList.add("open"),i=!0);break;case"hoverClose":"hoverOpen"===this.openState&&(this.openState="close",this.host.classList.remove("open"),this.sidebar.classList.remove("open"),i=!0)}i&&(this.backdropController.updateBackdropAvailability(this.responsiveBehavior),this.updateOverflowAvailability(),this.updateZIndex(),this.stateUpdateEmitter.emit(this.openState))}initOpenStatus(){this.responsiveBehavior=this.getSidenavResponsiveBehavior(),this.updateStatusOpenByDefault()}updateOpenStatus(){this.updateStatusOpenByDefault(),this.collapseButtonRenderer.updateHandlerIconAvailability(this.canCollapseSidenav())}registerSidenavLinkClickObserver(){S.addUniqueObserverToNode(this.host,C,(e=>{this.responsiveBehavior.showSideBarOnClickLink||e.detail||this.setSideNavOpenStatus("clickClose")}))}unregisterSidenavLinkClickObserver(){S.removeUniqueObserverFromNode(this.host,C)}getSidenavResponsiveBehavior(){return this.isLargeScreen()?{showSideBar:!0,showBackdrop:!1,canBeScrolled:!0,showSideBarOnClickLink:!0}:{showSideBar:!1,showBackdrop:!0,canBeScrolled:!1,showSideBarOnClickLink:!1}}updateZIndex(){["hoverOpen","open"].includes(this.openState)?(this.backdropController.setZIndex("base"),b.setZIndex(this.sidebar,"base")):y((()=>{this.backdropController.removeZIndex("base"),b.removeZIndex(this.sidebar,"base")}),this.sidebar,300)}canCollapseSidenav(){return"disableCollapse"!==this.getCurrentOpenByDefault()||!this.isLargeScreen()}updateOverflowAvailability(){var e;document.querySelector("body").style.overflow=(null===(e=this.responsiveBehavior)||void 0===e?void 0:e.canBeScrolled)||"open"!==this.openState?null:"hidden"}updateStatusOpenByDefault(e=!1){const i=this.getCurrentOpenByDefault(),t=this.canCollapseSidenav();e?t||this.setSideNavOpenStatus("clickOpen"):"open"!=i&&t?("close"==i||"disableCollapse"==i&&t)&&this.setSideNavOpenStatus("clickClose"):this.setSideNavOpenStatus("clickOpen")}isLargeScreen(){const e=f();return"L"==e||"XL"==e}getCurrentOpenByDefault(e=this.openByDefault){return j.formatCustom(e)}}E([l({writable:!0})],U.prototype,"openState",void 0),E([l()],U.prototype,"openByDefault",void 0),E([l()],U.prototype,"host",void 0),E([l()],U.prototype,"stateUpdateEmitter",void 0),E([l()],U.prototype,"backdropController",void 0),E([l()],U.prototype,"collapseButtonRenderer",void 0),E([h("componentDidLoad")],U.prototype,"initOpenStatus",null),E([h("watchOpenByDefaultChange")],U.prototype,"updateOpenStatus",null),E([h("connectedCallback")],U.prototype,"registerSidenavLinkClickObserver",null),E([h("disconnectedCallback")],U.prototype,"unregisterSidenavLinkClickObserver",null);var _=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const A=class{constructor(s){i(this,s),this.vegaStateUpdate=t(this,"vegaStateUpdate",7),this.stateUpdate=t(this,"stateUpdate",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.openStateNotifySlimmer=k(A,"openState","watchOpenState"),this.backdropController=new N,this.collapseButtonRenderer=new $,this.openStatusController=new U,this.stateUpdateEmitter=O(A,z),this.openState="close",this.footnote="",this.headerConfig={},this.openByDefault="close",this.attachMouseEventToContent=()=>{this.content.addEventListener("mouseenter",(e=>{e.stopPropagation(),this.openStatusController.setSideNavOpenStatus("hoverOpen")})),this.content.addEventListener("mouseleave",(e=>{e.stopPropagation(),this.openStatusController.setSideNavOpenStatus("hoverClose")}))},this.renderSideBarListBySource=()=>{var i;return e(a,null,null===(i=this.source)||void 0===i?void 0:i.map(((i,t)=>(null==i?void 0:i.children)?e("vega-sidenav-group",{key:t,icon:i.icon||"globe",label:i.name},i.children.map(((i,a)=>e("vega-sidenav-link",{key:`${t}_${a}`,url:i.url,selected:i.selected},i.name)))):e("vega-sidenav-link",{key:t,icon:i.icon||"globe",url:i.url,selected:i.selected},i.name))))}}watchOpenState(){}watchSourceChange(e,i){e&&this.validSource(),(null==i?void 0:i.length)||this.host.querySelectorAll("vega-sidenav-link, vega-sidenav-group").forEach((e=>e.remove()))}watchOpenByDefaultChange(){}componentWillLoad(){this.source&&this.validSource()}componentDidLoad(){this.attachMouseEventToContent()}collapseSidenavByBackDropClick(e){e.target.classList.contains(N.backdropClassName)&&this.openStatusController.setSideNavOpenStatus("clickClose")}async toggle(){this.openStatusController.toggleSidenav()}render(){return r(e(s,null,e("div",{class:"vega-sidebar",ref:e=>this.openStatusController.setSidenavRef(e)},e("div",{class:"vega-sidebar-content-container",ref:e=>this.content=e},e(a,null,!d(this.headerConfig)&&this.renderSideBarHeader(),this.renderSideBarList(),this.renderSideBarFooter())),this.collapseButtonRenderer.render())),this.host)}validSource(){if(o(this.source).filter((e=>e.selected)).length>1)throw new Error("There should be only one item selected at the same time.")}renderSideBarList(){var i;return e(a,null,d(this.headerConfig)?e("div",{class:"header-placeholder"}):null,e("slot",{name:"before-list-slot"}),e("div",{class:"vega-nav-list"},(null===(i=this.source)||void 0===i?void 0:i.length)?this.renderSideBarListBySource():e("slot",null)))}renderSideBarHeader(){const{collapseLogo:i,expandLogo:t,headline:a}=this.headerConfig;return e("div",{class:"vega-sidebar-header"},e("div",{class:"vega-sidebar-header-collapse-container"},i&&e("img",{src:i,alt:"collapse logo"})),e("div",{class:"vega-sidebar-header-expand-container"},t&&e("img",{src:t,alt:"expand logo"}),a&&e("div",{class:"vega-sidebar-headline"},a)))}renderSideBarFooter(){return this.footnote&&e("div",{class:"vega-nav-footer"},e("div",{class:"vega-nav-footnote"},this.footnote))}get host(){return n(this)}static get watchers(){return{openState:["watchOpenState"],source:["watchSourceChange"],openByDefault:["watchOpenByDefaultChange"]}}};_([g()],A.prototype,"globalSlimmers",void 0),_([c()],A.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_([c()],A.prototype,"openStateNotifySlimmer",void 0),_([c()],A.prototype,"backdropController",void 0),_([c()],A.prototype,"collapseButtonRenderer",void 0),_([c()],A.prototype,"openStatusController",void 0),_([c()],A.prototype,"stateUpdateEmitter",void 0),A.style=':host{height:100%;width:0px;min-height:100vh;display:flex;align-items:stretch;text-align:left;top:0px;right:0px;bottom:0px;left:0px}:host .vega-sidebar{background-color:rgba(var(--v-bg-sidebar, 18, 18, 39, 1));transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;box-sizing:border-box;position:relative;padding-left:0px;padding-right:0px;display:flex;align-items:stretch;width:0px;transition-duration:300ms}:host .vega-sidebar .header-placeholder{margin-top:24px}:host .vega-sidebar .vega-sidebar-content-container{width:100%;overflow:hidden;display:flex;flex-direction:column}:host .vega-sidebar .vega-sidebar-content-container>.vega-nav-list{padding-left:8px;padding-right:8px}:host .vega-sidebar .vega-nav-list{padding:0px;margin:0px;flex:1 1 0%;list-style-type:none}:host .vega-sidebar .vega-nav-list::-webkit-scrollbar{background-color:rgba(var(--v-bg-sidebar, 18, 18, 39, 1));width:4px}:host .vega-sidebar .vega-nav-list::-webkit-scrollbar-thumb{background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1));border-radius:9999px}:host .vega-sidebar .vega-sidebar-header{position:relative}:host .vega-sidebar .vega-sidebar-header>div{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-duration:300ms}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container{display:flex;justify-content:center;align-items:center;flex-shrink:0;height:56px;position:absolute;pointer-events:none;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));display:none;padding-top:24px;padding-left:12px;padding-right:12px;padding-bottom:32px;top:0;left:0;opacity:1}@media (min-width: 1024px){:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container{display:flex}}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container image{max-width:100%;max-height:48px}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container{color:rgba(var(--v-text-white, 252, 252, 252, 1));overflow:hidden;box-sizing:border-box;padding-left:24px;padding-right:24px;padding-top:24px;padding-bottom:32px;width:100%;opacity:0}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container>vega-icon{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1))}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container img{max-height:80px;max-width:100%}:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{overflow-wrap:break-word;font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;margin-top:8px;opacity:0;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;max-height:25px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-sidebar .vega-handler-icon{cursor:pointer;position:absolute;background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));right:-18px;-webkit-mask-size:cover;mask-size:cover;width:26px;height:43px;top:24px}@media (min-width: 320px){:host .vega-sidebar .vega-handler-icon{display:none}}@media (min-width: 1024px){:host .vega-sidebar .vega-handler-icon{display:block}}:host .vega-sidebar .vega-handler-icon vega-icon{cursor:pointer;position:absolute;display:block;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));left:0px;top:0px;width:100%;height:100%;transform-origin:center}:host .vega-sidebar .vega-nav-footer{padding-top:16px;padding-bottom:16px;padding-left:24px;padding-right:24px}:host .vega-sidebar .vega-nav-footer .vega-nav-footnote{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;opacity:0;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-sidebar .vega-nav-footer .vega-nav-footnote{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-sidebar .vega-nav-footer .vega-nav-footnote{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-sidebar .vega-nav-footer .vega-nav-footnote{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media (min-width: 1024px){:host{width:72px}:host .vega-sidebar{width:72px}}:host(.open){width:auto}:host(.open) .vega-sidebar{top:0px;right:0px;bottom:0px;left:0px;position:fixed;width:300px}@media (min-width: 768px){:host(.open) .vega-sidebar{width:240px}}@media (min-width: 1024px){:host(.open) .vega-sidebar{position:relative}}:host(.open) .vega-sidebar .vega-nav-list{overflow-y:auto;overflow-x:hidden}@media (min-width: 320px){:host(.open) .vega-sidebar .vega-handler-icon{display:block}}:host(.open) .vega-sidebar .vega-handler-icon vega-icon{transform:rotate(180deg)}@media (min-width: 320px){:host(.open) .vega-sidebar .vega-handler-icon.disable-collapse{display:block}}@media (min-width: 1024px){:host(.open) .vega-sidebar .vega-handler-icon.disable-collapse{display:none}}:host(.open) .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{opacity:1;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-delay:100ms}:host(.open) .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container{opacity:1}:host(.open) .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container{opacity:0}:host(.open) .vega-sidebar .vega-nav-footer .vega-nav-footnote{opacity:1;transition-delay:100ms}';class Z extends V{constructor(){super({parent:"vega-sidenav",subStates:[{subStateName:"openState",parentStateName:"openState"}]})}}!function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l({writable:!0})],Z.prototype,"openState",void 0);const K=e=>e instanceof HTMLElement&&"VEGA-SIDENAV-LINK"===e.tagName;var T=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const W=class{constructor(e){i(this,e),this.subStateObserverSlimmer=new Z,this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.openState="close",this.label="",this.handleClick=e=>{const i=e.currentTarget;i&&"$1"===i.dataset.root&&(e.preventDefault(),i.closest(".vega-li-main").classList.toggle("open"))}}disconnectedCallback(){I.unregister(D,this.observer)}componentWillLoad(){this.observer=new L(K,this.observerListener.bind(this)),I.register(D,this.observer)}render(){return r(e(s,null,e("div",{class:{"vega-li-main":!0,"sidenav-open":"close"!==this.openState},ref:e=>this.groupContainer=e},e("a",{href:`#${this.label}`,role:"button",tabIndex:0,onKeyDown:x(),"data-root":"$1",onClick:this.handleClick,"aria-label":this.label||"No label defined"},e("div",{class:"vega-links-icon"},e("div",{class:"prefix-icon"},e("vega-icon",{icon:this.icon,size:"size-24"}))),e("span",{class:"vega-links-name"},this.label),e("div",{class:"suffix-icons"},e("vega-icon",{icon:"chevron-down",size:"size-12"}),e("vega-icon",{icon:"chevron-up",size:"size-12"}))),e("div",{class:"vega-nav-list vega-nav-list-sub"},e("slot",null)))),this.host)}observerListener(e){this.host.contains(e)?(this.groupContainer.querySelector("a").classList.add("sub-selected"),this.groupContainer.classList.add("open")):(this.groupContainer.querySelector("a").classList.remove("sub-selected"),this.groupContainer.classList.remove("open"))}get host(){return n(this)}};T([c()],W.prototype,"subStateObserverSlimmer",void 0),T([g()],W.prototype,"globalSlimmers",void 0),T([c()],W.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),W.style=':host{display:block;margin-top:4px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;width:100%;box-sizing:border-box}:host a{display:flex;align-items:center;width:100%;height:100%;position:relative;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;overflow:hidden;color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1));cursor:pointer;text-decoration:none;border-radius:8px;box-sizing:border-box;outline:2px solid transparent;outline-offset:2px}:host .vega-nav-list{padding:0px;margin:0px;flex:1 1 0%;list-style-type:none}:host .vega-li-main.sidenav-open .vega-nav-list{overflow-y:auto;overflow-x:hidden}:host .vega-nav-list::-webkit-scrollbar{background-color:rgba(var(--v-bg-sidebar, 18, 18, 39, 1));width:4px}:host .vega-nav-list::-webkit-scrollbar-thumb{background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1));border-radius:9999px}:host a.sub-selected{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1))}:host .vega-li-main.sidenav-open a:focus{border-color:rgba(var(--v-border-color-sidebar-item-focus, 19, 98, 226, 1))}:host .vega-li-main.sidenav-open a:not(.selected):hover{background-color:rgba(var(--v-bg-sidebar-item-hover, 252, 252, 252, 1));color:rgba(var(--v-text-sidebar-link-hover, 18, 18, 39, 1))}:host .vega-links-icon{padding:8px;box-sizing:border-box}:host a .vega-links-icon>div{display:flex;justify-content:center;align-items:center;flex-shrink:0;border-radius:8px;height:100%;width:100%}:host .vega-links-icon .prefix-icon{width:40px;height:40px}:host .vega-nav-list-sub .vega-links-icon{height:auto;width:auto}:host a .vega-links-name{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;opacity:0;pointer-events:none;overflow:hidden;font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px;flex:1 1 0%;padding-top:8px;padding-bottom:8px;transition-duration:300ms}@media screen and (min-width: 768px) and (max-width: 1023px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host .vega-li-main.sidenav-open a .vega-links-name{opacity:1;pointer-events:auto;overflow-wrap:break-word}:host .suffix-icons{padding-right:16px;padding-left:8px;width:12px}:host .suffix-icons vega-icon{pointer-events:auto;transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;opacity:0;position:absolute;right:16px;top:50%;transform:translateY(-50%)}:host .vega-li-main.sidenav-open .suffix-icons vega-icon,:host .vega-li-main.sidenav-open.open>a>.suffix-icons vega-icon:first-of-type{opacity:0}:host .vega-li-main.sidenav-open .suffix-icons vega-icon:first-of-type,:host .vega-li-main.sidenav-open.open>a>.suffix-icons vega-icon:last-of-type{opacity:1}:host .vega-nav-list-sub{display:none}:host .vega-li-main.sidenav-open.open>.vega-nav-list-sub{display:block}:host ::slotted(vega-sidenav-group){padding-left:48px}:host ::slotted(vega-sidenav-link){padding-left:48px}@media (min-width: 768px){:host{width:224px}}';class F extends V{constructor(){super({parent:"vega-sidenav",subStates:[{subStateName:"openState",parentStateName:"openState"}]})}}!function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l({writable:!0})],F.prototype,"openState",void 0);var P=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const G=class{constructor(e){i(this,e),this.vegaClick=t(this,"vegaClick",7),this.click=t(this,"click",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.subStateObserverSlimmer=new F,this.clickEventEmitter=O(G,R),this.openState="close",this.selected=!1,this.showSideBarOnClickLink=!1,this.handleClick=e=>{this.selected||(this.selected=!0),this.clickEventEmitter.emit(),this.notifyParentSidenavClick(),"native"===M.getSemantics(this.host).namespace&&e.stopPropagation()}}disconnectedCallback(){I.unregister(D,this.observer)}componentWillLoad(){H(this.host,"vega-sidenav-group")&&this.host.classList.add("has-group-parent"),this.observer=new L(K,this.observerListener.bind(this)),I.register(D,this.observer)}componentDidRender(){this.selected&&I.notify(D,this.host)}render(){return r(e(s,{class:{"sidenav-open":"close"!==this.openState}},e("a",{href:this.url||"javascript:void(0);",onClick:this.handleClick,class:{selected:!0===this.selected}},this.icon?e("div",{class:"vega-links-icon"},e("div",{class:"prefix-icon"},e("vega-icon",{icon:this.icon,size:"size-24"}))):null,e("span",{class:"vega-links-name"},e("slot",null)))),this.host)}observerListener(e){e!==this.host&&(this.selected=!1)}notifyParentSidenavClick(){const e=H(this.host,"vega-sidenav");e&&I.notify(B.getSubject(e,C),{host:this.host,detail:this.showSideBarOnClickLink})}get host(){return n(this)}};P([g()],G.prototype,"globalSlimmers",void 0),P([c()],G.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),P([c()],G.prototype,"subStateObserverSlimmer",void 0),P([c()],G.prototype,"clickEventEmitter",void 0),G.style=':host{display:block;margin-top:4px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;width:100%;box-sizing:border-box}:host a{display:flex;align-items:center;width:100%;height:100%;position:relative;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;overflow:hidden;color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1));cursor:pointer;text-decoration:none;border-radius:8px;box-sizing:border-box;outline:2px solid transparent;outline-offset:2px}:host a.selected{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1));background:transparent}:host .vega-links-icon{padding:8px;box-sizing:border-box}:host a.selected .vega-links-icon{border-radius:8px;background-color:rgba(var(--v-bg-sidebar-item-selected, 19, 98, 226, 0.4))}:host a .vega-links-icon>div{display:flex;justify-content:center;align-items:center;flex-shrink:0;border-radius:8px;height:100%;width:100%}:host a.selected .vega-links-icon>div{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host .vega-links-icon .prefix-icon{width:40px;height:40px}:host a .vega-links-name{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;opacity:0;pointer-events:none;overflow:hidden;font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px;flex:1 1 0%;padding-top:8px;padding-bottom:8px;transition-duration:300ms}@media screen and (min-width: 768px) and (max-width: 1023px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host(.has-group-parent:not([icon])) .vega-links-name{padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}:host(.sidenav-open) a:focus{border-color:rgba(var(--v-border-color-sidebar-item-focus, 19, 98, 226, 1))}:host(.sidenav-open) a:not(.selected):hover{background-color:rgba(var(--v-bg-sidebar-item-hover, 252, 252, 252, 1));color:rgba(var(--v-text-sidebar-link-hover, 18, 18, 39, 1))}:host(.sidenav-open) a.selected{background-color:rgba(var(--v-bg-sidebar-item-selected, 19, 98, 226, 0.4))}:host(.sidenav-open) a.selected .vega-links-icon{background:transparent}:host(.sidenav-open) a .vega-links-name{opacity:1;pointer-events:auto;overflow-wrap:break-word}@media (min-width: 768px){:host{width:224px}}';export{A as vega_sidenav,W as vega_sidenav_group,G as vega_sidenav_link}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as o}from"./p-b1faebe0.js";import{R as e}from"./p-03e9cbc8.js";function f(f,i,r,s){return o(f)?{flex:`${e.formatCustom(f)}`}:{flexGrow:o(i)?`${e.formatCustom(i)}`:void 0,flexShrink:o(r)?`${e.formatCustom(r)}`:void 0,flexBasis:o(s)?`${e.formatCustom(s)}`:void 0}}export{f}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-b5822a21.js";import{b as n,c as s}from"./p-b5bef48a.js";import{c as r}from"./p-02841589.js";import{L as i}from"./p-6e1ab235.js";import{i as o}from"./p-5e2c9e69.js";import{g as a}from"./p-a4670e23.js";import{V as c}from"./p-7e8f055d.js";import{c as l}from"./p-bf19682d.js";import{f as h}from"./p-575235c8.js";var u,d;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(u||(u={}));class p{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT",t.LIST="LIST",t.INTERNAL_WRAPPER="INTERNAL_WRAPPER"}(d||(d={}));class f extends p{}const g=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap,this.contentEntityToRootDom=new Map,this.rootDomToContentEntity=new WeakMap}register(t,e){this.isVegaRTEContent(e)?this.registerRootDomAndContentEntity(t,e):(this.domToEntity.set(t,e),this.entityToDOM.set(e,t))}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.isVegaRTEContent(t)?this.contentEntityToRootDom.get(t):this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}registerRootDomAndContentEntity(t,e){const n=this.rootDomToContentEntity.get(t);n&&n!==e&&this.contentEntityToRootDom.delete(n),this.rootDomToContentEntity.set(t,e),this.contentEntityToRootDom.set(e,t)}isVegaRTEContent(t){return t&&"VegaRTEContent"===t.constructor.name}};var x,m,w,A;!function(t){t.DELETE_CHILDREN="DELETE_CHILDREN",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILDREN="APPEND_CHILDREN",t.INSERT_CHILDREN_AFTER="INSERT_CHILDREN_AFTER",t.INSERT_CHILDREN_BEFORE="INSERT_CHILDREN_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.INSERT_NEW_PARAGRAPH="INSERT_NEW_PARAGRAPH",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK",t.UNLINK_LINK_GROUP="UNLINK_LINK_GROUP",t.LINK_GROUP_NODE_SPLIT="LINK_GROUP_NODE_SPLIT",t.DELETE_LINK_GROUP="DELETE_LINK_GROUP",t.UPDATE_CURSOR_POSITION="UPDATE_CURSOR_POSITION",t.INSERT_TEXT_TO_DECORATOR_NODE="INSERT_TEXT_TO_DECORATOR_NODE"}(x||(x={}));class y{constructor(){this.isFlushable=!1}}class E extends p{constructor(t){super(),this.type=u.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}clone(){const t=new E("");return this.linkGroups.forEach(((e,n)=>{t.linkGroups.set(n,e.map((t=>t.clone())))})),t}toString(t,e){const n=this.toJsx(t,e);return Object.entries(n).map((([t,e])=>{const n="string"==typeof e?e:this.formatStyleToString(e);return`${r(t)}="${n}"`})).join(" ")}toJsx(t,e){const n=this.getStyle(t,e),s=this.getClass(t,e),r=this.getAttribute(t,e);return s.length>0&&(r.class=s.join(" ")),n&&Object.keys(n).length>0&&(r.style=n),r}getClass(t,e){const n=[];return t.link.customClass&&n.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&n.push("v-rte--link"),n}getStyle(t,e){const n={};return t.link.customStyle&&Object.assign(n,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&(n.color="rgba(var(--v-text-link, 19, 98, 226, 1))"),n}getAttribute(t,e){var n;const{href:s,customAttribute:r={}}=t.link,i=null===(n=null==e?void 0:e.autoMatchFormat)||void 0===n||n,o=r.target||(i?"_blank":"");return Object.assign(Object.assign(Object.assign({},r),s||i?{href:s}:{}),o?{target:o}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${r(t)}: ${e};`)).join(" ")}}class O extends f{constructor(t){super(),this.type=d.ALIGNMENT,this.textAlign=t}static from(t){return[d.ALIGNMENT,new O(t)]}toJSON(){return{textAlign:this.textAlign}}renderClass(t){if(null==t?void 0:t.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 O(this.textAlign)}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;switch(this.textAlign){case"right":case"center":case"justify":return{textAlign:this.textAlign};case"left":default:return{textAlign:"left"}}}}class S extends f{constructor(t){super(),this.type=d.INDENT,this.indent=Math.max(0,t)}static from(t){return[d.INDENT,new S(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new S(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class T{static register(t,e,n){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,n)}static get(t,e){const n=this.registry.get(e);if(n)return n.get(t)}static executeTheStrategy(t,e){const n=t instanceof y?t.type:t.constructor.name,s=T.get(n,e.constructor.name);if(s)return s.execute(t,e);i.error(`Type ${n} action handle strategy is not registered in class ${e.constructor.name}`)}}T.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(m||(m={}));class N extends p{}class C extends N{constructor(t){super(),this.type=m.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[m.CUSTOM_ATTRIBUTE,new C(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new C(this.customAttribute)}toString(t=[]){const e=t.map((t=>t.split("=")[0]));return Object.keys(this.customAttribute).map((t=>e.includes(t)?null:`${t}="${this.customAttribute[t]}"`)).filter(o)}render(t={}){var e;const n=Object.assign({},this.customAttribute);return null===(e=t.filterAttributes)||void 0===e||e.forEach((t=>delete n[t])),Object.keys(n).forEach((t=>{this.BOOLEAN_ATTRS.has(t)&&""===n[t]&&(n[t]="true")})),n}}class v extends N{constructor(t){super(),this.type=m.CUSTOM_CLASS,this.customClass=t}static from(t){return[m.CUSTOM_CLASS,new v(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new v(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class b extends N{constructor(t){super(),this.type=m.CUSTOM_STYLE,this.customStyle=t}static from(t){return[m.CUSTOM_STYLE,new b(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new b(this.customStyle)}renderStyle(){return this.customStyle}removeStyles(t){const e=Object.assign({},this.customStyle);return t.forEach((t=>delete e[t])),e}toString(){return`style="${Object.entries(this.customStyle).map((([t,e])=>`${t}: ${e};`)).join(" ")}"`}}class _ extends f{constructor(t){super(),this.type=d.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[d.INTERNAL_WRAPPER,new _(t)]}clone(){return new _(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class L{constructor(t){this.annotationMap=new Map,this.id=t}static from(t,e){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return O.from(e);case"indent":return S.from(e);case"customAttribute":return C.from(e);case"customClass":return v.from(e);case"customStyle":return b.from(e);case"internalWrapper":return _.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,n])=>{const s=this.createAnnotationEntity(e,n);o(s)&&t.set(...s)}))}shouldRenderAsInternalWrapper(){const t=this.getAnnotationByType(d.INTERNAL_WRAPPER);return!!t&&t.internalWrapper&&0===Array.from(this.annotationMap.values()).filter((t=>!(t instanceof E||t instanceof _))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof N)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(s){if(this.doApply(s),s.isFlushable){const s=g.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){return Object.assign(Object.assign({},Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof b)).map((e=>e.renderStyle(t))).filter(o).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof v)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(m.CUSTOM_ATTRIBUTE)}generateAttributeString(...t){var e;const n=Object.entries(Object.assign({},this.getStyles({standalone:!0}))).map((([t,e])=>`${r(t)}: ${e};`)).join(""),s=this.annotationMap.get(m.CUSTOM_CLASS),i=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==s?void 0:s.toString(),n?`style="${n}"`:null,...t].filter(o);return i.length?` ${i.join(" ")}`:""}doApply(t){t instanceof y?T.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();e instanceof E||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply&&this.doAnnotationActionApply(t)}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}!function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK",t.INLINE_HTML="INLINE_HTML",t.PLAIN_TEXT="PLAIN_TEXT"}(w||(w={}));class R extends p{}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(A||(A={}));class I{constructor(t,e){this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}static from(t,e,n){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}, ${n}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return C.from(e);case"customClass":return v.from(e);case"customStyle":return b.from(e)}}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}getStyles(t={standalone:!1}){const e=Array.from(this.annotationMap.values()).filter((t=>t instanceof R||t instanceof b)).map((e=>e.renderStyle(t))).filter(Boolean);return this.mergeAnnotationStyles(e,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof R||t instanceof v)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(m.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}generateAttributeString(...t){var e;const n=Object.entries(Object.assign({},this.getStyles({standalone:!0}))).map((([t,e])=>`${r(t)}: ${e};`)).join(""),s=this.annotationMap.get(m.CUSTOM_CLASS),i=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==s?void 0:s.toString(),n?`style="${n}"`:null,...t].filter(o);return i.length?` ${i.join(" ")}`:""}doApply(t){t instanceof y?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const s=g.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}doAnnotationActionApply(t){}doModifyActionApply(t){}mergeAnnotationStyles(t,e){const n={};for(const s of t)for(const t in s){const r=s[t],i=n[t];n[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return n}}class B{}class $ extends B{constructor(){super(...arguments),this.doSplit=!0}}class D extends p{constructor(t){super(),this.type=u.SELECTION_RANGE,this.range=t}clone(){return new D(this.range)}}class k extends R{constructor(t){super(),this.type=w.STRIKETHROUGH,this.strikethrough=t}static from(t){return[w.STRIKETHROUGH,new k(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new k(this.strikethrough)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.strikethrough?"v-rte--strikethrough":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.strikethrough?{textDecoration:"line-through"}:null}}class M extends R{constructor(t){super(),this.type=w.UNDERLINE,this.underline=t}static from(t){return[w.UNDERLINE,new M(t)]}toJSON(){return{underline:this.underline}}clone(){return new M(this.underline)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.underline?"v-rte--underline":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.underline?{textDecoration:"underline"}:null}}class j extends R{constructor(t){super(),this.type=w.ITALIC,this.italic=t}static from(t){return[w.ITALIC,new j(t)]}toJSON(){return{italic:this.italic}}clone(){return new j(this.italic)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.italic?"v-rte--italic":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.italic?{fontStyle:"italic"}:null}}class P extends R{constructor(t){super(),this.type=w.BOLD,this.bold=t}static from(t){return[w.BOLD,new P(t)]}toJSON(){return{bold:this.bold}}clone(){return new P(this.bold)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.bold?"v-rte--bold":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.bold?{fontWeight:"700"}:null}}class F extends R{constructor(t,e=!0){super(),this.type=w.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[w.CODE,new F(t,e)]}toJSON(){return{code:this.code}}clone(){return new F(this.code,this.useInternalStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.code&&this.useInternalStyle?"v-rte--code":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.code&&this.useInternalStyle?{fontFamily:"Roboto Mono",whiteSpace:"pre-wrap"}:null}}const H={key:"black",light:"#111128",dark:"#E3E3E8"},W=[H,{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"}],K="";class J extends R{constructor(t){super(),this.type=w.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[w.TEXT_COLOR,new J(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new J(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:c.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return W.find((e=>e.key===t))||W[0]}}class U extends R{constructor(t,e=!0){super(),this.type=w.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[w.LINK,new U(t,e)]}toJSON(){return{link:this.link}}clone(){return new U(this.link)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class G extends B{constructor(t,e,n){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=n}toAnnotation(){return new E(this.groupKey)}}class z extends B{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}const X=new class{constructor(){this.RTE_BLOCK_DTO_CLASS_MAP=new Map,this.RTE_NODE_DTO_CLASS_MAP=new Map}registerRTEDTOClass(t,e){if(e.prototype instanceof L)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof I))throw new Error(`Invalid RTE DTO class type: ${t}`);this.RTE_NODE_DTO_CLASS_MAP.set(t,e)}}getRTEBlockClass(t){return this.RTE_BLOCK_DTO_CLASS_MAP.get(t)}getRTENodeClass(t){return this.RTE_NODE_DTO_CLASS_MAP.get(t)}};class V{execute(t,e){return i.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}updateCustomStyleAnnotation(t,e){const n=t.annotationMap.get(m.CUSTOM_STYLE);n&&this.isCustomStyle(n,e)&&t.annotationMap.set(n.type,new b(n.removeStyles(e)))}createNewParagraph(t){const e=X.getRTEBlockClass("paragraph");if(e)return e.from({id:a(),type:"paragraph",nodes:[{id:a(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.constructor.name?e:this.getRootContent(e)}isCaretPositionAtBlockStart(t,e,n){return e===t.children[0]&&0===n}isCaretPositionAtBlockEnd(t,e,n){return e.isContentEditable()?this.isCaretPositionAtTextBlockEnd(t,e,n):this.isCaretPositionAtDecoratorBlockEnd(t,e,n)}isCaretPositionAtTextBlockEnd(t,e,n){const s=t.children[t.children.length-1];return e===s&&(e.isEmpty()||n===s.text.length)}isCaretPositionAtDecoratorBlockEnd(t,e,n){return e===t.children[t.children.length-1]&&0!==n}isCustomStyle(t,e){return e.some((e=>Object.keys(t.customStyle).includes(e)))}}class q extends y{constructor(t){super(),this.type=x.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class Y extends V{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const n=e.getAnnotationByType(u.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof $&&t.doSplit&&n){const{startContainer:t,endContainer:s,startOffset:r,endOffset:i}=n.range,o=t===s&&r===i;e.parent.children=e.parent.children.flatMap((t=>{if(t.id===e.id){if(o)return this.insertNewNode(r,e);if(this.shouldSplitSelection(n.range)){const s=this.splitTextNode(n.range,e);return t.annotationMap.has("LINK")&&t.apply(new q(s)),s}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const n=e.cloneWithText("");return this.setApplyTargetNode(n),0===t?[n,e]:t===e.text.length?[e,n]:[e.cloneWithText(e.text.substring(0,t)),n,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:n,startOffset:s,endOffset:r}=t;return e!==n||s>0||r<(n.textContent?n.textContent.length:0)}splitTextNode(t,e){const{startContainer:n,endContainer:s,startOffset:r}=t,i=n.parentElement,o=s.parentElement,a=(t,n,s)=>{const r=t.substring(0,n),i=t.substring(n,s),o=t.substring(s);return[e.cloneWithText(r),e.cloneWithText(i),e.cloneWithText(o)]},c=i&&g.getEntityByDOM(i),l=o&&g.getEntityByDOM(o);if(c&&c.id===e.id){const i=n===s?t.endOffset:e.text.length,[o,c,l]=a(e.text,r,i);return this.setApplyTargetNode(c),[o,c,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[n,s,r]=a(e.text,0,t.endOffset);return this.setApplyTargetNode(s),[n,s,r].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}class Q extends ${constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new P(this.bold)}}class Z extends p{constructor(){super(...arguments),this.type=u.CLEAR_FORMATTING,this.items=[w.BOLD,w.ITALIC,w.UNDERLINE,w.STRIKETHROUGH,w.TEXT_COLOR,w.CODE,m.CUSTOM_STYLE]}}class tt extends ${constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Z}}class et extends ${constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new F(this.code)}}class nt extends B{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class st extends ${constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new j(this.italic)}}class rt extends ${constructor({link:t,newText:e,needMergeNode:n,doSplit:s,type:r}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=n,this.newText=e,this.type=r,o(s)&&(this.doSplit=s)}toAnnotation(){return new U(this.link)}}class it extends ${constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new k(this.strikethrough)}}class ot extends ${constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new M(this.underline)}}class at extends V{handleAction(t,e){const n=t.toAnnotation();if(t instanceof nt)e.annotationMap.delete(t.annotationType);else{if(!(n instanceof Z))return n instanceof R||n instanceof D?(t instanceof rt&&(o(t.newText)&&(e.text=t.newText),e.parent.apply(new G(t.link.groupKey,[e],t.type))),t instanceof et&&this.handleAction(new tt,e),t instanceof Q&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof st&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof ot||t instanceof it)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(n.type,n)):void 0;n.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class ct extends y{constructor(){super(...arguments),this.type=x.DELETE_LINK_GROUP}}class lt extends V{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new ct)}}class ht extends y{constructor(t){super(),this.type=x.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class ut extends V{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,n){if(e&&e.startContainer&&e.endContainer){const{startContainer:s,endContainer:r,startOffset:i,endOffset:o}=e;let a=n.text;if(s===r&&i===o&&t)a=n.text.slice(0,i)+t+n.text.slice(i);else{const e=s.parentElement,c=r.parentElement,l=e&&g.getEntityByDOM(e),h=c&&g.getEntityByDOM(c);let u=0,d=n.text.length;l&&l===n?(u=i,d=s===r?o:d):h&&h===n&&(d=o),a=n.text.slice(0,u)+t+n.text.slice(d)}n.apply(new ht(a))}}}class dt extends p{constructor(t){super(),this.type=w.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:n,customStyle:s,customClass:r,customAttribute:i}=t,o=new dt(e);return o.child=n?dt.from(n)[1]:void 0,o.customAttribute=i?C.from(i)[1]:void 0,o.customClass=r?v.from(r)[1]:void 0,o.customStyle=s?b.from(s)[1]:void 0,[w.INLINE_HTML,o]}clone(){var t,e,n,s;const r=new dt(this.htmlTag);return r.child=null===(t=this.child)||void 0===t?void 0:t.clone(),r.customAttribute=null===(e=this.customAttribute)||void 0===e?void 0:e.clone(),r.customClass=null===(n=this.customClass)||void 0===n?void 0:n.clone(),r.customStyle=null===(s=this.customStyle)||void 0===s?void 0:s.clone(),r}toJSON(){var t,e,n,s;return{inlineHtml:l({htmlTag:this.htmlTag,child:null===(t=this.child)||void 0===t?void 0:t.toJSON().inlineHtml,customAttribute:null===(e=this.customAttribute)||void 0===e?void 0:e.toJSON().customAttribute,customClass:null===(n=this.customClass)||void 0===n?void 0:n.toJSON().customClass,customStyle:null===(s=this.customStyle)||void 0===s?void 0:s.toJSON().customStyle})}}}class pt extends V{handleAction(t,e){const n=e.parent.getAnnotationByType(u.LINK_GROUP);if(n){const s=e.annotationMap.get("LINK").link.groupKey,r=n.linkGroups.get(s);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),n.linkGroups.set(s,r))}}}}class ft extends V{handleAction(t,e){const n=e.parent.getAnnotationByType(u.LINK_GROUP);if(n){const t=e.annotationMap.get(w.LINK).link.groupKey,s=n.linkGroups.get(t);if(s){const r=s.indexOf(e);-1!==r&&s.splice(r,1),0===s.length&&n.linkGroups.delete(t),0===n.linkGroups.size&&e.parent.annotationMap.delete(u.LINK_GROUP)}}e.annotationMap.delete(w.LINK)}}class gt extends R{constructor(t){super(),this.type=w.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[w.PLAIN_TEXT,new gt(t)]}clone(){return new gt(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return{plainText:this.plainText}}}class xt extends I{constructor(t,e,n,s){super(t,s),this.type=A.TEXT,this.parent=n,this.text=e,this.registerModifyStrategy()}static supportsHtmlTag(t){return["span","code"].includes(t)}static from(t,e,n={autoMatchFormat:!0}){const s=new xt(t.id,t.text,e),{annotations:r}=t;return r&&(s.annotationMap=new Map(Object.keys(r).map((t=>("link"===t&&r.link&&e&&e.apply(new G(r.link.groupKey,[s],"link")),this.createAnnotationEntity(t,r[t],n)))).filter(o))),s}static createAnnotationEntity(t,e,n){const s=!(!n||!n.autoMatchFormat);switch(t){case"bold":return P.from(e);case"italic":return j.from(e);case"underline":return M.from(e);case"strikethrough":return k.from(e);case"code":return F.from(e,s);case"textColor":return J.from(e);case"link":return U.from(e,s);case"inlineHtml":return dt.from(e);case"plainText":return gt.from(e)}return I.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof R||t instanceof N||t instanceof dt)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}toHtml(){const t=this.getAnnotationByType(w.INLINE_HTML);return t?this.renderWithWrapperStr(t):this.renderTextStr()}cloneWithText(t){return new xt(a(),t,this.parent,super.cloneAnnotations())}clone(){return new xt(this.id,this.text,this.parent,super.cloneAnnotations())}isEmpty(){return!this.text||""===this.text||"\n"===this.text}isTextNode(){return!0}getRangeEndOffset(){return!this.isContentEditable()&&this.parent?this.parent.children.indexOf(this)+1:"\n"===this.text?0:this.text.length}getRangeContainer(){const t=g.getDOMByEntity(this);if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}registerModifyStrategy(){const t=this.constructor.name;xt.registerActionStrategyStatus[t]||(this.isContentEditable()&&(T.register(x.UPDATE_TEXT,t,new lt),T.register(x.REPLACE_SELECTED_TEXT,t,new ut),T.register($.name,t,new Y)),T.register(x.LINK_GROUP_NODE_SPLIT,t,new pt),T.register(x.DELETE_LINK_GROUP,t,new ft),T.register(B.name,t,new at),xt.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(u.SELECTION_RANGE);if(t instanceof $&&t.doSplit&&e){const e=T.get($.name,this.constructor.name);if(e){const n=e.execute(t,this);n&&this.applyActionToNode(n,t)}}else this.applyActionToNode(this,t);"function"==typeof this.parent.mergeNodes&&this.parent.mergeNodes(t)}doModifyActionApply(t){T.executeTheStrategy(t,this)}applyActionToNode(t,e){const n=e.toAnnotation();if(e instanceof z)return void this.syncUpSelectedNodes(t);n instanceof D||this.syncUpSelectedNodes(t);const s=T.get(B.name,xt.name);s&&s.execute(e,t)}syncUpSelectedNodes(n){const r=g.getDOMByEntity(this);if(r){const i=e.getSubjectFromParentNodeByEventId(r,s);i&&t.notify(i,{node:n})}}renderWithWrapperStr(t){const{htmlTag:e,customAttribute:n,customClass:s,customStyle:r,child:i}=t,a=[...(null==n?void 0:n.toString())||[],null==s?void 0:s.toString(),null==r?void 0:r.toString()].filter(o),c=a.length>0?` ${a.join(" ")}`:"";return i?`<${e}${c}>${this.renderWithWrapperStr(i)}</${e}>`:`<${e}${c}>${this.renderTextStr()}</${e}>`}renderTextStr(){var t;const e=(null===(t=this.getAnnotationByType(w.CODE))||void 0===t?void 0:t.code)?"code":"span",n=super.generateAttributeString();return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${e}${n}>${this.text}</${e}>`}shouldRenderAsPlainText(){const t=super.getAnnotationByType(w.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof R&&!(t instanceof U)&&!(t instanceof gt)||t instanceof N)).length}}xt.registerActionStrategyStatus={},xt.htmlTag="span";class mt extends y{constructor(t){super(),this.type=x.APPEND_CHILDREN,this.entityToBeAppended=t}}class wt extends f{constructor(t){super(),this.type=d.TEXT_STYLE,this.textStyle=t}static from(t){return[d.TEXT_STYLE,new wt(t)]}toJSON(){return{textStyle:this.textStyle}}clone(){return new wt(this.textStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.textStyle?`v-rte--text-style-${this.textStyle}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};switch(this.textStyle){case"paragraph":return e;case"title":return{fontFamily:"Inter",fontSize:"36px",lineHeight:"40px",fontWeight:"500"};case"subtitle":return{fontFamily:"Inter",fontSize:"28px",lineHeight:"32px",fontWeight:"500"};case"heading-1":return{fontFamily:"Inter",fontSize:"22px",lineHeight:"24px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-2":return{fontFamily:"Inter",fontSize:"20px",lineHeight:"24px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-3":return{fontFamily:"Inter",fontSize:"18px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-4":return{fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-5":return{fontFamily:"Inter",fontSize:"14px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-6":return{fontFamily:"Inter",fontSize:"12px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"}}}}class At extends B{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new wt(this.textStyle)}}class yt extends y{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class Et extends y{constructor(t){super(),this.type=x.REPLACE_CHILD_NODES,this.newChildNodes=t}}class Ot extends V{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,n){if(t){const s=t.text.slice(0,e),r=t.text.slice(e),i=n.children.indexOf(t);if(i>-1){const e=n.children.slice(0,i),o=n.children.slice(i+1);s&&e.push(t.cloneWithText(s)),r&&o.unshift(t.cloneWithText(r)),n.apply(new Et(e));const a=n.cloneWithNodes(o);return n.parent.apply(new yt(n,a)),a}}}}class St extends V{handleAction(t,e){e.children=[],e.apply(new mt(t.newChildNodes))}}class Tt extends y{constructor(t){super(),this.type=x.DELETE_CHILDREN,this.entityToBeRemoved=t}}class Nt extends V{handleAction(t,e){const n=t.blockNeedToBeMerged;if(e.type===n.type||"image"!==e.type&&"image"!==n.type){let t=n.children;"image"!==n.type&&(t=n.children.filter((t=>t.text))),e.apply(new mt(t)),n.parent.apply(new Tt(n))}}}class Ct extends V{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,n){if(t){const s=new xt(a(),"\n",n),r=t.text.slice(0,e),i=t.text.slice(e),o=n.children.indexOf(t);if(o>-1){const e=n.children.slice(0,o),a=n.children.slice(o+1);r&&e.push(t.cloneWithText(r)),i&&a.unshift(t.cloneWithText(i)),this.mergeLineBreakNodes(e,s,a,n)}return s}}mergeLineBreakNodes(t,e,n,s){(0===n.length||n[0]&&""===n[0].text)&&n.push(new xt(a(),"\n",s,t[t.length-1]&&t[t.length-1].annotationMap)),s.apply(new Et([...t,e,...n]))}}class vt extends V{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const n=e.children,s=new xt(a(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(n,s,r,e),s}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new Tt(t)))})),e}mergeLineBreakNodes(t,e,n,s){(0===n.length||n[0]&&""===n[0].text)&&n.push(new xt(a(),"\n",s,t[t.length-1]&&t[t.length-1].annotationMap)),s.apply(new Et([...t,e,...n]))}}class bt extends y{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class _t extends y{constructor(t,e){super(),this.type=x.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class Lt extends B{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new O(this.textAlign)}}class Rt extends V{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class It extends B{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new S(this.indent)}}class Bt extends L{constructor(t,e,n){super(t),this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&(this.annotationMap=Bt.isAcceptableTextStyle(e)?new Map([wt.from(e)]):new Map([wt.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var n,s;const r=new Bt(t.id,t.type,e),i=e.autoMatchFormat?Object.assign(Object.assign({},t.annotations),{textStyle:null!==(s=null===(n=t.annotations)||void 0===n?void 0:n.textStyle)&&void 0!==s?s:r.type}):t.annotations;return r.children=t.nodes.map((t=>{const n=X.getRTENodeClass(t.type);if(n)return n.from(t,r,e)})).filter(o),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?wt.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,n)=>{const s=e.at(-1);if(t instanceof rt&&t.needMergeNode){const t=null==s?void 0:s.getAnnotationByType(w.LINK),r=n.getAnnotationByType(w.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,n]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag(),n=super.generateAttributeString(),s=this.getAnnotationByType(u.LINK_GROUP);let r=this.children.map((t=>t.toHtml())).join("");return s&&this.children.length>0&&(r=this.generateLinkHtml(s,r,t)),super.shouldRenderAsInternalWrapper()?r:[`<${e}${n}>`,r,`</${e}>`].join("")}cloneWithNodes(t){const e=new Bt(a(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new mt(t)),e}clone(){const t=new Bt(this.id,this.type);return t.children=this.children.map((e=>{const n=e.clone();return n.parent=t,n})),t.annotationMap=super.cloneAnnotations(),t.parent=this.parent,t}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.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"}}doAnnotationActionApply(t){const e=T.get(t.constructor.name,Bt.name);e&&e.execute(t,this)}generateLinkHtml(t,e,n){e="";let s=[];for(let r=0;r<this.children.length;r++){const i=this.children[r].getAnnotationByType(w.LINK),o=this.children[r+1]?this.children[r+1].getAnnotationByType(w.LINK):null;if(i){if(s.push(this.children[r]),!o||i.link.groupKey!==o.link.groupKey){const r=t.toString(i,{standalone:!0,autoMatchFormat:null==n?void 0:n.autoMatchFormat});e+=[`<a${r?` ${r}`:""}>`,s.map((t=>t.toHtml())).join(""),"</a>"].join(""),s=[]}}else e+=this.children[r].toHtml()}return e}}T.register(At.name,Bt.name,new class extends V{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new Q(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new nt(w.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}),T.register(Lt.name,Bt.name,new Rt),T.register(It.name,Bt.name,new class extends V{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),T.register(G.name,Bt.name,new class extends V{handleAction(t,e){let n=e.getAnnotationByType(u.LINK_GROUP);if("update_link"===t.type){if(n){const e=n.linkGroups.get(t.groupKey);e&&n.linkGroups.set(t.groupKey,[e[0]])}}else{if(n){const e=n.linkGroups.get(t.groupKey)||[];n.linkGroups.set(t.groupKey,[...e,...t.nodes])}else n=t.toAnnotation(),n.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(u.LINK_GROUP,n)}}}),T.register(x.UNLINK_LINK_GROUP,Bt.name,new class extends V{handleAction(t,e){const n=e.getAnnotationByType(u.LINK_GROUP);n&&(n.linkGroups.size>1?n.linkGroups.delete(t.groupKey):e.annotationMap.delete(u.LINK_GROUP))}}),T.register(x.SPLIT_BLOCK_WITH_NODE,Bt.name,new Ot),T.register(x.REPLACE_CHILD_NODES,Bt.name,new St),T.register(x.MERGE_TWO_BLOCKS_NODES,Bt.name,new Nt),T.register(x.LINE_BREAK_SINGLE_BLOCK,Bt.name,new Ct),T.register(x.LINE_BREAK_MULTIPLE_BLOCKS,Bt.name,new vt),T.register(x.INSERT_IMAGE_TO_BLOCK,Bt.name,new class extends V{handleAction(t,e){const n=t.splitPointNode,s=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,n,s))e.parent.apply(new yt(e,r));else if(this.isCaretPositionAtBlockStart(e,n,s))e.parent.apply(new bt(e,r));else{const t=new _t(n,s);e.apply(t),e.parent.apply(new yt(e,r))}}}),T.register(x.TRANSFORM_LIST_BLOCK,Bt.name,new class extends V{handleAction(t,e){const n=e.parent,s=n.createList(t.listType),r=t.selectedBlocks,i=r.map((t=>n.toListItem(t)));s.apply(new mt(i)),n.apply(new yt(t.selectedBlocks[0],s)),r.forEach((t=>{t.parent.apply(new Tt(t))}))}});class $t extends V{getPreviousNode(t){const e=t.parent,n=e.children.indexOf(t);if(n>0)return e.children[n-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,n=e.children.indexOf(t);if(e.children[n+1])return e.children[n+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,n=e.children.indexOf(t),s=e.parent;if(e.isListItemBlock()){const t=s.parent;return 0===n&&Array.isArray(s.children)&&s.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===s}return 0===n&&Array.isArray(s.children)&&s.children[0]===e}getPreviousBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(("number-list"===t.parent.type||"bullet-list"===t.parent.type)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}}class Dt extends y{constructor(t,e){super(),this.isFlushable=!0,this.type=x.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class kt extends B{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new D(this.range)}}class Mt extends I{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(Mt.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${Mt.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=g.getDOMByEntity(this);if(t)return h(t,`.${Mt.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}Mt.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",Mt.DECORATOR_NODE_CLASS="v-internal-decorator-node";class jt extends Mt{constructor(t,e,n,s){super(t),this.type=A.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=s,this.language=n}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}toHtml(){return`<code style='box-sizing: border-box;color: rgba(var(--v-text-primary, 32, 54, 69, 1));text-align: left;font-family: "Roboto Mono";font-weight: 400;line-height: 22px;font-size: 16px;white-space: pre-wrap;min-height: 22px;tab-size: 2px;'>${this.text}</code>`}clone(){return new jt(this.id,this.text,this.language,this.parent)}doAnnotationActionApply(t){T.executeTheStrategy(t,this)}doModifyActionApply(t){T.executeTheStrategy(t,this)}}T.register(x.UPDATE_CODE_BLOCK,jt.name,new class extends V{handleAction(t,e){const{content:n,language:s}=t;e.language=s,e.text=n}}),T.register(kt.name,jt.name,new class extends V{handleAction(t,e){e.annotationMap.set(u.SELECTION_RANGE,t.toAnnotation())}});var Pt;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(Pt||(Pt={}));class Ft extends V{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&"parent"in e&&e.parent&&(e.isListItemBlock()&&e.nestList&&e.nestList.length||e.parent.apply(new Tt(e)))}}class Ht extends L{constructor(t,e,n){super(t),this.type="code-block",this.children=[new jt(`${t}-1`,e,n,this)]}static from(t){return new Ht(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}toHtml(){const{language:t=Pt["Plain Text"]}=this.children[0];return`<pre data-language="${t}" style="background-color: rgba(var(--v-bg-secondary, 245, 247, 247, 1)); padding: 12px">${this.children.map((t=>t.toHtml()))}</pre>`}clone(){const t=Ht.from(this.toJSON());return t.parent=this.parent,t}apply(s){if(s instanceof y&&T.executeTheStrategy(s,this),s.isFlushable){const s=g.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(u.SELECTION_RANGE)}}T.register(x.DELETE_CODE_BLOCK,Ht.name,new class extends $t{handleAction(t,e){const n=e.children[0],s=e.parent;if(s){let t=this.getPreviousNode(n),r=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(n),r=0),s.apply(new Tt(e));const i=t?g.getDOMByEntity(t):null;if(0===s.children.length){const n=Bt.from({id:a(),type:"paragraph",nodes:[{id:a(),type:"text",text:""}]});e.parent.apply(new mt([n])),t=n.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(n,r,i,o){const a=g.getDOMByEntity(o);if(a){const o=e.getSubjectFromParentNodeByEventId(a,s);o&&t.notify(o,{node:n,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t&&"CODE_BLOCK_NODE"!==t.type?"IMAGE"!==t.type?t.text.length:1:0}}),T.register(x.DELETE_CHILDREN,Ht.name,new Ft),T.register(x.SWITCH_OUT_FROM_CODE_BLOCK,Ht.name,new class extends V{handleAction(n,r){const{content:i,language:o}=n,c=i.split("\n"),l=new Dt(c.slice(0,c.length-2).join("\n"),o);l.isFlushable=!1,r.children[0].apply(l);const h=Bt.from({id:a(),type:"paragraph",nodes:[{id:a(),text:"",type:"text"}]});r.parent.apply(new yt(r,h));const u=g.getDOMByEntity(r);if(u){const n=e.getSubjectFromParentNodeByEventId(u,s);n&&t.notify(n,{node:h.children[0]})}}}),T.register(x.INSERT_IMAGE_TO_BLOCK,Ht.name,new class extends V{handleAction(t,e){e.parent.apply(new yt(e,t.imageBlockToBeInserted))}}),Ht.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{ot as $,V as A,Ct as B,b as C,$t as D,Ft as E,W as F,H as G,Lt as H,yt as I,I as J,Pt as K,rt as L,x as M,R as N,u as O,m as P,Dt as Q,Bt as R,z as S,kt as T,ht as U,$ as V,J as W,jt as X,Q as Y,K as Z,st as _,xt as a,At as a0,wt as a1,P as a2,tt as a3,et as a4,it as a5,It as a6,mt as b,T as c,vt as d,Ot as e,St as f,Nt as g,Tt as h,bt as i,f as j,d as k,L as l,v as m,C as n,Ht as o,w as p,Mt as q,A as r,g as s,N as t,B as u,Et as v,y as w,_t as x,Rt as y,X as z}
|
|
1
|
+
import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-0664ca9c.js";import{b as n,c as s}from"./p-0e954b9b.js";import{c as r}from"./p-02841589.js";import{L as i}from"./p-6e1ab235.js";import{i as o}from"./p-b1faebe0.js";import{g as a}from"./p-a4670e23.js";import{V as c}from"./p-7e8f055d.js";import{c as l}from"./p-bf19682d.js";import{f as h}from"./p-575235c8.js";var u,d;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(u||(u={}));class p{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT",t.LIST="LIST",t.INTERNAL_WRAPPER="INTERNAL_WRAPPER"}(d||(d={}));class f extends p{}const g=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap,this.contentEntityToRootDom=new Map,this.rootDomToContentEntity=new WeakMap}register(t,e){this.isVegaRTEContent(e)?this.registerRootDomAndContentEntity(t,e):(this.domToEntity.set(t,e),this.entityToDOM.set(e,t))}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.isVegaRTEContent(t)?this.contentEntityToRootDom.get(t):this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}registerRootDomAndContentEntity(t,e){const n=this.rootDomToContentEntity.get(t);n&&n!==e&&this.contentEntityToRootDom.delete(n),this.rootDomToContentEntity.set(t,e),this.contentEntityToRootDom.set(e,t)}isVegaRTEContent(t){return t&&"VegaRTEContent"===t.constructor.name}};var x,m,w,A;!function(t){t.DELETE_CHILDREN="DELETE_CHILDREN",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILDREN="APPEND_CHILDREN",t.INSERT_CHILDREN_AFTER="INSERT_CHILDREN_AFTER",t.INSERT_CHILDREN_BEFORE="INSERT_CHILDREN_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.INSERT_NEW_PARAGRAPH="INSERT_NEW_PARAGRAPH",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK",t.UNLINK_LINK_GROUP="UNLINK_LINK_GROUP",t.LINK_GROUP_NODE_SPLIT="LINK_GROUP_NODE_SPLIT",t.DELETE_LINK_GROUP="DELETE_LINK_GROUP",t.UPDATE_CURSOR_POSITION="UPDATE_CURSOR_POSITION",t.INSERT_TEXT_TO_DECORATOR_NODE="INSERT_TEXT_TO_DECORATOR_NODE"}(x||(x={}));class y{constructor(){this.isFlushable=!1}}class E extends p{constructor(t){super(),this.type=u.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}clone(){const t=new E("");return this.linkGroups.forEach(((e,n)=>{t.linkGroups.set(n,e.map((t=>t.clone())))})),t}toString(t,e){const n=this.toJsx(t,e);return Object.entries(n).map((([t,e])=>{const n="string"==typeof e?e:this.formatStyleToString(e);return`${r(t)}="${n}"`})).join(" ")}toJsx(t,e){const n=this.getStyle(t,e),s=this.getClass(t,e),r=this.getAttribute(t,e);return s.length>0&&(r.class=s.join(" ")),n&&Object.keys(n).length>0&&(r.style=n),r}getClass(t,e){const n=[];return t.link.customClass&&n.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&n.push("v-rte--link"),n}getStyle(t,e){const n={};return t.link.customStyle&&Object.assign(n,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&(n.color="rgba(var(--v-text-link, 19, 98, 226, 1))"),n}getAttribute(t,e){var n;const{href:s,customAttribute:r={}}=t.link,i=null===(n=null==e?void 0:e.autoMatchFormat)||void 0===n||n,o=r.target||(i?"_blank":"");return Object.assign(Object.assign(Object.assign({},r),s||i?{href:s}:{}),o?{target:o}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${r(t)}: ${e};`)).join(" ")}}class O extends f{constructor(t){super(),this.type=d.ALIGNMENT,this.textAlign=t}static from(t){return[d.ALIGNMENT,new O(t)]}toJSON(){return{textAlign:this.textAlign}}renderClass(t){if(null==t?void 0:t.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 O(this.textAlign)}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;switch(this.textAlign){case"right":case"center":case"justify":return{textAlign:this.textAlign};case"left":default:return{textAlign:"left"}}}}class S extends f{constructor(t){super(),this.type=d.INDENT,this.indent=Math.max(0,t)}static from(t){return[d.INDENT,new S(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new S(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class T{static register(t,e,n){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,n)}static get(t,e){const n=this.registry.get(e);if(n)return n.get(t)}static executeTheStrategy(t,e){const n=t instanceof y?t.type:t.constructor.name,s=T.get(n,e.constructor.name);if(s)return s.execute(t,e);i.error(`Type ${n} action handle strategy is not registered in class ${e.constructor.name}`)}}T.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(m||(m={}));class N extends p{}class C extends N{constructor(t){super(),this.type=m.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[m.CUSTOM_ATTRIBUTE,new C(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new C(this.customAttribute)}toString(t=[]){const e=t.map((t=>t.split("=")[0]));return Object.keys(this.customAttribute).map((t=>e.includes(t)?null:`${t}="${this.customAttribute[t]}"`)).filter(o)}render(t={}){var e;const n=Object.assign({},this.customAttribute);return null===(e=t.filterAttributes)||void 0===e||e.forEach((t=>delete n[t])),Object.keys(n).forEach((t=>{this.BOOLEAN_ATTRS.has(t)&&""===n[t]&&(n[t]="true")})),n}}class v extends N{constructor(t){super(),this.type=m.CUSTOM_CLASS,this.customClass=t}static from(t){return[m.CUSTOM_CLASS,new v(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new v(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class b extends N{constructor(t){super(),this.type=m.CUSTOM_STYLE,this.customStyle=t}static from(t){return[m.CUSTOM_STYLE,new b(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new b(this.customStyle)}renderStyle(){return this.customStyle}removeStyles(t){const e=Object.assign({},this.customStyle);return t.forEach((t=>delete e[t])),e}toString(){return`style="${Object.entries(this.customStyle).map((([t,e])=>`${t}: ${e};`)).join(" ")}"`}}class _ extends f{constructor(t){super(),this.type=d.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[d.INTERNAL_WRAPPER,new _(t)]}clone(){return new _(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class L{constructor(t){this.annotationMap=new Map,this.id=t}static from(t,e){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return O.from(e);case"indent":return S.from(e);case"customAttribute":return C.from(e);case"customClass":return v.from(e);case"customStyle":return b.from(e);case"internalWrapper":return _.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,n])=>{const s=this.createAnnotationEntity(e,n);o(s)&&t.set(...s)}))}shouldRenderAsInternalWrapper(){const t=this.getAnnotationByType(d.INTERNAL_WRAPPER);return!!t&&t.internalWrapper&&0===Array.from(this.annotationMap.values()).filter((t=>!(t instanceof E||t instanceof _))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof N)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(s){if(this.doApply(s),s.isFlushable){const s=g.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){return Object.assign(Object.assign({},Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof b)).map((e=>e.renderStyle(t))).filter(o).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof v)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(m.CUSTOM_ATTRIBUTE)}generateAttributeString(...t){var e;const n=Object.entries(Object.assign({},this.getStyles({standalone:!0}))).map((([t,e])=>`${r(t)}: ${e};`)).join(""),s=this.annotationMap.get(m.CUSTOM_CLASS),i=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==s?void 0:s.toString(),n?`style="${n}"`:null,...t].filter(o);return i.length?` ${i.join(" ")}`:""}doApply(t){t instanceof y?T.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();e instanceof E||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply&&this.doAnnotationActionApply(t)}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}!function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK",t.INLINE_HTML="INLINE_HTML",t.PLAIN_TEXT="PLAIN_TEXT"}(w||(w={}));class R extends p{}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(A||(A={}));class I{constructor(t,e){this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}static from(t,e,n){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}, ${n}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return C.from(e);case"customClass":return v.from(e);case"customStyle":return b.from(e)}}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}getStyles(t={standalone:!1}){const e=Array.from(this.annotationMap.values()).filter((t=>t instanceof R||t instanceof b)).map((e=>e.renderStyle(t))).filter(Boolean);return this.mergeAnnotationStyles(e,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof R||t instanceof v)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(m.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}generateAttributeString(...t){var e;const n=Object.entries(Object.assign({},this.getStyles({standalone:!0}))).map((([t,e])=>`${r(t)}: ${e};`)).join(""),s=this.annotationMap.get(m.CUSTOM_CLASS),i=[...(null===(e=this.getCustomAttributesAnnotation())||void 0===e?void 0:e.toString(t))||[],null==s?void 0:s.toString(),n?`style="${n}"`:null,...t].filter(o);return i.length?` ${i.join(" ")}`:""}doApply(t){t instanceof y?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const s=g.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}doAnnotationActionApply(t){}doModifyActionApply(t){}mergeAnnotationStyles(t,e){const n={};for(const s of t)for(const t in s){const r=s[t],i=n[t];n[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return n}}class B{}class $ extends B{constructor(){super(...arguments),this.doSplit=!0}}class D extends p{constructor(t){super(),this.type=u.SELECTION_RANGE,this.range=t}clone(){return new D(this.range)}}class k extends R{constructor(t){super(),this.type=w.STRIKETHROUGH,this.strikethrough=t}static from(t){return[w.STRIKETHROUGH,new k(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new k(this.strikethrough)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.strikethrough?"v-rte--strikethrough":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.strikethrough?{textDecoration:"line-through"}:null}}class M extends R{constructor(t){super(),this.type=w.UNDERLINE,this.underline=t}static from(t){return[w.UNDERLINE,new M(t)]}toJSON(){return{underline:this.underline}}clone(){return new M(this.underline)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.underline?"v-rte--underline":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.underline?{textDecoration:"underline"}:null}}class j extends R{constructor(t){super(),this.type=w.ITALIC,this.italic=t}static from(t){return[w.ITALIC,new j(t)]}toJSON(){return{italic:this.italic}}clone(){return new j(this.italic)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.italic?"v-rte--italic":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.italic?{fontStyle:"italic"}:null}}class P extends R{constructor(t){super(),this.type=w.BOLD,this.bold=t}static from(t){return[w.BOLD,new P(t)]}toJSON(){return{bold:this.bold}}clone(){return new P(this.bold)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.bold?"v-rte--bold":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.bold?{fontWeight:"700"}:null}}class F extends R{constructor(t,e=!0){super(),this.type=w.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[w.CODE,new F(t,e)]}toJSON(){return{code:this.code}}clone(){return new F(this.code,this.useInternalStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.code&&this.useInternalStyle?"v-rte--code":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.code&&this.useInternalStyle?{fontFamily:"Roboto Mono",whiteSpace:"pre-wrap"}:null}}const H={key:"black",light:"#111128",dark:"#E3E3E8"},W=[H,{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"}],K="";class J extends R{constructor(t){super(),this.type=w.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[w.TEXT_COLOR,new J(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new J(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:c.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return W.find((e=>e.key===t))||W[0]}}class U extends R{constructor(t,e=!0){super(),this.type=w.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[w.LINK,new U(t,e)]}toJSON(){return{link:this.link}}clone(){return new U(this.link)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class G extends B{constructor(t,e,n){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=n}toAnnotation(){return new E(this.groupKey)}}class z extends B{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}const X=new class{constructor(){this.RTE_BLOCK_DTO_CLASS_MAP=new Map,this.RTE_NODE_DTO_CLASS_MAP=new Map}registerRTEDTOClass(t,e){if(e.prototype instanceof L)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof I))throw new Error(`Invalid RTE DTO class type: ${t}`);this.RTE_NODE_DTO_CLASS_MAP.set(t,e)}}getRTEBlockClass(t){return this.RTE_BLOCK_DTO_CLASS_MAP.get(t)}getRTENodeClass(t){return this.RTE_NODE_DTO_CLASS_MAP.get(t)}};class V{execute(t,e){return i.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}updateCustomStyleAnnotation(t,e){const n=t.annotationMap.get(m.CUSTOM_STYLE);n&&this.isCustomStyle(n,e)&&t.annotationMap.set(n.type,new b(n.removeStyles(e)))}createNewParagraph(t){const e=X.getRTEBlockClass("paragraph");if(e)return e.from({id:a(),type:"paragraph",nodes:[{id:a(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.constructor.name?e:this.getRootContent(e)}isCaretPositionAtBlockStart(t,e,n){return e===t.children[0]&&0===n}isCaretPositionAtBlockEnd(t,e,n){return e.isContentEditable()?this.isCaretPositionAtTextBlockEnd(t,e,n):this.isCaretPositionAtDecoratorBlockEnd(t,e,n)}isCaretPositionAtTextBlockEnd(t,e,n){const s=t.children[t.children.length-1];return e===s&&(e.isEmpty()||n===s.text.length)}isCaretPositionAtDecoratorBlockEnd(t,e,n){return e===t.children[t.children.length-1]&&0!==n}isCustomStyle(t,e){return e.some((e=>Object.keys(t.customStyle).includes(e)))}}class q extends y{constructor(t){super(),this.type=x.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class Y extends V{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const n=e.getAnnotationByType(u.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof $&&t.doSplit&&n){const{startContainer:t,endContainer:s,startOffset:r,endOffset:i}=n.range,o=t===s&&r===i;e.parent.children=e.parent.children.flatMap((t=>{if(t.id===e.id){if(o)return this.insertNewNode(r,e);if(this.shouldSplitSelection(n.range)){const s=this.splitTextNode(n.range,e);return t.annotationMap.has("LINK")&&t.apply(new q(s)),s}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const n=e.cloneWithText("");return this.setApplyTargetNode(n),0===t?[n,e]:t===e.text.length?[e,n]:[e.cloneWithText(e.text.substring(0,t)),n,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:n,startOffset:s,endOffset:r}=t;return e!==n||s>0||r<(n.textContent?n.textContent.length:0)}splitTextNode(t,e){const{startContainer:n,endContainer:s,startOffset:r}=t,i=n.parentElement,o=s.parentElement,a=(t,n,s)=>{const r=t.substring(0,n),i=t.substring(n,s),o=t.substring(s);return[e.cloneWithText(r),e.cloneWithText(i),e.cloneWithText(o)]},c=i&&g.getEntityByDOM(i),l=o&&g.getEntityByDOM(o);if(c&&c.id===e.id){const i=n===s?t.endOffset:e.text.length,[o,c,l]=a(e.text,r,i);return this.setApplyTargetNode(c),[o,c,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[n,s,r]=a(e.text,0,t.endOffset);return this.setApplyTargetNode(s),[n,s,r].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}class Q extends ${constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new P(this.bold)}}class Z extends p{constructor(){super(...arguments),this.type=u.CLEAR_FORMATTING,this.items=[w.BOLD,w.ITALIC,w.UNDERLINE,w.STRIKETHROUGH,w.TEXT_COLOR,w.CODE,m.CUSTOM_STYLE]}}class tt extends ${constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Z}}class et extends ${constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new F(this.code)}}class nt extends B{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class st extends ${constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new j(this.italic)}}class rt extends ${constructor({link:t,newText:e,needMergeNode:n,doSplit:s,type:r}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=n,this.newText=e,this.type=r,o(s)&&(this.doSplit=s)}toAnnotation(){return new U(this.link)}}class it extends ${constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new k(this.strikethrough)}}class ot extends ${constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new M(this.underline)}}class at extends V{handleAction(t,e){const n=t.toAnnotation();if(t instanceof nt)e.annotationMap.delete(t.annotationType);else{if(!(n instanceof Z))return n instanceof R||n instanceof D?(t instanceof rt&&(o(t.newText)&&(e.text=t.newText),e.parent.apply(new G(t.link.groupKey,[e],t.type))),t instanceof et&&this.handleAction(new tt,e),t instanceof Q&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof st&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof ot||t instanceof it)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(n.type,n)):void 0;n.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class ct extends y{constructor(){super(...arguments),this.type=x.DELETE_LINK_GROUP}}class lt extends V{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new ct)}}class ht extends y{constructor(t){super(),this.type=x.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class ut extends V{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,n){if(e&&e.startContainer&&e.endContainer){const{startContainer:s,endContainer:r,startOffset:i,endOffset:o}=e;let a=n.text;if(s===r&&i===o&&t)a=n.text.slice(0,i)+t+n.text.slice(i);else{const e=s.parentElement,c=r.parentElement,l=e&&g.getEntityByDOM(e),h=c&&g.getEntityByDOM(c);let u=0,d=n.text.length;l&&l===n?(u=i,d=s===r?o:d):h&&h===n&&(d=o),a=n.text.slice(0,u)+t+n.text.slice(d)}n.apply(new ht(a))}}}class dt extends p{constructor(t){super(),this.type=w.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:n,customStyle:s,customClass:r,customAttribute:i}=t,o=new dt(e);return o.child=n?dt.from(n)[1]:void 0,o.customAttribute=i?C.from(i)[1]:void 0,o.customClass=r?v.from(r)[1]:void 0,o.customStyle=s?b.from(s)[1]:void 0,[w.INLINE_HTML,o]}clone(){var t,e,n,s;const r=new dt(this.htmlTag);return r.child=null===(t=this.child)||void 0===t?void 0:t.clone(),r.customAttribute=null===(e=this.customAttribute)||void 0===e?void 0:e.clone(),r.customClass=null===(n=this.customClass)||void 0===n?void 0:n.clone(),r.customStyle=null===(s=this.customStyle)||void 0===s?void 0:s.clone(),r}toJSON(){var t,e,n,s;return{inlineHtml:l({htmlTag:this.htmlTag,child:null===(t=this.child)||void 0===t?void 0:t.toJSON().inlineHtml,customAttribute:null===(e=this.customAttribute)||void 0===e?void 0:e.toJSON().customAttribute,customClass:null===(n=this.customClass)||void 0===n?void 0:n.toJSON().customClass,customStyle:null===(s=this.customStyle)||void 0===s?void 0:s.toJSON().customStyle})}}}class pt extends V{handleAction(t,e){const n=e.parent.getAnnotationByType(u.LINK_GROUP);if(n){const s=e.annotationMap.get("LINK").link.groupKey,r=n.linkGroups.get(s);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),n.linkGroups.set(s,r))}}}}class ft extends V{handleAction(t,e){const n=e.parent.getAnnotationByType(u.LINK_GROUP);if(n){const t=e.annotationMap.get(w.LINK).link.groupKey,s=n.linkGroups.get(t);if(s){const r=s.indexOf(e);-1!==r&&s.splice(r,1),0===s.length&&n.linkGroups.delete(t),0===n.linkGroups.size&&e.parent.annotationMap.delete(u.LINK_GROUP)}}e.annotationMap.delete(w.LINK)}}class gt extends R{constructor(t){super(),this.type=w.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[w.PLAIN_TEXT,new gt(t)]}clone(){return new gt(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return{plainText:this.plainText}}}class xt extends I{constructor(t,e,n,s){super(t,s),this.type=A.TEXT,this.parent=n,this.text=e,this.registerModifyStrategy()}static supportsHtmlTag(t){return["span","code"].includes(t)}static from(t,e,n={autoMatchFormat:!0}){const s=new xt(t.id,t.text,e),{annotations:r}=t;return r&&(s.annotationMap=new Map(Object.keys(r).map((t=>("link"===t&&r.link&&e&&e.apply(new G(r.link.groupKey,[s],"link")),this.createAnnotationEntity(t,r[t],n)))).filter(o))),s}static createAnnotationEntity(t,e,n){const s=!(!n||!n.autoMatchFormat);switch(t){case"bold":return P.from(e);case"italic":return j.from(e);case"underline":return M.from(e);case"strikethrough":return k.from(e);case"code":return F.from(e,s);case"textColor":return J.from(e);case"link":return U.from(e,s);case"inlineHtml":return dt.from(e);case"plainText":return gt.from(e)}return I.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof R||t instanceof N||t instanceof dt)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}toHtml(){const t=this.getAnnotationByType(w.INLINE_HTML);return t?this.renderWithWrapperStr(t):this.renderTextStr()}cloneWithText(t){return new xt(a(),t,this.parent,super.cloneAnnotations())}clone(){return new xt(this.id,this.text,this.parent,super.cloneAnnotations())}isEmpty(){return!this.text||""===this.text||"\n"===this.text}isTextNode(){return!0}getRangeEndOffset(){return!this.isContentEditable()&&this.parent?this.parent.children.indexOf(this)+1:"\n"===this.text?0:this.text.length}getRangeContainer(){const t=g.getDOMByEntity(this);if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}registerModifyStrategy(){const t=this.constructor.name;xt.registerActionStrategyStatus[t]||(this.isContentEditable()&&(T.register(x.UPDATE_TEXT,t,new lt),T.register(x.REPLACE_SELECTED_TEXT,t,new ut),T.register($.name,t,new Y)),T.register(x.LINK_GROUP_NODE_SPLIT,t,new pt),T.register(x.DELETE_LINK_GROUP,t,new ft),T.register(B.name,t,new at),xt.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(u.SELECTION_RANGE);if(t instanceof $&&t.doSplit&&e){const e=T.get($.name,this.constructor.name);if(e){const n=e.execute(t,this);n&&this.applyActionToNode(n,t)}}else this.applyActionToNode(this,t);"function"==typeof this.parent.mergeNodes&&this.parent.mergeNodes(t)}doModifyActionApply(t){T.executeTheStrategy(t,this)}applyActionToNode(t,e){const n=e.toAnnotation();if(e instanceof z)return void this.syncUpSelectedNodes(t);n instanceof D||this.syncUpSelectedNodes(t);const s=T.get(B.name,xt.name);s&&s.execute(e,t)}syncUpSelectedNodes(n){const r=g.getDOMByEntity(this);if(r){const i=e.getSubjectFromParentNodeByEventId(r,s);i&&t.notify(i,{node:n})}}renderWithWrapperStr(t){const{htmlTag:e,customAttribute:n,customClass:s,customStyle:r,child:i}=t,a=[...(null==n?void 0:n.toString())||[],null==s?void 0:s.toString(),null==r?void 0:r.toString()].filter(o),c=a.length>0?` ${a.join(" ")}`:"";return i?`<${e}${c}>${this.renderWithWrapperStr(i)}</${e}>`:`<${e}${c}>${this.renderTextStr()}</${e}>`}renderTextStr(){var t;const e=(null===(t=this.getAnnotationByType(w.CODE))||void 0===t?void 0:t.code)?"code":"span",n=super.generateAttributeString();return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${e}${n}>${this.text}</${e}>`}shouldRenderAsPlainText(){const t=super.getAnnotationByType(w.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof R&&!(t instanceof U)&&!(t instanceof gt)||t instanceof N)).length}}xt.registerActionStrategyStatus={},xt.htmlTag="span";class mt extends y{constructor(t){super(),this.type=x.APPEND_CHILDREN,this.entityToBeAppended=t}}class wt extends f{constructor(t){super(),this.type=d.TEXT_STYLE,this.textStyle=t}static from(t){return[d.TEXT_STYLE,new wt(t)]}toJSON(){return{textStyle:this.textStyle}}clone(){return new wt(this.textStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.textStyle?`v-rte--text-style-${this.textStyle}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};switch(this.textStyle){case"paragraph":return e;case"title":return{fontFamily:"Inter",fontSize:"36px",lineHeight:"40px",fontWeight:"500"};case"subtitle":return{fontFamily:"Inter",fontSize:"28px",lineHeight:"32px",fontWeight:"500"};case"heading-1":return{fontFamily:"Inter",fontSize:"22px",lineHeight:"24px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-2":return{fontFamily:"Inter",fontSize:"20px",lineHeight:"24px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-3":return{fontFamily:"Inter",fontSize:"18px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-4":return{fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-5":return{fontFamily:"Inter",fontSize:"14px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"};case"heading-6":return{fontFamily:"Inter",fontSize:"12px",lineHeight:"22px",fontWeight:"500",marginTop:"0px",marginBottom:"0px"}}}}class At extends B{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new wt(this.textStyle)}}class yt extends y{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class Et extends y{constructor(t){super(),this.type=x.REPLACE_CHILD_NODES,this.newChildNodes=t}}class Ot extends V{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,n){if(t){const s=t.text.slice(0,e),r=t.text.slice(e),i=n.children.indexOf(t);if(i>-1){const e=n.children.slice(0,i),o=n.children.slice(i+1);s&&e.push(t.cloneWithText(s)),r&&o.unshift(t.cloneWithText(r)),n.apply(new Et(e));const a=n.cloneWithNodes(o);return n.parent.apply(new yt(n,a)),a}}}}class St extends V{handleAction(t,e){e.children=[],e.apply(new mt(t.newChildNodes))}}class Tt extends y{constructor(t){super(),this.type=x.DELETE_CHILDREN,this.entityToBeRemoved=t}}class Nt extends V{handleAction(t,e){const n=t.blockNeedToBeMerged;if(e.type===n.type||"image"!==e.type&&"image"!==n.type){let t=n.children;"image"!==n.type&&(t=n.children.filter((t=>t.text))),e.apply(new mt(t)),n.parent.apply(new Tt(n))}}}class Ct extends V{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,n){if(t){const s=new xt(a(),"\n",n),r=t.text.slice(0,e),i=t.text.slice(e),o=n.children.indexOf(t);if(o>-1){const e=n.children.slice(0,o),a=n.children.slice(o+1);r&&e.push(t.cloneWithText(r)),i&&a.unshift(t.cloneWithText(i)),this.mergeLineBreakNodes(e,s,a,n)}return s}}mergeLineBreakNodes(t,e,n,s){(0===n.length||n[0]&&""===n[0].text)&&n.push(new xt(a(),"\n",s,t[t.length-1]&&t[t.length-1].annotationMap)),s.apply(new Et([...t,e,...n]))}}class vt extends V{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const n=e.children,s=new xt(a(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(n,s,r,e),s}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new Tt(t)))})),e}mergeLineBreakNodes(t,e,n,s){(0===n.length||n[0]&&""===n[0].text)&&n.push(new xt(a(),"\n",s,t[t.length-1]&&t[t.length-1].annotationMap)),s.apply(new Et([...t,e,...n]))}}class bt extends y{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class _t extends y{constructor(t,e){super(),this.type=x.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class Lt extends B{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new O(this.textAlign)}}class Rt extends V{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class It extends B{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new S(this.indent)}}class Bt extends L{constructor(t,e,n){super(t),this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&(this.annotationMap=Bt.isAcceptableTextStyle(e)?new Map([wt.from(e)]):new Map([wt.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var n,s;const r=new Bt(t.id,t.type,e),i=e.autoMatchFormat?Object.assign(Object.assign({},t.annotations),{textStyle:null!==(s=null===(n=t.annotations)||void 0===n?void 0:n.textStyle)&&void 0!==s?s:r.type}):t.annotations;return r.children=t.nodes.map((t=>{const n=X.getRTENodeClass(t.type);if(n)return n.from(t,r,e)})).filter(o),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?wt.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,n)=>{const s=e.at(-1);if(t instanceof rt&&t.needMergeNode){const t=null==s?void 0:s.getAnnotationByType(w.LINK),r=n.getAnnotationByType(w.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,n]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag(),n=super.generateAttributeString(),s=this.getAnnotationByType(u.LINK_GROUP);let r=this.children.map((t=>t.toHtml())).join("");return s&&this.children.length>0&&(r=this.generateLinkHtml(s,r,t)),super.shouldRenderAsInternalWrapper()?r:[`<${e}${n}>`,r,`</${e}>`].join("")}cloneWithNodes(t){const e=new Bt(a(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new mt(t)),e}clone(){const t=new Bt(this.id,this.type);return t.children=this.children.map((e=>{const n=e.clone();return n.parent=t,n})),t.annotationMap=super.cloneAnnotations(),t.parent=this.parent,t}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.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"}}doAnnotationActionApply(t){const e=T.get(t.constructor.name,Bt.name);e&&e.execute(t,this)}generateLinkHtml(t,e,n){e="";let s=[];for(let r=0;r<this.children.length;r++){const i=this.children[r].getAnnotationByType(w.LINK),o=this.children[r+1]?this.children[r+1].getAnnotationByType(w.LINK):null;if(i){if(s.push(this.children[r]),!o||i.link.groupKey!==o.link.groupKey){const r=t.toString(i,{standalone:!0,autoMatchFormat:null==n?void 0:n.autoMatchFormat});e+=[`<a${r?` ${r}`:""}>`,s.map((t=>t.toHtml())).join(""),"</a>"].join(""),s=[]}}else e+=this.children[r].toHtml()}return e}}T.register(At.name,Bt.name,new class extends V{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new Q(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new nt(w.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}),T.register(Lt.name,Bt.name,new Rt),T.register(It.name,Bt.name,new class extends V{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),T.register(G.name,Bt.name,new class extends V{handleAction(t,e){let n=e.getAnnotationByType(u.LINK_GROUP);if("update_link"===t.type){if(n){const e=n.linkGroups.get(t.groupKey);e&&n.linkGroups.set(t.groupKey,[e[0]])}}else{if(n){const e=n.linkGroups.get(t.groupKey)||[];n.linkGroups.set(t.groupKey,[...e,...t.nodes])}else n=t.toAnnotation(),n.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(u.LINK_GROUP,n)}}}),T.register(x.UNLINK_LINK_GROUP,Bt.name,new class extends V{handleAction(t,e){const n=e.getAnnotationByType(u.LINK_GROUP);n&&(n.linkGroups.size>1?n.linkGroups.delete(t.groupKey):e.annotationMap.delete(u.LINK_GROUP))}}),T.register(x.SPLIT_BLOCK_WITH_NODE,Bt.name,new Ot),T.register(x.REPLACE_CHILD_NODES,Bt.name,new St),T.register(x.MERGE_TWO_BLOCKS_NODES,Bt.name,new Nt),T.register(x.LINE_BREAK_SINGLE_BLOCK,Bt.name,new Ct),T.register(x.LINE_BREAK_MULTIPLE_BLOCKS,Bt.name,new vt),T.register(x.INSERT_IMAGE_TO_BLOCK,Bt.name,new class extends V{handleAction(t,e){const n=t.splitPointNode,s=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,n,s))e.parent.apply(new yt(e,r));else if(this.isCaretPositionAtBlockStart(e,n,s))e.parent.apply(new bt(e,r));else{const t=new _t(n,s);e.apply(t),e.parent.apply(new yt(e,r))}}}),T.register(x.TRANSFORM_LIST_BLOCK,Bt.name,new class extends V{handleAction(t,e){const n=e.parent,s=n.createList(t.listType),r=t.selectedBlocks,i=r.map((t=>n.toListItem(t)));s.apply(new mt(i)),n.apply(new yt(t.selectedBlocks[0],s)),r.forEach((t=>{t.parent.apply(new Tt(t))}))}});class $t extends V{getPreviousNode(t){const e=t.parent,n=e.children.indexOf(t);if(n>0)return e.children[n-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,n=e.children.indexOf(t);if(e.children[n+1])return e.children[n+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,n=e.children.indexOf(t),s=e.parent;if(e.isListItemBlock()){const t=s.parent;return 0===n&&Array.isArray(s.children)&&s.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===s}return 0===n&&Array.isArray(s.children)&&s.children[0]===e}getPreviousBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(("number-list"===t.parent.type||"bullet-list"===t.parent.type)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}}class Dt extends y{constructor(t,e){super(),this.isFlushable=!0,this.type=x.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class kt extends B{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new D(this.range)}}class Mt extends I{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(Mt.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${Mt.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=g.getDOMByEntity(this);if(t)return h(t,`.${Mt.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}Mt.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",Mt.DECORATOR_NODE_CLASS="v-internal-decorator-node";class jt extends Mt{constructor(t,e,n,s){super(t),this.type=A.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=s,this.language=n}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}toHtml(){return`<code style='box-sizing: border-box;color: rgba(var(--v-text-primary, 32, 54, 69, 1));text-align: left;font-family: "Roboto Mono";font-weight: 400;line-height: 22px;font-size: 16px;white-space: pre-wrap;min-height: 22px;tab-size: 2px;'>${this.text}</code>`}clone(){return new jt(this.id,this.text,this.language,this.parent)}doAnnotationActionApply(t){T.executeTheStrategy(t,this)}doModifyActionApply(t){T.executeTheStrategy(t,this)}}T.register(x.UPDATE_CODE_BLOCK,jt.name,new class extends V{handleAction(t,e){const{content:n,language:s}=t;e.language=s,e.text=n}}),T.register(kt.name,jt.name,new class extends V{handleAction(t,e){e.annotationMap.set(u.SELECTION_RANGE,t.toAnnotation())}});var Pt;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(Pt||(Pt={}));class Ft extends V{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&"parent"in e&&e.parent&&(e.isListItemBlock()&&e.nestList&&e.nestList.length||e.parent.apply(new Tt(e)))}}class Ht extends L{constructor(t,e,n){super(t),this.type="code-block",this.children=[new jt(`${t}-1`,e,n,this)]}static from(t){return new Ht(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}toHtml(){const{language:t=Pt["Plain Text"]}=this.children[0];return`<pre data-language="${t}" style="background-color: rgba(var(--v-bg-secondary, 245, 247, 247, 1)); padding: 12px">${this.children.map((t=>t.toHtml()))}</pre>`}clone(){const t=Ht.from(this.toJSON());return t.parent=this.parent,t}apply(s){if(s instanceof y&&T.executeTheStrategy(s,this),s.isFlushable){const s=g.getDOMByEntity(this);if(s){const r=e.getSubjectFromParentNodeByEventId(s,n);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(u.SELECTION_RANGE)}}T.register(x.DELETE_CODE_BLOCK,Ht.name,new class extends $t{handleAction(t,e){const n=e.children[0],s=e.parent;if(s){let t=this.getPreviousNode(n),r=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(n),r=0),s.apply(new Tt(e));const i=t?g.getDOMByEntity(t):null;if(0===s.children.length){const n=Bt.from({id:a(),type:"paragraph",nodes:[{id:a(),type:"text",text:""}]});e.parent.apply(new mt([n])),t=n.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(n,r,i,o){const a=g.getDOMByEntity(o);if(a){const o=e.getSubjectFromParentNodeByEventId(a,s);o&&t.notify(o,{node:n,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t&&"CODE_BLOCK_NODE"!==t.type?"IMAGE"!==t.type?t.text.length:1:0}}),T.register(x.DELETE_CHILDREN,Ht.name,new Ft),T.register(x.SWITCH_OUT_FROM_CODE_BLOCK,Ht.name,new class extends V{handleAction(n,r){const{content:i,language:o}=n,c=i.split("\n"),l=new Dt(c.slice(0,c.length-2).join("\n"),o);l.isFlushable=!1,r.children[0].apply(l);const h=Bt.from({id:a(),type:"paragraph",nodes:[{id:a(),text:"",type:"text"}]});r.parent.apply(new yt(r,h));const u=g.getDOMByEntity(r);if(u){const n=e.getSubjectFromParentNodeByEventId(u,s);n&&t.notify(n,{node:h.children[0]})}}}),T.register(x.INSERT_IMAGE_TO_BLOCK,Ht.name,new class extends V{handleAction(t,e){e.parent.apply(new yt(e,t.imageBlockToBeInserted))}}),Ht.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{ot as $,V as A,Ct as B,b as C,$t as D,Ft as E,W as F,H as G,Lt as H,yt as I,I as J,Pt as K,rt as L,x as M,R as N,u as O,m as P,Dt as Q,Bt as R,z as S,kt as T,ht as U,$ as V,J as W,jt as X,Q as Y,K as Z,st as _,xt as a,At as a0,wt as a1,P as a2,tt as a3,et as a4,it as a5,It as a6,mt as b,T as c,vt as d,Ot as e,St as f,Nt as g,Tt as h,bt as i,f as j,d as k,L as l,v as m,C as n,Ht as o,w as p,Mt as q,A as r,g as s,N as t,B as u,Et as v,y as w,_t as x,Rt as y,X as z}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r,c as a,H as o,g as e}from"./p-48a58baf.js";import{P as i,g as n}from"./p-7d9cd9c8.js";import{s}from"./p-519a7d55.js";import{R as d}from"./p-03e9cbc8.js";import{F as v,a as g}from"./p-8a877e12.js";import{C as b}from"./p-2d0d575f.js";import{c as p,V as c,I as l}from"./p-6e1ab235.js";import{V as h,I as u}from"./p-d849e0f5.js";import{c as f}from"./p-792715f3.js";import{a as m}from"./p-0664ca9c.js";import{C as x}from"./p-c5e862aa.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-b1faebe0.js";import"./p-d884c644.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-074b73f8.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-575235c8.js";import"./p-7e8f055d.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-aeccc7f8.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-8c46e116.js";import"./p-5d676a94.js";import"./p-bf0ced3c.js";import"./p-3d6c302d.js";import"./p-34fdbe7a.js";import"./p-0e954b9b.js";import"./p-02841589.js";import"./p-bf19682d.js";import"./p-441a681b.js";class w extends c{render(){if(this.loading)return t("vega-loading-indicator",{size:"micro",mode:"indeterminate"})}}!function(t,r,a,o){var e,i=arguments.length,n=i<3?r:null===o?o=Object.getOwnPropertyDescriptor(r,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,r,a,o);else for(var s=t.length-1;s>=0;s--)(e=t[s])&&(n=(i<3?e(n):i>3?e(r,a,n):e(r,a))||n);i>3&&n&&Object.defineProperty(r,a,n)}([p()],w.prototype,"loading",void 0);var y=function(t,r,a,o){var e,i=arguments.length,n=i<3?r:null===o?o=Object.getOwnPropertyDescriptor(r,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,r,a,o);else for(var s=t.length-1;s>=0;s--)(e=t[s])&&(n=(i<3?e(n):i>3?e(r,a,n):e(r,a))||n);return i>3&&n&&Object.defineProperty(r,a,n),n};const j=class{constructor(t){r(this,t),this.vegaClick=a(this,"vegaClick",7),this.click=a(this,"click",7),this.globalSlimmers={},this.pageResizeObserverSlimmer=new i,this.clickEventEmitter=f(j,m),this.eventPrevent=new x([m],(()=>this.host),{useCapture:!0,customPreventHandle:t=>{this.isDisabledButton()&&t.stopImmediatePropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.vegaButtonLoadingRenderer=new w,this.currentBreakpoint=n(),this.size="default",this.variant="primary",this.iconAlign="left",this.label=null,this.disabled=!1,this.danger=!1,this.block=!1,this.type="button",this.loading=!1,this.handleClick=t=>{this.isDisabledButton()?t.preventDefault():(["submit","reset"].includes(this.type)&&b.notify("submit"===this.type?v:g,{host:this.host}),this.clickEventEmitter.emit(void 0,t))}}componentWillLoad(){this.label||(this.label=this.host.textContent),this.host.innerHTML=""}render(){return s(t(o,{class:{"vega-button-block":this.isBlockStyleButton()}},t("button",{type:this.type,"aria-label":this.label||"No label defined",class:{[`vega-button-size-${d.formatCustom(this.size)}`]:!0,[`vega-button-variant-${this.variant}`]:!0,"vega-button-disabled":this.isDisabledButton(),"vega-button-danger":this.danger},onClick:this.handleClick,disabled:this.isDisabledButton(),part:"button"},this.renderContent())),this.host)}renderContent(){return this.icon||this.loading?t("vega-flex",{alignItems:"center",gap:"size-8",justifyContent:"center"},"left"===this.iconAlign&&this.renderIcon(),this.renderLabel(),"right"===this.iconAlign&&this.renderIcon(),this.vegaButtonLoadingRenderer.render()):this.renderLabel()}renderLabel(){return this.label&&t("span",null,this.label)}renderIcon(){if(this.icon)return t("vega-icon",{icon:this.icon,class:"vega-flex-shrink-0 v-min-w-min",size:"large"===this.size?"size-24":"size-16"})}isDisabledButton(){return this.disabled||this.loading}isBlockStyleButton(){return d.formatCustom(this.block)}get host(){return e(this)}};y([u()],j.prototype,"globalSlimmers",void 0),y([l()],j.prototype,"pageResizeObserverSlimmer",void 0),y([l()],j.prototype,"clickEventEmitter",void 0),y([l()],j.prototype,"eventPrevent",void 0),y([l()],j.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y([l()],j.prototype,"vegaButtonLoadingRenderer",void 0),j.style=':host{display:inline-block;border-radius:9999px}:host(.vega-button-block){display:block}:host>button{border-radius:9999px;cursor:pointer;font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;box-sizing:border-box;outline:none}@media screen and (min-width: 768px) and (max-width: 1023px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host .vega-button-size-small{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .vega-button-size-default{padding-left:24px;padding-right:24px;padding-top:8px;padding-bottom:8px}:host .vega-button-size-large{padding-left:32px;padding-right:32px;padding-top:16px;padding-bottom:16px}:host .vega-button-variant-secondary.vega-button-size-small{padding-top:2px;padding-bottom:2px}:host .vega-button-variant-secondary.vega-button-size-default{padding-top:6px;padding-bottom:6px}:host .vega-button-variant-secondary.vega-button-size-large{padding-top:14px;padding-bottom:14px}:host>button vega-flex span{overflow-wrap:break-word}:host(.vega-button-block) button{width:100%}:host button:focus{outline:none}:host .vega-button-variant-primary{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-width:0px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}:host .vega-button-variant-primary:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}:host .vega-button-variant-primary:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host .vega-button-variant-primary:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-button-variant-secondary{border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1));background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1));color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-button-variant-secondary:hover{border:2px solid rgba(var(--v-border-secondary-btn-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1));color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host .vega-button-variant-secondary:active{border:2px solid rgba(var(--v-border-secondary-btn-active, 29, 65, 195, 1));color:rgba(var(--v-text-link-active, 29, 65, 195, 1));background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host .vega-button-variant-secondary:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-button-variant-primary.vega-button-danger{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1));color:rgba(var(--v-text-on-danger, 252, 252, 252, 1))}:host .vega-button-variant-primary.vega-button-danger:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}:host .vega-button-variant-primary.vega-button-danger:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}:host .vega-button-variant-primary.vega-button-danger:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .vega-button-variant-secondary.vega-button-danger{border:2px solid rgba(var(--v-border-secondary-danger-btn, 230, 50, 87, 1));color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}:host .vega-button-variant-secondary.vega-button-danger:hover{border:2px solid rgba(var(--v-border-secondary-danger-btn-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host .vega-button-variant-secondary.vega-button-danger:active{border:2px solid rgba(var(--v-border-secondary-danger-btn-active, 189, 41, 71, 1));color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2))}:host .vega-button-variant-secondary.vega-button-danger:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;color:rgba(var(--v-text-danger-link-focus, 240, 52, 91, 1))}:host .vega-button-disabled{pointer-events:none;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-primary.vega-button-disabled,:host .vega-button-variant-primary.vega-button-disabled:focus{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));color:rgba(var(--v-text-on-disabled, 252, 252, 252, 1));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-secondary.vega-button-disabled,:host .vega-button-variant-secondary.vega-button-disabled:focus{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1));color:rgba(var(--v-text-disabled, 176, 180, 181, 1));border:2px solid rgba(var(--v-border-secondary-btn-disabled, 176, 180, 181, 1));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-primary vega-loading-indicator::part(circle-loader-progress){stroke:rgba(var(--v-text-white, 252, 252, 252, 1))}:host .vega-button-variant-primary vega-loading-indicator::part(circle-loader-track){stroke:rgba(var(--v-text-white, 252, 252, 252, 1));opacity:0.2}';export{j as vega_button}
|