@heartlandone/vega 2.81.0 → 2.83.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.
Files changed (516) hide show
  1. package/dist/cjs/{app-globals-25e1bfac.js → app-globals-40b1b1b2.js} +7 -7
  2. package/dist/cjs/{aria-dialog-focusable-trap-slimmer-ced9566d.js → aria-dialog-focusable-trap-slimmer-5507f917.js} +1 -1
  3. package/dist/cjs/{child-nodes-event-prevent-slimmer-dd0bb8b6.js → child-nodes-event-prevent-slimmer-9b7095a4.js} +1 -1
  4. package/dist/cjs/{code-block-24b3d0e7.js → code-block-b1f8aded.js} +3 -3
  5. package/dist/cjs/{component-value-history-controller-slimmer.abstract-bd662b32.js → component-value-history-controller-slimmer.abstract-99fbd1f2.js} +4 -4
  6. package/dist/cjs/{content-state-0f26036c.js → content-state-648652b4.js} +3 -3
  7. package/dist/cjs/{dark-mode-style-controller-3a04af3d.js → dark-mode-style-controller-bd765afb.js} +2 -322
  8. package/dist/cjs/{date-required-rule-4377217a.js → date-required-rule-6addf5dd.js} +1 -1
  9. package/dist/cjs/{design-token-40276b11.js → design-token-93070bb8.js} +6 -130
  10. package/dist/cjs/drop-file-accept-filter-slimmer-cd619cc7.js +64 -0
  11. package/dist/cjs/{dto-renderer-manager-ae5fcbba.js → dto-renderer-manager-7eb5c5ce.js} +42 -2
  12. package/dist/cjs/{element-appender-slimmer-be1b4d57.js → element-appender-slimmer-52c2b455.js} +87 -11
  13. package/dist/cjs/{event-emit-slimmer-bee6b676.js → event-emit-slimmer-bcb458b2.js} +1 -1
  14. package/dist/cjs/{form-field-controller-slimmer-982dbfe4.js → form-field-controller-slimmer-0f3a028e.js} +3 -3
  15. package/dist/cjs/{image-annotation-action-e0df5a20.js → image-annotation-action-0339e983.js} +3 -3
  16. package/dist/cjs/index-58ea899e.js +4 -0
  17. package/dist/cjs/index.cjs.js +19 -17
  18. package/dist/cjs/{inject-keyboard-manager-12b65e98.js → inject-keyboard-manager-2d9c4f92.js} +1 -1
  19. package/dist/cjs/{internal-translation-controller-9f58a4e4.js → internal-translation-controller-fb1532f4.js} +3 -0
  20. package/dist/cjs/{internal-vega-event-manager-cc0f511c.js → internal-vega-event-manager-fef893bf.js} +1 -0
  21. package/dist/cjs/{keyboard-manager-c89a66d3.js → keyboard-manager-5ed6c472.js} +1 -1
  22. package/dist/cjs/{keyboard-manager-slimmer-93fcbf46.js → keyboard-manager-slimmer-879ff4f3.js} +1 -1
  23. package/dist/cjs/loader.cjs.js +14 -13
  24. package/dist/cjs/{month-view-generator-0d25e950.js → month-view-generator-d262e6ce.js} +1 -1
  25. package/dist/cjs/{public-rules-652ec269.js → public-rules-bce88d4e.js} +10 -9
  26. package/dist/cjs/{range-cdd61881.js → range-5bd6d72b.js} +1 -1
  27. package/dist/cjs/{responsive-format-facade-9cae7f27.js → responsive-format-facade-2cab7344.js} +1 -1
  28. package/dist/cjs/{rich-text-editor-required-rule-4b919054.js → rich-text-editor-required-rule-e8a922be.js} +1 -1
  29. package/dist/cjs/{split-cell-operation-3596f738.js → split-cell-operation-bb388de6.js} +4 -4
  30. package/dist/cjs/state-border-formatter-4e5e4ed0.js +133 -0
  31. package/dist/cjs/{string-format-strategy.abstract-ebdb2573.js → string-format-strategy.abstract-9a35e3b4.js} +1 -1
  32. package/dist/cjs/{string-input-formatter-slimmer-9b6a8399.js → string-input-formatter-slimmer-1018ddec.js} +3 -3
  33. package/dist/cjs/{string-mask-strategy-6cc9f391.js → string-mask-strategy-3aa17744.js} +2 -2
  34. package/dist/cjs/{style-formatter-18289c4d.js → style-formatter-2226c869.js} +2 -2
  35. package/dist/cjs/{sub-state-notify-slimmer-39bfcfe3.js → sub-state-notify-slimmer-b33171b0.js} +1 -1
  36. package/dist/cjs/{sub-state-observer-slimmer-e5b50cbf.js → sub-state-observer-slimmer-b8f6f27b.js} +1 -1
  37. package/dist/cjs/{time-required-rule-3517beff.js → time-required-rule-970dfdca.js} +1 -1
  38. package/dist/cjs/tinycolor-polyfill-502efaa8.js +325 -0
  39. package/dist/cjs/{token-extension-addc97c1.js → token-extension-361273fb.js} +85 -28
  40. package/dist/cjs/{translation-slimmer-c069ca84.js → translation-slimmer-d0c77ad2.js} +1 -1
  41. package/dist/cjs/{type-guard-362d7da3.js → type-guard-3ec852d7.js} +28 -1
  42. package/dist/cjs/{valid-credit-card-number-rule-1d8bf49c.js → valid-credit-card-number-rule-99d1bb34.js} +1 -1
  43. package/dist/cjs/vega-accordion.cjs.entry.js +7 -6
  44. package/dist/cjs/vega-app-footer.cjs.entry.js +2 -1
  45. package/dist/cjs/vega-app-header-button.cjs.entry.js +8 -7
  46. package/dist/cjs/vega-banner.cjs.entry.js +15 -4
  47. package/dist/cjs/vega-box.cjs.entry.js +6 -5
  48. package/dist/cjs/vega-brand-logo.cjs.entry.js +2 -1
  49. package/dist/cjs/vega-breadcrumb.cjs.entry.js +3 -3
  50. package/dist/cjs/vega-button-circle.cjs.entry.js +9 -8
  51. package/dist/cjs/vega-button-group_2.cjs.entry.js +102 -13
  52. package/dist/cjs/vega-button-link.cjs.entry.js +3 -3
  53. package/dist/cjs/vega-button.cjs.entry.js +8 -8
  54. package/dist/cjs/vega-calendar_4.cjs.entry.js +10 -10
  55. package/dist/cjs/vega-card.cjs.entry.js +5 -4
  56. package/dist/cjs/vega-carousel.cjs.entry.js +5 -5
  57. package/dist/cjs/vega-checkbox_2.cjs.entry.js +44 -11
  58. package/dist/cjs/vega-chip.cjs.entry.js +8 -7
  59. package/dist/cjs/vega-code-block.cjs.entry.js +14 -13
  60. package/dist/cjs/vega-color-picker.cjs.entry.js +26 -8
  61. package/dist/cjs/vega-color-swatch.cjs.entry.js +245 -0
  62. package/dist/cjs/vega-combo-box.cjs.entry.js +10 -10
  63. package/dist/cjs/vega-date-picker_2.cjs.entry.js +20 -20
  64. package/dist/cjs/vega-dialog_2.cjs.entry.js +80 -247
  65. package/dist/cjs/vega-divider.cjs.entry.js +5 -4
  66. package/dist/cjs/vega-dropdown_5.cjs.entry.js +33 -15
  67. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  68. package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
  69. package/dist/cjs/vega-file-uploader.cjs.entry.js +40 -90
  70. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -4
  71. package/dist/cjs/vega-flex.cjs.entry.js +6 -5
  72. package/dist/cjs/vega-font.cjs.entry.js +5 -4
  73. package/dist/cjs/vega-form.cjs.entry.js +9 -9
  74. package/dist/cjs/vega-grid.cjs.entry.js +5 -4
  75. package/dist/cjs/vega-icon.cjs.entry.js +5 -4
  76. package/dist/cjs/vega-image-uploader.cjs.entry.js +78 -13
  77. package/dist/cjs/vega-input-credit-card.cjs.entry.js +11 -11
  78. package/dist/cjs/vega-input-numeric.cjs.entry.js +11 -11
  79. package/dist/cjs/vega-input-passcode.cjs.entry.js +10 -10
  80. package/dist/cjs/vega-input-phone-number.cjs.entry.js +9 -9
  81. package/dist/cjs/vega-input-range.cjs.entry.js +8 -8
  82. package/dist/cjs/vega-input-select.cjs.entry.js +50 -15
  83. package/dist/cjs/vega-input.cjs.entry.js +11 -11
  84. package/dist/cjs/{vega-internal-event-id-a1837fa2.js → vega-internal-event-id-87014e4f.js} +2 -0
  85. package/dist/cjs/vega-item-toggle.cjs.entry.js +2 -2
  86. package/dist/cjs/vega-left-nav_5.cjs.entry.js +14 -12
  87. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  88. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +4 -4
  89. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +3 -3
  90. package/dist/cjs/vega-pagination.cjs.entry.js +9 -9
  91. package/dist/cjs/vega-popover_2.cjs.entry.js +12 -11
  92. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +34 -11
  93. package/dist/cjs/vega-radio_2.cjs.entry.js +10 -10
  94. package/dist/cjs/vega-rich-text-content.cjs.entry.js +11 -10
  95. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +75 -29
  96. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +13 -12
  97. package/dist/cjs/vega-segment-control.cjs.entry.js +2 -2
  98. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +10 -10
  99. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +8 -8
  100. package/dist/cjs/vega-sidenav_3.cjs.entry.js +8 -8
  101. package/dist/cjs/vega-signature-capture.cjs.entry.js +11 -10
  102. package/dist/cjs/vega-stepper.cjs.entry.js +9 -9
  103. package/dist/cjs/vega-tab-group_2.cjs.entry.js +3 -3
  104. package/dist/cjs/vega-table_11.cjs.entry.js +434 -287
  105. package/dist/cjs/vega-text.cjs.entry.js +16 -2
  106. package/dist/cjs/vega-textarea.cjs.entry.js +7 -7
  107. package/dist/cjs/vega-time-picker_2.cjs.entry.js +14 -14
  108. package/dist/cjs/vega-toggle-switch.cjs.entry.js +6 -6
  109. package/dist/cjs/vega-tooltip_2.cjs.entry.js +9 -8
  110. package/dist/cjs/vega.cjs.js +14 -13
  111. package/dist/cjs/{wait-for-component-did-render-b6d12d51.js → wait-for-component-did-render-16863a21.js} +1 -1
  112. package/dist/collection/collection-manifest.json +6 -0
  113. package/dist/collection/components/vega-banner/slimmers/renderers/vega-banner-renderer.js +11 -2
  114. package/dist/collection/components/vega-banner/vega-banner.js +3 -1
  115. package/dist/collection/components/vega-button/vega-button.css +4 -0
  116. package/dist/collection/components/vega-button-group/slimmers/controllers/vega-button-group-all-items-disabled-controller.js +64 -0
  117. package/dist/collection/components/vega-button-group/vega-button-group-item/slimmers/controllers/vega-button-group-item-sub-state-controller.js +7 -0
  118. package/dist/collection/components/vega-button-group/vega-button-group-item/slimmers/renderers/vega-button-group-item-renderer.js +6 -2
  119. package/dist/collection/components/vega-button-group/vega-button-group-item/vega-button-group-item.js +4 -2
  120. package/dist/collection/components/vega-button-group/vega-button-group.js +20 -1
  121. package/dist/collection/components/vega-checkbox/vega-checkbox.css +19 -14
  122. package/dist/collection/components/vega-checkbox/vega-checkbox.js +57 -3
  123. package/dist/collection/components/vega-color-picker/vega-color-picker.css +0 -1
  124. package/dist/collection/components/vega-color-picker/vega-color-picker.js +40 -1
  125. package/dist/collection/components/vega-color-swatch/slimmers/renderers/vega-color-swatch-renderer.js +127 -0
  126. package/dist/collection/components/vega-color-swatch/vega-color-swatch.css +155 -0
  127. package/dist/collection/components/vega-color-swatch/vega-color-swatch.js +314 -0
  128. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/controllers/vega-dropdown-item-state-controller.js +7 -0
  129. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +5 -1
  130. package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.js +2 -1
  131. package/dist/collection/components/vega-dropdown/vega-dropdown.js +38 -0
  132. package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +2 -2
  133. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-default-content-renderer.js +45 -1
  134. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-preview-content-renderer.js +16 -1
  135. package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +5 -0
  136. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +17 -4
  137. package/dist/collection/components/vega-input-select/vega-input-select.js +76 -0
  138. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-backdrop-controller.js +9 -3
  139. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +0 -4
  140. package/dist/collection/components/vega-modal/slimmers/controllers/vega-nested-modal-controller.js +17 -2
  141. package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +28 -28
  142. package/dist/collection/components/vega-modal/vega-modal.css +2 -2
  143. package/dist/collection/components/vega-modal/vega-modal.js +0 -5
  144. package/dist/collection/components/vega-pagination/internal/vega-pagination-go-to.js +1 -1
  145. package/dist/collection/components/vega-pagination/vega-pagination-page-selector-mobile/slimmers/renderers/page-selector-mobile-renderer.js +1 -1
  146. package/dist/collection/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-step-controller.js +10 -2
  147. package/dist/collection/components/vega-progress-tracker/slimmers/renderers/vega-progress-tracker-renderer.js +1 -1
  148. package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +39 -0
  149. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +28 -3
  150. package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-extension.js +24 -6
  151. package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.js +23 -8
  152. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +2 -2
  153. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/extension-controller.js +18 -1
  154. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.js +1 -1
  155. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +5 -3
  156. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.js +8 -3
  157. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +47 -0
  158. package/dist/collection/components/vega-stepper/vega-stepper.css +12 -0
  159. package/dist/collection/components/vega-stepper/vega-stepper.js +2 -1
  160. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-render-input-controller.js +25 -2
  161. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.js +28 -1
  162. package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +12 -10
  163. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +14 -12
  164. package/dist/collection/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.js +5 -4
  165. package/dist/collection/components/vega-table/vega-table-head-row/vega-table-head-row.js +8 -1
  166. package/dist/collection/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.js +16 -2
  167. package/dist/collection/components/vega-text/vega-text.js +1 -1
  168. package/dist/collection/components/vega-tooltip/slimmers/controllers/vega-tooltip-element-appender-controller.js +1 -0
  169. package/dist/collection/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.css +1 -0
  170. package/dist/collection/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.js +1 -1
  171. package/dist/collection/components/vega-tooltip/vega-tooltip.js +1 -1
  172. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +1 -0
  173. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
  174. package/dist/collection/helpers/rte-manager/dto-renderer-manager.js +42 -2
  175. package/dist/collection/{components/vega-file-uploader/slimmers/controllers/vega-file-uploader-drop-file-filter-controller.js → helpers/slimmers/drop-file-accept-filter-slimmer.js} +13 -5
  176. package/dist/collection/helpers/slimmers/element-appender/body-positioned-wrapper/third-party-dialog-wrapper.js +73 -0
  177. package/dist/collection/helpers/slimmers/element-appender/element-appender-container-controller.js +6 -0
  178. package/dist/collection/helpers/slimmers/vega-table-child-render-input-consumer-slimmer.js +96 -0
  179. package/dist/collection/helpers/translation/locales/en.js +3 -0
  180. package/dist/collection/types/type-guard.js +26 -0
  181. package/dist/esm/{app-globals-80a7d395.js → app-globals-f67d0eaf.js} +7 -7
  182. package/dist/esm/{aria-dialog-focusable-trap-slimmer-cc6a8c3e.js → aria-dialog-focusable-trap-slimmer-853a91de.js} +1 -1
  183. package/dist/esm/{child-nodes-event-prevent-slimmer-2ecc3e1f.js → child-nodes-event-prevent-slimmer-9c24d4fc.js} +1 -1
  184. package/dist/esm/{code-block-cd913077.js → code-block-b8be290a.js} +3 -3
  185. package/dist/esm/{component-value-history-controller-slimmer.abstract-e595761d.js → component-value-history-controller-slimmer.abstract-10ccf8e6.js} +4 -4
  186. package/dist/esm/{content-state-89f8eecb.js → content-state-72b513d1.js} +3 -3
  187. package/dist/esm/{dark-mode-style-controller-82e5c1c6.js → dark-mode-style-controller-e9a6b097.js} +1 -321
  188. package/dist/esm/{date-required-rule-2b08f32c.js → date-required-rule-891a6a57.js} +1 -1
  189. package/dist/esm/{design-token-7566d54c.js → design-token-59d07aa2.js} +6 -130
  190. package/dist/esm/drop-file-accept-filter-slimmer-ad759e4a.js +62 -0
  191. package/dist/esm/{dto-renderer-manager-12bc9121.js → dto-renderer-manager-abc7eb5f.js} +42 -2
  192. package/dist/esm/{element-appender-slimmer-df2a2da2.js → element-appender-slimmer-29c94a18.js} +87 -11
  193. package/dist/esm/{event-emit-slimmer-9abc9241.js → event-emit-slimmer-32da9d90.js} +1 -1
  194. package/dist/esm/{form-field-controller-slimmer-40fcb5c2.js → form-field-controller-slimmer-899864a8.js} +3 -3
  195. package/dist/esm/{image-annotation-action-6048d32e.js → image-annotation-action-ebd6c421.js} +3 -3
  196. package/dist/esm/index-090d31ca.js +4 -0
  197. package/dist/esm/index.js +19 -17
  198. package/dist/esm/{inject-keyboard-manager-c6557f50.js → inject-keyboard-manager-dc1d7135.js} +1 -1
  199. package/dist/esm/{internal-translation-controller-b08aa9ab.js → internal-translation-controller-4fb104b2.js} +3 -0
  200. package/dist/esm/{internal-vega-event-manager-59f5bd47.js → internal-vega-event-manager-8a657bac.js} +1 -0
  201. package/dist/esm/{keyboard-manager-c7b125d7.js → keyboard-manager-6ea9968b.js} +1 -1
  202. package/dist/esm/{keyboard-manager-slimmer-6109039b.js → keyboard-manager-slimmer-7eed4734.js} +1 -1
  203. package/dist/esm/loader.js +14 -13
  204. package/dist/esm/{month-view-generator-139ace5a.js → month-view-generator-aaa27fce.js} +1 -1
  205. package/dist/esm/{public-rules-e42bce9d.js → public-rules-f2005e11.js} +10 -9
  206. package/dist/esm/{range-b76edec7.js → range-ed532278.js} +1 -1
  207. package/dist/esm/{responsive-format-facade-151dbd10.js → responsive-format-facade-e9926018.js} +1 -1
  208. package/dist/esm/{rich-text-editor-required-rule-1fc7c040.js → rich-text-editor-required-rule-b559cf1a.js} +1 -1
  209. package/dist/esm/{split-cell-operation-548ea374.js → split-cell-operation-5587f594.js} +4 -4
  210. package/dist/esm/state-border-formatter-be51463d.js +129 -0
  211. package/dist/esm/{string-format-strategy.abstract-6488031a.js → string-format-strategy.abstract-0157b3c5.js} +1 -1
  212. package/dist/esm/{string-input-formatter-slimmer-625e17a2.js → string-input-formatter-slimmer-33ed3478.js} +3 -3
  213. package/dist/esm/{string-mask-strategy-a165d316.js → string-mask-strategy-b58891b5.js} +2 -2
  214. package/dist/esm/{style-formatter-280757ae.js → style-formatter-9662ae88.js} +2 -2
  215. package/dist/esm/{sub-state-notify-slimmer-6c972bb4.js → sub-state-notify-slimmer-1f907173.js} +1 -1
  216. package/dist/esm/{sub-state-observer-slimmer-53643b5c.js → sub-state-observer-slimmer-090c500a.js} +1 -1
  217. package/dist/esm/{time-required-rule-3f5a8822.js → time-required-rule-a9dc8473.js} +1 -1
  218. package/dist/esm/tinycolor-polyfill-7be0eb93.js +322 -0
  219. package/dist/esm/{token-extension-5ee7a3f1.js → token-extension-0710dbc5.js} +85 -28
  220. package/dist/esm/{translation-slimmer-35b1d0fa.js → translation-slimmer-4faae5a3.js} +1 -1
  221. package/dist/esm/{type-guard-f6c9c89d.js → type-guard-152070e9.js} +28 -2
  222. package/dist/esm/{valid-credit-card-number-rule-3bf19ad6.js → valid-credit-card-number-rule-a7907cb7.js} +1 -1
  223. package/dist/esm/vega-accordion.entry.js +7 -6
  224. package/dist/esm/vega-app-footer.entry.js +2 -1
  225. package/dist/esm/vega-app-header-button.entry.js +8 -7
  226. package/dist/esm/vega-banner.entry.js +15 -4
  227. package/dist/esm/vega-box.entry.js +6 -5
  228. package/dist/esm/vega-brand-logo.entry.js +2 -1
  229. package/dist/esm/vega-breadcrumb.entry.js +3 -3
  230. package/dist/esm/vega-button-circle.entry.js +9 -8
  231. package/dist/esm/vega-button-group_2.entry.js +102 -13
  232. package/dist/esm/vega-button-link.entry.js +3 -3
  233. package/dist/esm/vega-button.entry.js +8 -8
  234. package/dist/esm/vega-calendar_4.entry.js +10 -10
  235. package/dist/esm/vega-card.entry.js +5 -4
  236. package/dist/esm/vega-carousel.entry.js +5 -5
  237. package/dist/esm/vega-checkbox_2.entry.js +44 -11
  238. package/dist/esm/vega-chip.entry.js +8 -7
  239. package/dist/esm/vega-code-block.entry.js +14 -13
  240. package/dist/esm/vega-color-picker.entry.js +26 -8
  241. package/dist/esm/vega-color-swatch.entry.js +241 -0
  242. package/dist/esm/vega-combo-box.entry.js +10 -10
  243. package/dist/esm/vega-date-picker_2.entry.js +20 -20
  244. package/dist/esm/vega-dialog_2.entry.js +80 -247
  245. package/dist/esm/vega-divider.entry.js +5 -4
  246. package/dist/esm/vega-dropdown_5.entry.js +33 -15
  247. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  248. package/dist/esm/vega-field-label.entry.js +2 -2
  249. package/dist/esm/vega-file-uploader.entry.js +40 -90
  250. package/dist/esm/vega-flag-icon.entry.js +5 -4
  251. package/dist/esm/vega-flex.entry.js +6 -5
  252. package/dist/esm/vega-font.entry.js +5 -4
  253. package/dist/esm/vega-form.entry.js +9 -9
  254. package/dist/esm/vega-grid.entry.js +5 -4
  255. package/dist/esm/vega-icon.entry.js +5 -4
  256. package/dist/esm/vega-image-uploader.entry.js +78 -13
  257. package/dist/esm/vega-input-credit-card.entry.js +11 -11
  258. package/dist/esm/vega-input-numeric.entry.js +11 -11
  259. package/dist/esm/vega-input-passcode.entry.js +10 -10
  260. package/dist/esm/vega-input-phone-number.entry.js +9 -9
  261. package/dist/esm/vega-input-range.entry.js +8 -8
  262. package/dist/esm/vega-input-select.entry.js +50 -15
  263. package/dist/esm/vega-input.entry.js +11 -11
  264. package/dist/esm/{vega-internal-event-id-70bd893d.js → vega-internal-event-id-194bac82.js} +2 -1
  265. package/dist/esm/vega-item-toggle.entry.js +2 -2
  266. package/dist/esm/vega-left-nav_5.entry.js +14 -12
  267. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  268. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +4 -4
  269. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +3 -3
  270. package/dist/esm/vega-pagination.entry.js +9 -9
  271. package/dist/esm/vega-popover_2.entry.js +12 -11
  272. package/dist/esm/vega-progress-tracker_2.entry.js +34 -11
  273. package/dist/esm/vega-radio_2.entry.js +10 -10
  274. package/dist/esm/vega-rich-text-content.entry.js +11 -10
  275. package/dist/esm/vega-rich-text-editor_4.entry.js +75 -29
  276. package/dist/esm/vega-rich-text-table-properties_3.entry.js +13 -12
  277. package/dist/esm/vega-segment-control.entry.js +2 -2
  278. package/dist/esm/vega-selection-chip_2.entry.js +10 -10
  279. package/dist/esm/vega-selection-tile_2.entry.js +8 -8
  280. package/dist/esm/vega-sidenav_3.entry.js +8 -8
  281. package/dist/esm/vega-signature-capture.entry.js +11 -10
  282. package/dist/esm/vega-stepper.entry.js +9 -9
  283. package/dist/esm/vega-tab-group_2.entry.js +3 -3
  284. package/dist/esm/vega-table_11.entry.js +434 -287
  285. package/dist/esm/vega-text.entry.js +16 -2
  286. package/dist/esm/vega-textarea.entry.js +7 -7
  287. package/dist/esm/vega-time-picker_2.entry.js +14 -14
  288. package/dist/esm/vega-toggle-switch.entry.js +6 -6
  289. package/dist/esm/vega-tooltip_2.entry.js +9 -8
  290. package/dist/esm/vega.js +14 -13
  291. package/dist/esm/{wait-for-component-did-render-6980a1a6.js → wait-for-component-did-render-30cde59c.js} +1 -1
  292. package/dist/sri/vega-sri-manifest.json +367 -351
  293. package/dist/types/components/vega-banner/slimmers/renderers/vega-banner-renderer.d.ts +6 -0
  294. package/dist/types/components/vega-banner/vega-banner.d.ts +2 -0
  295. package/dist/types/components/vega-button-group/slimmers/controllers/vega-button-group-all-items-disabled-controller.d.ts +21 -0
  296. package/dist/types/components/vega-button-group/vega-button-group-item/slimmers/controllers/vega-button-group-item-sub-state-controller.d.ts +1 -0
  297. package/dist/types/components/vega-button-group/vega-button-group-item/slimmers/renderers/vega-button-group-item-renderer.d.ts +1 -0
  298. package/dist/types/components/vega-button-group/vega-button-group-item/vega-button-group-item.d.ts +1 -0
  299. package/dist/types/components/vega-button-group/vega-button-group.d.ts +5 -0
  300. package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +22 -1
  301. package/dist/types/components/vega-color-picker/vega-color-picker.d.ts +14 -0
  302. package/dist/types/components/vega-color-swatch/slimmers/renderers/vega-color-swatch-renderer.d.ts +48 -0
  303. package/dist/types/components/vega-color-swatch/types.d.ts +5 -0
  304. package/dist/types/components/vega-color-swatch/vega-color-swatch.d.ts +86 -0
  305. package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/controllers/vega-dropdown-item-state-controller.d.ts +1 -0
  306. package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.d.ts +1 -0
  307. package/dist/types/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.d.ts +4 -0
  308. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +10 -0
  309. package/dist/types/components/vega-file-uploader/vega-file-uploader.d.ts +2 -2
  310. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-default-content-renderer.d.ts +25 -0
  311. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-preview-content-renderer.d.ts +10 -0
  312. package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +2 -0
  313. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +3 -0
  314. package/dist/types/components/vega-input-select/types.d.ts +14 -0
  315. package/dist/types/components/vega-input-select/vega-input-select.d.ts +19 -1
  316. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-backdrop-controller.d.ts +1 -0
  317. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +0 -1
  318. package/dist/types/components/vega-modal/slimmers/controllers/vega-nested-modal-controller.d.ts +3 -2
  319. package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +3 -2
  320. package/dist/types/components/vega-modal/vega-modal.d.ts +0 -2
  321. package/dist/types/components/vega-pagination/types.d.ts +7 -1
  322. package/dist/types/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-step-controller.d.ts +1 -0
  323. package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +15 -0
  324. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +20 -2
  325. package/dist/types/components/vega-rich-text-editor/extensions/languages/language-extension.d.ts +13 -2
  326. package/dist/types/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.d.ts +15 -4
  327. package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +1 -1
  328. package/dist/types/components/vega-rich-text-editor/interface.d.ts +4 -0
  329. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/extension-controller.d.ts +7 -0
  330. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.d.ts +1 -0
  331. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.d.ts +4 -3
  332. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +14 -1
  333. package/dist/types/components/vega-table/slimmers/controllers/vega-table-render-input-controller.d.ts +8 -1
  334. package/dist/types/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.d.ts +5 -1
  335. package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +5 -0
  336. package/dist/types/components/vega-table/vega-table-head-cell/vega-table-head-cell.d.ts +5 -0
  337. package/dist/types/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.d.ts +1 -0
  338. package/dist/types/components/vega-table/vega-table-head-row/vega-table-head-row.d.ts +4 -0
  339. package/dist/types/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.d.ts +1 -0
  340. package/dist/types/components/vega-text/types.d.ts +5 -3
  341. package/dist/types/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.d.ts +4 -0
  342. package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +4 -0
  343. package/dist/types/components.d.ts +181 -8
  344. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
  345. package/dist/types/helpers/formatter/string-formatter/string-mask-strategy.d.ts +56 -3
  346. package/dist/types/helpers/rte-manager/dto-renderer-manager.d.ts +26 -1
  347. package/dist/types/helpers/slimmers/drop-file-accept-filter-slimmer.d.ts +29 -0
  348. package/dist/types/helpers/slimmers/element-appender/body-positioned-wrapper/third-party-dialog-wrapper.d.ts +45 -0
  349. package/dist/types/helpers/slimmers/element-appender/element-appender-container-controller.d.ts +2 -0
  350. package/dist/types/helpers/slimmers/vega-table-child-render-input-consumer-slimmer.d.ts +48 -0
  351. package/dist/types/helpers/translation/interface.d.ts +4 -1
  352. package/dist/types/types/components.type.d.ts +8 -0
  353. package/dist/types/types/public-api.d.ts +3 -1
  354. package/dist/types/types/type-guard.d.ts +15 -1
  355. package/dist/vega/index.esm.js +1 -1
  356. package/dist/vega/{p-2f99c511.js → p-02467b61.js} +1 -1
  357. package/dist/vega/p-075bb809.entry.js +1 -0
  358. package/dist/vega/{p-59c6f795.js → p-085de8fc.js} +1 -1
  359. package/dist/vega/{p-0fc2ccc4.entry.js → p-0915a8d3.entry.js} +1 -1
  360. package/dist/vega/p-0bcb2945.entry.js +1 -0
  361. package/dist/vega/{p-e22e5aa1.js → p-0bf8743f.js} +1 -1
  362. package/dist/vega/{p-a1d51bc2.js → p-0caf52e0.js} +1 -1
  363. package/dist/vega/{p-42da45e3.entry.js → p-0dbd7723.entry.js} +1 -1
  364. package/dist/vega/{p-98c44c03.js → p-103d20f5.js} +1 -1
  365. package/dist/vega/p-115d6053.entry.js +1 -0
  366. package/dist/vega/{p-0304c3a7.js → p-116e3963.js} +1 -1
  367. package/dist/vega/p-142f371b.entry.js +1 -0
  368. package/dist/vega/p-14de7ba0.entry.js +1 -0
  369. package/dist/vega/p-158c6a9f.entry.js +1 -0
  370. package/dist/vega/{p-42e246e4.entry.js → p-19a30f98.entry.js} +1 -1
  371. package/dist/vega/p-1b48e8a5.entry.js +1 -0
  372. package/dist/vega/{p-e1117034.entry.js → p-1ca95601.entry.js} +1 -1
  373. package/dist/vega/p-25ab7a33.entry.js +1 -0
  374. package/dist/vega/p-264b3309.entry.js +1 -0
  375. package/dist/vega/{p-c0d45f77.entry.js → p-280f63fa.entry.js} +1 -1
  376. package/dist/vega/p-29d31c98.entry.js +1 -0
  377. package/dist/vega/{p-7ac9e8ff.entry.js → p-29f42c27.entry.js} +1 -1
  378. package/dist/vega/p-2b5cf2b3.js +1 -0
  379. package/dist/vega/{p-679b1f00.entry.js → p-30445cd9.entry.js} +1 -1
  380. package/dist/vega/p-318f0df5.js +1 -0
  381. package/dist/vega/p-337a5e76.js +1 -0
  382. package/dist/vega/p-380abceb.entry.js +1 -0
  383. package/dist/vega/p-38af89b9.js +1 -0
  384. package/dist/vega/p-3fae8d3f.entry.js +1 -0
  385. package/dist/vega/{p-49ae8c79.js → p-42141782.js} +1 -1
  386. package/dist/vega/{p-d0ac7af8.js → p-44044ed7.js} +1 -1
  387. package/dist/vega/p-475bd8bf.entry.js +1 -0
  388. package/dist/vega/{p-e753fac2.entry.js → p-47611a83.entry.js} +1 -1
  389. package/dist/vega/p-4e95248c.entry.js +1 -0
  390. package/dist/vega/{p-eccabba7.entry.js → p-513f51ec.entry.js} +1 -1
  391. package/dist/vega/{p-e8fc8495.entry.js → p-51d2e0ab.entry.js} +1 -1
  392. package/dist/vega/p-54ba35e3.entry.js +1 -0
  393. package/dist/vega/{p-dff66a67.entry.js → p-58b6ac33.entry.js} +1 -1
  394. package/dist/vega/p-596bc4f6.entry.js +1 -0
  395. package/dist/vega/{p-757bfca2.entry.js → p-597588d0.entry.js} +1 -1
  396. package/dist/vega/p-5be546c5.js +1 -0
  397. package/dist/vega/p-5f377954.js +1 -1
  398. package/dist/vega/{p-4ed416e7.js → p-5ffdea8e.js} +1 -1
  399. package/dist/vega/{p-90a0b9f3.entry.js → p-608f234f.entry.js} +1 -1
  400. package/dist/vega/{p-3224e47c.js → p-6572e038.js} +1 -1
  401. package/dist/vega/p-6e9f832f.js +1 -0
  402. package/dist/vega/p-783531cf.entry.js +1 -0
  403. package/dist/vega/{p-47a2eec1.entry.js → p-7d85cc74.entry.js} +1 -1
  404. package/dist/vega/p-7df43192.entry.js +1 -0
  405. package/dist/vega/p-81a11dc6.entry.js +1 -0
  406. package/dist/vega/p-8559e36f.entry.js +1 -0
  407. package/dist/vega/{p-f0d605e9.entry.js → p-8583dd34.entry.js} +1 -1
  408. package/dist/vega/p-85abe824.entry.js +1 -0
  409. package/dist/vega/p-874bf8b2.js +1 -0
  410. package/dist/vega/p-8aee6b74.js +1 -0
  411. package/dist/vega/{p-9324dd2c.entry.js → p-8b217c7e.entry.js} +1 -1
  412. package/dist/vega/p-8da66d41.entry.js +1 -0
  413. package/dist/vega/p-90cb665e.entry.js +1 -0
  414. package/dist/vega/{p-fd5ddc55.js → p-956b170c.js} +1 -1
  415. package/dist/vega/{p-001d36af.js → p-9751c801.js} +1 -1
  416. package/dist/vega/p-988401c3.entry.js +1 -0
  417. package/dist/vega/{p-f40d479d.entry.js → p-9c1a48b9.entry.js} +1 -1
  418. package/dist/vega/p-9d854d43.js +1 -0
  419. package/dist/vega/{p-64e22fe5.js → p-a07c0f8c.js} +1 -1
  420. package/dist/vega/{p-6216c30e.js → p-a0c3968b.js} +1 -1
  421. package/dist/vega/p-a4738b70.entry.js +1 -0
  422. package/dist/vega/p-a6dbc63d.entry.js +1 -0
  423. package/dist/vega/p-aa985d73.js +1 -0
  424. package/dist/vega/{p-5f95a2fa.js → p-ab829745.js} +1 -1
  425. package/dist/vega/p-b08a70e6.entry.js +1 -0
  426. package/dist/vega/p-b19b1c08.js +1 -0
  427. package/dist/vega/p-b5497af2.entry.js +1 -0
  428. package/dist/vega/p-b6c3ce6d.js +1 -0
  429. package/dist/vega/p-b7624ce4.js +1 -0
  430. package/dist/vega/{p-83863463.js → p-b9386dd0.js} +1 -1
  431. package/dist/vega/p-b9728ca8.js +1 -0
  432. package/dist/vega/{p-88e6618d.js → p-b9947846.js} +1 -1
  433. package/dist/vega/p-b9a95aca.entry.js +1 -0
  434. package/dist/vega/{p-53ba1adb.entry.js → p-bb46d8e6.entry.js} +1 -1
  435. package/dist/vega/p-c36afa21.entry.js +1 -0
  436. package/dist/vega/{p-f509b439.js → p-c8435185.js} +1 -1
  437. package/dist/vega/{p-ab4b06c9.entry.js → p-c8d41cdc.entry.js} +1 -1
  438. package/dist/vega/{p-ff47aeee.entry.js → p-cab70b95.entry.js} +1 -1
  439. package/dist/vega/p-cc00135a.entry.js +1 -0
  440. package/dist/vega/p-cc18970f.entry.js +1 -0
  441. package/dist/vega/p-d320496e.entry.js +1 -0
  442. package/dist/vega/{p-ae0f03c1.js → p-d32e83e7.js} +1 -1
  443. package/dist/vega/{p-37a9f4b4.entry.js → p-d456386a.entry.js} +1 -1
  444. package/dist/vega/{p-d289a6af.js → p-d4f1f007.js} +1 -1
  445. package/dist/vega/{p-82016096.js → p-d5531d3c.js} +1 -1
  446. package/dist/vega/{p-9b14ac66.entry.js → p-d7bd2470.entry.js} +1 -1
  447. package/dist/vega/{p-add63fe0.entry.js → p-e00fb667.entry.js} +1 -1
  448. package/dist/vega/{p-5a8be21c.entry.js → p-e340d58c.entry.js} +1 -1
  449. package/dist/vega/{p-dc6e7a77.js → p-e71864ff.js} +1 -1
  450. package/dist/vega/{p-5e9f6fb6.entry.js → p-ea564928.entry.js} +1 -1
  451. package/dist/vega/p-eb0ebf50.entry.js +1 -0
  452. package/dist/vega/p-ebdb489c.entry.js +1 -0
  453. package/dist/vega/{p-01541820.entry.js → p-ed01657b.entry.js} +1 -1
  454. package/dist/vega/p-eda7cd76.entry.js +1 -0
  455. package/dist/vega/{p-68a531cf.js → p-edda10f7.js} +1 -1
  456. package/dist/vega/{p-24b45c85.js → p-ef59f6f0.js} +1 -1
  457. package/dist/vega/{p-77c6f14a.entry.js → p-efc8c09e.entry.js} +1 -1
  458. package/dist/vega/p-f020738c.entry.js +1 -0
  459. package/dist/vega/{p-f2cef51a.js → p-f7a5746b.js} +1 -1
  460. package/dist/vega/{p-27dc6562.entry.js → p-f89cf75a.entry.js} +1 -1
  461. package/dist/vega/p-fb5ea4b2.js +1 -0
  462. package/dist/vega/p-fc7ab79d.js +1 -0
  463. package/dist/vega/vega.esm.js +1 -1
  464. package/package.json +1 -1
  465. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.js +0 -182
  466. package/dist/types/components/vega-file-uploader/slimmers/controllers/vega-file-uploader-drop-file-filter-controller.d.ts +0 -22
  467. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.d.ts +0 -51
  468. package/dist/vega/p-08f03a52.entry.js +0 -1
  469. package/dist/vega/p-0a145766.entry.js +0 -1
  470. package/dist/vega/p-0d205fbf.js +0 -1
  471. package/dist/vega/p-118aeed1.entry.js +0 -1
  472. package/dist/vega/p-1a4e8d8a.js +0 -1
  473. package/dist/vega/p-23dc4064.entry.js +0 -1
  474. package/dist/vega/p-262a27d0.js +0 -1
  475. package/dist/vega/p-2beace1c.entry.js +0 -1
  476. package/dist/vega/p-2ce2972f.js +0 -1
  477. package/dist/vega/p-2e7d5e28.entry.js +0 -1
  478. package/dist/vega/p-32592497.entry.js +0 -1
  479. package/dist/vega/p-33860e54.js +0 -1
  480. package/dist/vega/p-3d2d267d.js +0 -1
  481. package/dist/vega/p-3f3c771a.entry.js +0 -1
  482. package/dist/vega/p-4013d954.entry.js +0 -1
  483. package/dist/vega/p-479a169c.entry.js +0 -1
  484. package/dist/vega/p-55019e55.entry.js +0 -1
  485. package/dist/vega/p-565aac6e.entry.js +0 -1
  486. package/dist/vega/p-574586c9.entry.js +0 -1
  487. package/dist/vega/p-5781b9f4.entry.js +0 -1
  488. package/dist/vega/p-57827342.entry.js +0 -1
  489. package/dist/vega/p-5baff397.js +0 -1
  490. package/dist/vega/p-62e80151.entry.js +0 -1
  491. package/dist/vega/p-63d73fa0.entry.js +0 -1
  492. package/dist/vega/p-76daa632.entry.js +0 -1
  493. package/dist/vega/p-8ac2d165.js +0 -1
  494. package/dist/vega/p-9aa1c66a.entry.js +0 -1
  495. package/dist/vega/p-9b01a28a.entry.js +0 -1
  496. package/dist/vega/p-ac43be09.entry.js +0 -1
  497. package/dist/vega/p-b525c800.entry.js +0 -1
  498. package/dist/vega/p-be651266.entry.js +0 -1
  499. package/dist/vega/p-c2e7992b.js +0 -1
  500. package/dist/vega/p-c56aa01c.entry.js +0 -1
  501. package/dist/vega/p-c8feb644.entry.js +0 -1
  502. package/dist/vega/p-cc3c661c.entry.js +0 -1
  503. package/dist/vega/p-cda09e99.entry.js +0 -1
  504. package/dist/vega/p-d29e8972.entry.js +0 -1
  505. package/dist/vega/p-d47aa28f.js +0 -1
  506. package/dist/vega/p-d90eee9a.entry.js +0 -1
  507. package/dist/vega/p-dcf8f58f.entry.js +0 -1
  508. package/dist/vega/p-e223e0dc.entry.js +0 -1
  509. package/dist/vega/p-ea2b5dbb.js +0 -1
  510. package/dist/vega/p-f2c65579.entry.js +0 -1
  511. package/dist/vega/p-f5013494.entry.js +0 -1
  512. package/dist/vega/p-f5d3ce94.js +0 -1
  513. package/dist/vega/p-f69e2801.entry.js +0 -1
  514. package/dist/vega/p-fa654762.entry.js +0 -1
  515. package/dist/vega/p-fbc5a7f6.entry.js +0 -1
  516. package/dist/vega/p-fcabf0dc.js +0 -1
