@heartlandone/vega 2.73.0 → 2.74.0-RTE-table-preview

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 (702) hide show
  1. package/dist/cjs/align-left-4a76df69.js +22 -0
  2. package/dist/cjs/{app-globals-cc162173.js → app-globals-be2e868e.js} +18 -17
  3. package/dist/cjs/{code-block-823cd481.js → code-block-22ee2550.js} +35 -4
  4. package/dist/cjs/{component-value-history-controller-slimmer.abstract-e2e0c6f3.js → component-value-history-controller-slimmer.abstract-3486cbc0.js} +26 -5
  5. package/dist/cjs/{dto-renderer-manager-bd2bd447.js → content-state-0be6fda3.js} +33 -60
  6. package/dist/cjs/{design-token-11656685.js → design-token-505997df.js} +1 -1
  7. package/dist/cjs/dto-renderer-manager-ae5fcbba.js +58 -0
  8. package/dist/cjs/{element-appender-slimmer-12f40b8b.js → element-appender-slimmer-26420c09.js} +6 -6
  9. package/dist/cjs/{form-field-controller-slimmer-6e3e14fd.js → form-field-controller-slimmer-56c551ea.js} +2 -2
  10. package/dist/cjs/{image-annotation-action-7408a4b3.js → image-annotation-action-462fd073.js} +3 -3
  11. package/dist/cjs/index-58ea899e.js +4 -0
  12. package/dist/cjs/{index-638a0f0d.js → index-fc538f17.js} +1 -1
  13. package/dist/cjs/index.cjs.js +43 -38
  14. package/dist/cjs/{language-extension-716015a5.js → language-extension-414149c2.js} +8 -8
  15. package/dist/cjs/loader.cjs.js +13 -8
  16. package/dist/cjs/{public-rules-2950f1fc.js → public-rules-2d18cf41.js} +4 -4
  17. package/dist/cjs/{range-c3c48132.js → range-439a0c0c.js} +1 -1
  18. package/dist/cjs/{responsive-format-facade-96c5f598.js → responsive-format-facade-0ececeb3.js} +3 -3
  19. package/dist/cjs/{rich-text-editor-required-rule-4aab05a3.js → rich-text-editor-required-rule-5a4f3626.js} +2 -2
  20. package/dist/cjs/{string-input-formatter-slimmer-338bbd73.js → string-input-formatter-slimmer-a8f4a9b1.js} +2 -2
  21. package/dist/cjs/{style-formatter-9c42d41b.js → style-formatter-142500c0.js} +1 -1
  22. package/dist/cjs/styles.constants-3aff0b56.js +1306 -0
  23. package/dist/cjs/{sub-state-notify-slimmer-1efa69c4.js → sub-state-notify-slimmer-011866d9.js} +1 -1
  24. package/dist/cjs/{sub-state-observer-slimmer-6afa62f5.js → sub-state-observer-slimmer-23d43f1e.js} +1 -1
  25. package/dist/cjs/table-extension-2a20da57.js +6018 -0
  26. package/dist/cjs/vega-accordion.cjs.entry.js +10 -6
  27. package/dist/cjs/vega-app-header-button.cjs.entry.js +10 -6
  28. package/dist/cjs/vega-box.cjs.entry.js +11 -7
  29. package/dist/cjs/vega-button-circle.cjs.entry.js +10 -6
  30. package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
  31. package/dist/cjs/vega-button.cjs.entry.js +9 -5
  32. package/dist/cjs/vega-calendar_4.cjs.entry.js +3 -3
  33. package/dist/cjs/vega-card.cjs.entry.js +10 -6
  34. package/dist/cjs/vega-carousel.cjs.entry.js +9 -5
  35. package/dist/cjs/vega-checkbox_2.cjs.entry.js +3 -3
  36. package/dist/cjs/vega-chip.cjs.entry.js +10 -6
  37. package/dist/cjs/vega-code-block.cjs.entry.js +4 -4
  38. package/dist/cjs/vega-color-picker.cjs.entry.js +3 -3
  39. package/dist/cjs/vega-combo-box.cjs.entry.js +3 -3
  40. package/dist/cjs/vega-date-picker_2.cjs.entry.js +15 -11
  41. package/dist/cjs/vega-dialog_2.cjs.entry.js +17 -13
  42. package/dist/cjs/vega-divider.cjs.entry.js +10 -6
  43. package/dist/cjs/vega-dropdown_5.cjs.entry.js +24 -11
  44. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  45. package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
  46. package/dist/cjs/vega-flag-icon.cjs.entry.js +10 -6
  47. package/dist/cjs/vega-flex.cjs.entry.js +11 -7
  48. package/dist/cjs/vega-font.cjs.entry.js +10 -6
  49. package/dist/cjs/vega-form.cjs.entry.js +4 -4
  50. package/dist/cjs/vega-grid.cjs.entry.js +10 -6
  51. package/dist/cjs/vega-icon.cjs.entry.js +10 -6
  52. package/dist/cjs/vega-image-uploader.cjs.entry.js +12 -8
  53. package/dist/cjs/vega-input-credit-card.cjs.entry.js +3 -3
  54. package/dist/cjs/vega-input-numeric.cjs.entry.js +4 -4
  55. package/dist/cjs/vega-input-passcode.cjs.entry.js +3 -3
  56. package/dist/cjs/vega-input-phone-number.cjs.entry.js +10 -6
  57. package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
  58. package/dist/cjs/vega-input-select.cjs.entry.js +181 -50
  59. package/dist/cjs/vega-input.cjs.entry.js +5 -5
  60. package/dist/cjs/{vega-internal-event-id-f2465f1b.js → vega-internal-event-id-73334b4b.js} +4 -0
  61. package/dist/cjs/vega-left-nav_5.cjs.entry.js +17 -13
  62. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +11 -7
  63. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +1 -1
  64. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +1 -1
  65. package/dist/cjs/vega-pagination.cjs.entry.js +9 -5
  66. package/dist/cjs/vega-popover_2.cjs.entry.js +11 -7
  67. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +11 -7
  68. package/dist/cjs/vega-radio_2.cjs.entry.js +3 -3
  69. package/dist/cjs/vega-rich-text-content.cjs.entry.js +10 -9
  70. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +70 -54
  71. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +1313 -0
  72. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +12 -8
  73. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +4 -4
  74. package/dist/cjs/vega-sidenav_3.cjs.entry.js +15 -11
  75. package/dist/cjs/vega-signature-capture.cjs.entry.js +12 -8
  76. package/dist/cjs/vega-stepper.cjs.entry.js +3 -3
  77. package/dist/cjs/vega-table_11.cjs.entry.js +16 -13
  78. package/dist/cjs/vega-textarea.cjs.entry.js +3 -3
  79. package/dist/cjs/vega-time-picker_2.cjs.entry.js +12 -8
  80. package/dist/cjs/vega-toggle-switch.cjs.entry.js +3 -3
  81. package/dist/cjs/vega-tooltip_2.cjs.entry.js +10 -6
  82. package/dist/cjs/vega.cjs.js +13 -8
  83. package/dist/collection/collection-manifest.json +10 -0
  84. package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.js +6 -3
  85. package/dist/collection/components/vega-dropdown/vega-dropdown.js +31 -0
  86. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-item-controller.js +89 -0
  87. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.js +4 -0
  88. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-value-controller.js +4 -0
  89. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +33 -13
  90. package/dist/collection/components/vega-input-select/vega-input-select.js +27 -7
  91. package/dist/collection/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.js +1 -0
  92. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +10 -0
  93. package/dist/collection/components/vega-rich-text-editor/dto/annotations/plain-text-annotation.js +1 -1
  94. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +24 -2
  95. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +18 -2
  96. package/dist/collection/components/vega-rich-text-editor/extensions/base-extension-renderer.js +2 -1
  97. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +18 -1
  98. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.js +42 -0
  99. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.js +26 -0
  100. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.js +23 -0
  101. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.js +25 -0
  102. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.js +57 -0
  103. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.js +57 -0
  104. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.js +54 -0
  105. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.js +42 -0
  106. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.js +117 -0
  107. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.js +22 -0
  108. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.js +19 -0
  109. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.js +133 -0
  110. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.js +99 -0
  111. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.js +23 -0
  112. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.js +29 -0
  113. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.js +13 -0
  114. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.js +13 -0
  115. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.js +18 -0
  116. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.js +13 -0
  117. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.js +19 -0
  118. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-action.js +26 -0
  119. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.js +13 -0
  120. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.js +18 -0
  121. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.js +13 -0
  122. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.js +18 -0
  123. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.js +18 -0
  124. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.js +13 -0
  125. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.js +15 -0
  126. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.js +38 -0
  127. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +97 -0
  128. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.js +69 -0
  129. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +82 -0
  130. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.js +14 -0
  131. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +91 -0
  132. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.js +57 -0
  133. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +121 -0
  134. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.js +40 -0
  135. package/dist/collection/components/vega-rich-text-editor/extensions/table/constants/styles.constants.js +21 -0
  136. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +119 -0
  137. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +56 -0
  138. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +69 -0
  139. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +66 -0
  140. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +60 -0
  141. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +53 -0
  142. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +60 -0
  143. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.js +50 -0
  144. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.js +42 -0
  145. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.js +42 -0
  146. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +71 -0
  147. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.js +42 -0
  148. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.js +42 -0
  149. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.js +15 -0
  150. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.js +22 -0
  151. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.js +74 -0
  152. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.js +254 -0
  153. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.js +12 -0
  154. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.js +15 -0
  155. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +149 -0
  156. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.js +15 -0
  157. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.js +148 -0
  158. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.js +78 -0
  159. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.js +17 -0
  160. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.js +15 -0
  161. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.js +19 -0
  162. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.js +131 -0
  163. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.js +109 -0
  164. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.js +132 -0
  165. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.js +44 -0
  166. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.js +19 -0
  167. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.js +20 -0
  168. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.js +20 -0
  169. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.js +50 -0
  170. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +152 -0
  171. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-icon.js +3 -0
  172. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-selection.js +371 -0
  173. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.js +234 -0
  174. package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/utils.js +102 -0
  175. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.js +3 -0
  176. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.js +3 -0
  177. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.js +3 -0
  178. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.js +3 -0
  179. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.js +3 -0
  180. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.js +3 -0
  181. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/controllers/vega-rich-text-table-properties-color-controller.js +27 -0
  182. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-cell-properties-form-field-renderer.js +106 -0
  183. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.js +259 -0
  184. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-field-renderer.js +58 -0
  185. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-renderer.js +93 -0
  186. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.css +148 -0
  187. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.js +241 -0
  188. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/controllers/selection-widget-keyboard-controller.js +36 -0
  189. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/renderers/selection-widget-renderer.js +83 -0
  190. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.css +41 -0
  191. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.js +80 -0
  192. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.js +20 -0
  193. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.js +27 -0
  194. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/cell-properties-button-slimmer.js +26 -0
  195. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.js +86 -0
  196. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +101 -0
  197. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-properties-button-slimmer.js +26 -0
  198. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-setting-button-slimmer.abstract.js +75 -0
  199. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.js +50 -0
  200. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.css +20 -0
  201. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.js +215 -0
  202. package/dist/collection/components/vega-rich-text-editor/public-api.js +1 -0
  203. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/extension-controller.js +21 -1
  204. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +10 -0
  205. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +23 -2
  206. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +6 -2
  207. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.js +6 -0
  208. package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +257 -0
  209. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.js +164 -0
  210. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.js +293 -0
  211. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.js +295 -0
  212. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.js +415 -0
  213. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/caption-operation.test.js +99 -0
  214. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.js +89 -0
  215. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.js +79 -0
  216. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.js +128 -0
  217. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-dto.test.js +517 -0
  218. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.js +1450 -0
  219. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-test-utils.js +172 -0
  220. package/dist/collection/components/vega-rich-text-editor/test/spec-utils.js +5 -2
  221. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +4 -0
  222. package/dist/collection/global/scripts/before-vega-load.js +2 -0
  223. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +2 -0
  224. package/dist/collection/utils/spec-utils.js +4 -3
  225. package/dist/esm/align-left-7f959adf.js +17 -0
  226. package/dist/esm/{app-globals-949d2e18.js → app-globals-8b873b6f.js} +7 -6
  227. package/dist/esm/{child-nodes-event-prevent-slimmer-e6f98de5.js → child-nodes-event-prevent-slimmer-a6afdb1e.js} +1 -1
  228. package/dist/esm/{code-block-666674d7.js → code-block-76b29be1.js} +37 -6
  229. package/dist/esm/{component-value-history-controller-slimmer.abstract-171dda08.js → component-value-history-controller-slimmer.abstract-e1b0e163.js} +27 -6
  230. package/dist/esm/{dto-renderer-manager-49ae5d56.js → content-state-03f1d302.js} +32 -61
  231. package/dist/esm/{design-token-9b510e59.js → design-token-8fedb532.js} +1 -1
  232. package/dist/esm/{dom-node-subject-observer-factory-1aaa1159.js → dom-node-subject-observer-factory-e998eba4.js} +1 -1
  233. package/dist/esm/dto-renderer-manager-12bc9121.js +56 -0
  234. package/dist/esm/{element-appender-slimmer-b9890dcb.js → element-appender-slimmer-7b9326e2.js} +4 -4
  235. package/dist/esm/{event-emit-slimmer-2d791d0e.js → event-emit-slimmer-bbf6668c.js} +2 -2
  236. package/dist/esm/{form-field-controller-slimmer-257928c1.js → form-field-controller-slimmer-a0cff4d3.js} +3 -3
  237. package/dist/esm/{image-annotation-action-b3eea6a2.js → image-annotation-action-47cdc068.js} +3 -3
  238. package/dist/esm/index-090d31ca.js +4 -0
  239. package/dist/esm/{index-0d487fae.js → index-da7e5fe5.js} +2 -2
  240. package/dist/esm/index.js +17 -13
  241. package/dist/esm/{internal-vega-event-manager-fdee2a0a.js → internal-vega-event-manager-e799c54a.js} +1 -1
  242. package/dist/esm/{language-extension-b3f836d4.js → language-extension-de6e6caf.js} +2 -2
  243. package/dist/esm/loader.js +15 -10
  244. package/dist/esm/polyfills/core-js.js +0 -0
  245. package/dist/esm/polyfills/dom.js +0 -0
  246. package/dist/esm/polyfills/es5-html-element.js +0 -0
  247. package/dist/esm/polyfills/index.js +0 -0
  248. package/dist/esm/polyfills/system.js +0 -0
  249. package/dist/esm/{public-rules-b164e40e.js → public-rules-c48cc5c9.js} +5 -5
  250. package/dist/esm/{range-9cc1422b.js → range-af6150a8.js} +1 -1
  251. package/dist/esm/{responsive-format-facade-94897ae8.js → responsive-format-facade-16da4623.js} +3 -3
  252. package/dist/esm/{rich-text-editor-required-rule-2131f21c.js → rich-text-editor-required-rule-7255832e.js} +1 -1
  253. package/dist/esm/{string-input-formatter-slimmer-3a42d9b8.js → string-input-formatter-slimmer-82f85b0b.js} +3 -3
  254. package/dist/esm/{style-formatter-bb5aec96.js → style-formatter-6ca58f6b.js} +1 -1
  255. package/dist/esm/styles.constants-0dd6f7fa.js +1277 -0
  256. package/dist/esm/{sub-state-notify-slimmer-71b9bbd5.js → sub-state-notify-slimmer-4060c333.js} +2 -2
  257. package/dist/esm/{sub-state-observer-slimmer-41a1b380.js → sub-state-observer-slimmer-bfa5e63e.js} +2 -2
  258. package/dist/esm/table-extension-c83b7a56.js +5998 -0
  259. package/dist/esm/vega-accordion.entry.js +13 -9
  260. package/dist/esm/vega-app-header-button.entry.js +14 -10
  261. package/dist/esm/vega-banner.entry.js +3 -3
  262. package/dist/esm/vega-box.entry.js +13 -9
  263. package/dist/esm/vega-breadcrumb.entry.js +4 -4
  264. package/dist/esm/vega-button-circle.entry.js +14 -10
  265. package/dist/esm/vega-button-group_2.entry.js +7 -7
  266. package/dist/esm/vega-button-link.entry.js +4 -4
  267. package/dist/esm/vega-button.entry.js +13 -9
  268. package/dist/esm/vega-calendar_4.entry.js +7 -7
  269. package/dist/esm/vega-card.entry.js +12 -8
  270. package/dist/esm/vega-carousel.entry.js +12 -8
  271. package/dist/esm/vega-checkbox_2.entry.js +7 -7
  272. package/dist/esm/vega-chip.entry.js +14 -10
  273. package/dist/esm/vega-code-block.entry.js +8 -8
  274. package/dist/esm/vega-color-picker.entry.js +6 -6
  275. package/dist/esm/vega-combo-box.entry.js +7 -7
  276. package/dist/esm/vega-date-picker_2.entry.js +19 -15
  277. package/dist/esm/vega-dialog_2.entry.js +14 -10
  278. package/dist/esm/vega-divider.entry.js +12 -8
  279. package/dist/esm/vega-dropdown_5.entry.js +28 -15
  280. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  281. package/dist/esm/vega-field-label.entry.js +3 -3
  282. package/dist/esm/vega-file-uploader.entry.js +6 -6
  283. package/dist/esm/vega-flag-icon.entry.js +12 -8
  284. package/dist/esm/vega-flex.entry.js +13 -9
  285. package/dist/esm/vega-font.entry.js +12 -8
  286. package/dist/esm/vega-form.entry.js +8 -8
  287. package/dist/esm/vega-grid.entry.js +12 -8
  288. package/dist/esm/vega-icon.entry.js +12 -8
  289. package/dist/esm/vega-image-uploader.entry.js +15 -11
  290. package/dist/esm/vega-input-credit-card.entry.js +7 -7
  291. package/dist/esm/vega-input-numeric.entry.js +8 -8
  292. package/dist/esm/vega-input-passcode.entry.js +7 -7
  293. package/dist/esm/vega-input-phone-number.entry.js +14 -10
  294. package/dist/esm/vega-input-range.entry.js +7 -7
  295. package/dist/esm/vega-input-select.entry.js +185 -54
  296. package/dist/esm/vega-input.entry.js +8 -8
  297. package/dist/esm/{vega-internal-event-id-4a06d705.js → vega-internal-event-id-3edc9b4e.js} +3 -1
  298. package/dist/esm/vega-item-toggle.entry.js +3 -3
  299. package/dist/esm/vega-left-nav_5.entry.js +16 -12
  300. package/dist/esm/vega-loader-wrapper_2.entry.js +11 -7
  301. package/dist/esm/vega-page-notification_2.entry.js +1 -1
  302. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +4 -4
  303. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
  304. package/dist/esm/vega-pagination.entry.js +13 -9
  305. package/dist/esm/vega-popover_2.entry.js +14 -10
  306. package/dist/esm/vega-progress-tracker_2.entry.js +14 -10
  307. package/dist/esm/vega-radio_2.entry.js +7 -7
  308. package/dist/esm/vega-rich-text-content.entry.js +8 -7
  309. package/dist/esm/vega-rich-text-editor_4.entry.js +53 -37
  310. package/dist/esm/vega-rich-text-table-properties_3.entry.js +1307 -0
  311. package/dist/esm/vega-segment-control.entry.js +3 -3
  312. package/dist/esm/vega-selection-chip_2.entry.js +16 -12
  313. package/dist/esm/vega-selection-tile_2.entry.js +8 -8
  314. package/dist/esm/vega-sidenav_3.entry.js +14 -10
  315. package/dist/esm/vega-signature-capture.entry.js +15 -11
  316. package/dist/esm/vega-stepper.entry.js +7 -7
  317. package/dist/esm/vega-tab-group_2.entry.js +4 -4
  318. package/dist/esm/vega-table_11.entry.js +14 -11
  319. package/dist/esm/vega-textarea.entry.js +7 -7
  320. package/dist/esm/vega-time-picker_2.entry.js +16 -12
  321. package/dist/esm/vega-toggle-switch.entry.js +6 -6
  322. package/dist/esm/vega-tooltip_2.entry.js +12 -8
  323. package/dist/esm/vega.js +15 -10
  324. package/dist/sri/vega-sri-manifest.json +696 -296
  325. package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.d.ts +1 -0
  326. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +8 -1
  327. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-item-controller.d.ts +29 -0
  328. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.d.ts +1 -0
  329. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-value-controller.d.ts +1 -0
  330. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +1 -1
  331. package/dist/types/components/vega-input-select/types.d.ts +5 -0
  332. package/dist/types/components/vega-input-select/vega-input-select.d.ts +12 -4
  333. package/dist/types/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.d.ts +1 -0
  334. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.d.ts +7 -0
  335. package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation.abstract.d.ts +2 -5
  336. package/dist/types/components/vega-rich-text-editor/dto/annotations/block-annotation.abstract.d.ts +3 -3
  337. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +10 -6
  338. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +8 -1
  339. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +15 -2
  340. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.d.ts +25 -0
  341. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.d.ts +20 -0
  342. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.d.ts +19 -0
  343. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.d.ts +14 -0
  344. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.d.ts +31 -0
  345. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.d.ts +28 -0
  346. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.d.ts +27 -0
  347. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.d.ts +19 -0
  348. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.d.ts +27 -0
  349. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.d.ts +12 -0
  350. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.d.ts +20 -0
  351. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.d.ts +41 -0
  352. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.d.ts +45 -0
  353. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.d.ts +13 -0
  354. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.d.ts +12 -0
  355. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.d.ts +12 -0
  356. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.d.ts +15 -0
  357. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.d.ts +17 -0
  358. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.d.ts +20 -0
  359. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.d.ts +23 -0
  360. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-action.d.ts +23 -0
  361. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.d.ts +18 -0
  362. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.d.ts +16 -0
  363. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.d.ts +14 -0
  364. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.d.ts +14 -0
  365. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.d.ts +15 -0
  366. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.d.ts +12 -0
  367. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.d.ts +16 -0
  368. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.d.ts +18 -0
  369. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +43 -0
  370. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.d.ts +26 -0
  371. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.d.ts +42 -0
  372. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.d.ts +13 -0
  373. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +64 -0
  374. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.d.ts +26 -0
  375. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +67 -0
  376. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.d.ts +22 -0
  377. package/dist/types/components/vega-rich-text-editor/extensions/table/constants/styles.constants.d.ts +3 -0
  378. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +79 -0
  379. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +42 -0
  380. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +41 -0
  381. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +45 -0
  382. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +42 -0
  383. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +34 -0
  384. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +44 -0
  385. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.d.ts +29 -0
  386. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.d.ts +26 -0
  387. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.d.ts +26 -0
  388. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.d.ts +27 -0
  389. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.d.ts +26 -0
  390. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.d.ts +26 -0
  391. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.d.ts +12 -0
  392. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.d.ts +13 -0
  393. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.d.ts +37 -0
  394. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.d.ts +88 -0
  395. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.d.ts +12 -0
  396. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.d.ts +12 -0
  397. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +61 -0
  398. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.d.ts +12 -0
  399. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.d.ts +66 -0
  400. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.d.ts +36 -0
  401. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.d.ts +17 -0
  402. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.d.ts +15 -0
  403. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.d.ts +17 -0
  404. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.d.ts +62 -0
  405. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.d.ts +55 -0
  406. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.d.ts +61 -0
  407. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.d.ts +47 -0
  408. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.d.ts +19 -0
  409. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.d.ts +17 -0
  410. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.d.ts +17 -0
  411. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.d.ts +33 -0
  412. package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +36 -0
  413. package/dist/types/components/vega-rich-text-editor/extensions/table/table-icon.d.ts +3 -0
  414. package/dist/types/components/vega-rich-text-editor/extensions/table/table-selection.d.ts +149 -0
  415. package/dist/types/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.d.ts +86 -0
  416. package/dist/types/components/vega-rich-text-editor/extensions/table/utils/utils.d.ts +53 -0
  417. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.d.ts +3 -0
  418. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.d.ts +3 -0
  419. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.d.ts +3 -0
  420. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.d.ts +3 -0
  421. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.d.ts +3 -0
  422. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.d.ts +3 -0
  423. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/controllers/vega-rich-text-table-properties-color-controller.d.ts +14 -0
  424. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-cell-properties-form-field-renderer.d.ts +49 -0
  425. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.d.ts +99 -0
  426. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-field-renderer.d.ts +27 -0
  427. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-renderer.d.ts +33 -0
  428. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.d.ts +57 -0
  429. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/controllers/selection-widget-keyboard-controller.d.ts +15 -0
  430. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/renderers/selection-widget-renderer.d.ts +31 -0
  431. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.d.ts +27 -0
  432. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.d.ts +2 -0
  433. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.d.ts +11 -0
  434. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/cell-properties-button-slimmer.d.ts +11 -0
  435. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.d.ts +28 -0
  436. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.d.ts +36 -0
  437. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-properties-button-slimmer.d.ts +11 -0
  438. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-setting-button-slimmer.abstract.d.ts +36 -0
  439. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.d.ts +11 -0
  440. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.d.ts +55 -0
  441. package/dist/types/components/vega-rich-text-editor/interface.d.ts +39 -2
  442. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +1 -0
  443. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/extension-controller.d.ts +4 -0
  444. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +9 -0
  445. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +19 -6
  446. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/value-controller.d.ts +1 -0
  447. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.d.ts +1 -0
  448. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.d.ts +1 -0
  449. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.d.ts +1 -0
  450. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.d.ts +1 -0
  451. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.d.ts +1 -0
  452. package/dist/types/components/vega-rich-text-editor/test/extensions/table/caption-operation.test.d.ts +1 -0
  453. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.d.ts +1 -0
  454. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.d.ts +1 -0
  455. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.d.ts +1 -0
  456. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-dto.test.d.ts +1 -0
  457. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.d.ts +1 -0
  458. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-test-utils.d.ts +11 -0
  459. package/dist/types/components/vega-rich-text-editor/test/spec-utils.d.ts +4 -0
  460. package/dist/types/components.d.ts +155 -6
  461. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +2 -0
  462. package/dist/types/types/components.type.d.ts +5 -0
  463. package/dist/types/utils/spec-utils.d.ts +2 -3
  464. package/dist/vega/app-globals-955a2b3b.js +427 -0
  465. package/dist/vega/child-nodes-event-prevent-slimmer-a604a6dd.js +156 -0
  466. package/dist/vega/design-token-56b26205.js +402 -0
  467. package/dist/vega/element-appender-slimmer-8355fb28.js +1508 -0
  468. package/dist/vega/event-emit-slimmer-7a14f5e9.js +265 -0
  469. package/dist/vega/index.esm.js +57 -1
  470. package/dist/vega/internal-vega-event-manager-8c62c88e.js +458 -0
  471. package/dist/vega/p-068ee55e.entry.js +1 -0
  472. package/dist/vega/p-088f4613.entry.js +1 -0
  473. package/dist/vega/{p-3162a7fd.entry.js → p-08b4d097.entry.js} +1 -1
  474. package/dist/vega/p-0e4cecbd.entry.js +1 -0
  475. package/dist/vega/p-10ffb765.js +1 -0
  476. package/dist/vega/{p-ead1da57.entry.js → p-12a97dad.entry.js} +1 -1
  477. package/dist/vega/p-151b1deb.js +1 -0
  478. package/dist/vega/{p-30e7544c.js → p-16af7681.js} +1 -1
  479. package/dist/vega/p-1b44db34.js +1 -0
  480. package/dist/vega/p-1bda4016.entry.js +1 -0
  481. package/dist/vega/{p-6e84e451.entry.js → p-1f4a814e.entry.js} +1 -1
  482. package/dist/vega/{p-2ae5ad30.entry.js → p-206245d2.entry.js} +1 -1
  483. package/dist/vega/p-213be5e9.entry.js +1 -0
  484. package/dist/vega/{p-7a8c4cf8.entry.js → p-216f3436.entry.js} +1 -1
  485. package/dist/vega/p-224a4f3f.entry.js +1 -0
  486. package/dist/vega/p-22c76be7.entry.js +1 -0
  487. package/dist/vega/p-22da15d7.entry.js +1 -0
  488. package/dist/vega/{p-2409a475.entry.js → p-24766b9d.entry.js} +1 -1
  489. package/dist/vega/p-29a9c8f5.entry.js +1 -0
  490. package/dist/vega/p-34a994a1.entry.js +1 -0
  491. package/dist/vega/p-39d56e3d.js +1 -0
  492. package/dist/vega/{p-c7194674.entry.js → p-3bc7e162.entry.js} +1 -1
  493. package/dist/vega/p-40660c09.js +1 -0
  494. package/dist/vega/p-50a506ea.entry.js +1 -0
  495. package/dist/vega/{p-f2c8c363.js → p-5367eaab.js} +1 -1
  496. package/dist/vega/p-550ce71a.entry.js +1 -0
  497. package/dist/vega/p-5d2704c1.entry.js +1 -0
  498. package/dist/vega/p-5f377954.js +1 -1
  499. package/dist/vega/p-61ae4e9c.entry.js +1 -0
  500. package/dist/vega/{p-2971b17a.js → p-63246470.js} +1 -1
  501. package/dist/vega/p-6665d083.entry.js +1 -0
  502. package/dist/vega/p-69af3422.entry.js +1 -0
  503. package/dist/vega/p-6d9731c1.entry.js +1 -0
  504. package/dist/vega/p-6f08e3e1.entry.js +1 -0
  505. package/dist/vega/p-7172332a.entry.js +1 -0
  506. package/dist/vega/{p-9d8e2939.entry.js → p-73688c4e.entry.js} +1 -1
  507. package/dist/vega/p-73689ec0.entry.js +1 -0
  508. package/dist/vega/{p-9fb71d8c.entry.js → p-780cbfb0.entry.js} +1 -1
  509. package/dist/vega/p-79e8236a.entry.js +1 -0
  510. package/dist/vega/{p-8fba7f9a.js → p-7ca9f6f1.js} +1 -1
  511. package/dist/vega/{p-f6cd7a08.entry.js → p-813b2915.entry.js} +1 -1
  512. package/dist/vega/{p-e88f2dc3.js → p-8162980c.js} +1 -1
  513. package/dist/vega/p-82ec9721.entry.js +1 -0
  514. package/dist/vega/{p-7f9acdf7.entry.js → p-86caa739.entry.js} +1 -1
  515. package/dist/vega/p-8a4d8139.entry.js +1 -0
  516. package/dist/vega/{p-be0b67b8.entry.js → p-8ac453cb.entry.js} +1 -1
  517. package/dist/vega/p-98b78c75.entry.js +1 -0
  518. package/dist/vega/{p-76e6c13a.js → p-99e3dcab.js} +1 -1
  519. package/dist/vega/{p-44bc9ea9.entry.js → p-9aac9879.entry.js} +1 -1
  520. package/dist/vega/p-a007b493.entry.js +1 -0
  521. package/dist/vega/p-a439e59b.entry.js +1 -0
  522. package/dist/vega/p-a4d0ab07.js +1 -0
  523. package/dist/vega/{p-f38a4be2.entry.js → p-a6e03df4.entry.js} +1 -1
  524. package/dist/vega/{p-4957f07a.entry.js → p-a924c1e2.entry.js} +1 -1
  525. package/dist/vega/p-ab0e013c.entry.js +1 -0
  526. package/dist/vega/p-abf871cd.entry.js +1 -0
  527. package/dist/vega/{p-9dfe2bbc.js → p-ac4bd1f8.js} +1 -1
  528. package/dist/vega/{p-3566ad76.js → p-b91c2c9d.js} +1 -1
  529. package/dist/vega/{p-184d8443.js → p-c00adad9.js} +1 -1
  530. package/dist/vega/{p-697eb0e1.js → p-c335088c.js} +1 -1
  531. package/dist/vega/{p-623c3911.entry.js → p-c3d388b5.entry.js} +1 -1
  532. package/dist/vega/p-c674b07c.js +1 -0
  533. package/dist/vega/p-c6d98c60.entry.js +1 -0
  534. package/dist/vega/p-c78fe943.js +1 -0
  535. package/dist/vega/{p-7f86b3c8.js → p-c8ad47c9.js} +1 -1
  536. package/dist/vega/{p-96797fee.entry.js → p-c9541fc2.entry.js} +1 -1
  537. package/dist/vega/{p-a58bdbad.entry.js → p-d07d04e0.entry.js} +1 -1
  538. package/dist/vega/p-d1349401.entry.js +1 -0
  539. package/dist/vega/{p-c0036e71.js → p-d2033624.js} +1 -1
  540. package/dist/vega/{p-74a77cad.js → p-d466baf7.js} +1 -1
  541. package/dist/vega/p-d4719c14.entry.js +1 -0
  542. package/dist/vega/{p-82dbff54.entry.js → p-d4e35d2e.entry.js} +1 -1
  543. package/dist/vega/p-d55365b9.entry.js +1 -0
  544. package/dist/vega/p-db482ee1.js +1 -0
  545. package/dist/vega/p-dc2813eb.entry.js +1 -0
  546. package/dist/vega/{p-676eaf3f.entry.js → p-dd5d917b.entry.js} +1 -1
  547. package/dist/vega/{p-5be29f14.js → p-ddf81373.js} +1 -1
  548. package/dist/vega/p-e0cefd90.entry.js +1 -0
  549. package/dist/vega/p-e13c163c.entry.js +1 -0
  550. package/dist/vega/{p-a5d4d168.entry.js → p-e788598a.entry.js} +1 -1
  551. package/dist/vega/{p-6b9d2996.entry.js → p-e797bf8d.entry.js} +1 -1
  552. package/dist/vega/p-f4b46f6b.entry.js +1 -0
  553. package/dist/vega/p-f519cdc3.entry.js +1 -0
  554. package/dist/vega/{p-9b673fd4.entry.js → p-f6eab527.entry.js} +1 -1
  555. package/dist/vega/{p-c7f292dd.entry.js → p-fa34ace2.entry.js} +1 -1
  556. package/dist/vega/p-fbfb4c70.entry.js +1 -0
  557. package/dist/vega/p-fcabf0dc.js +1 -0
  558. package/dist/vega/{p-8bd496b4.js → p-ff57c872.js} +1 -1
  559. package/dist/vega/p-ff921d10.js +1 -0
  560. package/dist/vega/p-ff9a0e6e.js +1 -0
  561. package/dist/vega/public-api-8dd022fa.js +6043 -0
  562. package/dist/vega/public-api-baaf7593.js +4 -0
  563. package/dist/vega/responsive-format-facade-98596535.js +913 -0
  564. package/dist/vega/style-formatter-0ae102e9.js +32 -0
  565. package/dist/vega/vega-accordion.entry.js +291 -0
  566. package/dist/vega/vega-app-header-button.entry.js +452 -0
  567. package/dist/vega/vega-banner.entry.js +351 -0
  568. package/dist/vega/vega-box.entry.js +353 -0
  569. package/dist/vega/vega-breadcrumb.entry.js +249 -0
  570. package/dist/vega/vega-button-circle.entry.js +245 -0
  571. package/dist/vega/vega-button-group.entry.js +203 -0
  572. package/dist/vega/vega-button-link.entry.js +226 -0
  573. package/dist/vega/vega-button.entry.js +259 -0
  574. package/dist/vega/vega-calendar.entry.js +3884 -0
  575. package/dist/vega/vega-card.entry.js +226 -0
  576. package/dist/vega/vega-carousel.entry.js +540 -0
  577. package/dist/vega/vega-checkbox-group.entry.js +266 -0
  578. package/dist/vega/vega-checkbox.entry.js +335 -0
  579. package/dist/vega/vega-chip.entry.js +321 -0
  580. package/dist/vega/vega-code-block.entry.js +4372 -0
  581. package/dist/vega/vega-color-picker.entry.js +258 -0
  582. package/dist/vega/vega-combo-box.entry.js +748 -0
  583. package/dist/vega/vega-date-picker-calendar.entry.js +1381 -0
  584. package/dist/vega/vega-date-picker.entry.js +1646 -0
  585. package/dist/vega/vega-dialog.entry.js +158 -0
  586. package/dist/vega/vega-divider.entry.js +179 -0
  587. package/dist/vega/vega-dropdown-content-box.entry.js +57 -0
  588. package/dist/vega/vega-dropdown-item.entry.js +352 -0
  589. package/dist/vega/vega-dropdown.entry.js +2136 -0
  590. package/dist/vega/vega-field-label.entry.js +182 -0
  591. package/dist/vega/vega-file-uploader.entry.js +751 -0
  592. package/dist/vega/vega-flag-icon.entry.js +216 -0
  593. package/dist/vega/vega-flex.entry.js +224 -0
  594. package/dist/vega/vega-font.entry.js +327 -0
  595. package/dist/vega/vega-form.entry.js +1008 -0
  596. package/dist/vega/vega-grid.entry.js +129 -0
  597. package/dist/vega/vega-icon.entry.js +256 -0
  598. package/dist/vega/vega-image-uploader.entry.js +977 -0
  599. package/dist/vega/vega-input-credit-card.entry.js +549 -0
  600. package/dist/vega/vega-input-numeric.entry.js +471 -0
  601. package/dist/vega/vega-input-passcode.entry.js +728 -0
  602. package/dist/vega/vega-input-phone-number.entry.js +9143 -0
  603. package/dist/vega/vega-input-range.entry.js +693 -0
  604. package/dist/vega/vega-input-select.entry.js +1268 -0
  605. package/dist/vega/vega-input.entry.js +1735 -0
  606. package/dist/vega/vega-item-toggle.entry.js +190 -0
  607. package/dist/vega/vega-left-nav-group.entry.js +433 -0
  608. package/dist/vega/vega-left-nav-link.entry.js +317 -0
  609. package/dist/vega/vega-left-nav-section.entry.js +97 -0
  610. package/dist/vega/vega-left-nav.entry.js +654 -0
  611. package/dist/vega/vega-loading-indicator.entry.js +209 -0
  612. package/dist/vega/vega-modal.entry.js +1287 -0
  613. package/dist/vega/vega-nav-card.entry.js +163 -0
  614. package/dist/vega/vega-pagination-page-selector-mobile.entry.js +214 -0
  615. package/dist/vega/vega-pagination.entry.js +629 -0
  616. package/dist/vega/vega-popover-content-box.entry.js +101 -0
  617. package/dist/vega/vega-popover.entry.js +362 -0
  618. package/dist/vega/vega-progress-tracker.entry.js +757 -0
  619. package/dist/vega/vega-radio-group.entry.js +496 -0
  620. package/dist/vega/vega-radio.entry.js +272 -0
  621. package/dist/vega/vega-rich-text-editor-toolbar-button.entry.js +169 -0
  622. package/dist/vega/vega-rich-text-editor.entry.js +4107 -0
  623. package/dist/vega/vega-rich-text-image-editor.entry.js +216 -0
  624. package/dist/vega/vega-rich-text-link-editor.entry.js +238 -0
  625. package/dist/vega/vega-rich-text-table-properties.entry.js +641 -0
  626. package/dist/vega/vega-rich-text-table-setting.entry.js +525 -0
  627. package/dist/vega/vega-segment-control.entry.js +350 -0
  628. package/dist/vega/vega-selection-chip-group.entry.js +447 -0
  629. package/dist/vega/vega-selection-chip.entry.js +443 -0
  630. package/dist/vega/vega-selection-tile-group.entry.js +438 -0
  631. package/dist/vega/vega-selection-tile.entry.js +409 -0
  632. package/dist/vega/vega-sidenav-link.entry.js +160 -0
  633. package/dist/vega/vega-sidenav.entry.js +766 -0
  634. package/dist/vega/vega-signature-capture.entry.js +589 -0
  635. package/dist/vega/vega-stepper.entry.js +292 -0
  636. package/dist/vega/vega-tab-group-panel.entry.js +79 -0
  637. package/dist/vega/vega-tab-group.entry.js +1281 -0
  638. package/dist/vega/vega-table-body.entry.js +48 -0
  639. package/dist/vega/vega-table-cell.entry.js +243 -0
  640. package/dist/vega/vega-table-foot-cell.entry.js +169 -0
  641. package/dist/vega/vega-table-foot-row.entry.js +219 -0
  642. package/dist/vega/vega-table-foot.entry.js +136 -0
  643. package/dist/vega/vega-table-head-cell.entry.js +339 -0
  644. package/dist/vega/vega-table-head-row.entry.js +416 -0
  645. package/dist/vega/vega-table-head.entry.js +113 -0
  646. package/dist/vega/vega-table-row.entry.js +666 -0
  647. package/dist/vega/vega-table.entry.js +3707 -0
  648. package/dist/vega/vega-textarea.entry.js +329 -0
  649. package/dist/vega/vega-time-picker.entry.js +2039 -0
  650. package/dist/vega/vega-toggle-switch.entry.js +194 -0
  651. package/dist/vega/vega-tooltip.entry.js +339 -0
  652. package/dist/vega/vega.esm.js +172 -1
  653. package/package.json +1 -1
  654. package/style/vega-icons.css +17266 -0
  655. package/dist/cjs/function-extension-78ec27e0.js +0 -2927
  656. package/dist/esm/function-extension-8b06c6f8.js +0 -2908
  657. package/dist/vega/p-03e16a05.entry.js +0 -1
  658. package/dist/vega/p-0ad59141.entry.js +0 -1
  659. package/dist/vega/p-0ba0f83d.entry.js +0 -1
  660. package/dist/vega/p-114c6df8.entry.js +0 -1
  661. package/dist/vega/p-1e019406.js +0 -1
  662. package/dist/vega/p-1faef917.entry.js +0 -1
  663. package/dist/vega/p-21cba83b.entry.js +0 -1
  664. package/dist/vega/p-21e7808a.entry.js +0 -1
  665. package/dist/vega/p-2b20a215.entry.js +0 -1
  666. package/dist/vega/p-2bc4f7d9.entry.js +0 -1
  667. package/dist/vega/p-2e0deef6.js +0 -1
  668. package/dist/vega/p-2f592078.entry.js +0 -1
  669. package/dist/vega/p-38ed3d59.entry.js +0 -1
  670. package/dist/vega/p-3938880f.entry.js +0 -1
  671. package/dist/vega/p-398220f5.entry.js +0 -1
  672. package/dist/vega/p-40561fa0.entry.js +0 -1
  673. package/dist/vega/p-42a283b5.entry.js +0 -1
  674. package/dist/vega/p-524ffc12.entry.js +0 -1
  675. package/dist/vega/p-59fa3f68.js +0 -1
  676. package/dist/vega/p-5b71c85e.js +0 -1
  677. package/dist/vega/p-5f09868d.entry.js +0 -1
  678. package/dist/vega/p-6e701542.entry.js +0 -1
  679. package/dist/vega/p-70b2906a.entry.js +0 -1
  680. package/dist/vega/p-721b2981.entry.js +0 -1
  681. package/dist/vega/p-75d91ee9.entry.js +0 -1
  682. package/dist/vega/p-79a544d6.js +0 -1
  683. package/dist/vega/p-7b337fd4.entry.js +0 -1
  684. package/dist/vega/p-7be3aefc.entry.js +0 -1
  685. package/dist/vega/p-94cf46ca.entry.js +0 -1
  686. package/dist/vega/p-a125cfec.entry.js +0 -1
  687. package/dist/vega/p-a3c4fa30.entry.js +0 -1
  688. package/dist/vega/p-aab0deab.js +0 -1
  689. package/dist/vega/p-adc615a4.entry.js +0 -1
  690. package/dist/vega/p-b007d0d5.entry.js +0 -1
  691. package/dist/vega/p-b406a846.entry.js +0 -1
  692. package/dist/vega/p-bd60c72e.entry.js +0 -1
  693. package/dist/vega/p-bf61d136.js +0 -1
  694. package/dist/vega/p-c2ac6b47.entry.js +0 -1
  695. package/dist/vega/p-c4700277.entry.js +0 -1
  696. package/dist/vega/p-ce2ffff7.js +0 -1
  697. package/dist/vega/p-d01fe83d.entry.js +0 -1
  698. package/dist/vega/p-db62b038.entry.js +0 -1
  699. package/dist/vega/p-dd72ad9e.js +0 -1
  700. package/dist/vega/p-e39aa2ea.entry.js +0 -1
  701. package/dist/vega/p-f3831dc9.entry.js +0 -1
  702. package/dist/vega/p-f427d88c.entry.js +0 -1
