@heartlandone/vega 2.64.0 → 2.65.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-a190cd2d.js → app-globals-681a0ed4.js} +9 -9
- package/dist/cjs/{brand-switch-state-controller-slimmer-5efa1b24.js → brand-switch-state-controller-slimmer-3d41b2a4.js} +1 -1
- package/dist/cjs/{child-nodes-event-prevent-slimmer-4e96270e.js → child-nodes-event-prevent-slimmer-feb072c4.js} +1 -1
- package/dist/cjs/{child-nodes-notify-observer-slimmer-34ac3bfc.js → child-nodes-notify-observer-slimmer-257fedb3.js} +1 -1
- package/dist/cjs/{code-block-417a131b.js → code-block-961d54e8.js} +4 -4
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-0c4d1453.js → component-value-history-controller-slimmer.abstract-c5b8b47b.js} +6 -6
- package/dist/cjs/{dark-mode-state-controller-slimmer-add5d8a8.js → dark-mode-state-controller-slimmer-8a87ec08.js} +1 -1
- package/dist/cjs/{dark-mode-style-controller-41c94aac.js → dark-mode-style-controller-27809ff8.js} +1 -1
- package/dist/cjs/{design-token-ae0de304.js → design-token-98652b67.js} +1 -1
- package/dist/cjs/{dom-node-subject-observer-factory-58e3c010.js → dom-node-subject-observer-factory-56609e5a.js} +1 -1
- package/dist/cjs/{dto-renderer-manager-6d338e46.js → dto-renderer-manager-4b9d2560.js} +4 -4
- package/dist/cjs/{element-appender-slimmer-5a23e722.js → element-appender-slimmer-1f46981b.js} +6 -6
- package/dist/cjs/{event-emit-slimmer-428d8802.js → event-emit-slimmer-3cefb326.js} +2 -2
- package/dist/cjs/{form-field-controller-slimmer-cceb5c79.js → form-field-controller-slimmer-1e1123ea.js} +16 -8
- package/dist/cjs/{image-annotation-action-9785bc59.js → image-annotation-action-03b36f68.js} +4 -4
- package/dist/cjs/{index-9a92abce.js → index-f2fe26a0.js} +2 -2
- package/dist/cjs/index.cjs.js +16 -16
- package/dist/cjs/{inject-keyboard-manager-ad865c95.js → inject-keyboard-manager-51033b3f.js} +1 -1
- package/dist/cjs/{internal-vega-event-manager-28b957c8.js → internal-vega-event-manager-9b503f1a.js} +1 -1
- package/dist/cjs/{keyboard-manager-7f4e1f43.js → keyboard-manager-144907d7.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-138a90e5.js → keyboard-manager-slimmer-04c48756.js} +1 -1
- package/dist/cjs/{language-extension-abbc251a.js → language-extension-059d62f6.js} +2 -2
- package/dist/cjs/loader.cjs.js +14 -14
- package/dist/cjs/{public-rules-ffc5db13.js → public-rules-58e0218b.js} +8 -8
- package/dist/cjs/{range-37161c00.js → range-42732973.js} +2 -2
- package/dist/cjs/{responsive-format-facade-b20dad44.js → responsive-format-facade-29070d00.js} +5 -5
- package/dist/cjs/{rich-text-editor-required-rule-604ea2b9.js → rich-text-editor-required-rule-ce4dd5fb.js} +1 -1
- package/dist/cjs/{static-subject-title-7e7d791a.js → static-subject-title-5829a298.js} +0 -6
- package/dist/cjs/{string-input-formatter-slimmer-8445abc9.js → string-input-formatter-slimmer-0d69ea76.js} +3 -3
- package/dist/cjs/{style-formatter-56751462.js → style-formatter-f6723cb3.js} +1 -1
- package/dist/cjs/{sub-state-notify-slimmer-52fa23af.js → sub-state-notify-slimmer-066f2aa9.js} +2 -2
- package/dist/cjs/{sub-state-observer-slimmer-90c26113.js → sub-state-observer-slimmer-569e3297.js} +3 -3
- package/dist/cjs/{token-extension-46821c19.js → token-extension-260adb8a.js} +6 -6
- package/dist/cjs/{translation-ecfc704a.js → translation-f5adcb9f.js} +1 -1
- package/dist/cjs/{translation-slimmer-40a3536d.js → translation-slimmer-4b6239d1.js} +1 -1
- package/dist/cjs/{ui-4ce1fa08.js → ui-9e181079.js} +16 -3
- package/dist/cjs/vega-accordion.cjs.entry.js +13 -13
- package/dist/cjs/vega-app-footer.cjs.entry.js +3 -3
- package/dist/cjs/vega-app-header-button.cjs.entry.js +14 -14
- package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/vega-banner.cjs.entry.js +4 -4
- package/dist/cjs/vega-box.cjs.entry.js +13 -13
- package/dist/cjs/vega-brand-logo.cjs.entry.js +3 -3
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +5 -5
- package/dist/cjs/vega-button-circle.cjs.entry.js +19 -16
- 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 +19 -14
- package/dist/cjs/vega-calendar_4.cjs.entry.js +506 -212
- package/dist/cjs/vega-card.cjs.entry.js +12 -12
- package/dist/cjs/vega-carousel.cjs.entry.js +12 -12
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-chip.cjs.entry.js +14 -14
- package/dist/cjs/vega-code-block.cjs.entry.js +15 -15
- package/dist/cjs/vega-color-picker.cjs.entry.js +9 -9
- package/dist/cjs/vega-combo-box.cjs.entry.js +12 -12
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +62 -25
- package/dist/cjs/vega-dialog_2.cjs.entry.js +15 -15
- package/dist/cjs/vega-divider.cjs.entry.js +12 -12
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +23 -22
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
- package/dist/cjs/vega-field-label.cjs.entry.js +4 -4
- package/dist/cjs/vega-file-uploader.cjs.entry.js +10 -10
- package/dist/cjs/vega-flag-icon.cjs.entry.js +12 -12
- package/dist/cjs/vega-flex.cjs.entry.js +13 -13
- package/dist/cjs/vega-font.cjs.entry.js +12 -12
- package/dist/cjs/vega-form.cjs.entry.js +593 -354
- package/dist/cjs/vega-grid.cjs.entry.js +12 -12
- package/dist/cjs/vega-icon.cjs.entry.js +12 -12
- package/dist/cjs/vega-image-uploader.cjs.entry.js +17 -17
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-numeric.cjs.entry.js +13 -13
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +14 -14
- package/dist/cjs/vega-input-range.cjs.entry.js +11 -11
- package/dist/cjs/vega-input-select.cjs.entry.js +16 -16
- package/dist/cjs/vega-input.cjs.entry.js +11 -11
- package/dist/cjs/{vega-internal-event-id-dfd8b802.js → vega-internal-event-id-6d4a2c53.js} +6 -0
- package/dist/cjs/vega-item-toggle.cjs.entry.js +4 -4
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +44 -20
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +11 -11
- 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 +6 -6
- package/dist/cjs/vega-pagination.cjs.entry.js +14 -14
- package/dist/cjs/vega-popover_2.cjs.entry.js +16 -16
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +4 -4
- package/dist/cjs/vega-radio_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +10 -10
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +23 -23
- package/dist/cjs/vega-segment-control.cjs.entry.js +4 -4
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +16 -16
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +14 -14
- package/dist/cjs/vega-signature-capture.cjs.entry.js +16 -16
- package/dist/cjs/vega-stepper.cjs.entry.js +10 -10
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-table_8.cjs.entry.js +16 -16
- package/dist/cjs/vega-text.cjs.entry.js +1 -1
- package/dist/cjs/vega-textarea.cjs.entry.js +10 -10
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +19 -19
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +9 -9
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +14 -14
- package/dist/cjs/vega.cjs.js +14 -14
- package/dist/collection/components/vega-button/vega-button.js +9 -2
- package/dist/collection/components/vega-button-circle/vega-button-circle.js +8 -3
- package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-current-period-controller.js +7 -4
- package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-event-controller.js +21 -1
- package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-event-preivew-popover-controller.js +18 -1
- package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-post-operation-date-controller.js +14 -1
- package/dist/collection/components/vega-calendar/slimmers/common/helpers/repeat-pattern/calendar-event-repeat-pattern-factory.js +8 -9
- package/dist/collection/components/vega-calendar/slimmers/common/helpers/repeat-pattern/calendar-event-weekly-repeat-pattern.js +3 -1
- package/dist/collection/components/vega-calendar/slimmers/common/helpers/test/calendar-event-repeat-pattern-factory.test.js +34 -0
- package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-event-item-renderer.js +1 -1
- package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-time-marker-renderer.js +31 -5
- package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.js +4 -1
- package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-event-renderer.js +5 -3
- package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +4 -1
- package/dist/collection/components/vega-calendar/vega-calendar.js +47 -1
- package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +37 -3
- package/dist/collection/components/vega-date-picker/vega-date-picker.js +6 -0
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +1 -1
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.css +4 -8
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +4 -0
- package/dist/collection/components/vega-form/slimmers/controllers/vega-form-field-controller.js +351 -0
- package/dist/collection/components/vega-form/slimmers/controllers/vega-form-reset-controller.js +99 -0
- package/dist/collection/components/vega-form/slimmers/controllers/vega-form-submit-controller.js +122 -0
- package/dist/collection/components/vega-form/vega-form.js +20 -366
- package/dist/collection/components/vega-modal/vega-modal.css +4 -1
- package/dist/collection/components/vega-nav/slimmers/vega-nav-observer-slimmer.js +8 -3
- package/dist/collection/components/vega-nav/vega-left-nav-link/slimmers/controllers/vega-left-nav-link-controller.js +21 -4
- package/dist/collection/helpers/calendar/calendar-date.js +10 -8
- package/dist/collection/helpers/calendar/calendar-event.js +152 -16
- package/dist/collection/helpers/calendar/calendar-period/calendar-period.abstract.js +13 -4
- package/dist/collection/helpers/calendar/calendar-period/day-period.js +4 -4
- package/dist/collection/helpers/calendar/calendar-period/month-period.js +7 -6
- package/dist/collection/helpers/calendar/calendar-period/week-period.js +3 -3
- package/dist/collection/helpers/calendar/calendar-view-generator/week-view-generator.js +1 -1
- package/dist/collection/helpers/calendar/test/calendar-date.test.js +24 -0
- package/dist/collection/helpers/calendar/test/calendar-event.test.js +71 -0
- package/dist/collection/helpers/calendar/test/calendar-period/day-period.test.js +28 -0
- package/dist/collection/helpers/calendar/test/calendar-period/month-period.test.js +35 -0
- package/dist/collection/helpers/calendar/test/calendar-period/week-period.test.js +43 -0
- package/dist/collection/helpers/calendar/test/utils.test.js +29 -1
- package/dist/collection/helpers/calendar/utils.js +46 -0
- package/dist/collection/helpers/change-manager/subject/static-subject/static-subject-title.js +0 -2
- package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +3 -0
- package/dist/collection/helpers/validator/form-field-controller.js +13 -3
- package/dist/collection/utils/test/ui.test.js +55 -0
- package/dist/collection/utils/ui.js +16 -3
- package/dist/esm/{app-globals-b074e012.js → app-globals-1bacb762.js} +9 -9
- package/dist/esm/{brand-switch-state-controller-slimmer-05c85e6d.js → brand-switch-state-controller-slimmer-60249013.js} +1 -1
- package/dist/esm/{child-nodes-event-prevent-slimmer-7fe3dc57.js → child-nodes-event-prevent-slimmer-f32efdee.js} +1 -1
- package/dist/esm/{child-nodes-notify-observer-slimmer-78f77c2c.js → child-nodes-notify-observer-slimmer-b676cd2b.js} +1 -1
- package/dist/esm/{code-block-a6c78bbb.js → code-block-cb657afd.js} +4 -4
- package/dist/esm/{component-value-history-controller-slimmer.abstract-d37d2df7.js → component-value-history-controller-slimmer.abstract-65a83eaf.js} +6 -6
- package/dist/esm/{dark-mode-state-controller-slimmer-f1c2c299.js → dark-mode-state-controller-slimmer-f2b4f8ed.js} +1 -1
- package/dist/esm/{dark-mode-style-controller-5cf1c482.js → dark-mode-style-controller-b7e85b6a.js} +1 -1
- package/dist/esm/{design-token-6f9e70c4.js → design-token-3889675a.js} +1 -1
- package/dist/esm/{dom-node-subject-observer-factory-c7bc3035.js → dom-node-subject-observer-factory-ed4b89f4.js} +1 -1
- package/dist/esm/{dto-renderer-manager-5b036e47.js → dto-renderer-manager-8cac8f0f.js} +4 -4
- package/dist/esm/{element-appender-slimmer-1d6c2960.js → element-appender-slimmer-31b21e1b.js} +6 -6
- package/dist/esm/{event-emit-slimmer-3922d816.js → event-emit-slimmer-000ca6a7.js} +2 -2
- package/dist/esm/{form-field-controller-slimmer-c29b345f.js → form-field-controller-slimmer-24dbc255.js} +16 -8
- package/dist/esm/{image-annotation-action-f6308cf4.js → image-annotation-action-59ea166c.js} +4 -4
- package/dist/esm/{index-4f26bbd0.js → index-50b32f3d.js} +2 -2
- package/dist/esm/index.js +16 -16
- package/dist/esm/{inject-keyboard-manager-109817bf.js → inject-keyboard-manager-f7d92809.js} +1 -1
- package/dist/esm/{internal-vega-event-manager-cb06e987.js → internal-vega-event-manager-13e3ed3d.js} +1 -1
- package/dist/esm/{keyboard-manager-ab521d22.js → keyboard-manager-f4bbc452.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-cae3a002.js → keyboard-manager-slimmer-a02cbc5f.js} +1 -1
- package/dist/esm/{language-extension-962c427a.js → language-extension-038014ac.js} +2 -2
- package/dist/esm/loader.js +14 -14
- package/dist/esm/{public-rules-6fa7533f.js → public-rules-a42e6f59.js} +8 -8
- package/dist/esm/{range-4d7aa0fd.js → range-c08d8de1.js} +2 -2
- package/dist/esm/{responsive-format-facade-b594fc72.js → responsive-format-facade-d8ccc742.js} +5 -5
- package/dist/esm/{rich-text-editor-required-rule-a72374cd.js → rich-text-editor-required-rule-3a8f319c.js} +1 -1
- package/dist/esm/{static-subject-title-ca83d6b6.js → static-subject-title-52f93124.js} +1 -4
- package/dist/esm/{string-input-formatter-slimmer-75256a17.js → string-input-formatter-slimmer-c64c7855.js} +3 -3
- package/dist/esm/{style-formatter-56074ede.js → style-formatter-ab6a9248.js} +1 -1
- package/dist/esm/{sub-state-notify-slimmer-85c658b7.js → sub-state-notify-slimmer-8b3b15ee.js} +2 -2
- package/dist/esm/{sub-state-observer-slimmer-e58a2485.js → sub-state-observer-slimmer-2b98e2c9.js} +3 -3
- package/dist/esm/{token-extension-3c198013.js → token-extension-f5bf06a5.js} +6 -6
- package/dist/esm/{translation-3d35961b.js → translation-f10b1e19.js} +1 -1
- package/dist/esm/{translation-slimmer-d5b0d292.js → translation-slimmer-984c9ce6.js} +1 -1
- package/dist/esm/{ui-c20be16d.js → ui-bb99c0c2.js} +16 -3
- package/dist/esm/vega-accordion.entry.js +13 -13
- package/dist/esm/vega-app-footer.entry.js +3 -3
- package/dist/esm/vega-app-header-button.entry.js +14 -14
- package/dist/esm/vega-backdrop.entry.js +1 -1
- package/dist/esm/vega-banner.entry.js +4 -4
- package/dist/esm/vega-box.entry.js +13 -13
- package/dist/esm/vega-brand-logo.entry.js +3 -3
- package/dist/esm/vega-breadcrumb.entry.js +5 -5
- package/dist/esm/vega-button-circle.entry.js +19 -16
- 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 +19 -14
- package/dist/esm/vega-calendar_4.entry.js +507 -213
- package/dist/esm/vega-card.entry.js +12 -12
- package/dist/esm/vega-carousel.entry.js +12 -12
- package/dist/esm/vega-checkbox_2.entry.js +11 -11
- package/dist/esm/vega-chip.entry.js +14 -14
- package/dist/esm/vega-code-block.entry.js +15 -15
- package/dist/esm/vega-color-picker.entry.js +9 -9
- package/dist/esm/vega-combo-box.entry.js +12 -12
- package/dist/esm/vega-date-picker_2.entry.js +62 -25
- package/dist/esm/vega-dialog_2.entry.js +15 -15
- package/dist/esm/vega-divider.entry.js +12 -12
- package/dist/esm/vega-dropdown_5.entry.js +23 -22
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-error.entry.js +1 -1
- package/dist/esm/vega-field-label.entry.js +4 -4
- package/dist/esm/vega-file-uploader.entry.js +10 -10
- package/dist/esm/vega-flag-icon.entry.js +12 -12
- package/dist/esm/vega-flex.entry.js +13 -13
- package/dist/esm/vega-font.entry.js +12 -12
- package/dist/esm/vega-form.entry.js +593 -354
- package/dist/esm/vega-grid.entry.js +12 -12
- package/dist/esm/vega-icon.entry.js +12 -12
- package/dist/esm/vega-image-uploader.entry.js +17 -17
- package/dist/esm/vega-input-credit-card.entry.js +10 -10
- package/dist/esm/vega-input-numeric.entry.js +13 -13
- package/dist/esm/vega-input-phone-number.entry.js +14 -14
- package/dist/esm/vega-input-range.entry.js +11 -11
- package/dist/esm/vega-input-select.entry.js +16 -16
- package/dist/esm/vega-input.entry.js +11 -11
- package/dist/esm/{vega-internal-event-id-bee7946b.js → vega-internal-event-id-5c3e5f7f.js} +4 -1
- package/dist/esm/vega-item-toggle.entry.js +4 -4
- package/dist/esm/vega-left-nav_5.entry.js +44 -20
- package/dist/esm/vega-loader-wrapper_2.entry.js +11 -11
- 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 +6 -6
- package/dist/esm/vega-pagination.entry.js +14 -14
- package/dist/esm/vega-popover_2.entry.js +16 -16
- package/dist/esm/vega-progress-tracker.entry.js +4 -4
- package/dist/esm/vega-radio_2.entry.js +13 -13
- package/dist/esm/vega-rich-text-content.entry.js +10 -10
- package/dist/esm/vega-rich-text-editor_4.entry.js +23 -23
- package/dist/esm/vega-segment-control.entry.js +4 -4
- package/dist/esm/vega-selection-chip_2.entry.js +16 -16
- package/dist/esm/vega-selection-tile_2.entry.js +12 -12
- package/dist/esm/vega-sidenav_3.entry.js +14 -14
- package/dist/esm/vega-signature-capture.entry.js +16 -16
- package/dist/esm/vega-stepper.entry.js +10 -10
- package/dist/esm/vega-tab-group_2.entry.js +6 -6
- package/dist/esm/vega-table_8.entry.js +16 -16
- package/dist/esm/vega-text.entry.js +1 -1
- package/dist/esm/vega-textarea.entry.js +10 -10
- package/dist/esm/vega-time-picker_2.entry.js +19 -19
- package/dist/esm/vega-toggle-switch.entry.js +9 -9
- package/dist/esm/vega-tooltip_2.entry.js +14 -14
- package/dist/esm/vega.js +14 -14
- package/dist/sri/vega-sri-loader.js +147 -0
- package/dist/sri/vega-sri-manifest.json +698 -0
- package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-current-period-controller.d.ts +1 -0
- package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-event-controller.d.ts +6 -0
- package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-event-preivew-popover-controller.d.ts +5 -0
- package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-post-operation-date-controller.d.ts +6 -0
- package/dist/types/components/vega-calendar/slimmers/common/helpers/repeat-pattern/calendar-event-repeat-pattern-factory.d.ts +3 -1
- package/dist/types/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-time-marker-renderer.d.ts +1 -0
- package/dist/types/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.d.ts +1 -0
- package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +1 -0
- package/dist/types/components/vega-calendar/types.d.ts +5 -0
- package/dist/types/components/vega-calendar/vega-calendar.d.ts +17 -0
- package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +13 -0
- package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +1 -0
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +1 -0
- package/dist/types/components/vega-form/slimmers/controllers/vega-form-field-controller.d.ts +158 -0
- package/dist/types/components/vega-form/slimmers/controllers/vega-form-reset-controller.d.ts +43 -0
- package/dist/types/components/vega-form/slimmers/controllers/vega-form-submit-controller.d.ts +55 -0
- package/dist/types/components/vega-form/types.d.ts +13 -0
- package/dist/types/components/vega-form/vega-form.d.ts +6 -110
- package/dist/types/components/vega-nav/slimmers/vega-nav-observer-slimmer.d.ts +3 -0
- package/dist/types/components/vega-nav/vega-left-nav-link/slimmers/controllers/vega-left-nav-link-controller.d.ts +8 -0
- package/dist/types/components.d.ts +12 -1
- package/dist/types/helpers/calendar/calendar-date.d.ts +5 -3
- package/dist/types/helpers/calendar/calendar-event.d.ts +50 -1
- package/dist/types/helpers/calendar/calendar-period/calendar-period.abstract.d.ts +8 -1
- package/dist/types/helpers/calendar/calendar-period/day-period.d.ts +1 -1
- package/dist/types/helpers/calendar/calendar-period/month-period.d.ts +4 -3
- package/dist/types/helpers/calendar/calendar-period/week-period.d.ts +1 -1
- package/dist/types/helpers/calendar/utils.d.ts +22 -0
- package/dist/types/helpers/change-manager/subject/static-subject/static-subject-title.d.ts +0 -2
- package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +3 -0
- package/dist/types/types/components.type.d.ts +0 -1
- package/dist/types/utils/ui.d.ts +5 -1
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-4e503e23.entry.js → p-050bb2ad.entry.js} +1 -1
- package/dist/vega/{p-3cdbee7e.js → p-053eb64a.js} +1 -1
- package/dist/vega/{p-56b8ffd5.entry.js → p-0685cba6.entry.js} +1 -1
- package/dist/vega/{p-df31307b.entry.js → p-12d4488b.entry.js} +1 -1
- package/dist/vega/{p-119430db.entry.js → p-13c6a04c.entry.js} +1 -1
- package/dist/vega/{p-6c85c1f3.entry.js → p-185dfdd4.entry.js} +1 -1
- package/dist/vega/{p-a1cf29a9.js → p-199dc74b.js} +1 -1
- package/dist/vega/p-1bd5d806.entry.js +1 -0
- package/dist/vega/p-1eb5b772.entry.js +1 -0
- package/dist/vega/{p-21a480b0.entry.js → p-1f061725.entry.js} +1 -1
- package/dist/vega/{p-f81f2071.entry.js → p-1f43f551.entry.js} +1 -1
- package/dist/vega/{p-1da54ff3.js → p-2033f86e.js} +1 -1
- package/dist/vega/{p-37fd7a80.js → p-228de113.js} +1 -1
- package/dist/vega/{p-f1436035.js → p-24cb0a7e.js} +1 -1
- package/dist/vega/{p-55c26035.entry.js → p-299e14b4.entry.js} +1 -1
- package/dist/vega/{p-b9e8c6bf.entry.js → p-2d91799a.entry.js} +1 -1
- package/dist/vega/{p-ffc2ef90.entry.js → p-2f4f3744.entry.js} +1 -1
- package/dist/vega/{p-7c75ce6c.entry.js → p-303efbfe.entry.js} +1 -1
- package/dist/vega/p-308aa2e3.js +1 -0
- package/dist/vega/{p-e4b0606a.entry.js → p-33837794.entry.js} +1 -1
- package/dist/vega/{p-d20ab09f.entry.js → p-33c6fb3f.entry.js} +1 -1
- package/dist/vega/{p-459efe39.entry.js → p-3494a5f1.entry.js} +1 -1
- package/dist/vega/{p-06b624e6.js → p-378e5881.js} +1 -1
- package/dist/vega/{p-d3bf55e9.js → p-39482a1a.js} +1 -1
- package/dist/vega/{p-6163818f.js → p-39b4c838.js} +1 -1
- package/dist/vega/{p-7aae9252.entry.js → p-3b953a24.entry.js} +1 -1
- package/dist/vega/{p-2ee4def0.js → p-3c21b875.js} +1 -1
- package/dist/vega/p-43257678.js +1 -0
- package/dist/vega/{p-e27802fb.js → p-45ead9fe.js} +1 -1
- package/dist/vega/{p-bb58a7cf.entry.js → p-4897bedd.entry.js} +1 -1
- package/dist/vega/{p-8938b5c4.js → p-4c192985.js} +1 -1
- package/dist/vega/{p-d4564bfd.js → p-521d1d07.js} +1 -1
- package/dist/vega/{p-52b0abb5.entry.js → p-59d70a67.entry.js} +1 -1
- package/dist/vega/{p-92ec4fac.entry.js → p-5cdcd08f.entry.js} +1 -1
- package/dist/vega/{p-bf8d2978.entry.js → p-5d36cc3f.entry.js} +1 -1
- package/dist/vega/{p-61966868.entry.js → p-5e1c913d.entry.js} +1 -1
- package/dist/vega/{p-0b92b15b.entry.js → p-5e2ef0b8.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-f4877bee.entry.js → p-5f854901.entry.js} +1 -1
- package/dist/vega/p-5fec05a2.js +1 -0
- package/dist/vega/p-63596567.entry.js +1 -0
- package/dist/vega/{p-b3cd1992.entry.js → p-63a5bbf4.entry.js} +1 -1
- package/dist/vega/{p-3af81271.js → p-64c3d021.js} +1 -1
- package/dist/vega/p-651fe4fc.js +1 -0
- package/dist/vega/{p-db29b9f9.entry.js → p-671afda4.entry.js} +1 -1
- package/dist/vega/{p-32655cfc.entry.js → p-676bee73.entry.js} +1 -1
- package/dist/vega/{p-1d3a7be6.entry.js → p-6a4db686.entry.js} +1 -1
- package/dist/vega/{p-3176804b.entry.js → p-6ce1e9d4.entry.js} +1 -1
- package/dist/vega/{p-ae963cb3.entry.js → p-6d371296.entry.js} +1 -1
- package/dist/vega/{p-9819dda9.entry.js → p-6f96dd01.entry.js} +1 -1
- package/dist/vega/{p-684391a4.entry.js → p-719354e7.entry.js} +1 -1
- package/dist/vega/{p-e41931d4.entry.js → p-74e684fc.entry.js} +1 -1
- package/dist/vega/{p-eb5f99db.entry.js → p-78d607ca.entry.js} +1 -1
- package/dist/vega/{p-3709b0e0.js → p-7c594a9f.js} +1 -1
- package/dist/vega/p-7cd2b93b.js +1 -0
- package/dist/vega/{p-4b57bb12.entry.js → p-833d81d0.entry.js} +1 -1
- package/dist/vega/{p-1be68fba.js → p-840c09c7.js} +1 -1
- package/dist/vega/p-852fa2d2.entry.js +1 -0
- package/dist/vega/{p-fd2d02ea.entry.js → p-85ad1c21.entry.js} +1 -1
- package/dist/vega/{p-956a5899.entry.js → p-8a5c123f.entry.js} +1 -1
- package/dist/vega/{p-2044aa2c.js → p-901ff5d3.js} +1 -1
- package/dist/vega/{p-4faa7bab.entry.js → p-9439077d.entry.js} +1 -1
- package/dist/vega/{p-3354f5a7.js → p-99b1492c.js} +1 -1
- package/dist/vega/{p-4082fa22.entry.js → p-9d492a46.entry.js} +1 -1
- package/dist/vega/p-9e6db93d.entry.js +1 -0
- package/dist/vega/{p-1110b422.entry.js → p-a082d41b.entry.js} +1 -1
- package/dist/vega/{p-27dfa896.js → p-a4912b85.js} +1 -1
- package/dist/vega/p-a528714c.js +1 -0
- package/dist/vega/p-a5713178.js +1 -0
- package/dist/vega/{p-3a9aa6eb.entry.js → p-a6010b93.entry.js} +1 -1
- package/dist/vega/{p-3eaa6cce.entry.js → p-a61e2108.entry.js} +1 -1
- package/dist/vega/{p-e4acac0a.entry.js → p-a69c9e42.entry.js} +1 -1
- package/dist/vega/{p-a9e3058e.entry.js → p-ab3c4b43.entry.js} +1 -1
- package/dist/vega/{p-3a0b9e66.entry.js → p-ae598946.entry.js} +1 -1
- package/dist/vega/{p-743c5baf.js → p-b4c25109.js} +1 -1
- package/dist/vega/{p-2608b9fe.js → p-b510e4d7.js} +1 -1
- package/dist/vega/{p-4669ce11.entry.js → p-b68a13df.entry.js} +1 -1
- package/dist/vega/{p-159fda34.entry.js → p-ba24f7b9.entry.js} +1 -1
- package/dist/vega/p-bc9484a6.js +1 -0
- package/dist/vega/{p-3a455ac3.entry.js → p-c12000ee.entry.js} +1 -1
- package/dist/vega/{p-179693f1.entry.js → p-c1fa6088.entry.js} +2 -2
- package/dist/vega/{p-697acd40.js → p-c241f615.js} +1 -1
- package/dist/vega/{p-5443d614.entry.js → p-c682d53c.entry.js} +1 -1
- package/dist/vega/{p-0f2c83a1.entry.js → p-c8a3fb7f.entry.js} +1 -1
- package/dist/vega/{p-1655b920.entry.js → p-c96d28dc.entry.js} +1 -1
- package/dist/vega/p-cef9f638.js +1 -0
- package/dist/vega/{p-32058dbd.entry.js → p-cf211582.entry.js} +1 -1
- package/dist/vega/p-d3137a6e.entry.js +1 -0
- package/dist/vega/{p-641fbb48.entry.js → p-d418ecc1.entry.js} +1 -1
- package/dist/vega/{p-06e6be0e.js → p-d5d6dae6.js} +1 -1
- package/dist/vega/p-d5ff8b7f.js +1 -0
- package/dist/vega/p-d9671d27.js +1 -0
- package/dist/vega/{p-64e949fa.entry.js → p-dabba918.entry.js} +1 -1
- package/dist/vega/{p-c7f68d74.js → p-dc92fec6.js} +1 -1
- package/dist/vega/p-e853105a.entry.js +1 -0
- package/dist/vega/p-ebfc4323.entry.js +1 -0
- package/dist/vega/{p-04158119.entry.js → p-f83739d0.entry.js} +1 -1
- package/dist/vega/{p-15766433.entry.js → p-fbc85265.entry.js} +1 -1
- package/dist/vega/{p-4ae3eebf.entry.js → p-fbd38139.entry.js} +1 -1
- package/dist/vega/{p-a30ebdf5.js → p-fddca002.js} +1 -1
- package/dist/vega/{p-57c42c30.entry.js → p-fee972e6.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +3 -2
- package/dist/vega/p-1aba48bc.js +0 -1
- package/dist/vega/p-1cb87bad.entry.js +0 -1
- package/dist/vega/p-3355ec0f.js +0 -1
- package/dist/vega/p-3674db0f.js +0 -1
- package/dist/vega/p-36f331bf.entry.js +0 -1
- package/dist/vega/p-465a6660.entry.js +0 -1
- package/dist/vega/p-575235c8.js +0 -1
- package/dist/vega/p-5773a9a3.js +0 -1
- package/dist/vega/p-6be16084.js +0 -1
- package/dist/vega/p-6ed663d5.entry.js +0 -1
- package/dist/vega/p-84eabbec.entry.js +0 -1
- package/dist/vega/p-904d1b43.js +0 -1
- package/dist/vega/p-96bda7ca.js +0 -1
- package/dist/vega/p-a3d77013.js +0 -1
- package/dist/vega/p-be539a54.js +0 -1
- package/dist/vega/p-c8789df1.entry.js +0 -1
- package/dist/vega/p-e6158a33.entry.js +0 -1
- package/dist/vega/p-ed0f000b.entry.js +0 -1
- package/dist/vega/p-f37558c1.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,H as t,r as i,c as o,g as a}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as s,M as l,V as n,I as d,L as c}from"./p-6e1ab235.js";import{V as h,I as p}from"./p-d849e0f5.js";import{R as v}from"./p-37fd7a80.js";import{c as g}from"./p-86194314.js";import{S as b}from"./p-a30ebdf5.js";import{O as f}from"./p-331a62d5.js";import{d as m,f as u}from"./p-2ee4def0.js";import{d as x}from"./p-96bda7ca.js";import{f as w}from"./p-575235c8.js";import{C as j}from"./p-2d0d575f.js";import{P as y,g as k}from"./p-7d9cd9c8.js";import{c as C}from"./p-3cdbee7e.js";import{b as R}from"./p-5773a9a3.js";import{M as z}from"./p-78a57a17.js";import{a as S}from"./p-52b8f2d2.js";import{i as O}from"./p-d27ae9ff.js";import{c as E}from"./p-be539a54.js";import{C as T}from"./p-1da54ff3.js";import{F as I}from"./p-a3d77013.js";import{R as V}from"./p-280cbcdb.js";import"./p-b1faebe0.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-5f377954.js";import"./p-3af81271.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-8938b5c4.js";import"./p-112455b1.js";import"./p-54ae02db.js";import"./p-b75ee3ba.js";import"./p-f1436035.js";import"./p-06e6be0e.js";import"./p-6163818f.js";import"./p-02841589.js";import"./p-bf19682d.js";import"./p-a7b5f497.js";import"./p-8c9ea6f4.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-d3bf55e9.js";import"./p-abd7aeaa.js";var N=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class L extends n{componentWillRender(){this.currentSize=v.formatCustom(this.size)}render(){return e(t,{class:{block:this.block}},this.renderTooltip())}renderTooltip(){return e("vega-tooltip",Object.assign({trigger:this.disabled&&this.disabledTooltip?"hover":"none",alignment:"center"},this.disabledTooltip),this.renderSelectionChip())}renderSelectionChip(){return e("vega-box",{corners:"rounded-full",class:{"vega-selection-chip":!0,[`size-${this.currentSize}`]:!0,[`variant-${this.variant||"text"}`]:!0,checked:this.checked,error:this.showError,disabled:this.disabled},"aria-label":this.label||"No label defined",onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:g(),tabIndex:this.disabled?-1:0},this.renderContent())}renderContent(){return e("vega-flex",{gap:L.gapSizeMap[this.currentSize],"align-items":"center","justify-content":"text"===this.variant?"center":"start"},"swatch"===this.variant&&this.renderSwatch(),this.renderLabel())}renderLabel(){return e("vega-font",{color:"text-primary",class:"label vega-flex-grow",variant:L.labelFontMap[this.currentSize]},this.label)}renderSwatch(){return e("vega-box",{"background-color":"bg-primary",corners:"rounded-full",class:"swatch vega-flex-shrink-0"},e("vega-box",{"background-color":this.swatchColor,corners:"rounded-full"}))}}L.gapSizeMap={"extra-small":"size-4",small:"size-4",medium:"size-8",large:"size-8"},L.labelFontMap={"extra-small":"font-field-label-xs",small:"font-field-label-sm",medium:"font-field-label",large:"font-field-label-lg"},N([s()],L.prototype,"host",void 0),N([s()],L.prototype,"label",void 0),N([s()],L.prototype,"block",void 0),N([s()],L.prototype,"size",void 0),N([s()],L.prototype,"variant",void 0),N([s()],L.prototype,"swatchColor",void 0),N([s()],L.prototype,"disabledTooltip",void 0),N([s()],L.prototype,"disabled",void 0),N([s()],L.prototype,"selectType",void 0),N([s()],L.prototype,"checked",void 0),N([s()],L.prototype,"checkedController",void 0),N([s()],L.prototype,"showError",void 0),N([l("componentWillRender")],L.prototype,"componentWillRender",null);var A=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class F extends n{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.setChecked(e),this.changeEventEmitter.emit(t)}}A([s()],F.prototype,"host",void 0),A([s({writable:!0})],F.prototype,"checked",void 0),A([s()],F.prototype,"changeEventEmitter",void 0),A([s()],F.prototype,"value",void 0);var D=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class G extends b{constructor(){super({parent:"vega-selection-chip-group",subStates:[{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"selectType",parentStateName:"selectType",callback:e=>{this.selectType="checkbox"===e?"checkbox":"radio"}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}D([s()],G.prototype,"host",void 0),D([s({writable:!0})],G.prototype,"disabled",void 0),D([s({writable:!0})],G.prototype,"selectType",void 0),D([s()],G.prototype,"value",void 0),D([s()],G.prototype,"checkedController",void 0);var W=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class M extends n{connectedCallback(){this.selectionChipGroup=w(this.host,"vega-selection-chip-group"),this.selectionChipGroup&&(this.fieldErrorObserver=new f(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),j.register(m.getSubject(this.selectionChipGroup,x),this.fieldErrorObserver))}disconnectedCallback(){this.selectionChipGroup&&j.unregister(m.getSubject(this.selectionChipGroup,x),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}W([s({writable:!0})],M.prototype,"showError",void 0),W([s()],M.prototype,"host",void 0),W([l("connectedCallback")],M.prototype,"connectedCallback",null),W([l("disconnectedCallback")],M.prototype,"disconnectedCallback",null);var _=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const H=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.checkedController=new F,this.stateController=new G,this.showErrorController=new M,this.pageResizeObserverSlimmer=new y,this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(H,u),this.showError=!1,this.currentBreakpoint=k(),this.label="",this.size="medium",this.variant="text",this.disabled=!1,this.block=!1,this.swatchColor="bg-status-info"}watchSize(){}componentWillRender(){}render(){return r(this.renderer.render(),this.host)}get host(){return a(this)}static get watchers(){return{size:["watchSize"]}}};_([p()],H.prototype,"globalSlimmers",void 0),_([d()],H.prototype,"renderer",void 0),_([d()],H.prototype,"checkedController",void 0),_([d()],H.prototype,"stateController",void 0),_([d()],H.prototype,"showErrorController",void 0),_([d()],H.prototype,"pageResizeObserverSlimmer",void 0),_([d()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_([d()],H.prototype,"changeEventEmitter",void 0),H.style=":host(.block){display:block}:host(.block) vega-tooltip{display:block}:host{max-width:100%;display:inline-block;vertical-align:middle;line-height:0}:host vega-tooltip{max-width:100%}:host .swatch{margin:2px;padding:1px;box-sizing:border-box}:host .swatch vega-box{width:100%;height:100%}:host .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .vega-selection-chip{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));cursor:pointer;margin:1px}:host .variant-text .label{text-align:center}:host .size-extra-small.variant-swatch.vega-selection-chip{padding-top:2px;padding-bottom:2px;padding-left:2px;padding-right:12px}:host .size-extra-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:2px;padding-bottom:2px}:host .size-extra-small vega-flex{height:16px}:host .size-extra-small .swatch{width:12px;height:12px}:host .size-small.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:12px}:host .size-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:4px;padding-bottom:4px}:host .size-small vega-flex{height:24px}:host .size-small .swatch{width:20px;height:20px}:host .size-medium.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:16px}:host .size-medium.variant-text.vega-selection-chip{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .size-medium vega-flex{height:32px}:host .size-medium .swatch{width:28px;height:28px}:host .size-large.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:20px}:host .size-large.variant-text.vega-selection-chip{padding-left:20px;padding-right:20px;padding-top:4px;padding-bottom:4px}:host .size-large vega-flex{height:40px}:host .size-large .swatch{width:36px;height:36px}:host .vega-selection-chip:not(.disabled){background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-tile, 171, 198, 216, 1))}:host .vega-selection-chip:not(.disabled):hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-tile-hover, 115, 160, 190, 1))}:host .vega-selection-chip:not(.disabled):focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-tile-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .vega-selection-chip:not(.disabled).checked:hover{background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1))}:host .vega-selection-chip:not(.disabled).checked:focus-visible{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).error{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-selection-chip:not(.disabled).error:hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-selection-chip:not(.disabled).error:focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))}:host .vega-selection-chip.disabled{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));pointer-events:none;color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled:focus-visible{outline:none}:host .vega-selection-chip.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled .swatch{opacity:0.5}";var P=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class $ extends n{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label})}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("slot",null))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([s()],$.prototype,"host",void 0),P([s()],$.prototype,"label",void 0),P([s()],$.prototype,"required",void 0),P([s()],$.prototype,"hint",void 0),P([s()],$.prototype,"disabled",void 0);var q=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class U extends n{watchValue(){this.changeEventEmitter.emit(this.value),j.notify(R,{host:this.host,detail:this.value})}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"radio":return"string"==typeof e;case"checkbox":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return c.warn(`Invalid selection chip group value ${e} for ${this.selectType} mode`),!1}}}q([s()],U.prototype,"host",void 0),q([s({writable:!0})],U.prototype,"value",void 0),q([s()],U.prototype,"changeEventEmitter",void 0),q([s()],U.prototype,"selectType",void 0),q([l("watchValue")],U.prototype,"watchValue",null);var K=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class B extends n{constructor(){super(...arguments),this.mutationObserver=new z({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["checked"]},mutationFilter:S("VEGA-SELECTION-CHIP"),callback:this.syncChipArrayAndValue.bind(this)}),this.selectionChipArray=[]}disconnectedCallback(){}componentWillLoad(){this.value&&0!==this.value.length||this.syncChipArrayAndValue()}componentDidLoad(){}watchSelectType(){this.syncChipArrayAndValue()}getSelectionChipArray(){return this.selectionChipArray}syncChipArrayAndValue(e){this.selectionChipArray=Array.from(this.host.querySelectorAll("vega-selection-chip")),"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems(e)}setValueFromCheckboxItems(){const e=this.selectionChipArray.filter((e=>e.checked)).map((e=>e.value));O(this.value,e,!0)||this.valueController.setValue(e)}setValueFromRadioItems(e){const t=this.findAttributeMutation(e);if(t){const e=this.getCurrentChip(t);e&&e.checked&&this.valueController.setValue(e.value)}else{const e=this.getFirstCheckedChip();this.valueController.setValue(e?e.value:"")}}findAttributeMutation(e){return e&&e.find((e=>e.attributeName))}getCurrentChip(e){if(e&&"VEGA-SELECTION-CHIP"===e.target.tagName&&"checked"===e.attributeName)return e.target}getFirstCheckedChip(){return this.selectionChipArray.find((e=>e.checked))}}K([s()],B.prototype,"host",void 0),K([s()],B.prototype,"selectType",void 0),K([s()],B.prototype,"valueController",void 0),K([s()],B.prototype,"value",void 0),K([d()],B.prototype,"mutationObserver",void 0),K([l("disconnectedCallback")],B.prototype,"disconnectedCallback",null),K([l("componentWillLoad")],B.prototype,"componentWillLoad",null),K([l("componentDidLoad")],B.prototype,"componentDidLoad",null),K([l("watchSelectType")],B.prototype,"watchSelectType",null);var J=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Q=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new $,this.itemsController=new B,this.valueController=new U,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new V:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.getSelectionChipArray(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(Q,u),this.valueNotifySlimmer=E(Q,"value","watchValue"),this.disabledNotifySlimmer=E(Q,"disabled","watchDisabled"),this.selectTypeNotifySlimmer=E(Q,"selectType","watchSelectType"),this.changeEventPrevent=new T([u],(()=>this.host),!0),this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return r(e(t,null,this.renderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};J([p()],Q.prototype,"globalSlimmers",void 0),J([d()],Q.prototype,"renderer",void 0),J([d()],Q.prototype,"itemsController",void 0),J([d()],Q.prototype,"valueController",void 0),J([d()],Q.prototype,"formFieldController",void 0),J([d()],Q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),J([d()],Q.prototype,"changeEventEmitter",void 0),J([d()],Q.prototype,"valueNotifySlimmer",void 0),J([d()],Q.prototype,"disabledNotifySlimmer",void 0),J([d()],Q.prototype,"selectTypeNotifySlimmer",void 0),J([d()],Q.prototype,"changeEventPrevent",void 0),Q.style=':host{display:block}:host vega-field-label{margin-bottom:8px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:4px;padding-left:8px;padding-right:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{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-hint{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-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:block;margin-top:12px;margin-left:8px;margin-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{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-error{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-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}';export{H as vega_selection_chip,Q as vega_selection_chip_group}
|
|
1
|
+
import{h as e,H as t,r as i,c as o,g as a}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as s,M as l,V as n,I as d,L as c}from"./p-6e1ab235.js";import{V as h,I as p}from"./p-d849e0f5.js";import{R as v}from"./p-228de113.js";import{c as g}from"./p-86194314.js";import{S as b}from"./p-fddca002.js";import{O as f}from"./p-331a62d5.js";import{d as m,f as u}from"./p-3c21b875.js";import{f as x}from"./p-308aa2e3.js";import{f as w}from"./p-d9671d27.js";import{C as j}from"./p-2d0d575f.js";import{P as y,g as k}from"./p-7d9cd9c8.js";import{c as C}from"./p-053eb64a.js";import{F as R}from"./p-a528714c.js";import{M as z}from"./p-78a57a17.js";import{a as S}from"./p-52b8f2d2.js";import{i as O}from"./p-d27ae9ff.js";import{c as E}from"./p-cef9f638.js";import{C as T}from"./p-2033f86e.js";import{F as I}from"./p-43257678.js";import{R as V}from"./p-280cbcdb.js";import"./p-b1faebe0.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-5f377954.js";import"./p-64c3d021.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-4c192985.js";import"./p-112455b1.js";import"./p-54ae02db.js";import"./p-b75ee3ba.js";import"./p-24cb0a7e.js";import"./p-d5d6dae6.js";import"./p-39b4c838.js";import"./p-02841589.js";import"./p-bf19682d.js";import"./p-a7b5f497.js";import"./p-8c9ea6f4.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-39482a1a.js";import"./p-abd7aeaa.js";var N=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class L extends n{componentWillRender(){this.currentSize=v.formatCustom(this.size)}render(){return e(t,{class:{block:this.block}},this.renderTooltip())}renderTooltip(){return e("vega-tooltip",Object.assign({trigger:this.disabled&&this.disabledTooltip?"hover":"none",alignment:"center"},this.disabledTooltip),this.renderSelectionChip())}renderSelectionChip(){return e("vega-box",{corners:"rounded-full",class:{"vega-selection-chip":!0,[`size-${this.currentSize}`]:!0,[`variant-${this.variant||"text"}`]:!0,checked:this.checked,error:this.showError,disabled:this.disabled},"aria-label":this.label||"No label defined",onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:g(),tabIndex:this.disabled?-1:0},this.renderContent())}renderContent(){return e("vega-flex",{gap:L.gapSizeMap[this.currentSize],"align-items":"center","justify-content":"text"===this.variant?"center":"start"},"swatch"===this.variant&&this.renderSwatch(),this.renderLabel())}renderLabel(){return e("vega-font",{color:"text-primary",class:"label vega-flex-grow",variant:L.labelFontMap[this.currentSize]},this.label)}renderSwatch(){return e("vega-box",{"background-color":"bg-primary",corners:"rounded-full",class:"swatch vega-flex-shrink-0"},e("vega-box",{"background-color":this.swatchColor,corners:"rounded-full"}))}}L.gapSizeMap={"extra-small":"size-4",small:"size-4",medium:"size-8",large:"size-8"},L.labelFontMap={"extra-small":"font-field-label-xs",small:"font-field-label-sm",medium:"font-field-label",large:"font-field-label-lg"},N([s()],L.prototype,"host",void 0),N([s()],L.prototype,"label",void 0),N([s()],L.prototype,"block",void 0),N([s()],L.prototype,"size",void 0),N([s()],L.prototype,"variant",void 0),N([s()],L.prototype,"swatchColor",void 0),N([s()],L.prototype,"disabledTooltip",void 0),N([s()],L.prototype,"disabled",void 0),N([s()],L.prototype,"selectType",void 0),N([s()],L.prototype,"checked",void 0),N([s()],L.prototype,"checkedController",void 0),N([s()],L.prototype,"showError",void 0),N([l("componentWillRender")],L.prototype,"componentWillRender",null);var A=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class F extends n{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.setChecked(e),this.changeEventEmitter.emit(t)}}A([s()],F.prototype,"host",void 0),A([s({writable:!0})],F.prototype,"checked",void 0),A([s()],F.prototype,"changeEventEmitter",void 0),A([s()],F.prototype,"value",void 0);var D=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class G extends b{constructor(){super({parent:"vega-selection-chip-group",subStates:[{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"selectType",parentStateName:"selectType",callback:e=>{this.selectType="checkbox"===e?"checkbox":"radio"}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}D([s()],G.prototype,"host",void 0),D([s({writable:!0})],G.prototype,"disabled",void 0),D([s({writable:!0})],G.prototype,"selectType",void 0),D([s()],G.prototype,"value",void 0),D([s()],G.prototype,"checkedController",void 0);var W=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class M extends n{connectedCallback(){this.selectionChipGroup=w(this.host,"vega-selection-chip-group"),this.selectionChipGroup&&(this.fieldErrorObserver=new f(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),j.register(m.getSubject(this.selectionChipGroup,x),this.fieldErrorObserver))}disconnectedCallback(){this.selectionChipGroup&&j.unregister(m.getSubject(this.selectionChipGroup,x),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}W([s({writable:!0})],M.prototype,"showError",void 0),W([s()],M.prototype,"host",void 0),W([l("connectedCallback")],M.prototype,"connectedCallback",null),W([l("disconnectedCallback")],M.prototype,"disconnectedCallback",null);var _=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const H=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.checkedController=new F,this.stateController=new G,this.showErrorController=new M,this.pageResizeObserverSlimmer=new y,this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(H,u),this.showError=!1,this.currentBreakpoint=k(),this.label="",this.size="medium",this.variant="text",this.disabled=!1,this.block=!1,this.swatchColor="bg-status-info"}watchSize(){}componentWillRender(){}render(){return r(this.renderer.render(),this.host)}get host(){return a(this)}static get watchers(){return{size:["watchSize"]}}};_([p()],H.prototype,"globalSlimmers",void 0),_([d()],H.prototype,"renderer",void 0),_([d()],H.prototype,"checkedController",void 0),_([d()],H.prototype,"stateController",void 0),_([d()],H.prototype,"showErrorController",void 0),_([d()],H.prototype,"pageResizeObserverSlimmer",void 0),_([d()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_([d()],H.prototype,"changeEventEmitter",void 0),H.style=":host(.block){display:block}:host(.block) vega-tooltip{display:block}:host{max-width:100%;display:inline-block;vertical-align:middle;line-height:0}:host vega-tooltip{max-width:100%}:host .swatch{margin:2px;padding:1px;box-sizing:border-box}:host .swatch vega-box{width:100%;height:100%}:host .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .vega-selection-chip{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));cursor:pointer;margin:1px}:host .variant-text .label{text-align:center}:host .size-extra-small.variant-swatch.vega-selection-chip{padding-top:2px;padding-bottom:2px;padding-left:2px;padding-right:12px}:host .size-extra-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:2px;padding-bottom:2px}:host .size-extra-small vega-flex{height:16px}:host .size-extra-small .swatch{width:12px;height:12px}:host .size-small.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:12px}:host .size-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:4px;padding-bottom:4px}:host .size-small vega-flex{height:24px}:host .size-small .swatch{width:20px;height:20px}:host .size-medium.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:16px}:host .size-medium.variant-text.vega-selection-chip{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .size-medium vega-flex{height:32px}:host .size-medium .swatch{width:28px;height:28px}:host .size-large.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:20px}:host .size-large.variant-text.vega-selection-chip{padding-left:20px;padding-right:20px;padding-top:4px;padding-bottom:4px}:host .size-large vega-flex{height:40px}:host .size-large .swatch{width:36px;height:36px}:host .vega-selection-chip:not(.disabled){background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-tile, 171, 198, 216, 1))}:host .vega-selection-chip:not(.disabled):hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-tile-hover, 115, 160, 190, 1))}:host .vega-selection-chip:not(.disabled):focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-tile-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .vega-selection-chip:not(.disabled).checked:hover{background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1))}:host .vega-selection-chip:not(.disabled).checked:focus-visible{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).error{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-selection-chip:not(.disabled).error:hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-selection-chip:not(.disabled).error:focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))}:host .vega-selection-chip.disabled{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));pointer-events:none;color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled:focus-visible{outline:none}:host .vega-selection-chip.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled .swatch{opacity:0.5}";var P=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class $ extends n{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label})}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("slot",null))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([s()],$.prototype,"host",void 0),P([s()],$.prototype,"label",void 0),P([s()],$.prototype,"required",void 0),P([s()],$.prototype,"hint",void 0),P([s()],$.prototype,"disabled",void 0);var q=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class U extends n{watchValue(){this.changeEventEmitter.emit(this.value),j.notify(R,{host:this.host,detail:this.value})}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"radio":return"string"==typeof e;case"checkbox":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return c.warn(`Invalid selection chip group value ${e} for ${this.selectType} mode`),!1}}}q([s()],U.prototype,"host",void 0),q([s({writable:!0})],U.prototype,"value",void 0),q([s()],U.prototype,"changeEventEmitter",void 0),q([s()],U.prototype,"selectType",void 0),q([l("watchValue")],U.prototype,"watchValue",null);var K=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class B extends n{constructor(){super(...arguments),this.mutationObserver=new z({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["checked"]},mutationFilter:S("VEGA-SELECTION-CHIP"),callback:this.syncChipArrayAndValue.bind(this)}),this.selectionChipArray=[]}disconnectedCallback(){}componentWillLoad(){this.value&&0!==this.value.length||this.syncChipArrayAndValue()}componentDidLoad(){}watchSelectType(){this.syncChipArrayAndValue()}getSelectionChipArray(){return this.selectionChipArray}syncChipArrayAndValue(e){this.selectionChipArray=Array.from(this.host.querySelectorAll("vega-selection-chip")),"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems(e)}setValueFromCheckboxItems(){const e=this.selectionChipArray.filter((e=>e.checked)).map((e=>e.value));O(this.value,e,!0)||this.valueController.setValue(e)}setValueFromRadioItems(e){const t=this.findAttributeMutation(e);if(t){const e=this.getCurrentChip(t);e&&e.checked&&this.valueController.setValue(e.value)}else{const e=this.getFirstCheckedChip();this.valueController.setValue(e?e.value:"")}}findAttributeMutation(e){return e&&e.find((e=>e.attributeName))}getCurrentChip(e){if(e&&"VEGA-SELECTION-CHIP"===e.target.tagName&&"checked"===e.attributeName)return e.target}getFirstCheckedChip(){return this.selectionChipArray.find((e=>e.checked))}}K([s()],B.prototype,"host",void 0),K([s()],B.prototype,"selectType",void 0),K([s()],B.prototype,"valueController",void 0),K([s()],B.prototype,"value",void 0),K([d()],B.prototype,"mutationObserver",void 0),K([l("disconnectedCallback")],B.prototype,"disconnectedCallback",null),K([l("componentWillLoad")],B.prototype,"componentWillLoad",null),K([l("componentDidLoad")],B.prototype,"componentDidLoad",null),K([l("watchSelectType")],B.prototype,"watchSelectType",null);var J=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Q=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new $,this.itemsController=new B,this.valueController=new U,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new V:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.getSelectionChipArray(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(Q,u),this.valueNotifySlimmer=E(Q,"value","watchValue"),this.disabledNotifySlimmer=E(Q,"disabled","watchDisabled"),this.selectTypeNotifySlimmer=E(Q,"selectType","watchSelectType"),this.changeEventPrevent=new T([u],(()=>this.host),!0),this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return r(e(t,null,this.renderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};J([p()],Q.prototype,"globalSlimmers",void 0),J([d()],Q.prototype,"renderer",void 0),J([d()],Q.prototype,"itemsController",void 0),J([d()],Q.prototype,"valueController",void 0),J([d()],Q.prototype,"formFieldController",void 0),J([d()],Q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),J([d()],Q.prototype,"changeEventEmitter",void 0),J([d()],Q.prototype,"valueNotifySlimmer",void 0),J([d()],Q.prototype,"disabledNotifySlimmer",void 0),J([d()],Q.prototype,"selectTypeNotifySlimmer",void 0),J([d()],Q.prototype,"changeEventPrevent",void 0),Q.style=':host{display:block}:host vega-field-label{margin-bottom:8px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:4px;padding-left:8px;padding-right:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{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-hint{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-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:block;margin-top:12px;margin-left:8px;margin-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{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-error{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-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}';export{H as vega_selection_chip,Q as vega_selection_chip_group}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,H as a,g as r}from"./p-6b2342e0.js";import{M as n,a as s}from"./p-cdbbdcc2.js";import{R as o}from"./p-280cbcdb.js";import{s as p}from"./p-519a7d55.js";import{I as h}from"./p-6e1ab235.js";import{V as d,I as l}from"./p-d849e0f5.js";import{F as x}from"./p-a3d77013.js";import{b as g}from"./p-5773a9a3.js";import{C as f}from"./p-2d0d575f.js";import{c as m}from"./p-3cdbee7e.js";import{f as c,E as v}from"./p-2ee4def0.js";import{C as b}from"./p-1da54ff3.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-575235c8.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-96bda7ca.js";import"./p-d3bf55e9.js";import"./p-7d9cd9c8.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-a30ebdf5.js";import"./p-f1436035.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";const u=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the text area",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the text area",payloadValue:e=>!1===e.autoValidation}];var w=function(e,t,i,a){var r,n=arguments.length,s=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const y=class{constructor(a){e(this,a),this.vegaChange=t(this,"vegaChange",7),this.change=t(this,"change",7),this.vegaBlur=t(this,"vegaBlur",7),this.blur=t(this,"blur",7),this.globalSlimmers={},this.formFieldController=new x({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new o:null},{propertyName:"minLength",ruleFactory:e=>e?new n({minStrLength:e}):null},{propertyName:"maxLength",ruleFactory:e=>e?new s({maxStrLength:e}):null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.textareaRef]}),this.changeEventEmitter=m(y,c),this.blurEventEmitter=m(y,v),this.textareaEventPrevent=new b([c],(()=>this.inputContainerRef)),this.vegaComponentUsageRuntimeMetricsSlimmer=new d(u),this.currentCharCount=0,this.placeholder="",this.hint="",this.disabled=!1,this.label="",this.showCounter=!1,this.value="",this.isValid=null,this.autoValidation=!0,this.required=!1,this.maxLength=null,this.minLength=null,this.resizable=!0,this.rows=5,this.validationRules=[],this.renderTextareaContainer=()=>i("div",{class:{"vega-textarea-container":!0,"vega-textarea-not-resizable":!this.resizable},ref:e=>this.inputContainerRef=e},i("textarea",{rows:this.rows>=2?this.rows-1:4,placeholder:this.placeholder,disabled:this.disabled,required:this.required,ref:this.setTextareaRef,maxLength:this.maxLength,minLength:this.minLength,value:this.value,onBlur:this.handleTextareaBlur,"aria-label":this.label||"No label defined"}),this.showCounter&&this.renderCharacterCounter()),this.renderHintMessage=()=>i("vega-text",null,this.hint),this.renderCharacterCounter=()=>i("div",{class:{"vega-textarea-counter":!0,"counter-exceed-max-length":this.isExceedMaxLength(this.value,this.maxLength)}},i("span",{id:"current"},this.currentCharCount),null!=this.maxLength&&this.renderMaxLengthNumber()),this.renderMaxLengthNumber=()=>i("span",{id:"maximum"},"/",this.maxLength),this.setTextareaRef=e=>{e&&this.textareaRef!==e&&(this.textareaRef=e)},this.inputFocus=()=>{this.textareaRef.focus()},this.handleTextareaBlur=e=>{this.blurEventEmitter.emit(void 0,e)},this.isExceedMaxLength=(e,t)=>null!=t&&e.length>t}watchValue(e){this.changeEventEmitter.emit(e),this.textareaRef.value!==this.value&&(this.textareaRef.value=this.value),e&&(this.currentCharCount=e.length),f.notify(g,{host:this.host,detail:e})}watchValidationRules(){}componentWillLoad(){this.currentCharCount=this.value.length}handleValueTextarea(){this.value=this.textareaRef.value,this.currentCharCount=this.value.length}render(){return p(i(a,{class:{disabled:this.disabled}},this.renderLabelDom(),this.renderTextareaContainer(),this.hint&&this.renderHintMessage()),this.host)}renderLabelDom(){return i("vega-field-label",{onClick:this.inputFocus,"is-field-required":this.required,disabled:this.disabled,label:this.label})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};w([l()],y.prototype,"globalSlimmers",void 0),w([h()],y.prototype,"formFieldController",void 0),w([h()],y.prototype,"changeEventEmitter",void 0),w([h()],y.prototype,"blurEventEmitter",void 0),w([h()],y.prototype,"textareaEventPrevent",void 0),w([h()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=':host{display:inline-block;width:100%;text-align:left}:host .vega-textarea-container{display:flex;position:relative;width:100%;resize:vertical;box-sizing:border-box;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;overflow:hidden;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));min-height:50px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host textarea{display:block;position:relative;padding-top:12px;padding-right:16px;padding-bottom:32px;padding-left:16px;width:100%;resize:vertical;box-sizing:border-box;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:8px;outline:2px solid transparent;outline-offset:2px;border-style:none;overflow:auto;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));min-height:48px}@media screen and (min-width: 768px) and (max-width: 1023px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-textarea-container.vega-textarea-not-resizable{resize:none}:host .vega-textarea-container.vega-textarea-not-resizable textarea{resize:none}:host vega-field-label{margin-bottom:8px}:host .vega-textarea-counter{position:absolute;bottom:8px;right:8px;display:flex;padding-left:4px;padding-right:4px;padding-top:2px;padding-bottom:2px;border-radius:4px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));background-color:rgba(var(--v-bg-textarea-count, 4, 4, 28, 0.6))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-textarea-counter{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-textarea-counter{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-textarea-counter{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-textarea-counter.counter-exceed-max-length{background-color:rgba(var(--v-bg-textarea-counter-exceed-max-length, 214, 46, 81))}:host textarea::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{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-error{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-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host vega-text{padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host vega-text{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-text{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-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-textarea-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-textarea-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}:host .vega-textarea-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-textarea-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-textarea-container.error:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}:host(.disabled) textarea{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host(.disabled) .vega-textarea-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host .vega-hidden{display:none}';export{y as vega_textarea}
|
|
1
|
+
import{r as e,c as t,h as i,H as a,g as r}from"./p-6b2342e0.js";import{M as n,a as s}from"./p-cdbbdcc2.js";import{R as o}from"./p-280cbcdb.js";import{s as p}from"./p-519a7d55.js";import{I as h}from"./p-6e1ab235.js";import{V as d,I as l}from"./p-d849e0f5.js";import{F as x}from"./p-43257678.js";import{F as g}from"./p-a528714c.js";import{C as f}from"./p-2d0d575f.js";import{c as m}from"./p-053eb64a.js";import{f as c,E as v}from"./p-3c21b875.js";import{C as b}from"./p-2033f86e.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-308aa2e3.js";import"./p-39482a1a.js";import"./p-7d9cd9c8.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-fddca002.js";import"./p-24cb0a7e.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";const u=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the text area",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the text area",payloadValue:e=>!1===e.autoValidation}];var w=function(e,t,i,a){var r,n=arguments.length,s=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const y=class{constructor(a){e(this,a),this.vegaChange=t(this,"vegaChange",7),this.change=t(this,"change",7),this.vegaBlur=t(this,"vegaBlur",7),this.blur=t(this,"blur",7),this.globalSlimmers={},this.formFieldController=new x({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new o:null},{propertyName:"minLength",ruleFactory:e=>e?new n({minStrLength:e}):null},{propertyName:"maxLength",ruleFactory:e=>e?new s({maxStrLength:e}):null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.textareaRef]}),this.changeEventEmitter=m(y,c),this.blurEventEmitter=m(y,v),this.textareaEventPrevent=new b([c],(()=>this.inputContainerRef)),this.vegaComponentUsageRuntimeMetricsSlimmer=new d(u),this.currentCharCount=0,this.placeholder="",this.hint="",this.disabled=!1,this.label="",this.showCounter=!1,this.value="",this.isValid=null,this.autoValidation=!0,this.required=!1,this.maxLength=null,this.minLength=null,this.resizable=!0,this.rows=5,this.validationRules=[],this.renderTextareaContainer=()=>i("div",{class:{"vega-textarea-container":!0,"vega-textarea-not-resizable":!this.resizable},ref:e=>this.inputContainerRef=e},i("textarea",{rows:this.rows>=2?this.rows-1:4,placeholder:this.placeholder,disabled:this.disabled,required:this.required,ref:this.setTextareaRef,maxLength:this.maxLength,minLength:this.minLength,value:this.value,onBlur:this.handleTextareaBlur,"aria-label":this.label||"No label defined"}),this.showCounter&&this.renderCharacterCounter()),this.renderHintMessage=()=>i("vega-text",null,this.hint),this.renderCharacterCounter=()=>i("div",{class:{"vega-textarea-counter":!0,"counter-exceed-max-length":this.isExceedMaxLength(this.value,this.maxLength)}},i("span",{id:"current"},this.currentCharCount),null!=this.maxLength&&this.renderMaxLengthNumber()),this.renderMaxLengthNumber=()=>i("span",{id:"maximum"},"/",this.maxLength),this.setTextareaRef=e=>{e&&this.textareaRef!==e&&(this.textareaRef=e)},this.inputFocus=()=>{this.textareaRef.focus()},this.handleTextareaBlur=e=>{this.blurEventEmitter.emit(void 0,e)},this.isExceedMaxLength=(e,t)=>null!=t&&e.length>t}watchValue(e){this.changeEventEmitter.emit(e),this.textareaRef.value!==this.value&&(this.textareaRef.value=this.value),e&&(this.currentCharCount=e.length),f.notify(g,{host:this.host,detail:e})}watchValidationRules(){}componentWillLoad(){this.currentCharCount=this.value.length}handleValueTextarea(){this.value=this.textareaRef.value,this.currentCharCount=this.value.length}render(){return p(i(a,{class:{disabled:this.disabled}},this.renderLabelDom(),this.renderTextareaContainer(),this.hint&&this.renderHintMessage()),this.host)}renderLabelDom(){return i("vega-field-label",{onClick:this.inputFocus,"is-field-required":this.required,disabled:this.disabled,label:this.label})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};w([l()],y.prototype,"globalSlimmers",void 0),w([h()],y.prototype,"formFieldController",void 0),w([h()],y.prototype,"changeEventEmitter",void 0),w([h()],y.prototype,"blurEventEmitter",void 0),w([h()],y.prototype,"textareaEventPrevent",void 0),w([h()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=':host{display:inline-block;width:100%;text-align:left}:host .vega-textarea-container{display:flex;position:relative;width:100%;resize:vertical;box-sizing:border-box;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;overflow:hidden;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));min-height:50px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-textarea-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host textarea{display:block;position:relative;padding-top:12px;padding-right:16px;padding-bottom:32px;padding-left:16px;width:100%;resize:vertical;box-sizing:border-box;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:8px;outline:2px solid transparent;outline-offset:2px;border-style:none;overflow:auto;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));min-height:48px}@media screen and (min-width: 768px) and (max-width: 1023px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host textarea{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-textarea-container.vega-textarea-not-resizable{resize:none}:host .vega-textarea-container.vega-textarea-not-resizable textarea{resize:none}:host vega-field-label{margin-bottom:8px}:host .vega-textarea-counter{position:absolute;bottom:8px;right:8px;display:flex;padding-left:4px;padding-right:4px;padding-top:2px;padding-bottom:2px;border-radius:4px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));background-color:rgba(var(--v-bg-textarea-count, 4, 4, 28, 0.6))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-textarea-counter{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-textarea-counter{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-textarea-counter{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-textarea-counter.counter-exceed-max-length{background-color:rgba(var(--v-bg-textarea-counter-exceed-max-length, 214, 46, 81))}:host textarea::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{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-error{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-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host vega-text{padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host vega-text{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-text{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-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-textarea-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-textarea-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}:host .vega-textarea-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-textarea-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-textarea-container.error:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}:host(.disabled) textarea{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host(.disabled) .vega-textarea-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host .vega-hidden{display:none}';export{y as vega_textarea}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r,b as e,e as t,k as a,f as s,g as o,l as n,m as i,n as u,o as f,p as c,q as l,r as d,s as b,h as v,t as p,B as m,C as $,u as h}from"./p-b1faebe0.js";import{B as j}from"./p-ed45b3b6.js";import{L as g}from"./p-6e1ab235.js";import{R as k}from"./p-
|
|
1
|
+
import{j as r,b as e,e as t,k as a,f as s,g as o,l as n,m as i,n as u,o as f,p as c,q as l,r as d,s as b,h as v,t as p,B as m,C as $,u as h}from"./p-b1faebe0.js";import{B as j}from"./p-ed45b3b6.js";import{L as g}from"./p-6e1ab235.js";import{R as k}from"./p-228de113.js";import{a as w}from"./p-d884c644.js";import{S as x,s as T}from"./p-824a06ba.js";import{a as O}from"./p-74168615.js";const S=new class extends x{constructor(){super(...arguments),this.states=["default","focus-visible","hover","active"]}formatToken(a){return r(a)?`border-color: ${t[a]};`:(g.warn(`The borderColor value ${a} is invalid, it must be a value of: `,e),"")}getStates(){return this.states}},C=new class extends x{constructor(){super(...arguments),this.states=["default","focus-visible","hover"]}formatToken(r){return a(r)?`box-shadow: ${o[r]};`:(g.warn(`The shadow value ${r} is invalid, it must be a value of: `,s),"")}getStates(){return this.states}},B=new class extends x{constructor(){super(...arguments),this.states=["default","focus-visible","hover","active"]}formatToken(r){return n(r)?`border: ${u[r]};`:(g.warn(`The border value ${r} is invalid, it must be a value of: `,i),"")}getStates(){return this.states}},F=new class{format(r,e){switch(e){case"backgroundColor":return T.format(r);case"borderColor":return S.format(r);case"shadow":return C.format(r);case"border":return B.format(r);default:throw new Error(`Invalid flag ${e} passed into StateFormatFacade`)}}};function q(r,e,t){g.warn(`The ${r} value ${e} is invalid, it must be a value of: `,t)}function y(r,e){let t="";return e.includes("dark")&&(t+=` dark:v-dark-${r}`),t}function E(r){if(f(r))return`v-p-${r}`;q("padding",r,Object.keys(v))}function I(r){if(p(r))return`v-border-${r}`;q("border-style",r,O)}function L(r){if(c(r))return`v-${r}`;q("border-radius",r,Object.keys(m))}function R(e){if(r(e))return`v-${e}`;q("border-color",e,$.filter((()=>/^border-color-.+$/.test)))}function z(r,e=[]){if(l(r))return`v-${r}`+y(r,e);q("background-color",r,$.filter((()=>/^bg-.+$/.test)))}function A(r,e=[]){if(d(r))return`v-${r}`+y(r,e);q("text-color",r,$.filter((()=>/^text-.+$/.test)))}function D(r){if(b(r))return`vega-flex-${r}`;q("breakpoint",r,Object.keys(j))}function G(r){if(b(r))return j[r];q("breakpoint",r,Object.keys(j))}function H(r){if(f(r))return`v-gap-${r}`;q("gap",r,Object.keys(v))}function J(r,e=[]){if(a(r))return`v-${r}`+y(r,e);q("shadows",r,s)}function K(r,e){if(null!=r)return k.format(r,e)}function M(r){if(h(r))return`v-${r}`;q("font",r,w)}function N(r,e){if(null!=r)return F.format(r,e)}export{H as a,J as b,G as c,z as d,R as e,K as f,L as g,E as h,A as i,N as j,I as k,D as l,M as m}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as e}from"./p-6e1ab235.js";import{C as t}from"./p-2d0d575f.js";import{U as a}from"./p-
|
|
1
|
+
import{L as e}from"./p-6e1ab235.js";import{C as t}from"./p-2d0d575f.js";import{U as a}from"./p-a528714c.js";import{I as n,c as r}from"./p-a4670e23.js";const i={"This field is required":"This field is required","The minimum input value is {0}":"The minimum input value is {0}","The maximum input value is {0}":"The maximum input value is {0}","The end value should be greater than the start value":"The end value should be greater than the start value","The end date should be later than start date":"The end date should be later than start date","Credit card number is invalid":"Credit card number is invalid","Please enter the correct email format.":"Please enter the correct email format.","The maximum input length is {0}":"The maximum input length is {0}","The start date should be later than {0}":"The start date should be later than {0}","The start date should be earlier than {0}":"The start date should be earlier than {0}","The end date should be earlier than {0}":"The end date should be earlier than {0}","The date should be later than {0}":"The date should be later than {0}","The date should be earlier than {0}":"The date should be earlier than {0}","The minimum input length is {0}":"The minimum input length is {0}","The end time should be later than start time":"The end time should be later than start time","Phone number is not valid":"Phone number is not valid","Phone number is valid but it belongs to country {0}, not country {1}":"Phone number is valid but it belongs to country {0}, not country {1}",Viewing:"Viewing",Show:"Show","Go To":"Go To","Viewing {0}-{1} of {2}":"Viewing {0}-{1} of {2}","Viewing [{0}-{1}] of {2}":"Viewing [{0}-{1}] of {2}","Show [{0} items / page]":"Show [{0} items / page]","Items Per Page":"Items Per Page",Upload:"Upload",Clear:"Clear",Today:"Today",Day:"Day",Week:"Week",Month:"Month",Sun:"Sun",Mon:"Mon",Tue:"Tue",Wed:"Wed",Thu:"Thu",Fri:"Fri",Sat:"Sat","Sun-short":"S","Mon-short":"M","Tue-short":"T","Wed-short":"W","Thu-short":"T","Fri-short":"F","Sat-short":"S",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",Jan:"Jan",Feb:"Feb",Mar:"Mar",Apr:"Apr",Jun:"Jun",Jul:"Jul",Aug:"Aug",Sep:"Sep",Oct:"Oct",Nov:"Nov",Dec:"Dec","All Day":"All Day","Select or drop your file here":"Select or drop your file here","Please sign here":"Please sign here","Clear Signature":"Clear Signature","Start Date":"Start Date","End Date":"End Date","Please select":"Please select","No options":"No options","No results found":"No results found",Minimum:"Minimum",Maximum:"Maximum","Select Time":"Select Time","Start Time":"Start Time","End Time":"End Time","There is no data to display":"There is no data to display","Text Styles":"Text Styles",Bold:"Bold",Italic:"Italic",Underline:"Underline",Strikethrough:"Strikethrough",Code:"Code","Text Color":"Text Color","Left Align":"Left Align","Center Align":"Center Align","Right Align":"Right Align",Justified:"Justified",Bullets:"Bullets",Numbers:"Numbers","More Indent":"More Indent","Less Indent":"Less Indent",Link:"Link",Image:"Image","Clear Style":"Clear Style",URL:"URL",Text:"Text",Edit:"Edit",Unlink:"Unlink",Size:"Size","Alt Text":"Alt Text","Delete Image":"Delete Image",Sm:"Sm",Md:"Md",Lg:"Lg",Title:"Title",Subtitle:"Subtitle","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3",Paragraph:"Paragraph","Reset Selection":"Reset Selection","Select Language":"Select Language","Delete Code":"Delete Code","Copy Code":"Copy Code","Code Block":"Code Block",Copied:"Copied","Repeat every {0} days":"Repeat every {0} days","Repeat daily":"Repeat daily","Repeat every {0} weeks on {1}":"Repeat every {0} weeks on {1}","Repeat weekly on {0}":"Repeat weekly on {0}","Repeat every {0} months on day {1}":"Repeat every {0} months on day {1}","Repeat monthly on day {0}":"Repeat monthly on day {0}","Repeat every {0} years on {1} {2}":"Repeat every {0} years on {1} {2}","Repeat yearly on {0} {1}":"Repeat yearly on {0} {1}","until {0}":"until {0}","after {0} occurrences":"after {0} occurrences",Sunday:"Sunday",Monday:"Monday",Tuesday:"Tuesday",Wednesday:"Wednesday",Thursday:"Thursday",Friday:"Friday",Saturday:"Saturday",am:"am",pm:"pm"};class o{constructor(){this.resources={en:i},this._currentLanguage="en"}get currentLanguage(){return this._currentLanguage}init({resources:n,language:r}){n&&Object.keys(n).length>0?this.resources=n:(e.warn('Resources are empty. Falling back to default language "en".'),this.resources={en:i}),r&&r in this.resources?this._currentLanguage=r:(e.warn(`Language "${r}" not found in resources. Falling back to default language "en".`),this._currentLanguage="en"),t.notify(a,{})}changeLanguage(n){this.resources[n]?(this._currentLanguage=n,t.notify(a,{})):e.warn(`Language "${n}" not found in resources.`)}t(e,...t){return t.reduce(((e,t,a)=>e.replace(new RegExp(`\\{${a}\\}`,"g"),String(t))),this.resources[this._currentLanguage][e]||i[e]||e)}registerComponent(e){const t=o.connectedComponents.get(e.tagName);t?t.add(e):o.connectedComponents.set(e.tagName,new Set([e]))}unRegisterComponent(e){const t=o.connectedComponents.get(e.tagName);t&&t.delete(e)}getConnectedComponents(){return o.connectedComponents}tWithPreservedBlocks(e,t=/(\[[^\]]*\])/g,...a){return this.t(e,...a).split(t).map((e=>{const a=t.test(e);return{content:a?e.substring(1,e.length-1):e,isPreserved:a}}))}}o.connectedComponents=new Map;const l=new o,s=[{payloadKey:"IS_INIT_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.init is called",canAccept:(e,t)=>"TranslationController"===e&&"init"===t,payloadValue:()=>!0},{payloadKey:"IS_CHANGE_LANGUAGE_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.changeLanguage is called",canAccept:(e,t)=>"TranslationController"===e&&"changeLanguage"===t,payloadValue:()=>!0}];class u{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=r(u,["init","changeLanguage"],s)}get currentLanguage(){return l.currentLanguage}init(e){l.init(e)}changeLanguage(e){l.changeLanguage(e)}}!function(e,t,a,n){var r,i=arguments.length,o=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,n);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(i<3?r(o):i>3?r(t,a,o):r(t,a))||o);i>3&&o&&Object.defineProperty(t,a,o)}([n()],u.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const d=new u;export{l as V,d as a,i as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-2ee4def0.js";import{b as n,c as s}from"./p-96bda7ca.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 c}from"./p-a4670e23.js";import{V as a}from"./p-8938b5c4.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 T=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 E,x,g,m;!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",t.INSERT_NODE_TO_NEAREST_ROOT="INSERT_NODE_TO_NEAREST_ROOT"}(E||(E={}));class w{constructor(){this.isFlushable=!1}}class A extends p{constructor(t){super(),this.type=u.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}clone(){const t=new A("");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);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){const{href:e,customAttribute:n={}}=t.link,s=t.useInternalStyle,r=n.target||(s?"_blank":"");return Object.assign(Object.assign(Object.assign({},n),e||s?{href:e}:{}),r?{target:r}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${r(t)}: ${e};`)).join(" ")}}class N extends f{constructor(t){super(),this.type=d.ALIGNMENT,this.textAlign=t}static from(t){return[d.ALIGNMENT,new N(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 N(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 y extends f{constructor(t){super(),this.type=d.INDENT,this.indent=Math.max(0,t)}static from(t){return[d.INDENT,new y(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new y(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class R{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 w?t.type:t.constructor.name,s=R.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}`)}static canHandle(t,e){return!!R.get(t,e.constructor.name)}}R.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(x||(x={}));class O extends p{}class S extends O{constructor(t){super(),this.type=x.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[x.CUSTOM_ATTRIBUTE,new S(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new S(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 C extends O{constructor(t){super(),this.type=x.CUSTOM_CLASS,this.customClass=t}static from(t){return[x.CUSTOM_CLASS,new C(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new C(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class B extends O{constructor(t){super(),this.type=x.CUSTOM_STYLE,this.customStyle=t}static from(t){return[x.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 k extends f{constructor(t){super(),this.type=d.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[d.INTERNAL_WRAPPER,new k(t)]}clone(){return new k(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class RTEBlock{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 N.from(e);case"indent":return y.from(e);case"customAttribute":return S.from(e);case"customClass":return C.from(e);case"customStyle":return B.from(e);case"internalWrapper":return k.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 A||t instanceof k))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof O)).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=T.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 C)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(x.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(x.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 w?R.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();e instanceof A||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"}(g||(g={}));class b extends p{}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(m||(m={}));class RTENode{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 S.from(e);case"customClass":return C.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 b||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 b||t instanceof C)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(x.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return T.getDOMByEntity(this)}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(x.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 w?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const s=T.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 v{}class _ extends v{constructor(){super(...arguments),this.doSplit=!0}}class L extends p{constructor(t){super(),this.type=u.SELECTION_RANGE,this.range=t}clone(){return new L(this.range)}}class I extends b{constructor(t){super(),this.type=g.STRIKETHROUGH,this.strikethrough=t}static from(t){return[g.STRIKETHROUGH,new I(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new I(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 D extends b{constructor(t){super(),this.type=g.UNDERLINE,this.underline=t}static from(t){return[g.UNDERLINE,new D(t)]}toJSON(){return{underline:this.underline}}clone(){return new D(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 $ extends b{constructor(t){super(),this.type=g.ITALIC,this.italic=t}static from(t){return[g.ITALIC,new $(t)]}toJSON(){return{italic:this.italic}}clone(){return new $(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 M extends b{constructor(t){super(),this.type=g.BOLD,this.bold=t}static from(t){return[g.BOLD,new M(t)]}toJSON(){return{bold:this.bold}}clone(){return new M(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 j extends b{constructor(t,e=!0){super(),this.type=g.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[g.CODE,new j(t,e)]}toJSON(){return{code:this.code}}clone(){return new j(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 P={key:"black",light:"#111128",dark:"#E3E3E8"},F=[P,{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"}],H="",W=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]];class K extends b{constructor(t){super(),this.type=g.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[g.TEXT_COLOR,new K(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new K(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:a.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return F.find((e=>e.key===t))||F[0]}}class J extends b{constructor(t,e=!0){super(),this.type=g.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[g.LINK,new J(t,e)]}toJSON(){return{link:this.link}}clone(){return new J(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class U extends v{constructor(t,e,n){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=n}toAnnotation(){return new A(this.groupKey)}}class G extends v{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}const z=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 RTEBlock)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof RTENode))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 X{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(x.CUSTOM_STYLE);n&&this.isCustomStyle(n,e)&&t.annotationMap.set(n.type,new B(n.removeStyles(e)))}createNewParagraph(t){const e=z.getRTEBlockClass("paragraph");if(e)return e.from({id:c(),type:"paragraph",nodes:[{id:c(),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 V extends w{constructor(t){super(),this.type=E.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class q extends X{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)&&e.isContentEditable()){const s=this.splitTextNode(n.range,e);return t.annotationMap.has("LINK")&&t.apply(new V(s)),s}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const n=e.cloneWithText("");this.setApplyTargetNode(n);const s=e.parent.children.findIndex((t=>t===e));return 0===t||!e.isContentEditable()&&t===s?[n,e]:t===e.text.length||!e.isContentEditable()&&t===s+1?[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,c=(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)]},a=i&&T.getEntityByDOM(i),l=o&&T.getEntityByDOM(o);if(a&&a.id===e.id){const i=n===s?t.endOffset:e.text.length,[o,a,l]=c(e.text,r,i);return this.setApplyTargetNode(a),[o,a,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[n,s,r]=c(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 Y extends _{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new M(this.bold)}}class Q extends p{constructor(){super(...arguments),this.type=u.CLEAR_FORMATTING,this.items=[g.BOLD,g.ITALIC,g.UNDERLINE,g.STRIKETHROUGH,g.TEXT_COLOR,g.CODE,x.CUSTOM_STYLE]}}class Z extends _{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Q}}class tt extends _{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new j(this.code)}}class et extends v{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class nt extends _{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new $(this.italic)}}class st 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 J(this.link)}}class rt extends _{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new I(this.strikethrough)}}class it extends _{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new D(this.underline)}}class ot extends X{handleAction(t,e){const n=t.toAnnotation();if(t instanceof et)e.annotationMap.delete(t.annotationType);else{if(!(n instanceof Q))return n instanceof b||n instanceof L?(t instanceof st&&(o(t.newText)&&(e.text=t.newText),e.parent.apply(new U(t.link.groupKey,[e],t.type))),t instanceof tt&&this.handleAction(new Z,e),t instanceof Y&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof nt&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof it||t instanceof rt)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(n.type,n)):void 0;n.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class ct extends w{constructor(){super(...arguments),this.type=E.DELETE_LINK_GROUP}}class at extends X{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new ct)}}class lt extends w{constructor(t){super(),this.type=E.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class ht extends X{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 c=n.text;if(s===r&&i===o&&t)c=n.text.slice(0,i)+t+n.text.slice(i);else{const e=s.parentElement,a=r.parentElement,l=e&&T.getEntityByDOM(e),h=a&&T.getEntityByDOM(a);let u=0,d=n.text.length;l&&l===n?(u=i,d=s===r?o:d):h&&h===n&&(d=o),c=n.text.slice(0,u)+t+n.text.slice(d)}n.apply(new lt(c))}}}class ut extends p{constructor(t){super(),this.type=g.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:n,customStyle:s,customClass:r,customAttribute:i}=t,o=new ut(e);return o.child=n?ut.from(n)[1]:void 0,o.customAttribute=i?S.from(i)[1]:void 0,o.customClass=r?C.from(r)[1]:void 0,o.customStyle=s?B.from(s)[1]:void 0,[g.INLINE_HTML,o]}clone(){var t,e,n,s;const r=new ut(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 dt extends X{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 pt extends X{handleAction(t,e){const n=e.parent.getAnnotationByType(u.LINK_GROUP);if(n){const t=e.annotationMap.get(g.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(g.LINK)}}class ft extends b{constructor(t){super(),this.type=g.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[g.PLAIN_TEXT,new ft(t)]}clone(){return new ft(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return{plainText:this.plainText}}}class RTETextNode extends RTENode{constructor(t,e,n,s){super(t,s),this.type=m.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 RTETextNode(t.id,t.text,e),{annotations:r}=t;return r&&(s.annotationMap=this.generateTextAnnotationMap(r,n,e,s)),s}static generateTextAnnotationMap(t,e,n,s){return new Map(Object.keys(t).map((r=>("link"===r&&t.link&&n&&s&&n.apply(new U(t.link.groupKey,[s],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(o))}static createAnnotationEntity(t,e,n){const s=!(!n||!n.autoMatchFormat);switch(t){case"bold":return M.from(e);case"italic":return $.from(e);case"underline":return D.from(e);case"strikethrough":return I.from(e);case"code":return j.from(e,s);case"textColor":return K.from(e);case"link":return J.from(e,s);case"inlineHtml":return ut.from(e);case"plainText":return ft.from(e)}return RTENode.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof b||t instanceof O||t instanceof ut)).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(g.INLINE_HTML);return t?this.renderWithWrapperStr(t):this.renderTextStr()}cloneWithText(t){return new RTETextNode(c(),t,this.parent,super.cloneAnnotations())}clone(){return new RTETextNode(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=this.getElementRef();if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}registerModifyStrategy(){const t=this.constructor.name;RTETextNode.registerActionStrategyStatus[t]||(this.isContentEditable()&&(R.register(E.UPDATE_TEXT,t,new at),R.register(E.REPLACE_SELECTED_TEXT,t,new ht),R.register(E.LINK_GROUP_NODE_SPLIT,t,new dt),R.register(st.name,t,new ot)),R.register(_.name,t,new q),R.register(E.DELETE_LINK_GROUP,t,new pt),R.register(v.name,t,new ot),RTETextNode.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(u.SELECTION_RANGE);if(t instanceof _&&t.doSplit&&e){const e=R.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){R.executeTheStrategy(t,this)}applyActionToNode(t,e){const n=e.toAnnotation();if(e instanceof G)return void this.syncUpSelectedNodes(t);n instanceof L||this.syncUpSelectedNodes(t);const s=R.get(e.constructor.name,t.constructor.name);if(s)return void s.execute(e,t);const r=R.get(v.name,RTETextNode.name);r&&r.execute(e,t)}syncUpSelectedNodes(n){const r=this.getElementRef();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,c=[...(null==n?void 0:n.toString())||[],null==s?void 0:s.toString(),null==r?void 0:r.toString()].filter(o),a=c.length>0?` ${c.join(" ")}`:"";return i?`<${e}${a}>${this.renderWithWrapperStr(i)}</${e}>`:`<${e}${a}>${this.renderTextStr()}</${e}>`}renderTextStr(){var t;const e=(null===(t=this.getAnnotationByType(g.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(g.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof b&&!(t instanceof J)&&!(t instanceof ft)||t instanceof O)).length}}RTETextNode.registerActionStrategyStatus={},RTETextNode.htmlTag="span";class Tt extends w{constructor(t){super(),this.type=E.APPEND_CHILDREN,this.entityToBeAppended=t}}class Et extends f{constructor(t){super(),this.type=d.TEXT_STYLE,this.textStyle=t}static from(t){return[d.TEXT_STYLE,new Et(t)]}toJSON(){return{textStyle:this.textStyle}}clone(){return new Et(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 xt extends v{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new Et(this.textStyle)}}class gt extends w{constructor(t,...e){super(),this.type=E.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class mt extends w{constructor(t){super(),this.type=E.REPLACE_CHILD_NODES,this.newChildNodes=t}}class wt extends X{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 mt(e));const c=n.cloneWithNodes(o);return n.parent.apply(new gt(n,c)),c}}}}class At extends X{handleAction(t,e){e.children=[],e.apply(new Tt(t.newChildNodes))}}class Nt extends w{constructor(t){super(),this.type=E.DELETE_CHILDREN,this.entityToBeRemoved=t}}class yt extends X{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 Tt(t)),n.parent.apply(new Nt(n))}}}class Rt extends X{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,n){if(t){const s=new RTETextNode(c(),"\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),c=n.children.slice(o+1);r&&e.push(t.cloneWithText(r)),i&&c.unshift(t.cloneWithText(i)),this.mergeLineBreakNodes(e,s,c,n)}return s}}mergeLineBreakNodes(t,e,n,s){(0===n.length||n[0]&&""===n[0].text)&&n.push(new RTETextNode(c(),"\n",s,t[t.length-1]&&t[t.length-1].annotationMap)),s.apply(new mt([...t,e,...n]))}}class Ot extends X{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const n=e.children,s=new RTETextNode(c(),"\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 Nt(t)))})),e}mergeLineBreakNodes(t,e,n,s){(0===n.length||n[0]&&""===n[0].text)&&n.push(new RTETextNode(c(),"\n",s,t[t.length-1]&&t[t.length-1].annotationMap)),s.apply(new mt([...t,e,...n]))}}class St extends w{constructor(t,...e){super(),this.type=E.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class Ct extends w{constructor(t,e){super(),this.type=E.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class Bt extends v{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new N(this.textAlign)}}class kt extends X{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class bt extends v{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new y(this.indent)}}class RTETextBlock extends RTEBlock{constructor(t,e,n){super(t),this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&(this.annotationMap=RTETextBlock.isAcceptableTextStyle(e)?new Map([Et.from(e)]):new Map([Et.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var n,s;const r=new RTETextBlock(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=z.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?Et.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 st&&t.needMergeNode){const t=null==s?void 0:s.getAnnotationByType(g.LINK),r=n.getAnnotationByType(g.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(){const t=this.getBlockTag(),e=super.generateAttributeString(),n=this.getAnnotationByType(u.LINK_GROUP);let s=this.children.map((t=>t.toHtml())).join("");return n&&this.children.length>0&&(s=this.generateLinkHtml(n,s)),super.shouldRenderAsInternalWrapper()?s:[`<${t}${e}>`,s,`</${t}>`].join("")}cloneWithNodes(t){const e=new RTETextBlock(c(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Tt(t)),e}clone(){const t=new RTETextBlock(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=R.get(t.constructor.name,RTETextBlock.name);e&&e.execute(t,this)}generateLinkHtml(t,e){e="";let n=[];for(let s=0;s<this.children.length;s++){const r=this.children[s].getAnnotationByType(g.LINK),i=this.children[s+1]?this.children[s+1].getAnnotationByType(g.LINK):null;if(r){if(n.push(this.children[s]),!i||r.link.groupKey!==i.link.groupKey){const s=t.toString(r,{standalone:!0});e+=[`<a${s?` ${s}`:""}>`,n.map((t=>t.toHtml())).join(""),"</a>"].join(""),n=[]}}else e+=this.children[s].toHtml()}return e}}R.register(xt.name,RTETextBlock.name,new class extends X{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new Y(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new et(g.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}),R.register(Bt.name,RTETextBlock.name,new kt),R.register(bt.name,RTETextBlock.name,new class extends X{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),R.register(U.name,RTETextBlock.name,new class extends X{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)}}}),R.register(E.UNLINK_LINK_GROUP,RTETextBlock.name,new class extends X{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))}}),R.register(E.SPLIT_BLOCK_WITH_NODE,RTETextBlock.name,new wt),R.register(E.REPLACE_CHILD_NODES,RTETextBlock.name,new At),R.register(E.MERGE_TWO_BLOCKS_NODES,RTETextBlock.name,new yt),R.register(E.LINE_BREAK_SINGLE_BLOCK,RTETextBlock.name,new Rt),R.register(E.LINE_BREAK_MULTIPLE_BLOCKS,RTETextBlock.name,new Ot),R.register(E.INSERT_IMAGE_TO_BLOCK,RTETextBlock.name,new class extends X{handleAction(t,e){const n=t.splitPointNode,s=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,n,s))e.parent.apply(new gt(e,r));else if(this.isCaretPositionAtBlockStart(e,n,s))e.parent.apply(new St(e,r));else{const t=new Ct(n,s);e.apply(t),e.parent.apply(new gt(e,r))}}}),R.register(E.TRANSFORM_LIST_BLOCK,RTETextBlock.name,new class extends X{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 Tt(i)),n.apply(new gt(t.selectedBlocks[0],s)),r.forEach((t=>{t.parent.apply(new Nt(t))}))}});class vt extends X{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 _t extends w{constructor(t,e){super(),this.isFlushable=!0,this.type=E.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class Lt extends v{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new L(this.range)}}class RTEDecoratorNode extends RTENode{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(RTEDecoratorNode.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${RTEDecoratorNode.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=this.getElementRef();if(t)return h(t,`.${RTEDecoratorNode.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}RTEDecoratorNode.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",RTEDecoratorNode.DECORATOR_NODE_CLASS="v-internal-decorator-node";class RTECodeBlockNode extends RTEDecoratorNode{constructor(t,e,n,s){super(t),this.type=m.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 RTECodeBlockNode(this.id,this.text,this.language,this.parent)}doAnnotationActionApply(t){R.executeTheStrategy(t,this)}doModifyActionApply(t){R.executeTheStrategy(t,this)}}R.register(E.UPDATE_CODE_BLOCK,RTECodeBlockNode.name,new class extends X{handleAction(t,e){const{content:n,language:s}=t;e.language=s,e.text=n}}),R.register(Lt.name,RTECodeBlockNode.name,new class extends X{handleAction(t,e){e.annotationMap.set(u.SELECTION_RANGE,t.toAnnotation())}});var It;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(It||(It={}));class Dt extends X{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 Nt(e)))}}class RTECodeBlock extends RTEBlock{constructor(t,e,n){super(t),this.type="code-block",this.children=[new RTECodeBlockNode(`${t}-1`,e,n,this)]}static from(t){return new RTECodeBlock(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=It["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=RTECodeBlock.from(this.toJSON());return t.parent=this.parent,t}apply(s){if(s instanceof w&&R.executeTheStrategy(s,this),s.isFlushable){const s=T.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)}}R.register(E.DELETE_CODE_BLOCK,RTECodeBlock.name,new class extends vt{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 Nt(e));const i=t?T.getDOMByEntity(t):null;if(0===s.children.length){const n=RTETextBlock.from({id:c(),type:"paragraph",nodes:[{id:c(),type:"text",text:""}]});e.parent.apply(new Tt([n])),t=n.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(n,r,i,o){const c=T.getDOMByEntity(o);if(c){const o=e.getSubjectFromParentNodeByEventId(c,s);o&&t.notify(o,{node:n,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),R.register(E.DELETE_CHILDREN,RTECodeBlock.name,new Dt),R.register(E.SWITCH_OUT_FROM_CODE_BLOCK,RTECodeBlock.name,new class extends X{handleAction(n,r){const{content:i,language:o}=n,a=i.split("\n"),l=new _t(a.slice(0,a.length-2).join("\n"),o);l.isFlushable=!1,r.children[0].apply(l);const h=RTETextBlock.from({id:c(),type:"paragraph",nodes:[{id:c(),text:"",type:"text"}]});r.parent.apply(new gt(r,h));const u=T.getDOMByEntity(r);if(u){const n=e.getSubjectFromParentNodeByEventId(u,s);n&&t.notify(n,{node:h.children[0]})}}}),R.register(E.INSERT_IMAGE_TO_BLOCK,RTECodeBlock.name,new class extends X{handleAction(t,e){e.parent.apply(new gt(e,t.imageBlockToBeInserted))}}),RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{nt as $,R as A,Rt as B,B as C,Ct as D,kt as E,vt as F,Dt as G,Bt as H,gt as I,RTENode as J,It as K,st as L,w as M,b as N,u as O,x as P,_t as Q,z as R,G as S,Lt as T,lt as U,W as V,_ as W,K as X,RTECodeBlockNode as Y,H as Z,Y as _,RTETextNode as a,it as a0,xt as a1,Et as a2,M as a3,Z as a4,tt as a5,rt as a6,bt as a7,E as b,X as c,RTETextBlock as d,Tt as e,Ot as f,wt as g,At as h,yt as i,Nt as j,St as k,f as l,d as m,RTEBlock as n,C as o,S as p,RTECodeBlock as q,F as r,T as s,P as t,g as u,RTEDecoratorNode as v,m as w,O as x,v as y,mt as z}
|
|
1
|
+
import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-3c21b875.js";import{b as n,c as s}from"./p-308aa2e3.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-4c192985.js";import{c as l}from"./p-bf19682d.js";import{f as h}from"./p-d9671d27.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 T=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 E,x,g,m;!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",t.INSERT_NODE_TO_NEAREST_ROOT="INSERT_NODE_TO_NEAREST_ROOT"}(E||(E={}));class w{constructor(){this.isFlushable=!1}}class A extends p{constructor(t){super(),this.type=u.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}clone(){const t=new A("");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);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){const{href:e,customAttribute:n={}}=t.link,s=t.useInternalStyle,r=n.target||(s?"_blank":"");return Object.assign(Object.assign(Object.assign({},n),e||s?{href:e}:{}),r?{target:r}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${r(t)}: ${e};`)).join(" ")}}class N extends f{constructor(t){super(),this.type=d.ALIGNMENT,this.textAlign=t}static from(t){return[d.ALIGNMENT,new N(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 N(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 y extends f{constructor(t){super(),this.type=d.INDENT,this.indent=Math.max(0,t)}static from(t){return[d.INDENT,new y(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new y(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class R{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 w?t.type:t.constructor.name,s=R.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}`)}static canHandle(t,e){return!!R.get(t,e.constructor.name)}}R.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(x||(x={}));class O extends p{}class S extends O{constructor(t){super(),this.type=x.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[x.CUSTOM_ATTRIBUTE,new S(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new S(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 C extends O{constructor(t){super(),this.type=x.CUSTOM_CLASS,this.customClass=t}static from(t){return[x.CUSTOM_CLASS,new C(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new C(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class B extends O{constructor(t){super(),this.type=x.CUSTOM_STYLE,this.customStyle=t}static from(t){return[x.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 k extends f{constructor(t){super(),this.type=d.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[d.INTERNAL_WRAPPER,new k(t)]}clone(){return new k(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class RTEBlock{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 N.from(e);case"indent":return y.from(e);case"customAttribute":return S.from(e);case"customClass":return C.from(e);case"customStyle":return B.from(e);case"internalWrapper":return k.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 A||t instanceof k))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof f||t instanceof O)).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=T.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 C)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(x.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(x.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 w?R.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();e instanceof A||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"}(g||(g={}));class v extends p{}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(m||(m={}));class RTENode{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 S.from(e);case"customClass":return C.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 v||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 v||t instanceof C)).map((e=>e.renderClass(t))).filter(o).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(x.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return T.getDOMByEntity(this)}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(x.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 w?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const s=T.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 L extends p{constructor(t){super(),this.type=u.SELECTION_RANGE,this.range=t}clone(){return new L(this.range)}}class I extends v{constructor(t){super(),this.type=g.STRIKETHROUGH,this.strikethrough=t}static from(t){return[g.STRIKETHROUGH,new I(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new I(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 D extends v{constructor(t){super(),this.type=g.UNDERLINE,this.underline=t}static from(t){return[g.UNDERLINE,new D(t)]}toJSON(){return{underline:this.underline}}clone(){return new D(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 $ extends v{constructor(t){super(),this.type=g.ITALIC,this.italic=t}static from(t){return[g.ITALIC,new $(t)]}toJSON(){return{italic:this.italic}}clone(){return new $(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 M extends v{constructor(t){super(),this.type=g.BOLD,this.bold=t}static from(t){return[g.BOLD,new M(t)]}toJSON(){return{bold:this.bold}}clone(){return new M(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 j extends v{constructor(t,e=!0){super(),this.type=g.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[g.CODE,new j(t,e)]}toJSON(){return{code:this.code}}clone(){return new j(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 P={key:"black",light:"#111128",dark:"#E3E3E8"},F=[P,{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"}],H="",W=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]];class K extends v{constructor(t){super(),this.type=g.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[g.TEXT_COLOR,new K(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new K(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:c.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return F.find((e=>e.key===t))||F[0]}}class J extends v{constructor(t,e=!0){super(),this.type=g.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[g.LINK,new J(t,e)]}toJSON(){return{link:this.link}}clone(){return new J(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class U extends b{constructor(t,e,n){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=n}toAnnotation(){return new A(this.groupKey)}}class G extends b{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}const z=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 RTEBlock)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof RTENode))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 X{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(x.CUSTOM_STYLE);n&&this.isCustomStyle(n,e)&&t.annotationMap.set(n.type,new B(n.removeStyles(e)))}createNewParagraph(t){const e=z.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 V extends w{constructor(t){super(),this.type=E.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class q extends X{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)&&e.isContentEditable()){const s=this.splitTextNode(n.range,e);return t.annotationMap.has("LINK")&&t.apply(new V(s)),s}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const n=e.cloneWithText("");this.setApplyTargetNode(n);const s=e.parent.children.findIndex((t=>t===e));return 0===t||!e.isContentEditable()&&t===s?[n,e]:t===e.text.length||!e.isContentEditable()&&t===s+1?[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&&T.getEntityByDOM(i),l=o&&T.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 Y extends _{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new M(this.bold)}}class Q extends p{constructor(){super(...arguments),this.type=u.CLEAR_FORMATTING,this.items=[g.BOLD,g.ITALIC,g.UNDERLINE,g.STRIKETHROUGH,g.TEXT_COLOR,g.CODE,x.CUSTOM_STYLE]}}class Z extends _{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Q}}class tt extends _{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new j(this.code)}}class et extends b{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class nt extends _{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new $(this.italic)}}class st 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 J(this.link)}}class rt extends _{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new I(this.strikethrough)}}class it extends _{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new D(this.underline)}}class ot extends X{handleAction(t,e){const n=t.toAnnotation();if(t instanceof et)e.annotationMap.delete(t.annotationType);else{if(!(n instanceof Q))return n instanceof v||n instanceof L?(t instanceof st&&(o(t.newText)&&(e.text=t.newText),e.parent.apply(new U(t.link.groupKey,[e],t.type))),t instanceof tt&&this.handleAction(new Z,e),t instanceof Y&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof nt&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof it||t instanceof rt)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(n.type,n)):void 0;n.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class at extends w{constructor(){super(...arguments),this.type=E.DELETE_LINK_GROUP}}class ct extends X{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new at)}}class lt extends w{constructor(t){super(),this.type=E.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class ht extends X{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&&T.getEntityByDOM(e),h=c&&T.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 lt(a))}}}class ut extends p{constructor(t){super(),this.type=g.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:n,customStyle:s,customClass:r,customAttribute:i}=t,o=new ut(e);return o.child=n?ut.from(n)[1]:void 0,o.customAttribute=i?S.from(i)[1]:void 0,o.customClass=r?C.from(r)[1]:void 0,o.customStyle=s?B.from(s)[1]:void 0,[g.INLINE_HTML,o]}clone(){var t,e,n,s;const r=new ut(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 dt extends X{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 pt extends X{handleAction(t,e){const n=e.parent.getAnnotationByType(u.LINK_GROUP);if(n){const t=e.annotationMap.get(g.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(g.LINK)}}class ft extends v{constructor(t){super(),this.type=g.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[g.PLAIN_TEXT,new ft(t)]}clone(){return new ft(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return{plainText:this.plainText}}}class RTETextNode extends RTENode{constructor(t,e,n,s){super(t,s),this.type=m.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 RTETextNode(t.id,t.text,e),{annotations:r}=t;return r&&(s.annotationMap=this.generateTextAnnotationMap(r,n,e,s)),s}static generateTextAnnotationMap(t,e,n,s){return new Map(Object.keys(t).map((r=>("link"===r&&t.link&&n&&s&&n.apply(new U(t.link.groupKey,[s],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(o))}static createAnnotationEntity(t,e,n){const s=!(!n||!n.autoMatchFormat);switch(t){case"bold":return M.from(e);case"italic":return $.from(e);case"underline":return D.from(e);case"strikethrough":return I.from(e);case"code":return j.from(e,s);case"textColor":return K.from(e);case"link":return J.from(e,s);case"inlineHtml":return ut.from(e);case"plainText":return ft.from(e)}return RTENode.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof v||t instanceof O||t instanceof ut)).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(g.INLINE_HTML);return t?this.renderWithWrapperStr(t):this.renderTextStr()}cloneWithText(t){return new RTETextNode(a(),t,this.parent,super.cloneAnnotations())}clone(){return new RTETextNode(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=this.getElementRef();if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}registerModifyStrategy(){const t=this.constructor.name;RTETextNode.registerActionStrategyStatus[t]||(this.isContentEditable()&&(R.register(E.UPDATE_TEXT,t,new ct),R.register(E.REPLACE_SELECTED_TEXT,t,new ht),R.register(E.LINK_GROUP_NODE_SPLIT,t,new dt),R.register(st.name,t,new ot)),R.register(_.name,t,new q),R.register(E.DELETE_LINK_GROUP,t,new pt),R.register(b.name,t,new ot),RTETextNode.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(u.SELECTION_RANGE);if(t instanceof _&&t.doSplit&&e){const e=R.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){R.executeTheStrategy(t,this)}applyActionToNode(t,e){const n=e.toAnnotation();if(e instanceof G)return void this.syncUpSelectedNodes(t);n instanceof L||this.syncUpSelectedNodes(t);const s=R.get(e.constructor.name,t.constructor.name);if(s)return void s.execute(e,t);const r=R.get(b.name,RTETextNode.name);r&&r.execute(e,t)}syncUpSelectedNodes(n){const r=this.getElementRef();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(g.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(g.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof v&&!(t instanceof J)&&!(t instanceof ft)||t instanceof O)).length}}RTETextNode.registerActionStrategyStatus={},RTETextNode.htmlTag="span";class Tt extends w{constructor(t){super(),this.type=E.APPEND_CHILDREN,this.entityToBeAppended=t}}class Et extends f{constructor(t){super(),this.type=d.TEXT_STYLE,this.textStyle=t}static from(t){return[d.TEXT_STYLE,new Et(t)]}toJSON(){return{textStyle:this.textStyle}}clone(){return new Et(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 xt extends b{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new Et(this.textStyle)}}class gt extends w{constructor(t,...e){super(),this.type=E.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class mt extends w{constructor(t){super(),this.type=E.REPLACE_CHILD_NODES,this.newChildNodes=t}}class wt extends X{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 mt(e));const a=n.cloneWithNodes(o);return n.parent.apply(new gt(n,a)),a}}}}class At extends X{handleAction(t,e){e.children=[],e.apply(new Tt(t.newChildNodes))}}class Nt extends w{constructor(t){super(),this.type=E.DELETE_CHILDREN,this.entityToBeRemoved=t}}class yt extends X{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 Tt(t)),n.parent.apply(new Nt(n))}}}class Rt extends X{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,n){if(t){const s=new RTETextNode(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 RTETextNode(a(),"\n",s,t[t.length-1]&&t[t.length-1].annotationMap)),s.apply(new mt([...t,e,...n]))}}class Ot extends X{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const n=e.children,s=new RTETextNode(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 Nt(t)))})),e}mergeLineBreakNodes(t,e,n,s){(0===n.length||n[0]&&""===n[0].text)&&n.push(new RTETextNode(a(),"\n",s,t[t.length-1]&&t[t.length-1].annotationMap)),s.apply(new mt([...t,e,...n]))}}class St extends w{constructor(t,...e){super(),this.type=E.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class Ct extends w{constructor(t,e){super(),this.type=E.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class Bt extends b{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new N(this.textAlign)}}class kt extends X{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class vt extends b{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new y(this.indent)}}class RTETextBlock extends RTEBlock{constructor(t,e,n){super(t),this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&(this.annotationMap=RTETextBlock.isAcceptableTextStyle(e)?new Map([Et.from(e)]):new Map([Et.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var n,s;const r=new RTETextBlock(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=z.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?Et.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 st&&t.needMergeNode){const t=null==s?void 0:s.getAnnotationByType(g.LINK),r=n.getAnnotationByType(g.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(){const t=this.getBlockTag(),e=super.generateAttributeString(),n=this.getAnnotationByType(u.LINK_GROUP);let s=this.children.map((t=>t.toHtml())).join("");return n&&this.children.length>0&&(s=this.generateLinkHtml(n,s)),super.shouldRenderAsInternalWrapper()?s:[`<${t}${e}>`,s,`</${t}>`].join("")}cloneWithNodes(t){const e=new RTETextBlock(a(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Tt(t)),e}clone(){const t=new RTETextBlock(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=R.get(t.constructor.name,RTETextBlock.name);e&&e.execute(t,this)}generateLinkHtml(t,e){e="";let n=[];for(let s=0;s<this.children.length;s++){const r=this.children[s].getAnnotationByType(g.LINK),i=this.children[s+1]?this.children[s+1].getAnnotationByType(g.LINK):null;if(r){if(n.push(this.children[s]),!i||r.link.groupKey!==i.link.groupKey){const s=t.toString(r,{standalone:!0});e+=[`<a${s?` ${s}`:""}>`,n.map((t=>t.toHtml())).join(""),"</a>"].join(""),n=[]}}else e+=this.children[s].toHtml()}return e}}R.register(xt.name,RTETextBlock.name,new class extends X{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new Y(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new et(g.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}),R.register(Bt.name,RTETextBlock.name,new kt),R.register(vt.name,RTETextBlock.name,new class extends X{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),R.register(U.name,RTETextBlock.name,new class extends X{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)}}}),R.register(E.UNLINK_LINK_GROUP,RTETextBlock.name,new class extends X{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))}}),R.register(E.SPLIT_BLOCK_WITH_NODE,RTETextBlock.name,new wt),R.register(E.REPLACE_CHILD_NODES,RTETextBlock.name,new At),R.register(E.MERGE_TWO_BLOCKS_NODES,RTETextBlock.name,new yt),R.register(E.LINE_BREAK_SINGLE_BLOCK,RTETextBlock.name,new Rt),R.register(E.LINE_BREAK_MULTIPLE_BLOCKS,RTETextBlock.name,new Ot),R.register(E.INSERT_IMAGE_TO_BLOCK,RTETextBlock.name,new class extends X{handleAction(t,e){const n=t.splitPointNode,s=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,n,s))e.parent.apply(new gt(e,r));else if(this.isCaretPositionAtBlockStart(e,n,s))e.parent.apply(new St(e,r));else{const t=new Ct(n,s);e.apply(t),e.parent.apply(new gt(e,r))}}}),R.register(E.TRANSFORM_LIST_BLOCK,RTETextBlock.name,new class extends X{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 Tt(i)),n.apply(new gt(t.selectedBlocks[0],s)),r.forEach((t=>{t.parent.apply(new Nt(t))}))}});class bt extends X{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 _t extends w{constructor(t,e){super(),this.isFlushable=!0,this.type=E.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class Lt extends b{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new L(this.range)}}class RTEDecoratorNode extends RTENode{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(RTEDecoratorNode.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${RTEDecoratorNode.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=this.getElementRef();if(t)return h(t,`.${RTEDecoratorNode.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}RTEDecoratorNode.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",RTEDecoratorNode.DECORATOR_NODE_CLASS="v-internal-decorator-node";class RTECodeBlockNode extends RTEDecoratorNode{constructor(t,e,n,s){super(t),this.type=m.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 RTECodeBlockNode(this.id,this.text,this.language,this.parent)}doAnnotationActionApply(t){R.executeTheStrategy(t,this)}doModifyActionApply(t){R.executeTheStrategy(t,this)}}R.register(E.UPDATE_CODE_BLOCK,RTECodeBlockNode.name,new class extends X{handleAction(t,e){const{content:n,language:s}=t;e.language=s,e.text=n}}),R.register(Lt.name,RTECodeBlockNode.name,new class extends X{handleAction(t,e){e.annotationMap.set(u.SELECTION_RANGE,t.toAnnotation())}});var It;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(It||(It={}));class Dt extends X{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 Nt(e)))}}class RTECodeBlock extends RTEBlock{constructor(t,e,n){super(t),this.type="code-block",this.children=[new RTECodeBlockNode(`${t}-1`,e,n,this)]}static from(t){return new RTECodeBlock(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=It["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=RTECodeBlock.from(this.toJSON());return t.parent=this.parent,t}apply(s){if(s instanceof w&&R.executeTheStrategy(s,this),s.isFlushable){const s=T.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)}}R.register(E.DELETE_CODE_BLOCK,RTECodeBlock.name,new class extends bt{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 Nt(e));const i=t?T.getDOMByEntity(t):null;if(0===s.children.length){const n=RTETextBlock.from({id:a(),type:"paragraph",nodes:[{id:a(),type:"text",text:""}]});e.parent.apply(new Tt([n])),t=n.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(n,r,i,o){const a=T.getDOMByEntity(o);if(a){const o=e.getSubjectFromParentNodeByEventId(a,s);o&&t.notify(o,{node:n,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),R.register(E.DELETE_CHILDREN,RTECodeBlock.name,new Dt),R.register(E.SWITCH_OUT_FROM_CODE_BLOCK,RTECodeBlock.name,new class extends X{handleAction(n,r){const{content:i,language:o}=n,c=i.split("\n"),l=new _t(c.slice(0,c.length-2).join("\n"),o);l.isFlushable=!1,r.children[0].apply(l);const h=RTETextBlock.from({id:a(),type:"paragraph",nodes:[{id:a(),text:"",type:"text"}]});r.parent.apply(new gt(r,h));const u=T.getDOMByEntity(r);if(u){const n=e.getSubjectFromParentNodeByEventId(u,s);n&&t.notify(n,{node:h.children[0]})}}}),R.register(E.INSERT_IMAGE_TO_BLOCK,RTECodeBlock.name,new class extends X{handleAction(t,e){e.parent.apply(new gt(e,t.imageBlockToBeInserted))}}),RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{nt as $,R as A,Rt as B,B as C,Ct as D,kt as E,bt as F,Dt as G,Bt as H,gt as I,RTENode as J,It as K,st as L,w as M,v as N,u as O,x as P,_t as Q,z as R,G as S,Lt as T,lt as U,W as V,_ as W,K as X,RTECodeBlockNode as Y,H as Z,Y as _,RTETextNode as a,it as a0,xt as a1,Et as a2,M as a3,Z as a4,tt as a5,rt as a6,vt as a7,E as b,X as c,RTETextBlock as d,Tt as e,Ot as f,wt as g,At as h,yt as i,Nt as j,St as k,f as l,d as m,RTEBlock as n,C as o,S as p,RTECodeBlock as q,F as r,T as s,P as t,g as u,RTEDecoratorNode as v,m as w,O as x,b as y,mt as z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as i,g as r}from"./p-6b2342e0.js";import{g as o,I as s}from"./p-16493e5b.js";import{h as a}from"./p-b1faebe0.js";import{s as v}from"./p-519a7d55.js";import{i as n}from"./p-06b624e6.js";import{a as h}from"./p-575235c8.js";import{V as c}from"./p-8c9ea6f4.js";import{L as p,I as l}from"./p-6e1ab235.js";import{V as x,I as d}from"./p-d849e0f5.js";import{t as m}from"./p-b75ee3ba.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-37fd7a80.js";import"./p-7d9cd9c8.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-3af81271.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-8938b5c4.js";import"./p-5773a9a3.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-54ae02db.js";import"./p-f1436035.js";import"./p-2ee4def0.js";import"./p-06e6be0e.js";import"./p-6163818f.js";import"./p-96bda7ca.js";import"./p-02841589.js";import"./p-bf19682d.js";import"./p-a7b5f497.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-d3bf55e9.js";import"./p-824a06ba.js";var g=function(t,e,i,r){var o,s=arguments.length,a=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var v=t.length-1;v>=0;v--)(o=t[v])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const b=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new x,this.size="size-16",this.cloneFAIconStyles=()=>{if(this.isThirdPartyIcon(this.icon)){const t=this.getIconStyleHTML();t&&this.appendStyles(t);let e=0;const i=window.setInterval((()=>{if(!(e<10))return p.warn("[Vega] Loading Font Awesome timeout.",this.icon),void clearInterval(i);{e++;const t=this.getIconStyleHTML();if(t)return this.appendStyles(t),void clearInterval(i)}}),300)}}}watchIcon(){this.cloneFAIconStyles()}componentWillLoad(){this.cloneFAIconStyles()}render(){const t=s.findIndex((t=>t===this.icon));if(c.hasIcon(this.icon)){const{icon:t,autoSize:e}=c.getIcon(this.icon);return this.renderForVegaIconToken(t,e?null:this.size,e)}return t>-1?this.renderForVegaIconToken(o(this.icon),this.size):this.renderForThirdPartyIcon()}isThirdPartyIcon(t){return!c.hasIcon(t)&&!s.find((e=>e===t))}renderForVegaIconToken(t,r,o=!1){const s=r?this.formatAndValidSize(this.size):null;return v(e(i,{class:h([s,this.color&&n(this.color),o&&"vega-auto-size"]),innerHTML:t},e("slot",null)),this.host)}renderForThirdPartyIcon(){return v(e(i,{class:h([this.color&&n(this.color)]),style:this.formatThirdPartyIconSize(this.size)},e("i",{part:"icon",class:this.icon})),this.host)}formatAndValidSize(t){return`v-w-${t} v-h-${t}`}formatThirdPartyIconSize(t){return{"font-size":`${a[t]}px`}}appendStyles(t){var e;if(t&&m()){const i=null!==(e=this.host.shadowRoot.querySelector("#fa-icon-styles"))&&void 0!==e?e:m().createElement("style");i.id="fa-icon-styles",i.innerHTML=t,this.host.shadowRoot.appendChild(i)}}getIconStyleHTML(){var t;if(b.iconStyleCache.has(this.icon))return b.iconStyleCache.get(this.icon);if(m()){const e=m().createElement("i");e.className=this.icon,e.style.display="none",m().body.appendChild(e);const i=getComputedStyle(e);if(null===(t=i.fontFamily)||void 0===t?void 0:t.includes("Font Awesome")){const t=getComputedStyle(e,"::before"),r=getComputedStyle(e,"::after"),o=`\n\t\t\t\ti {\n\t\t\t\t\tfont-weight: ${i.fontWeight};\n\t\t\t\t\tfont-family: ${i.fontFamily};\n\t\t\t\t\tfont-style: ${i.fontStyle};\n\t\t\t\t\tposition: ${i.position};\n\t\t\t\t\tletter-spacing: ${i.letterSpacing};\n\t\t\t\t}\n\t\t\t\ti::before {\n\t\t\t\t\tcontent: ${t.content};\n\t\t\t\t\tposition: ${t.position};\n\t\t\t\t\topacity: ${t.opacity};\n\t\t\t\t}\n\t\t\t\ti::after {\n\t\t\t\t\tcontent: ${r.content};\n\t\t\t\t\tposition: ${r.position};\n\t\t\t\t\topacity: ${r.opacity};\n\t\t\t\t}\n\t\t\t`.replace(/[\n\t]/gi,"");return b.iconStyleCache.set(this.icon,o),m().body.removeChild(e),o}return m().body.removeChild(e),null}}get host(){return r(this)}static get watchers(){return{icon:["watchIcon"]}}};b.iconStyleCache=new Map,g([d()],b.prototype,"globalSlimmers",void 0),g([l()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b.style=":host(.v-text-primary),.v-text-primary{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host(.v-text-secondary),.v-text-secondary{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}:host(.v-text-inverted-primary),.v-text-inverted-primary{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}:host(.v-text-inverted-secondary),.v-text-inverted-secondary{color:rgba(var(--v-text-inverted-secondary, 188, 186, 213, 1))}:host(.v-text-black),.v-text-black{color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host(.v-text-white),.v-text-white{color:rgba(var(--v-text-white, 252, 252, 252, 1))}:host(.v-text-brand),.v-text-brand{color:rgba(var(--v-text-brand, 51, 57, 61, 1))}:host(.v-text-danger-link),.v-text-danger-link{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}:host(.v-text-danger-link-hover),.v-text-danger-link-hover{color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host(.v-text-danger-link-active),.v-text-danger-link-active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1))}:host(.v-text-danger-link-focus),.v-text-danger-link-focus{color:rgba(var(--v-text-danger-link-focus, 240, 52, 91, 1))}:host(.v-text-danger-link-visited),.v-text-danger-link-visited{color:rgba(var(--v-text-danger-link-visited, 230, 50, 87, 1))}:host(.v-text-disabled),.v-text-disabled{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host(.v-text-error),.v-text-error{color:rgba(var(--v-text-error, 189, 41, 71, 1))}:host(.v-text-input-disabled),.v-text-input-disabled{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host(.v-text-input-placeholder),.v-text-input-placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}:host(.v-text-link),.v-text-link{color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host(.v-text-link-hover),.v-text-link-hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host(.v-text-link-active),.v-text-link-active{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host(.v-text-link-focus),.v-text-link-focus{color:rgba(var(--v-text-link-focus, 4, 112, 236, 1))}:host(.v-text-link-visited),.v-text-link-visited{color:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}:host(.v-text-on-action),.v-text-on-action{color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}:host(.v-text-on-danger),.v-text-on-danger{color:rgba(var(--v-text-on-danger, 252, 252, 252, 1))}:host(.v-text-on-disabled),.v-text-on-disabled{color:rgba(var(--v-text-on-disabled, 252, 252, 252, 1))}:host(.v-text-sidebar-link),.v-text-sidebar-link{color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1))}:host(.v-text-sidebar-link-hover),.v-text-sidebar-link-hover{color:rgba(var(--v-text-sidebar-link-hover, 18, 18, 39, 1))}:host(.v-text-sidebar-link-selected),.v-text-sidebar-link-selected{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1))}:host(.v-text-site-footer-link),.v-text-site-footer-link{color:rgba(var(--v-text-site-footer-link, 171, 198, 216, 1))}:host(.v-text-site-footer-link-hover),.v-text-site-footer-link-hover{color:rgba(var(--v-text-site-footer-link-hover, 199, 217, 229, 1))}:host(.v-text-site-footer-link-active),.v-text-site-footer-link-active{color:rgba(var(--v-text-site-footer-link-active, 143, 179, 203, 1))}:host(.v-text-success),.v-text-success{color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.v-text-inverted-success),.v-text-inverted-success{color:rgba(var(--v-text-inverted-success, 89, 217, 119, 1))}:host(.v-text-accent1-primary),.v-text-accent1-primary{color:rgba(var(--v-text-accent1-primary, 115, 230, 220, 1))}:host(.v-text-accent2-primary),.v-text-accent2-primary{color:rgba(var(--v-text-accent2-primary, 128, 107, 255, 1))}:host(.v-text-accent3-primary),.v-text-accent3-primary{color:rgba(var(--v-text-accent3-primary, 255, 220, 131, 1))}:host(.v-text-accent4-primary),.v-text-accent4-primary{color:rgba(var(--v-text-accent4-primary, 255, 149, 113, 1))}:host(.v-text-accent5-primary),.v-text-accent5-primary{color:rgba(var(--v-text-accent5-primary, 0, 187, 255, 1))}:host(.v-text-accent6-primary),.v-text-accent6-primary{color:rgba(var(--v-text-accent6-primary, 240, 52, 91, 1))}:host(.v-text-accent7-primary),.v-text-accent7-primary{color:rgba(var(--v-text-accent7-primary, 37, 159, 159, 1))}:host(.v-text-accent8-primary),.v-text-accent8-primary{color:rgba(var(--v-text-accent8-primary, 86, 61, 130, 1))}:host(.v-text-accent9-primary),.v-text-accent9-primary{color:rgba(var(--v-text-accent9-primary, 255, 191, 63, 1))}:host(.v-text-accent10-primary),.v-text-accent10-primary{color:rgba(var(--v-text-accent10-primary, 237, 122, 35, 1))}:host(.v-w-0),.v-w-0{width:0px}:host(.v-w-size-0),.v-w-size-0{width:0px}:host(.v-w-size-4),.v-w-size-4{width:4px}:host(.v-w-size-8),.v-w-size-8{width:8px}:host(.v-w-size-12),.v-w-size-12{width:12px}:host(.v-w-size-16),.v-w-size-16{width:16px}:host(.v-w-size-20),.v-w-size-20{width:20px}:host(.v-w-size-24),.v-w-size-24{width:24px}:host(.v-w-size-32),.v-w-size-32{width:32px}:host(.v-w-size-40),.v-w-size-40{width:40px}:host(.v-w-size-48),.v-w-size-48{width:48px}:host(.v-w-size-64),.v-w-size-64{width:64px}:host(.v-w-size-72),.v-w-size-72{width:72px}:host(.v-w-size-80),.v-w-size-80{width:80px}:host(.v-w-size-112),.v-w-size-112{width:112px}:host(.v-w-size-2),.v-w-size-2{width:2px}:host(.v-h-0),.v-h-0{height:0px}:host(.v-h-size-0),.v-h-size-0{height:0px}:host(.v-h-size-4),.v-h-size-4{height:4px}:host(.v-h-size-8),.v-h-size-8{height:8px}:host(.v-h-size-12),.v-h-size-12{height:12px}:host(.v-h-size-16),.v-h-size-16{height:16px}:host(.v-h-size-20),.v-h-size-20{height:20px}:host(.v-h-size-24),.v-h-size-24{height:24px}:host(.v-h-size-32),.v-h-size-32{height:32px}:host(.v-h-size-40),.v-h-size-40{height:40px}:host(.v-h-size-48),.v-h-size-48{height:48px}:host(.v-h-size-64),.v-h-size-64{height:64px}:host(.v-h-size-72),.v-h-size-72{height:72px}:host(.v-h-size-80),.v-h-size-80{height:80px}:host(.v-h-size-112),.v-h-size-112{height:112px}:host(.v-h-size-2),.v-h-size-2{height:2px}:host{display:inline-flex;user-select:none}i{line-height:1}:host(:not(.vega-auto-size)) ::slotted(svg){width:100%;height:100%}";export{b as vega_icon}
|
|
1
|
+
import{r as t,h as e,H as i,g as r}from"./p-6b2342e0.js";import{g as o,I as s}from"./p-16493e5b.js";import{h as a}from"./p-b1faebe0.js";import{s as v}from"./p-519a7d55.js";import{i as n}from"./p-378e5881.js";import{a as h}from"./p-d9671d27.js";import{V as c}from"./p-8c9ea6f4.js";import{L as p,I as l}from"./p-6e1ab235.js";import{V as x,I as d}from"./p-d849e0f5.js";import{t as m}from"./p-b75ee3ba.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-228de113.js";import"./p-7d9cd9c8.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-64c3d021.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-4c192985.js";import"./p-a528714c.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-54ae02db.js";import"./p-24cb0a7e.js";import"./p-3c21b875.js";import"./p-d5d6dae6.js";import"./p-39b4c838.js";import"./p-308aa2e3.js";import"./p-02841589.js";import"./p-bf19682d.js";import"./p-a7b5f497.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-39482a1a.js";import"./p-824a06ba.js";var g=function(t,e,i,r){var o,s=arguments.length,a=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var v=t.length-1;v>=0;v--)(o=t[v])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const b=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new x,this.size="size-16",this.cloneFAIconStyles=()=>{if(this.isThirdPartyIcon(this.icon)){const t=this.getIconStyleHTML();t&&this.appendStyles(t);let e=0;const i=window.setInterval((()=>{if(!(e<10))return p.warn("[Vega] Loading Font Awesome timeout.",this.icon),void clearInterval(i);{e++;const t=this.getIconStyleHTML();if(t)return this.appendStyles(t),void clearInterval(i)}}),300)}}}watchIcon(){this.cloneFAIconStyles()}componentWillLoad(){this.cloneFAIconStyles()}render(){const t=s.findIndex((t=>t===this.icon));if(c.hasIcon(this.icon)){const{icon:t,autoSize:e}=c.getIcon(this.icon);return this.renderForVegaIconToken(t,e?null:this.size,e)}return t>-1?this.renderForVegaIconToken(o(this.icon),this.size):this.renderForThirdPartyIcon()}isThirdPartyIcon(t){return!c.hasIcon(t)&&!s.find((e=>e===t))}renderForVegaIconToken(t,r,o=!1){const s=r?this.formatAndValidSize(this.size):null;return v(e(i,{class:h([s,this.color&&n(this.color),o&&"vega-auto-size"]),innerHTML:t},e("slot",null)),this.host)}renderForThirdPartyIcon(){return v(e(i,{class:h([this.color&&n(this.color)]),style:this.formatThirdPartyIconSize(this.size)},e("i",{part:"icon",class:this.icon})),this.host)}formatAndValidSize(t){return`v-w-${t} v-h-${t}`}formatThirdPartyIconSize(t){return{"font-size":`${a[t]}px`}}appendStyles(t){var e;if(t&&m()){const i=null!==(e=this.host.shadowRoot.querySelector("#fa-icon-styles"))&&void 0!==e?e:m().createElement("style");i.id="fa-icon-styles",i.innerHTML=t,this.host.shadowRoot.appendChild(i)}}getIconStyleHTML(){var t;if(b.iconStyleCache.has(this.icon))return b.iconStyleCache.get(this.icon);if(m()){const e=m().createElement("i");e.className=this.icon,e.style.display="none",m().body.appendChild(e);const i=getComputedStyle(e);if(null===(t=i.fontFamily)||void 0===t?void 0:t.includes("Font Awesome")){const t=getComputedStyle(e,"::before"),r=getComputedStyle(e,"::after"),o=`\n\t\t\t\ti {\n\t\t\t\t\tfont-weight: ${i.fontWeight};\n\t\t\t\t\tfont-family: ${i.fontFamily};\n\t\t\t\t\tfont-style: ${i.fontStyle};\n\t\t\t\t\tposition: ${i.position};\n\t\t\t\t\tletter-spacing: ${i.letterSpacing};\n\t\t\t\t}\n\t\t\t\ti::before {\n\t\t\t\t\tcontent: ${t.content};\n\t\t\t\t\tposition: ${t.position};\n\t\t\t\t\topacity: ${t.opacity};\n\t\t\t\t}\n\t\t\t\ti::after {\n\t\t\t\t\tcontent: ${r.content};\n\t\t\t\t\tposition: ${r.position};\n\t\t\t\t\topacity: ${r.opacity};\n\t\t\t\t}\n\t\t\t`.replace(/[\n\t]/gi,"");return b.iconStyleCache.set(this.icon,o),m().body.removeChild(e),o}return m().body.removeChild(e),null}}get host(){return r(this)}static get watchers(){return{icon:["watchIcon"]}}};b.iconStyleCache=new Map,g([d()],b.prototype,"globalSlimmers",void 0),g([l()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b.style=":host(.v-text-primary),.v-text-primary{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host(.v-text-secondary),.v-text-secondary{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}:host(.v-text-inverted-primary),.v-text-inverted-primary{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}:host(.v-text-inverted-secondary),.v-text-inverted-secondary{color:rgba(var(--v-text-inverted-secondary, 188, 186, 213, 1))}:host(.v-text-black),.v-text-black{color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host(.v-text-white),.v-text-white{color:rgba(var(--v-text-white, 252, 252, 252, 1))}:host(.v-text-brand),.v-text-brand{color:rgba(var(--v-text-brand, 51, 57, 61, 1))}:host(.v-text-danger-link),.v-text-danger-link{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}:host(.v-text-danger-link-hover),.v-text-danger-link-hover{color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host(.v-text-danger-link-active),.v-text-danger-link-active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1))}:host(.v-text-danger-link-focus),.v-text-danger-link-focus{color:rgba(var(--v-text-danger-link-focus, 240, 52, 91, 1))}:host(.v-text-danger-link-visited),.v-text-danger-link-visited{color:rgba(var(--v-text-danger-link-visited, 230, 50, 87, 1))}:host(.v-text-disabled),.v-text-disabled{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host(.v-text-error),.v-text-error{color:rgba(var(--v-text-error, 189, 41, 71, 1))}:host(.v-text-input-disabled),.v-text-input-disabled{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host(.v-text-input-placeholder),.v-text-input-placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}:host(.v-text-link),.v-text-link{color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host(.v-text-link-hover),.v-text-link-hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host(.v-text-link-active),.v-text-link-active{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host(.v-text-link-focus),.v-text-link-focus{color:rgba(var(--v-text-link-focus, 4, 112, 236, 1))}:host(.v-text-link-visited),.v-text-link-visited{color:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}:host(.v-text-on-action),.v-text-on-action{color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}:host(.v-text-on-danger),.v-text-on-danger{color:rgba(var(--v-text-on-danger, 252, 252, 252, 1))}:host(.v-text-on-disabled),.v-text-on-disabled{color:rgba(var(--v-text-on-disabled, 252, 252, 252, 1))}:host(.v-text-sidebar-link),.v-text-sidebar-link{color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1))}:host(.v-text-sidebar-link-hover),.v-text-sidebar-link-hover{color:rgba(var(--v-text-sidebar-link-hover, 18, 18, 39, 1))}:host(.v-text-sidebar-link-selected),.v-text-sidebar-link-selected{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1))}:host(.v-text-site-footer-link),.v-text-site-footer-link{color:rgba(var(--v-text-site-footer-link, 171, 198, 216, 1))}:host(.v-text-site-footer-link-hover),.v-text-site-footer-link-hover{color:rgba(var(--v-text-site-footer-link-hover, 199, 217, 229, 1))}:host(.v-text-site-footer-link-active),.v-text-site-footer-link-active{color:rgba(var(--v-text-site-footer-link-active, 143, 179, 203, 1))}:host(.v-text-success),.v-text-success{color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.v-text-inverted-success),.v-text-inverted-success{color:rgba(var(--v-text-inverted-success, 89, 217, 119, 1))}:host(.v-text-accent1-primary),.v-text-accent1-primary{color:rgba(var(--v-text-accent1-primary, 115, 230, 220, 1))}:host(.v-text-accent2-primary),.v-text-accent2-primary{color:rgba(var(--v-text-accent2-primary, 128, 107, 255, 1))}:host(.v-text-accent3-primary),.v-text-accent3-primary{color:rgba(var(--v-text-accent3-primary, 255, 220, 131, 1))}:host(.v-text-accent4-primary),.v-text-accent4-primary{color:rgba(var(--v-text-accent4-primary, 255, 149, 113, 1))}:host(.v-text-accent5-primary),.v-text-accent5-primary{color:rgba(var(--v-text-accent5-primary, 0, 187, 255, 1))}:host(.v-text-accent6-primary),.v-text-accent6-primary{color:rgba(var(--v-text-accent6-primary, 240, 52, 91, 1))}:host(.v-text-accent7-primary),.v-text-accent7-primary{color:rgba(var(--v-text-accent7-primary, 37, 159, 159, 1))}:host(.v-text-accent8-primary),.v-text-accent8-primary{color:rgba(var(--v-text-accent8-primary, 86, 61, 130, 1))}:host(.v-text-accent9-primary),.v-text-accent9-primary{color:rgba(var(--v-text-accent9-primary, 255, 191, 63, 1))}:host(.v-text-accent10-primary),.v-text-accent10-primary{color:rgba(var(--v-text-accent10-primary, 237, 122, 35, 1))}:host(.v-w-0),.v-w-0{width:0px}:host(.v-w-size-0),.v-w-size-0{width:0px}:host(.v-w-size-4),.v-w-size-4{width:4px}:host(.v-w-size-8),.v-w-size-8{width:8px}:host(.v-w-size-12),.v-w-size-12{width:12px}:host(.v-w-size-16),.v-w-size-16{width:16px}:host(.v-w-size-20),.v-w-size-20{width:20px}:host(.v-w-size-24),.v-w-size-24{width:24px}:host(.v-w-size-32),.v-w-size-32{width:32px}:host(.v-w-size-40),.v-w-size-40{width:40px}:host(.v-w-size-48),.v-w-size-48{width:48px}:host(.v-w-size-64),.v-w-size-64{width:64px}:host(.v-w-size-72),.v-w-size-72{width:72px}:host(.v-w-size-80),.v-w-size-80{width:80px}:host(.v-w-size-112),.v-w-size-112{width:112px}:host(.v-w-size-2),.v-w-size-2{width:2px}:host(.v-h-0),.v-h-0{height:0px}:host(.v-h-size-0),.v-h-size-0{height:0px}:host(.v-h-size-4),.v-h-size-4{height:4px}:host(.v-h-size-8),.v-h-size-8{height:8px}:host(.v-h-size-12),.v-h-size-12{height:12px}:host(.v-h-size-16),.v-h-size-16{height:16px}:host(.v-h-size-20),.v-h-size-20{height:20px}:host(.v-h-size-24),.v-h-size-24{height:24px}:host(.v-h-size-32),.v-h-size-32{height:32px}:host(.v-h-size-40),.v-h-size-40{height:40px}:host(.v-h-size-48),.v-h-size-48{height:48px}:host(.v-h-size-64),.v-h-size-64{height:64px}:host(.v-h-size-72),.v-h-size-72{height:72px}:host(.v-h-size-80),.v-h-size-80{height:80px}:host(.v-h-size-112),.v-h-size-112{height:112px}:host(.v-h-size-2),.v-h-size-2{height:2px}:host{display:inline-flex;user-select:none}i{line-height:1}:host(:not(.vega-auto-size)) ::slotted(svg){width:100%;height:100%}";export{b as vega_icon}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e}from"./p-2d0d575f.js";import{O as a}from"./p-331a62d5.js";import{b as t}from"./p-
|
|
1
|
+
import{C as e}from"./p-2d0d575f.js";import{O as a}from"./p-331a62d5.js";import{b as t}from"./p-d9671d27.js";class n{constructor(e,a){this.vegaName=e,this.nativeName=a}getName(){return this.getVegaName()}getCurrentName(e){return"native"!==e.namespace?this.getVegaName():this.getNativeName()}getVegaName(){return this.vegaName}getNativeName(){return this.nativeName}isBrowserRawEvent(){return ee.includes(this)}}const s=new n("vegaChange","change"),r=new n("vegaClick","click"),o=new n("vegaFocus","focus"),i=new n("vegaBlur","blur"),g=new n("vegaClose","close"),c=new n("vegaOpen","modalOpen"),w=new n("vegaValidate","validate"),v=new n("vegaFormSubmit","formSubmit"),l=new n("vegaFormReset","formReset"),h=new n("vegaRowClick","rowClick"),d=new n("vegaRowExpand","rowExpand"),C=new n("vegaSelectChange","selectChange"),u=new n("vegaRowSelect","rowSelect"),p=new n("vegaRowSelectAll","rowSelectAll"),m=new n("vegaSelectAllChange","selectAllChange"),S=new n("vegaPageSizeChange","pageSizeChange"),k=new n("vegaDropdownClick","dropdownClick"),b=new n("vegaCreate","create"),f=new n("vegaSearch","search"),R=new n("vegaSearchTrigger","searchTrigger"),A=new n("vegaHide","hide"),N=new n("vegaShow","show"),U=new n("vegaPopoverShow","popoverShow"),j=new n("vegaPopoverHide","popoverHide"),B=new n("vegaCancel","cancel"),E=new n("vegaRemove","remove"),F=new n("vegaPageUpdate","pageUpdate"),x=new n("vegaCurrentStepUpdate","currentStepUpdate"),y=new n("vegaToggleStatus","toggleStatus"),D=new n("vegaStateUpdate","stateUpdate"),P=new n("vegaGroupClick","groupClick"),H=new n("vegaMenuClick","menuClick"),M=new n("vegaExpand","expand"),O=new n("vegaShow","dropdownShow"),I=new n("vegaHide","dropdownHide"),T=new n("vegaSearch","dropdownSearch"),$=new n("vegaActionClick","actionClick"),q=new n("vegaEventClick","eventClick"),z=new n("vegaDateDblClick","dateDblClick"),V=new n("vegaDateClick","dateClick"),Y=new n("vegaCountryChange","countryChange"),G=new n("vegaActionButtonClick","actionButtonClick"),L=new n("vegaMoreActionClick","moreActionClick"),J=new n("vegaSelectedFileChange","selectedFileChange"),K=new n("vegaImageInserted","imageInserted"),Q=new n("vegaRetry","retry"),W=new n("vegaPreview","preview"),X=new n("vegaLabelButtonClick","labelButtonClick"),Z=new n("vegaReset","reset"),_=new n("vegaMonthYearChange","monthYearChange"),ee=[s,r,o,i];class ae{constructor(e,a){this.title=e,this.host=a}getDescription(){return`, this is a dom nodes subject of ${this.title}.(class name:${this.host.className}, id:${this.host.id})`}}const te=new class{constructor(){this.cache=new Map}getSubject(e,a){return this.isExist(e,a)?this.cache.get(e).get(a):this.setSubject(e,a)}isExist(e,a){return!!e&&this.cache.has(e)&&void 0!==this.cache.get(e)&&this.cache.get(e).has(a)}getSubjectFromParentNodeByEventId(e,a){let n;for(const s of this.cache)if(t(e,s[0])&&s[1].has(a)){n=s[1].get(a);break}return n}setSubject(e,a){const t=`${e.tagName}:${a.getName()}`,n=new ae(t,e);return this.cache.get(e)||this.cache.set(e,new Map),this.cache.get(e).set(a,n),n}},ne=()=>!0;class se{static addUniqueObserverToNode(t,n,s,r){if(t){const o=new a("function"==typeof r?r.bind(null):ne,s);se.removeUniqueObserverFromNode(t,n),e.register(te.getSubject(t,n),o)}}static removeUniqueObserverFromNode(a,t){te.isExist(a,t)&&e.clearObserversBySubject(te.getSubject(a,t))}}export{w as A,B,o as C,se as D,i as E,Y as F,N as G,A as H,y as I,c as J,D as K,P as L,H as M,$ as N,S as O,U as P,j as Q,x as R,K as S,C as T,m as U,k as V,h as W,d as X,u as Y,p as Z,r as a,M as b,g as c,te as d,G as e,s as f,q as g,z as h,L as i,V as j,F as k,E as l,b as m,f as n,_ as o,O as p,I as q,Z as r,T as s,R as t,X as u,J as v,Q as w,W as x,v as y,l as z}
|