@@ -1 +1 @@
1
- import{h as t,r as e,c as i,H as s,g as o}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as a,V as p,M as n,I as l}from"./p-6e1ab235.js";import{V as h,I as c}from"./p-4415ad28.js";import{D as m}from"./p-f28a6074.js";import{h as f,H as u}from"./p-c5eb0fa6.js";import{n as d,c as v,b as j}from"./p-262ec334.js";import{C as b}from"./p-68a531cf.js";import{c as w}from"./p-d0ac7af8.js";import{F as x}from"./p-a528714c.js";import{C as y}from"./p-2d0d575f.js";import{K as R}from"./p-001d36af.js";import{F as C}from"./p-49ae8c79.js";import{R as g}from"./p-280cbcdb.js";import{c as I}from"./p-262a27d0.js";import{M as V,a as N}from"./p-f0ff4463.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-3d2d267d.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-6a334573.js";import"./p-b75ee3ba.js";import"./p-59c6f795.js";import"./p-83863463.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-82016096.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-33860e54.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-6216c30e.js";var T=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class S extends p{constructor(){super(...arguments),this.onInputChange=t=>{this.valueController.updateValue(t.detail)},this.onInputBlur=t=>{const e=t.host.value.replace(/,/g,"");if(""!==e&&!isNaN(e)){let t=d(Number(e),this.min,this.max);this.integerOnly&&(t===this.min?t=Math.ceil(this.min):t===this.max&&(t=Math.floor(this.max))),t!==Number(e)&&this.valueController.updateValue(t.toString())}}}getInputRef(){return this.vegaInputRef.shadowRoot.querySelector("input")}getContainerRef(){return this.vegaInputRef.shadowRoot.querySelector(".vega-input-container")}render(){const e={thousandComma:this.thousandComma};return this.integerOnly&&(e.precision=0),t("vega-input",{value:this.value||"",showClearIcon:this.showClearIcon,disabled:this.disabled,label:this.label,hint:this.hint,required:this.required,type:"number",placeholder:this.placeholder,size:"small"===this.size?"small":"default",prefixIcon:this.prefixIcon,ref:t=>{this.vegaInputRef=t,m.addUniqueObserverToNode(t,f,(t=>this.onInputChange(t))),m.addUniqueObserverToNode(t,u,(t=>this.onInputBlur(t)))},maskConfig:{type:"number",options:e}})}}T([a()],S.prototype,"prefixIcon",void 0),T([a()],S.prototype,"showClearIcon",void 0),T([a()],S.prototype,"value",void 0),T([a()],S.prototype,"size",void 0),T([a()],S.prototype,"disabled",void 0),T([a()],S.prototype,"placeholder",void 0),T([a()],S.prototype,"label",void 0),T([a()],S.prototype,"hint",void 0),T([a()],S.prototype,"required",void 0),T([a()],S.prototype,"thousandComma",void 0),T([a()],S.prototype,"integerOnly",void 0),T([a()],S.prototype,"min",void 0),T([a()],S.prototype,"max",void 0),T([a()],S.prototype,"valueController",void 0);var O=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class k extends p{watchValue(){this.changeEventEmitter.emit(this.value),y.notify(x,{host:this.host,detail:this.value})}updateValue(t){this.value=t}}O([a()],k.prototype,"host",void 0),O([a({writable:!0})],k.prototype,"value",void 0),O([a()],k.prototype,"changeEventEmitter",void 0),O([n("watchValue")],k.prototype,"watchValue",null);var E=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class A extends R{constructor(){super((t=>[{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[t.host],callback:t.onArrowUpOrDown},{keyCode:["ArrowUp"],eventName:"keydown",activeElementInScope:[t.host],callback:t=>{t.preventDefault()}}])),this.onArrowUpOrDown=t=>{const e=t.shiftKey?this.majorIncrement:this.minorIncrement,i=v(this.value.replace(/,/g,""))||0,s=Math.max(j(i),j(e));"ArrowUp"===t.code?this.valueController.updateValue(`${(i+e).toFixed(s)}`):"ArrowDown"===t.code&&this.valueController.updateValue(`${(i-e).toFixed(s)}`)}}}E([a()],A.prototype,"host",void 0),E([a()],A.prototype,"value",void 0),E([a()],A.prototype,"minorIncrement",void 0),E([a()],A.prototype,"majorIncrement",void 0),E([a()],A.prototype,"valueController",void 0);var F=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const M=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.valueController=new k,this.keyboardController=new A,this.renderer=new S,this.changeEventEmitter=w(M,f),this.inputEventPrevent=new b([f],(()=>this.host),{useCapture:!0}),this.formFieldController=new C({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new g:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new V({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new N({maxValue:t}):null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getContainerRef(),touchableAreaGetter:()=>[this.renderer.getInputRef()],defaultValue:"",attributeGetter:t=>this[t]}),this.prefixTextNotifySlimmer=I(M,"prefixText","watchPrefixText"),this.suffixTextNotifySlimmer=I(M,"suffixText","watchSuffixText"),this.isCompactInputWidthNotifySlimmer=I(M,"isCompactInputWidth"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.isCompactInputWidth=!0,this.prefixText="",this.value="",this.size="medium",this.thousandComma=!1,this.integerOnly=!1,this.disabled=!1,this.minorIncrement=1,this.majorIncrement=10,this.label="",this.validationRules=[],this.isValid=null,this.autoValidation=!0,this.showClearIcon=!0,this.min=null,this.max=null}watchPrefixText(){}watchSuffixText(){}watchValue(){}watchValidationRules(){}render(){return r(t(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{prefixText:["watchPrefixText"],suffixText:["watchSuffixText"],value:["watchValue"],validationRules:["watchValidationRules"]}}};F([c()],M.prototype,"globalSlimmers",void 0),F([l()],M.prototype,"valueController",void 0),F([l()],M.prototype,"keyboardController",void 0),F([l()],M.prototype,"renderer",void 0),F([l()],M.prototype,"changeEventEmitter",void 0),F([l()],M.prototype,"inputEventPrevent",void 0),F([l()],M.prototype,"formFieldController",void 0),F([l()],M.prototype,"prefixTextNotifySlimmer",void 0),F([l()],M.prototype,"suffixTextNotifySlimmer",void 0),F([l()],M.prototype,"isCompactInputWidthNotifySlimmer",void 0),F([l()],M.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),M.style=":host{display:inline-block;width:100%}";export{M as vega_input_numeric}
1
+ import{h as t,r as e,c as i,H as s,g as o}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as a,V as p,M as n,I as l}from"./p-6e1ab235.js";import{V as h,I as c}from"./p-4415ad28.js";import{D as m}from"./p-f28a6074.js";import{h as f,H as d}from"./p-c5eb0fa6.js";import{n as u,c as v,b as j}from"./p-262ec334.js";import{C as b}from"./p-edda10f7.js";import{c as w}from"./p-44044ed7.js";import{F as x}from"./p-a528714c.js";import{C as y}from"./p-2d0d575f.js";import{K as R}from"./p-9751c801.js";import{F as C}from"./p-42141782.js";import{R as g}from"./p-280cbcdb.js";import{c as I}from"./p-874bf8b2.js";import{M as V,a as N}from"./p-f0ff4463.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-6e9f832f.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-6a334573.js";import"./p-b75ee3ba.js";import"./p-085de8fc.js";import"./p-b9386dd0.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-d5531d3c.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-aa985d73.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-a0c3968b.js";var T=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class S extends p{constructor(){super(...arguments),this.onInputChange=t=>{this.valueController.updateValue(t.detail)},this.onInputBlur=t=>{const e=t.host.value.replace(/,/g,"");if(""!==e&&!isNaN(e)){let t=u(Number(e),this.min,this.max);this.integerOnly&&(t===this.min?t=Math.ceil(this.min):t===this.max&&(t=Math.floor(this.max))),t!==Number(e)&&this.valueController.updateValue(t.toString())}}}getInputRef(){return this.vegaInputRef.shadowRoot.querySelector("input")}getContainerRef(){return this.vegaInputRef.shadowRoot.querySelector(".vega-input-container")}render(){const e={thousandComma:this.thousandComma};return this.integerOnly&&(e.precision=0),t("vega-input",{value:this.value||"",showClearIcon:this.showClearIcon,disabled:this.disabled,label:this.label,hint:this.hint,required:this.required,type:"number",placeholder:this.placeholder,size:"small"===this.size?"small":"default",prefixIcon:this.prefixIcon,ref:t=>{this.vegaInputRef=t,m.addUniqueObserverToNode(t,f,(t=>this.onInputChange(t))),m.addUniqueObserverToNode(t,d,(t=>this.onInputBlur(t)))},maskConfig:{type:"number",options:e}})}}T([a()],S.prototype,"prefixIcon",void 0),T([a()],S.prototype,"showClearIcon",void 0),T([a()],S.prototype,"value",void 0),T([a()],S.prototype,"size",void 0),T([a()],S.prototype,"disabled",void 0),T([a()],S.prototype,"placeholder",void 0),T([a()],S.prototype,"label",void 0),T([a()],S.prototype,"hint",void 0),T([a()],S.prototype,"required",void 0),T([a()],S.prototype,"thousandComma",void 0),T([a()],S.prototype,"integerOnly",void 0),T([a()],S.prototype,"min",void 0),T([a()],S.prototype,"max",void 0),T([a()],S.prototype,"valueController",void 0);var O=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class k extends p{watchValue(){this.changeEventEmitter.emit(this.value),y.notify(x,{host:this.host,detail:this.value})}updateValue(t){this.value=t}}O([a()],k.prototype,"host",void 0),O([a({writable:!0})],k.prototype,"value",void 0),O([a()],k.prototype,"changeEventEmitter",void 0),O([n("watchValue")],k.prototype,"watchValue",null);var E=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class A extends R{constructor(){super((t=>[{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[t.host],callback:t.onArrowUpOrDown},{keyCode:["ArrowUp"],eventName:"keydown",activeElementInScope:[t.host],callback:t=>{t.preventDefault()}}])),this.onArrowUpOrDown=t=>{const e=t.shiftKey?this.majorIncrement:this.minorIncrement,i=v(this.value.replace(/,/g,""))||0,s=Math.max(j(i),j(e));"ArrowUp"===t.code?this.valueController.updateValue(`${(i+e).toFixed(s)}`):"ArrowDown"===t.code&&this.valueController.updateValue(`${(i-e).toFixed(s)}`)}}}E([a()],A.prototype,"host",void 0),E([a()],A.prototype,"value",void 0),E([a()],A.prototype,"minorIncrement",void 0),E([a()],A.prototype,"majorIncrement",void 0),E([a()],A.prototype,"valueController",void 0);var F=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const M=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.valueController=new k,this.keyboardController=new A,this.renderer=new S,this.changeEventEmitter=w(M,f),this.inputEventPrevent=new b([f],(()=>this.host),{useCapture:!0}),this.formFieldController=new C({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new g:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new V({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new N({maxValue:t}):null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getContainerRef(),touchableAreaGetter:()=>[this.renderer.getInputRef()],defaultValue:"",attributeGetter:t=>this[t]}),this.prefixTextNotifySlimmer=I(M,"prefixText","watchPrefixText"),this.suffixTextNotifySlimmer=I(M,"suffixText","watchSuffixText"),this.isCompactInputWidthNotifySlimmer=I(M,"isCompactInputWidth"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.isCompactInputWidth=!0,this.prefixText="",this.value="",this.size="medium",this.thousandComma=!1,this.integerOnly=!1,this.disabled=!1,this.minorIncrement=1,this.majorIncrement=10,this.label="",this.validationRules=[],this.isValid=null,this.autoValidation=!0,this.showClearIcon=!0,this.min=null,this.max=null}watchPrefixText(){}watchSuffixText(){}watchValue(){}watchValidationRules(){}render(){return r(t(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{prefixText:["watchPrefixText"],suffixText:["watchSuffixText"],value:["watchValue"],validationRules:["watchValidationRules"]}}};F([c()],M.prototype,"globalSlimmers",void 0),F([l()],M.prototype,"valueController",void 0),F([l()],M.prototype,"keyboardController",void 0),F([l()],M.prototype,"renderer",void 0),F([l()],M.prototype,"changeEventEmitter",void 0),F([l()],M.prototype,"inputEventPrevent",void 0),F([l()],M.prototype,"formFieldController",void 0),F([l()],M.prototype,"prefixTextNotifySlimmer",void 0),F([l()],M.prototype,"suffixTextNotifySlimmer",void 0),F([l()],M.prototype,"isCompactInputWidthNotifySlimmer",void 0),F([l()],M.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),M.style=":host{display:inline-block;width:100%}";export{M as vega_input_numeric}
@@ -1,3 +1,3 @@
1
- import{g as t,e,c as n,h as s,A as r,T as i,q as o,H as a,r as l,l as c,t as h,u,v as d,w as m,x as w,I as T,n as p,S as g,j as E,B as f,y as k,d as R,z as B,D as x,o as I,E as b,s as O,N as L,F as y,G as N,J as C,K as A,m as H,L as j,M as v,O as S,P as $,Q as D,U as M,W as P,X as F,Y as z,Z as V,_ as U,$ as W,a0 as G,a1 as J,a2 as K,R as Y,a3 as X,p as Q,a4 as Z,a5 as _,a6 as q,b as tt,a7 as et,a8 as nt,a9 as st,aa as rt}from"./p-4ed416e7.js";import{g as it}from"./p-8b5d3a52.js";import{i as ot}from"./p-83863463.js";import{C as at}from"./p-2d0d575f.js";import{d as lt}from"./p-f28a6074.js";import{c as ct,d as ht}from"./p-33860e54.js";import{r as ut,i as dt}from"./p-6e70d3cc.js";import{c as mt}from"./p-a841cf13.js";import{L as wt}from"./p-6e1ab235.js";class RTEListItemBlock extends e{constructor(t,e,n){super(t,"list-item",n),this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new RTEListItemBlock(t.id,void 0,e);s.children=t.nodes.map((t=>n.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const e=RTEListBlock.from(t);return e.parent=s,e})));const{annotations:r}=t;return r&&Object.entries(r).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);ot(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(t){return[`<li${super.generateAttributeString(t)}>`,this.getChildrenHtml(t),"</li>"].join("")}cloneWithNodes(t){const e=new RTEListItemBlock(it());return e.children=[],e.apply(new s(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new RTEListItemBlock(it())}clone(t){var e;const n=new RTEListItemBlock(this.id);return n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n.nestList=null===(e=this.nestList)||void 0===e?void 0:e.map((t=>t.clone(n))),n.parent=t,n}}r.register(i.name,RTEListItemBlock.name,new o),r.register(a.name,RTEListItemBlock.name,new l),r.register(c.LINE_BREAK_SINGLE_BLOCK,RTEListItemBlock.name,new h),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,RTEListItemBlock.name,new u),r.register(c.DELETE_NEST_LIST,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),r.register(c.SPLIT_BLOCK_WITH_NODE,RTEListItemBlock.name,new d),r.register(c.REPLACE_CHILD_NODES,RTEListItemBlock.name,new m),r.register(c.REPLACE_NEST_LIST,RTEListItemBlock.name,new class extends t{handleAction(t,e){t.newList.forEach((t=>{t.parent=e})),e.nestList=t.newList}}),r.register(c.MERGE_TWO_BLOCKS_NODES,RTEListItemBlock.name,new w),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.parent.apply(t)}});class Tt extends f{constructor(){super(...arguments),this.type=k.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}renderStyle(t){return(null==t?void 0:t.standalone)?Tt.getDefaultStyles():null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new Tt}toJSON(){}}class RTEListBlock extends R{constructor(t,e,n){super(t),this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&this.annotationMap.set(k.LIST,new Tt)}static from(t,e={autoMatchFormat:!0}){const n=new RTEListBlock(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);ot(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=RTEListItemBlock.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return I.from(e);case"customClass":return x.from(e);case"customStyle":return B.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag();return[`<${e}${super.generateAttributeString(t)}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(t){const e=new RTEListBlock(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getBlockTag(){return"number-list"===this.type?"ol":"ul"}}r.register(c.TRANSFORM_LIST_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,r=e.parent.createList(t.listType);if(n.every((t=>t.parent===e)))r.apply(new s(e.children)),e.parent.apply(new T(e,r)),e.parent.apply(new p(e)),n.forEach((t=>t.children.map((t=>t.apply(new g)))));else{const n=t.selectedBlocks.map((t=>e.parent.toListItem(t)));r.apply(new s(n)),e.parent.apply(new T(e,r)),t.selectedBlocks.forEach((t=>{t.parent.apply(new p(t))})),0===e.children.length&&e.parent.apply(new p(e))}}}),r.register(c.TRANSFORM_PARAGRAPH_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){let n=!1,r=!1;const i=t.selectedBlocks,o=i.map((t=>(t.children.map((t=>t.apply(new g))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new E(e,...o));else if(r)e.parent.apply(new T(e,...o));else{const t=e.children.indexOf(i[0]),n=e.children.indexOf(i[i.length-1]),r=e.parent.createList(e.type);r.apply(new s(e.children.slice(0,t)));const a=e.parent.createList(e.type);a.apply(new s(e.children.slice(n+1))),e.parent.apply(new E(e,r,...o,a)),e.parent.apply(new p(e))}i.map((t=>{e.apply(new p(t))})),0===e.children.length&&e.parent.apply(new p(e))}toParagraph(t){const n=new e(it(),"paragraph");return n.apply(new s(t.children)),n.annotationMap=t.annotationMap,n}}),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new T(e,t.imageBlockToBeInserted):t)}});class pt{}class gt{constructor(t,e){this.childrenOutput=[],this.currentStrategy=t,this.currentElements=e}setChildrenOutput(t){this.childrenOutput=t}toDto(t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const e=this.currentStrategy.handle(this.currentElements,t);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto(t))).filter(ot)),e}}const Et=new class{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(t){this.hasDuplicateStrategy(t,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(t)}registerElementToNodeStrategy(t){this.hasDuplicateStrategy(t,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(t)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(t,e){return e.includes(t)}},ft=new class{process(t,e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),s=[];for(let r=0;r<t.length;r++){if(this.isInvalidElement(t[r],e))continue;let i=0;for(const o of n)if(i=o.canHandle(t,r,e),i>0){const n=t.slice(r,r+i),a=new gt(o,n);1===i&&o.shouldProceedToElementChildren()&&a.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(a),r+=i-1;break}if(0===i&&r<t.length){const n=Array.from(t[r].childNodes),i=this.process(Array.from(n),e);i.length>0&&s.push(...i)}}return s}isInvalidElement(t,e){return t.nodeType===Node.COMMENT_NODE||!1!==e.autoMatchFormat&&["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return Et.getElementToBlockStrategies()}};class kt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class Rt extends t{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[...t.childrenToBeInserted,t.referChildren])}replaceElementWithElements(t,e,n){t.children&&(n.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?n:t)))}}class Bt extends Rt{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class xt extends L{constructor(t,e){super(),this.type=y.IMAGE,this.size=t,this.alt=e}static from(t,e){return[y.IMAGE,new xt(t,e)]}static getDefaultStyles(){return{verticalAlign:"bottom"}}toJSON(){return ot(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new xt(this.size,this.alt)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e=xt.getDefaultStyles();switch(this.size){case"sm":return Object.assign(Object.assign({},e),{width:"25%"});case"md":return Object.assign(Object.assign({},e),{width:"50%"});case"lg":return Object.assign(Object.assign({},e),{width:"100%"})}}}xt.BASE_STYLES={verticalAlign:"bottom"};class RTEImageNode extends N{constructor(t,e,n,s){super(t,s),this.type=C.IMAGE,this.url=e,this.parent=n}static from(t,e,n={autoMatchFormat:!0}){const s=new RTEImageNode(t.id,t.url,e),r=!!n.autoMatchFormat,i=Object.assign({},t.annotations),{size:o}=i,a=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(i,["size"]),l=Object.assign(Object.assign({},a),{size:null!=o?o:r?"md":void 0});return s.annotationMap=new Map(Object.keys(l).map((t=>"size"===t||"alt"===t?xt.from(l.size,l.alt):this.createAnnotationEntity(t,l[t]))).filter(ot)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof xt||t instanceof A)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return""==t.alt&&delete t.alt,Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}clone(t){return new RTEImageNode(this.id,this.url,t,super.cloneAnnotations())}toHtml(t){const e=this.getAnnotationByType(y.IMAGE);return`<img${super.generateAttributeString(t,...[e&&e.alt?`alt="${e.alt}"`:null,`src="${this.url}"`,e&&e.size?`data-size="${e.size}"`:null].filter(ot))}>`}doAnnotationActionApply(t){const e=r.get(H.name,RTEImageNode.name);e&&e.execute(t,this)}doModifyActionApply(t){r.executeTheStrategy(t,this)}}r.register(c.UPDATE_IMAGE_NODE_URL,RTEImageNode.name,new class extends t{handleAction(t,e){e.url=t.url}}),r.register(H.name,RTEImageNode.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}});class It extends v{constructor(t,e){super(),this.type=c.INSERT_NEW_PARAGRAPH,this.startContainerNode=t,this.startOffset=e}}class RTEImageBlock extends R{constructor(t){super(t),this.type="image",this.children=[]}static from(t,e={autoMatchFormat:!0}){const n=new RTEImageBlock(t.id),{annotations:s}=t;return n.children=t.nodes.map((t=>RTEImageNode.from(t,n,e))),s&&super.convertAnnotationsToMap(n.annotationMap,s),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=super.generateAttributeString(t),n=this.children.map((e=>e.toHtml(t))).join("");return super.shouldRenderAsInternalWrapper()?n:[`<div${e}>`,n,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.url.length>0))}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new RTEImageBlock(it())}clone(t){const e=new RTEImageBlock(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}r.register(c.MERGE_TWO_BLOCKS_NODES,RTEImageBlock.name,new w),r.register(c.REPLACE_CHILD_NODES,RTEImageBlock.name,new m),r.register(c.SPLIT_BLOCK_WITH_NODE,RTEImageBlock.name,new class extends t{handleAction(t,e){t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode,e)}splitImageNodes(t,e,n){const s=n.children.indexOf(t);if(s>-1){const t=n.children.slice(0,s+e),r=n.children.slice(s+e);n.apply(new j(t));const i=this.cloneWithNodes(r,n);return n.parent.apply(new T(n,i)),i}}cloneWithNodes(t,e){const n=e.createNewImageBlock();return n.children=[],n.apply(new s(t)),n}}),r.register(c.LINE_BREAK_SINGLE_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=new It(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,RTEImageBlock.name,new class extends t{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,r){const i=e.from({id:it(),type:"paragraph",nodes:[{id:it(),type:"text",text:"\n"}]});r.parent.apply(new T(r,i));const o=this.concatBlocksNodes(t.slice(1));return(0===o.length||o[0]&&""===o[0].text)&&o.push(new n(it(),"\n",i)),i.apply(new s(o)),i.children[0]}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new p(t)))})),e}}),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=t.splitPointNode,r=t.startOffsetOfNode,i=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(i.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new T(e,i)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new E(e,i)):(e.apply(new S(n,r)),e.parent.apply(new T(e,i)))}}),r.register(a.name,RTEImageBlock.name,new l);class RTEHtmlBlock extends R{constructor(t,e){super(t),this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new RTEHtmlBlock(t.id,t.htmlTag),{annotations:s}=t;return s&&super.convertAnnotationsToMap(n.annotationMap,s),n.children=this.generateBlockChildren(t.children,e,n),n}clone(t){const e=new RTEHtmlBlock(this.id,this.htmlTag);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return!0}toHtml(t){const e=this.htmlTag,n=super.generateAttributeString(t);return $.has(this.htmlTag)?`<${e}${n}>`:[`<${e}${n}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}class bt extends v{constructor(t){super(),this.type=c.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class Ot extends D{handleAction(t,e){const{startContainerNode:n}=t;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(t,e):this.deleteDecoratorNodeContent(t,e);const s=e.parent;s&&e.isListItemBlock()&&0===s.children.length&&s.parent.apply(new p(s))}deleteTextNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;if(0!==s&&!n.isEmpty()){const r=n.text.slice(0,s-1)+n.text.slice(s);if(n.apply(new M(r)),r)return void(t.previousNode=n);{const s=this.getPreviousNode(n);return s&&s.parent===e&&"\n"===s.text||1===e.children.length?void(t.previousNode=n):(e.apply(new p(n)),void(t.previousNode=s))}}{let s=this.getPreviousNode(n),r=null;const i=n.isEmpty();if(e.children.length&&s&&s.parent!==e)i&&e.apply(new p(n)),e.type===s.parent.type&&s.parent.apply(new bt(e));else if(this.isContentFirstNode(n)&&i&&(r=this.getNextNode(n)),i&&e.apply(new p(n)),s&&s.isTextNode()&&(s.isEmpty()||!s.isContentEditable()&&s.parent===e)){const t=s;s=this.getPreviousNode(s),t.parent.apply(new p(t)),s||i||(r=n)}0===e.children.length&&e.parent.apply(new p(e)),s?t.previousNode=s:r&&(t.nextNode=r)}}deleteDecoratorNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;let r=this.getPreviousNode(n),i=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(i=this.getNextNode(n)),1===t.children.length?t.parent.apply(new p(t)):t.apply(new p(n))}else{const e=r;e&&!e.isContentEditable()&&(r=this.getPreviousNode(e),e.parent.apply(new p(e)),r||(t.nextNode=n))}r?t.previousNode=r:i&&(t.nextNode=i)}}class Lt extends t{handleAction(t,e){const{startContainerNode:n}=t;t.newBlock=this.breakSingleBlock(n,t.startOffset,e)}breakSingleBlock(t,e,n){const s=this.getNewParagraph(t);if(s){if(this.isCaretPositionAtBlockEnd(n,t,e))n.parent.apply(new T(n,s));else{if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new S(t,e);return n.apply(s),s.newBlock}n.parent.apply(new E(n,s))}return s}}getNewParagraph(t){const e=this.createNewParagraph("");if(e){let n=e.children[0];return t.isTextNode()&&t.isContentEditable()&&(e.children=[],n=t.cloneWithText(""),n.annotationMap.delete(y.LINK),e.apply(new s([n]))),e}}}class yt extends v{constructor(t,e,n=!1){super(),this.isFlushable=!0,this.type=c.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=t,this.offset=e,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class Nt extends t{handleAction(t,e){const{rteRange:n,nodeToBeInserted:s}=t,{startNode:r,startOffset:i}=n;if(r){const t=e;if(r.isContentEditable()&&r.isTextNode())if("\n"!==r.text&&r.text&&0!==i){const e=r.text.substring(0,i),n=r.text.substring(i),o=r.cloneWithText(e),a=r.cloneWithText(n),l=[o,s];n&&l.push(a),t.apply(new E(r,...l)),t.apply(new p(r))}else t.apply(new E(r,s));else t.apply(0!==i?new T(r,s):new E(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new yt(t))}}class Ct extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,i=this.createNewParagraph(n);if(i){const t=i.children[0];e.apply(0!==s?new T(r,t):new E(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new yt(t))}}class At extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),i=this.copyInlineStyleToNewNode(t);if(r.apply(new s([i])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new S(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new E(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],i=1===n.children.length&&n.children[0].isEmpty();if(n===r&&i){const r=n.parent.parent;if("list-item"!==r.type){const i=e.from({id:it(),type:"paragraph",nodes:[]});return i.apply(new s(t.children)),r.apply(new T(n.parent,i)),n.parent.apply(new p(n)),i}r.parent.apply(new T(r,t)),n.parent.apply(new p(n))}else n.parent.apply(new T(n,t));return t}copyInlineStyleToNewNode(t){const e=t.cloneWithText("");return e.annotationMap.delete(y.LINK),e}}class Ht extends v{constructor(t){super(),this.type=c.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class jt extends P{handleAction(t,e){super.handleAction(t,e);const n=e.parent;0===e.children.length&&n&&n.apply("list-item"===n.type?new Ht(e):new p(e))}}class vt extends t{handleAction(t,e){if(e.parent){const{blocksToBeInserted:n,startNode:s,startOffset:r}=t;let i=e;if(s===e.children[0]&&0===r)e.parent.apply(new E(e,...n));else{const t=new S(s,r);e.apply(t),e.parent.apply(new T(e,...n)),i=t.newBlock}t.futureFocusBlock=i}}}const St=new class{registerBlockBasicStrategies(t){r.register(c.DELETE_CHILDREN,t,t===RTEListBlock.name?new jt:new P),r.register(c.APPEND_CHILDREN,t,new kt),r.register(c.INSERT_CHILDREN_BEFORE,t,new Rt),r.register(c.INSERT_CHILDREN_AFTER,t,new Bt),r.register(c.DELETE_BLOCK_CONTENT,t,new Ot),r.register(c.INSERT_NEW_PARAGRAPH,t,t===RTEListItemBlock.name?new At:new Lt),r.register(c.INSERT_TEXT_TO_DECORATOR_NODE,t,new Ct),r.register(c.INSERT_NODE_TO_NEAREST_ROOT,t,new Nt),r.register(c.PASTE_CONTENT,t,new vt)}};class $t{}class Dt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isBold(t)||e.bold?{bold:!0}:{}}isBold(t){return"STRONG"===t.nodeName||"B"===t.nodeName||t.style.fontWeight===F||t.style.fontWeight===z||t.classList.contains("v-rte--bold")}}class Mt extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getAttributes(t);return Object.keys(e).length>0?{customAttribute:e}:{}}getAttributes(t){return t.getAttributeNames().filter((t=>"style"!==t&&"class"!==t&&this.isValidAttr(t))).reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{})}isValidAttr(t){return/^[a-zA-Z_][\w-]*$/.test(t)}}class Pt extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getCustomClass(t);return e.length>0?{customClass:e}:{}}getCustomClass(t){return t.classList.toString().split(" ").filter((t=>!t.includes("v-rte")&&""!==t))}}class Ft extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=V(t);return Object.keys(e).length>0?{customStyle:e}:{}}}class zt extends $t{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getIndent(t);return e?{indent:e}:{}}getIndent(t){const e=t.style;let n;if(e.marginLeft)n=e.marginLeft;else{if(!e.margin)return null;{const t=e.margin.split(" ");switch(t.length){case 4:n=t[3];break;case 2:case 3:n=t[1];break;default:n=t[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}}class Vt extends $t{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getTextAlign(t);return e?{textAlign:e}:{}}getTextAlign(t){const e=t.classList;if(e.contains("v-rte--horizontal-alignment-left"))return"left";if(e.contains("v-rte--horizontal-alignment-center"))return"center";if(e.contains("v-rte--horizontal-alignment-right"))return"right";if(e.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(t.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class Ut extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isCode(t)||e.code?{code:!0}:{}}isCode(t){return t.classList.contains("v-rte--code")||"CODE"===t.nodeName||"PRE"===t.nodeName||"monospace"===t.style.fontFamily||"Roboto Mono"===t.style.fontFamily.replace(/["']/g,"")}}class Wt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){const n=this.getColor(t)||e.textColor;return n?{textColor:n}:{}}getColor(t){var e;const n=null===(e=ut(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=U.filter((t=>t.key!==W.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of U)if(t.style.color.includes(e.key))return e.key;return null}}class Gt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||t.style.fontStyle===G||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class Jt extends $t{canHandle(t,e){return!!e.autoMatchFormat&&"RTETextBlock"===t.name}handle(t){const e=this.getTextStyle(t);return e?{textStyle:e}:{}}getTextStyle(t){const e=this.getElementTypeByDataType(t);if(e)return e;const n=this.getElementTypeByNodeName(t);if(n)return n;const s=this.getElementTypeByFontSize(t);if(s)return s;return this.getElementTypeByClassName(t)||null}getElementTypeByDataType(t){return t.nodeType!==Node.TEXT_NODE&&t.hasAttribute("data-type")?t.getAttribute("data-type"):null}getElementTypeByFontSize(t){var e;switch(null===(e=t.style)||void 0===e?void 0:e.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(t){switch(t.nodeName){case"P":return"paragraph";case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(t){if(t.className){const e=/\bv-rte-(?:-text-style-)?(title|subtitle|heading-1|heading-2|heading-3|heading-4|heading-5|heading-6|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class Kt{static isTitleOrSubtitle(t){if("DIV"===t.nodeName){const e=Kt.textStyleHandler.getTextStyle(t);return"title"===e||"subtitle"===e}return!1}static isLinkElement(t){return"A"===t.nodeName}}Kt.textStyleHandler=new Jt;class Yt extends $t{constructor(){super(...arguments),this.handlers=[new Mt,new Pt,new Ft]}canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return e.link?{link:e.link}:Kt.isLinkElement(t)?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:it()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class Xt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes(J)||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class Qt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes(K)||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class Zt extends $t{canHandle(t){return"RTEImageNode"===t.name}handle(t){const e=this.getImageSize(t);return e?{size:e}:{}}getImageSize(t){return t.getAttribute("data-size")?t.getAttribute("data-size"):null}}class _t extends $t{canHandle(t){return"RTEImageNode"===t.name}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}const qt=new Set(["P","H1","H2","H3","H4","H5","H6","LI"]),te=new Set(["P","H1","H2","H3","H4","H5","H6","LI","UL","OL","IMG","CODE"]),ee=new Set(["BR","VEGA-RICH-TEXT-LINK-EDITOR","CODE","A"]),ne=new Set(["TABLE","THEAD","TBODY","TFOOT","TR","DL"]),se=new Set(["ABBR","B","BDI","BDO","CITE","DEL","DFN","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SAMP","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR"]);function re(t){return qt.has(t.parentElement.nodeName)}class ie extends $t{constructor(){super(...arguments),this.customAttributeHandler=new Mt,this.customStyleAnnotationHandler=new Ft,this.customClassAnnotationHandler=new Pt}canHandle(t,e){return"RTETextNode"===t.name&&!1===e.autoMatchFormat}handle(t,e){if(te.has(t.nodeName)&&!ee.has(t.nodeName))return{};const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));return n?{inlineHtml:n}:{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;const r=Array.from(t.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE));if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||r){const e=Object.assign(Object.assign({htmlTag:t.nodeName.toLowerCase()},r?{groupId:it()}:{}),{customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass});s=s?this.appendToInlineHtmlChain(s,e,t.parentNode):e}return s?Object.assign({},s):null}appendToInlineHtmlChain(t,e,n){return t.child&&n&&t.child.htmlTag===n.nodeName.toLowerCase()?Object.assign(Object.assign({},t),{child:this.appendToInlineHtmlChain(t.child,e,n)}):Object.assign(Object.assign({},t),{child:e})}}const oe=new class{constructor(){this.handlers=[new Vt,new zt,new Dt,new Gt,new Qt,new Xt,new Wt,new Yt,new Ut,new Zt,new _t,new Mt,new Pt,new Ft,new Jt,new ie]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){n&&n.filterInlineStyles&&Y.executeTheStrategyRefillAction(t.name,e);const s=Kt.isLinkElement(e)&&"RTETextNode"===t.name,r=this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof Yt)).filter((r=>e.nodeType!==Node.TEXT_NODE&&r.canHandle(t,{skipCustomAnnotations:n.skipCustomAnnotations||s,autoMatchFormat:n.autoMatchFormat}))).reduce(((t,s)=>{const r=s.handle(e,n.parentAnnotations);return Object.assign(Object.assign({},t),r)}),{});this.removeTextStyleDefaultsFromCustomStyle(r);const i=Y.getStrategies(t.name);for(const t of i)(n.autoMatchFormat||t.alwaysFilter)&&t.filterAnnotations(r);return r}removeTextStyleDefaultsFromCustomStyle(t){const e="textStyle"in t?t.textStyle:void 0,n=t.customStyle;if(!e||!n)return t;const s=X.getDefaultStyles(e);if(!s)return t;for(const t of Object.keys(s))n[t]===s[t]&&delete n[t];return 0===Object.keys(n).length&&delete t.customStyle,t}};class ae extends pt{constructor(){super(...arguments),this.annotationHandler=new Jt}generateChildNodes(t,e,s){const r=[],i=!(!s||!1!==s.autoMatchFormat),o=Object.assign({},e);return t.forEach((t=>{const a=Et.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let l=null;if(a&&(l=a.handle([t],s,o)),l)r.push(l);else if(dt(t)&&t.childNodes.length>0){const a=oe.generate(n,t,Object.assign({parentAnnotations:i?{inlineHtml:o.inlineHtml,link:o.link,code:o.code}:e},s));r.push(...this.generateChildNodes(Array.from(t.childNodes),a,s))}})),r}matchTextBlockType(t){var e;return null!==(e=this.annotationHandler.handle(t).textStyle)&&void 0!==e?e:"paragraph"}}class le extends ae{canHandle(t,e){return"PRE"!==t[e].tagName&&"CODE"!==t[e].tagName||!t[e].hasAttribute("data-language")?0:1}handle(t){const e=t[0];if(e){const t=e.textContent,n=e.dataset.language;return b.from({id:it(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class ce extends ae{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return RTEImageBlock.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:t.src,annotations:oe.generate(RTEImageNode,t,e)}],annotations:Object.assign(Object.assign({},oe.generate(RTEImageBlock,t.parentElement,e)),{internalWrapper:n})},e)}}class he extends pt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:it(),type:"text",text:t,annotations:e}}}class ue extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const{textAlign:e,customStyle:n}=t;return e&&n?(this.stylesToBeFiltered=_.getDefaultStyles(e),super.filterAnnotations(t)):t}}class de extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.type="paragraph",this.elementTagName="p"}filterAnnotations(t){return t}canFilter(t){return Z.isTextBlock(t.constructor.name)&&t.type===this.type}canRefill(t,e){const n=this.classNameToBeAdded?`.${this.classNameToBeAdded}`:this.elementTagName;return Z.isTextBlock(t)&&e.matches(n)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}class me extends de{constructor(t){super(),this.type="heading-1",this.elementTagName="h1",this.type=`heading-${t}`,this.elementTagName=`h${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class we extends de{constructor(t){super(),this.type="title",this.elementTagName="div",this.classNameToBeAdded="v-rte-title",this.type=t,this.classNameToBeAdded=`v-rte-${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class Te extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=Te.BOLD_STYLES,this.elementTagName="span",this.parentBlockTypes=["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title"],this.parentElementSelectors=["h1","h2","h3","h4","h5","h6",".v-rte-title"],this.toBeCheckedSelector=this.parentElementSelectors.join(",")}filterAnnotations(t){return t}canFilter(t){return Z.isTextNode(t.constructor.name)&&this.parentBlockIsHeadingOrTitle(t)}canRefill(t,e){return Z.isTextNode(t)&&"SPAN"===e.nodeName&&this.isHeadingOrTitleChild(e)}toCssText(){return`${this.parentElementSelectors.map((t=>`.${Te.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t}`)).join(",")} { ${this.convertStylesMapToCssText()} }`}parentBlockIsHeadingOrTitle(t){const e=t.parent;return!!e&&this.parentBlockTypes.includes(e.type)}isHeadingOrTitleChild(t){let e=t.parentElement;for(;e;){if(e.matches(this.toBeCheckedSelector))return!0;if(Te.NON_HEADING_TITLE_ELEMENT_TAGS.includes(e.tagName))return!1;e=e.parentElement}return!1}}Te.BOLD_STYLES={fontWeight:"700"},Te.NON_HEADING_TITLE_ELEMENT_TAGS=["TD","TH","TR","TABLE","THEAD","TBODY","DIV","BODY"];class pe extends me{constructor(t){super(t),this.classNameToBeAdded=`v-rte-h${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.constructor.name)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}class ge extends we{constructor(t){super(t),this.classNameToBeAdded=`v-rte-${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.constructor.name)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}tt.registerRTEDTOClass("paragraph",e),tt.registerRTEDTOClass("title",e),tt.registerRTEDTOClass("subtitle",e),tt.registerRTEDTOClass("heading-1",e),tt.registerRTEDTOClass("heading-2",e),tt.registerRTEDTOClass("heading-3",e),tt.registerRTEDTOClass("heading-4",e),tt.registerRTEDTOClass("heading-5",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("list-item",RTEListItemBlock),tt.registerRTEDTOClass("bullet-list",RTEListBlock),tt.registerRTEDTOClass("number-list",RTEListBlock),tt.registerRTEDTOClass("image",RTEImageBlock),tt.registerRTEDTOClass("code-block",b),tt.registerRTEDTOClass("html-block",RTEHtmlBlock),tt.registerRTEDTOClass("text",n),tt.registerRTEDTOClass("image",RTEImageNode),St.registerBlockBasicStrategies(e.name),St.registerBlockBasicStrategies(RTEListBlock.name),St.registerBlockBasicStrategies(RTEListItemBlock.name),St.registerBlockBasicStrategies(RTEImageBlock.name),St.registerBlockBasicStrategies(RTEHtmlBlock.name),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e,n){let s=0;for(let r=e;r<t.length&&this.isInlineCandidate(t[r],n);r++)s++;return s}handle(t,s){const r=t[0].parentElement,i=s&&s.autoMatchFormat,o=this.generateChildNodes(t,i?oe.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),a=i?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),l=!i&&!a;return e.from(Object.assign({id:it(),type:a||"paragraph",nodes:o},l?{annotations:{internalWrapper:l}}:{annotations:oe.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}isInlineCandidate(t,e){return t.nodeType===Node.TEXT_NODE||!!ee.has(t.nodeName)||!this.isDedicatedBlockTag(t.nodeName)&&(!(!1!==e.autoMatchFormat||!re(t))||this.isInlineLeafOrWrapper(t))}isDedicatedBlockTag(t){return te.has(t)&&!ee.has(t)}isInlineLeafOrWrapper(t){return 0===t.childNodes.length?se.has(t.nodeName):this.isTextOnlyElement(t)?se.has(t.nodeName)||ee.has(t.nodeName):this.hasOnlyInlineDescendants(t)}isTextOnlyElement(t){const e=Array.from(t.childNodes);return!e.some((t=>t.nodeType===Node.ELEMENT_NODE))&&e.some((t=>t.nodeType===Node.TEXT_NODE))}hasOnlyInlineDescendants(t){for(let e=0;e<t.children.length;e++){const n=t.children[e];if(this.isDedicatedBlockTag(n.nodeName))return!1;if(!n.hasChildNodes())return!1;if(!this.hasOnlyInlineDescendants(n))return!1}return!0}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){const n=t[e];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(t,e){const n=t[0].querySelector("img");return this.createRTEImageBlock(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===t[e].tagName?1:0}handle(t,e){const n=t[0],s=n.querySelector("img");if(ot(s))return RTEImageBlock.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:s.src,annotations:oe.generate(RTEImageNode,n,e)}],annotations:oe.generate(RTEImageBlock,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(t[e]))?1:0}handle(t,n){const s=this.generateChildNodes(Array.from(t[0].childNodes),{},n);return 0===s.length?null:e.from({id:it(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:oe.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){if(!["UL","OL"].includes(t[e].parentElement.nodeName)&&t.some((t=>"LI"===t.nodeName))){let n=0;for(let s=e;s<t.length&&"LI"===t[s].nodeName;s++)n++;return n}return"LI"===t[e].tagName?1:0}handle(t,e){const n=t[0];return["UL","OL"].includes(n.parentElement.nodeName)?RTEListItemBlock.from(this.generateListItemBlockDTO(n,e),e):this.generateWithListBlock(t,e)}appendChildBlocks(t,e){t.nestList=e.filter((t=>["bullet-list","number-list"].includes(t.type)))}shouldProceedToElementChildren(){return!0}generateWithListBlock(t,e){return RTEListBlock.from({id:it(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:it(),type:"list-item",annotations:oe.generate(RTEListItemBlock,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),oe.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,i=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),o=ot(s)&&["UL","OL"].includes(s.nodeName);return r&&!i&&o?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return RTEListItemBlock.from({id:it(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:it(),type:"number-list",blocks:[],annotations:oe.generate(RTEListBlock,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof RTEListItemBlock)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:it(),type:"bullet-list",blocks:[],annotations:oe.generate(RTEListBlock,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof RTEListItemBlock)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e,n){const s=t[e];return s.nodeType===Node.TEXT_NODE||this.isInlineTagWithoutBlockChildren(s,n)||te.has(s.nodeName)&&!this.shouldFallBackToHtmlBlock(s)||n.autoMatchFormat||!this.isCustomHtmlContainer(s)||Kt.isTitleOrSubtitle(s)?0:1}handle(t,e){return RTEHtmlBlock.from(this.generateHtmlBlock(t[0],e),e)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}isInlineTagWithoutBlockChildren(t,e){if(re(t))return!(0===t.childNodes.length&&""===t.textContent&&!ee.has(t.nodeName)&&!se.has(t.nodeName));const n=Array.from(t.childNodes);return!(n.some((t=>t.nodeType===Node.ELEMENT_NODE))||!n.some((t=>t.nodeType===Node.TEXT_NODE)))&&(!1!==e.autoMatchFormat||!ne.has(t.parentElement.nodeName)&&(se.has(t.nodeName)||ee.has(t.nodeName)))}shouldFallBackToHtmlBlock(t){const e=Array.from(t.childNodes);if(0===e.length)return!1;const n=t.parentElement.nodeName;return"UL"!==n&&"OL"!==n&&e.every((t=>t.nodeType===Node.ELEMENT_NODE&&""===t.textContent&&!ee.has(t.nodeName)&&!se.has(t.nodeName)))}isCustomHtmlContainer(t){return"DIV"!==t.nodeName||t.childNodes.length>0&&"IMG"!==t.childNodes[0].nodeName}generateHtmlBlock(t,e){return{id:it(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:oe.generate(RTEHtmlBlock,t,e),children:[]}}}),
1
+ import{g as t,e,c as n,h as s,A as r,T as i,q as o,H as a,r as l,l as c,t as h,u,v as d,w as m,x as w,I as T,n as p,S as g,j as E,B as f,y as k,d as R,z as B,D as x,o as I,E as b,s as O,N as L,F as y,G as N,J as C,K as A,m as H,L as j,M as v,O as S,P as $,Q as D,U as M,W as P,X as F,Y as z,Z as V,_ as U,$ as W,a0 as G,a1 as J,a2 as K,R as Y,a3 as X,p as Q,a4 as Z,a5 as _,a6 as q,b as tt,a7 as et,a8 as nt,a9 as st,aa as rt}from"./p-5ffdea8e.js";import{g as it}from"./p-8b5d3a52.js";import{i as ot}from"./p-b9386dd0.js";import{C as at}from"./p-2d0d575f.js";import{d as lt}from"./p-f28a6074.js";import{c as ct,d as ht}from"./p-aa985d73.js";import{r as ut,i as dt}from"./p-6e70d3cc.js";import{c as mt}from"./p-a841cf13.js";import{L as wt}from"./p-6e1ab235.js";class RTEListItemBlock extends e{constructor(t,e,n){super(t,"list-item",n),this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new RTEListItemBlock(t.id,void 0,e);s.children=t.nodes.map((t=>n.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const e=RTEListBlock.from(t);return e.parent=s,e})));const{annotations:r}=t;return r&&Object.entries(r).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);ot(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(t){return[`<li${super.generateAttributeString(t)}>`,this.getChildrenHtml(t),"</li>"].join("")}cloneWithNodes(t){const e=new RTEListItemBlock(it());return e.children=[],e.apply(new s(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new RTEListItemBlock(it())}clone(t){var e;const n=new RTEListItemBlock(this.id);return n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n.nestList=null===(e=this.nestList)||void 0===e?void 0:e.map((t=>t.clone(n))),n.parent=t,n}}r.register(i.name,RTEListItemBlock.name,new o),r.register(a.name,RTEListItemBlock.name,new l),r.register(c.LINE_BREAK_SINGLE_BLOCK,RTEListItemBlock.name,new h),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,RTEListItemBlock.name,new u),r.register(c.DELETE_NEST_LIST,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),r.register(c.SPLIT_BLOCK_WITH_NODE,RTEListItemBlock.name,new d),r.register(c.REPLACE_CHILD_NODES,RTEListItemBlock.name,new m),r.register(c.REPLACE_NEST_LIST,RTEListItemBlock.name,new class extends t{handleAction(t,e){t.newList.forEach((t=>{t.parent=e})),e.nestList=t.newList}}),r.register(c.MERGE_TWO_BLOCKS_NODES,RTEListItemBlock.name,new w),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEListItemBlock.name,new class extends t{handleAction(t,e){e.parent.apply(t)}});class Tt extends f{constructor(){super(...arguments),this.type=k.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}renderStyle(t){return(null==t?void 0:t.standalone)?Tt.getDefaultStyles():null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new Tt}toJSON(){}}class RTEListBlock extends R{constructor(t,e,n){super(t),this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&this.annotationMap.set(k.LIST,new Tt)}static from(t,e={autoMatchFormat:!0}){const n=new RTEListBlock(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);ot(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=RTEListItemBlock.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return I.from(e);case"customClass":return x.from(e);case"customStyle":return B.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag();return[`<${e}${super.generateAttributeString(t)}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(t){const e=new RTEListBlock(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getBlockTag(){return"number-list"===this.type?"ol":"ul"}}r.register(c.TRANSFORM_LIST_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,r=e.parent.createList(t.listType);if(n.every((t=>t.parent===e)))r.apply(new s(e.children)),e.parent.apply(new T(e,r)),e.parent.apply(new p(e)),n.forEach((t=>t.children.map((t=>t.apply(new g)))));else{const n=t.selectedBlocks.map((t=>e.parent.toListItem(t)));r.apply(new s(n)),e.parent.apply(new T(e,r)),t.selectedBlocks.forEach((t=>{t.parent.apply(new p(t))})),0===e.children.length&&e.parent.apply(new p(e))}}}),r.register(c.TRANSFORM_PARAGRAPH_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){let n=!1,r=!1;const i=t.selectedBlocks,o=i.map((t=>(t.children.map((t=>t.apply(new g))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new E(e,...o));else if(r)e.parent.apply(new T(e,...o));else{const t=e.children.indexOf(i[0]),n=e.children.indexOf(i[i.length-1]),r=e.parent.createList(e.type);r.apply(new s(e.children.slice(0,t)));const a=e.parent.createList(e.type);a.apply(new s(e.children.slice(n+1))),e.parent.apply(new E(e,r,...o,a)),e.parent.apply(new p(e))}i.map((t=>{e.apply(new p(t))})),0===e.children.length&&e.parent.apply(new p(e))}toParagraph(t){const n=new e(it(),"paragraph");return n.apply(new s(t.children)),n.annotationMap=t.annotationMap,n}}),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEListBlock.name,new class extends t{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new T(e,t.imageBlockToBeInserted):t)}});class pt{}class gt{constructor(t,e){this.childrenOutput=[],this.currentStrategy=t,this.currentElements=e}setChildrenOutput(t){this.childrenOutput=t}toDto(t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const e=this.currentStrategy.handle(this.currentElements,t);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto(t))).filter(ot)),e}}const Et=new class{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(t){this.hasDuplicateStrategy(t,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(t)}registerElementToNodeStrategy(t){this.hasDuplicateStrategy(t,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(t)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(t,e){return e.includes(t)}},ft=new class{process(t,e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),s=[];for(let r=0;r<t.length;r++){if(this.isInvalidElement(t[r],e))continue;let i=0;for(const o of n)if(i=o.canHandle(t,r,e),i>0){const n=t.slice(r,r+i),a=new gt(o,n);1===i&&o.shouldProceedToElementChildren()&&a.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(a),r+=i-1;break}if(0===i&&r<t.length){const n=Array.from(t[r].childNodes),i=this.process(Array.from(n),e);i.length>0&&s.push(...i)}}return s}isInvalidElement(t,e){return t.nodeType===Node.COMMENT_NODE||!1!==e.autoMatchFormat&&["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return Et.getElementToBlockStrategies()}};class kt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class Rt extends t{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[...t.childrenToBeInserted,t.referChildren])}replaceElementWithElements(t,e,n){t.children&&(n.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?n:t)))}}class Bt extends Rt{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class xt extends L{constructor(t,e){super(),this.type=y.IMAGE,this.size=t,this.alt=e}static from(t,e){return[y.IMAGE,new xt(t,e)]}static getDefaultStyles(){return{verticalAlign:"bottom"}}toJSON(){return ot(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new xt(this.size,this.alt)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e=xt.getDefaultStyles();switch(this.size){case"sm":return Object.assign(Object.assign({},e),{width:"25%"});case"md":return Object.assign(Object.assign({},e),{width:"50%"});case"lg":return Object.assign(Object.assign({},e),{width:"100%"})}}}xt.BASE_STYLES={verticalAlign:"bottom"};class RTEImageNode extends N{constructor(t,e,n,s){super(t,s),this.type=C.IMAGE,this.url=e,this.parent=n}static from(t,e,n={autoMatchFormat:!0}){const s=new RTEImageNode(t.id,t.url,e),r=!!n.autoMatchFormat,i=Object.assign({},t.annotations),{size:o}=i,a=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(i,["size"]),l=Object.assign(Object.assign({},a),{size:null!=o?o:r?"md":void 0});return s.annotationMap=new Map(Object.keys(l).map((t=>"size"===t||"alt"===t?xt.from(l.size,l.alt):this.createAnnotationEntity(t,l[t]))).filter(ot)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof xt||t instanceof A)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return""==t.alt&&delete t.alt,Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}clone(t){return new RTEImageNode(this.id,this.url,t,super.cloneAnnotations())}toHtml(t){const e=this.getAnnotationByType(y.IMAGE);return`<img${super.generateAttributeString(t,...[e&&e.alt?`alt="${e.alt}"`:null,`src="${this.url}"`,e&&e.size?`data-size="${e.size}"`:null].filter(ot))}>`}doAnnotationActionApply(t){const e=r.get(H.name,RTEImageNode.name);e&&e.execute(t,this)}doModifyActionApply(t){r.executeTheStrategy(t,this)}}r.register(c.UPDATE_IMAGE_NODE_URL,RTEImageNode.name,new class extends t{handleAction(t,e){e.url=t.url}}),r.register(H.name,RTEImageNode.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}});class It extends v{constructor(t,e){super(),this.type=c.INSERT_NEW_PARAGRAPH,this.startContainerNode=t,this.startOffset=e}}class RTEImageBlock extends R{constructor(t){super(t),this.type="image",this.children=[]}static from(t,e={autoMatchFormat:!0}){const n=new RTEImageBlock(t.id),{annotations:s}=t;return n.children=t.nodes.map((t=>RTEImageNode.from(t,n,e))),s&&super.convertAnnotationsToMap(n.annotationMap,s),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=super.generateAttributeString(t),n=this.children.map((e=>e.toHtml(t))).join("");return super.shouldRenderAsInternalWrapper()?n:[`<div${e}>`,n,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.url.length>0))}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new RTEImageBlock(it())}clone(t){const e=new RTEImageBlock(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}r.register(c.MERGE_TWO_BLOCKS_NODES,RTEImageBlock.name,new w),r.register(c.REPLACE_CHILD_NODES,RTEImageBlock.name,new m),r.register(c.SPLIT_BLOCK_WITH_NODE,RTEImageBlock.name,new class extends t{handleAction(t,e){t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode,e)}splitImageNodes(t,e,n){const s=n.children.indexOf(t);if(s>-1){const t=n.children.slice(0,s+e),r=n.children.slice(s+e);n.apply(new j(t));const i=this.cloneWithNodes(r,n);return n.parent.apply(new T(n,i)),i}}cloneWithNodes(t,e){const n=e.createNewImageBlock();return n.children=[],n.apply(new s(t)),n}}),r.register(c.LINE_BREAK_SINGLE_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=new It(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,RTEImageBlock.name,new class extends t{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,r){const i=e.from({id:it(),type:"paragraph",nodes:[{id:it(),type:"text",text:"\n"}]});r.parent.apply(new T(r,i));const o=this.concatBlocksNodes(t.slice(1));return(0===o.length||o[0]&&""===o[0].text)&&o.push(new n(it(),"\n",i)),i.apply(new s(o)),i.children[0]}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new p(t)))})),e}}),r.register(c.INSERT_IMAGE_TO_BLOCK,RTEImageBlock.name,new class extends t{handleAction(t,e){const n=t.splitPointNode,r=t.startOffsetOfNode,i=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(i.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new T(e,i)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new E(e,i)):(e.apply(new S(n,r)),e.parent.apply(new T(e,i)))}}),r.register(a.name,RTEImageBlock.name,new l);class RTEHtmlBlock extends R{constructor(t,e){super(t),this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new RTEHtmlBlock(t.id,t.htmlTag),{annotations:s}=t;return s&&super.convertAnnotationsToMap(n.annotationMap,s),n.children=this.generateBlockChildren(t.children,e,n),n}clone(t){const e=new RTEHtmlBlock(this.id,this.htmlTag);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return!0}toHtml(t){const e=this.htmlTag,n=super.generateAttributeString(t);return $.has(this.htmlTag)?`<${e}${n}>`:[`<${e}${n}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}class bt extends v{constructor(t){super(),this.type=c.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class Ot extends D{handleAction(t,e){const{startContainerNode:n}=t;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(t,e):this.deleteDecoratorNodeContent(t,e);const s=e.parent;s&&e.isListItemBlock()&&0===s.children.length&&s.parent.apply(new p(s))}deleteTextNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;if(0!==s&&!n.isEmpty()){const r=n.text.slice(0,s-1)+n.text.slice(s);if(n.apply(new M(r)),r)return void(t.previousNode=n);{const s=this.getPreviousNode(n);return s&&s.parent===e&&"\n"===s.text||1===e.children.length?void(t.previousNode=n):(e.apply(new p(n)),void(t.previousNode=s))}}{let s=this.getPreviousNode(n),r=null;const i=n.isEmpty();if(e.children.length&&s&&s.parent!==e)i&&e.apply(new p(n)),e.type===s.parent.type&&s.parent.apply(new bt(e));else if(this.isContentFirstNode(n)&&i&&(r=this.getNextNode(n)),i&&e.apply(new p(n)),s&&s.isTextNode()&&(s.isEmpty()||!s.isContentEditable()&&s.parent===e)){const t=s;s=this.getPreviousNode(s),t.parent.apply(new p(t)),s||i||(r=n)}0===e.children.length&&e.parent.apply(new p(e)),s?t.previousNode=s:r&&(t.nextNode=r)}}deleteDecoratorNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;let r=this.getPreviousNode(n),i=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(i=this.getNextNode(n)),1===t.children.length?t.parent.apply(new p(t)):t.apply(new p(n))}else{const e=r;e&&!e.isContentEditable()&&(r=this.getPreviousNode(e),e.parent.apply(new p(e)),r||(t.nextNode=n))}r?t.previousNode=r:i&&(t.nextNode=i)}}class Lt extends t{handleAction(t,e){const{startContainerNode:n}=t;t.newBlock=this.breakSingleBlock(n,t.startOffset,e)}breakSingleBlock(t,e,n){const s=this.getNewParagraph(t);if(s){if(this.isCaretPositionAtBlockEnd(n,t,e))n.parent.apply(new T(n,s));else{if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new S(t,e);return n.apply(s),s.newBlock}n.parent.apply(new E(n,s))}return s}}getNewParagraph(t){const e=this.createNewParagraph("");if(e){let n=e.children[0];return t.isTextNode()&&t.isContentEditable()&&(e.children=[],n=t.cloneWithText(""),n.annotationMap.delete(y.LINK),e.apply(new s([n]))),e}}}class yt extends v{constructor(t,e,n=!1){super(),this.isFlushable=!0,this.type=c.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=t,this.offset=e,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class Nt extends t{handleAction(t,e){const{rteRange:n,nodeToBeInserted:s}=t,{startNode:r,startOffset:i}=n;if(r){const t=e;if(r.isContentEditable()&&r.isTextNode())if("\n"!==r.text&&r.text&&0!==i){const e=r.text.substring(0,i),n=r.text.substring(i),o=r.cloneWithText(e),a=r.cloneWithText(n),l=[o,s];n&&l.push(a),t.apply(new E(r,...l)),t.apply(new p(r))}else t.apply(new E(r,s));else t.apply(0!==i?new T(r,s):new E(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new yt(t))}}class Ct extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,i=this.createNewParagraph(n);if(i){const t=i.children[0];e.apply(0!==s?new T(r,t):new E(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new yt(t))}}class At extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),i=this.copyInlineStyleToNewNode(t);if(r.apply(new s([i])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new S(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new E(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],i=1===n.children.length&&n.children[0].isEmpty();if(n===r&&i){const r=n.parent.parent;if("list-item"!==r.type){const i=e.from({id:it(),type:"paragraph",nodes:[]});return i.apply(new s(t.children)),r.apply(new T(n.parent,i)),n.parent.apply(new p(n)),i}r.parent.apply(new T(r,t)),n.parent.apply(new p(n))}else n.parent.apply(new T(n,t));return t}copyInlineStyleToNewNode(t){const e=t.cloneWithText("");return e.annotationMap.delete(y.LINK),e}}class Ht extends v{constructor(t){super(),this.type=c.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class jt extends P{handleAction(t,e){super.handleAction(t,e);const n=e.parent;0===e.children.length&&n&&n.apply("list-item"===n.type?new Ht(e):new p(e))}}class vt extends t{handleAction(t,e){if(e.parent){const{blocksToBeInserted:n,startNode:s,startOffset:r}=t;let i=e;if(s===e.children[0]&&0===r)e.parent.apply(new E(e,...n));else{const t=new S(s,r);e.apply(t),e.parent.apply(new T(e,...n)),i=t.newBlock}t.futureFocusBlock=i}}}const St=new class{registerBlockBasicStrategies(t){r.register(c.DELETE_CHILDREN,t,t===RTEListBlock.name?new jt:new P),r.register(c.APPEND_CHILDREN,t,new kt),r.register(c.INSERT_CHILDREN_BEFORE,t,new Rt),r.register(c.INSERT_CHILDREN_AFTER,t,new Bt),r.register(c.DELETE_BLOCK_CONTENT,t,new Ot),r.register(c.INSERT_NEW_PARAGRAPH,t,t===RTEListItemBlock.name?new At:new Lt),r.register(c.INSERT_TEXT_TO_DECORATOR_NODE,t,new Ct),r.register(c.INSERT_NODE_TO_NEAREST_ROOT,t,new Nt),r.register(c.PASTE_CONTENT,t,new vt)}};class $t{}class Dt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isBold(t)||e.bold?{bold:!0}:{}}isBold(t){return"STRONG"===t.nodeName||"B"===t.nodeName||t.style.fontWeight===F||t.style.fontWeight===z||t.classList.contains("v-rte--bold")}}class Mt extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getAttributes(t);return Object.keys(e).length>0?{customAttribute:e}:{}}getAttributes(t){return t.getAttributeNames().filter((t=>"style"!==t&&"class"!==t&&this.isValidAttr(t))).reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{})}isValidAttr(t){return/^[a-zA-Z_][\w-]*$/.test(t)}}class Pt extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getCustomClass(t);return e.length>0?{customClass:e}:{}}getCustomClass(t){return t.classList.toString().split(" ").filter((t=>!t.includes("v-rte")&&""!==t))}}class Ft extends $t{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=V(t);return Object.keys(e).length>0?{customStyle:e}:{}}}class zt extends $t{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getIndent(t);return e?{indent:e}:{}}getIndent(t){const e=t.style;let n;if(e.marginLeft)n=e.marginLeft;else{if(!e.margin)return null;{const t=e.margin.split(" ");switch(t.length){case 4:n=t[3];break;case 2:case 3:n=t[1];break;default:n=t[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}}class Vt extends $t{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getTextAlign(t);return e?{textAlign:e}:{}}getTextAlign(t){const e=t.classList;if(e.contains("v-rte--horizontal-alignment-left"))return"left";if(e.contains("v-rte--horizontal-alignment-center"))return"center";if(e.contains("v-rte--horizontal-alignment-right"))return"right";if(e.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(t.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class Ut extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isCode(t)||e.code?{code:!0}:{}}isCode(t){return t.classList.contains("v-rte--code")||"CODE"===t.nodeName||"PRE"===t.nodeName||"monospace"===t.style.fontFamily||"Roboto Mono"===t.style.fontFamily.replace(/["']/g,"")}}class Wt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){const n=this.getColor(t)||e.textColor;return n?{textColor:n}:{}}getColor(t){var e;const n=null===(e=ut(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=U.filter((t=>t.key!==W.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of U)if(t.style.color.includes(e.key))return e.key;return null}}class Gt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||t.style.fontStyle===G||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class Jt extends $t{canHandle(t,e){return!!e.autoMatchFormat&&"RTETextBlock"===t.name}handle(t){const e=this.getTextStyle(t);return e?{textStyle:e}:{}}getTextStyle(t){const e=this.getElementTypeByDataType(t);if(e)return e;const n=this.getElementTypeByNodeName(t);if(n)return n;const s=this.getElementTypeByFontSize(t);if(s)return s;return this.getElementTypeByClassName(t)||null}getElementTypeByDataType(t){return t.nodeType!==Node.TEXT_NODE&&t.hasAttribute("data-type")?t.getAttribute("data-type"):null}getElementTypeByFontSize(t){var e;switch(null===(e=t.style)||void 0===e?void 0:e.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(t){switch(t.nodeName){case"P":return"paragraph";case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(t){if(t.className){const e=/\bv-rte-(?:-text-style-)?(title|subtitle|heading-1|heading-2|heading-3|heading-4|heading-5|heading-6|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class Kt{static isTitleOrSubtitle(t){if("DIV"===t.nodeName){const e=Kt.textStyleHandler.getTextStyle(t);return"title"===e||"subtitle"===e}return!1}static isLinkElement(t){return"A"===t.nodeName}}Kt.textStyleHandler=new Jt;class Yt extends $t{constructor(){super(...arguments),this.handlers=[new Mt,new Pt,new Ft]}canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return e.link?{link:e.link}:Kt.isLinkElement(t)?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:it()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class Xt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes(J)||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class Qt extends $t{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes(K)||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class Zt extends $t{canHandle(t){return"RTEImageNode"===t.name}handle(t){const e=this.getImageSize(t);return e?{size:e}:{}}getImageSize(t){return t.getAttribute("data-size")?t.getAttribute("data-size"):null}}class _t extends $t{canHandle(t){return"RTEImageNode"===t.name}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}const qt=new Set(["P","H1","H2","H3","H4","H5","H6","LI"]),te=new Set(["P","H1","H2","H3","H4","H5","H6","LI","UL","OL","IMG","CODE"]),ee=new Set(["BR","VEGA-RICH-TEXT-LINK-EDITOR","CODE","A"]),ne=new Set(["TABLE","THEAD","TBODY","TFOOT","TR","DL"]),se=new Set(["ABBR","B","BDI","BDO","CITE","DEL","DFN","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SAMP","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR"]);function re(t){return qt.has(t.parentElement.nodeName)}class ie extends $t{constructor(){super(...arguments),this.customAttributeHandler=new Mt,this.customStyleAnnotationHandler=new Ft,this.customClassAnnotationHandler=new Pt}canHandle(t,e){return"RTETextNode"===t.name&&!1===e.autoMatchFormat}handle(t,e){if(te.has(t.nodeName)&&!ee.has(t.nodeName))return{};const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));return n?{inlineHtml:n}:{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;const r=Array.from(t.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE));if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||r){const e=Object.assign(Object.assign({htmlTag:t.nodeName.toLowerCase()},r?{groupId:it()}:{}),{customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass});s=s?this.appendToInlineHtmlChain(s,e,t.parentNode):e}return s?Object.assign({},s):null}appendToInlineHtmlChain(t,e,n){return t.child&&n&&t.child.htmlTag===n.nodeName.toLowerCase()?Object.assign(Object.assign({},t),{child:this.appendToInlineHtmlChain(t.child,e,n)}):Object.assign(Object.assign({},t),{child:e})}}const oe=new class{constructor(){this.handlers=[new Vt,new zt,new Dt,new Gt,new Qt,new Xt,new Wt,new Yt,new Ut,new Zt,new _t,new Mt,new Pt,new Ft,new Jt,new ie]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){n&&n.filterInlineStyles&&Y.executeTheStrategyRefillAction(t.name,e);const s=Kt.isLinkElement(e)&&"RTETextNode"===t.name,r=this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof Yt)).filter((r=>e.nodeType!==Node.TEXT_NODE&&r.canHandle(t,{skipCustomAnnotations:n.skipCustomAnnotations||s,autoMatchFormat:n.autoMatchFormat}))).reduce(((t,s)=>{const r=s.handle(e,n.parentAnnotations);return Object.assign(Object.assign({},t),r)}),{});this.removeTextStyleDefaultsFromCustomStyle(r);const i=Y.getStrategies(t.name);for(const t of i)(n.autoMatchFormat||t.alwaysFilter)&&t.filterAnnotations(r);return r}removeTextStyleDefaultsFromCustomStyle(t){const e="textStyle"in t?t.textStyle:void 0,n=t.customStyle;if(!e||!n)return t;const s=X.getDefaultStyles(e);if(!s)return t;for(const t of Object.keys(s))n[t]===s[t]&&delete n[t];return 0===Object.keys(n).length&&delete t.customStyle,t}};class ae extends pt{constructor(){super(...arguments),this.annotationHandler=new Jt}generateChildNodes(t,e,s){const r=[],i=!(!s||!1!==s.autoMatchFormat),o=Object.assign({},e);return t.forEach((t=>{const a=Et.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let l=null;if(a&&(l=a.handle([t],s,o)),l)r.push(l);else if(dt(t)&&t.childNodes.length>0){const a=oe.generate(n,t,Object.assign({parentAnnotations:i?{inlineHtml:o.inlineHtml,link:o.link,code:o.code}:e},s));r.push(...this.generateChildNodes(Array.from(t.childNodes),a,s))}})),r}matchTextBlockType(t){var e;return null!==(e=this.annotationHandler.handle(t).textStyle)&&void 0!==e?e:"paragraph"}}class le extends ae{canHandle(t,e){return"PRE"!==t[e].tagName&&"CODE"!==t[e].tagName||!t[e].hasAttribute("data-language")?0:1}handle(t){const e=t[0];if(e){const t=e.textContent,n=e.dataset.language;return b.from({id:it(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class ce extends ae{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return RTEImageBlock.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:t.src,annotations:oe.generate(RTEImageNode,t,e)}],annotations:Object.assign(Object.assign({},oe.generate(RTEImageBlock,t.parentElement,e)),{internalWrapper:n})},e)}}class he extends pt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:it(),type:"text",text:t,annotations:e}}}class ue extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const{textAlign:e,customStyle:n}=t;return e&&n?(this.stylesToBeFiltered=_.getDefaultStyles(e),super.filterAnnotations(t)):t}}class de extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.type="paragraph",this.elementTagName="p"}filterAnnotations(t){return t}canFilter(t){return Z.isTextBlock(t.constructor.name)&&t.type===this.type}canRefill(t,e){const n=this.classNameToBeAdded?`.${this.classNameToBeAdded}`:this.elementTagName;return Z.isTextBlock(t)&&e.matches(n)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}class me extends de{constructor(t){super(),this.type="heading-1",this.elementTagName="h1",this.type=`heading-${t}`,this.elementTagName=`h${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class we extends de{constructor(t){super(),this.type="title",this.elementTagName="div",this.classNameToBeAdded="v-rte-title",this.type=t,this.classNameToBeAdded=`v-rte-${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class Te extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=Te.BOLD_STYLES,this.elementTagName="span",this.parentBlockTypes=["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title"],this.parentElementSelectors=["h1","h2","h3","h4","h5","h6",".v-rte-title"],this.toBeCheckedSelector=this.parentElementSelectors.join(",")}filterAnnotations(t){return t}canFilter(t){return Z.isTextNode(t.constructor.name)&&this.parentBlockIsHeadingOrTitle(t)}canRefill(t,e){return Z.isTextNode(t)&&"SPAN"===e.nodeName&&this.isHeadingOrTitleChild(e)}toCssText(){return`${this.parentElementSelectors.map((t=>`.${Te.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t}`)).join(",")} { ${this.convertStylesMapToCssText()} }`}parentBlockIsHeadingOrTitle(t){const e=t.parent;return!!e&&this.parentBlockTypes.includes(e.type)}isHeadingOrTitleChild(t){let e=t.parentElement;for(;e;){if(e.matches(this.toBeCheckedSelector))return!0;if(Te.NON_HEADING_TITLE_ELEMENT_TAGS.includes(e.tagName))return!1;e=e.parentElement}return!1}}Te.BOLD_STYLES={fontWeight:"700"},Te.NON_HEADING_TITLE_ELEMENT_TAGS=["TD","TH","TR","TABLE","THEAD","TBODY","DIV","BODY"];class pe extends me{constructor(t){super(t),this.classNameToBeAdded=`v-rte-h${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.constructor.name)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}class ge extends we{constructor(t){super(t),this.classNameToBeAdded=`v-rte-${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.constructor.name)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}tt.registerRTEDTOClass("paragraph",e),tt.registerRTEDTOClass("title",e),tt.registerRTEDTOClass("subtitle",e),tt.registerRTEDTOClass("heading-1",e),tt.registerRTEDTOClass("heading-2",e),tt.registerRTEDTOClass("heading-3",e),tt.registerRTEDTOClass("heading-4",e),tt.registerRTEDTOClass("heading-5",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("list-item",RTEListItemBlock),tt.registerRTEDTOClass("bullet-list",RTEListBlock),tt.registerRTEDTOClass("number-list",RTEListBlock),tt.registerRTEDTOClass("image",RTEImageBlock),tt.registerRTEDTOClass("code-block",b),tt.registerRTEDTOClass("html-block",RTEHtmlBlock),tt.registerRTEDTOClass("text",n),tt.registerRTEDTOClass("image",RTEImageNode),St.registerBlockBasicStrategies(e.name),St.registerBlockBasicStrategies(RTEListBlock.name),St.registerBlockBasicStrategies(RTEListItemBlock.name),St.registerBlockBasicStrategies(RTEImageBlock.name),St.registerBlockBasicStrategies(RTEHtmlBlock.name),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e,n){let s=0;for(let r=e;r<t.length&&this.isInlineCandidate(t[r],n);r++)s++;return s}handle(t,s){const r=t[0].parentElement,i=s&&s.autoMatchFormat,o=this.generateChildNodes(t,i?oe.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),a=i?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),l=!i&&!a;return e.from(Object.assign({id:it(),type:a||"paragraph",nodes:o},l?{annotations:{internalWrapper:l}}:{annotations:oe.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}isInlineCandidate(t,e){return t.nodeType===Node.TEXT_NODE||!!ee.has(t.nodeName)||!this.isDedicatedBlockTag(t.nodeName)&&(!(!1!==e.autoMatchFormat||!re(t))||this.isInlineLeafOrWrapper(t))}isDedicatedBlockTag(t){return te.has(t)&&!ee.has(t)}isInlineLeafOrWrapper(t){return 0===t.childNodes.length?se.has(t.nodeName):this.isTextOnlyElement(t)?se.has(t.nodeName)||ee.has(t.nodeName):this.hasOnlyInlineDescendants(t)}isTextOnlyElement(t){const e=Array.from(t.childNodes);return!e.some((t=>t.nodeType===Node.ELEMENT_NODE))&&e.some((t=>t.nodeType===Node.TEXT_NODE))}hasOnlyInlineDescendants(t){for(let e=0;e<t.children.length;e++){const n=t.children[e];if(this.isDedicatedBlockTag(n.nodeName))return!1;if(!n.hasChildNodes())return!1;if(!this.hasOnlyInlineDescendants(n))return!1}return!0}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){const n=t[e];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(t,e){const n=t[0].querySelector("img");return this.createRTEImageBlock(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===t[e].tagName?1:0}handle(t,e){const n=t[0],s=n.querySelector("img");if(ot(s))return RTEImageBlock.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:s.src,annotations:oe.generate(RTEImageNode,n,e)}],annotations:oe.generate(RTEImageBlock,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ce{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(t[e]))?1:0}handle(t,n){const s=this.generateChildNodes(Array.from(t[0].childNodes),{},n);return 0===s.length?null:e.from({id:it(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:oe.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){if(!["UL","OL"].includes(t[e].parentElement.nodeName)&&t.some((t=>"LI"===t.nodeName))){let n=0;for(let s=e;s<t.length&&"LI"===t[s].nodeName;s++)n++;return n}return"LI"===t[e].tagName?1:0}handle(t,e){const n=t[0];return["UL","OL"].includes(n.parentElement.nodeName)?RTEListItemBlock.from(this.generateListItemBlockDTO(n,e),e):this.generateWithListBlock(t,e)}appendChildBlocks(t,e){t.nestList=e.filter((t=>["bullet-list","number-list"].includes(t.type)))}shouldProceedToElementChildren(){return!0}generateWithListBlock(t,e){return RTEListBlock.from({id:it(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:it(),type:"list-item",annotations:oe.generate(RTEListItemBlock,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),oe.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,i=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),o=ot(s)&&["UL","OL"].includes(s.nodeName);return r&&!i&&o?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return RTEListItemBlock.from({id:it(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:it(),type:"number-list",blocks:[],annotations:oe.generate(RTEListBlock,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof RTEListItemBlock)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:it(),type:"bullet-list",blocks:[],annotations:oe.generate(RTEListBlock,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof RTEListItemBlock)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),Et.registerElementToBlockStrategy(new class extends ae{canHandle(t,e,n){const s=t[e];return s.nodeType===Node.TEXT_NODE||this.isInlineTagWithoutBlockChildren(s,n)||te.has(s.nodeName)&&!this.shouldFallBackToHtmlBlock(s)||n.autoMatchFormat||!this.isCustomHtmlContainer(s)||Kt.isTitleOrSubtitle(s)?0:1}handle(t,e){return RTEHtmlBlock.from(this.generateHtmlBlock(t[0],e),e)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}isInlineTagWithoutBlockChildren(t,e){if(re(t))return!(0===t.childNodes.length&&""===t.textContent&&!ee.has(t.nodeName)&&!se.has(t.nodeName));const n=Array.from(t.childNodes);return!(n.some((t=>t.nodeType===Node.ELEMENT_NODE))||!n.some((t=>t.nodeType===Node.TEXT_NODE)))&&(!1!==e.autoMatchFormat||!ne.has(t.parentElement.nodeName)&&(se.has(t.nodeName)||ee.has(t.nodeName)))}shouldFallBackToHtmlBlock(t){const e=Array.from(t.childNodes);if(0===e.length)return!1;const n=t.parentElement.nodeName;return"UL"!==n&&"OL"!==n&&e.every((t=>t.nodeType===Node.ELEMENT_NODE&&""===t.textContent&&!ee.has(t.nodeName)&&!se.has(t.nodeName)))}isCustomHtmlContainer(t){return"DIV"!==t.nodeName||t.childNodes.length>0&&"IMG"!==t.childNodes[0].nodeName}generateHtmlBlock(t,e){return{id:it(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:oe.generate(RTEHtmlBlock,t,e),children:[]}}}),
2
2
  //!important: Code block strategies must be registered after HtmlBlockStrategy because registerElementToBlockStrategy uses unshift, giving later registrations higher priority.
3
3
  Et.registerElementToBlockStrategy(new le),Et.registerElementToBlockStrategy(new class extends le{canHandle(t,e){return"VEGA-CODE-BLOCK"===t[e].tagName&&0==!!t[e].querySelector("vega-code-block")||this.isCodeBlockContainer(t[e])?1:0}handle(t){const e=this.isCodeBlockContainer(t[0])?t[0].querySelector("vega-code-block"):t[0],n=e.querySelector("code");if(n)return super.handle([n]);if(e.hasAttribute("data-content")){const t=document.createElement("code");return t.textContent=e.dataset.content,t.dataset.language=e.dataset.language,super.handle([t])}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isCodeBlockContainer(t){return"PRE"===t.tagName&&t.classList.contains("code-block-container")&&1===t.querySelectorAll("vega-code-block").length}}),Et.registerElementToNodeStrategy(new class extends he{canHandle(t,e){const n=t[e];return!dt(n)||"BR"!==n.nodeName&&0!==n.childNodes.length?0:1}handle(t,e,s){const r=!(!e||!1!==e.autoMatchFormat),i=Object.assign({},s),o=t[0],a=oe.generate(n,o,Object.assign({parentAnnotations:r?{inlineHtml:i.inlineHtml,link:i.link,code:i.code}:s},e));if("BR"===o.nodeName)return this.generateTextNode("\n",a);if(0===o.childNodes.length){const t=r?mt(Object.assign(Object.assign({},n.supportsHtmlTag(o.nodeName.toLowerCase())?a:{}),{inlineHtml:a.inlineHtml})):a;return Object.assign({},this.generateTextNode("",t))}}}),Et.registerElementToNodeStrategy(new class extends he{canHandle(t,e){return t[e].nodeType===Node.TEXT_NODE?1:0}handle(t,e,s){const r=Object.assign({},s),i=!(!e||!1!==e.autoMatchFormat),o=t[0],a=o.parentNode.nodeName.toLowerCase(),l=i&&!n.supportsHtmlTag(a),c=this.generateTextNode(String(o.textContent),i?mt(Object.assign(Object.assign({},"span"===a?r:{link:r.link,code:"code"===a?r.code:void 0}),{inlineHtml:r.inlineHtml,plainText:l||void 0})):r);return Object.assign({},c)}}),Y.register(e.name,new ue),Y.register(RTEListBlock.name,new ue),Y.register(RTEListItemBlock.name,new ue),Y.register(n.name,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const e=t,n=e.customStyle;if(!n)return t;e.bold&&n.fontWeight===z&&delete n.fontWeight,e.italic&&n.fontStyle===G&&delete n.fontStyle;const s=this.normalizeTextDecoration(n.textDecoration);return s&&this.shouldRemoveTextDecoration(s,e)&&delete n.textDecoration,0===Object.keys(n).length&&delete e.customStyle,t}normalizeTextDecoration(t){if(!t)return;const e=t.trim().toLowerCase().split(/\s+/);return e.some((t=>t!==K&&t!==J))?void 0:Array.from(new Set(e)).sort().join(" ")}shouldRemoveTextDecoration(t,e){const n=[];return e.underline&&n.push(K),e.strikethrough&&n.push(J),0!==n.length&&t===n.sort().join(" ")}}),Y.register(e.name,new de),Y.register(e.name,new me(1)),Y.register(e.name,new me(2)),Y.register(e.name,new me(3)),Y.register(e.name,new me(4)),Y.register(e.name,new me(5)),Y.register(e.name,new me(6)),Y.register(e.name,new we("title")),Y.register(e.name,new we("subtitle")),Y.register(n.name,new Te),Y.register(n.name,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=q.getDefaultStyles(),this.elementTagName="code"}filterAnnotations(t){const{code:e,customStyle:n}=t;return e&&n?super.filterAnnotations(t):t}canFilter(t){return Z.isCodeNode(t)}canRefill(t,e){return Z.isTextNode(t)&&e.matches(this.elementTagName)}toCssText(){return`.${Q.RTE_CONTENT_CONTAINER_CLASS_NAME} ${this.elementTagName} { ${this.convertStylesMapToCssText(Object.assign(Object.assign({},this.stylesToBeFiltered),{fontWeight:"500"}))} }`}}),Y.register(n.name,new et),Y.register(RTEImageNode.name,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=xt.getDefaultStyles(),this.elementTagName="img"}get alwaysFilter(){return!0}canFilter(t){return Z.isImageNode(t)}canRefill(t,e){return e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}),Y.register(b.name,new nt),Y.register(st.name,new rt),Y.register(RTEListBlock.name,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=Tt.getDefaultStyles(),this.elementTagName="ol,ul"}canFilter(t){return Z.isListBlock(t.constructor.name)}canRefill(t,e){return Z.isListBlock(t)&&e.matches(this.elementTagName)}toCssText(){return`${this.elementTagName.split(",").map((t=>`.${Q.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t.trim()}`)).join(", ")} { ${this.convertStylesMapToCssText(this.stylesToBeFiltered)} }`}}),Y.register(RTEListItemBlock.name,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.elementTagName="li",this.headingOrTitleClassNamePattern=/^v-rte-(h[1-6]|title|subtitle)$/}canFilter(t){const e=!t.getStyles().fontSize||this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"]);return Z.isListItemBlock(t.constructor.name)&&e}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&this.isElementNotHeadingOrTitle(e)}toCssText(){return this.buildCssTextForStyles(this.elementTagName)}isElementNotHeadingOrTitle(t){return!t.className.split(" ").some((t=>this.headingOrTitleClassNamePattern.test(t.trim())))}}),Y.register(RTEListItemBlock.name,new pe(1)),Y.register(RTEListItemBlock.name,new pe(2)),Y.register(RTEListItemBlock.name,new pe(3)),Y.register(RTEListItemBlock.name,new pe(4)),Y.register(RTEListItemBlock.name,new pe(5)),Y.register(RTEListItemBlock.name,new pe(6)),Y.register(RTEListItemBlock.name,new ge("title")),Y.register(RTEListItemBlock.name,new ge("subtitle"));class Ee{static preserve(t){const e=t.replace(/\s+style=/g," data-style=");return new fe(e)}}class fe{constructor(t){this.processedHtml=t}getProcessedHtml(){return this.processedHtml}restore(t){this.walkNodes(t)}walkNodes(t){t.forEach((t=>{if(dt(t)){const e=t.getAttribute("data-style");e&&(t.style.cssText=e,t.removeAttribute("data-style")),t.children.length>0&&this.walkNodes(Array.from(t.children))}}))}}class ke{process(t){return t.replace(/(<[^>]+>)(\s+)(<[^>]+>)/g,((t,e,n,s)=>{const r=this.extractOpeningTagName(e),i=this.extractClosingTagName(s);return r&&i&&r===i?`${e}${n}${s}`:`${e}${s}`}))}extractOpeningTagName(t){const e=t.match(/<(\w[\w-]*)/);return e?e[1]:null}extractClosingTagName(t){const e=t.match(/<\/(\w[\w-]*)/);return e?e[1]:null}}class Re{process(t){return t.replace(/(>)[\n\t]+(?=.)/g,"$1")}}class Be{process(t){return t.replace(/(.?)[\n\t]+(?=<)/g,"$1")}}class xe{constructor(){this.processors=[new ke,new Re,new Be]}clean(t){if(!t||0===t.trim().length)return t;let e,n=t;do{e=n;for(const t of this.processors)n=t.process(n)}while(n!==e);return n}}class VegaRTEContent{constructor(t){t.forEach((t=>{t.parent=this})),this.children=t}static fromJSON(t,e={autoMatchFormat:!0}){const n=t.map((t=>{const n=tt.getRTEBlockClass(t.type);if(n)return n.from(t,e);throw new Error(`[Vega] Unknown block type: ${t.type}`)}));return new VegaRTEContent(n)}static createEmptyContent(t={autoMatchFormat:!0}){return VegaRTEContent.fromJSON([{id:it(),type:"paragraph",annotations:{internalWrapper:!t.autoMatchFormat},nodes:[{id:it(),annotations:{plainText:!t.autoMatchFormat},type:"text",text:""}]}],t)}static fromHtml(t,e={autoMatchFormat:!0,skipCustomAnnotations:!1}){const n=(new xe).clean(t),s=Ee.preserve(n),r=s.getProcessedHtml(),i=(new DOMParser).parseFromString(r,"text/html").body,o=Array.from(i.childNodes);s.restore(o);const a=ft.process(o,e).filter(ot).map((t=>t.toDto(e))).filter(ot);return new VegaRTEContent(a)}static generateContentStyles(t){return Y.generateAllStylesContent(null==t?void 0:t.enableFontImports)}clone(t=!1){return new VegaRTEContent(t?this.children.map((t=>t.clone(this))):[...this.children])}toJSON(){return this.children.map((t=>t.toJSON()))}toHtml(t){return t&&(ot(t.autoMatchFormat)||ot(t.skipCustomAnnotations))&&wt.warn("The 'options' parameter's properties 'autoMatchFormat' and 'skipCustomAnnotations' in toHtml method are deprecated and will be removed in the future."),this.isEmpty()?"":this.children.map((e=>e.toHtml({filterInlineStyles:null==t?void 0:t.filterInlineStyles}))).join("")}isEmpty(){return 0===this.children.length||1===this.children.length&&!this.children[0].isNotEmpty()}apply(t){if(r.executeTheStrategy(t,this),t.executedFlag&&t.isFlushable){const t=O.getDOMByEntity(this);t&&at.notify(lt.getSubject(t,ht),{})}}getLastNode(){return 0===this.children.length?null:this.children[this.children.length-1].getLastNode()}toListItem(t){t.children.map((t=>t.apply(new g)));const e=new RTEListItemBlock(it());return e.apply(new s(t.children)),e.annotationMap=t.annotationMap,e}createList(t){return new RTEListBlock(it(),t)}findNodeById(t){return this.findNodeInBlocksById(t,this.children)}findNodeInBlocksById(t,e){for(const n of e){if("children"in n)for(const e of n.children)if(e.id===t)return e;if(n instanceof RTEListItemBlock&&n.nestList)for(const e of n.nestList){const n=this.findNodeInBlocksById(t,e.children);if(n)return n}if(n instanceof RTEListBlock&&n.children){const e=this.findNodeInBlocksById(t,n.children);if(e)return e}}return null}}r.register(c.DELETE_CHILDREN,VegaRTEContent.name,new P),r.register(c.APPEND_CHILDREN,VegaRTEContent.name,new kt),r.register(c.INSERT_CHILDREN_BEFORE,VegaRTEContent.name,new Rt),r.register(c.INSERT_CHILDREN_AFTER,VegaRTEContent.name,new Bt),r.register(c.TRANSFORM_TO_CODE_BLOCK,VegaRTEContent.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,s=new b(it(),this.getCodeContent(n),"plainText");e.apply(new E(n[0],s)),t.newCodeBlock=s,this.removeSelectBlocks(n,e)}getCodeContent(t){return t.filter((t=>"image"!==t.type&&"list-item"!==t.type)).map((t=>t.children.map((t=>t.text)).join(""))).join("\n")}removeSelectBlocks(t,e){for(let n=0;n<t.length;n++)e.apply(new p(t[n]))}}),r.register(c.UPDATE_CURSOR_POSITION,VegaRTEContent.name,new class extends t{handleAction(t,e){const{offset:n,nextFocusNode:s,immediatelyRun:r}=t,i=O.getDOMByEntity(e);i&&at.notify(lt.getSubject(i,ct),{node:s,offset:n,updateDirectly:r})}});export{$t as A,ae as B,Et as E,It as I,bt as M,vt as P,St as R,Ee as S,yt as U,VegaRTEContent as V,pt as a,RTEImageBlock as b,Rt as c,RTEListItemBlock as d,RTEListBlock as e,RTEImageNode as f,xt as g,oe as h,ft as i}
@@ -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-a528714c.js";const n={"This field is required":"This field is required","The minimum input value is {0}":"The minimum input value is {0}","The maximum input value is {0}":"The maximum input value is {0}","The end value should be greater than the start value":"The end value should be greater than the start value","The end date should be later than start date":"The end date should be later than start date","Credit card number is invalid":"Credit card number is invalid","Please enter the correct email format.":"Please enter the correct email format.","The maximum input length is {0}":"The maximum input length is {0}","The start date should be later than {0}":"The start date should be later than {0}","The start date should be earlier than {0}":"The start date should be earlier than {0}","The end date should be earlier than {0}":"The end date should be earlier than {0}","The date should be later than {0}":"The date should be later than {0}","The date should be earlier than {0}":"The date should be earlier than {0}","The minimum input length is {0}":"The minimum input length is {0}","The end time should be later than start time":"The end time should be later than start time","Phone number is not valid":"Phone number is not valid","Phone number is valid but it belongs to country {0}, not country {1}":"Phone number is valid but it belongs to country {0}, not country {1}","The value does not exist in the source":"The value does not exist in the source","There are values that do not exist in the source":"There are values that do not exist in the source",Viewing:"Viewing",Show:"Show","Go To":"Go To","Viewing {0}-{1} of {2}":"Viewing {0}-{1} of {2}","Viewing [{0}-{1}] of {2}":"Viewing [{0}-{1}] of {2}","Show [{0} items / page]":"Show [{0} items / page]","Items Per Page":"Items Per Page",Upload:"Upload",Clear:"Clear",Today:"Today","Previous month":"Previous month","Next month":"Next month",Day:"Day",Week:"Week",Month:"Month",Sun:"Sun",Mon:"Mon",Tue:"Tue",Wed:"Wed",Thu:"Thu",Fri:"Fri",Sat:"Sat","Sun-short":"S","Mon-short":"M","Tue-short":"T","Wed-short":"W","Thu-short":"T","Fri-short":"F","Sat-short":"S","Sun-full":"Sunday","Mon-full":"Monday","Tue-full":"Tuesday","Wed-full":"Wednesday","Thu-full":"Thursday","Fri-full":"Friday","Sat-full":"Saturday",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",Jan:"Jan",Feb:"Feb",Mar:"Mar",Apr:"Apr",Jun:"Jun",Jul:"Jul",Aug:"Aug",Sep:"Sep",Oct:"Oct",Nov:"Nov",Dec:"Dec","All Day":"All Day","Select or drop your file here":"Select or drop your file here","Please sign here":"Please sign here","Clear Signature":"Clear Signature","Start Date":"Start Date","End Date":"End Date","Please select":"Please select","No options":"No options","No results found":"No results found",Minimum:"Minimum",Maximum:"Maximum","Select Time":"Select Time","Start Time":"Start Time","End Time":"End Time","There is no data to display":"There is no data to display","Text Styles":"Text Styles",Bold:"Bold",Italic:"Italic",Underline:"Underline",Strikethrough:"Strikethrough",Code:"Code","Text Color":"Text Color","Left Align":"Left Align","Center Align":"Center Align","Right Align":"Right Align",Justified:"Justified",Bullets:"Bullets",Numbers:"Numbers","More Indent":"More Indent","Less Indent":"Less Indent",Link:"Link",Image:"Image","Upload from computer":"Upload from computer","Insert via URL":"Insert via URL","Image via URL":"Image via URL",Insert:"Insert","Clear Style":"Clear Style",URL:"URL",Text:"Text",Edit:"Edit",Unlink:"Unlink",Size:"Size","Alt Text":"Alt Text","Delete Image":"Delete Image",Sm:"Sm",Md:"Md",Lg:"Lg",Title:"Title",Subtitle:"Subtitle","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3",Paragraph:"Paragraph","Reset Selection":"Reset Selection","Select Language":"Select Language","Delete Code":"Delete Code","Copy Code":"Copy Code","Code Block":"Code Block",Copied:"Copied","Repeat every {0} days":"Repeat every {0} days","Repeat daily":"Repeat daily","Repeat every {0} weeks on {1}":"Repeat every {0} weeks on {1}","Repeat weekly on {0}":"Repeat weekly on {0}","Repeat every {0} months on day {1}":"Repeat every {0} months on day {1}","Repeat monthly on day {0}":"Repeat monthly on day {0}","Repeat every {0} years on {1} {2}":"Repeat every {0} years on {1} {2}","Repeat yearly on {0} {1}":"Repeat yearly on {0} {1}","until {0}":"until {0}","after {0} occurrences":"after {0} occurrences",Sunday:"Sunday",Monday:"Monday",Tuesday:"Tuesday",Wednesday:"Wednesday",Thursday:"Thursday",Friday:"Friday",Saturday:"Saturday",am:"am",pm:"pm","{0} Selected":"{0} Selected","date picker":"Date Picker","Selected result":"Selected result","Close event preview detail":"Close event preview detail","More actions":"More actions"};class r{constructor(){this.resources={en:n},this._currentLanguage="en"}get currentLanguage(){return this._currentLanguage}init({resources:r,language:i}){r&&Object.keys(r).length>0?this.resources=r:(e.warn('Resources are empty. Falling back to default language "en".'),this.resources={en:n}),i&&i in this.resources?this._currentLanguage=i:(e.warn(`Language "${i}" 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]||n[e]||e)}registerComponent(e){const t=r.connectedComponents.get(e.tagName);t?t.add(e):r.connectedComponents.set(e.tagName,new Set([e]))}unRegisterComponent(e){const t=r.connectedComponents.get(e.tagName);t&&t.delete(e)}getConnectedComponents(){return r.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}}))}}r.connectedComponents=new Map;const i=new r;export{i as V,n as s}
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";const n={"This field is required":"This field is required","The minimum input value is {0}":"The minimum input value is {0}","The maximum input value is {0}":"The maximum input value is {0}","The end value should be greater than the start value":"The end value should be greater than the start value","The end date should be later than start date":"The end date should be later than start date","Credit card number is invalid":"Credit card number is invalid","Please enter the correct email format.":"Please enter the correct email format.","The maximum input length is {0}":"The maximum input length is {0}","The start date should be later than {0}":"The start date should be later than {0}","The start date should be earlier than {0}":"The start date should be earlier than {0}","The end date should be earlier than {0}":"The end date should be earlier than {0}","The date should be later than {0}":"The date should be later than {0}","The date should be earlier than {0}":"The date should be earlier than {0}","The minimum input length is {0}":"The minimum input length is {0}","The end time should be later than start time":"The end time should be later than start time","Phone number is not valid":"Phone number is not valid","Phone number is valid but it belongs to country {0}, not country {1}":"Phone number is valid but it belongs to country {0}, not country {1}","The value does not exist in the source":"The value does not exist in the source","There are values that do not exist in the source":"There are values that do not exist in the source",Viewing:"Viewing",Show:"Show","Go To":"Go To","Viewing {0}-{1} of {2}":"Viewing {0}-{1} of {2}","Viewing [{0}-{1}] of {2}":"Viewing [{0}-{1}] of {2}","Show [{0} items / page]":"Show [{0} items / page]","Items Per Page":"Items Per Page",Upload:"Upload",Clear:"Clear",Today:"Today","Previous month":"Previous month","Next month":"Next month",Day:"Day",Week:"Week",Month:"Month",Sun:"Sun",Mon:"Mon",Tue:"Tue",Wed:"Wed",Thu:"Thu",Fri:"Fri",Sat:"Sat","Sun-short":"S","Mon-short":"M","Tue-short":"T","Wed-short":"W","Thu-short":"T","Fri-short":"F","Sat-short":"S","Sun-full":"Sunday","Mon-full":"Monday","Tue-full":"Tuesday","Wed-full":"Wednesday","Thu-full":"Thursday","Fri-full":"Friday","Sat-full":"Saturday",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",Jan:"Jan",Feb:"Feb",Mar:"Mar",Apr:"Apr",Jun:"Jun",Jul:"Jul",Aug:"Aug",Sep:"Sep",Oct:"Oct",Nov:"Nov",Dec:"Dec","All Day":"All Day","Select or drop your file here":"Select or drop your file here","Please sign here":"Please sign here","Clear Signature":"Clear Signature","Start Date":"Start Date","End Date":"End Date","Please select":"Please select","No options":"No options","No results found":"No results found",Minimum:"Minimum",Maximum:"Maximum","Select Time":"Select Time","Start Time":"Start Time","End Time":"End Time","There is no data to display":"There is no data to display","Text Styles":"Text Styles",Bold:"Bold",Italic:"Italic",Underline:"Underline",Strikethrough:"Strikethrough",Code:"Code","Text Color":"Text Color","Left Align":"Left Align","Center Align":"Center Align","Right Align":"Right Align",Justified:"Justified",Bullets:"Bullets",Numbers:"Numbers","More Indent":"More Indent","Less Indent":"Less Indent",Link:"Link",Image:"Image","Upload from computer":"Upload from computer","Insert via URL":"Insert via URL","Image via URL":"Image via URL",Insert:"Insert","Clear Style":"Clear Style",URL:"URL",Text:"Text",Edit:"Edit",Unlink:"Unlink",Size:"Size","Alt Text":"Alt Text","Delete Image":"Delete Image",Sm:"Sm",Md:"Md",Lg:"Lg",Title:"Title",Subtitle:"Subtitle","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3",Paragraph:"Paragraph","Reset Selection":"Reset Selection","Select Language":"Select Language","Delete Code":"Delete Code","Copy Code":"Copy Code","Code Block":"Code Block",Copied:"Copied","Repeat every {0} days":"Repeat every {0} days","Repeat daily":"Repeat daily","Repeat every {0} weeks on {1}":"Repeat every {0} weeks on {1}","Repeat weekly on {0}":"Repeat weekly on {0}","Repeat every {0} months on day {1}":"Repeat every {0} months on day {1}","Repeat monthly on day {0}":"Repeat monthly on day {0}","Repeat every {0} years on {1} {2}":"Repeat every {0} years on {1} {2}","Repeat yearly on {0} {1}":"Repeat yearly on {0} {1}","until {0}":"until {0}","after {0} occurrences":"after {0} occurrences",Sunday:"Sunday",Monday:"Monday",Tuesday:"Tuesday",Wednesday:"Wednesday",Thursday:"Thursday",Friday:"Friday",Saturday:"Saturday",am:"am",pm:"pm","{0} Selected":"{0} Selected","date picker":"Date Picker","Selected result":"Selected result","Close event preview detail":"Close event preview detail","More actions":"More actions","Clear color":"Clear color","Color swatch":"Color swatch","Color {0}":"Color {0}"};class r{constructor(){this.resources={en:n},this._currentLanguage="en"}get currentLanguage(){return this._currentLanguage}init({resources:r,language:o}){r&&Object.keys(r).length>0?this.resources=r:(e.warn('Resources are empty. Falling back to default language "en".'),this.resources={en:n}),o&&o in this.resources?this._currentLanguage=o:(e.warn(`Language "${o}" 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]||n[e]||e)}registerComponent(e){const t=r.connectedComponents.get(e.tagName);t?t.add(e):r.connectedComponents.set(e.tagName,new Set([e]))}unRegisterComponent(e){const t=r.connectedComponents.get(e.tagName);t&&t.delete(e)}getConnectedComponents(){return r.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}}))}}r.connectedComponents=new Map;const o=new r;export{o as V,n as s}
@@ -1 +1 @@
1
- import{h as t,H as e,r as i,c as s,g as r}from"./p-6b2342e0.js";import{c as a,M as n,V as o,I as h}from"./p-6e1ab235.js";import{V as p,I as l}from"./p-4415ad28.js";import{s as d}from"./p-519a7d55.js";import{G as u,H as c,h as m,J as f,K as v}from"./p-c5eb0fa6.js";import{D as g}from"./p-f28a6074.js";import{F as b}from"./p-a528714c.js";import{C as x}from"./p-2d0d575f.js";import{c as w}from"./p-d0ac7af8.js";import{K as j}from"./p-001d36af.js";import{C as y}from"./p-68a531cf.js";import{F as I}from"./p-49ae8c79.js";import{R}from"./p-280cbcdb.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-6a334573.js";import"./p-3d2d267d.js";import"./p-b75ee3ba.js";import"./p-59c6f795.js";import"./p-83863463.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-82016096.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-33860e54.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-6216c30e.js";var V=function(t,e,i,s){var r,a=arguments.length,n=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(n=(a<3?r(n):a>3?r(e,i,n):r(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};class C extends o{constructor(){super(...arguments),this.vegaInputRefs=[],this.focusInputPasscode=()=>{this.vegaInputRefs[0]&&this.vegaInputRefs[0].doFocus()},this.handleVegaFocus=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=null);const e=this.vegaInputValues.get(t)?t:this.valueController.getFirstEmptyIndex(),i=-1===e?this.length-1:e;this.currentIndex=i,this.vegaInputRefs[i].doFocus()},this.handleVegaBlur=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=-1)},this.handleVegaChange=t=>e=>{var i;const s=e.detail||"";if(2===s.length||1===s.length&&!this.vegaInputValues.get(t)){const e=this.generateNewInputValue(t,s);this.vegaInputValues.set(t,e),null===(i=this.vegaInputRefs[t+1])||void 0===i||i.doFocus()}},this.handleVegaPaste=()=>t=>{t.preventDefault();const e=t.detail.getData("text");this.valueController.setValuesArray(e),this.vegaInputRefs[this.value.length<this.length?this.value.length:this.length-1].doFocus()}}watchLengthAndInputType(){this.valueController.setValuesArray(this.value)}getVegaInputRefs(){return this.vegaInputRefs}getCurrentIndex(){return this.currentIndex}getInputPasscodeContainerRef(){return this.inputPasscodeContainerRef}render(){const i=Array.from({length:this.length}).map(((e,i)=>t("vega-input",{class:"small"===this.size?"small":"medium",key:i,"data-tabindex":0!==i?-1:0,showClearIcon:!1,disabled:this.disabled,"data-aria-hidden":String(!this.isInputAccessibleForScreenReader(i)),"data-aria-label":`Passcode input ${i+1} of ${this.length}`,value:this.vegaInputValues.get(i)||"",autocomplete:0===i?"one-time-code":"off",inputmode:"text"===this.inputType?"text":"numeric",ref:t=>{this.vegaInputRefs[i]=t,g.addUniqueObserverToNode(t,u,this.handleVegaFocus(i)),g.addUniqueObserverToNode(t,c,this.handleVegaBlur(i)),g.addUniqueObserverToNode(t,m,this.handleVegaChange(i)),g.addUniqueObserverToNode(t,f,this.handleVegaPaste())},maskConfig:{type:"custom-formatter",formatter:t=>this.valueController.valueValidationFilter(t)}})));return t(e,null,this.label&&this.renderLabel(),t("vega-flex",{class:"vega-input-passcode-container",direction:"row",gap:"size-8",role:"group","aria-label":this.label||"One-time password input",ref:t=>this.inputPasscodeContainerRef=t},i),this.hint&&t("vega-hint",null,this.hint))}renderLabel(){return t("vega-field-label",{onClick:this.focusInputPasscode,isFieldRequired:this.required,disabled:this.disabled,label:this.label})}getFirstEmptyIndexForRender(t){for(let e=0;e<t;e++)if(!this.vegaInputValues.get(e))return e;return-1}isInputAccessibleForScreenReader(t){const e=this.getFirstEmptyIndexForRender(this.length);return-1===e||t<=e}generateNewInputValue(t,e){if(2===e.length){for(let i=0;i<e.length;i++)if(e[i]!==this.vegaInputValues.get(t))return e[i];return this.vegaInputValues.get(t)}return e}}V([a()],C.prototype,"host",void 0),V([a()],C.prototype,"value",void 0),V([a()],C.prototype,"label",void 0),V([a()],C.prototype,"required",void 0),V([a()],C.prototype,"length",void 0),V([a()],C.prototype,"disabled",void 0),V([a()],C.prototype,"hint",void 0),V([a()],C.prototype,"size",void 0),V([a()],C.prototype,"inputType",void 0),V([a()],C.prototype,"vegaInputValues",void 0),V([a()],C.prototype,"valueController",void 0),V([n("watchLengthAndInputType")],C.prototype,"watchLengthAndInputType",null);var A=function(t,e,i,s){var r,a=arguments.length,n=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(n=(a<3?r(n):a>3?r(e,i,n):r(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};class k extends o{componentWillLoad(){this.setValuesArray(this.value),this.value=this.vegaInputValues.join("")}watchValue(){this.setValuesArray(this.value),this.changeEventEmitter.emit(this.value),x.notify(b,{host:this.host,detail:this.value}),this.value.length===this.length&&this.completeEventEmitter.emit(this.value)}watchVegaInputValues(){for(let t=0;t<this.length;t++)this.inputPasscodeRenderer.getVegaInputRefs()[t]&&(this.inputPasscodeRenderer.getVegaInputRefs()[t].value=this.vegaInputValues.get(t)||"");this.value=this.vegaInputValues.join("")}setValuesArray(t){const e=this.valueValidationFilter(t).slice(0,this.length).split("");this.vegaInputValues.setAll(e)}valueValidationFilter(t){return t.replace("text"===this.inputType?/\s/g:/\D/g,"")}getFirstEmptyIndex(){var t;const{length:e}=this;return null!==(t=Array.from({length:e},((t,e)=>this.vegaInputValues.get(e)||"")).findIndex((t=>!t||""===t)))&&void 0!==t?t:-1}}A([a()],k.prototype,"host",void 0),A([a({writable:!0})],k.prototype,"value",void 0),A([a({writable:!0})],k.prototype,"vegaInputValues",void 0),A([a()],k.prototype,"length",void 0),A([a()],k.prototype,"inputType",void 0),A([a()],k.prototype,"inputPasscodeRenderer",void 0),A([a()],k.prototype,"changeEventEmitter",void 0),A([a()],k.prototype,"completeEventEmitter",void 0),A([n("componentWillLoad")],k.prototype,"componentWillLoad",null),A([n("watchValue")],k.prototype,"watchValue",null),A([n("watchVegaInputValues")],k.prototype,"watchVegaInputValues",null);var E=function(t,e,i,s){var r,a=arguments.length,n=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(n=(a<3?r(n):a>3?r(e,i,n):r(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};class L extends j{constructor(){super((t=>[{keyCode:"Backspace",activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.deletePasscode(e)}},{keyCode:["ArrowLeft","ArrowRight"],activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.controlDirectionByKeyboard(e)}}])),this.deletePasscode=t=>{t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex();this.vegaInputValues.get(e)?this.vegaInputValues.withMutation((t=>{for(let i=e;i<this.length-1;i++)t[i]=t[i+1];t[this.length-1]=""})):!this.vegaInputValues.get(e)&&e>0&&(this.vegaInputValues.set(e-1,""),this.inputPasscodeRenderer.getVegaInputRefs()[e-1].doFocus())}}controlDirectionByKeyboard(t){t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex(),i=this.inputPasscodeRenderer.getVegaInputRefs();"ArrowLeft"===t.key&&e>0&&i[e-1].doFocus(),"ArrowRight"===t.key&&this.vegaInputValues.get(e)&&e<this.length-1&&i[e+1].doFocus()}}E([a()],L.prototype,"value",void 0),E([a()],L.prototype,"length",void 0),E([a()],L.prototype,"vegaInputValues",void 0),E([a()],L.prototype,"valueController",void 0),E([a()],L.prototype,"inputPasscodeRenderer",void 0);class F{constructor(t,e){this.length=0,this.array=[],t&&(this.array=t,this.length=t.length),e&&(this.onMutate=e)}onMutate(t){}push(...t){return this.withMutation((e=>{e.push(...t)}))}pop(){return this.withMutation((t=>{t.length>0&&t.pop()}))}set(t,e){return this.withMutation((i=>{t>=0&&(i[t]=e)}))}setAll(t){return this.withMutation((e=>{e.length=0;for(let i=0;i<t.length;i++)e[i]=t[i]}))}clear(){return this.withMutation((t=>{t.length=0}))}withMutation(t){const e=[...this.array];t(e);const i=new F(e,this.onMutate);return this.onMutate(i),i}get(t){return this.array[t]}join(t){return this.array.join(t)}toArray(){return this.array}}var O=function(t,e,i,s){var r,a=arguments.length,n=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(n=(a<3?r(n):a>3?r(e,i,n):r(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};const T=class{constructor(t){i(this,t),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaComplete=s(this,"vegaComplete",7),this.complete=s(this,"complete",7),this.globalSlimmers={},this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new R:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputPasscodeRenderer.getInputPasscodeContainerRef(),touchableAreaGetter:()=>[...this.inputPasscodeRenderer.getVegaInputRefs()]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.keyboardController=new L,this.valueController=new k,this.inputPasscodeRenderer=new C,this.changeEventEmitter=w(T,m),this.completeEventEmitter=w(T,v),this.eventPreventSlimmer=new y([m],(()=>this.host),{useCapture:!0}),this.vegaInputValues=new F(new Array,(t=>{this.vegaInputValues=t})),this.label="",this.disabled=!1,this.size="medium",this.hint="",this.length=4,this.inputType="numeric",this.value="",this.required=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchVegaInputValues(){}watchLengthAndInputType(){}watchValue(){}watchValidationRules(){}render(){return d(this.inputPasscodeRenderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{vegaInputValues:["watchVegaInputValues"],length:["watchLengthAndInputType"],inputType:["watchLengthAndInputType"],value:["watchValue"],validationRules:["watchValidationRules"]}}};O([l()],T.prototype,"globalSlimmers",void 0),O([h()],T.prototype,"formFieldController",void 0),O([h()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),O([h()],T.prototype,"keyboardController",void 0),O([h()],T.prototype,"valueController",void 0),O([h()],T.prototype,"inputPasscodeRenderer",void 0),O([h()],T.prototype,"changeEventEmitter",void 0),O([h()],T.prototype,"completeEventEmitter",void 0),O([h()],T.prototype,"eventPreventSlimmer",void 0),T.style=':host{display:inline-block}:host vega-field-label{margin-bottom:8px}:host vega-input::part(input-container){padding-left:0px;padding-right:0px}:host vega-input.small{width:38px;height:42px;box-sizing:border-box}:host vega-input.medium{width:42px;height:50px;box-sizing:border-box}:host vega-input::part(input){text-align:center}:host vega-input.small::part(input-container){padding-top:8px;padding-bottom:8px}:host vega-input.medium::part(input-container){padding-top:12px;padding-bottom:12px}:host .vega-input-passcode-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):focus-within{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));box-shadow:0 0 0}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top: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{T as vega_input_passcode}
1
+ import{h as t,H as e,r as i,c as s,g as r}from"./p-6b2342e0.js";import{c as n,M as a,V as o,I as h}from"./p-6e1ab235.js";import{V as p,I as l}from"./p-4415ad28.js";import{s as d}from"./p-519a7d55.js";import{G as u,H as c,h as m,J as f,K as v}from"./p-c5eb0fa6.js";import{D as g}from"./p-f28a6074.js";import{F as b}from"./p-a528714c.js";import{C as x}from"./p-2d0d575f.js";import{c as w}from"./p-44044ed7.js";import{K as j}from"./p-9751c801.js";import{C as y}from"./p-edda10f7.js";import{F as I}from"./p-42141782.js";import{R}from"./p-280cbcdb.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-6a334573.js";import"./p-6e9f832f.js";import"./p-b75ee3ba.js";import"./p-085de8fc.js";import"./p-b9386dd0.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-d5531d3c.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-aa985d73.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-a0c3968b.js";var V=function(t,e,i,s){var r,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class C extends o{constructor(){super(...arguments),this.vegaInputRefs=[],this.focusInputPasscode=()=>{this.vegaInputRefs[0]&&this.vegaInputRefs[0].doFocus()},this.handleVegaFocus=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=null);const e=this.vegaInputValues.get(t)?t:this.valueController.getFirstEmptyIndex(),i=-1===e?this.length-1:e;this.currentIndex=i,this.vegaInputRefs[i].doFocus()},this.handleVegaBlur=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=-1)},this.handleVegaChange=t=>e=>{var i;const s=e.detail||"";if(2===s.length||1===s.length&&!this.vegaInputValues.get(t)){const e=this.generateNewInputValue(t,s);this.vegaInputValues.set(t,e),null===(i=this.vegaInputRefs[t+1])||void 0===i||i.doFocus()}},this.handleVegaPaste=()=>t=>{t.preventDefault();const e=t.detail.getData("text");this.valueController.setValuesArray(e),this.vegaInputRefs[this.value.length<this.length?this.value.length:this.length-1].doFocus()}}watchLengthAndInputType(){this.valueController.setValuesArray(this.value)}getVegaInputRefs(){return this.vegaInputRefs}getCurrentIndex(){return this.currentIndex}getInputPasscodeContainerRef(){return this.inputPasscodeContainerRef}render(){const i=Array.from({length:this.length}).map(((e,i)=>t("vega-input",{class:"small"===this.size?"small":"medium",key:i,"data-tabindex":0!==i?-1:0,showClearIcon:!1,disabled:this.disabled,"data-aria-hidden":String(!this.isInputAccessibleForScreenReader(i)),"data-aria-label":`Passcode input ${i+1} of ${this.length}`,value:this.vegaInputValues.get(i)||"",autocomplete:0===i?"one-time-code":"off",inputmode:"text"===this.inputType?"text":"numeric",ref:t=>{this.vegaInputRefs[i]=t,g.addUniqueObserverToNode(t,u,this.handleVegaFocus(i)),g.addUniqueObserverToNode(t,c,this.handleVegaBlur(i)),g.addUniqueObserverToNode(t,m,this.handleVegaChange(i)),g.addUniqueObserverToNode(t,f,this.handleVegaPaste())},maskConfig:{type:"custom-formatter",formatter:t=>this.valueController.valueValidationFilter(t)}})));return t(e,null,this.label&&this.renderLabel(),t("vega-flex",{class:"vega-input-passcode-container",direction:"row",gap:"size-8",role:"group","aria-label":this.label||"One-time password input",ref:t=>this.inputPasscodeContainerRef=t},i),this.hint&&t("vega-hint",null,this.hint))}renderLabel(){return t("vega-field-label",{onClick:this.focusInputPasscode,isFieldRequired:this.required,disabled:this.disabled,label:this.label})}getFirstEmptyIndexForRender(t){for(let e=0;e<t;e++)if(!this.vegaInputValues.get(e))return e;return-1}isInputAccessibleForScreenReader(t){const e=this.getFirstEmptyIndexForRender(this.length);return-1===e||t<=e}generateNewInputValue(t,e){if(2===e.length){for(let i=0;i<e.length;i++)if(e[i]!==this.vegaInputValues.get(t))return e[i];return this.vegaInputValues.get(t)}return e}}V([n()],C.prototype,"host",void 0),V([n()],C.prototype,"value",void 0),V([n()],C.prototype,"label",void 0),V([n()],C.prototype,"required",void 0),V([n()],C.prototype,"length",void 0),V([n()],C.prototype,"disabled",void 0),V([n()],C.prototype,"hint",void 0),V([n()],C.prototype,"size",void 0),V([n()],C.prototype,"inputType",void 0),V([n()],C.prototype,"vegaInputValues",void 0),V([n()],C.prototype,"valueController",void 0),V([a("watchLengthAndInputType")],C.prototype,"watchLengthAndInputType",null);var A=function(t,e,i,s){var r,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class k extends o{componentWillLoad(){this.setValuesArray(this.value),this.value=this.vegaInputValues.join("")}watchValue(){this.setValuesArray(this.value),this.changeEventEmitter.emit(this.value),x.notify(b,{host:this.host,detail:this.value}),this.value.length===this.length&&this.completeEventEmitter.emit(this.value)}watchVegaInputValues(){for(let t=0;t<this.length;t++)this.inputPasscodeRenderer.getVegaInputRefs()[t]&&(this.inputPasscodeRenderer.getVegaInputRefs()[t].value=this.vegaInputValues.get(t)||"");this.value=this.vegaInputValues.join("")}setValuesArray(t){const e=this.valueValidationFilter(t).slice(0,this.length).split("");this.vegaInputValues.setAll(e)}valueValidationFilter(t){return t.replace("text"===this.inputType?/\s/g:/\D/g,"")}getFirstEmptyIndex(){var t;const{length:e}=this;return null!==(t=Array.from({length:e},((t,e)=>this.vegaInputValues.get(e)||"")).findIndex((t=>!t||""===t)))&&void 0!==t?t:-1}}A([n()],k.prototype,"host",void 0),A([n({writable:!0})],k.prototype,"value",void 0),A([n({writable:!0})],k.prototype,"vegaInputValues",void 0),A([n()],k.prototype,"length",void 0),A([n()],k.prototype,"inputType",void 0),A([n()],k.prototype,"inputPasscodeRenderer",void 0),A([n()],k.prototype,"changeEventEmitter",void 0),A([n()],k.prototype,"completeEventEmitter",void 0),A([a("componentWillLoad")],k.prototype,"componentWillLoad",null),A([a("watchValue")],k.prototype,"watchValue",null),A([a("watchVegaInputValues")],k.prototype,"watchVegaInputValues",null);var E=function(t,e,i,s){var r,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class L extends j{constructor(){super((t=>[{keyCode:"Backspace",activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.deletePasscode(e)}},{keyCode:["ArrowLeft","ArrowRight"],activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.controlDirectionByKeyboard(e)}}])),this.deletePasscode=t=>{t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex();this.vegaInputValues.get(e)?this.vegaInputValues.withMutation((t=>{for(let i=e;i<this.length-1;i++)t[i]=t[i+1];t[this.length-1]=""})):!this.vegaInputValues.get(e)&&e>0&&(this.vegaInputValues.set(e-1,""),this.inputPasscodeRenderer.getVegaInputRefs()[e-1].doFocus())}}controlDirectionByKeyboard(t){t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex(),i=this.inputPasscodeRenderer.getVegaInputRefs();"ArrowLeft"===t.key&&e>0&&i[e-1].doFocus(),"ArrowRight"===t.key&&this.vegaInputValues.get(e)&&e<this.length-1&&i[e+1].doFocus()}}E([n()],L.prototype,"value",void 0),E([n()],L.prototype,"length",void 0),E([n()],L.prototype,"vegaInputValues",void 0),E([n()],L.prototype,"valueController",void 0),E([n()],L.prototype,"inputPasscodeRenderer",void 0);class F{constructor(t,e){this.length=0,this.array=[],t&&(this.array=t,this.length=t.length),e&&(this.onMutate=e)}onMutate(t){}push(...t){return this.withMutation((e=>{e.push(...t)}))}pop(){return this.withMutation((t=>{t.length>0&&t.pop()}))}set(t,e){return this.withMutation((i=>{t>=0&&(i[t]=e)}))}setAll(t){return this.withMutation((e=>{e.length=0;for(let i=0;i<t.length;i++)e[i]=t[i]}))}clear(){return this.withMutation((t=>{t.length=0}))}withMutation(t){const e=[...this.array];t(e);const i=new F(e,this.onMutate);return this.onMutate(i),i}get(t){return this.array[t]}join(t){return this.array.join(t)}toArray(){return this.array}}var O=function(t,e,i,s){var r,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const T=class{constructor(t){i(this,t),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaComplete=s(this,"vegaComplete",7),this.complete=s(this,"complete",7),this.globalSlimmers={},this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new R:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputPasscodeRenderer.getInputPasscodeContainerRef(),touchableAreaGetter:()=>[...this.inputPasscodeRenderer.getVegaInputRefs()]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.keyboardController=new L,this.valueController=new k,this.inputPasscodeRenderer=new C,this.changeEventEmitter=w(T,m),this.completeEventEmitter=w(T,v),this.eventPreventSlimmer=new y([m],(()=>this.host),{useCapture:!0}),this.vegaInputValues=new F(new Array,(t=>{this.vegaInputValues=t})),this.label="",this.disabled=!1,this.size="medium",this.hint="",this.length=4,this.inputType="numeric",this.value="",this.required=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchVegaInputValues(){}watchLengthAndInputType(){}watchValue(){}watchValidationRules(){}render(){return d(this.inputPasscodeRenderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{vegaInputValues:["watchVegaInputValues"],length:["watchLengthAndInputType"],inputType:["watchLengthAndInputType"],value:["watchValue"],validationRules:["watchValidationRules"]}}};O([l()],T.prototype,"globalSlimmers",void 0),O([h()],T.prototype,"formFieldController",void 0),O([h()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),O([h()],T.prototype,"keyboardController",void 0),O([h()],T.prototype,"valueController",void 0),O([h()],T.prototype,"inputPasscodeRenderer",void 0),O([h()],T.prototype,"changeEventEmitter",void 0),O([h()],T.prototype,"completeEventEmitter",void 0),O([h()],T.prototype,"eventPreventSlimmer",void 0),T.style=':host{display:inline-block}:host vega-field-label{margin-bottom:8px}:host vega-input::part(input-container){padding-left:0px;padding-right:0px}:host vega-input.small{width:38px;height:42px;box-sizing:border-box}:host vega-input.medium{width:42px;height:50px;box-sizing:border-box}:host vega-input::part(input){text-align:center}:host vega-input.small::part(input-container){padding-top:8px;padding-bottom:8px}:host vega-input.medium::part(input-container){padding-top:12px;padding-bottom:12px}:host .vega-input-passcode-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):focus-within{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));box-shadow:0 0 0}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top: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{T as vega_input_passcode}