@@ -1 +1 @@
1
- import{h as t,r as e,c as i,H as n,g as a}from"./p-6b2342e0.js";import{I as o}from"./p-abd7aeaa.js";import{M as s,a as r}from"./p-f0ff4463.js";import{M as p,a as l}from"./p-cdbbdcc2.js";import{R as c}from"./p-280cbcdb.js";import{s as h}from"./p-519a7d55.js";import{C as d}from"./p-75b58efe.js";import{c as u,V as f,M as v,I as x}from"./p-6e1ab235.js";import{s as g}from"./p-6bd5c49b.js";import{V as m,I as b}from"./p-d849e0f5.js";import{F as w}from"./p-30e7544c.js";import{c as y}from"./p-f2c8c363.js";import{D as C,a as j,d as k,w as I,g as R,F as z,G as S,H as E}from"./p-8bd496b4.js";import{S as O}from"./p-6c1ef2ed.js";import{S as T}from"./p-d991fb11.js";import{i as F}from"./p-161b9c5b.js";import{S as N}from"./p-3566ad76.js";import{i as V}from"./p-d27ae9ff.js";import{d as L}from"./p-bf19682d.js";import{m as M,n as P,o as A}from"./p-5b71c85e.js";import{P as D}from"./p-10ac8b57.js";import{S as $}from"./p-59fa3f68.js";import{a as B}from"./p-8c9ea6f4.js";import{c as _}from"./p-86194314.js";import{C as U}from"./p-2d0d575f.js";import{F as W}from"./p-a528714c.js";import"./p-262ec334.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-f69f84a7.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-697eb0e1.js";import"./p-b75ee3ba.js";import"./p-ed45b3b6.js";import"./p-40f39194.js";import"./p-d884c644.js";import"./p-ce2ffff7.js";import"./p-5d676a94.js";const K=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)])$/;class q extends o{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=K.test(t.toLowerCase());return{isValid:e,message:e?"":"Please enter the correct email format."}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t&&t.length>0}}class G extends f{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);o>3&&s&&Object.defineProperty(e,i,s)}([u()],G.prototype,"disableCopyPaste",void 0);var H=function(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class J extends f{render(){const e=this.hasPrefixSlot();if(this.prefixIcon||e)return t("div",{class:{"vega-input-prefix":!0,"vega-input-prefix-slot":e},part:"prefix-icon-container"},this.prefixIcon&&!e?t("vega-icon",{icon:this.prefixIcon,size:"size-16"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}H([u()],J.prototype,"host",void 0),H([u()],J.prototype,"prefixIcon",void 0);class Q extends T{format(t){if(!t.length)return t;const e=Number(t.replace(/,/g,""));return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e.toLocaleString("en-US"):t}calculateCaretPosition(t,e){const i=this.format(t),n=t.substring(0,e),a=i.substring(0,e),o=(n.match(/,/g)||[]).length;return e+((a.match(/,/g)||[]).length-o)}}class X extends T{constructor(t){super(),this.maskConfig={allowNegative:!0},this.skipFormat=t=>this.maskConfig.allowNegative&&"-"===t||null!=this.maskConfig.precision&&this.maskConfig.precision>0&&t.split(".").length-1==1&&t.endsWith(".")&&!t.startsWith("."),this.maskConfig=Object.assign(Object.assign({},this.maskConfig),t),this.mask=new RegExp(this.getRegExp())}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t)&&i.pop()}return i.join("")}calculateCaretPosition(t,e){if(F(e)){const i=this.redressAbnormalNumber(t);return e-(t.length-i.length)}}inputNeedFormat(t){return!this.mask.test(t)}redressAbnormalNumber(t){let e=t.replace(/^0+(?!$)/,"");return e.startsWith(".")&&(e=`0${e}`),e}getRegExp(){const t=this.maskConfig.allowNegative?"(\\-)?":"";let e;return e=0===this.maskConfig.precision?`^${t}(0|[1-9][0-9]*)$`:this.maskConfig.precision&&this.maskConfig.precision>0?`^${t}(0|0\\.\\d{1,${this.maskConfig.precision}}|[1-9][0-9]*(\\.\\d{1,${this.maskConfig.precision}})?)$`:`^${t}(0|0\\.\\d*|[1-9][0-9]*(\\.\\d*)?)$`,e}}class Y extends T{constructor(t,e=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(F(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class Z extends X{constructor(t){super(t)}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t.replace(/,/g,""))&&i.pop()}return this.thousandCommaFormat(i.join(""))}calculateCaretPosition(t,e){const i=this.redressAbnormalNumber(t),n=this.format(t),a=t.substring(0,e),o=n.substring(0,e),s=(a.match(/,/g)||[]).length;return e+((o.match(/,/g)||[]).length-s)-(t.length-i.length)}thousandCommaFormat(t){if(!t.length)return t;const e=t.replace(/[^\d.-]/g,""),i=e.indexOf("."),n=e.length>1&&i>=1?e.slice(i):"",a=Number(e.split(".")[0]);return!isNaN(a)&&a<=Number.MAX_SAFE_INTEGER?a.toLocaleString("en-US")+n:e}}var tt=function(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class et extends N{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRenderer.getInputRef(),this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}connectedCallback(){this.initSetupMaskConfigObserver()}disconnectedCallback(){this.removeSetupMaskConfigObserver()}watchValue(t,e){t!==e&&this.formatValueAfterValueChange()}watchMaskChange(t,e){this.areMaskConfigsEqual(t,e)||this.setup()}watchTypeChange(t,e){"number"!==t&&"number"!==e||this.setup()}generateMaskStrategy(t){let e=null;Array.isArray(this.maskConfig)?e=this.maskConfig.find((e=>"blur"===t?this.isBlurModeMaskConfig(e):!this.isBlurModeMaskConfig(e))):this.maskConfig&&("blur"===t&&this.isBlurModeMaskConfig(this.maskConfig)?e=this.maskConfig:"input"!==t||this.isBlurModeMaskConfig(this.maskConfig)||(e=this.maskConfig));let i=null;switch(null==e?void 0:e.type){case"phone":i=O.PHONE_MASK;break;case"taxId":i=O.TAX_ID_MASK;break;case"zipcode":i=O.ZIPCODE_MASK;break;case"thousand-comma":i=new Q;break;case"number":i=this.getNumberTypeMaskStrategy(e.options);break;case"custom":i=e.strategy?e.strategy():new O(e.options);break;case"custom-formatter":i=new Y(e.formatter,e.resetCaretPosition)}return"number"!==this.type||"input"!==t||e||(i=new X),i}getNumberTypeMaskStrategy(t){return t&&t.thousandComma?new Z(t):new X(t)}isBlurModeMaskConfig(t){return"custom"===t.type&&"blur"===t.trigger}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return V(i,n,!0,((t,e)=>L(t,e)?0:-1))}initSetupMaskConfigObserver(){C.addUniqueObserverToNode(this.host,M,this.setup.bind(this))}removeSetupMaskConfigObserver(){C.removeUniqueObserverFromNode(this.host,M)}}tt([u()],et.prototype,"maskConfig",void 0),tt([u()],et.prototype,"disableCopyPaste",void 0),tt([u()],et.prototype,"type",void 0),tt([u()],et.prototype,"inputRenderer",void 0),tt([v("connectedCallback")],et.prototype,"connectedCallback",null),tt([v("disconnectedCallback")],et.prototype,"disconnectedCallback",null),tt([v("watchValue")],et.prototype,"watchValue",null),tt([v("watchMaskChange")],et.prototype,"watchMaskChange",null),tt([v("watchTypeChange")],et.prototype,"watchTypeChange",null);const it=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!1===t.autoValidation},{payloadKey:"EMAIL_IS_TRUE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!0===t.email},{payloadKey:"EMAIL_IS_FALSE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!1===t.email}];var nt=function(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class at extends f{componentDidLoad(){this.setInputAutoWidth()}watchValue(){this.setInputAutoWidth()}watchSuffixText(){this.setInputAutoWidth()}setInputAutoWidth(){const t=this.host.shadowRoot.querySelector(".vega-input-container"),e=null==t?void 0:t.querySelector(".vega-input-input"),i=null==e?void 0:e.querySelector("input");if(i&&(t.classList.remove("auto-width"),i.style.removeProperty("width"),this.isCompactInputWidth&&this.suffixText)){const n=this.getActualInputWidth();e.getBoundingClientRect().width>n&&(i.style.width=`${n}px`,t.classList.add("auto-width"))}}getActualInputWidth(){const t=this.getCalculateTextWidthContainer();t.style.display="inline-block",t.textContent=`${this.value||this.placeholder||""}`;const e=t.getBoundingClientRect().width;return t.style.display="none",e}getCalculateTextWidthContainer(){if(!this.calculateTextWidthContainer){const t=document.createElement("div");t.classList.add("v-font-field-value"),t.style.visibility="hidden",t.style.display="none",this.host.shadowRoot.append(t),this.calculateTextWidthContainer=t}return this.calculateTextWidthContainer}}nt([u()],at.prototype,"host",void 0),nt([u()],at.prototype,"value",void 0),nt([u()],at.prototype,"placeholder",void 0),nt([u()],at.prototype,"isCompactInputWidth",void 0),nt([u()],at.prototype,"suffixText",void 0),nt([v("componentDidLoad")],at.prototype,"componentDidLoad",null),nt([v("watchValue")],at.prototype,"watchValue",null),nt([v("watchSuffixText")],at.prototype,"watchSuffixText",null);var ot=function(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class st extends ${constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"prefixText",parentStateName:"prefixText"},{subStateName:"suffixText",parentStateName:"suffixText"},{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}ot([u()],st.prototype,"host",void 0),ot([u({writable:!0})],st.prototype,"prefixText",void 0),ot([u({writable:!0})],st.prototype,"suffixText",void 0),ot([u({writable:!0})],st.prototype,"isCompactInputWidth",void 0);var rt=function(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class pt extends f{render(){return t("vega-button-circle",{icon:B.getIconKey(this.isPasswordDisplay?"eye":"eye-slash"),variant:"icon-only",size:"small",class:"password-eye-button",ref:t=>{this.addEyeIconObserver(t)}})}addEyeIconObserver(t){C.addUniqueObserverToNode(t,j,(()=>{this.isPasswordDisplay=!this.isPasswordDisplay}))}}B.register({eye:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>'},"eye-slash":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"/></svg>'}}),rt([u()],pt.prototype,"host",void 0),rt([u({writable:!0})],pt.prototype,"isPasswordDisplay",void 0),rt([u()],pt.prototype,"type",void 0);var lt=function(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class ct extends f{constructor(){super(...arguments),this.renderPrefixText=()=>this.prefixText&&t("div",{class:"prefix-text"},this.prefixText),this.renderSuffixText=()=>this.suffixText&&t("div",{class:"suffix-text"},this.suffixText),this.onClickClearIcon=()=>{U.notify(k.getSubject(this.host,P),"")},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value),this.onClearInputFocus=()=>{this.inputContainerRef.classList.add("no-focus")},this.onClearInputBlur=()=>{this.inputContainerRef.classList.remove("no-focus")},this.onContainerClick=()=>{U.notify(k.getSubject(this.host,A),{})}}getInputContainerRef(){return this.inputContainerRef}render(){return t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:{"vega-input-container":!0,"with-value":!!this.value,[`vega-input-size-${this.size}`]:!0,"vega-input-disabled":this.disabled,"compact-input-width":this.isCompactInputWidth},onClick:this.onContainerClick,"aria-label":"input container","aria-disabled":`${this.disabled}`,role:"textbox",tabIndex:this.disabled?null:-1,onKeyDown:_()},this.prefixSlotRenderer.render(),this.renderPrefixText(),this.inputRenderer.render(),this.renderSuffixText(),"password"===this.type?this.passwordEyeRenderer.render():this.showClearIcon&&this.renderClearIcon())}renderClearIcon(){return t("div",{class:{"vega-input-clear-icon":!0,invisible:!this.isClearIconVisible()},tabIndex:this.disabled?-1:0,"aria-label":"clear input",role:"button",onClick:this.onClickClearIcon,onKeyDown:_(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}}lt([u()],ct.prototype,"host",void 0),lt([u()],ct.prototype,"value",void 0),lt([u()],ct.prototype,"size",void 0),lt([u()],ct.prototype,"disabled",void 0),lt([u()],ct.prototype,"type",void 0),lt([u()],ct.prototype,"showClearIcon",void 0),lt([u()],ct.prototype,"prefixText",void 0),lt([u()],ct.prototype,"suffixText",void 0),lt([u()],ct.prototype,"isCompactInputWidth",void 0),lt([u()],ct.prototype,"prefixSlotRenderer",void 0),lt([u()],ct.prototype,"passwordEyeRenderer",void 0),lt([u()],ct.prototype,"inputRenderer",void 0);var ht=function(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class dt extends f{constructor(){super(...arguments),this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.notifySetupMaskConfig())},this.handleInputFocus=t=>{this.focusEventEmitter.emit(void 0,t)},this.handleInputBlur=t=>{this.blurEventEmitter.emit(void 0,t)},this.handleInputPaste=t=>{this.pasteEventEmitter.emit(t.clipboardData).defaultPrevented&&t.preventDefault()},this.onInputHandler=()=>{"change"!==this.valueUpdateTrigger&&this.notifyInputValueChange()},this.inputChangeHandler=()=>{"change"===this.valueUpdateTrigger&&this.notifyInputValueChange()}}connectedCallback(){this.initInputFocusObserver()}disconnectedCallback(){this.removeInputFocusObserver()}doFocus(){this.focusInput()}doBlur(){this.inputRef.blur()}getInputRef(){return this.inputRef}render(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:this.getInputType(),autoComplete:this.autocomplete,inputmode:this.inputmode,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,"aria-label":this.label||"No label defined",minLength:this.minLength,maxLength:this.maxLength,onBlur:t=>this.handleInputBlur(t),onFocus:t=>this.handleInputFocus(t),onChange:this.inputChangeHandler,onInput:this.onInputHandler,onPaste:t=>this.handleInputPaste(t)},this.copyPasteController.getCopyPasteProps())))}getInputType(){switch(this.type){case"number":return"text";case"password":return this.isPasswordDisplay?"text":"password";default:return this.type}}notifyInputValueChange(){U.notify(k.getSubject(this.host,P),this.inputRef.value)}notifySetupMaskConfig(){U.notify(k.getSubject(this.host,M),{})}initInputFocusObserver(){C.addUniqueObserverToNode(this.host,A,this.focusInput.bind(this))}removeInputFocusObserver(){C.removeUniqueObserverFromNode(this.host,A)}focusInput(){this.inputRef.focus()}}ht([u()],dt.prototype,"host",void 0),ht([u()],dt.prototype,"value",void 0),ht([u()],dt.prototype,"disabled",void 0),ht([u()],dt.prototype,"type",void 0),ht([u()],dt.prototype,"label",void 0),ht([u()],dt.prototype,"name",void 0),ht([u()],dt.prototype,"autocomplete",void 0),ht([u()],dt.prototype,"inputmode",void 0),ht([u()],dt.prototype,"placeholder",void 0),ht([u()],dt.prototype,"minLength",void 0),ht([u()],dt.prototype,"maxLength",void 0),ht([u()],dt.prototype,"isPasswordDisplay",void 0),ht([u()],dt.prototype,"valueUpdateTrigger",void 0),ht([u()],dt.prototype,"focusEventEmitter",void 0),ht([u()],dt.prototype,"blurEventEmitter",void 0),ht([u()],dt.prototype,"pasteEventEmitter",void 0),ht([u()],dt.prototype,"copyPasteController",void 0),ht([v("connectedCallback")],dt.prototype,"connectedCallback",null),ht([v("disconnectedCallback")],dt.prototype,"disconnectedCallback",null),ht([v("doFocus")],dt.prototype,"doFocus",null),ht([v("doBlur")],dt.prototype,"doBlur",null);var ut=function(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class ft extends f{constructor(){super(...arguments),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()},this.handleLabelClick=()=>{U.notify(k.getSubject(this.host,A),{})}}render(){return t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),this.inputContainerRenderer.render(),this.renderHintDom())}renderLabelDom(){return t("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label,suffixButtonProps:this.labelSuffixButtonProps,suffixButtonConfig:this.labelSuffixButtonConfig,ref:t=>{C.addUniqueObserverToNode(t,I,this.handleLabelButtonClick),C.addUniqueObserverToNode(t,j,this.handleLabelClick)}})}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}}ut([u()],ft.prototype,"host",void 0),ut([u()],ft.prototype,"disabled",void 0),ut([u()],ft.prototype,"required",void 0),ut([u()],ft.prototype,"label",void 0),ut([u()],ft.prototype,"hint",void 0),ut([u()],ft.prototype,"labelSuffixButtonProps",void 0),ut([u()],ft.prototype,"labelSuffixButtonConfig",void 0),ut([u()],ft.prototype,"labelButtonClickEventEmitter",void 0),ut([u()],ft.prototype,"inputContainerRenderer",void 0);var vt=function(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class xt extends f{connectedCallback(){this.initValueUpdateObserver()}disconnectedCallback(){this.removeValueUpdateObserver()}watchValue(t){this.changeEventEmitter.emit(t);const e=this.inputRenderer.getInputRef();e.value!==this.value&&(e.value=this.value),U.notify(W,{host:this.host,detail:this.value})}initValueUpdateObserver(){C.addUniqueObserverToNode(this.host,P,this.setValue.bind(this))}removeValueUpdateObserver(){C.removeUniqueObserverFromNode(this.host,P)}setValue(t){this.value=t}}vt([u()],xt.prototype,"host",void 0),vt([u({writable:!0})],xt.prototype,"value",void 0),vt([u()],xt.prototype,"changeEventEmitter",void 0),vt([u()],xt.prototype,"inputRenderer",void 0),vt([v("connectedCallback")],xt.prototype,"connectedCallback",null),vt([v("disconnectedCallback")],xt.prototype,"disconnectedCallback",null),vt([v("watchValue")],xt.prototype,"watchValue",null);var gt=function(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};const mt=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",7),this.labelButtonClick=i(this,"labelButtonClick",7),this.vegaPaste=i(this,"vegaPaste",7),this.paste=i(this,"paste",7),this.globalSlimmers={},this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new c:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new s({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new r({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new p({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new l({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new q:null},{propertyName:"type",ruleFactory:t=>"email"===t?new q:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRenderer.getInputContainerRef(),touchableAreaGetter:()=>[this.inputRenderer.getInputRef()]}),this.pageResizeObserverSlimmer=new D({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.copyPasteController=new G,this.compactWidthController=new at,this.stateController=new st,this.maskConfigController=new et,this.valueController=new xt,this.prefixSlotRenderer=new J,this.renderer=new ft,this.inputContainerRenderer=new ct,this.inputRenderer=new dt,this.changeEventEmitter=y(mt,R),this.focusEventEmitter=y(mt,z),this.blurEventEmitter=y(mt,S),this.labelButtonClickEventEmitter=y(mt,I),this.pasteEventEmitter=y(mt,E),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(it),this.passwordEyeRenderer=new pt,this.label="",this.labelSuffixButtonProps=null,this.labelSuffixButtonConfig=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.email=!1,this.required=!1,this.min=null,this.max=null,this.minLength=null,this.maxLength=null,this.showClearIcon=!0,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.disabled=!1,this.hint="",this.disableCopyPaste=!1}watchSuffixText(){}watchValue(t){}watchTypeChange(t,e){}watchValidationRules(){}watchMaskChange(t,e){}async doFocus(){}async doBlur(){}render(){return g(t("slot",null)),h(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.renderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{suffixText:["watchSuffixText"],value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"]}}};gt([b()],mt.prototype,"globalSlimmers",void 0),gt([x()],mt.prototype,"formFieldController",void 0),gt([x()],mt.prototype,"pageResizeObserverSlimmer",void 0),gt([x()],mt.prototype,"copyPasteController",void 0),gt([x()],mt.prototype,"compactWidthController",void 0),gt([x()],mt.prototype,"stateController",void 0),gt([x()],mt.prototype,"maskConfigController",void 0),gt([x()],mt.prototype,"valueController",void 0),gt([x()],mt.prototype,"prefixSlotRenderer",void 0),gt([x()],mt.prototype,"renderer",void 0),gt([x()],mt.prototype,"inputContainerRenderer",void 0),gt([x()],mt.prototype,"inputRenderer",void 0),gt([x()],mt.prototype,"changeEventEmitter",void 0),gt([x()],mt.prototype,"focusEventEmitter",void 0),gt([x()],mt.prototype,"blurEventEmitter",void 0),gt([x()],mt.prototype,"labelButtonClickEventEmitter",void 0),gt([x()],mt.prototype,"pasteEventEmitter",void 0),gt([x()],mt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),gt([x()],mt.prototype,"passwordEyeRenderer",void 0),gt([d()],mt.prototype,"watchMaskChange",null),mt.style=':host{cursor:text;display:block;text-align:left;line-height:normal}:host(.vega-input-inline-block){display:inline-block;width:100%}:host(.vega-input-hidden){display:none}vega-field-label{margin-bottom:8px}.vega-input-container{display:flex;align-items:center;border-radius:8px;gap:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))}.vega-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-container.vega-input-disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled input{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.vega-input-container.with-value{border-width:1px;border-style:solid;border-radius:8px}.vega-input-container:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}.vega-input-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-input-container.error:not(.no-focus):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))}.vega-input-container.error .vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}.vega-input-prefix{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}.vega-input-prefix.vega-input-prefix-slot{height:24px;overflow:hidden}.vega-input-input{flex:1 1 0%;position:relative}.vega-input-input input{width:100%;outline:2px solid transparent;outline-offset:2px;border-style:none;height:24px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-input input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-input-size-small{padding-top:8px;padding-right:12px;padding-bottom:8px;padding-left:12px}.vega-input-size-default{padding-top:12px;padding-right:16px;padding-bottom:12px;padding-left:16px}.vega-input-input input:disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.vega-hint{padding-top:12px;padding-right:8px;padding-left:8px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{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){.vega-hint>label{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){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error{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));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.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){.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){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-input-clear-icon{width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border-radius:4px;padding:2px}.vega-input-clear-icon.invisible{visibility:hidden}.vega-input-clear-icon vega-icon{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=password]::-ms-reveal{display:none}.vega-input-container.compact-input-width{gap:0px}.vega-input-container.compact-input-width .vega-input-prefix{margin-right:8px}.vega-input-container.compact-input-width .prefix-text,.vega-input-container.compact-input-width .suffix-text{margin-right:2px}.vega-input-container.compact-input-width .vega-input-clear-icon{margin-left:2px}.vega-input-container.compact-input-width .vega-input-input input{padding:0px;min-width:1px}.vega-input-container.compact-input-width.auto-width .vega-input-input{flex-grow:0}.vega-input-container.compact-input-width.auto-width .suffix-text{flex-grow:1}.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0;flex-grow:0}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-container .password-eye-button{width:16px;height:16px}.vega-input-container .password-eye-button::part(button){width:16px;height:16px;padding:0px}.vega-input-container .password-eye-button::part(button):hover{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}@supports (-webkit-touch-callout: none){:host([data-vega-form=pageSelectorMobile_goTo]) .vega-input-container input{box-sizing:border-box;padding-left:0px;padding-right:0px}}';export{mt as vega_input}
1
+ import{h as t,r as e,c as i,H as n,g as a}from"./p-6b2342e0.js";import{I as s}from"./p-abd7aeaa.js";import{M as o,a as r}from"./p-f0ff4463.js";import{M as p,a as l}from"./p-cdbbdcc2.js";import{R as c}from"./p-280cbcdb.js";import{s as d}from"./p-519a7d55.js";import{C as h}from"./p-75b58efe.js";import{c as u,V as f,M as v,I as x}from"./p-6e1ab235.js";import{s as g}from"./p-6bd5c49b.js";import{V as m,I as b}from"./p-d849e0f5.js";import{F as w}from"./p-16af7681.js";import{c as y}from"./p-5367eaab.js";import{D as C,a as j,d as k,y as I,i as R,H as z,I as S,J as E}from"./p-ff57c872.js";import{S as O}from"./p-6c1ef2ed.js";import{S as T}from"./p-d991fb11.js";import{i as N}from"./p-161b9c5b.js";import{S as V}from"./p-b91c2c9d.js";import{i as F}from"./p-d27ae9ff.js";import{d as L}from"./p-bf19682d.js";import{p as M,q as P,r as A}from"./p-1b44db34.js";import{P as D}from"./p-10ac8b57.js";import{S as $}from"./p-ff9a0e6e.js";import{a as B}from"./p-8c9ea6f4.js";import{c as _}from"./p-86194314.js";import{C as U}from"./p-2d0d575f.js";import{F as W}from"./p-a528714c.js";import"./p-262ec334.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-f69f84a7.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-c335088c.js";import"./p-b75ee3ba.js";import"./p-ed45b3b6.js";import"./p-40f39194.js";import"./p-d884c644.js";import"./p-a4d0ab07.js";import"./p-5d676a94.js";const K=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)])$/;class q extends s{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=K.test(t.toLowerCase());return{isValid:e,message:e?"":"Please enter the correct email format."}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t&&t.length>0}}class G extends f{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);s>3&&o&&Object.defineProperty(e,i,o)}([u()],G.prototype,"disableCopyPaste",void 0);var H=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class J extends f{render(){const e=this.hasPrefixSlot();if(this.prefixIcon||e)return t("div",{class:{"vega-input-prefix":!0,"vega-input-prefix-slot":e},part:"prefix-icon-container"},this.prefixIcon&&!e?t("vega-icon",{icon:this.prefixIcon,size:"size-16"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}H([u()],J.prototype,"host",void 0),H([u()],J.prototype,"prefixIcon",void 0);class Q extends T{format(t){if(!t.length)return t;const e=Number(t.replace(/,/g,""));return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e.toLocaleString("en-US"):t}calculateCaretPosition(t,e){const i=this.format(t),n=t.substring(0,e),a=i.substring(0,e),s=(n.match(/,/g)||[]).length;return e+((a.match(/,/g)||[]).length-s)}}class X extends T{constructor(t){super(),this.maskConfig={allowNegative:!0},this.skipFormat=t=>this.maskConfig.allowNegative&&"-"===t||null!=this.maskConfig.precision&&this.maskConfig.precision>0&&t.split(".").length-1==1&&t.endsWith(".")&&!t.startsWith("."),this.maskConfig=Object.assign(Object.assign({},this.maskConfig),t),this.mask=new RegExp(this.getRegExp())}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t)&&i.pop()}return i.join("")}calculateCaretPosition(t,e){if(N(e)){const i=this.redressAbnormalNumber(t);return e-(t.length-i.length)}}inputNeedFormat(t){return!this.mask.test(t)}redressAbnormalNumber(t){let e=t.replace(/^0+(?!$)/,"");return e.startsWith(".")&&(e=`0${e}`),e}getRegExp(){const t=this.maskConfig.allowNegative?"(\\-)?":"";let e;return e=0===this.maskConfig.precision?`^${t}(0|[1-9][0-9]*)$`:this.maskConfig.precision&&this.maskConfig.precision>0?`^${t}(0|0\\.\\d{1,${this.maskConfig.precision}}|[1-9][0-9]*(\\.\\d{1,${this.maskConfig.precision}})?)$`:`^${t}(0|0\\.\\d*|[1-9][0-9]*(\\.\\d*)?)$`,e}}class Y extends T{constructor(t,e=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(N(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class Z extends X{constructor(t){super(t)}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t.replace(/,/g,""))&&i.pop()}return this.thousandCommaFormat(i.join(""))}calculateCaretPosition(t,e){const i=this.redressAbnormalNumber(t),n=this.format(t),a=t.substring(0,e),s=n.substring(0,e),o=(a.match(/,/g)||[]).length;return e+((s.match(/,/g)||[]).length-o)-(t.length-i.length)}thousandCommaFormat(t){if(!t.length)return t;const e=t.replace(/[^\d.-]/g,""),i=e.indexOf("."),n=e.length>1&&i>=1?e.slice(i):"",a=Number(e.split(".")[0]);return!isNaN(a)&&a<=Number.MAX_SAFE_INTEGER?a.toLocaleString("en-US")+n:e}}var tt=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class et extends V{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRenderer.getInputRef(),this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}connectedCallback(){this.initSetupMaskConfigObserver()}disconnectedCallback(){this.removeSetupMaskConfigObserver()}watchValue(t,e){t!==e&&this.formatValueAfterValueChange()}watchMaskChange(t,e){this.areMaskConfigsEqual(t,e)||this.setup()}watchTypeChange(t,e){"number"!==t&&"number"!==e||this.setup()}generateMaskStrategy(t){let e=null;Array.isArray(this.maskConfig)?e=this.maskConfig.find((e=>"blur"===t?this.isBlurModeMaskConfig(e):!this.isBlurModeMaskConfig(e))):this.maskConfig&&("blur"===t&&this.isBlurModeMaskConfig(this.maskConfig)?e=this.maskConfig:"input"!==t||this.isBlurModeMaskConfig(this.maskConfig)||(e=this.maskConfig));let i=null;switch(null==e?void 0:e.type){case"phone":i=O.PHONE_MASK;break;case"taxId":i=O.TAX_ID_MASK;break;case"zipcode":i=O.ZIPCODE_MASK;break;case"thousand-comma":i=new Q;break;case"number":i=this.getNumberTypeMaskStrategy(e.options);break;case"custom":i=e.strategy?e.strategy():new O(e.options);break;case"custom-formatter":i=new Y(e.formatter,e.resetCaretPosition)}return"number"!==this.type||"input"!==t||e||(i=new X),i}getNumberTypeMaskStrategy(t){return t&&t.thousandComma?new Z(t):new X(t)}isBlurModeMaskConfig(t){return"custom"===t.type&&"blur"===t.trigger}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return F(i,n,!0,((t,e)=>L(t,e)?0:-1))}initSetupMaskConfigObserver(){C.addUniqueObserverToNode(this.host,M,this.setup.bind(this))}removeSetupMaskConfigObserver(){C.removeUniqueObserverFromNode(this.host,M)}}tt([u()],et.prototype,"maskConfig",void 0),tt([u()],et.prototype,"disableCopyPaste",void 0),tt([u()],et.prototype,"type",void 0),tt([u()],et.prototype,"inputRenderer",void 0),tt([v("connectedCallback")],et.prototype,"connectedCallback",null),tt([v("disconnectedCallback")],et.prototype,"disconnectedCallback",null),tt([v("watchValue")],et.prototype,"watchValue",null),tt([v("watchMaskChange")],et.prototype,"watchMaskChange",null),tt([v("watchTypeChange")],et.prototype,"watchTypeChange",null);const it=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!1===t.autoValidation},{payloadKey:"EMAIL_IS_TRUE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!0===t.email},{payloadKey:"EMAIL_IS_FALSE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!1===t.email}];var nt=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class at extends f{componentDidLoad(){this.setInputAutoWidth()}watchValue(){this.setInputAutoWidth()}watchSuffixText(){this.setInputAutoWidth()}setInputAutoWidth(){const t=this.host.shadowRoot.querySelector(".vega-input-container"),e=null==t?void 0:t.querySelector(".vega-input-input"),i=null==e?void 0:e.querySelector("input");if(i&&(t.classList.remove("auto-width"),i.style.removeProperty("width"),this.isCompactInputWidth&&this.suffixText)){const n=this.getActualInputWidth();e.getBoundingClientRect().width>n&&(i.style.width=`${n}px`,t.classList.add("auto-width"))}}getActualInputWidth(){const t=this.getCalculateTextWidthContainer();t.style.display="inline-block",t.textContent=`${this.value||this.placeholder||""}`;const e=t.getBoundingClientRect().width;return t.style.display="none",e}getCalculateTextWidthContainer(){if(!this.calculateTextWidthContainer){const t=document.createElement("div");t.classList.add("v-font-field-value"),t.style.visibility="hidden",t.style.display="none",this.host.shadowRoot.append(t),this.calculateTextWidthContainer=t}return this.calculateTextWidthContainer}}nt([u()],at.prototype,"host",void 0),nt([u()],at.prototype,"value",void 0),nt([u()],at.prototype,"placeholder",void 0),nt([u()],at.prototype,"isCompactInputWidth",void 0),nt([u()],at.prototype,"suffixText",void 0),nt([v("componentDidLoad")],at.prototype,"componentDidLoad",null),nt([v("watchValue")],at.prototype,"watchValue",null),nt([v("watchSuffixText")],at.prototype,"watchSuffixText",null);var st=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class ot extends ${constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"prefixText",parentStateName:"prefixText"},{subStateName:"suffixText",parentStateName:"suffixText"},{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}st([u()],ot.prototype,"host",void 0),st([u({writable:!0})],ot.prototype,"prefixText",void 0),st([u({writable:!0})],ot.prototype,"suffixText",void 0),st([u({writable:!0})],ot.prototype,"isCompactInputWidth",void 0);var rt=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class pt extends f{render(){return t("vega-button-circle",{icon:B.getIconKey(this.isPasswordDisplay?"eye":"eye-slash"),variant:"icon-only",size:"small",class:"password-eye-button",ref:t=>{this.addEyeIconObserver(t)}})}addEyeIconObserver(t){C.addUniqueObserverToNode(t,j,(()=>{this.isPasswordDisplay=!this.isPasswordDisplay}))}}B.register({eye:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>'},"eye-slash":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"/></svg>'}}),rt([u()],pt.prototype,"host",void 0),rt([u({writable:!0})],pt.prototype,"isPasswordDisplay",void 0),rt([u()],pt.prototype,"type",void 0);var lt=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class ct extends f{constructor(){super(...arguments),this.renderPrefixText=()=>this.prefixText&&t("div",{class:"prefix-text"},this.prefixText),this.renderSuffixText=()=>this.suffixText&&t("div",{class:"suffix-text"},this.suffixText),this.onClickClearIcon=()=>{U.notify(k.getSubject(this.host,P),"")},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value),this.onClearInputFocus=()=>{this.inputContainerRef.classList.add("no-focus")},this.onClearInputBlur=()=>{this.inputContainerRef.classList.remove("no-focus")},this.onContainerClick=()=>{U.notify(k.getSubject(this.host,A),{})}}getInputContainerRef(){return this.inputContainerRef}render(){return t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:{"vega-input-container":!0,"with-value":!!this.value,[`vega-input-size-${this.size}`]:!0,"vega-input-disabled":this.disabled,"compact-input-width":this.isCompactInputWidth},onClick:this.onContainerClick,"aria-label":"input container","aria-disabled":`${this.disabled}`,role:"textbox",tabIndex:this.disabled?null:-1,onKeyDown:_()},this.prefixSlotRenderer.render(),this.renderPrefixText(),this.inputRenderer.render(),this.renderSuffixText(),"password"===this.type?this.passwordEyeRenderer.render():this.showClearIcon&&this.renderClearIcon())}renderClearIcon(){return t("div",{class:{"vega-input-clear-icon":!0,invisible:!this.isClearIconVisible()},tabIndex:this.disabled?-1:0,"aria-label":"clear input",role:"button",onClick:this.onClickClearIcon,onKeyDown:_(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}}lt([u()],ct.prototype,"host",void 0),lt([u()],ct.prototype,"value",void 0),lt([u()],ct.prototype,"size",void 0),lt([u()],ct.prototype,"disabled",void 0),lt([u()],ct.prototype,"type",void 0),lt([u()],ct.prototype,"showClearIcon",void 0),lt([u()],ct.prototype,"prefixText",void 0),lt([u()],ct.prototype,"suffixText",void 0),lt([u()],ct.prototype,"isCompactInputWidth",void 0),lt([u()],ct.prototype,"prefixSlotRenderer",void 0),lt([u()],ct.prototype,"passwordEyeRenderer",void 0),lt([u()],ct.prototype,"inputRenderer",void 0);var dt=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class ht extends f{constructor(){super(...arguments),this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.notifySetupMaskConfig())},this.handleInputFocus=t=>{this.focusEventEmitter.emit(void 0,t)},this.handleInputBlur=t=>{this.blurEventEmitter.emit(void 0,t)},this.handleInputPaste=t=>{this.pasteEventEmitter.emit(t.clipboardData).defaultPrevented&&t.preventDefault()},this.onInputHandler=()=>{"change"!==this.valueUpdateTrigger&&this.notifyInputValueChange()},this.inputChangeHandler=()=>{"change"===this.valueUpdateTrigger&&this.notifyInputValueChange()}}connectedCallback(){this.initInputFocusObserver()}disconnectedCallback(){this.removeInputFocusObserver()}doFocus(){this.focusInput()}doBlur(){this.inputRef.blur()}getInputRef(){return this.inputRef}render(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:this.getInputType(),autoComplete:this.autocomplete,inputmode:this.inputmode,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,"aria-label":this.label||"No label defined",minLength:this.minLength,maxLength:this.maxLength,onBlur:t=>this.handleInputBlur(t),onFocus:t=>this.handleInputFocus(t),onChange:this.inputChangeHandler,onInput:this.onInputHandler,onPaste:t=>this.handleInputPaste(t)},this.copyPasteController.getCopyPasteProps())))}getInputType(){switch(this.type){case"number":return"text";case"password":return this.isPasswordDisplay?"text":"password";default:return this.type}}notifyInputValueChange(){U.notify(k.getSubject(this.host,P),this.inputRef.value)}notifySetupMaskConfig(){U.notify(k.getSubject(this.host,M),{})}initInputFocusObserver(){C.addUniqueObserverToNode(this.host,A,this.focusInput.bind(this))}removeInputFocusObserver(){C.removeUniqueObserverFromNode(this.host,A)}focusInput(){this.inputRef.focus()}}dt([u()],ht.prototype,"host",void 0),dt([u()],ht.prototype,"value",void 0),dt([u()],ht.prototype,"disabled",void 0),dt([u()],ht.prototype,"type",void 0),dt([u()],ht.prototype,"label",void 0),dt([u()],ht.prototype,"name",void 0),dt([u()],ht.prototype,"autocomplete",void 0),dt([u()],ht.prototype,"inputmode",void 0),dt([u()],ht.prototype,"placeholder",void 0),dt([u()],ht.prototype,"minLength",void 0),dt([u()],ht.prototype,"maxLength",void 0),dt([u()],ht.prototype,"isPasswordDisplay",void 0),dt([u()],ht.prototype,"valueUpdateTrigger",void 0),dt([u()],ht.prototype,"focusEventEmitter",void 0),dt([u()],ht.prototype,"blurEventEmitter",void 0),dt([u()],ht.prototype,"pasteEventEmitter",void 0),dt([u()],ht.prototype,"copyPasteController",void 0),dt([v("connectedCallback")],ht.prototype,"connectedCallback",null),dt([v("disconnectedCallback")],ht.prototype,"disconnectedCallback",null),dt([v("doFocus")],ht.prototype,"doFocus",null),dt([v("doBlur")],ht.prototype,"doBlur",null);var ut=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class ft extends f{constructor(){super(...arguments),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()},this.handleLabelClick=()=>{U.notify(k.getSubject(this.host,A),{})}}render(){return t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),this.inputContainerRenderer.render(),this.renderHintDom())}renderLabelDom(){return t("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label,suffixButtonProps:this.labelSuffixButtonProps,suffixButtonConfig:this.labelSuffixButtonConfig,ref:t=>{C.addUniqueObserverToNode(t,I,this.handleLabelButtonClick),C.addUniqueObserverToNode(t,j,this.handleLabelClick)}})}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}}ut([u()],ft.prototype,"host",void 0),ut([u()],ft.prototype,"disabled",void 0),ut([u()],ft.prototype,"required",void 0),ut([u()],ft.prototype,"label",void 0),ut([u()],ft.prototype,"hint",void 0),ut([u()],ft.prototype,"labelSuffixButtonProps",void 0),ut([u()],ft.prototype,"labelSuffixButtonConfig",void 0),ut([u()],ft.prototype,"labelButtonClickEventEmitter",void 0),ut([u()],ft.prototype,"inputContainerRenderer",void 0);var vt=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class xt extends f{connectedCallback(){this.initValueUpdateObserver()}disconnectedCallback(){this.removeValueUpdateObserver()}watchValue(t){this.changeEventEmitter.emit(t);const e=this.inputRenderer.getInputRef();e.value!==this.value&&(e.value=this.value),U.notify(W,{host:this.host,detail:this.value})}initValueUpdateObserver(){C.addUniqueObserverToNode(this.host,P,this.setValue.bind(this))}removeValueUpdateObserver(){C.removeUniqueObserverFromNode(this.host,P)}setValue(t){this.value=t}}vt([u()],xt.prototype,"host",void 0),vt([u({writable:!0})],xt.prototype,"value",void 0),vt([u()],xt.prototype,"changeEventEmitter",void 0),vt([u()],xt.prototype,"inputRenderer",void 0),vt([v("connectedCallback")],xt.prototype,"connectedCallback",null),vt([v("disconnectedCallback")],xt.prototype,"disconnectedCallback",null),vt([v("watchValue")],xt.prototype,"watchValue",null);var gt=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const mt=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",7),this.labelButtonClick=i(this,"labelButtonClick",7),this.vegaPaste=i(this,"vegaPaste",7),this.paste=i(this,"paste",7),this.globalSlimmers={},this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new c:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new o({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new r({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new p({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new l({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new q:null},{propertyName:"type",ruleFactory:t=>"email"===t?new q:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRenderer.getInputContainerRef(),touchableAreaGetter:()=>[this.inputRenderer.getInputRef()]}),this.pageResizeObserverSlimmer=new D({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.copyPasteController=new G,this.compactWidthController=new at,this.stateController=new ot,this.maskConfigController=new et,this.valueController=new xt,this.prefixSlotRenderer=new J,this.renderer=new ft,this.inputContainerRenderer=new ct,this.inputRenderer=new ht,this.changeEventEmitter=y(mt,R),this.focusEventEmitter=y(mt,z),this.blurEventEmitter=y(mt,S),this.labelButtonClickEventEmitter=y(mt,I),this.pasteEventEmitter=y(mt,E),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(it),this.passwordEyeRenderer=new pt,this.label="",this.labelSuffixButtonProps=null,this.labelSuffixButtonConfig=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.email=!1,this.required=!1,this.min=null,this.max=null,this.minLength=null,this.maxLength=null,this.showClearIcon=!0,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.disabled=!1,this.hint="",this.disableCopyPaste=!1}watchSuffixText(){}watchValue(t){}watchTypeChange(t,e){}watchValidationRules(){}watchMaskChange(t,e){}async doFocus(){}async doBlur(){}render(){return g(t("slot",null)),d(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.renderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{suffixText:["watchSuffixText"],value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"]}}};gt([b()],mt.prototype,"globalSlimmers",void 0),gt([x()],mt.prototype,"formFieldController",void 0),gt([x()],mt.prototype,"pageResizeObserverSlimmer",void 0),gt([x()],mt.prototype,"copyPasteController",void 0),gt([x()],mt.prototype,"compactWidthController",void 0),gt([x()],mt.prototype,"stateController",void 0),gt([x()],mt.prototype,"maskConfigController",void 0),gt([x()],mt.prototype,"valueController",void 0),gt([x()],mt.prototype,"prefixSlotRenderer",void 0),gt([x()],mt.prototype,"renderer",void 0),gt([x()],mt.prototype,"inputContainerRenderer",void 0),gt([x()],mt.prototype,"inputRenderer",void 0),gt([x()],mt.prototype,"changeEventEmitter",void 0),gt([x()],mt.prototype,"focusEventEmitter",void 0),gt([x()],mt.prototype,"blurEventEmitter",void 0),gt([x()],mt.prototype,"labelButtonClickEventEmitter",void 0),gt([x()],mt.prototype,"pasteEventEmitter",void 0),gt([x()],mt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),gt([x()],mt.prototype,"passwordEyeRenderer",void 0),gt([h()],mt.prototype,"watchMaskChange",null),mt.style=':host{cursor:text;display:block;text-align:left;line-height:normal}:host(.vega-input-inline-block){display:inline-block;width:100%}:host(.vega-input-hidden){display:none}vega-field-label{margin-bottom:8px}.vega-input-container{display:flex;align-items:center;border-radius:8px;gap:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))}.vega-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-container.vega-input-disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled input{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.vega-input-container.with-value{border-width:1px;border-style:solid;border-radius:8px}.vega-input-container:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}.vega-input-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-input-container.error:not(.no-focus):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))}.vega-input-container.error .vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}.vega-input-prefix{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}.vega-input-prefix.vega-input-prefix-slot{height:24px;overflow:hidden}.vega-input-input{flex:1 1 0%;position:relative}.vega-input-input input{width:100%;outline:2px solid transparent;outline-offset:2px;border-style:none;height:24px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-input input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-input-size-small{padding-top:8px;padding-right:12px;padding-bottom:8px;padding-left:12px}.vega-input-size-default{padding-top:12px;padding-right:16px;padding-bottom:12px;padding-left:16px}.vega-input-input input:disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.vega-hint{padding-top:12px;padding-right:8px;padding-left:8px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{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){.vega-hint>label{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){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error{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));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.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){.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){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-input-clear-icon{width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border-radius:4px;padding:2px}.vega-input-clear-icon.invisible{visibility:hidden}.vega-input-clear-icon vega-icon{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=password]::-ms-reveal{display:none}.vega-input-container.compact-input-width{gap:0px}.vega-input-container.compact-input-width .vega-input-prefix{margin-right:8px}.vega-input-container.compact-input-width .prefix-text,.vega-input-container.compact-input-width .suffix-text{margin-right:2px}.vega-input-container.compact-input-width .vega-input-clear-icon{margin-left:2px}.vega-input-container.compact-input-width .vega-input-input input{padding:0px;min-width:1px}.vega-input-container.compact-input-width.auto-width .vega-input-input{flex-grow:0}.vega-input-container.compact-input-width.auto-width .suffix-text{flex-grow:1}.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0;flex-grow:0}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-container .password-eye-button{width:16px;height:16px}.vega-input-container .password-eye-button::part(button){width:16px;height:16px;padding:0px}.vega-input-container .password-eye-button::part(button):hover{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}@supports (-webkit-touch-callout: none){:host([data-vega-form=pageSelectorMobile_goTo]) .vega-input-container input{box-sizing:border-box;padding-left:0px;padding-right:0px}}';export{mt as vega_input}
@@ -0,0 +1 @@
1
+ import{h as e,F as t,r as s,c as r,H as o,g as i}from"./p-6b2342e0.js";import{d as a,D as n,n as p,W as c}from"./p-ff57c872.js";import{s as l}from"./p-519a7d55.js";import{c as g,V as d,M as h,I as v}from"./p-6e1ab235.js";import{V as f,I as m}from"./p-d849e0f5.js";import{c as u}from"./p-5367eaab.js";import{c as b}from"./p-8852361b.js";import{c as x}from"./p-86194314.js";import{C as _}from"./p-2d0d575f.js";import{B as w}from"./p-1b44db34.js";import{n as y}from"./p-262ec334.js";import{O as k}from"./p-331a62d5.js";import{S}from"./p-1fb56e14.js";import{c as C}from"./p-ddf81373.js";import{M as j}from"./p-78a57a17.js";import{P as z,g as R}from"./p-10ac8b57.js";import{R as D}from"./p-d2033624.js";import{x as O}from"./p-161b9c5b.js";import{S as P}from"./p-ff9a0e6e.js";import"./p-d9671d27.js";import"./p-6a334573.js";import"./p-c335088c.js";import"./p-b75ee3ba.js";import"./p-bf19682d.js";import"./p-40f39194.js";import"./p-ed45b3b6.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-db482ee1.js";import"./p-a4670e23.js";import"./p-ef9cbad1.js";import"./p-a528714c.js";import"./p-112455b1.js";import"./p-4866e390.js";import"./p-151b1deb.js";import"./p-39d56e3d.js";import"./p-02841589.js";import"./p-f69f84a7.js";import"./p-8c9ea6f4.js";import"./p-ff921d10.js";import"./p-fcabf0dc.js";import"./p-a7b5f497.js";import"./p-77e64f26.js";import"./p-1bc5b3bc.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-d884c644.js";const I=[{payloadKey:"COMPLETED_STEP_ARRAY_IS_EMPTY",payloadDescription:"@deprecated Specifies an array of completed step titles for the Progress Tracker component.",payloadValue:e=>0===e.completedStepArray.length},{payloadKey:"COMPLETED_STEP_ARRAY_IS_NOT_EMPTY",payloadDescription:"@deprecated Specifies an array of completed step titles for the Progress Tracker component.",payloadValue:e=>e.completedStepArray.length>0}];var L=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class E extends d{constructor(){super(...arguments),this.renderStepIcon=(t,s)=>e("div",{class:"vega-progress-step-icon-container"},e("div",{class:"vega-progress-step__icon"},t.isCompleted()?e("vega-icon",{icon:"checkmark-rounded",size:"size-16"}):e("span",null,s+1))),this.renderStep=(t,s)=>{var r;return e("div",{role:this.canClickStep?"button":null,class:`vega-progress-step ${t.progressStatus} ${t.isCurrent?"current":""}`,"data-index":s,tabIndex:this.canClickStep?0:null,onClick:this.canClickStep?this.onStepIconClick:null,onKeyDown:this.canClickStep?x():null,"aria-label":t.title},e("div",{class:"vega-progress-step-icon-divider"},e("div",{class:"vega-progress-step__divider left "+((null===(r=this.currentSteps[s-1])||void 0===r?void 0:r.isCompleted())?"background":"")}),this.renderStepIcon(t,s),e("div",{class:"vega-progress-step__divider right "+(t.isCompleted()?"complete":"default")})),e("div",{class:"vega-progress-step__title"},this.renderStepTitle(t,s,"top")))},this.onStepIconClick=e=>{const t=Number(e.currentTarget.getAttribute("data-index"));_.notify(a.getSubject(this.host,w),t)}}async gotoCarouselPage(){this.carouselContainerRef.getBoundingClientRect().width>0&&await this.carouselRef.goToPage(this.current+1)}render(){return e(t,null,e("div",{class:"vega-progress-tracker__container"},e("div",{class:"vega-progress-tracker__slot"},this.currentSteps.map(((e,t)=>this.renderStep(e,t))))),e("div",{class:"vega-progress-tracker__box",ref:e=>this.carouselContainerRef=e},e("vega-carousel",{showSlider:!1,itemsPerPage:1,canSwipe:this.canClickStep,ref:e=>(n.addUniqueObserverToNode(e,p,(async e=>{await this.host.setCurrent(e.detail-1)})),this.carouselRef=e)},this.currentSteps.map(((e,t)=>this.renderStepTitle(e,t,"carousel"))))))}renderStepTitle(t,s,r){const o="horizontal-compact"===this.currentDirection;if(o&&"carousel"===r||!o&&"top"===r)return this.renderModeController.isSourceRenderMode()?e("vega-progress-tracker-step",{key:t.stepKey,stepKey:t.stepKey},t.title):e("slot",{name:`step-${s}`})}}L([g()],E.prototype,"host",void 0),L([g()],E.prototype,"currentSteps",void 0),L([g()],E.prototype,"canClickStep",void 0),L([g()],E.prototype,"current",void 0),L([g()],E.prototype,"deprecatedPropertySlimmer",void 0),L([g()],E.prototype,"currentStepController",void 0),L([g()],E.prototype,"currentDirection",void 0),L([g()],E.prototype,"renderModeController",void 0);var A,T=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class M extends d{constructor(){super(...arguments),this.goToPageTaskQueue=new S,this.updateCurrent=e=>{this.current=y(e,0,this.currentSteps.length-1)}}connectedCallback(){this.initStepClickObserver()}disconnectedCallback(){this.removeStepClickObserver()}componentDidLoad(){this.updateCurrent(this.current)}async componentDidRender(){await this.goToPageTaskQueue.runTask()}async watchCurrentChange(){var e;this.updateCurrent(this.current),this.currentStepUpdateEventEmitter.emit(null===(e=this.currentSteps[this.current])||void 0===e?void 0:e.stepKey),await this.renderer.gotoCarouselPage()}watchSteps(){this.updateCurrent(this.current)}nextStep(){this.updateCurrent(++this.current)}prevStep(){this.updateCurrent(--this.current)}setCurrent(e){this.updateCurrent(e)}async watchDirection(){await this.goToPageTaskQueue.enqueue({run:async()=>await this.renderer.gotoCarouselPage()},!1)}initStepClickObserver(){this.stepClickObserver=new k(this.canAcceptStepClickEvent.bind(this),this.updateCurrent.bind(this)),_.register(a.getSubject(this.host,w),this.stepClickObserver)}removeStepClickObserver(){_.unregister(a.getSubject(this.host,w),this.stepClickObserver)}canAcceptStepClickEvent(){return!0}}T([g()],M.prototype,"currentSteps",void 0),T([g({writable:!0})],M.prototype,"current",void 0),T([g()],M.prototype,"currentStepUpdateEventEmitter",void 0),T([g()],M.prototype,"renderer",void 0),T([g()],M.prototype,"host",void 0),T([h("connectedCallback")],M.prototype,"connectedCallback",null),T([h("disconnectedCallback")],M.prototype,"disconnectedCallback",null),T([h("componentDidLoad")],M.prototype,"componentDidLoad",null),T([h("componentDidRender")],M.prototype,"componentDidRender",null),T([h("watchCurrentChange")],M.prototype,"watchCurrentChange",null),T([h("watchSteps")],M.prototype,"watchSteps",null),T([h("nextStep")],M.prototype,"nextStep",null),T([h("prevStep")],M.prototype,"prevStep",null),T([h("setCurrent")],M.prototype,"setCurrent",null),T([h("watchDirection")],M.prototype,"watchDirection",null),function(e){e.DEFAULT="default",e.IN_PROGRESS="inProgress",e.COMPLETE="complete"}(A||(A={}));class U{constructor(e,t,s,r){this.stepKey=e,this.title=t,this.progressStatus=s,this.isCurrent=r}static fromSteps(e,t,s){return e.map(((e,r)=>new U(e,e,this.getStepStatus(e,r,t,s),r===t)))}static fromHostSlot(e,t,s){return Array.from(e.querySelectorAll("vega-progress-tracker-step")).map(((e,r)=>new U(e.stepKey,"",this.getStepStatus(e.stepKey,r,t,s),r===t)))}isCompleted(){return this.progressStatus===A.COMPLETE}}U.getStepStatus=(e,t,s,r)=>r.includes(e)?A.COMPLETE:t===s?A.IN_PROGRESS:A.DEFAULT;var W=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class q extends d{constructor(){super(...arguments),this.mutationObserver=new j({target:()=>this.host,options:{childList:!0,subtree:!0},callback:()=>{this.appendSlotAttribute(),this.syncUpCurrentSteps()}})}connectedCallback(){this.appendSlotAttribute()}disconnectedCallback(){}componentWillLoad(){this.syncUpCurrentSteps()}componentDidLoad(){}watchSteps(){this.syncUpCurrentSteps()}watchCurrentChange(){this.syncUpCurrentSteps()}watchCompletedStepArray(){this.syncUpCurrentSteps()}watchCompletedSteps(){this.syncUpCurrentSteps()}syncUpCurrentSteps(){this.currentSteps=this.renderModeController.isSourceRenderMode()?U.fromSteps(this.steps,this.current,this.deprecatedPropertySlimmer.getValue()):U.fromHostSlot(this.host,this.current,this.deprecatedPropertySlimmer.getValue())}appendSlotAttribute(){this.renderModeController.isSourceRenderMode()||Array.from(this.host.querySelectorAll("vega-progress-tracker-step")).map(((e,t)=>{e.setAttribute("slot",`step-${t}`)}))}}W([g()],q.prototype,"host",void 0),W([g()],q.prototype,"steps",void 0),W([g({writable:!0})],q.prototype,"currentSteps",void 0),W([g()],q.prototype,"renderModeController",void 0),W([g()],q.prototype,"current",void 0),W([g()],q.prototype,"deprecatedPropertySlimmer",void 0),W([v()],q.prototype,"mutationObserver",void 0),W([h("connectedCallback")],q.prototype,"connectedCallback",null),W([h("disconnectedCallback")],q.prototype,"disconnectedCallback",null),W([h("componentWillLoad")],q.prototype,"componentWillLoad",null),W([h("componentDidLoad")],q.prototype,"componentDidLoad",null),W([h("watchSteps")],q.prototype,"watchSteps",null),W([h("watchCurrentChange")],q.prototype,"watchCurrentChange",null),W([h("watchCompletedStepArray")],q.prototype,"watchCompletedStepArray",null),W([h("watchCompletedSteps")],q.prototype,"watchCompletedSteps",null);var K=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class N extends d{constructor(){super(...arguments),this.renderMode="SOURCE"}connectedCallback(){this.setRenderMode()}isSourceRenderMode(){return"SOURCE"===this.renderMode}setRenderMode(){this.renderMode=this.host.querySelector("vega-progress-tracker-step")?"SLOT":"SOURCE"}}K([g()],N.prototype,"host",void 0),K([h("connectedCallback")],N.prototype,"connectedCallback",null);var V=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class Y extends d{constructor(){super(...arguments),this.pageResizeObserverSlimmer=new z({callback:async()=>{this.setCurrentDirection(),await this.renderer.gotoCarouselPage()}})}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){this.setCurrentDirection()}componentDidLoad(){}watchDirection(){this.setCurrentDirection()}setCurrentDirection(){let e=D.formatCustom(this.direction)||"vertical";["default","S"].includes(R())&&!O(this.direction)&&(e="horizontal-compact"),this.currentDirection=e}}V([g()],Y.prototype,"direction",void 0),V([g()],Y.prototype,"renderer",void 0),V([g({writable:!0})],Y.prototype,"currentDirection",void 0),V([v()],Y.prototype,"pageResizeObserverSlimmer",void 0),V([h("connectedCallback")],Y.prototype,"connectedCallback",null),V([h("disconnectedCallback")],Y.prototype,"disconnectedCallback",null),V([h("componentWillLoad")],Y.prototype,"componentWillLoad",null),V([h("componentDidLoad")],Y.prototype,"componentDidLoad",null),V([h("watchDirection")],Y.prototype,"watchDirection",null);var $=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};const H=class{constructor(e){s(this,e),this.vegaCurrentStepUpdate=r(this,"vegaCurrentStepUpdate",7),this.currentStepUpdate=r(this,"currentStepUpdate",7),this.globalSlimmers={},this.renderModeController=new N,this.currentStepsController=new q,this.currentStepController=new M,this.currentDirectionController=new Y,this.renderer=new E,this.currentStepUpdateEventEmitter=u(H,c),this.currentStepsSubStateSlimmer=C(H,"currentSteps","watchCurrentSteps"),this.deprecatedPropertySlimmer=b(H,"completedSteps","completedStepArray",[]),this.vegaComponentUsageRuntimeMetricsSlimmer=new f(I),this.currentSteps=[],this.current=0,this.direction="vertical",this.steps=[],this.completedStepArray=[],this.completedSteps=[],this.canClickStep=!0}watchCurrentSteps(){}async watchCurrentChange(){}async watchDirection(){}watchSteps(){}watchCompletedStepArray(){}watchCompletedSteps(){}async nextStep(){}async prevStep(){}async setCurrent(e){}async getCurrent(){return this.current}render(){return l(e(o,{class:{"vega-progress-tracker":!0,[this.currentDirection]:!0,"click-step-disabled":!this.canClickStep}},this.renderer.render()),this.host)}get host(){return i(this)}static get watchers(){return{currentSteps:["watchCurrentSteps"],current:["watchCurrentChange"],direction:["watchDirection"],steps:["watchSteps"],completedStepArray:["watchCompletedStepArray"],completedSteps:["watchCompletedSteps"]}}};$([m()],H.prototype,"globalSlimmers",void 0),$([v()],H.prototype,"renderModeController",void 0),$([v()],H.prototype,"currentStepsController",void 0),$([v()],H.prototype,"currentStepController",void 0),$([v()],H.prototype,"currentDirectionController",void 0),$([v()],H.prototype,"renderer",void 0),$([v()],H.prototype,"currentStepUpdateEventEmitter",void 0),$([v()],H.prototype,"currentStepsSubStateSlimmer",void 0),$([v()],H.prototype,"deprecatedPropertySlimmer",void 0),$([v()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),H.style=':host .vega-progress-tracker__container{display:flex;align-items:center;padding-top:0px;padding-bottom:0px}:host .vega-progress-tracker__slot{width:100%;display:block}:host .vega-progress-step{display:flex;gap:16px}:host(:not(.click-step-disabled)) .vega-progress-step{cursor:pointer}:host(:not(.click-step-disabled)) .vega-progress-step.default:hover .vega-progress-step__icon{background-color:rgba(var(--v-bg-action-quaternary-hover, 239, 239, 239, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.default .vega-progress-step__icon:hover{background-color:rgba(var(--v-bg-action-quaternary-hover, 239, 239, 239, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.default:active .vega-progress-step__icon{background-color:rgba(var(--v-bg-action-quaternary-active, 205, 209, 211, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.inProgress .vega-progress-step__icon:hover,:host(:not(.click-step-disabled)) .vega-progress-step.current .vega-progress-step__icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.inProgress:hover .vega-progress-step__icon,:host(:not(.click-step-disabled)) .vega-progress-step.current:hover .vega-progress-step__icon{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.inProgress:active .vega-progress-step__icon,:host(:not(.click-step-disabled)) .vega-progress-step.current:active .vega-progress-step__icon{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.complete:hover .vega-progress-step__icon{border-color:rgba(var(--v-border-color-action-hover, 4, 112, 236, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.complete:hover .vega-progress-step__icon vega-icon{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.complete:active .vega-progress-step__icon{border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.complete:active .vega-progress-step__icon vega-icon{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host(:not(.click-step-disabled)) .vega-progress-step.complete.current:hover .vega-progress-step__icon vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}:host .vega-progress-step:focus-visible{outline-width:0px}:host .vega-progress-step:focus-visible .vega-progress-step-icon-container{border-radius:8px;outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-progress-step .vega-progress-step-icon-divider{display:flex;flex-direction:column;align-items:center;gap:0px}:host .vega-progress-step .vega-progress-step-icon-container{padding:8px}:host .vega-progress-step .vega-progress-step__icon{display:block;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:9999px;box-sizing:content-box;height:32px;width:32px;min-width:32px;line-height:32px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-progress-step .vega-progress-step__icon{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-progress-step .vega-progress-step__icon{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-progress-step .vega-progress-step__icon{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-progress-step .vega-progress-step__icon span{display:block}:host .vega-progress-step .vega-progress-step__icon:not(.disable-responsive){line-height:32px}:host .vega-progress-step .vega-progress-step__divider{width:1px;flex-grow:1;height:100%;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1));display:block}:host .vega-progress-step .vega-progress-step__divider.right.complete{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host .vega-progress-step .vega-progress-step__divider.left{display:none}:host .vega-progress-step:last-child .vega-progress-step__divider.right{display:none}:host .vega-progress-step.default .vega-progress-step__icon{color:rgba(var(--v-text-primary, 32, 54, 69, 1));background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}:host .vega-progress-step.complete .vega-progress-step__icon{display:flex;justify-content:center;align-items:center;background-color:rgba(var(--v-bg-action-tertiary, 0, 0, 0, 0));box-sizing:border-box;border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action, 19, 98, 226, 1))}:host .vega-progress-step.complete .vega-progress-step__icon vega-icon{color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-progress-step.complete.current .vega-progress-step__icon vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}:host .vega-progress-step.inProgress .vega-progress-step__icon,:host .vega-progress-step.current .vega-progress-step__icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}:host(.horizontal-compact){flex:1 1 100%;padding-top:0px}:host(.horizontal-compact) .vega-progress-tracker__container{padding-top:16px;padding-bottom:16px}:host(.horizontal-compact) .vega-progress-tracker__slot{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:0px}:host(.horizontal-compact) .vega-progress-step{display:flex;flex-grow:1;flex-basis:0}:host(.horizontal-compact) .vega-progress-step .vega-progress-step-icon-divider{display:flex;flex-direction:row;gap:4px;width:100%}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__icon{height:16px;width:16px;min-width:16px}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__icon{line-height:16px}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__icon vega-icon{height:8px;width:8px}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__icon span{display:none}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__divider{height:1px;flex-grow:1}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__divider.left{display:block}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__divider.left.background{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__divider.right{display:block}:host(.horizontal-compact) .vega-progress-step .vega-progress-step__title{display:none}:host(.horizontal-compact) .vega-progress-step:first-child .vega-progress-step__divider.left{opacity:0}:host(.horizontal-compact) .vega-progress-step:last-child .vega-progress-step__divider.right{display:block;opacity:0}:host(:not(.horizontal-compact)) .vega-progress-tracker__box{display:none}:host(.vertical) .vega-progress-step__title{padding-top:12px;padding-bottom:36px}:host(.horizontal){display:block;overflow-x:auto;padding-top:4px}:host(.horizontal) .vega-progress-tracker__slot{display:flex}:host(.horizontal) .vega-progress-step{flex-direction:column;align-items:center;gap:4px;flex-grow:1;flex-basis:0}:host(.horizontal) .vega-progress-step .vega-progress-step-icon-divider{flex-direction:row;align-items:center;gap:4px;width:100%}:host(.horizontal) .vega-progress-step .vega-progress-step__divider{height:1px;display:block}:host(.horizontal) .vega-progress-step .vega-progress-step__divider.left{display:block}:host(.horizontal) .vega-progress-step .vega-progress-step__divider.right.complete{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.horizontal) .vega-progress-step .vega-progress-step__divider.left.background{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.horizontal) .vega-progress-step .vega-progress-step__title{padding-top:0px;padding-bottom:0px;text-align:center;padding-left:4px;padding-right:4px}:host(.horizontal) .vega-progress-step:first-child .vega-progress-step__divider.left{opacity:0}:host(.horizontal) .vega-progress-step:last-child .vega-progress-step__divider.right{display:block;opacity:0}:host vega-carousel .subTitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host vega-carousel .subTitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host vega-carousel .subTitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host vega-carousel .subTitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-progress-tracker__box{display:flex;align-items:center}:host .vega-progress-tracker__box vega-carousel{width:100%;text-align:center}';var B=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};class F extends P{constructor(){super({parent:"vega-progress-tracker",subStates:[{subStateName:"status",parentStateName:"currentSteps",callback:e=>{const t=e.find((e=>e.stepKey===this.stepKey));this.progressStatus=t.progressStatus,this.isCurrent=t.isCurrent}}]})}}B([g()],F.prototype,"host",void 0),B([g({writable:!0})],F.prototype,"progressStatus",void 0),B([g({writable:!0})],F.prototype,"isCurrent",void 0),B([g()],F.prototype,"stepKey",void 0);var G=function(e,t,s,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(i<3?o(a):i>3?o(t,s,a):o(t,s))||a);return i>3&&a&&Object.defineProperty(t,s,a),a};const J=class{constructor(e){s(this,e),this.globalSlimmers={},this.stateController=new F,this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.progressStatus=A.DEFAULT,this.isCurrent=!1,this.stepKey=""}render(){return l(e(o,null,e("div",{class:{"title-container":!0,[this.progressStatus]:!0,current:this.isCurrent}},e("slot",null))),this.host)}get host(){return i(this)}};G([m()],J.prototype,"globalSlimmers",void 0),G([v()],J.prototype,"stateController",void 0),G([v()],J.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),J.style=':host .title-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));display:block}@media screen and (min-width: 768px) and (max-width: 1023px){:host .title-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .title-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .title-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .title-container.inProgress,:host .title-container.current{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .title-container.inProgress,:host .title-container.current{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .title-container.inProgress,:host .title-container.current{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .title-container.inProgress,:host .title-container.current{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:22px;letter-spacing:0px}}:host .title-container.complete{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}';export{H as vega_progress_tracker,J as vega_progress_tracker_step}
@@ -0,0 +1 @@
1
+ import{M as t,V as e,L as s,c as i}from"./p-6e1ab235.js";import{a0 as n,b as o,Z as a,_ as r,k as c,s as h,f as d,i as f,D as l,y as u}from"./p-39d56e3d.js";import{d as p}from"./p-1bc5b3bc.js";import{g as m}from"./p-519a7d55.js";import{C as O}from"./p-2d0d575f.js";import{d as b,D as w}from"./p-ff57c872.js";import{f as v,d as g}from"./p-1b44db34.js";import{O as C}from"./p-331a62d5.js";import{R as S}from"./p-7ca9f6f1.js";import{S as N}from"./p-1fb56e14.js";import{i as y}from"./p-d9671d27.js";import{K as j}from"./p-a8dad05d.js";let R=!1;class k{constructor(){this.rangeCount=0,this.ranges=[]}getRangeAt(t){return this.ranges[t]}addRange(t){if(this.ranges.push(t),this.rangeCount=this.ranges.length,!R){const e=window.getSelection();e.removeAllRanges(),e.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset)}}removeAllRanges(){this.ranges=[],this.rangeCount=0}}const x=new class{constructor(){this.supportShadowSelection="function"==typeof window.ShadowRoot.prototype.getSelection,this.supportBeforeInput="function"==typeof window.InputEvent.prototype.getTargetRanges,this.isFirefox=window.navigator.userAgent.toLowerCase().indexOf("firefox")>0,this.listen()}getSelection(t){return this.supportShadowSelection?t.getSelection():this.isFirefox?this.getFirefoxSelection():this.polyfilledShadowSelection}getFirefoxSelection(){const t=document.getSelection();if(t.rangeCount>0){const e=t.getRangeAt(0),s=e.startContainer,i=e.endContainer;if(s!==i&&s.textContent.length===e.startOffset){const t=s.nodeType===Node.TEXT_NODE?s.parentNode.nextSibling:s.nextSibling;e.setStart(t.firstChild,0)}if(i!==s&&0===e.endOffset){const t=i.nodeType===Node.TEXT_NODE?i.parentNode.previousSibling:i.previousSibling;e.setEnd(t.lastChild,t.lastChild.textContent.length)}}return t}listen(){this.isFirefox||this.supportShadowSelection||!this.supportBeforeInput||(this.polyfilledShadowSelection=new k,window.addEventListener("selectionchange",(()=>{if(!R){R=!0;const t=m();t&&t.hasAttribute("contenteditable")?document.execCommand("indent"):this.polyfilledShadowSelection.removeAllRanges(),R=!1}}),!0),window.addEventListener("beforeinput",(t=>{if(R){const e=t.getTargetRanges()[0],s=new Range;s.setStart(e.startContainer,e.startOffset),s.setEnd(e.endContainer,e.endOffset),this.polyfilledShadowSelection.removeAllRanges(),this.polyfilledShadowSelection.addRange(s),t.preventDefault(),t.stopImmediatePropagation()}}),!0))}};class T extends e{constructor(t){super(),this.autoRunTaskQueue=new N(t)}async executeTaskHook(){this.autoRunTaskQueue.queue.length&&await this.autoRunTaskQueue.runTask()}enqueueTheTaskIntoQueue(t=!1){this.autoRunTaskQueue.enqueue({run:async()=>{try{await this.doTask()}catch(t){s.error("The auto task run failed.",t)}}},t)}}!function(t,e,s,i){var n,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(o<3?n(a):o>3?n(e,s,a):n(e,s))||a);o>3&&a&&Object.defineProperty(e,s,a)}([t("componentDidUpdate")],T.prototype,"executeTaskHook",null);class D{constructor(t){this.range=t}clone(){const t=this.range.clone();return new D(t)}}var A=function(t,e,s,i){var n,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(o<3?n(a):o>3?n(e,s,a):n(e,s))||a);return o>3&&a&&Object.defineProperty(e,s,a),a};class E extends T{constructor(){super(1),this.currentRange=new S,this.handleSelectionWithDebounce=p(this.handleSelectionChange,E.SELECTION_CHANGE_DEBOUNCE_TIME,this),this.pendingRestoreSelectionNodes=[],this.doTask=async()=>{await Promise.resolve();const t=this.currentRange.toNativeRange();t&&this.setSelectionRange(t)}}connectedCallback(){this.registerSelectionRangeChangeObserver()}disconnectedCallback(){O.unregister(b.getSubject(this.host,v),this.selectionRangeChangeObserver),w.removeUniqueObserverFromNode(this.host,g)}componentDidLoad(){document.addEventListener("selectionchange",this.handleSelectionWithDebounce),this.registerUpdateCaretPositionObserver()}watchValueUpdate(){this.prepareRestoreSelectionState(),this.restoreSelection()}getCurrentRange(){return this.currentRange}getSelectedNodes(){return Array.from(this.selectionMap.values()).flat()}setSelectedNodes(t,e){this.clearSelectionMap(),this.addNodesToSelectionMap(t),e&&(this.currentRange=this.currentRange.updateRTERange(e))}getSelectedBlocks(){return Array.from(this.selectionMap.keys())}setSelectionState(t){this.selectionState=t}enqueueSelectionRangeFutureState(t,e,s,i,o=!1){t instanceof n?this.internalCodeBlockSelectionController.enqueueSelectionRangeFutureState(t,e,o):(this.currentRange=this.currentRange.updateRTERange({startNode:t,endNode:s=s||t,startOffset:e,endOffset:i=i||0===i?i:e}),super.enqueueTheTaskIntoQueue(o))}setSelectionRange(t){const e=this.getSelection();e&&(e.removeAllRanges(),e.addRange(t),this.saveSelection())}getSelection(){const t=this.vegaRichTextEditorRenderer.getRichTextContentRef();return x.getSelection(t.shadowRoot)}saveSelection(){const t=this.getSelection();if(t&&t.rangeCount>0&&0===this.autoRunTaskQueue.queue.length&&!this.insertCompositionTextController.isComposing()){const e=t.getRangeAt(0),{startContainer:s,endContainer:i,startOffset:n,endOffset:o}=e;this.currentRange=this.currentRange.updateRTERange({startNode:s,endNode:i,startOffset:n,endOffset:o},e)}}restoreSelection(){if(this.selectionState){const{startNode:t,endNode:e,startOffset:s,endOffset:i}=this.selectionState.range;t instanceof o&&t===e&&0===t.text.length?this.enqueueSelectionRangeFutureState(t,a.length):t===e&&t instanceof o&&!t.isContentEditable()||this.enqueueSelectionRangeFutureState(t,s,e,i),this.selectionState=null}}handleSelectionChange(){if(this.disabled||this.sourceView)return;this.clearSelectionMap();const t=this.getSelection();if(!t||0===t.rangeCount)return;this.saveSelection();const e=t.getRangeAt(0),s=[],i=t=>{if(e.intersectsNode(t)){if(t.nodeType===Node.TEXT_NODE){const e=h.getEntityByDOM(t.parentElement);if(e instanceof f)return void s.push(e)}if(y(t)){const i=l.isDecoratorNodeContainerElement(t)?l.getDecoratorNodeElement(t):t,n=h.getEntityByDOM(i);if(n instanceof u)return void(this.internalCodeBlockSelectionController.isCodeBlockSelected(n,e)&&s.push(n.children[0]));if(n instanceof f)return void s.push(n);if(n instanceof d&&e.collapsed)return void this.tryToFindTheNearestSelectedNode(e,s)}t.childNodes.forEach(i)}};i(e.commonAncestorContainer),this.addNodesToSelectionMap(s),this.getSelectedNodes().forEach((t=>t.apply(new r(e))))}addNodesToSelectionMap(t){t.forEach((t=>{this.selectionMap.has(t.parent)?this.selectionMap.get(t.parent).push(t):this.selectionMap.set(t.parent,[t])}))}clearSelectionMap(){this.getSelectedNodes().filter((t=>"CODE_BLOCK_NODE"!==t.type)).forEach((t=>{t.annotationMap.delete(c.SELECTION_RANGE)})),this.selectionMap=new Map}isAcceptableSelectionRangeChange(){return!0}registerSelectionRangeChangeObserver(){this.selectionRangeChangeObserver=new C(this.isAcceptableSelectionRangeChange.bind(this),(t=>{t.updateDirectly?this.enqueueSelectionRangeFutureState(t.node,t.offset):this.pendingRestoreSelectionNodes.push(t.node)})),O.register(b.getSubject(this.host,v),this.selectionRangeChangeObserver)}prepareRestoreSelectionState(){if(this.pendingRestoreSelectionNodes.length>0){const t=this.pendingRestoreSelectionNodes[0],e=this.pendingRestoreSelectionNodes.length>1?this.pendingRestoreSelectionNodes[this.pendingRestoreSelectionNodes.length-1]:t,{startOffset:s,endOffset:i,endContainer:n,startContainer:o}=this.currentRange;o&&h.getDOMByEntity(t)===o.parentElement&&n&&h.getDOMByEntity(e)===n.parentElement?(this.currentRange=this.currentRange.updateRTERange({startNode:t,endNode:e,startOffset:s,endOffset:i}),this.selectionState=new D(this.currentRange)):(this.currentRange=this.currentRange.updateRTERange({startNode:t,endNode:e,startOffset:0,endOffset:e.getRangeEndOffset()}),this.selectionState=new D(this.currentRange)),this.pendingRestoreSelectionNodes=[]}}registerUpdateCaretPositionObserver(){w.addUniqueObserverToNode(this.host,g,(t=>{const{node:e,updateDirectly:s}=t,i="number"==typeof t.offset?t.offset:e.getRangeEndOffset();this.enqueueSelectionRangeFutureState(e,i,e,i,s)}))}tryToFindTheNearestSelectedNode(t,e){const{startContainer:s,startOffset:i,collapsed:n}=t;if(0===e.length&&y(s)&&n){const n=h.getEntityByDOM(s);if(n instanceof d&&n.children.length>=i){const s=this.detectNearestElement(n,i);if(s){const{startNode:i,startOffset:n}=s;e.push(i),this.currentRange=this.currentRange.updateRTERange({startNode:i,endNode:i,startOffset:n,endOffset:n},t)}}}}detectNearestElement(t,e){if(t.children){const s=t.children[e],i=t.children[e-1];if(s&&s instanceof f)return{startNode:s,startOffset:0};if(i&&i instanceof f)return{startNode:i,startOffset:i.getRangeEndOffset()}}}}E.SELECTION_CHANGE_DEBOUNCE_TIME=50,A([i()],E.prototype,"vegaRichTextEditorRenderer",void 0),A([i({writable:!0})],E.prototype,"selectionMap",void 0),A([i()],E.prototype,"host",void 0),A([i()],E.prototype,"value",void 0),A([i()],E.prototype,"disabled",void 0),A([i()],E.prototype,"sourceView",void 0),A([i()],E.prototype,"valueController",void 0),A([i()],E.prototype,"insertCompositionTextController",void 0),A([i()],E.prototype,"historyController",void 0),A([i()],E.prototype,"internalCodeBlockSelectionController",void 0),A([t("connectedCallback")],E.prototype,"connectedCallback",null),A([t("disconnectedCallback")],E.prototype,"disconnectedCallback",null),A([t("componentDidLoad")],E.prototype,"componentDidLoad",null),A([t("watchValueUpdate")],E.prototype,"watchValueUpdate",null);class K extends j{constructor(){super((()=>this.getKeyboardShortcutOptions.call(this))),this.redoStack=[],this.undoStack=[],this.registerHistoryDelay=300,this.registerHistoryDebounced=p((t=>{this.internalRegisterHistory(t)}),this.registerHistoryDelay,this)}registerHistory(t,e=!1){e?this.internalRegisterHistory(t):this.registerHistoryDebounced(t)}internalRegisterHistory(t){this.redoStack=[],this.undoStack.push(t)}getKeyboardShortcutOptions(){const t={keyCode:"KeyZ",activeElementInScope:this.getEffectiveTargets(),activeElementOutScope:this.getIneffectiveTargets.bind(this),eventName:"keydown",modifierPressed:!0};return[Object.assign(Object.assign({},t),{shiftKey:!1,callback:t=>{t.preventDefault(),this.undoStack.length>0&&this.undo()}}),Object.assign(Object.assign({},t),{shiftKey:!0,callback:t=>{t.preventDefault(),this.redoStack.length>0&&this.redo()}})]}}export{T as A,K as C,D as R,x as S,E as a}
@@ -1 +1 @@
1
- import{h as t,r as e,c as i,H as s,g as n}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{c as r,V as a,I as l}from"./p-6e1ab235.js";import{V as f,I as h}from"./p-d849e0f5.js";import{c as p}from"./p-f2c8c363.js";import{a as d,w as c}from"./p-8bd496b4.js";import{c as m}from"./p-86194314.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-697eb0e1.js";import"./p-b75ee3ba.js";import"./p-331a62d5.js";import"./p-d9671d27.js";var b=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class x extends a{constructor(){super(...arguments),this.handleSuffixButtonClick=t=>{t.stopPropagation(),this.suffixButtonClickEventEmitter.emit()}}render(){if(this.suffixButtonConfig||this.suffixButtonProps){const{icon:e,text:i,size:s,minWidth:n,maxWidth:o,placement:r="right",alignment:a="start",trigger:l="hover"}=this.suffixButtonConfig||this.suffixButtonProps&&{icon:this.suffixButtonProps.icon,text:this.suffixButtonProps.tooltipText,trigger:this.suffixButtonProps.trigger};return t("div",{class:"label-suffix-button",role:"button",tabIndex:0,onClick:this.handleSuffixButtonClick,onKeyDown:m()},i?t("vega-tooltip",{trigger:l,text:i,size:s,minWidth:n,maxWidth:o,alignment:a,placement:r},this.renderSuffixButton(e)):this.renderSuffixButton(e))}}renderSuffixButton(e){return t("vega-button-circle",{size:"extra-small",variant:"icon-only",iconColor:"text-link",showTooltip:!1,icon:e})}}b([r()],x.prototype,"suffixButtonProps",void 0),b([r()],x.prototype,"suffixButtonConfig",void 0),b([r()],x.prototype,"suffixButtonClickEventEmitter",void 0);var g=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};const u=class{constructor(t){e(this,t),this.vegaClick=i(this,"vegaClick",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",1),this.labelButtonClick=i(this,"labelButtonClick",1),this.globalSlimmers={},this.clickEventEmitter=p(u,d),this.suffixButtonClickEventEmitter=p(u,c),this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.suffixElementRenderer=new x,this.suffixButtonProps=null,this.suffixButtonConfig=null,this.label="",this.isFieldRequired=!1,this.disabled=!1,this.handleClick=t=>{this.clickEventEmitter.emit(void 0,t)}}componentWillLoad(){""===this.label&&(this.label=this.host.textContent,this.host.textContent="")}render(){return o(t(s,{class:{hidden:""===this.label,disabled:this.disabled},onClick:this.handleClick},t("label",null,t("span",{class:"vega-field-label"},this.label),t("span",{class:{"vega-field-label-required":!0,hidden:!this.isFieldRequired}},"*")),this.suffixElementRenderer.render()),this.host)}get host(){return n(this)}};g([h()],u.prototype,"globalSlimmers",void 0),g([l()],u.prototype,"clickEventEmitter",void 0),g([l()],u.prototype,"suffixButtonClickEventEmitter",void 0),g([l()],u.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),g([l()],u.prototype,"suffixElementRenderer",void 0),u.style=':host{display:inline-block}:host(.disabled){pointer-events:none}:host(.hidden){display:none}label:first-of-type{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;word-break:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host(.disabled)>label>span.vega-field-label{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-field-label-required{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-field-label-required.hidden{display:none}.label-suffix-button{display:inline-block;margin-left:4px;vertical-align:top}';export{u as vega_field_label}
1
+ import{h as t,r as e,c as i,H as s,g as n}from"./p-6b2342e0.js";import{s as a}from"./p-519a7d55.js";import{c as o,V as r,I as l}from"./p-6e1ab235.js";import{V as f,I as h}from"./p-d849e0f5.js";import{c as p}from"./p-5367eaab.js";import{a as d,y as c}from"./p-ff57c872.js";import{c as m}from"./p-86194314.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-c335088c.js";import"./p-b75ee3ba.js";import"./p-331a62d5.js";import"./p-d9671d27.js";var x=function(t,e,i,s){var n,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(o=(a<3?n(o):a>3?n(e,i,o):n(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class b extends r{constructor(){super(...arguments),this.handleSuffixButtonClick=t=>{t.stopPropagation(),this.suffixButtonClickEventEmitter.emit()}}render(){if(this.suffixButtonConfig||this.suffixButtonProps){const{icon:e,text:i,size:s,minWidth:n,maxWidth:a,placement:o="right",alignment:r="start",trigger:l="hover"}=this.suffixButtonConfig||this.suffixButtonProps&&{icon:this.suffixButtonProps.icon,text:this.suffixButtonProps.tooltipText,trigger:this.suffixButtonProps.trigger};return t("div",{class:"label-suffix-button",role:"button",tabIndex:0,onClick:this.handleSuffixButtonClick,onKeyDown:m()},i?t("vega-tooltip",{trigger:l,text:i,size:s,minWidth:n,maxWidth:a,alignment:r,placement:o},this.renderSuffixButton(e)):this.renderSuffixButton(e))}}renderSuffixButton(e){return t("vega-button-circle",{size:"extra-small",variant:"icon-only",iconColor:"text-link",showTooltip:!1,icon:e})}}x([o()],b.prototype,"suffixButtonProps",void 0),x([o()],b.prototype,"suffixButtonConfig",void 0),x([o()],b.prototype,"suffixButtonClickEventEmitter",void 0);var g=function(t,e,i,s){var n,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(o=(a<3?n(o):a>3?n(e,i,o):n(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};const u=class{constructor(t){e(this,t),this.vegaClick=i(this,"vegaClick",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",1),this.labelButtonClick=i(this,"labelButtonClick",1),this.globalSlimmers={},this.clickEventEmitter=p(u,d),this.suffixButtonClickEventEmitter=p(u,c),this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.suffixElementRenderer=new b,this.suffixButtonProps=null,this.suffixButtonConfig=null,this.label="",this.isFieldRequired=!1,this.disabled=!1,this.handleClick=t=>{this.clickEventEmitter.emit(void 0,t)}}componentWillLoad(){""===this.label&&(this.label=this.host.textContent,this.host.textContent="")}render(){return a(t(s,{class:{hidden:""===this.label,disabled:this.disabled},onClick:this.handleClick},t("label",null,t("span",{class:"vega-field-label"},this.label),t("span",{class:{"vega-field-label-required":!0,hidden:!this.isFieldRequired}},"*")),this.suffixElementRenderer.render()),this.host)}get host(){return n(this)}};g([h()],u.prototype,"globalSlimmers",void 0),g([l()],u.prototype,"clickEventEmitter",void 0),g([l()],u.prototype,"suffixButtonClickEventEmitter",void 0),g([l()],u.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),g([l()],u.prototype,"suffixElementRenderer",void 0),u.style=':host{display:inline-block}:host(.disabled){pointer-events:none}:host(.hidden){display:none}label:first-of-type{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;word-break:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host(.disabled)>label>span.vega-field-label{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-field-label-required{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-field-label-required.hidden{display:none}.label-suffix-button{display:inline-block;margin-left:4px;vertical-align:top}';export{u as vega_field_label}
@@ -0,0 +1 @@
1
+ import{d as t,e,b as n,h as s,A as r,T as o,n as i,H as a,o as l,c,p as d,q as h,r as u,t as m,u as w,I as T,m as p,S as E,j as g,B as k,v as f,f as R,w as B,x as I,C as x,y as b,s as O,N as L,z as A,D as N,E as y,F as C,l as j,G as H,M as S,J as v,K as D,U as M,L as P,O as V,P as F,R as U}from"./p-39d56e3d.js";import{g as z}from"./p-a4670e23.js";import{i as $}from"./p-161b9c5b.js";import{C as G}from"./p-2d0d575f.js";import{d as J}from"./p-ff57c872.js";import{d as W,e as K}from"./p-1b44db34.js";import{d as X}from"./p-02841589.js";import{r as Y,i as Z}from"./p-d9671d27.js";import{c as _}from"./p-bf19682d.js";import{L as Q}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);$(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(){return[`<li${super.generateAttributeString()}>`,this.children.map((t=>t.toHtml())).join(""),"</li>"].join("")}cloneWithNodes(t){const e=new RTEListItemBlock(z());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(z())}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(o.name,RTEListItemBlock.name,new i),r.register(a.name,RTEListItemBlock.name,new l),r.register(c.LINE_BREAK_SINGLE_BLOCK,RTEListItemBlock.name,new d),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,RTEListItemBlock.name,new h),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 u),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 q extends k{constructor(){super(...arguments),this.type=f.LIST}renderStyle(t){return(null==t?void 0:t.standalone)?{paddingLeft:"8px",marginLeft:"16px"}:null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new q}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(f.LIST,new q)}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);$(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 x.from(e);case"customClass":return I.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(){const t=this.getBlockTag();return[`<${t}${super.generateAttributeString()}>`,this.children.map((t=>t.toHtml())).join(""),`</${t}>`].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 E)))));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 o=t.selectedBlocks,i=o.map((t=>(t.children.map((t=>t.apply(new E))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new g(e,...i));else if(r)e.parent.apply(new T(e,...i));else{const t=e.children.indexOf(o[0]),n=e.children.indexOf(o[o.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 g(e,r,...i,a)),e.parent.apply(new p(e))}o.map((t=>{e.apply(new p(t))})),0===e.children.length&&e.parent.apply(new p(e))}toParagraph(t){const n=new e(z(),"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 tt{}class et{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($)),e}}const nt=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)}},st=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]))continue;let o=0;for(const i of n)if(o=i.canHandle(t,r,e),o>0){const n=t.slice(r,r+o),a=new et(i,n);1===o&&i.shouldProceedToElementChildren()&&a.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(a),r+=o-1;break}if(0===o&&r<t.length){const n=Array.from(t[r].childNodes),o=this.process(Array.from(n),e);o.length>0&&s.push(...o)}}return s}isInvalidElement(t){return t.nodeType===Node.COMMENT_NODE||["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return nt.getElementToBlockStrategies()}};class rt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class ot 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 it extends ot{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class at extends L{constructor(t,e){super(),this.type=A.IMAGE,this.size=t,this.alt=e}static from(t,e){return[A.IMAGE,new at(t,e)]}toJSON(){return $(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new at(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={verticalAlign:"bottom"};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%"})}}}class RTEImageNode extends N{constructor(t,e,n,s){super(t,s),this.type=y.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,o=Object.assign({},t.annotations),{size:i}=o,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}(o,["size"]),l=Object.assign(Object.assign({},a),{size:null!=i?i:r?"md":void 0});return s.annotationMap=new Map(Object.keys(l).map((t=>"size"===t||"alt"===t?at.from(l.size,l.alt):this.createAnnotationEntity(t,l[t]))).filter($)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof at||t instanceof C)).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(){const t=this.getAnnotationByType(A.IMAGE);return`<img${super.generateAttributeString(...[t&&t.alt?`alt="${t.alt}"`:null,`src="${this.url}"`,t&&t.size?`data-size="${t.size}"`:null].filter($))}>`}doAnnotationActionApply(t){const e=r.get(j.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(j.name,RTEImageNode.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}});class lt extends S{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(){const t=super.generateAttributeString(),e=this.children.map((t=>t.toHtml())).join("");return super.shouldRenderAsInternalWrapper()?e:[`<div${t}>`,e,"</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(z())}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 H(t));const o=this.cloneWithNodes(r,n);return n.parent.apply(new T(n,o)),o}}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 lt(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 o=e.from({id:z(),type:"paragraph",nodes:[{id:z(),type:"text",text:"\n"}]});r.parent.apply(new T(r,o));const i=this.concatBlocksNodes(t.slice(1));return(0===i.length||i[0]&&""===i[0].text)&&i.push(new n(z(),"\n",o)),o.apply(new s(i)),o.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,o=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(o.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new T(e,o)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new g(e,o)):(e.apply(new v(n,r)),e.parent.apply(new T(e,o)))}}),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 this.children.length>0}toHtml(){const t=this.htmlTag;return[`<${t}${super.generateAttributeString()}>`,this.children.map((t=>t.toHtml())).join(""),`</${t}>`].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 ct extends S{constructor(t){super(),this.type=c.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class dt 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 o=n.isEmpty();if(e.children.length&&s&&s.parent!==e)o&&e.apply(new p(n)),e.type===s.parent.type&&s.parent.apply(new ct(e));else if(this.isContentFirstNode(n)&&o&&(r=this.getNextNode(n)),o&&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||o||(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),o=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(o=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:o&&(t.nextNode=o)}}class ht 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 v(t,e);return n.apply(s),s.newBlock}n.parent.apply(new g(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(A.LINK),e.apply(new s([n]))),e}}}class ut extends S{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 mt extends t{handleAction(t,e){const{rteRange:n,nodeToBeInserted:s}=t,{startNode:r,startOffset:o}=n;if(r){const t=e;if(r.isContentEditable()&&r.isTextNode())if("\n"!==r.text&&r.text&&0!==o){const e=r.text.substring(0,o),n=r.text.substring(o),i=r.cloneWithText(e),a=r.cloneWithText(n),l=[i,s];n&&l.push(a),t.apply(new g(r,...l)),t.apply(new p(r))}else t.apply(new g(r,s));else t.apply(0!==o?new T(r,s):new g(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new ut(t))}}class wt extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,o=this.createNewParagraph(n);if(o){const t=o.children[0];e.apply(0!==s?new T(r,t):new g(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new ut(t))}}class Tt extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),o=this.copyInlineStyleToNewNode(t);if(r.apply(new s([o])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new v(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new g(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],o=1===n.children.length&&n.children[0].isEmpty();if(n===r&&o){const r=n.parent.parent;if("list-item"!==r.type){const o=e.from({id:z(),type:"paragraph",nodes:[]});return o.apply(new s(t.children)),r.apply(new T(n.parent,o)),n.parent.apply(new p(n)),o}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(A.LINK),e}}class pt extends S{constructor(t){super(),this.type=c.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class Et 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 pt(e):new p(e))}}class gt extends t{handleAction(t,e){if(e.parent){const{blocksToBeInserted:n,startNode:s,startOffset:r}=t;let o=e;if(s===e.children[0]&&0===r)e.parent.apply(new g(e,...n));else{const t=new v(s,r);e.apply(t),e.parent.apply(new T(e,...n)),o=t.newBlock}t.futureFocusBlock=o}}}const kt=new class{registerBlockBasicStrategies(t){r.register(c.DELETE_CHILDREN,t,t===RTEListBlock.name?new Et:new P),r.register(c.APPEND_CHILDREN,t,new rt),r.register(c.INSERT_CHILDREN_BEFORE,t,new ot),r.register(c.INSERT_CHILDREN_AFTER,t,new it),r.register(c.DELETE_BLOCK_CONTENT,t,new dt),r.register(c.INSERT_NEW_PARAGRAPH,t,t===RTEListItemBlock.name?new Tt:new ht),r.register(c.INSERT_TEXT_TO_DECORATOR_NODE,t,new wt),r.register(c.INSERT_NODE_TO_NEAREST_ROOT,t,new mt),r.register(c.PASTE_CONTENT,t,new gt)}};class ft{}class Rt extends ft{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||"bold"===t.style.fontWeight||"700"===t.style.fontWeight||t.classList.contains("v-rte--bold")}}class Bt extends ft{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 It extends ft{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 xt extends ft{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.generateCustomStyleAnnotations(t);return Object.keys(e).length>0?{customStyle:e}:{}}generateCustomStyleAnnotations(t){const e=t.getAttribute("style");return e?e.split(";").filter(Boolean).filter((t=>" "!==t)).map((t=>{const e=t.replace(/(['"])(.*?)\1/g,"$2").split(":");return{[X(e[0].trim())]:e[1].trim().replace(";","")}})).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{}):{}}}class bt extends ft{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 Ot extends ft{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 Lt extends ft{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 At extends ft{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=Y(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=V.filter((t=>t.key!==F.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of V)if(t.style.color.includes(e.key))return e.key;return null}}class Nt extends ft{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||"italic"===t.style.fontStyle||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class yt extends ft{constructor(){super(...arguments),this.handlers=[new Bt,new It,new xt]}canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return e.link?{link:e.link}:"A"===t.tagName?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:z()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class Ct extends ft{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes("line-through")||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class jt extends ft{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes("underline")||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class Ht extends ft{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"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|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class St extends ft{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 vt extends ft{canHandle(t){return"RTEImageNode"===t.name}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}class Dt extends ft{constructor(){super(...arguments),this.customAttributeHandler=new Bt,this.customStyleAnnotationHandler=new xt,this.customClassAnnotationHandler=new It}canHandle(t,e){return"RTETextNode"===t.name&&!1===e.autoMatchFormat}handle(t,e){if(Dt.canHandleTags.includes(t.nodeName)){const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));if(n)return{inlineHtml:n}}return{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||1===t.childNodes.length&&t.childNodes[0].nodeType!==Node.TEXT_NODE){const e={htmlTag:t.nodeName.toLowerCase(),customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass};if(s){let n=s;for(;n.child&&t.parentNode&&n.child.htmlTag===t.parentNode.nodeName.toLowerCase();)n=n.child;n.child=e}else s=e}return s?Object.assign({},s):null}}Dt.canHandleTags=["A","ABBR","AUDIO","B","BDI","BDO","CITE","CODE","DEL","DFN","EMBED","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR","VIDEO"];const Mt=new class{constructor(){this.handlers=[new Ot,new bt,new Rt,new Nt,new jt,new Ct,new At,new yt,new Lt,new St,new vt,new Bt,new It,new xt,new yt,new Ht,new Dt]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){const s="A"===e.tagName;return 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)}),{})}};class Pt extends tt{constructor(){super(...arguments),this.annotationHandler=new Ht}generateChildNodes(t,e,s){const r=[],o=!(!s||!1!==s.autoMatchFormat),i=Object.assign({},e);return t.forEach((t=>{const a=nt.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let l=null;if(a&&(l=a.handle([t],s,i)),l)r.push(l);else if(Z(t)&&t.childNodes.length>0){const a=Mt.generate(n,t,Object.assign({parentAnnotations:o?{inlineHtml:i.inlineHtml,link:i.link,code:i.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 Vt extends Pt{canHandle(t,e,n){const s=t[e];return!n.autoMatchFormat&&("DIV"!==s.nodeName||s.childNodes.length>0&&"IMG"!==s.childNodes[0].nodeName)&&Vt.canHandleTags.includes(t[e].nodeName)?1:0}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}generateHtmlBlock(t,e){return{id:z(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:Mt.generate(RTEHtmlBlock,t,e),children:[]}}}Vt.canHandleTags=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BUTTON","CAPTION","COL","COLGROUP","DIV","DD","DETAILS","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","HEADER","HR","HX","INPUT","LEGEND","MAIN","NAV","PRE","SECTION","SUMMARY","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR"];class Ft extends Pt{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:z(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class Ut extends Pt{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return RTEImageBlock.from({id:z(),type:"image",nodes:[{id:z(),type:"image",url:t.src,annotations:Mt.generate(RTEImageNode,t,e)}],annotations:Object.assign(Object.assign({},Mt.generate(RTEImageBlock,t.parentElement,e)),{internalWrapper:n})},e)}}class zt extends Pt{canHandle(t,e){let n=0;for(let s=e;s<t.length;s++){const e=t[s];if(e.nodeType!==Node.TEXT_NODE&&(!zt.canHandleTags.includes(e.nodeName)||""===e.textContent&&e.querySelector("IMG")))break;n++}return n}handle(t,s){const r=t[0].parentElement,o=s&&s.autoMatchFormat,i=this.generateChildNodes(t,o?Mt.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),a=o?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),l=!o&&!a;return e.from(Object.assign({id:z(),type:a||"paragraph",nodes:i},l?{annotations:{internalWrapper:l}}:{annotations:Mt.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}}zt.canHandleTags=[...Dt.canHandleTags,"CODE","A","VEGA-RICH-TEXT-LINK-EDITOR","BR"];class $t extends tt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:z(),type:"text",text:t,annotations:e}}}U.registerRTEDTOClass("paragraph",e),U.registerRTEDTOClass("title",e),U.registerRTEDTOClass("subtitle",e),U.registerRTEDTOClass("heading-1",e),U.registerRTEDTOClass("heading-2",e),U.registerRTEDTOClass("heading-3",e),U.registerRTEDTOClass("heading-4",e),U.registerRTEDTOClass("heading-5",e),U.registerRTEDTOClass("heading-6",e),U.registerRTEDTOClass("heading-6",e),U.registerRTEDTOClass("list-item",RTEListItemBlock),U.registerRTEDTOClass("bullet-list",RTEListBlock),U.registerRTEDTOClass("number-list",RTEListBlock),U.registerRTEDTOClass("image",RTEImageBlock),U.registerRTEDTOClass("code-block",b),U.registerRTEDTOClass("html-block",RTEHtmlBlock),U.registerRTEDTOClass("text",n),U.registerRTEDTOClass("image",RTEImageNode),kt.registerBlockBasicStrategies(e.name),kt.registerBlockBasicStrategies(RTEListBlock.name),kt.registerBlockBasicStrategies(RTEListItemBlock.name),kt.registerBlockBasicStrategies(RTEImageBlock.name),kt.registerBlockBasicStrategies(RTEHtmlBlock.name),nt.registerElementToBlockStrategy(new zt),nt.registerElementToBlockStrategy(new class extends Ut{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}}),nt.registerElementToBlockStrategy(new class extends Ut{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($(s))return RTEImageBlock.from({id:z(),type:"image",nodes:[{id:z(),type:"image",url:s.src,annotations:Mt.generate(RTEImageNode,n,e)}],annotations:Mt.generate(RTEImageBlock,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),nt.registerElementToBlockStrategy(new class extends Ut{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),nt.registerElementToBlockStrategy(new class extends Pt{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:z(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:Mt.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),nt.registerElementToBlockStrategy(new Ft),nt.registerElementToBlockStrategy(new class extends Ft{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}}),nt.registerElementToBlockStrategy(new class extends Pt{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:z(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:z(),type:"list-item",annotations:Mt.generate(RTEListItemBlock,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),Mt.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),nt.registerElementToBlockStrategy(new class extends Pt{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,o=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),i=$(s)&&["UL","OL"].includes(s.nodeName);return r&&!o&&i?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return RTEListItemBlock.from({id:z(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),nt.registerElementToBlockStrategy(new class extends Pt{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:z(),type:"number-list",blocks:[],annotations:Mt.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}}),nt.registerElementToBlockStrategy(new class extends Pt{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:RTEListBlock.from({id:z(),type:"bullet-list",blocks:[],annotations:Mt.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}}),nt.registerElementToBlockStrategy(new Vt),nt.registerElementToNodeStrategy(new class extends $t{canHandle(t,e){const n=t[e];return!Z(n)||"BR"!==n.nodeName&&0!==n.childNodes.length?0:1}handle(t,e,s){const r=!(!e||!1!==e.autoMatchFormat),o=Object.assign({},s),i=t[0],a=Mt.generate(n,i,Object.assign({parentAnnotations:r?{inlineHtml:o.inlineHtml,link:o.link,code:o.code}:s},e));if("BR"===i.nodeName)return this.generateTextNode("\n",a);if(0===i.childNodes.length){const t=r?_(Object.assign(Object.assign({},n.supportsHtmlTag(i.nodeName.toLowerCase())?a:{}),{inlineHtml:a.inlineHtml,plainText:$(a.inlineHtml)})):a;return Object.assign({},this.generateTextNode("",t))}}}),nt.registerElementToNodeStrategy(new class extends $t{canHandle(t,e){return t[e].nodeType===Node.TEXT_NODE?1:0}handle(t,e,s){const r=Object.assign({},s),o=!(!e||!1!==e.autoMatchFormat),i=t[0],a=i.parentNode.nodeName.toLowerCase(),l=o&&!n.supportsHtmlTag(a),c=this.generateTextNode(String(i.textContent),o?_(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)}});class Gt{static preserve(t){const e=t.replace(/\s+style=/g," data-style=");return new Jt(e)}}class Jt{constructor(t){this.processedHtml=t}getProcessedHtml(){return this.processedHtml}restore(t){this.walkNodes(t)}walkNodes(t){t.forEach((t=>{if(Z(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 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=U.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:z(),type:"paragraph",annotations:{internalWrapper:!t.autoMatchFormat},nodes:[{id:z(),annotations:{plainText:!t.autoMatchFormat},type:"text",text:""}]}],t)}static fromHtml(t,e={autoMatchFormat:!0,skipCustomAnnotations:!1}){const n=t.replace(/>\s+<\/?/g,(t=>t.endsWith("</")?t:"><")).replace(/(>)[\n\t]+(?=[a-zA-Z0-9_\W])/g,"$1").replace(/([a-zA-Z0-9_\W])[\n\t]+(?=<)/g,"$1"),s=Gt.preserve(n),r=s.getProcessedHtml(),o=(new DOMParser).parseFromString(r,"text/html").body,i=Array.from(o.childNodes);s.restore(i);const a=st.process(i,e).filter($).map((t=>t.toDto(e))).filter($);return new VegaRTEContent(a)}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&&Q.warn("The 'options' parameter in toHtml method is deprecated and will be removed in the future."),this.isEmpty()?"":this.children.map((t=>t.toHtml())).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&&G.notify(J.getSubject(t,K),{})}}getLastNode(){return 0===this.children.length?null:this.children[this.children.length-1].getLastNode()}toListItem(t){t.children.map((t=>t.apply(new E)));const e=new RTEListItemBlock(z());return e.apply(new s(t.children)),e.annotationMap=t.annotationMap,e}createList(t){return new RTEListBlock(z(),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 rt),r.register(c.INSERT_CHILDREN_BEFORE,VegaRTEContent.name,new ot),r.register(c.INSERT_CHILDREN_AFTER,VegaRTEContent.name,new it),r.register(c.TRANSFORM_TO_CODE_BLOCK,VegaRTEContent.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,s=new b(z(),this.getCodeContent(n),"plainText");e.apply(new g(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,o=O.getDOMByEntity(e);o&&G.notify(J.getSubject(o,W),{node:s,offset:n,updateDirectly:r})}});export{ft as A,Pt as B,nt as E,lt as I,ct as M,gt as P,kt as R,Gt as S,ut as U,VegaRTEContent as V,tt as a,RTEListItemBlock as b,RTEImageBlock as c,ot as d,RTEListBlock as e,RTEImageNode as f,at as g,Mt as h,st as i}
@@ -1 +1 @@
1
- import{V as t,I as e,c as s,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-02841589.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,a as l,b as h,F as c,c as d,d as u,e as f}from"./p-a528714c.js";import{f as m,d as p}from"./p-d9671d27.js";import{i as v,g as b}from"./p-a4670e23.js";import{c as g}from"./p-6a334573.js";import{d as R,D as j}from"./p-8bd496b4.js";import{f as y,d as w,g as O}from"./p-5b71c85e.js";import{V as E}from"./p-f69f84a7.js";import{P as V}from"./p-10ac8b57.js";import{I as F}from"./p-abd7aeaa.js";import{M as I}from"./p-78a57a17.js";import{A as C}from"./p-52b8f2d2.js";import{i as S}from"./p-d27ae9ff.js";import{S as A}from"./p-59fa3f68.js";class k{constructor(t){this.rule=t}getStatus(t,e,s){return{canEvaluate:this.rule.canEvaluate(t,e,s),isAsync:v(this.rule.evaluate)}}shouldShowError(t,e){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,e):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class T{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,e,s){return!!this.handlers.find((i=>{const r=i.getStatus(t,e,s);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new k(t))):[]}async process(t,e,s,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,e,s);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(e,s);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=b();return this.processId=t,t}postProcess(t,e,s,i){this.processId===t&&i(e,s)}}class L{run(t){const e=t.nextElementSibling;return e&&e.querySelector(".vega-error")?e.querySelector(".vega-error"):null}}class M{run(t){let e=t.nextElementSibling;return e&&!e.classList.contains("vega-error")&&(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class D{run(t){let e=t.nextElementSibling;return e||(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class B extends t{getTranslatedMessage(t){return"string"==typeof t?E.t(t):E.t(t.key,...t.args||[])}}var H=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class U extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new B,this.fieldErrorUiControllerStrategies=[new L,new M,new D],this.initTranslationObserver()}applyInputInvalidUI(t){const e=this.getInputElementContainer();if(o.notify(R.getSubject(this.host,y),{host:this.host,showError:!0}),e&&(e.classList.add("error"),t)){this.errorMessage=t;const s=this.getErrorContainer(e);s.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),s.classList.remove("vega-hidden")}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(R.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const e of this.fieldErrorUiControllerStrategies){const s=e.run(t);if(s)return s}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const e=this.getErrorContainer(t);e&&(e.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}H([e()],U.prototype,"formFieldMessageTranslatorSlimmer",void 0),H([s()],U.prototype,"host",void 0),H([s()],U.prototype,"options",void 0);var x=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class G{constructor(t,e,s,i){var r,n;this.formFieldMessageTranslatorSlimmer=new B,this.fieldErrorUIController=new U,this.resizeObserverSlimmer=g(G,V,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const e=this.isVisible,s=t[0].contentRect.height>0;this.isVisible=s,this.isAutoValidationEnabled()&&m(this.host,"vega-form")&&e!==s&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new T,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,e)=>{let s=!0;return e?("rule"===t?e.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI(),s=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(s),o.notify(l,{host:this.host,detail:s}),s},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>t&&!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=e,this.defaultValue=s,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((e=>this.overrideDefaultRuleByAdditionalRule(e,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,e="rule"){const s=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,s,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,s,t,e,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((e=>e.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const e=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(e===t?[]:["touched"])}updateIsModified(t){const e=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(e===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return m(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var e,s;if(this.shouldVisitElement(this.host,null===(e=t.option)||void 0===e?void 0:e.skipDisabled,null===(s=t.option)||void 0===s?void 0:s.skipInvisible)){const e=t.defaultValueMap,s=this.host.dataset.vegaForm,i=null==e[s]?this.getDefaultValue():e[s];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,e,s){return!(!t.dataset.vegaForm||e&&t.disabled||s&&!p(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{if(this.canSubmitFormByEvent(t)){const t=m(this.host,"vega-form",{outerMost:!0});t&&o.notify(R.getSubject(t,w),{host:this.host})}}))}canSubmitFormByEvent(t){const e="Enter"===t.key||13===t.keyCode,s=e&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return s&&t.preventDefault(),s;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return e}}overrideDefaultRuleByAdditionalRule(t,e){if(t&&e){const s=e.findIndex((e=>e instanceof F&&e instanceof t.constructor&&e.overrideDefault));if(s>-1)return e.splice(s,1)[0]}return t}}x([e()],G.prototype,"formFieldMessageTranslatorSlimmer",void 0),x([e()],G.prototype,"fieldErrorUIController",void 0),x([e()],G.prototype,"resizeObserverSlimmer",void 0);var P=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class W extends t{constructor(){super(...arguments),this.fieldErrorUIController=new U,this.handleFieldErrorMessageUpdate=t=>{const{message:e,isValid:s}=t;s?this.fieldErrorUIController.resetInputInvalidUI():this.fieldErrorUIController.applyInputInvalidUI(e)}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(u,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(u,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:e}=t,s=this.host.parentElement;return s&&s===e&&"VEGA-FIELD-ERROR"===s.tagName||this.host===e}}P([s()],W.prototype,"host",void 0),P([s()],W.prototype,"options",void 0),P([e()],W.prototype,"fieldErrorUIController",void 0),P([i("setInjectFormFieldHelper")],W.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),P([i("disconnectedCallback")],W.prototype,"handleUnregisterObserver",null);var z=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class K extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const e=await this.validator.validate(t.message);if(e){const{isValid:s,message:i}=e;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:s,message:i})}}}}registerValidInvocationObserver(){j.addUniqueObserverToNode(this.host,O,this.handleValidInvocation)}handleUnregisterObserver(){j.removeUniqueObserverFromNode(this.host,O)}}z([s()],K.prototype,"host",void 0),z([s()],K.prototype,"validator",void 0),z([i("setInjectFormFieldHelper")],K.prototype,"registerValidInvocationObserver",null),z([i("disconnectedCallback")],K.prototype,"handleUnregisterObserver",null);var N=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class X extends A{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var e;null===(e=this.validator)||void 0===e||e.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}N([s()],X.prototype,"host",void 0),N([s()],X.prototype,"validator",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"componentWillLoad",null);var q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class J extends t{constructor(t){super(),this.fieldErrorSlimmer=new W,this.formFieldValidInvokeSlimmer=new K,this.formFormStateController=new X,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}static isValidFormField(t){return t&&Boolean(t.getAttribute("data-vega-form"))}watchValidationRulesByFormControllerSlimmer(t,e){S(t,e,!1,((t,e)=>t===e?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(J.isValidFormField(this.host)){const{defaultValue:t}=this.options,e=new G(this.getPropertyRules(),this.host,t,this.options);e.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(f,{host:this.host,detail:t}))}}),this.validator=e,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:e}=this.options;return t.map((t=>{const s=t.dependence&&"string"==typeof t.dependence?[e(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>e(t))):[null];return t.ruleFactory(e(t.propertyName),...s)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new I({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:C(),callback:this.mutationObserverCallBack})}}q([s()],J.prototype,"host",void 0),q([s({writable:!0})],J.prototype,"validationRules",void 0),q([s()],J.prototype,"disabled",void 0),q([s()],J.prototype,"autoValidation",void 0),q([s({writable:!0})],J.prototype,"isValid",void 0),q([e()],J.prototype,"fieldErrorSlimmer",void 0),q([e()],J.prototype,"formFieldValidInvokeSlimmer",void 0),q([e()],J.prototype,"mutationObserverSlimmer",void 0),q([e()],J.prototype,"formFormStateController",void 0),q([i("connectedCallback")],J.prototype,"connectedCallback",null),q([i("disconnectedCallback")],J.prototype,"disconnectedCallback",null),q([i("componentDidLoad")],J.prototype,"componentDidLoad",null),q([i("watchValidationRules")],J.prototype,"watchValidationRulesByFormControllerSlimmer",null),q([i("componentWillLoad")],J.prototype,"setInjectFormFieldHelper",null);export{J as F}
1
+ import{V as t,I as e,c as s,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-02841589.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,a as l,b as h,F as c,c as d,d as u,e as f}from"./p-a528714c.js";import{f as m,d as p}from"./p-d9671d27.js";import{i as v,g as b}from"./p-a4670e23.js";import{c as g}from"./p-6a334573.js";import{d as R,D as j}from"./p-ff57c872.js";import{i as y,g as w,j as O}from"./p-1b44db34.js";import{V as E}from"./p-f69f84a7.js";import{P as V}from"./p-10ac8b57.js";import{I as F}from"./p-abd7aeaa.js";import{M as I}from"./p-78a57a17.js";import{A as C}from"./p-52b8f2d2.js";import{i as S}from"./p-d27ae9ff.js";import{S as A}from"./p-ff9a0e6e.js";class k{constructor(t){this.rule=t}getStatus(t,e,s){return{canEvaluate:this.rule.canEvaluate(t,e,s),isAsync:v(this.rule.evaluate)}}shouldShowError(t,e){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,e):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class T{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,e,s){return!!this.handlers.find((i=>{const r=i.getStatus(t,e,s);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new k(t))):[]}async process(t,e,s,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,e,s);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(e,s);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=b();return this.processId=t,t}postProcess(t,e,s,i){this.processId===t&&i(e,s)}}class L{run(t){const e=t.nextElementSibling;return e&&e.querySelector(".vega-error")?e.querySelector(".vega-error"):null}}class M{run(t){let e=t.nextElementSibling;return e&&!e.classList.contains("vega-error")&&(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class D{run(t){let e=t.nextElementSibling;return e||(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class B extends t{getTranslatedMessage(t){return"string"==typeof t?E.t(t):E.t(t.key,...t.args||[])}}var H=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class U extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new B,this.fieldErrorUiControllerStrategies=[new L,new M,new D],this.initTranslationObserver()}applyInputInvalidUI(t){const e=this.getInputElementContainer();if(o.notify(R.getSubject(this.host,y),{host:this.host,showError:!0}),e&&(e.classList.add("error"),t)){this.errorMessage=t;const s=this.getErrorContainer(e);s.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),s.classList.remove("vega-hidden")}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(R.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const e of this.fieldErrorUiControllerStrategies){const s=e.run(t);if(s)return s}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const e=this.getErrorContainer(t);e&&(e.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}H([e()],U.prototype,"formFieldMessageTranslatorSlimmer",void 0),H([s()],U.prototype,"host",void 0),H([s()],U.prototype,"options",void 0);var x=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class G{constructor(t,e,s,i){var r,n;this.formFieldMessageTranslatorSlimmer=new B,this.fieldErrorUIController=new U,this.resizeObserverSlimmer=g(G,V,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const e=this.isVisible,s=t[0].contentRect.height>0;this.isVisible=s,this.isAutoValidationEnabled()&&m(this.host,"vega-form")&&e!==s&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new T,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,e)=>{let s=!0;return e?("rule"===t?e.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI(),s=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(s),o.notify(l,{host:this.host,detail:s}),s},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>t&&!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=e,this.defaultValue=s,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((e=>this.overrideDefaultRuleByAdditionalRule(e,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,e="rule"){const s=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,s,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,s,t,e,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((e=>e.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const e=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(e===t?[]:["touched"])}updateIsModified(t){const e=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(e===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return m(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var e,s;if(this.shouldVisitElement(this.host,null===(e=t.option)||void 0===e?void 0:e.skipDisabled,null===(s=t.option)||void 0===s?void 0:s.skipInvisible)){const e=t.defaultValueMap,s=this.host.dataset.vegaForm,i=null==e[s]?this.getDefaultValue():e[s];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,e,s){return!(!t.dataset.vegaForm||e&&t.disabled||s&&!p(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{if(this.canSubmitFormByEvent(t)){const t=m(this.host,"vega-form",{outerMost:!0});t&&o.notify(R.getSubject(t,w),{host:this.host})}}))}canSubmitFormByEvent(t){const e="Enter"===t.key||13===t.keyCode,s=e&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return s&&t.preventDefault(),s;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return e}}overrideDefaultRuleByAdditionalRule(t,e){if(t&&e){const s=e.findIndex((e=>e instanceof F&&e instanceof t.constructor&&e.overrideDefault));if(s>-1)return e.splice(s,1)[0]}return t}}x([e()],G.prototype,"formFieldMessageTranslatorSlimmer",void 0),x([e()],G.prototype,"fieldErrorUIController",void 0),x([e()],G.prototype,"resizeObserverSlimmer",void 0);var P=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class W extends t{constructor(){super(...arguments),this.fieldErrorUIController=new U,this.handleFieldErrorMessageUpdate=t=>{const{message:e,isValid:s}=t;s?this.fieldErrorUIController.resetInputInvalidUI():this.fieldErrorUIController.applyInputInvalidUI(e)}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(u,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(u,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:e}=t,s=this.host.parentElement;return s&&s===e&&"VEGA-FIELD-ERROR"===s.tagName||this.host===e}}P([s()],W.prototype,"host",void 0),P([s()],W.prototype,"options",void 0),P([e()],W.prototype,"fieldErrorUIController",void 0),P([i("setInjectFormFieldHelper")],W.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),P([i("disconnectedCallback")],W.prototype,"handleUnregisterObserver",null);var z=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class K extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const e=await this.validator.validate(t.message);if(e){const{isValid:s,message:i}=e;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:s,message:i})}}}}registerValidInvocationObserver(){j.addUniqueObserverToNode(this.host,O,this.handleValidInvocation)}handleUnregisterObserver(){j.removeUniqueObserverFromNode(this.host,O)}}z([s()],K.prototype,"host",void 0),z([s()],K.prototype,"validator",void 0),z([i("setInjectFormFieldHelper")],K.prototype,"registerValidInvocationObserver",null),z([i("disconnectedCallback")],K.prototype,"handleUnregisterObserver",null);var N=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class X extends A{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var e;null===(e=this.validator)||void 0===e||e.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}N([s()],X.prototype,"host",void 0),N([s()],X.prototype,"validator",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"componentWillLoad",null);var q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class J extends t{constructor(t){super(),this.fieldErrorSlimmer=new W,this.formFieldValidInvokeSlimmer=new K,this.formFormStateController=new X,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}static isValidFormField(t){return t&&Boolean(t.getAttribute("data-vega-form"))}watchValidationRulesByFormControllerSlimmer(t,e){S(t,e,!1,((t,e)=>t===e?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(J.isValidFormField(this.host)){const{defaultValue:t}=this.options,e=new G(this.getPropertyRules(),this.host,t,this.options);e.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(f,{host:this.host,detail:t}))}}),this.validator=e,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:e}=this.options;return t.map((t=>{const s=t.dependence&&"string"==typeof t.dependence?[e(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>e(t))):[null];return t.ruleFactory(e(t.propertyName),...s)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new I({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:C(),callback:this.mutationObserverCallBack})}}q([s()],J.prototype,"host",void 0),q([s({writable:!0})],J.prototype,"validationRules",void 0),q([s()],J.prototype,"disabled",void 0),q([s()],J.prototype,"autoValidation",void 0),q([s({writable:!0})],J.prototype,"isValid",void 0),q([e()],J.prototype,"fieldErrorSlimmer",void 0),q([e()],J.prototype,"formFieldValidInvokeSlimmer",void 0),q([e()],J.prototype,"mutationObserverSlimmer",void 0),q([e()],J.prototype,"formFormStateController",void 0),q([i("connectedCallback")],J.prototype,"connectedCallback",null),q([i("disconnectedCallback")],J.prototype,"disconnectedCallback",null),q([i("componentDidLoad")],J.prototype,"componentDidLoad",null),q([i("watchValidationRules")],J.prototype,"watchValidationRulesByFormControllerSlimmer",null),q([i("componentWillLoad")],J.prototype,"setInjectFormFieldHelper",null);export{J as F}
@@ -0,0 +1 @@
1
+ class e{constructor(e){this.name=e}getName(){return this.name}}const n=new e("valid"),a=new e("fieldErrorStateChange"),t=new e("virtualScrollToBottom"),s=new e("buttonGroupClick"),r=new e("leftNavLinkClick"),l=new e("subStatePull"),w=new e("subStatePush"),i=new e("monthEventsChange"),o=new e("dropdownTemplateItemsChange"),d=new e("tableRowSelect"),c=new e("tableRowSelectAll"),C=new e("tableRowExpand"),p=new e("dropdownRenderItemInternalOverridden"),u=new e("dropdownRenderPrefixIconInternalOverridden"),g=new e("VegaDropdownSearchInternalOverridden"),h=new e("sidenavLinkClick"),v=new e("leftNavGroupExpand"),S=new e("leftNavLinkSelected"),I=new e("initializeLeftNavLinkSelected"),k=new e("richTextEditorFlushChanges"),E=new e("richTextEditorSelectionRangeChange"),R=new e("richTextImageClick"),T=new e("richTextImageDeleteButtonClicked"),b=new e("componentDidRender"),m=new e("popoverUpdateTarget"),f=new e("richTextEditDeleteSelectedNodes"),x=new e("paginationPageSizeChange"),P=new e("paginationCurrentChange"),N=new e("pasteEvent"),L=new e("nestEAHierarchyTreeChange"),H=new e("tableHeadCellSortEvent"),U=new e("internalCodeBlockSelectionChange"),V=new e("tableHeadRowRenderInputRIC"),B=new e("tableHeadCellRenderInputRIC"),D=new e("tableCellRenderInputRIC"),A=new e("calendarEventPreviewUpdate"),O=new e("calendarEventPreviewClear"),y=new e("InternalUpdateRTECursorPosition"),z=new e("leftNavLinkSelectedTopic"),G=new e("calendarEventPreviewHide"),F=new e("formSubmit"),M=new e("formReset"),j=new e("progressTrackerStepClick"),q=new e("datePickerCalendarClear"),J=new e("datePickerCalendarUpdatePeriodByUser"),K=new e("updateVegaInputValue"),Q=new e("focusVegaInput"),W=new e("setupVegaInputMaskConfig"),X=new e("rteExtensionTableCellsSelectionAnchor"),Y=new e("rteExtensionTableCellSelectionChange");export{L as A,j as B,s as C,h as D,i as E,G as F,O as G,A as H,f as I,R as J,T as K,r as L,v as M,S as N,I as O,z as P,C as Q,d as R,c as S,V as T,B as U,m as V,D as W,H as X,X as a,Y as b,b as c,y as d,k as e,E as f,F as g,M as h,a as i,n as j,w as k,l,o as m,t as n,u as o,W as p,K as q,Q as r,N as s,x as t,P as u,p as v,g as w,U as x,q as y,J as z}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as i,H as s,g as a}from"./p-6b2342e0.js";import{C as o}from"./p-2d0d575f.js";import{d as n,e as r,F as l,b as c,a as d,c as h}from"./p-a528714c.js";import{s as m}from"./p-519a7d55.js";import{c as u,M as f,V as p,I as v}from"./p-6e1ab235.js";import{m as b}from"./p-6bd5c49b.js";import{V as j,I as g}from"./p-d849e0f5.js";import{c as F}from"./p-5367eaab.js";import{C as V}from"./p-c00adad9.js";import{d as w,C as y,E as C,F as R}from"./p-ff57c872.js";import{c as O}from"./p-ddf81373.js";import{S as E}from"./p-ff9a0e6e.js";import{F as S}from"./p-16af7681.js";import{t as k}from"./p-b75ee3ba.js";import{g as M,j as P,h as B}from"./p-1b44db34.js";import{O as I}from"./p-331a62d5.js";import{f as N,b as A,d as x}from"./p-d9671d27.js";import{i as D}from"./p-161b9c5b.js";import{I as H}from"./p-b28d4f7d.js";import{C as $}from"./p-521d1d07.js";import{d as T}from"./p-d27ae9ff.js";import"./p-6a334573.js";import"./p-c335088c.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-02841589.js";import"./p-a4670e23.js";import"./p-f69f84a7.js";import"./p-10ac8b57.js";import"./p-40f39194.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d884c644.js";import"./p-262ec334.js";var W=function(t,e,i,s){var a,o=arguments.length,n=o<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 r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class G extends E{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation"}]})}}W([u()],G.prototype,"host",void 0),W([u({writable:!0})],G.prototype,"disableBlurValidation",void 0);var U=function(t,e,i,s){var a,o=arguments.length,n=o<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 r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class _ extends p{setValidationStates(t){0!==t.length?t.forEach((t=>{const e=this.getHostByFieldName(t.fieldName);e&&this.updateFieldValidationState(e,{isValid:t.isValid,errorMessage:t.isValid?"":t.errorMessage})})):Array.from(this.host.querySelectorAll("[data-vega-form]")).filter((t=>S.isValidFormField(t))).forEach((t=>{this.updateFieldValidationState(t,{isValid:!0})}))}getHostByFieldName(t){const e=t.split(".");let i=this.host;for(const t of e){const e=i.querySelector(`[data-vega-form="${t}"]`);if(!S.isValidFormField(e))return null;i=e}return i}updateFieldValidationState(t,{isValid:e,errorMessage:i}){t.isValid=e,o.notify(n,{host:t,message:e?"":i,isValid:e}),o.notify(r,{host:t,detail:e})}}U([u()],_.prototype,"host",void 0),U([f("setValidationStates")],_.prototype,"setValidationStates",null);var q=function(t,e,i,s){var a,o=arguments.length,n=o<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 r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class z extends p{getNativeFormRef(){return this.nativeFormRef}render(){return t("form",{action:this.action,method:this.method,ref:t=>{t&&(this.nativeFormRef=t)}},t("slot",null))}}q([u()],z.prototype,"method",void 0),q([u()],z.prototype,"action",void 0);var J=function(t,e,i,s){var a,o=arguments.length,n=o<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 r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class K extends p{connectedCallback(){this.registerFormSubmitChangeManager()}disconnectedCallback(){this.unregisterFormSubmitChangeManager()}async submitWithFormData(){if(!this.useNativeForm)return;const t=await this.host.getValue();for(const e in t)if("object"==typeof t[e]){const i=this.flattenObjectWithBrackets({[e]:t[e]});for(const t in i){const e=this.createHiddenInput(t,i[t]);this.nativeFormRenderer.getNativeFormRef().append(e)}}else{const i=this.createHiddenInput(e,t[e]);this.nativeFormRenderer.getNativeFormRef().append(i)}this.nativeFormRenderer.getNativeFormRef().requestSubmit()}createHiddenInput(t,e){const i=k().createElement("input");return i.type="hidden",i.name=t,i.value=D(e)?String(e):"",i}registerFormSubmitChangeManager(){var t;this.formSubmitEventObserver=new I(this.canAcceptFormSubmitEvent.bind(this),this.handleSubmitEvents.bind(this));const e=null!==(t=N(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;o.register(w.getSubject(e,M),this.formSubmitEventObserver)}unregisterFormSubmitChangeManager(){var t;const e=null!==(t=N(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;o.unregister(w.getSubject(e,M),this.formSubmitEventObserver)}canAcceptFormSubmitEvent(t){return this.vegaFormFieldController.isElementInCurrentForm(t.host)}async handleSubmitEvents(){if((await this.host.valid()).isValid){const t=await this.host.getValue();this.submitEventEmitter.emit(t).defaultPrevented||await this.submitWithFormData()}}flattenObjectWithBrackets(t,e="",i={}){return Object.entries(t).forEach((([t,s])=>{const a=e?`${e}[${t}]`:t;Array.isArray(s)?s.forEach(((t,e)=>{const s=`${a}[${e}]`;"object"==typeof t&&null!==t?this.flattenObjectWithBrackets(t,s,i):i[s]=t})):D(s)&&"object"==typeof s?this.flattenObjectWithBrackets(s,a,i):i[a]=s})),i}}J([u()],K.prototype,"host",void 0),J([u()],K.prototype,"useNativeForm",void 0),J([u()],K.prototype,"nativeFormRenderer",void 0),J([u()],K.prototype,"submitEventEmitter",void 0),J([u()],K.prototype,"vegaFormFieldController",void 0),J([f("connectedCallback")],K.prototype,"connectedCallback",null),J([f("disconnectedCallback")],K.prototype,"disconnectedCallback",null);var L=function(t,e,i,s){var a,o=arguments.length,n=o<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 r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class Q extends p{constructor(){super(...arguments),this.childNotifyObserver=new $(r,(t=>this.updateInternalValidStatus(t))),this.childNodeValueChangeObserver=new $(l,(()=>{this.isTouched=!0})),this._invalidFieldPathMap=new H(new Map,(t=>{this._invalidFieldPathMap=t,this.updateIsValidFlag()})),this._pendingValidFieldPathMap=new H(new Map,(t=>{this._pendingValidFieldPathMap=t,this.updateIsValidFlag()})),this.updateInternalValidStatus=t=>{if(t.host!==this.host){const e=t.host,i=t.detail;S.isValidFormField(e)&&this.shouldVisitElement(e,!1,!1)&&(i?this.invalidFieldPathMap.delete(e):this.invalidFieldPathMap.set(e,e.dataset.vegaForm))}}}connectedCallback(){this.initFormFieldDisconnectedObserver(),this.registerFormFieldPendingValid()}disconnectedCallback(){o.notify(c,{host:this.host}),o.unregister(c,this.formFieldDisconnectedObserver),o.unregister(d,this.formFieldPendingValidObserver)}async getValue(t){const e={};return await this.navigateVegaFormChildren((async(i,s)=>{const a=this.getFormFieldName(i);e[a]=s?await i.getValue(t):this.getFormFieldValue(i)}),t),T(e)?Object.values(e):e}async setValue(t,e){t&&(await this.navigateVegaFormChildren((async(i,s)=>{const a=this.getFormFieldName(i);s?await i.setValue(t[a],e):(await i.componentOnReady(),void 0!==t[a]&&("function"==typeof i.setValue?await i.setValue(t[a]):i.value=t[a]))}),e),this.isTouched=!1)}async valid(t=!0){const e={isValid:!0,invalidFields:[]};return await this.navigateVegaFormChildren((async(i,s)=>{if("function"==typeof i.valid&&s){const s=await i.valid(t);s.isValid||(e.isValid=!1,e.invalidFields.push(...s.invalidFields),e.invalidFieldsErrorMessages=Object.assign(Object.assign({},e.invalidFieldsErrorMessages),s.invalidFieldsErrorMessages))}else{const{isValid:s,message:a}=await this.handleChildFormFieldElementValid(i,t);s||(e.isValid=!1,e.invalidFields.push(this.getFormFieldName(i)),e.invalidFieldsErrorMessages||(e.invalidFieldsErrorMessages={}),e.invalidFieldsErrorMessages[this.getFormFieldName(i)]=a)}})),e}get invalidFieldPathMap(){return this._invalidFieldPathMap}get pendingValidFieldPathMap(){return this._pendingValidFieldPathMap}setIsTouched(t){this.isTouched=t}getFormFieldName(t){return t.dataset.vegaForm}isElementInCurrentForm(t){return this.invalidFieldPathMap.has(t)||A(t,this.host)}async navigateVegaFormChildren(t,e,i=this.host){const s=[];Array.from(i.children).forEach((i=>{S.isValidFormField(i)?this.shouldVisitElement(i,null==e?void 0:e.skipDisabled,null==e?void 0:e.skipInvisible)&&s.push(t(i,"VEGA-FORM"===i.tagName)):s.push(this.navigateVegaFormChildren(t,e,i))})),await Promise.all(s)}updateIsValidFlag(){this.isValid=this.pendingValidFieldPathMap.size>0?null:0===this.invalidFieldPathMap.size}registerFormFieldPendingValid(){this.formFieldPendingValidObserver=new I(this.canAcceptFormFieldPendingValid.bind(this),this.handleFieldPendingValid.bind(this)),o.register(d,this.formFieldPendingValidObserver)}canAcceptFormFieldPendingValid(t){return this.isElementInCurrentForm(t.host)}handleFieldPendingValid(t){"boolean"==typeof t.detail?this.pendingValidFieldPathMap.delete(t.host):this.pendingValidFieldPathMap.set(t.host,t.host.dataset.vegaForm)}initFormFieldDisconnectedObserver(){this.formFieldDisconnectedObserver=new I(this.canAcceptFormFieldDisconnectedOperation.bind(this),this.updateInvalidFieldPath.bind(this)),o.register(c,this.formFieldDisconnectedObserver)}canAcceptFormFieldDisconnectedOperation(t){return this.invalidFieldPathMap.has(t.host)}async updateInvalidFieldPath(t){this.invalidFieldPathMap.delete(t.host),this.pendingValidFieldPathMap.delete(t.host)}shouldVisitElement(t,e,i){return this.getFormFieldName(t)&&(!e||!t.disabled)&&(!i||x(t))}getFormFieldValue(t){return void 0===t.value?t.getAttribute("value"):t.value}async handleChildFormFieldElementValid(t,e){const i=w.getSubject(t,P),{isValid:s,message:a}=await new Promise((s=>{const a=setTimeout((()=>{s({isValid:!0,message:""})}),2e3);o.notify(i,{host:t,message:e,promiseResolve:s,timerId:a})}));return{isValid:s,message:a}}}L([u()],Q.prototype,"host",void 0),L([u({writable:!0})],Q.prototype,"isValid",void 0),L([u({writable:!0})],Q.prototype,"isTouched",void 0),L([v()],Q.prototype,"childNotifyObserver",void 0),L([v()],Q.prototype,"childNodeValueChangeObserver",void 0),L([f("connectedCallback")],Q.prototype,"connectedCallback",null),L([f("disconnectedCallback")],Q.prototype,"disconnectedCallback",null),L([f("getValue")],Q.prototype,"getValue",null),L([f("setValue")],Q.prototype,"setValue",null),L([f("valid")],Q.prototype,"valid",null);var X=function(t,e,i,s){var a,o=arguments.length,n=o<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 r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};class Y extends p{connectedCallback(){this.registerFormResetChangeManager()}disconnectedCallback(){this.unregisterFormResetChangeManager()}async reset(t={},e){await this.vegaFormFieldController.navigateVegaFormChildren((async(i,s)=>{const a=this.vegaFormFieldController.getFormFieldName(i);s&&await i.reset(t[a]||{},e)}),e),o.notify(h,{host:this.host,defaultValueMap:t,option:e}),this.vegaFormFieldController.setIsTouched(!1)}registerFormResetChangeManager(){var t;const e=null!==(t=N(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;this.formResetEventObserver=new I(this.canAcceptFormResetEvent.bind(this),this.handleResetEvents.bind(this)),o.register(w.getSubject(e,B),this.formResetEventObserver)}unregisterFormResetChangeManager(){var t;const e=null!==(t=N(this.host,"vega-form",{outerMost:!0}))&&void 0!==t?t:this.host;o.unregister(w.getSubject(e,B),this.formResetEventObserver)}canAcceptFormResetEvent(t){return this.vegaFormFieldController.isElementInCurrentForm(t.host)}async handleResetEvents(){await this.host.reset(),this.resetEventEmitter.emit()}}X([u()],Y.prototype,"host",void 0),X([u()],Y.prototype,"vegaFormFieldController",void 0),X([u()],Y.prototype,"resetEventEmitter",void 0),X([f("connectedCallback")],Y.prototype,"connectedCallback",null),X([f("disconnectedCallback")],Y.prototype,"disconnectedCallback",null),X([f("reset")],Y.prototype,"reset",null);var Z=function(t,e,i,s){var a,o=arguments.length,n=o<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 r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};const tt=class{constructor(t){e(this,t),this.vegaValidate=i(this,"vegaValidate",7),this.validate=i(this,"validate",7),this.vegaFormSubmit=i(this,"vegaFormSubmit",7),this.formSubmit=i(this,"formSubmit",7),this.vegaFormReset=i(this,"vegaFormReset",7),this.formReset=i(this,"formReset",7),this.globalSlimmers={},this.submitEventEmitter=F(tt,y),this.resetEventEmitter=F(tt,C),this.validateEventEmitter=F(tt,R),this.disableBlurValidationNotifySlimmer=O(tt,"disableBlurValidation","watchDisableBlurValidation"),this.stateController=new G,this.childEventPrevent=new V([y,C],(()=>this.host.querySelector("vega-form")),{customPreventHandle:t=>{t.stopPropagation()}}),this.childFormValidateEventPrevent=new V([R],(()=>this.host),{customPreventHandle:t=>{t.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new j,this.vegaFormFieldValidationStateController=new _,this.nativeFormRenderer=new z,this.vegaFormSubmitController=new K,this.vegaFormResetController=new Y,this.vegaFormFieldController=new Q,this.isValid=null,this.isTouched=!1,this.disableBlurValidation=!1,this.useNativeForm=!1,this.method="get"}watchIsValid(){this.validateEventEmitter.emit(this.isValid),o.notify(r,{host:this.host,detail:this.isValid})}watchDisableBlurValidation(){}async valid(t=!0){return b(t)}async getValue(t){return b(t)}async setValue(t,e){}async reset(t={},e){}async setValidationStates(t){}render(){return m(t(s,null,this.useNativeForm?this.nativeFormRenderer.render():t("slot",null)),this.host)}get host(){return a(this)}static get watchers(){return{isValid:["watchIsValid"],disableBlurValidation:["watchDisableBlurValidation"]}}};Z([g()],tt.prototype,"globalSlimmers",void 0),Z([v()],tt.prototype,"submitEventEmitter",void 0),Z([v()],tt.prototype,"resetEventEmitter",void 0),Z([v()],tt.prototype,"validateEventEmitter",void 0),Z([v()],tt.prototype,"disableBlurValidationNotifySlimmer",void 0),Z([v()],tt.prototype,"stateController",void 0),Z([v()],tt.prototype,"childEventPrevent",void 0),Z([v()],tt.prototype,"childFormValidateEventPrevent",void 0),Z([v()],tt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Z([v()],tt.prototype,"vegaFormFieldValidationStateController",void 0),Z([v()],tt.prototype,"nativeFormRenderer",void 0),Z([v()],tt.prototype,"vegaFormSubmitController",void 0),Z([v()],tt.prototype,"vegaFormResetController",void 0),Z([v()],tt.prototype,"vegaFormFieldController",void 0),tt.style=":host{display:block}";export{tt as vega_form}