@globalpayments/vega 2.98.0 → 2.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (645) hide show
  1. package/dist/cjs/{accessibility-88f8af84.js → accessibility-6ca2a237.js} +21 -0
  2. package/dist/cjs/{action-color-accessibility-validator-24498816.js → action-color-accessibility-validator-b8a9ef0f.js} +2 -2
  3. package/dist/cjs/{app-globals-b3f05631.js → app-globals-48d067a7.js} +11 -10
  4. package/dist/cjs/{aria-attributes-value-mapper-9a41b9cf.js → aria-attributes-value-mapper-e8c6b0e0.js} +1 -1
  5. package/dist/cjs/{code-block-d78c2b2c.js → code-block-3b42c364.js} +95 -6
  6. package/dist/cjs/{component-global-style-slimmer-93c5fb50.js → component-global-style-slimmer-ba588eb4.js} +1 -1
  7. package/dist/cjs/{component-value-history-controller-slimmer.abstract-beb00fea.js → component-value-history-controller-slimmer.abstract-bbe3bcaf.js} +24 -5
  8. package/dist/cjs/{content-state-78a620a9.js → content-state-87a06c1a.js} +104 -8
  9. package/dist/cjs/{dark-mode-style-controller-32d4054a.js → dark-mode-style-controller-f3da3342.js} +2 -2
  10. package/dist/cjs/{date-required-rule-5250f26d.js → date-required-rule-45c802d3.js} +1 -1
  11. package/dist/cjs/{design-token-74674ee7.js → design-token-9d762da0.js} +3 -3
  12. package/dist/cjs/{element-appender-slimmer-597e9e48.js → element-appender-slimmer-f7ba5d9a.js} +2 -2
  13. package/dist/cjs/{form-field-controller-slimmer-a743be34.js → form-field-controller-slimmer-fbaddc91.js} +2 -2
  14. package/dist/cjs/{image-annotation-action-85c4bd83.js → image-annotation-action-03d3e01a.js} +7 -6
  15. package/dist/cjs/{image-extension-260fa69c.js → image-extension-ccda26d3.js} +2 -2
  16. package/dist/cjs/{index-592b4052.js → index-5d1adcd1.js} +86 -0
  17. package/dist/cjs/index.cjs.js +20 -19
  18. package/dist/cjs/{inject-keyboard-manager-6a6f5c9f.js → inject-keyboard-manager-540f0876.js} +1 -1
  19. package/dist/cjs/{internal-calendar-period-factory-dfcdd3f6.js → internal-calendar-period-factory-b11918ee.js} +1 -1
  20. package/dist/cjs/{internal-translation-controller-1dac2df8.js → internal-translation-controller-27bfc8c7.js} +17 -0
  21. package/dist/cjs/{keyboard-manager-c56033b1.js → keyboard-manager-16e96b62.js} +12 -5
  22. package/dist/cjs/{keyboard-manager-slimmer-7043a106.js → keyboard-manager-slimmer-0a4e556d.js} +1 -1
  23. package/dist/cjs/{link-extension-220ff6a9.js → link-extension-71eeaa9f.js} +26 -7
  24. package/dist/cjs/loader.cjs.js +14 -14
  25. package/dist/cjs/{month-view-generator-7b704a80.js → month-view-generator-0a3e04de.js} +1 -1
  26. package/dist/cjs/overlay-escape-coordination-901d8942.js +38 -0
  27. package/dist/cjs/{public-rules-5657bce4.js → public-rules-3dc5d02d.js} +9 -9
  28. package/dist/cjs/{range-c5afd53a.js → range-d29751e3.js} +1 -1
  29. package/dist/cjs/{responsive-format-facade-493d1763.js → responsive-format-facade-c6d7f0a1.js} +1 -1
  30. package/dist/cjs/{rich-text-editor-required-rule-385c1b61.js → rich-text-editor-required-rule-05de7f0c.js} +1 -1
  31. package/dist/cjs/{split-cell-operation-873d5db7.js → split-cell-operation-ef783850.js} +14 -4
  32. package/dist/cjs/{state-border-formatter-711c7aaa.js → state-border-formatter-dda9109a.js} +1 -1
  33. package/dist/cjs/{string-format-strategy.abstract-b61bdcbd.js → string-format-strategy.abstract-3a968a59.js} +1 -1
  34. package/dist/cjs/{string-input-formatter-slimmer-ef65cca7.js → string-input-formatter-slimmer-9747039f.js} +1 -1
  35. package/dist/cjs/{string-mask-strategy-ad3fa0ac.js → string-mask-strategy-d9f85c21.js} +2 -2
  36. package/dist/cjs/{style-formatter-8f711cb0.js → style-formatter-d21a9784.js} +2 -2
  37. package/dist/cjs/{time-required-rule-87417359.js → time-required-rule-580cbd3d.js} +1 -1
  38. package/dist/cjs/{token-extension-78b5a026.js → token-extension-8d7bd451.js} +3773 -252
  39. package/dist/cjs/{translation-slimmer-77c7f37d.js → translation-slimmer-31cd5a57.js} +1 -1
  40. package/dist/cjs/{type-guard-a57ef3ac.js → type-guard-00b8efc0.js} +1 -1
  41. package/dist/cjs/{valid-credit-card-number-rule-4c0a3040.js → valid-credit-card-number-rule-70885128.js} +1 -1
  42. package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
  43. package/dist/cjs/vega-app-footer.cjs.entry.js +2 -2
  44. package/dist/cjs/vega-app-header-button.cjs.entry.js +6 -6
  45. package/dist/cjs/vega-banner.cjs.entry.js +1 -1
  46. package/dist/cjs/vega-box.cjs.entry.js +7 -7
  47. package/dist/cjs/vega-brand-logo.cjs.entry.js +2 -2
  48. package/dist/cjs/vega-breadcrumb.cjs.entry.js +2 -2
  49. package/dist/cjs/vega-button-circle.cjs.entry.js +7 -7
  50. package/dist/cjs/vega-button-group_2.cjs.entry.js +13 -6
  51. package/dist/cjs/vega-button-link.cjs.entry.js +4 -4
  52. package/dist/cjs/vega-button.cjs.entry.js +22 -6
  53. package/dist/cjs/vega-calendar_5.cjs.entry.js +22 -11
  54. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  55. package/dist/cjs/vega-carousel.cjs.entry.js +4 -4
  56. package/dist/cjs/vega-checkbox_2.cjs.entry.js +4 -4
  57. package/dist/cjs/vega-chip.cjs.entry.js +6 -6
  58. package/dist/cjs/vega-code-block.cjs.entry.js +12 -12
  59. package/dist/cjs/vega-color-picker.cjs.entry.js +4 -4
  60. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +4 -4
  61. package/dist/cjs/vega-color-swatch.cjs.entry.js +3 -3
  62. package/dist/cjs/vega-combo-box.cjs.entry.js +10 -10
  63. package/dist/cjs/vega-counter-badge.cjs.entry.js +2 -2
  64. package/dist/cjs/vega-date-picker_2.cjs.entry.js +15 -15
  65. package/dist/cjs/vega-dialog_2.cjs.entry.js +72 -6
  66. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  67. package/dist/cjs/vega-dropdown_5.cjs.entry.js +116 -24
  68. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  69. package/dist/cjs/vega-field-label.cjs.entry.js +27 -34
  70. package/dist/cjs/vega-file-uploader.cjs.entry.js +5 -5
  71. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
  72. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  73. package/dist/cjs/vega-font.cjs.entry.js +5 -5
  74. package/dist/cjs/vega-form.cjs.entry.js +2 -2
  75. package/dist/cjs/vega-grid.cjs.entry.js +5 -5
  76. package/dist/cjs/vega-icon.cjs.entry.js +6 -6
  77. package/dist/cjs/vega-image-uploader.cjs.entry.js +8 -8
  78. package/dist/cjs/vega-input-credit-card.cjs.entry.js +7 -7
  79. package/dist/cjs/vega-input-numeric.cjs.entry.js +6 -6
  80. package/dist/cjs/vega-input-passcode.cjs.entry.js +6 -6
  81. package/dist/cjs/vega-input-phone-number.cjs.entry.js +42 -8
  82. package/dist/cjs/vega-input-range.cjs.entry.js +5 -5
  83. package/dist/cjs/vega-input-select.cjs.entry.js +25 -8
  84. package/dist/cjs/vega-input.cjs.entry.js +9 -9
  85. package/dist/cjs/vega-left-nav_5.cjs.entry.js +10 -10
  86. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  87. package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
  88. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
  89. package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
  90. package/dist/cjs/vega-popover_2.cjs.entry.js +58 -9
  91. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +4 -4
  92. package/dist/cjs/vega-radio_2.cjs.entry.js +7 -7
  93. package/dist/cjs/vega-rich-text-content.cjs.entry.js +44 -13
  94. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +767 -248
  95. package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +3 -3
  96. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
  97. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +158 -105
  98. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +6 -6
  99. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +3 -3
  100. package/dist/cjs/vega-sidenav_3.cjs.entry.js +4 -4
  101. package/dist/cjs/vega-signature-capture.cjs.entry.js +8 -8
  102. package/dist/cjs/vega-stepper.cjs.entry.js +3 -3
  103. package/dist/cjs/vega-tab-group_2.cjs.entry.js +22 -9
  104. package/dist/cjs/vega-table_11.cjs.entry.js +82 -46
  105. package/dist/cjs/vega-textarea.cjs.entry.js +3 -3
  106. package/dist/cjs/vega-time-picker_2.cjs.entry.js +11 -11
  107. package/dist/cjs/vega-toggle-switch.cjs.entry.js +4 -4
  108. package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
  109. package/dist/cjs/vega.cjs.js +14 -14
  110. package/dist/collection/components/vega-button/vega-button.js +17 -2
  111. package/dist/collection/components/vega-button-group/vega-button-group-item/slimmers/renderers/vega-button-group-item-renderer.js +13 -6
  112. package/dist/collection/components/vega-button-link/vega-button-link.js +2 -2
  113. package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-event-item-renderer.js +5 -2
  114. package/dist/collection/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.js +9 -1
  115. package/dist/collection/components/vega-code-block/vega-code-block.css +4 -4
  116. package/dist/collection/components/vega-counter-badge/vega-counter-badge.js +2 -2
  117. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-keyboard-controller.js +148 -0
  118. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-scrollable-controller.js +5 -2
  119. package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-renderer.js +17 -0
  120. package/dist/collection/components/vega-dropdown/vega-dropdown-group/slimmers/renderers/vega-dropdown-group-renderer.js +6 -4
  121. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +12 -4
  122. package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.css +2 -1
  123. package/dist/collection/components/vega-dropdown/vega-dropdown.js +1 -1
  124. package/dist/collection/components/vega-field-label/slimmers/renderers/vega-field-label-label-announcement-renderer.js +21 -30
  125. package/dist/collection/components/vega-field-label/vega-field-label.css +1 -0
  126. package/dist/collection/components/vega-field-label/vega-field-label.js +7 -5
  127. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +19 -2
  128. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +66 -0
  129. package/dist/collection/components/vega-popover/slimmers/renderers/vega-popover-appender-renderer.js +17 -0
  130. package/dist/collection/components/vega-popover/vega-popover.js +33 -1
  131. package/dist/collection/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.js +4 -1
  132. package/dist/collection/components/vega-rich-text-editor/constants/constant.js +25 -0
  133. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/commit-value-strategy.js +13 -0
  134. package/dist/collection/components/vega-rich-text-editor/dto/actions/commit-value-action.js +20 -0
  135. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-default-styles.js +2 -1
  136. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +22 -0
  137. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +10 -0
  138. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +11 -0
  139. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.js +2 -1
  140. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.js +5 -2
  141. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.js +36 -2
  142. package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +6 -0
  143. package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +8 -0
  144. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +6 -0
  145. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.js +20 -3
  146. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +12 -0
  147. package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +30 -18
  148. package/dist/collection/components/vega-rich-text-editor/extensions/block-boundary-registry.js +34 -0
  149. package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/renderers/blockquote-toolbar-button-renderer.js +1 -0
  150. package/dist/collection/components/vega-rich-text-editor/extensions/copy/copy-toolbar-button-renderer.js +1 -0
  151. package/dist/collection/components/vega-rich-text-editor/extensions/cut/cut-toolbar-button-renderer.js +1 -0
  152. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +20 -0
  153. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/renderers/find-replace-toolbar-button-renderer.js +51 -0
  154. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/slimmers/renderers/find-replace-panel-renderer.js +2 -2
  155. package/dist/collection/components/vega-rich-text-editor/extensions/fullscreen/fullscreen-toolbar-button-renderer.js +3 -0
  156. package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/insert-function-block-strategy.js +3 -2
  157. package/dist/collection/components/vega-rich-text-editor/extensions/functions/constants.js +8 -0
  158. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +14 -3
  159. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.js +2 -1
  160. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.js +6 -0
  161. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-containing-function-block-strategy.js +19 -0
  162. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.js +9 -5
  163. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-content-strategy.js +3 -3
  164. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-logic-control-block-strategy.js +4 -2
  165. package/dist/collection/components/vega-rich-text-editor/extensions/functions/function-extension.js +18 -0
  166. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-block-renderer.js +5 -2
  167. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.js +1 -0
  168. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/logic-control-block-renderer.js +2 -1
  169. package/dist/collection/components/vega-rich-text-editor/extensions/functions/utils.js +36 -0
  170. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-toolbar-button-renderer.js +1 -0
  171. package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-extension.js +1 -0
  172. package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.js +5 -3
  173. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-toolbar-button-renderer.js +16 -0
  174. package/dist/collection/components/vega-rich-text-editor/extensions/paste/action-handler-strategies/image-replace-src-strategy.js +21 -0
  175. package/dist/collection/components/vega-rich-text-editor/extensions/paste/actions/image-replace-src-action.js +13 -0
  176. package/dist/collection/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/paste-image-parser.js +295 -0
  177. package/dist/collection/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/pending-image-registry.js +116 -0
  178. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.js +13 -4
  179. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-extension.js +70 -7
  180. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/default-paste-strategy.js +38 -0
  181. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.js +55 -0
  182. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.js +59 -0
  183. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/word-paste-strategy.js +416 -0
  184. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-code-block-transformer.js +106 -0
  185. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-image-transformer.js +198 -0
  186. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-list-transformer.js +591 -0
  187. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-paragraph-transformer.js +112 -0
  188. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-table-transformer.js +551 -0
  189. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-transformer.js +7 -0
  190. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/special-characters-toolbar-button-renderer.js +2 -0
  191. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +10 -0
  192. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.js +3 -9
  193. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.js +2 -2
  194. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.js +81 -1
  195. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-popover-base-renderer.js +148 -0
  196. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +151 -5
  197. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.js +144 -2
  198. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-selection.js +26 -1
  199. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.js +1 -0
  200. 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 +11 -2
  201. 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 +5 -2
  202. 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 +5 -1
  203. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.css +5 -0
  204. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.js +16 -1
  205. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.js +1 -0
  206. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/cell-properties-button-slimmer.js +1 -0
  207. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.js +10 -9
  208. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.js +9 -8
  209. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +25 -10
  210. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-properties-button-slimmer.js +1 -0
  211. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-setting-button-slimmer.abstract.js +5 -4
  212. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.js +1 -1
  213. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.css +10 -0
  214. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.js +2 -0
  215. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/span-to-token-node-strategy.js +4 -2
  216. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-node.js +44 -0
  217. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-toolbar-button-renderer.js +1 -0
  218. package/dist/collection/components/vega-rich-text-editor/extensions/word-count/action-handler-interceptors/prevent-hard-limit-exceed-interceptor.js +70 -0
  219. package/dist/collection/components/vega-rich-text-editor/extensions/word-count/type.js +1 -0
  220. package/dist/collection/components/vega-rich-text-editor/extensions/word-count/word-count-extension.js +62 -0
  221. package/dist/collection/components/vega-rich-text-editor/public-api.js +1 -0
  222. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/extension-controller.js +2 -0
  223. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.js +7 -4
  224. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.js +17 -0
  225. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +18 -4
  226. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/insert-composition-text-controller.js +2 -1
  227. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +21 -2
  228. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +7 -1
  229. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +52 -2
  230. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/word-count-controller.js +79 -0
  231. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.js +6 -3
  232. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.js +2 -1
  233. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/horizontal-alignment-toolbar-button-slimmer.js +2 -1
  234. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +3 -2
  235. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/link-toolbar-button-slimmer.js +111 -2
  236. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.js +24 -6
  237. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-color-toolbar-button-slimmer.js +1 -1
  238. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.js +1 -1
  239. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/toolbar-button-slimmer.abstract.js +3 -2
  240. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +59 -8
  241. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.js +5 -2
  242. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/slimmers/renderers/vega-rich-text-editor-toolbar-button-renderer.js +1 -1
  243. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/vega-rich-text-editor-toolbar-button.js +13 -1
  244. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +16 -0
  245. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-editor-controller.js +124 -0
  246. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.js +9 -1
  247. package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-tab-list-renderer.js +14 -7
  248. package/dist/collection/components/vega-tab-group/vega-tab-group.css +6 -0
  249. package/dist/collection/components/vega-tab-group/vega-tab-group.js +5 -0
  250. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-body-col-span-controller.js +31 -1
  251. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-body-col-span-resolver.js +18 -11
  252. package/dist/collection/global/scripts/before-vega-load.js +2 -0
  253. package/dist/collection/helpers/keyboard/keyboard-manager.js +11 -4
  254. package/dist/collection/helpers/keyboard/overlay-escape-coordination.js +33 -0
  255. package/dist/collection/helpers/slimmers/mutation-observer/aria-attributes-value-mapper.js +1 -1
  256. package/dist/collection/helpers/translation/locales/en.js +17 -0
  257. package/dist/collection/polyfill/libphonenumber/as-you-type.js +21 -3
  258. package/dist/collection/polyfill/libphonenumber/metadata.js +16 -0
  259. package/dist/collection/utils/accessibility.js +20 -0
  260. package/dist/collection/utils/sanitize/index.js +3 -2
  261. package/dist/collection/utils/sanitize/strategies/index.js +1 -0
  262. package/dist/collection/utils/sanitize/strategies/label-sanitize-strategy.js +14 -0
  263. package/dist/collection/utils/sanitize/strategies/plain-text-sanitize-strategy.js +70 -0
  264. package/dist/esm/{accessibility-6af5cf2e.js → accessibility-c899a968.js} +21 -1
  265. package/dist/esm/{action-color-accessibility-validator-ce55cb07.js → action-color-accessibility-validator-08877515.js} +2 -2
  266. package/dist/esm/{app-globals-95c7110a.js → app-globals-1e1371d5.js} +11 -10
  267. package/dist/esm/{aria-attributes-value-mapper-2c632641.js → aria-attributes-value-mapper-a5c7478e.js} +1 -1
  268. package/dist/esm/{aria-dialog-focusable-trap-slimmer-f069f54d.js → aria-dialog-focusable-trap-slimmer-b2a24a45.js} +2 -2
  269. package/dist/esm/{child-nodes-notify-observer-slimmer-499a3aa7.js → child-nodes-notify-observer-slimmer-034bc78c.js} +1 -1
  270. package/dist/esm/{code-block-9c513169.js → code-block-741d6b8e.js} +91 -9
  271. package/dist/esm/{component-global-style-slimmer-ac703085.js → component-global-style-slimmer-7d60a04a.js} +1 -1
  272. package/dist/esm/{component-value-history-controller-slimmer.abstract-9cef2a2a.js → component-value-history-controller-slimmer.abstract-2bcd749e.js} +26 -7
  273. package/dist/esm/{content-state-25c81c08.js → content-state-2f6f4204.js} +104 -11
  274. package/dist/esm/{dark-mode-style-controller-ca5afd2d.js → dark-mode-style-controller-352f15ff.js} +2 -2
  275. package/dist/esm/{date-required-rule-85334d0c.js → date-required-rule-2ea3aec8.js} +1 -1
  276. package/dist/esm/{design-token-10ff79b5.js → design-token-82a4e107.js} +3 -3
  277. package/dist/esm/{dom-node-subject-observer-factory-ddff8662.js → dom-node-subject-observer-factory-bb7e68a0.js} +1 -1
  278. package/dist/esm/{element-appender-slimmer-8a06ecdd.js → element-appender-slimmer-c820c0bf.js} +4 -4
  279. package/dist/esm/{event-emit-slimmer-2452278f.js → event-emit-slimmer-e8bb2292.js} +1 -1
  280. package/dist/esm/{form-field-controller-slimmer-68fc5380.js → form-field-controller-slimmer-02165dbe.js} +5 -5
  281. package/dist/esm/{image-annotation-action-d7f2aecc.js → image-annotation-action-972c1074.js} +8 -7
  282. package/dist/esm/{image-extension-fbd1ed6e.js → image-extension-59484e9a.js} +2 -2
  283. package/dist/esm/{index-3b327f29.js → index-35451d12.js} +86 -1
  284. package/dist/esm/index.js +21 -21
  285. package/dist/esm/{inject-keyboard-manager-ea1aad5b.js → inject-keyboard-manager-6a10c9b7.js} +1 -1
  286. package/dist/esm/{internal-calendar-period-factory-7b294fb6.js → internal-calendar-period-factory-d1a60f81.js} +1 -1
  287. package/dist/esm/{internal-translation-controller-fac22598.js → internal-translation-controller-fff376d2.js} +17 -0
  288. package/dist/esm/{keyboard-manager-50da85d7.js → keyboard-manager-a58288df.js} +13 -6
  289. package/dist/esm/{keyboard-manager-slimmer-1f7c8bfb.js → keyboard-manager-slimmer-133b86cd.js} +1 -1
  290. package/dist/esm/{link-extension-e8ee103e.js → link-extension-e89acb5c.js} +26 -7
  291. package/dist/esm/loader.js +16 -16
  292. package/dist/esm/{month-view-generator-a1a9a4ec.js → month-view-generator-20e32b22.js} +1 -1
  293. package/dist/esm/overlay-escape-coordination-439f7d6f.js +35 -0
  294. package/dist/esm/{public-rules-49de79c7.js → public-rules-c154201b.js} +11 -11
  295. package/dist/esm/{range-b678c693.js → range-c818a1eb.js} +2 -2
  296. package/dist/esm/{responsive-format-facade-f19b601c.js → responsive-format-facade-07843ec3.js} +1 -1
  297. package/dist/esm/{rich-text-editor-required-rule-578e0958.js → rich-text-editor-required-rule-878e91c6.js} +1 -1
  298. package/dist/esm/{split-cell-operation-1c8e7585.js → split-cell-operation-cc0cdf90.js} +15 -5
  299. package/dist/esm/{state-border-formatter-bfda33aa.js → state-border-formatter-3b3dcfe8.js} +1 -1
  300. package/dist/esm/{string-format-strategy.abstract-1f4ff1b3.js → string-format-strategy.abstract-44381dcb.js} +1 -1
  301. package/dist/esm/{string-input-formatter-slimmer-0006a107.js → string-input-formatter-slimmer-76fe52d3.js} +3 -3
  302. package/dist/esm/{string-mask-strategy-bbbcdbef.js → string-mask-strategy-999fba4b.js} +2 -2
  303. package/dist/esm/{style-formatter-e9adc8f4.js → style-formatter-c4192c99.js} +2 -2
  304. package/dist/esm/{sub-state-notify-slimmer-23b7d0e8.js → sub-state-notify-slimmer-e306c849.js} +1 -1
  305. package/dist/esm/{sub-state-observer-slimmer-722f6b92.js → sub-state-observer-slimmer-bd85f381.js} +2 -2
  306. package/dist/esm/{time-required-rule-1ce2d0a0.js → time-required-rule-0554b114.js} +1 -1
  307. package/dist/esm/{token-extension-f2d009e3.js → token-extension-35c66684.js} +3773 -253
  308. package/dist/esm/{translation-slimmer-ee0f0e76.js → translation-slimmer-77022f2e.js} +1 -1
  309. package/dist/esm/{type-guard-f2624334.js → type-guard-26d83e7e.js} +1 -1
  310. package/dist/esm/{ui-d73f756a.js → ui-80e610f4.js} +1 -1
  311. package/dist/esm/{valid-credit-card-number-rule-60212b1d.js → valid-credit-card-number-rule-f60b6904.js} +1 -1
  312. package/dist/esm/vega-accordion.entry.js +9 -9
  313. package/dist/esm/vega-app-footer.entry.js +5 -5
  314. package/dist/esm/vega-app-header-button.entry.js +9 -9
  315. package/dist/esm/vega-backdrop.entry.js +1 -1
  316. package/dist/esm/vega-banner.entry.js +4 -4
  317. package/dist/esm/vega-box.entry.js +8 -8
  318. package/dist/esm/vega-brand-logo.entry.js +2 -2
  319. package/dist/esm/vega-breadcrumb.entry.js +5 -5
  320. package/dist/esm/vega-button-circle.entry.js +10 -10
  321. package/dist/esm/vega-button-group_2.entry.js +18 -11
  322. package/dist/esm/vega-button-link.entry.js +7 -7
  323. package/dist/esm/vega-button.entry.js +25 -9
  324. package/dist/esm/vega-calendar_5.entry.js +27 -16
  325. package/dist/esm/vega-card.entry.js +6 -6
  326. package/dist/esm/vega-carousel.entry.js +7 -7
  327. package/dist/esm/vega-checkbox_2.entry.js +9 -9
  328. package/dist/esm/vega-chip.entry.js +9 -9
  329. package/dist/esm/vega-code-block.entry.js +15 -15
  330. package/dist/esm/vega-color-picker.entry.js +8 -8
  331. package/dist/esm/vega-color-swatch-picker.entry.js +8 -8
  332. package/dist/esm/vega-color-swatch.entry.js +6 -6
  333. package/dist/esm/vega-combo-box.entry.js +14 -14
  334. package/dist/esm/vega-counter-badge.entry.js +2 -2
  335. package/dist/esm/vega-date-picker_2.entry.js +21 -21
  336. package/dist/esm/vega-dialog_2.entry.js +76 -10
  337. package/dist/esm/vega-divider.entry.js +5 -5
  338. package/dist/esm/vega-dropdown_5.entry.js +123 -31
  339. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  340. package/dist/esm/vega-field-label.entry.js +30 -37
  341. package/dist/esm/vega-file-uploader.entry.js +9 -9
  342. package/dist/esm/vega-flag-icon.entry.js +5 -5
  343. package/dist/esm/vega-flex.entry.js +7 -7
  344. package/dist/esm/vega-font.entry.js +6 -6
  345. package/dist/esm/vega-form.entry.js +8 -8
  346. package/dist/esm/vega-grid.entry.js +6 -6
  347. package/dist/esm/vega-icon.entry.js +7 -7
  348. package/dist/esm/vega-image-uploader.entry.js +12 -12
  349. package/dist/esm/vega-input-credit-card.entry.js +11 -11
  350. package/dist/esm/vega-input-numeric.entry.js +11 -11
  351. package/dist/esm/vega-input-passcode.entry.js +10 -10
  352. package/dist/esm/vega-input-phone-number.entry.js +46 -12
  353. package/dist/esm/vega-input-range.entry.js +9 -9
  354. package/dist/esm/vega-input-select.entry.js +29 -12
  355. package/dist/esm/vega-input.entry.js +14 -14
  356. package/dist/esm/vega-item-toggle.entry.js +3 -3
  357. package/dist/esm/vega-left-nav_5.entry.js +15 -15
  358. package/dist/esm/vega-loader-wrapper_2.entry.js +4 -4
  359. package/dist/esm/vega-page-notification_2.entry.js +3 -3
  360. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +2 -2
  361. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +4 -4
  362. package/dist/esm/vega-pagination.entry.js +7 -7
  363. package/dist/esm/vega-popover_2.entry.js +62 -13
  364. package/dist/esm/vega-progress-tracker_2.entry.js +9 -9
  365. package/dist/esm/vega-radio_2.entry.js +12 -12
  366. package/dist/esm/vega-rich-text-content.entry.js +48 -17
  367. package/dist/esm/vega-rich-text-editor_4.entry.js +774 -255
  368. package/dist/esm/vega-rich-text-find-replace-panel.entry.js +6 -6
  369. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +8 -8
  370. package/dist/esm/vega-rich-text-table-properties_3.entry.js +160 -107
  371. package/dist/esm/vega-segment-control.entry.js +3 -3
  372. package/dist/esm/vega-selection-chip_2.entry.js +11 -11
  373. package/dist/esm/vega-selection-tile_2.entry.js +9 -9
  374. package/dist/esm/vega-sidenav_3.entry.js +9 -9
  375. package/dist/esm/vega-signature-capture.entry.js +12 -12
  376. package/dist/esm/vega-stepper.entry.js +7 -7
  377. package/dist/esm/vega-tab-group_2.entry.js +25 -12
  378. package/dist/esm/vega-table_11.entry.js +59 -23
  379. package/dist/esm/vega-textarea.entry.js +7 -7
  380. package/dist/esm/vega-time-picker_2.entry.js +15 -15
  381. package/dist/esm/vega-toggle-switch.entry.js +8 -8
  382. package/dist/esm/vega-tooltip_2.entry.js +8 -8
  383. package/dist/esm/vega.js +16 -16
  384. package/dist/esm/{wait-for-component-did-render-ff7062aa.js → wait-for-component-did-render-9b91a826.js} +1 -1
  385. package/dist/sri/vega-sri-manifest.json +399 -395
  386. package/dist/types/components/vega-button/vega-button.d.ts +2 -0
  387. package/dist/types/components/vega-button-group/types.d.ts +12 -6
  388. package/dist/types/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.d.ts +2 -0
  389. package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.d.ts +1 -0
  390. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +1 -1
  391. package/dist/types/components/vega-field-label/slimmers/renderers/vega-field-label-label-announcement-renderer.d.ts +3 -10
  392. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +8 -0
  393. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +33 -0
  394. package/dist/types/components/vega-modal/types.d.ts +2 -1
  395. package/dist/types/components/vega-popover/slimmers/renderers/vega-popover-appender-renderer.d.ts +9 -0
  396. package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +22 -0
  397. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/commit-value-strategy.d.ts +13 -0
  398. package/dist/types/components/vega-rich-text-editor/dto/actions/commit-value-action.d.ts +20 -0
  399. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-default-styles.d.ts +1 -0
  400. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +15 -0
  401. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +4 -0
  402. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +6 -0
  403. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.d.ts +1 -0
  404. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.d.ts +3 -2
  405. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.d.ts +25 -3
  406. package/dist/types/components/vega-rich-text-editor/dto/nodes/code-block-node.d.ts +4 -0
  407. package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +6 -0
  408. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +4 -0
  409. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.d.ts +7 -0
  410. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +11 -0
  411. package/dist/types/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.d.ts +5 -0
  412. package/dist/types/components/vega-rich-text-editor/extensions/block-boundary-registry.d.ts +21 -0
  413. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +15 -0
  414. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/renderers/find-replace-toolbar-button-renderer.d.ts +19 -0
  415. package/dist/types/components/vega-rich-text-editor/extensions/functions/constants.d.ts +4 -0
  416. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +7 -0
  417. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.d.ts +4 -0
  418. package/dist/types/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-containing-function-block-strategy.d.ts +8 -0
  419. package/dist/types/components/vega-rich-text-editor/extensions/functions/function-extension.d.ts +6 -0
  420. package/dist/types/components/vega-rich-text-editor/extensions/functions/utils.d.ts +29 -0
  421. package/dist/types/components/vega-rich-text-editor/extensions/line-height/line-height-toolbar-button-renderer.d.ts +14 -1
  422. package/dist/types/components/vega-rich-text-editor/extensions/paste/action-handler-strategies/image-replace-src-strategy.d.ts +12 -0
  423. package/dist/types/components/vega-rich-text-editor/extensions/paste/actions/image-replace-src-action.d.ts +11 -0
  424. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/paste-image-parser.d.ts +136 -0
  425. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/pending-image-registry.d.ts +68 -0
  426. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.d.ts +9 -4
  427. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-extension.d.ts +39 -2
  428. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/default-paste-strategy.d.ts +29 -0
  429. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.d.ts +61 -0
  430. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.d.ts +45 -0
  431. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/word-paste-strategy.d.ts +186 -0
  432. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-code-block-transformer.d.ts +51 -0
  433. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-image-transformer.d.ts +86 -0
  434. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-list-transformer.d.ts +271 -0
  435. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-paragraph-transformer.d.ts +25 -0
  436. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-table-transformer.d.ts +240 -0
  437. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-transformer.d.ts +36 -0
  438. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +8 -0
  439. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.d.ts +2 -2
  440. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.d.ts +31 -1
  441. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-popover-base-renderer.d.ts +91 -0
  442. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +46 -0
  443. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.d.ts +58 -0
  444. package/dist/types/components/vega-rich-text-editor/extensions/table/table-selection.d.ts +8 -0
  445. 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 +2 -1
  446. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.d.ts +2 -0
  447. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.d.ts +3 -0
  448. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-setting-button-slimmer.abstract.d.ts +3 -1
  449. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.d.ts +1 -0
  450. package/dist/types/components/vega-rich-text-editor/extensions/tokens/span-to-token-node-strategy.d.ts +2 -2
  451. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-node.d.ts +19 -1
  452. package/dist/types/components/vega-rich-text-editor/extensions/word-count/action-handler-interceptors/prevent-hard-limit-exceed-interceptor.d.ts +38 -0
  453. package/dist/types/components/vega-rich-text-editor/extensions/word-count/type.d.ts +46 -0
  454. package/dist/types/components/vega-rich-text-editor/extensions/word-count/word-count-extension.d.ts +38 -0
  455. package/dist/types/components/vega-rich-text-editor/interface.d.ts +22 -0
  456. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +1 -0
  457. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.d.ts +4 -1
  458. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.d.ts +8 -0
  459. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/value-controller.d.ts +11 -1
  460. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/word-count-controller.d.ts +40 -0
  461. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/link-toolbar-button-slimmer.d.ts +14 -0
  462. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.d.ts +4 -1
  463. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/toolbar-button-slimmer.abstract.d.ts +3 -2
  464. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.d.ts +12 -0
  465. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/vega-rich-text-editor-toolbar-button.d.ts +2 -0
  466. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +4 -0
  467. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-editor-controller.d.ts +68 -0
  468. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.d.ts +3 -0
  469. package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-tab-list-renderer.d.ts +1 -0
  470. package/dist/types/components/vega-tab-group/types.d.ts +3 -1
  471. package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +2 -0
  472. package/dist/types/components/vega-table/interface.d.ts +4 -4
  473. package/dist/types/components/vega-table/slimmers/controllers/vega-table-body-col-span-controller.d.ts +16 -0
  474. package/dist/types/components/vega-table/slimmers/renderers/vega-table-body-col-span-resolver.d.ts +8 -10
  475. package/dist/types/helpers/keyboard/keyboard-manager.d.ts +9 -0
  476. package/dist/types/helpers/keyboard/overlay-escape-coordination.d.ts +28 -0
  477. package/dist/types/helpers/slimmers/mutation-observer/aria-attributes-value-mapper.d.ts +1 -1
  478. package/dist/types/helpers/translation/interface.d.ts +18 -1
  479. package/dist/types/polyfill/libphonenumber/as-you-type.d.ts +1 -0
  480. package/dist/types/polyfill/libphonenumber/metadata.d.ts +10 -0
  481. package/dist/types/types/public-api.d.ts +2 -0
  482. package/dist/types/utils/accessibility.d.ts +9 -0
  483. package/dist/types/utils/sanitize/index.d.ts +3 -2
  484. package/dist/types/utils/sanitize/strategies/index.d.ts +1 -0
  485. package/dist/types/utils/sanitize/strategies/label-sanitize-strategy.d.ts +9 -0
  486. package/dist/types/utils/sanitize/strategies/plain-text-sanitize-strategy.d.ts +36 -0
  487. package/dist/vega/index.esm.js +1 -1
  488. package/dist/vega/{p-6f537797.entry.js → p-01ca92e6.entry.js} +1 -1
  489. package/dist/vega/{p-02d3ce79.entry.js → p-02b5d4ac.entry.js} +1 -1
  490. package/dist/vega/p-06a42a9f.entry.js +1 -0
  491. package/dist/vega/{p-fd23c365.entry.js → p-0cd362f3.entry.js} +1 -1
  492. package/dist/vega/p-0e10798b.entry.js +1 -0
  493. package/dist/vega/{p-2c2e8615.js → p-0eea1ca8.js} +1 -1
  494. package/dist/vega/{p-c98c2f5f.entry.js → p-0f344e02.entry.js} +1 -1
  495. package/dist/vega/{p-4cbfc01e.entry.js → p-23db0a92.entry.js} +1 -1
  496. package/dist/vega/{p-ccbe3f1b.entry.js → p-284a8828.entry.js} +1 -1
  497. package/dist/vega/{p-ac94ba1b.entry.js → p-2b26e182.entry.js} +1 -1
  498. package/dist/vega/{p-56598858.entry.js → p-2c8dc0d2.entry.js} +1 -1
  499. package/dist/vega/{p-2bb5a232.js → p-3091b105.js} +1 -1
  500. package/dist/vega/{p-9abf7d0a.entry.js → p-35d37477.entry.js} +1 -1
  501. package/dist/vega/{p-526e3634.js → p-36a57431.js} +1 -1
  502. package/dist/vega/{p-810c9c29.js → p-379736e2.js} +1 -1
  503. package/dist/vega/p-3abb793c.entry.js +1 -0
  504. package/dist/vega/{p-f29ea345.entry.js → p-3d6a43df.entry.js} +1 -1
  505. package/dist/vega/{p-c2277448.entry.js → p-3f2a4b34.entry.js} +1 -1
  506. package/dist/vega/p-401c6764.js +1 -0
  507. package/dist/vega/{p-da867019.entry.js → p-411cadbc.entry.js} +1 -1
  508. package/dist/vega/{p-ec64cc59.entry.js → p-46f22f6c.entry.js} +1 -1
  509. package/dist/vega/{p-8d2501b2.js → p-493108d5.js} +1 -1
  510. package/dist/vega/{p-085d1647.entry.js → p-49de5559.entry.js} +1 -1
  511. package/dist/vega/{p-781b7a54.js → p-4b35c748.js} +1 -1
  512. package/dist/vega/{p-a8174ad8.entry.js → p-4d1896e0.entry.js} +1 -1
  513. package/dist/vega/{p-b00ec194.entry.js → p-4e23e56c.entry.js} +1 -1
  514. package/dist/vega/{p-1cff027b.entry.js → p-5006404e.entry.js} +1 -1
  515. package/dist/vega/{p-56417ec5.entry.js → p-5789690b.entry.js} +1 -1
  516. package/dist/vega/{p-461100b8.entry.js → p-594cb986.entry.js} +1 -1
  517. package/dist/vega/p-5a086e93.js +1 -0
  518. package/dist/vega/{p-3e09aeed.js → p-5b3c8a56.js} +1 -1
  519. package/dist/vega/p-5b9b1631.entry.js +1 -0
  520. package/dist/vega/{p-c41a2d4a.js → p-5c3649f9.js} +1 -1
  521. package/dist/vega/{p-fb9475ab.entry.js → p-5d9be870.entry.js} +1 -1
  522. package/dist/vega/p-5f377954.js +1 -1
  523. package/dist/vega/{p-d609c3fd.js → p-60a74fb7.js} +1 -1
  524. package/dist/vega/{p-2acf9b42.entry.js → p-61ed7268.entry.js} +1 -1
  525. package/dist/vega/p-6336d446.entry.js +1 -0
  526. package/dist/vega/{p-dbb4b1d1.js → p-638b6a7d.js} +1 -1
  527. package/dist/vega/{p-bdb5180c.js → p-68744e7e.js} +1 -1
  528. package/dist/vega/p-6e9e7131.js +1 -0
  529. package/dist/vega/{p-014cd411.js → p-6eedbc4f.js} +1 -1
  530. package/dist/vega/{p-a090b2be.js → p-6fd8f14b.js} +1 -1
  531. package/dist/vega/{p-0cf3b5c1.entry.js → p-7469d0d1.entry.js} +1 -1
  532. package/dist/vega/p-74b20563.entry.js +1 -0
  533. package/dist/vega/{p-17c69503.entry.js → p-76999ea1.entry.js} +1 -1
  534. package/dist/vega/p-77bcdd35.js +1 -0
  535. package/dist/vega/{p-035e2f05.entry.js → p-79b49e8d.entry.js} +1 -1
  536. package/dist/vega/{p-8d96f0e8.entry.js → p-7a03ef96.entry.js} +1 -1
  537. package/dist/vega/{p-c5fb8a69.entry.js → p-7ae4cf82.entry.js} +1 -1
  538. package/dist/vega/{p-f9bfee81.entry.js → p-7cc8855d.entry.js} +1 -1
  539. package/dist/vega/{p-d470fce2.entry.js → p-7ddc0bec.entry.js} +1 -1
  540. package/dist/vega/{p-ca3c1317.entry.js → p-7e22610b.entry.js} +1 -1
  541. package/dist/vega/p-7f395622.entry.js +1 -0
  542. package/dist/vega/{p-3737b9e2.entry.js → p-816b5fd2.entry.js} +1 -1
  543. package/dist/vega/p-8387896e.js +1 -0
  544. package/dist/vega/p-844ad6aa.entry.js +1 -0
  545. package/dist/vega/p-853a05eb.js +1 -0
  546. package/dist/vega/p-85de755f.js +1 -0
  547. package/dist/vega/p-8663314e.js +1 -0
  548. package/dist/vega/{p-95c18f79.entry.js → p-86fb46d2.entry.js} +1 -1
  549. package/dist/vega/p-8cfdd0e8.entry.js +1 -0
  550. package/dist/vega/p-8ebe30a8.js +1 -0
  551. package/dist/vega/p-8f00dfe6.js +1 -0
  552. package/dist/vega/{p-66647244.js → p-8fc0a820.js} +1 -1
  553. package/dist/vega/{p-4fd0cf01.js → p-9034f709.js} +1 -1
  554. package/dist/vega/{p-456f678b.js → p-941a83db.js} +1 -1
  555. package/dist/vega/{p-ae2abdfa.js → p-96c090c4.js} +1 -1
  556. package/dist/vega/p-9ba2fdff.js +1 -0
  557. package/dist/vega/{p-d319ebb5.js → p-9e9f49f4.js} +1 -1
  558. package/dist/vega/p-9efa5d76.js +1 -0
  559. package/dist/vega/{p-a81ad3bd.js → p-a306bb39.js} +1 -1
  560. package/dist/vega/{p-db11134b.entry.js → p-a48468b5.entry.js} +1 -1
  561. package/dist/vega/{p-56db3323.js → p-a488447f.js} +1 -1
  562. package/dist/vega/p-a647c856.entry.js +1 -0
  563. package/dist/vega/{p-a484e32d.entry.js → p-a6a89f09.entry.js} +1 -1
  564. package/dist/vega/p-a92cd703.js +1 -0
  565. package/dist/vega/p-a93b3aed.js +1 -0
  566. package/dist/vega/{p-528748fa.js → p-aa135628.js} +1 -1
  567. package/dist/vega/{p-4bfe3258.entry.js → p-aaaf21eb.entry.js} +1 -1
  568. package/dist/vega/{p-36d9e782.entry.js → p-ab253867.entry.js} +1 -1
  569. package/dist/vega/{p-dcd3e3a7.js → p-ab9d53e9.js} +1 -1
  570. package/dist/vega/p-ad367b48.entry.js +1 -0
  571. package/dist/vega/{p-e18c0656.entry.js → p-af0cfea0.entry.js} +1 -1
  572. package/dist/vega/p-b07f587a.entry.js +1 -0
  573. package/dist/vega/p-b21cc390.entry.js +1 -0
  574. package/dist/vega/{p-12e8a1b2.js → p-b2a4314a.js} +1 -1
  575. package/dist/vega/p-b52d7724.js +3 -0
  576. package/dist/vega/{p-5f96e741.entry.js → p-b97ed9f7.entry.js} +1 -1
  577. package/dist/vega/{p-7dcd2850.entry.js → p-bc0e5598.entry.js} +1 -1
  578. package/dist/vega/p-bc119e75.entry.js +1 -0
  579. package/dist/vega/{p-0cbf09f7.entry.js → p-bedb575c.entry.js} +1 -1
  580. package/dist/vega/{p-cb81126a.entry.js → p-bfe5dff7.entry.js} +1 -1
  581. package/dist/vega/{p-52c69f9e.entry.js → p-c032f626.entry.js} +1 -1
  582. package/dist/vega/{p-1ea9ad9a.js → p-c34f4cbc.js} +1 -1
  583. package/dist/vega/{p-72ab5cd5.entry.js → p-c422ee02.entry.js} +1 -1
  584. package/dist/vega/{p-39c5054b.js → p-c576e846.js} +1 -1
  585. package/dist/vega/{p-c70748f7.entry.js → p-c7d46740.entry.js} +1 -1
  586. package/dist/vega/p-cc569b54.js +1 -0
  587. package/dist/vega/{p-4e065ef7.entry.js → p-cd04b149.entry.js} +1 -1
  588. package/dist/vega/{p-2a245138.entry.js → p-cd0a108b.entry.js} +1 -1
  589. package/dist/vega/{p-8c56d74d.entry.js → p-d1bb6e7a.entry.js} +1 -1
  590. package/dist/vega/{p-200c8914.entry.js → p-d340ee3d.entry.js} +1 -1
  591. package/dist/vega/p-d897acd5.js +1 -0
  592. package/dist/vega/p-debf9e06.entry.js +1 -0
  593. package/dist/vega/p-e0a51e49.js +1 -0
  594. package/dist/vega/{p-1aedbfd2.entry.js → p-e11c6ec4.entry.js} +1 -1
  595. package/dist/vega/{p-1e0a8fd3.js → p-e14323f3.js} +1 -1
  596. package/dist/vega/{p-6d4518d7.entry.js → p-e5abc288.entry.js} +1 -1
  597. package/dist/vega/{p-544ce391.entry.js → p-ea1a0046.entry.js} +1 -1
  598. package/dist/vega/{p-72fd17a1.entry.js → p-edd7aa92.entry.js} +1 -1
  599. package/dist/vega/p-ef1bbf14.js +1 -0
  600. package/dist/vega/{p-9834d5d4.entry.js → p-efc08027.entry.js} +1 -1
  601. package/dist/vega/{p-874e5624.js → p-f485448a.js} +1 -1
  602. package/dist/vega/{p-92528dc9.entry.js → p-f8b2dbb9.entry.js} +1 -1
  603. package/dist/vega/{p-cf4b3d40.entry.js → p-f8bf379c.entry.js} +1 -1
  604. package/dist/vega/{p-b98ead05.entry.js → p-f902305d.entry.js} +1 -1
  605. package/dist/vega/p-fe985b52.js +1 -0
  606. package/dist/vega/vega.esm.js +1 -1
  607. package/package.json +1 -1
  608. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-keyboard-conttroller.js +0 -85
  609. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-constants.js +0 -6
  610. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-constants.d.ts +0 -6
  611. package/dist/vega/p-03eeadc1.entry.js +0 -1
  612. package/dist/vega/p-0eb29065.js +0 -3
  613. package/dist/vega/p-10d30c03.js +0 -1
  614. package/dist/vega/p-1250b1ab.entry.js +0 -1
  615. package/dist/vega/p-1abd3c17.js +0 -1
  616. package/dist/vega/p-2d158cbd.js +0 -1
  617. package/dist/vega/p-2f07d719.entry.js +0 -1
  618. package/dist/vega/p-36d2df7a.entry.js +0 -1
  619. package/dist/vega/p-373541fa.js +0 -1
  620. package/dist/vega/p-3a620268.js +0 -1
  621. package/dist/vega/p-3d0b4074.js +0 -1
  622. package/dist/vega/p-56493601.js +0 -1
  623. package/dist/vega/p-571ec00b.js +0 -1
  624. package/dist/vega/p-585e4f1c.entry.js +0 -1
  625. package/dist/vega/p-5b1f5e4a.entry.js +0 -1
  626. package/dist/vega/p-6234852e.entry.js +0 -1
  627. package/dist/vega/p-67eaf77e.js +0 -1
  628. package/dist/vega/p-6c95a6a3.js +0 -1
  629. package/dist/vega/p-6fd4f2c6.js +0 -1
  630. package/dist/vega/p-7e8fdac4.js +0 -1
  631. package/dist/vega/p-83ad8988.js +0 -1
  632. package/dist/vega/p-94975537.entry.js +0 -1
  633. package/dist/vega/p-a91927eb.entry.js +0 -1
  634. package/dist/vega/p-b3733762.entry.js +0 -1
  635. package/dist/vega/p-b622c455.js +0 -1
  636. package/dist/vega/p-c6d775b8.entry.js +0 -1
  637. package/dist/vega/p-cd69aeae.js +0 -1
  638. package/dist/vega/p-cfe268a8.entry.js +0 -1
  639. package/dist/vega/p-daba4af1.js +0 -1
  640. package/dist/vega/p-de8f0d98.js +0 -1
  641. package/dist/vega/p-f0e828d8.js +0 -1
  642. package/dist/vega/p-f62c5a20.entry.js +0 -1
  643. package/dist/vega/p-f6c0e9e7.entry.js +0 -1
  644. package/dist/vega/p-fa65956c.entry.js +0 -1
  645. /package/dist/types/components/vega-dropdown/slimmers/controllers/{vega-dropdown-keyboard-conttroller.d.ts → vega-dropdown-keyboard-controller.d.ts} +0 -0
@@ -1 +1 @@
1
- import{h as e,F as t,H as i,r as o,c as a,g as r}from"./p-6b2342e0.js";import{R as s}from"./p-8bc15ed0.js";import{g as n,s as d}from"./p-519a7d55.js";import{a1 as p,a2 as l}from"./p-456f678b.js";import{c,M as h,V as f,I as m}from"./p-6e1ab235.js";import{V as b,I as v}from"./p-8ce9e214.js";import{F as g}from"./p-56db3323.js";import{C as x}from"./p-2c737fc8.js";import{c as u}from"./p-66647244.js";import{s as w,A as y,V as j,u as R,i as C,d as I,t as k}from"./p-5447a8e8.js";import{F as A}from"./p-cb378636.js";import{C as D}from"./p-2d0d575f.js";import{c as E}from"./p-3a620268.js";import{D as S}from"./p-526e3634.js";import{m as O}from"./p-4a2fe3a4.js";import{h as z,l as V}from"./p-f0e828d8.js";import{f as L}from"./p-781b7a54.js";import{K as H}from"./p-d609c3fd.js";import{f as P}from"./p-528748fa.js";import{M as T}from"./p-78a57a17.js";import{T as F}from"./p-52b8f2d2.js";import{P as M}from"./p-81dd00d0.js";import"./p-abd7aeaa.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-874e5624.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-71909102.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-c41a2d4a.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-b75ee3ba.js";import"./p-1e0a8fd3.js";import"./p-49a2e141.js";import"./p-0c667d6a.js";import"./p-dcd3e3a7.js";import"./p-6c95a6a3.js";const _=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!1===e.autoValidation}];var K=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class N extends f{constructor(){super(...arguments),this.onItemClick=async()=>{this.valueController.setValue(await this.dropdownRef.getSelection()),await this.clearInput()},this.onDropdownHide=async()=>{await this.clearInput()},this.onDropdownCreate=async e=>{this.createEventEmit.emit(e),await this.clearInput()},this.onInputChange=async e=>{const t=e.target.value;(this.useDefaultFilter||this.vegaDropdownProps.dynamicOption)&&(await this.dropdownRef.show(),await this.dropdownRef.search(t)),!this.isTemplateMode&&this.useDefaultFilter||this.searchEventEmit.emit(t)}}connectedCallback(){this.isTemplateMode=null!==this.host.querySelector("[slot=items]")}getDropdownRef(){return this.dropdownRef}getSearchInputRef(){return this.searchInputRef}focusInput(){this.searchInputRef.focus()}async hide(){await this.dropdownRef.hide()}async show(){await this.dropdownRef.show()}replaceItemsSlot(e){e&&this.itemsSlotRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(e))}renderDropdown(){return e("vega-dropdown",Object.assign({trigger:this.disabled?"none":"click",source:this.source,selectType:"multiple",selectedSourceKey:this.value,matchTargetWidth:!0,useDefaultFilter:this.useDefaultFilter},this.vegaDropdownProps,{ref:e=>{this.dropdownRef=e,S.addUniqueObserverToNode(e,w,(async e=>{await this.onDropdownCreate(e.detail)})),S.addUniqueObserverToNode(e,y,(async()=>{await this.onDropdownHide()})),S.addUniqueObserverToNode(e,j,(async()=>{await this.onItemClick()})),S.addUniqueObserverToNode(e,R,(async e=>{await this.onItemClick(),this.selectAllClickEventEmit.emit(e.detail)})),S.addUniqueObserverToNode(e,O,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.key===e.itemKey)))).map((e=>({key:e.itemKey,label:e.label})));this.sourceController.setSource([...this.source,...t])}))}}),this.renderContainer(),this.renderItemsSlot())}renderContainer(){const i=L(this.containerMaxHeight,"widthAndHeight");return e("div",{class:{"vega-combo-box-container":!0,[`vega-combo-box-size-${this.size}`]:!0}},i?e("div",{class:"vega-combo-box-container-content",style:i?{maxHeight:i}:void 0},this.renderSelectedContainer(),this.renderInputContainer()):e(t,null,this.renderSelectedContainer(),this.renderInputContainer()))}renderItemsSlot(){return this.isTemplateMode&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}renderSelectedContainer(){const i=this.value.map((e=>this.source.find((t=>t.key===e)))).filter((e=>e));return e(t,null,i.map((e=>this.renderSelectedChip(e))))}renderSelectedChip(t){return e("vega-chip",{key:t.key,text:z.sanitize(t.label,V),variant:"outlined",showCloseIcon:!this.disabled,size:"small",ref:e=>{S.addUniqueObserverToNode(e,C,(async()=>{await this.onChipClose(t.key)}))}})}renderInputContainer(){return e("div",{class:"vega-combo-box-input-container"},e("input",{onInput:this.onInputChange,"aria-label":this.label||"No label defined",placeholder:0===this.value.length?this.placeholder:"",ref:e=>this.searchInputRef=e,onKeyDown:E(),disabled:this.disabled}))}async onChipClose(e){this.valueController.setValue([...this.value.filter((t=>t!==e))]),await this.dropdownRef.hide()}async clearInput(){this.searchInputRef.value="",await this.dropdownRef.search("")}}K([c()],N.prototype,"host",void 0),K([c()],N.prototype,"value",void 0),K([c()],N.prototype,"source",void 0),K([c()],N.prototype,"disabled",void 0),K([c()],N.prototype,"size",void 0),K([c()],N.prototype,"containerMaxHeight",void 0),K([c()],N.prototype,"vegaDropdownProps",void 0),K([c()],N.prototype,"label",void 0),K([c()],N.prototype,"placeholder",void 0),K([c()],N.prototype,"useDefaultFilter",void 0),K([c()],N.prototype,"createEventEmit",void 0),K([c()],N.prototype,"searchEventEmit",void 0),K([c()],N.prototype,"selectAllClickEventEmit",void 0),K([c()],N.prototype,"valueController",void 0),K([c()],N.prototype,"sourceController",void 0),K([h("connectedCallback")],N.prototype,"connectedCallback",null);class G extends f{setValue(e){this.value=e}}!function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([c({writable:!0})],G.prototype,"value",void 0);var U=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class q extends f{constructor(){super(...arguments),this.onLabelClick=()=>{this.dropdownRenderer.focusInput()}}render(){return e(i,{class:{"vega-combo-box-disabled":this.disabled}},this.renderLabel(),this.dropdownRenderer.renderDropdown(),this.renderHint())}renderLabel(){return e("vega-field-label",{onClick:this.onLabelClick,"is-field-required":this.required,disabled:this.disabled,optional:this.optional,label:this.label})}renderHint(){return e("div",{class:"vega-combo-box-hint"},this.hint)}}U([c()],q.prototype,"required",void 0),U([c()],q.prototype,"optional",void 0),U([c()],q.prototype,"hint",void 0),U([c()],q.prototype,"disabled",void 0),U([c()],q.prototype,"dropdownRenderer",void 0),U([c()],q.prototype,"label",void 0);var B=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class W extends H{constructor(){super((e=>[{keyCode:"Backspace",activeElementInScope:[e.dropdownRenderer.getSearchInputRef()],eventName:"keydown",callback:e.deleteLastSelectedItem},{keyCode:"ArrowLeft",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowLeft")},{keyCode:"ArrowRight",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowRight")}])),this.deleteLastSelectedItem=()=>{""===this.dropdownRenderer.getSearchInputRef().value&&(this.value.pop(),this.valueController.setValue([...this.value]))}}controlDirectionByKeyboard(e){const t=n();if(t&&t.classList.contains("vega-chip-close-icon")){const i=P(t,"vega-chip");"ArrowLeft"===e&&this.focusItemByKeyboard(i.previousSibling),"ArrowRight"===e&&this.focusItemByKeyboard(i.nextSibling)}else"ArrowLeft"===e&&0===this.dropdownRenderer.getSearchInputRef().selectionStart&&this.focusItemByKeyboard(this.host.shadowRoot.querySelector("vega-chip:last-of-type"))}focusItemByKeyboard(e){e&&(e.classList.contains("vega-combo-box-input-container")?e.querySelector("input").focus():e.shadowRoot.querySelector(".vega-chip-close-icon").focus())}}B([c()],W.prototype,"host",void 0),B([c()],W.prototype,"value",void 0),B([c()],W.prototype,"dropdownRenderer",void 0),B([c()],W.prototype,"valueController",void 0);var $=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class J extends f{constructor(){super(...arguments),this.mutationObserver=new T({mutationFilter:F("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){this.dropdownRenderer.replaceItemsSlot(this.host.querySelector("[slot=items]"))}}$([m()],J.prototype,"mutationObserver",void 0),$([c()],J.prototype,"host",void 0),$([c()],J.prototype,"dropdownRenderer",void 0),$([h("componentDidLoad")],J.prototype,"componentDidLoad",null);class Q extends f{setSource(e){this.source=e}}!function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([c({writable:!0})],Q.prototype,"source",void 0);var X=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Y=class{constructor(e){o(this,e),this.vegaChange=a(this,"vegaChange",7),this.change=a(this,"change",7),this.vegaCreate=a(this,"vegaCreate",7),this.create=a(this,"create",7),this.vegaSearch=a(this,"vegaSearch",7),this.search=a(this,"search",7),this.vegaDropdownSelectAllClick=a(this,"vegaDropdownSelectAllClick",7),this.dropdownSelectAllClick=a(this,"dropdownSelectAllClick",7),this.globalSlimmers={},this.itemsSlotController=new J,this.keyboardController=new W,this.valueController=new G,this.sourceController=new Q,this.renderer=new q,this.dropdownRenderer=new N,this.pageResizeSlimmer=new M,this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new s:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.dropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.dropdownRenderer.getSearchInputRef()]}),this.changeEventEmit=u(Y,I),this.createEventEmit=u(Y,w),this.searchEventEmit=u(Y,k),this.selectAllClickEventEmit=u(Y,R),this.dropdownEventPrevent=new x([w,k],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopImmediatePropagation()}}),this.dropdownEventPreventSelectAllClick=new x([R],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(_),this.label="",this.required=!1,this.optional=!1,this.name="",this.source=[],this.value=[],this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="",this.hint="",this.size="medium",this.vegaDropdownProps={},this.useDefaultFilter=!0}watchSource(){this.source=p(this.source,l)?this.source:[]}watchValue(){this.changeEventEmit.emit(this.value),D.notify(A,{host:this.host,detail:this.value})}watchValidationRules(){}watchContainerMaxHeight(){}watchVegaDropdownProps(){}async close(){this.disabled||await this.dropdownRenderer.hide()}async open(){this.disabled||await this.dropdownRenderer.show()}render(){return d(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"],containerMaxHeight:["watchContainerMaxHeight"],vegaDropdownProps:["watchVegaDropdownProps"]}}};X([v()],Y.prototype,"globalSlimmers",void 0),X([m()],Y.prototype,"itemsSlotController",void 0),X([m()],Y.prototype,"keyboardController",void 0),X([m()],Y.prototype,"valueController",void 0),X([m()],Y.prototype,"sourceController",void 0),X([m()],Y.prototype,"renderer",void 0),X([m()],Y.prototype,"dropdownRenderer",void 0),X([m()],Y.prototype,"pageResizeSlimmer",void 0),X([m()],Y.prototype,"formFieldController",void 0),X([m()],Y.prototype,"changeEventEmit",void 0),X([m()],Y.prototype,"createEventEmit",void 0),X([m()],Y.prototype,"searchEventEmit",void 0),X([m()],Y.prototype,"selectAllClickEventEmit",void 0),X([m()],Y.prototype,"dropdownEventPrevent",void 0),X([m()],Y.prototype,"dropdownEventPreventSelectAllClick",void 0),X([m()],Y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Y.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}.vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border-radius:8px;gap:8px;display:block;display:flex;flex-wrap:wrap;align-items:center;cursor:pointer}.vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-combo-box-container-content{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;min-height:26px}.vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.vega-combo-box-container .vega-combo-box-input-container{width:-webkit-min-content;width:-moz-min-content;width:min-content;flex-grow:1}.vega-combo-box-container input{border-style:none;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));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));width:100%}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-container 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-combo-box-container 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-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-combo-box-container input:focus{outline:2px solid transparent;outline-offset:2px}.vega-combo-box-size-medium{padding-left:12px;padding-right:12px;padding-top:11px;padding-bottom:11px}.vega-combo-box-size-small{padding-left:12px;padding-right:12px;padding-top:7px;padding-bottom:7px}.vega-combo-box-container:focus{outline:none}vega-field-label{margin-bottom:8px}.error .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.error .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.error .vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host(.vega-combo-box-disabled) .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-combo-box-disabled) .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-combo-box-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-combo-box-container input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.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-combo-box-hint{padding-left:8px;padding-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error:not(.vega-hidden)+.vega-combo-box-hint{padding-top:4px}vega-dropdown{display:block}';export{Y as vega_combo_box}
1
+ import{h as e,F as t,H as i,r as o,c as a,g as r}from"./p-6b2342e0.js";import{R as s}from"./p-8bc15ed0.js";import{g as n,s as d}from"./p-519a7d55.js";import{a1 as p,a2 as l}from"./p-941a83db.js";import{c,M as h,V as f,I as m}from"./p-6e1ab235.js";import{V as b,I as v}from"./p-8ce9e214.js";import{F as g}from"./p-a488447f.js";import{C as x}from"./p-2c737fc8.js";import{c as u}from"./p-8fc0a820.js";import{s as w,A as y,V as j,u as R,i as C,d as I,t as k}from"./p-5447a8e8.js";import{F as A}from"./p-cb378636.js";import{C as D}from"./p-2d0d575f.js";import{c as E}from"./p-8387896e.js";import{D as S}from"./p-36a57431.js";import{m as O}from"./p-4a2fe3a4.js";import{h as z,l as V}from"./p-cc569b54.js";import{f as L}from"./p-4b35c748.js";import{K as H}from"./p-60a74fb7.js";import{f as P}from"./p-aa135628.js";import{M as T}from"./p-78a57a17.js";import{T as F}from"./p-52b8f2d2.js";import{P as M}from"./p-81dd00d0.js";import"./p-abd7aeaa.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-f485448a.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-71909102.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-5c3649f9.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-b75ee3ba.js";import"./p-e14323f3.js";import"./p-49a2e141.js";import"./p-0c667d6a.js";import"./p-ab9d53e9.js";import"./p-6e9e7131.js";const _=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!1===e.autoValidation}];var K=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class N extends f{constructor(){super(...arguments),this.onItemClick=async()=>{this.valueController.setValue(await this.dropdownRef.getSelection()),await this.clearInput()},this.onDropdownHide=async()=>{await this.clearInput()},this.onDropdownCreate=async e=>{this.createEventEmit.emit(e),await this.clearInput()},this.onInputChange=async e=>{const t=e.target.value;(this.useDefaultFilter||this.vegaDropdownProps.dynamicOption)&&(await this.dropdownRef.show(),await this.dropdownRef.search(t)),!this.isTemplateMode&&this.useDefaultFilter||this.searchEventEmit.emit(t)}}connectedCallback(){this.isTemplateMode=null!==this.host.querySelector("[slot=items]")}getDropdownRef(){return this.dropdownRef}getSearchInputRef(){return this.searchInputRef}focusInput(){this.searchInputRef.focus()}async hide(){await this.dropdownRef.hide()}async show(){await this.dropdownRef.show()}replaceItemsSlot(e){e&&this.itemsSlotRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(e))}renderDropdown(){return e("vega-dropdown",Object.assign({trigger:this.disabled?"none":"click",source:this.source,selectType:"multiple",selectedSourceKey:this.value,matchTargetWidth:!0,useDefaultFilter:this.useDefaultFilter},this.vegaDropdownProps,{ref:e=>{this.dropdownRef=e,S.addUniqueObserverToNode(e,w,(async e=>{await this.onDropdownCreate(e.detail)})),S.addUniqueObserverToNode(e,y,(async()=>{await this.onDropdownHide()})),S.addUniqueObserverToNode(e,j,(async()=>{await this.onItemClick()})),S.addUniqueObserverToNode(e,R,(async e=>{await this.onItemClick(),this.selectAllClickEventEmit.emit(e.detail)})),S.addUniqueObserverToNode(e,O,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.key===e.itemKey)))).map((e=>({key:e.itemKey,label:e.label})));this.sourceController.setSource([...this.source,...t])}))}}),this.renderContainer(),this.renderItemsSlot())}renderContainer(){const i=L(this.containerMaxHeight,"widthAndHeight");return e("div",{class:{"vega-combo-box-container":!0,[`vega-combo-box-size-${this.size}`]:!0}},i?e("div",{class:"vega-combo-box-container-content",style:i?{maxHeight:i}:void 0},this.renderSelectedContainer(),this.renderInputContainer()):e(t,null,this.renderSelectedContainer(),this.renderInputContainer()))}renderItemsSlot(){return this.isTemplateMode&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}renderSelectedContainer(){const i=this.value.map((e=>this.source.find((t=>t.key===e)))).filter((e=>e));return e(t,null,i.map((e=>this.renderSelectedChip(e))))}renderSelectedChip(t){return e("vega-chip",{key:t.key,text:z.sanitize(t.label,V),variant:"outlined",showCloseIcon:!this.disabled,size:"small",ref:e=>{S.addUniqueObserverToNode(e,C,(async()=>{await this.onChipClose(t.key)}))}})}renderInputContainer(){return e("div",{class:"vega-combo-box-input-container"},e("input",{onInput:this.onInputChange,"aria-label":this.label||"No label defined",placeholder:0===this.value.length?this.placeholder:"",ref:e=>this.searchInputRef=e,onKeyDown:E(),disabled:this.disabled}))}async onChipClose(e){this.valueController.setValue([...this.value.filter((t=>t!==e))]),await this.dropdownRef.hide()}async clearInput(){this.searchInputRef.value="",await this.dropdownRef.search("")}}K([c()],N.prototype,"host",void 0),K([c()],N.prototype,"value",void 0),K([c()],N.prototype,"source",void 0),K([c()],N.prototype,"disabled",void 0),K([c()],N.prototype,"size",void 0),K([c()],N.prototype,"containerMaxHeight",void 0),K([c()],N.prototype,"vegaDropdownProps",void 0),K([c()],N.prototype,"label",void 0),K([c()],N.prototype,"placeholder",void 0),K([c()],N.prototype,"useDefaultFilter",void 0),K([c()],N.prototype,"createEventEmit",void 0),K([c()],N.prototype,"searchEventEmit",void 0),K([c()],N.prototype,"selectAllClickEventEmit",void 0),K([c()],N.prototype,"valueController",void 0),K([c()],N.prototype,"sourceController",void 0),K([h("connectedCallback")],N.prototype,"connectedCallback",null);class G extends f{setValue(e){this.value=e}}!function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([c({writable:!0})],G.prototype,"value",void 0);var U=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class q extends f{constructor(){super(...arguments),this.onLabelClick=()=>{this.dropdownRenderer.focusInput()}}render(){return e(i,{class:{"vega-combo-box-disabled":this.disabled}},this.renderLabel(),this.dropdownRenderer.renderDropdown(),this.renderHint())}renderLabel(){return e("vega-field-label",{onClick:this.onLabelClick,"is-field-required":this.required,disabled:this.disabled,optional:this.optional,label:this.label})}renderHint(){return e("div",{class:"vega-combo-box-hint"},this.hint)}}U([c()],q.prototype,"required",void 0),U([c()],q.prototype,"optional",void 0),U([c()],q.prototype,"hint",void 0),U([c()],q.prototype,"disabled",void 0),U([c()],q.prototype,"dropdownRenderer",void 0),U([c()],q.prototype,"label",void 0);var B=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class W extends H{constructor(){super((e=>[{keyCode:"Backspace",activeElementInScope:[e.dropdownRenderer.getSearchInputRef()],eventName:"keydown",callback:e.deleteLastSelectedItem},{keyCode:"ArrowLeft",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowLeft")},{keyCode:"ArrowRight",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowRight")}])),this.deleteLastSelectedItem=()=>{""===this.dropdownRenderer.getSearchInputRef().value&&(this.value.pop(),this.valueController.setValue([...this.value]))}}controlDirectionByKeyboard(e){const t=n();if(t&&t.classList.contains("vega-chip-close-icon")){const i=P(t,"vega-chip");"ArrowLeft"===e&&this.focusItemByKeyboard(i.previousSibling),"ArrowRight"===e&&this.focusItemByKeyboard(i.nextSibling)}else"ArrowLeft"===e&&0===this.dropdownRenderer.getSearchInputRef().selectionStart&&this.focusItemByKeyboard(this.host.shadowRoot.querySelector("vega-chip:last-of-type"))}focusItemByKeyboard(e){e&&(e.classList.contains("vega-combo-box-input-container")?e.querySelector("input").focus():e.shadowRoot.querySelector(".vega-chip-close-icon").focus())}}B([c()],W.prototype,"host",void 0),B([c()],W.prototype,"value",void 0),B([c()],W.prototype,"dropdownRenderer",void 0),B([c()],W.prototype,"valueController",void 0);var $=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class J extends f{constructor(){super(...arguments),this.mutationObserver=new T({mutationFilter:F("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){this.dropdownRenderer.replaceItemsSlot(this.host.querySelector("[slot=items]"))}}$([m()],J.prototype,"mutationObserver",void 0),$([c()],J.prototype,"host",void 0),$([c()],J.prototype,"dropdownRenderer",void 0),$([h("componentDidLoad")],J.prototype,"componentDidLoad",null);class Q extends f{setSource(e){this.source=e}}!function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([c({writable:!0})],Q.prototype,"source",void 0);var X=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Y=class{constructor(e){o(this,e),this.vegaChange=a(this,"vegaChange",7),this.change=a(this,"change",7),this.vegaCreate=a(this,"vegaCreate",7),this.create=a(this,"create",7),this.vegaSearch=a(this,"vegaSearch",7),this.search=a(this,"search",7),this.vegaDropdownSelectAllClick=a(this,"vegaDropdownSelectAllClick",7),this.dropdownSelectAllClick=a(this,"dropdownSelectAllClick",7),this.globalSlimmers={},this.itemsSlotController=new J,this.keyboardController=new W,this.valueController=new G,this.sourceController=new Q,this.renderer=new q,this.dropdownRenderer=new N,this.pageResizeSlimmer=new M,this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new s:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.dropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.dropdownRenderer.getSearchInputRef()]}),this.changeEventEmit=u(Y,I),this.createEventEmit=u(Y,w),this.searchEventEmit=u(Y,k),this.selectAllClickEventEmit=u(Y,R),this.dropdownEventPrevent=new x([w,k],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopImmediatePropagation()}}),this.dropdownEventPreventSelectAllClick=new x([R],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(_),this.label="",this.required=!1,this.optional=!1,this.name="",this.source=[],this.value=[],this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="",this.hint="",this.size="medium",this.vegaDropdownProps={},this.useDefaultFilter=!0}watchSource(){this.source=p(this.source,l)?this.source:[]}watchValue(){this.changeEventEmit.emit(this.value),D.notify(A,{host:this.host,detail:this.value})}watchValidationRules(){}watchContainerMaxHeight(){}watchVegaDropdownProps(){}async close(){this.disabled||await this.dropdownRenderer.hide()}async open(){this.disabled||await this.dropdownRenderer.show()}render(){return d(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"],containerMaxHeight:["watchContainerMaxHeight"],vegaDropdownProps:["watchVegaDropdownProps"]}}};X([v()],Y.prototype,"globalSlimmers",void 0),X([m()],Y.prototype,"itemsSlotController",void 0),X([m()],Y.prototype,"keyboardController",void 0),X([m()],Y.prototype,"valueController",void 0),X([m()],Y.prototype,"sourceController",void 0),X([m()],Y.prototype,"renderer",void 0),X([m()],Y.prototype,"dropdownRenderer",void 0),X([m()],Y.prototype,"pageResizeSlimmer",void 0),X([m()],Y.prototype,"formFieldController",void 0),X([m()],Y.prototype,"changeEventEmit",void 0),X([m()],Y.prototype,"createEventEmit",void 0),X([m()],Y.prototype,"searchEventEmit",void 0),X([m()],Y.prototype,"selectAllClickEventEmit",void 0),X([m()],Y.prototype,"dropdownEventPrevent",void 0),X([m()],Y.prototype,"dropdownEventPreventSelectAllClick",void 0),X([m()],Y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Y.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}.vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border-radius:8px;gap:8px;display:block;display:flex;flex-wrap:wrap;align-items:center;cursor:pointer}.vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-combo-box-container-content{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;min-height:26px}.vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.vega-combo-box-container .vega-combo-box-input-container{width:-webkit-min-content;width:-moz-min-content;width:min-content;flex-grow:1}.vega-combo-box-container input{border-style:none;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));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));width:100%}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-container 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-combo-box-container 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-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-combo-box-container input:focus{outline:2px solid transparent;outline-offset:2px}.vega-combo-box-size-medium{padding-left:12px;padding-right:12px;padding-top:11px;padding-bottom:11px}.vega-combo-box-size-small{padding-left:12px;padding-right:12px;padding-top:7px;padding-bottom:7px}.vega-combo-box-container:focus{outline:none}vega-field-label{margin-bottom:8px}.error .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.error .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.error .vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host(.vega-combo-box-disabled) .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-combo-box-disabled) .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-combo-box-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-combo-box-container input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.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-combo-box-hint{padding-left:8px;padding-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error:not(.vega-hidden)+.vega-combo-box-hint{padding-top:4px}vega-dropdown{display:block}';export{Y as vega_combo_box}
@@ -1 +1 @@
1
- import{h as t,r as e,c as i,H as n,g as s}from"./p-6b2342e0.js";import{I as o}from"./p-abd7aeaa.js";import{M as a,a as r}from"./p-f0ff4463.js";import{M as l,a as p}from"./p-cdbbdcc2.js";import{R as c}from"./p-8bc15ed0.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 g,I as v}from"./p-6e1ab235.js";import{s as m}from"./p-6bd5c49b.js";import{V as x,I as b}from"./p-8ce9e214.js";import{F as w}from"./p-56db3323.js";import{c as y}from"./p-66647244.js";import{a as C,C as j,V as k,d as R,K as I,L as S,M as O,N as z,O as D}from"./p-5447a8e8.js";import{S as E}from"./p-1ea9ad9a.js";import{S as T}from"./p-ae2abdfa.js";import{i as V}from"./p-456f678b.js";import{S as M}from"./p-a81ad3bd.js";import{i as L}from"./p-d27ae9ff.js";import{d as N}from"./p-a841cf13.js";import{p as F,q as A,r as P,m as B}from"./p-4a2fe3a4.js";import{D as $,d as _}from"./p-526e3634.js";import{P as U}from"./p-81dd00d0.js";import{S as W}from"./p-c41a2d4a.js";import{V as K}from"./p-6031bed1.js";import{c as q}from"./p-3a620268.js";import{C as H}from"./p-2d0d575f.js";import{F as G}from"./p-cb378636.js";import{C as X}from"./p-8187878e.js";import{V as Y}from"./p-6db1b9ac.js";import{A as J}from"./p-bdb5180c.js";import{M as Q}from"./p-78a57a17.js";import"./p-262ec334.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-874e5624.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-71909102.js";import"./p-52b8f2d2.js";import"./p-8c30a60d.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-67eaf77e.js";import"./p-49a2e141.js";import"./p-ffdc25ec.js";import"./p-afcd8f04.js";const Z=/^(?:[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 tt extends o{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=Z.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 et 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 s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);o>3&&a&&Object.defineProperty(e,i,a)}([u()],et.prototype,"disableCopyPaste",void 0);var it=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class nt 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","aria-hidden":"true"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}it([u()],nt.prototype,"host",void 0),it([u()],nt.prototype,"prefixIcon",void 0);class st extends T{constructor(t=!1){super(),this.overrideValue=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),s=i.substring(0,e),o=(n.match(/,/g)||[]).length;return e+((s.match(/,/g)||[]).length-o)}}class ot extends T{constructor(t,e=!1){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.overrideValue=e,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(V(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 at extends T{constructor(t,e=!1,i=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e,this.overrideValue=i}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(V(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class rt extends ot{constructor(t,e=!1){super(t,e)}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),s=t.substring(0,e),o=n.substring(0,e),a=(s.match(/,/g)||[]).length;return e+((o.match(/,/g)||[]).length-a)-(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):"",s=Number(e.split(".")[0]);return!isNaN(s)&&s<=Number.MAX_SAFE_INTEGER?s.toLocaleString("en-US")+n:e}}var lt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class pt extends M{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=E.getPhoneMaskStrategy(e.overrideValue);break;case"taxId":i=E.getTaxIdMaskStrategy(e.overrideValue);break;case"zipcode":i=E.getZipcodeMaskStrategy(e.overrideValue);break;case"thousand-comma":i=new st(e.overrideValue);break;case"number":i=this.getNumberTypeMaskStrategy(e.options,e.overrideValue);break;case"custom":i=e.strategy?e.strategy():new E(e.options,e.overrideValue);break;case"custom-formatter":i=new at(e.formatter,e.resetCaretPosition,e.overrideValue)}return"number"!==this.type||"input"!==t||e||(i=new ot({},null==e?void 0:e.overrideValue)),i}getNumberTypeMaskStrategy(t,e=!1){return t&&t.thousandComma?new rt(t,e):new ot(t,e)}isBlurModeMaskConfig(t){return"blur"===t.trigger}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return L(i,n,!0,((t,e)=>N(t,e)?0:-1))}initSetupMaskConfigObserver(){$.addUniqueObserverToNode(this.host,F,this.setup.bind(this))}removeSetupMaskConfigObserver(){$.removeUniqueObserverFromNode(this.host,F)}}lt([u()],pt.prototype,"maskConfig",void 0),lt([u()],pt.prototype,"disableCopyPaste",void 0),lt([u()],pt.prototype,"type",void 0),lt([u()],pt.prototype,"inputRenderer",void 0),lt([g("connectedCallback")],pt.prototype,"connectedCallback",null),lt([g("disconnectedCallback")],pt.prototype,"disconnectedCallback",null),lt([g("watchValue")],pt.prototype,"watchValue",null),lt([g("watchMaskChange")],pt.prototype,"watchMaskChange",null),lt([g("watchTypeChange")],pt.prototype,"watchTypeChange",null);const ct=[{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 dt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class ht 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}}dt([u()],ht.prototype,"host",void 0),dt([u()],ht.prototype,"value",void 0),dt([u()],ht.prototype,"placeholder",void 0),dt([u()],ht.prototype,"isCompactInputWidth",void 0),dt([u()],ht.prototype,"suffixText",void 0),dt([g("componentDidLoad")],ht.prototype,"componentDidLoad",null),dt([g("watchValue")],ht.prototype,"watchValue",null),dt([g("watchSuffixText")],ht.prototype,"watchSuffixText",null);var ut=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class ft extends W{constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"prefixText",parentStateName:"prefixText"},{subStateName:"suffixText",parentStateName:"suffixText"},{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}ut([u()],ft.prototype,"host",void 0),ut([u({writable:!0})],ft.prototype,"prefixText",void 0),ut([u({writable:!0})],ft.prototype,"suffixText",void 0),ut([u({writable:!0})],ft.prototype,"isCompactInputWidth",void 0);var gt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class vt extends f{render(){return t("vega-button-circle",{icon:K.getIconKey(this.isPasswordDisplay?"eye":"eye-slash"),variant:"icon-only",size:"small",class:"password-eye-button",ref:t=>{this.addEyeIconObserver(t)}})}addEyeIconObserver(t){$.addUniqueObserverToNode(t,C,(()=>{this.isPasswordDisplay=!this.isPasswordDisplay}))}}K.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>'}}),gt([u()],vt.prototype,"host",void 0),gt([u({writable:!0})],vt.prototype,"isPasswordDisplay",void 0),gt([u()],vt.prototype,"type",void 0);var mt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class xt 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=()=>{H.notify(_.getSubject(this.host,A),"")},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=()=>{H.notify(_.getSubject(this.host,P),{})}}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-disabled":this.disabled?"true":void 0,onKeyDown:q()},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:q(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}}mt([u()],xt.prototype,"host",void 0),mt([u()],xt.prototype,"value",void 0),mt([u()],xt.prototype,"size",void 0),mt([u()],xt.prototype,"disabled",void 0),mt([u()],xt.prototype,"type",void 0),mt([u()],xt.prototype,"showClearIcon",void 0),mt([u()],xt.prototype,"prefixText",void 0),mt([u()],xt.prototype,"suffixText",void 0),mt([u()],xt.prototype,"isCompactInputWidth",void 0),mt([u()],xt.prototype,"prefixSlotRenderer",void 0),mt([u()],xt.prototype,"passwordEyeRenderer",void 0),mt([u()],xt.prototype,"inputRenderer",void 0);var bt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class wt 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,enterkeyhint:this.enterkeyhint,readOnly:this.readOnly,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,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(){this.inputRef.value!==this.value&&this.nativeInputChangeEventEmitter.emit(this.inputRef.value),H.notify(_.getSubject(this.host,A),this.inputRef.value)}notifySetupMaskConfig(){H.notify(_.getSubject(this.host,F),{})}initInputFocusObserver(){$.addUniqueObserverToNode(this.host,P,this.focusInput.bind(this))}removeInputFocusObserver(){$.removeUniqueObserverFromNode(this.host,P)}focusInput(){this.inputRef.focus()}}bt([u()],wt.prototype,"host",void 0),bt([u()],wt.prototype,"value",void 0),bt([u()],wt.prototype,"disabled",void 0),bt([u()],wt.prototype,"type",void 0),bt([u()],wt.prototype,"name",void 0),bt([u()],wt.prototype,"autocomplete",void 0),bt([u()],wt.prototype,"inputmode",void 0),bt([u()],wt.prototype,"enterkeyhint",void 0),bt([u()],wt.prototype,"readOnly",void 0),bt([u()],wt.prototype,"placeholder",void 0),bt([u()],wt.prototype,"minLength",void 0),bt([u()],wt.prototype,"maxLength",void 0),bt([u()],wt.prototype,"isPasswordDisplay",void 0),bt([u()],wt.prototype,"valueUpdateTrigger",void 0),bt([u()],wt.prototype,"focusEventEmitter",void 0),bt([u()],wt.prototype,"blurEventEmitter",void 0),bt([u()],wt.prototype,"pasteEventEmitter",void 0),bt([u()],wt.prototype,"copyPasteController",void 0),bt([u()],wt.prototype,"nativeInputChangeEventEmitter",void 0),bt([g("connectedCallback")],wt.prototype,"connectedCallback",null),bt([g("disconnectedCallback")],wt.prototype,"disconnectedCallback",null),bt([g("doFocus")],wt.prototype,"doFocus",null),bt([g("doBlur")],wt.prototype,"doBlur",null);var yt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class Ct extends f{constructor(){super(...arguments),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()},this.handleLabelClick=()=>{H.notify(_.getSubject(this.host,P),{})}}render(){return t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),this.renderInputContainer(),this.renderHintDom())}renderInputContainer(){return this.renderModeController.isSource()||this.renderModeController.isTemplate()?this.inputSuggestionsRenderer.render(this.inputContainerRenderer.render()):this.inputContainerRenderer.render()}renderLabelDom(){return t("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label,optional:this.optional,suffixButtonProps:this.labelSuffixButtonProps,suffixButtonConfig:this.labelSuffixButtonConfig,ref:t=>{$.addUniqueObserverToNode(t,j,this.handleLabelButtonClick),$.addUniqueObserverToNode(t,C,this.handleLabelClick)}})}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}}yt([u()],Ct.prototype,"host",void 0),yt([u()],Ct.prototype,"disabled",void 0),yt([u()],Ct.prototype,"required",void 0),yt([u()],Ct.prototype,"label",void 0),yt([u()],Ct.prototype,"hint",void 0),yt([u()],Ct.prototype,"labelSuffixButtonProps",void 0),yt([u()],Ct.prototype,"labelSuffixButtonConfig",void 0),yt([u()],Ct.prototype,"optional",void 0),yt([u()],Ct.prototype,"labelButtonClickEventEmitter",void 0),yt([u()],Ct.prototype,"inputContainerRenderer",void 0),yt([u()],Ct.prototype,"inputSuggestionsRenderer",void 0),yt([u()],Ct.prototype,"renderModeController",void 0);var jt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class kt 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),H.notify(G,{host:this.host,detail:this.value})}initValueUpdateObserver(){$.addUniqueObserverToNode(this.host,A,this.setValue.bind(this))}removeValueUpdateObserver(){$.removeUniqueObserverFromNode(this.host,A)}setValue(t){this.value=t}}jt([u()],kt.prototype,"host",void 0),jt([u({writable:!0})],kt.prototype,"value",void 0),jt([u()],kt.prototype,"changeEventEmitter",void 0),jt([u()],kt.prototype,"inputRenderer",void 0),jt([g("connectedCallback")],kt.prototype,"connectedCallback",null),jt([g("disconnectedCallback")],kt.prototype,"disconnectedCallback",null),jt([g("watchValue")],kt.prototype,"watchValue",null);var Rt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class It extends f{constructor(){super(...arguments),this.templateItems=[],this.onDropdownItemClick=async t=>{const e=this.renderModeController.isTemplate()?this.templateItems:this.suggestionsDropdownSource,i=this.findItem(e,t.detail);if(i){const t=this.suggestionItemClickEventEmitter.emit(i);H.notify(_.getSubject(this.host,A),t.defaultPrevented?this.value:i.label)}}}appendHostItemsToDropdown(){this.renderModeController.isTemplate()&&this.itemsSlotRef&&this.dropdownRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(this.host.querySelector("[slot=items]")))}async showSuggestionsDropdown(t={}){this.suggestionsDropdownConfig=Object.assign(Object.assign(Object.assign({},Y),{placement:["top","bottom"]}),t),this.dropdownRef&&Object.assign(this.dropdownRef,this.suggestionsDropdownConfig),await this.showSuggestions()}async hideSuggestionsDropdown(){await this.dropdownRef.hide()}async watchValue(){await this.searchSuggestions()}async watchSuggestionsDropdownSource(){await this.searchSuggestions()}render(e){return t("vega-dropdown",Object.assign({},this.suggestionsDropdownConfig,{source:this.suggestionsDropdownSource,trigger:new X,matchTargetWidth:!0,searchable:!1,translocation:{X:0,Y:6},ref:t=>{this.dropdownRef=t,this.addDropdownObserver(t)},style:{display:"block"}}),e,this.renderItemsSlot())}renderItemsSlot(){return this.renderModeController.isTemplate()&&t("div",{slot:"items",ref:t=>{this.itemsSlotRef=t}})}addDropdownObserver(t){$.addUniqueObserverToNode(t,k,this.onDropdownItemClick.bind(this)),$.addUniqueObserverToNode(t,B,(t=>{this.templateItems=Array.from(t).map((t=>({key:t.itemKey,label:t.label})))}))}findItem(t,e){for(const i of t){if(i.children&&i.children.length>0){const t=this.findItem(i.children,e);if(t)return t}if(i.key.toString()===e)return i}return null}async showSuggestions(){this.dropdownRef&&(this.renderModeController.isSource()||this.renderModeController.isTemplate())&&await this.dropdownRef.show()}async searchSuggestions(){this.dropdownRef&&this.renderModeController.isSource()&&this.suggestionsDropdownSource.length>0&&await this.dropdownRef.search(this.value)}}Rt([u()],It.prototype,"host",void 0),Rt([u()],It.prototype,"value",void 0),Rt([u({writable:!0})],It.prototype,"suggestionsDropdownConfig",void 0),Rt([u()],It.prototype,"suggestionsDropdownSource",void 0),Rt([u()],It.prototype,"renderModeController",void 0),Rt([u()],It.prototype,"suggestionItemClickEventEmitter",void 0),Rt([g("componentDidLoad")],It.prototype,"appendHostItemsToDropdown",null),Rt([g("showSuggestionsDropdown")],It.prototype,"showSuggestionsDropdown",null),Rt([g("hideSuggestionsDropdown")],It.prototype,"hideSuggestionsDropdown",null),Rt([g("watchValue")],It.prototype,"watchValue",null),Rt([g("watchSuggestionsDropdownSource")],It.prototype,"watchSuggestionsDropdownSource",null);var St=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class Ot extends f{constructor(){super(...arguments),this.hasItemsSlot=!1}connectedCallback(){this.setRenderMode()}isSource(){return Array.isArray(this.suggestionsDropdownSource)}isTemplate(){return this.hasItemsSlot}setRenderMode(){this.hasItemsSlot=!!this.host.querySelector("[slot=items]")}}St([u()],Ot.prototype,"host",void 0),St([u()],Ot.prototype,"suggestionsDropdownSource",void 0),St([g("connectedCallback")],Ot.prototype,"connectedCallback",null);var zt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class Dt extends Q{constructor(t){super({options:{attributes:!0,attributeFilter:[Dt.OBSERVED_ATTRIBUTE]},callback:()=>{this.performMapping()}}),this.targetGetter=t}componentDidLoad(){this.performMapping(),super.componentDidLoad&&super.componentDidLoad()}componentDidRender(){this.performMapping()}performMapping(){const t=this.targetGetter?this.targetGetter():null;if(!t)return;const e=this.host.getAttribute(Dt.OBSERVED_ATTRIBUTE);if(this.shouldRemoveTabIndex(e))return void t.removeAttribute("tabindex");const i=String(e);t.getAttribute("tabindex")!==i&&t.setAttribute("tabindex",i)}shouldRemoveTabIndex(t){if(null==t)return!0;const e=String(t).trim().toLowerCase();return""===e||"null"===e||"undefined"===e}}Dt.OBSERVED_ATTRIBUTE="data-tabindex",zt([g("componentDidLoad")],Dt.prototype,"componentDidLoad",null),zt([g("componentDidRender")],Dt.prototype,"componentDidRender",null);var Et=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};const Tt=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaNativeInputChange=i(this,"vegaNativeInputChange",7),this.nativeInputChange=i(this,"nativeInputChange",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.vegaSuggestionItemClick=i(this,"vegaSuggestionItemClick",7),this.suggestionItemClick=i(this,"suggestionItemClick",7),this.globalSlimmers={},this.ariaAttributesValueMapper=new J((()=>this.host.shadowRoot.querySelector("input")),{"aria-label":{dependency:["data-aria-label","label"],defaultValue:"No label defined"},"aria-hidden":{dependency:["data-aria-hidden"],defaultValue:null}}),this.dataTabIndexValueMapper=new Dt((()=>this.host.shadowRoot.querySelector("input"))),this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new c:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new a({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new r({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new l({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new p({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new tt:null},{propertyName:"type",ruleFactory:t=>"email"===t?new tt:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRenderer.getInputContainerRef(),touchableAreaGetter:()=>[this.inputRenderer.getInputRef()]}),this.pageResizeObserverSlimmer=new U({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.renderModeController=new Ot,this.copyPasteController=new et,this.compactWidthController=new ht,this.stateController=new ft,this.maskConfigController=new pt,this.valueController=new kt,this.prefixSlotRenderer=new nt,this.renderer=new Ct,this.inputContainerRenderer=new xt,this.inputRenderer=new wt,this.inputSuggestionsRenderer=new It,this.changeEventEmitter=y(Tt,R),this.nativeInputChangeEventEmitter=y(Tt,I),this.focusEventEmitter=y(Tt,S),this.blurEventEmitter=y(Tt,O),this.labelButtonClickEventEmitter=y(Tt,j),this.suggestionItemClickEventEmitter=y(Tt,z),this.pasteEventEmitter=y(Tt,D),this.vegaComponentUsageRuntimeMetricsSlimmer=new x(ct),this.passwordEyeRenderer=new vt,this.label="",this.labelSuffixButtonProps=null,this.labelSuffixButtonConfig=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.readOnly=!1,this.email=!1,this.required=!1,this.optional=!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){}watchSuggestionsDropdownSource(){}async doFocus(){}async doBlur(){}async showSuggestionsDropdown(t){}async hideSuggestionsDropdown(){}render(){return m(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 s(this)}static get watchers(){return{suffixText:["watchSuffixText"],value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"],suggestionsDropdownSource:["watchSuggestionsDropdownSource"]}}};Et([b()],Tt.prototype,"globalSlimmers",void 0),Et([v()],Tt.prototype,"ariaAttributesValueMapper",void 0),Et([v()],Tt.prototype,"dataTabIndexValueMapper",void 0),Et([v()],Tt.prototype,"formFieldController",void 0),Et([v()],Tt.prototype,"pageResizeObserverSlimmer",void 0),Et([v()],Tt.prototype,"renderModeController",void 0),Et([v()],Tt.prototype,"copyPasteController",void 0),Et([v()],Tt.prototype,"compactWidthController",void 0),Et([v()],Tt.prototype,"stateController",void 0),Et([v()],Tt.prototype,"maskConfigController",void 0),Et([v()],Tt.prototype,"valueController",void 0),Et([v()],Tt.prototype,"prefixSlotRenderer",void 0),Et([v()],Tt.prototype,"renderer",void 0),Et([v()],Tt.prototype,"inputContainerRenderer",void 0),Et([v()],Tt.prototype,"inputRenderer",void 0),Et([v()],Tt.prototype,"inputSuggestionsRenderer",void 0),Et([v()],Tt.prototype,"changeEventEmitter",void 0),Et([v()],Tt.prototype,"nativeInputChangeEventEmitter",void 0),Et([v()],Tt.prototype,"focusEventEmitter",void 0),Et([v()],Tt.prototype,"blurEventEmitter",void 0),Et([v()],Tt.prototype,"labelButtonClickEventEmitter",void 0),Et([v()],Tt.prototype,"suggestionItemClickEventEmitter",void 0),Et([v()],Tt.prototype,"pasteEventEmitter",void 0),Et([v()],Tt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Et([v()],Tt.prototype,"passwordEyeRenderer",void 0),Et([h()],Tt.prototype,"watchMaskChange",null),Tt.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));font-feature-settings:"calt" 0}@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{Tt as vega_input}
1
+ import{h as t,r as e,c as i,H as n,g as s}from"./p-6b2342e0.js";import{I as o}from"./p-abd7aeaa.js";import{M as a,a as r}from"./p-f0ff4463.js";import{M as l,a as p}from"./p-cdbbdcc2.js";import{R as c}from"./p-8bc15ed0.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 g,I as v}from"./p-6e1ab235.js";import{s as m}from"./p-6bd5c49b.js";import{V as x,I as b}from"./p-8ce9e214.js";import{F as w}from"./p-a488447f.js";import{c as y}from"./p-8fc0a820.js";import{a as C,C as j,V as k,d as R,K as I,L as S,M as O,N as z,O as D}from"./p-5447a8e8.js";import{S as E}from"./p-c34f4cbc.js";import{S as T}from"./p-96c090c4.js";import{i as V}from"./p-941a83db.js";import{S as M}from"./p-a306bb39.js";import{i as L}from"./p-d27ae9ff.js";import{d as N}from"./p-a841cf13.js";import{p as F,q as A,r as P,m as B}from"./p-4a2fe3a4.js";import{D as $,d as _}from"./p-36a57431.js";import{P as U}from"./p-81dd00d0.js";import{S as W}from"./p-5c3649f9.js";import{V as K}from"./p-6031bed1.js";import{c as q}from"./p-8387896e.js";import{C as H}from"./p-2d0d575f.js";import{F as G}from"./p-cb378636.js";import{C as X}from"./p-8187878e.js";import{V as Y}from"./p-6db1b9ac.js";import{A as J}from"./p-68744e7e.js";import{M as Q}from"./p-78a57a17.js";import"./p-262ec334.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-aa135628.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-f485448a.js";import"./p-cc569b54.js";import"./p-b75ee3ba.js";import"./p-71909102.js";import"./p-52b8f2d2.js";import"./p-8c30a60d.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-8663314e.js";import"./p-49a2e141.js";import"./p-ffdc25ec.js";import"./p-afcd8f04.js";const Z=/^(?:[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 tt extends o{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=Z.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 et 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 s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);o>3&&a&&Object.defineProperty(e,i,a)}([u()],et.prototype,"disableCopyPaste",void 0);var it=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class nt 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","aria-hidden":"true"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}it([u()],nt.prototype,"host",void 0),it([u()],nt.prototype,"prefixIcon",void 0);class st extends T{constructor(t=!1){super(),this.overrideValue=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),s=i.substring(0,e),o=(n.match(/,/g)||[]).length;return e+((s.match(/,/g)||[]).length-o)}}class ot extends T{constructor(t,e=!1){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.overrideValue=e,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(V(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 at extends T{constructor(t,e=!1,i=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e,this.overrideValue=i}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(V(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class rt extends ot{constructor(t,e=!1){super(t,e)}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),s=t.substring(0,e),o=n.substring(0,e),a=(s.match(/,/g)||[]).length;return e+((o.match(/,/g)||[]).length-a)-(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):"",s=Number(e.split(".")[0]);return!isNaN(s)&&s<=Number.MAX_SAFE_INTEGER?s.toLocaleString("en-US")+n:e}}var lt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class pt extends M{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=E.getPhoneMaskStrategy(e.overrideValue);break;case"taxId":i=E.getTaxIdMaskStrategy(e.overrideValue);break;case"zipcode":i=E.getZipcodeMaskStrategy(e.overrideValue);break;case"thousand-comma":i=new st(e.overrideValue);break;case"number":i=this.getNumberTypeMaskStrategy(e.options,e.overrideValue);break;case"custom":i=e.strategy?e.strategy():new E(e.options,e.overrideValue);break;case"custom-formatter":i=new at(e.formatter,e.resetCaretPosition,e.overrideValue)}return"number"!==this.type||"input"!==t||e||(i=new ot({},null==e?void 0:e.overrideValue)),i}getNumberTypeMaskStrategy(t,e=!1){return t&&t.thousandComma?new rt(t,e):new ot(t,e)}isBlurModeMaskConfig(t){return"blur"===t.trigger}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return L(i,n,!0,((t,e)=>N(t,e)?0:-1))}initSetupMaskConfigObserver(){$.addUniqueObserverToNode(this.host,F,this.setup.bind(this))}removeSetupMaskConfigObserver(){$.removeUniqueObserverFromNode(this.host,F)}}lt([u()],pt.prototype,"maskConfig",void 0),lt([u()],pt.prototype,"disableCopyPaste",void 0),lt([u()],pt.prototype,"type",void 0),lt([u()],pt.prototype,"inputRenderer",void 0),lt([g("connectedCallback")],pt.prototype,"connectedCallback",null),lt([g("disconnectedCallback")],pt.prototype,"disconnectedCallback",null),lt([g("watchValue")],pt.prototype,"watchValue",null),lt([g("watchMaskChange")],pt.prototype,"watchMaskChange",null),lt([g("watchTypeChange")],pt.prototype,"watchTypeChange",null);const ct=[{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 ht=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class dt 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}}ht([u()],dt.prototype,"host",void 0),ht([u()],dt.prototype,"value",void 0),ht([u()],dt.prototype,"placeholder",void 0),ht([u()],dt.prototype,"isCompactInputWidth",void 0),ht([u()],dt.prototype,"suffixText",void 0),ht([g("componentDidLoad")],dt.prototype,"componentDidLoad",null),ht([g("watchValue")],dt.prototype,"watchValue",null),ht([g("watchSuffixText")],dt.prototype,"watchSuffixText",null);var ut=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class ft extends W{constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"prefixText",parentStateName:"prefixText"},{subStateName:"suffixText",parentStateName:"suffixText"},{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}ut([u()],ft.prototype,"host",void 0),ut([u({writable:!0})],ft.prototype,"prefixText",void 0),ut([u({writable:!0})],ft.prototype,"suffixText",void 0),ut([u({writable:!0})],ft.prototype,"isCompactInputWidth",void 0);var gt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class vt extends f{render(){return t("vega-button-circle",{icon:K.getIconKey(this.isPasswordDisplay?"eye":"eye-slash"),variant:"icon-only",size:"small",class:"password-eye-button",ref:t=>{this.addEyeIconObserver(t)}})}addEyeIconObserver(t){$.addUniqueObserverToNode(t,C,(()=>{this.isPasswordDisplay=!this.isPasswordDisplay}))}}K.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>'}}),gt([u()],vt.prototype,"host",void 0),gt([u({writable:!0})],vt.prototype,"isPasswordDisplay",void 0),gt([u()],vt.prototype,"type",void 0);var mt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class xt 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=()=>{H.notify(_.getSubject(this.host,A),"")},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=()=>{H.notify(_.getSubject(this.host,P),{})}}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-disabled":this.disabled?"true":void 0,onKeyDown:q()},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:q(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}}mt([u()],xt.prototype,"host",void 0),mt([u()],xt.prototype,"value",void 0),mt([u()],xt.prototype,"size",void 0),mt([u()],xt.prototype,"disabled",void 0),mt([u()],xt.prototype,"type",void 0),mt([u()],xt.prototype,"showClearIcon",void 0),mt([u()],xt.prototype,"prefixText",void 0),mt([u()],xt.prototype,"suffixText",void 0),mt([u()],xt.prototype,"isCompactInputWidth",void 0),mt([u()],xt.prototype,"prefixSlotRenderer",void 0),mt([u()],xt.prototype,"passwordEyeRenderer",void 0),mt([u()],xt.prototype,"inputRenderer",void 0);var bt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class wt 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,enterkeyhint:this.enterkeyhint,readOnly:this.readOnly,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,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(){this.inputRef.value!==this.value&&this.nativeInputChangeEventEmitter.emit(this.inputRef.value),H.notify(_.getSubject(this.host,A),this.inputRef.value)}notifySetupMaskConfig(){H.notify(_.getSubject(this.host,F),{})}initInputFocusObserver(){$.addUniqueObserverToNode(this.host,P,this.focusInput.bind(this))}removeInputFocusObserver(){$.removeUniqueObserverFromNode(this.host,P)}focusInput(){this.inputRef.focus()}}bt([u()],wt.prototype,"host",void 0),bt([u()],wt.prototype,"value",void 0),bt([u()],wt.prototype,"disabled",void 0),bt([u()],wt.prototype,"type",void 0),bt([u()],wt.prototype,"name",void 0),bt([u()],wt.prototype,"autocomplete",void 0),bt([u()],wt.prototype,"inputmode",void 0),bt([u()],wt.prototype,"enterkeyhint",void 0),bt([u()],wt.prototype,"readOnly",void 0),bt([u()],wt.prototype,"placeholder",void 0),bt([u()],wt.prototype,"minLength",void 0),bt([u()],wt.prototype,"maxLength",void 0),bt([u()],wt.prototype,"isPasswordDisplay",void 0),bt([u()],wt.prototype,"valueUpdateTrigger",void 0),bt([u()],wt.prototype,"focusEventEmitter",void 0),bt([u()],wt.prototype,"blurEventEmitter",void 0),bt([u()],wt.prototype,"pasteEventEmitter",void 0),bt([u()],wt.prototype,"copyPasteController",void 0),bt([u()],wt.prototype,"nativeInputChangeEventEmitter",void 0),bt([g("connectedCallback")],wt.prototype,"connectedCallback",null),bt([g("disconnectedCallback")],wt.prototype,"disconnectedCallback",null),bt([g("doFocus")],wt.prototype,"doFocus",null),bt([g("doBlur")],wt.prototype,"doBlur",null);var yt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class Ct extends f{constructor(){super(...arguments),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()},this.handleLabelClick=()=>{H.notify(_.getSubject(this.host,P),{})}}render(){return t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),this.renderInputContainer(),this.renderHintDom())}renderInputContainer(){return this.renderModeController.isSource()||this.renderModeController.isTemplate()?this.inputSuggestionsRenderer.render(this.inputContainerRenderer.render()):this.inputContainerRenderer.render()}renderLabelDom(){return t("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label,optional:this.optional,suffixButtonProps:this.labelSuffixButtonProps,suffixButtonConfig:this.labelSuffixButtonConfig,ref:t=>{$.addUniqueObserverToNode(t,j,this.handleLabelButtonClick),$.addUniqueObserverToNode(t,C,this.handleLabelClick)}})}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}}yt([u()],Ct.prototype,"host",void 0),yt([u()],Ct.prototype,"disabled",void 0),yt([u()],Ct.prototype,"required",void 0),yt([u()],Ct.prototype,"label",void 0),yt([u()],Ct.prototype,"hint",void 0),yt([u()],Ct.prototype,"labelSuffixButtonProps",void 0),yt([u()],Ct.prototype,"labelSuffixButtonConfig",void 0),yt([u()],Ct.prototype,"optional",void 0),yt([u()],Ct.prototype,"labelButtonClickEventEmitter",void 0),yt([u()],Ct.prototype,"inputContainerRenderer",void 0),yt([u()],Ct.prototype,"inputSuggestionsRenderer",void 0),yt([u()],Ct.prototype,"renderModeController",void 0);var jt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class kt 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),H.notify(G,{host:this.host,detail:this.value})}initValueUpdateObserver(){$.addUniqueObserverToNode(this.host,A,this.setValue.bind(this))}removeValueUpdateObserver(){$.removeUniqueObserverFromNode(this.host,A)}setValue(t){this.value=t}}jt([u()],kt.prototype,"host",void 0),jt([u({writable:!0})],kt.prototype,"value",void 0),jt([u()],kt.prototype,"changeEventEmitter",void 0),jt([u()],kt.prototype,"inputRenderer",void 0),jt([g("connectedCallback")],kt.prototype,"connectedCallback",null),jt([g("disconnectedCallback")],kt.prototype,"disconnectedCallback",null),jt([g("watchValue")],kt.prototype,"watchValue",null);var Rt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class It extends f{constructor(){super(...arguments),this.templateItems=[],this.onDropdownItemClick=async t=>{const e=this.renderModeController.isTemplate()?this.templateItems:this.suggestionsDropdownSource,i=this.findItem(e,t.detail);if(i){const t=this.suggestionItemClickEventEmitter.emit(i);H.notify(_.getSubject(this.host,A),t.defaultPrevented?this.value:i.label)}}}appendHostItemsToDropdown(){this.renderModeController.isTemplate()&&this.itemsSlotRef&&this.dropdownRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(this.host.querySelector("[slot=items]")))}async showSuggestionsDropdown(t={}){this.suggestionsDropdownConfig=Object.assign(Object.assign(Object.assign({},Y),{placement:["top","bottom"]}),t),this.dropdownRef&&Object.assign(this.dropdownRef,this.suggestionsDropdownConfig),await this.showSuggestions()}async hideSuggestionsDropdown(){await this.dropdownRef.hide()}async watchValue(){await this.searchSuggestions()}async watchSuggestionsDropdownSource(){await this.searchSuggestions()}render(e){return t("vega-dropdown",Object.assign({},this.suggestionsDropdownConfig,{source:this.suggestionsDropdownSource,trigger:new X,matchTargetWidth:!0,searchable:!1,translocation:{X:0,Y:6},ref:t=>{this.dropdownRef=t,this.addDropdownObserver(t)},style:{display:"block"}}),e,this.renderItemsSlot())}renderItemsSlot(){return this.renderModeController.isTemplate()&&t("div",{slot:"items",ref:t=>{this.itemsSlotRef=t}})}addDropdownObserver(t){$.addUniqueObserverToNode(t,k,this.onDropdownItemClick.bind(this)),$.addUniqueObserverToNode(t,B,(t=>{this.templateItems=Array.from(t).map((t=>({key:t.itemKey,label:t.label})))}))}findItem(t,e){for(const i of t){if(i.children&&i.children.length>0){const t=this.findItem(i.children,e);if(t)return t}if(i.key.toString()===e)return i}return null}async showSuggestions(){this.dropdownRef&&(this.renderModeController.isSource()||this.renderModeController.isTemplate())&&await this.dropdownRef.show()}async searchSuggestions(){this.dropdownRef&&this.renderModeController.isSource()&&this.suggestionsDropdownSource.length>0&&await this.dropdownRef.search(this.value)}}Rt([u()],It.prototype,"host",void 0),Rt([u()],It.prototype,"value",void 0),Rt([u({writable:!0})],It.prototype,"suggestionsDropdownConfig",void 0),Rt([u()],It.prototype,"suggestionsDropdownSource",void 0),Rt([u()],It.prototype,"renderModeController",void 0),Rt([u()],It.prototype,"suggestionItemClickEventEmitter",void 0),Rt([g("componentDidLoad")],It.prototype,"appendHostItemsToDropdown",null),Rt([g("showSuggestionsDropdown")],It.prototype,"showSuggestionsDropdown",null),Rt([g("hideSuggestionsDropdown")],It.prototype,"hideSuggestionsDropdown",null),Rt([g("watchValue")],It.prototype,"watchValue",null),Rt([g("watchSuggestionsDropdownSource")],It.prototype,"watchSuggestionsDropdownSource",null);var St=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class Ot extends f{constructor(){super(...arguments),this.hasItemsSlot=!1}connectedCallback(){this.setRenderMode()}isSource(){return Array.isArray(this.suggestionsDropdownSource)}isTemplate(){return this.hasItemsSlot}setRenderMode(){this.hasItemsSlot=!!this.host.querySelector("[slot=items]")}}St([u()],Ot.prototype,"host",void 0),St([u()],Ot.prototype,"suggestionsDropdownSource",void 0),St([g("connectedCallback")],Ot.prototype,"connectedCallback",null);var zt=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};class Dt extends Q{constructor(t){super({options:{attributes:!0,attributeFilter:[Dt.OBSERVED_ATTRIBUTE]},callback:()=>{this.performMapping()}}),this.targetGetter=t}componentDidLoad(){this.performMapping(),super.componentDidLoad&&super.componentDidLoad()}componentDidRender(){this.performMapping()}performMapping(){const t=this.targetGetter?this.targetGetter():null;if(!t)return;const e=this.host.getAttribute(Dt.OBSERVED_ATTRIBUTE);if(this.shouldRemoveTabIndex(e))return void t.removeAttribute("tabindex");const i=String(e);t.getAttribute("tabindex")!==i&&t.setAttribute("tabindex",i)}shouldRemoveTabIndex(t){if(null==t)return!0;const e=String(t).trim().toLowerCase();return""===e||"null"===e||"undefined"===e}}Dt.OBSERVED_ATTRIBUTE="data-tabindex",zt([g("componentDidLoad")],Dt.prototype,"componentDidLoad",null),zt([g("componentDidRender")],Dt.prototype,"componentDidRender",null);var Et=function(t,e,i,n){var s,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o<3?s(a):o>3?s(e,i,a):s(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};const Tt=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaNativeInputChange=i(this,"vegaNativeInputChange",7),this.nativeInputChange=i(this,"nativeInputChange",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.vegaSuggestionItemClick=i(this,"vegaSuggestionItemClick",7),this.suggestionItemClick=i(this,"suggestionItemClick",7),this.globalSlimmers={},this.ariaAttributesValueMapper=new J((()=>this.host.shadowRoot.querySelector("input")),{"aria-label":{dependency:["data-aria-label","label"],defaultValue:"No label defined"},"aria-hidden":{dependency:["data-aria-hidden"],defaultValue:null}}),this.dataTabIndexValueMapper=new Dt((()=>this.host.shadowRoot.querySelector("input"))),this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new c:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new a({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new r({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new l({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new p({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new tt:null},{propertyName:"type",ruleFactory:t=>"email"===t?new tt:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRenderer.getInputContainerRef(),touchableAreaGetter:()=>[this.inputRenderer.getInputRef()]}),this.pageResizeObserverSlimmer=new U({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.renderModeController=new Ot,this.copyPasteController=new et,this.compactWidthController=new dt,this.stateController=new ft,this.maskConfigController=new pt,this.valueController=new kt,this.prefixSlotRenderer=new nt,this.renderer=new Ct,this.inputContainerRenderer=new xt,this.inputRenderer=new wt,this.inputSuggestionsRenderer=new It,this.changeEventEmitter=y(Tt,R),this.nativeInputChangeEventEmitter=y(Tt,I),this.focusEventEmitter=y(Tt,S),this.blurEventEmitter=y(Tt,O),this.labelButtonClickEventEmitter=y(Tt,j),this.suggestionItemClickEventEmitter=y(Tt,z),this.pasteEventEmitter=y(Tt,D),this.vegaComponentUsageRuntimeMetricsSlimmer=new x(ct),this.passwordEyeRenderer=new vt,this.label="",this.labelSuffixButtonProps=null,this.labelSuffixButtonConfig=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.readOnly=!1,this.email=!1,this.required=!1,this.optional=!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){}watchSuggestionsDropdownSource(){}async doFocus(){}async doBlur(){}async showSuggestionsDropdown(t){}async hideSuggestionsDropdown(){}render(){return m(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 s(this)}static get watchers(){return{suffixText:["watchSuffixText"],value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"],suggestionsDropdownSource:["watchSuggestionsDropdownSource"]}}};Et([b()],Tt.prototype,"globalSlimmers",void 0),Et([v()],Tt.prototype,"ariaAttributesValueMapper",void 0),Et([v()],Tt.prototype,"dataTabIndexValueMapper",void 0),Et([v()],Tt.prototype,"formFieldController",void 0),Et([v()],Tt.prototype,"pageResizeObserverSlimmer",void 0),Et([v()],Tt.prototype,"renderModeController",void 0),Et([v()],Tt.prototype,"copyPasteController",void 0),Et([v()],Tt.prototype,"compactWidthController",void 0),Et([v()],Tt.prototype,"stateController",void 0),Et([v()],Tt.prototype,"maskConfigController",void 0),Et([v()],Tt.prototype,"valueController",void 0),Et([v()],Tt.prototype,"prefixSlotRenderer",void 0),Et([v()],Tt.prototype,"renderer",void 0),Et([v()],Tt.prototype,"inputContainerRenderer",void 0),Et([v()],Tt.prototype,"inputRenderer",void 0),Et([v()],Tt.prototype,"inputSuggestionsRenderer",void 0),Et([v()],Tt.prototype,"changeEventEmitter",void 0),Et([v()],Tt.prototype,"nativeInputChangeEventEmitter",void 0),Et([v()],Tt.prototype,"focusEventEmitter",void 0),Et([v()],Tt.prototype,"blurEventEmitter",void 0),Et([v()],Tt.prototype,"labelButtonClickEventEmitter",void 0),Et([v()],Tt.prototype,"suggestionItemClickEventEmitter",void 0),Et([v()],Tt.prototype,"pasteEventEmitter",void 0),Et([v()],Tt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Et([v()],Tt.prototype,"passwordEyeRenderer",void 0),Et([d()],Tt.prototype,"watchMaskChange",null),Tt.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));font-feature-settings:"calt" 0}@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{Tt as vega_input}
@@ -0,0 +1 @@
1
+ import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-36a57431.js";import{e as s,f as n}from"./p-4a2fe3a4.js";import{d as r,c as i}from"./p-02841589.js";import{L as o}from"./p-6e1ab235.js";import{i as c}from"./p-941a83db.js";import{T as a}from"./p-b438e68b.js";import{g as l}from"./p-8b5d3a52.js";import{V as u}from"./p-5b3c8a56.js";import{c as h}from"./p-a841cf13.js";import{f as d}from"./p-aa135628.js";var f,p;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(f||(f={}));class w{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT",t.LIST="LIST",t.INTERNAL_WRAPPER="INTERNAL_WRAPPER"}(p||(p={}));class g extends w{}const m=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap,this.contentEntityToRootDom=new Map,this.rootDomToContentEntity=new WeakMap}register(t,e){this.isVegaRTEContent(e)?this.registerRootDomAndContentEntity(t,e):(this.domToEntity.set(t,e),this.entityToDOM.set(e,t))}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.isVegaRTEContent(t)?this.contentEntityToRootDom.get(t):this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}registerRootDomAndContentEntity(t,e){const s=this.rootDomToContentEntity.get(t);s&&s!==e&&this.contentEntityToRootDom.delete(s),this.rootDomToContentEntity.set(t,e),this.contentEntityToRootDom.set(e,t)}isVegaRTEContent(t){return t&&"VegaRTEContent"===t.dtoName}};var x,S,A,y;!function(t){t.DELETE_CHILDREN="DELETE_CHILDREN",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILDREN="APPEND_CHILDREN",t.INSERT_CHILDREN_AFTER="INSERT_CHILDREN_AFTER",t.INSERT_CHILDREN_BEFORE="INSERT_CHILDREN_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.INSERT_NEW_PARAGRAPH="INSERT_NEW_PARAGRAPH",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.NEST_LIST_ITEMS="NEST_LIST_ITEMS",t.UNNEST_LIST_ITEMS="UNNEST_LIST_ITEMS",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK",t.UNLINK_LINK_GROUP="UNLINK_LINK_GROUP",t.LINK_GROUP_NODE_SPLIT="LINK_GROUP_NODE_SPLIT",t.DELETE_LINK_GROUP="DELETE_LINK_GROUP",t.UPDATE_CURSOR_POSITION="UPDATE_CURSOR_POSITION",t.INSERT_TEXT_TO_DECORATOR_NODE="INSERT_TEXT_TO_DECORATOR_NODE",t.INSERT_NODE_TO_NEAREST_ROOT="INSERT_NODE_TO_NEAREST_ROOT",t.PASTE_CONTENT="PASTE_CONTENT",t.DELETE_SELECTED_CONTENT="DELETE_SELECTED_CONTENT"}(x||(x={}));class O{constructor(){this.isFlushable=!1}}function T(t){const e={},s=t.getAttribute("style");if(!s)return e;const n=function(t){const e=[];let s="",n=0;for(let r=0;r<t.length;r++){const i=t[r];"("===i?(n++,s+=i):")"===i?(n--,s+=i):";"===i&&0===n?(e.push(s),s=""):s+=i}return s&&e.push(s),e}(s);for(const t of n){const s=t.trim(),n=s.indexOf(":"),i=s.substring(0,n).trim(),o=s.substring(n+1).trim();e[r(i)]=o}return e}function E(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function v(t){return E(t).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function N(t){return t.replace(/&(?!(?:[a-zA-Z][a-zA-Z0-9]+|#[0-9]+|#x[a-fA-F0-9]+);)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}class b{constructor(){this.classNameToBeAdded=""}filterAnnotations(t){const e=t.customStyle;return e?(this.extractAndDeleteMatchedStyles(e),0===Object.keys(e).length&&delete t.customStyle,t):t}filterAndDeleteStyles(t,e,s){const n=new Set(e);return this.extractAndDeleteMatchedStyles(t)&&this.classNameToBeAdded&&n.add(this.classNameToBeAdded),{styles:t,classNames:Array.from(n)}}refillStyles(t){this.classNameToBeAdded&&t.classList.remove(this.classNameToBeAdded);const e=T(t),s=Object.assign(Object.assign({},this.stylesToBeFiltered),e),n=Object.entries(Object.assign({},s)).map((([t,e])=>`${i(t)}: ${e};`)).join("");t.setAttribute("style",n)}canFilter(t){return!1}canRefill(t,e){return!1}toCssText(){return""}get alwaysFilter(){return!1}extractAndDeleteMatchedStyles(t){let e=!1;const s=this.stylesToBeFiltered;if(t&&s){const n=Object.keys(s);for(const r of n)t[r]===s[r]&&(delete t[r],e=!0)}return e}buildCssTextForStyles(t,e){return`${`.${b.RTE_CONTENT_CONTAINER_CLASS_NAME}`+(e?` .${e}`:` ${t}`)} { ${Object.entries(this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")} }`}convertStylesMapToCssText(t){return Object.entries(t||this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}isBlockOrNodeStylesMatchFilterStyles(t,e){const s=t.getStyles({standalone:!0});return this.isMatchFilterStyles(s,e)}isMatchFilterStyles(t,e){return(e&&e.length>0?e:Object.keys(this.stylesToBeFiltered)).every((e=>t[e]===this.stylesToBeFiltered[e]))}}b.RTE_CONTENT_CONTAINER_CLASS_NAME="vega-rte-content",function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK",t.INLINE_HTML="INLINE_HTML",t.PLAIN_TEXT="PLAIN_TEXT"}(S||(S={}));class C extends w{}class L{static isTextBlock(t){return t===this.RTE_TEXT_BLOCK_CLASS_NAME}static isCodeBlock(t){return"RTECodeBlock"===t}static isListBlock(t){return"RTEListBlock"===t}static isListItemBlock(t){return"RTEListItemBlock"===t}static isTextNode(t){return t===this.RTE_TEXT_NODE_CLASS_NAME}static isLinkNode(t){return this.isTextNode(t.dtoName)&&!!t.getAnnotationByType(S.LINK)}static isCodeNode(t){if(this.isTextNode(t.dtoName)){const e=t.getAnnotationByType(S.CODE);return!!e&&e.code}return!1}static isImageNode(t){return"RTEImageNode"===t.dtoName}static isCodeBlockNode(t){return"RTECodeBlockNode"===t.dtoName}}L.RTE_TEXT_NODE_CLASS_NAME="RTETextNode",L.RTE_TEXT_BLOCK_CLASS_NAME="RTETextBlock";class R extends b{constructor(){super(...arguments),this.stylesToBeFiltered=k.getDefaultStyles(),this.elementTagName="a"}filterAnnotations(t){const e=t.link;return(null==e?void 0:e.customStyle)?(this.extractAndDeleteMatchedStyles(e.customStyle),0===Object.keys(e.customStyle).length&&delete e.customStyle,t):t}canFilter(t){return L.isLinkNode(t)}canRefill(t,e){return"RTETextNode"===t&&e.matches(this.elementTagName)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}filterLinkGroupInlineStyles(t){const e=t.style,s=t.class?t.class.split(" "):[],n=this.filterAndDeleteStyles(e,s);return n.styles&&Object.keys(n.styles).length>0&&(t.style=n.styles),n.classNames&&n.classNames.length>0&&(t.class=n.classNames.join(" ")),t.style&&0===Object.keys(t.style).length&&delete t.style,t}}class k extends w{constructor(t){super(),this.type=f.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}static getDefaultStyles(){return{color:"rgba(var(--v-text-link, 19, 98, 226, 1))"}}clone(){const t=new k("");return this.linkGroups.forEach(((e,s)=>{t.linkGroups.set(s,e.map((t=>t.clone(t.parent))))})),t}toString(t,e){let s=this.toJsx(t,e);return(null==e?void 0:e.filterInlineStyles)&&(s=k.linkGroupFilterStylesStrategy.filterLinkGroupInlineStyles(s)),Object.entries(s).map((([t,e])=>{const s="string"==typeof e?e:this.formatStyleToString(e);return`${i(t)}="${s}"`})).join(" ")}toJsx(t,e){const s=this.getStyle(t,e),n=this.getClass(t,e),r=this.getAttribute(t);return n.length>0&&(r.class=n.join(" ")),s&&Object.keys(s).length>0&&(r.style=s),r}getClass(t,e){const s=[];return t.link.customClass&&s.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&s.push("v-rte--link"),s}getStyle(t,e){const s={};return t.link.customStyle&&Object.assign(s,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&Object.assign(s,k.getDefaultStyles()),s}getAttribute(t){const{href:e,customAttribute:s={}}=t.link,n=t.useInternalStyle,r=s.target||(n?"_blank":"");return Object.assign(Object.assign(Object.assign({},s),e||n?{href:e}:{}),r?{target:r}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}}k.linkGroupFilterStylesStrategy=new R;class j extends g{constructor(t){super(),this.type=p.ALIGNMENT,this.textAlign=t}static from(t){return[p.ALIGNMENT,new j(t)]}static getDefaultStyles(t){switch(t){case"right":case"center":case"justify":return{textAlign:t};case"left":default:return{textAlign:"left"}}}toJSON(){return{textAlign:this.textAlign}}renderClass(t){if(null==t?void 0:t.standalone)return null;switch(this.textAlign){case"right":case"center":case"justify":return`v-rte--horizontal-alignment-${this.textAlign}`;case"left":default:return"v-rte--horizontal-alignment-left"}}clone(){return new j(this.textAlign)}renderStyle(t){return(null==t?void 0:t.standalone)?j.getDefaultStyles(this.textAlign):null}}class _ extends g{constructor(t){super(),this.type=p.INDENT,this.indent=Math.max(0,t)}static from(t){return[p.INDENT,new _(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new _(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class ${static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).has(t)||this.registry.get(e).set(t,new Set),this.registry.get(e).get(t).add(s)}static unregister(t,e,s){const n=this.registry.get(e);if(n){const e=n.get(t);e&&e.delete(s)}}static get(t,e){const s=t instanceof O?t.type:t.constructor.name,n=this.registry.get(e.constructor.name);if(n){const r=n.get(s);if(r&&r.size>0)return Array.from(r).find((s=>s.canIntercept(t,e)))}}}$.registry=new Map;class I{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,s)}static unregister(t,e){const s=this.registry.get(e);s&&s.delete(t)}static get(t,e){const s=this.registry.get(e);if(s)return s.get(t)}static executeTheStrategy(t,e){const s=$.get(t,e),n=()=>{const s=t instanceof O?t.type:t.constructor.name,n=I.get(s,e.constructor.name);if(n)return t.executedFlag=!0,n.execute(t,e);o.warn(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)};return s?s.intercept(n,t,e):n()}static canHandle(t,e){return!!I.get(t,e.constructor.name)}}I.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(A||(A={}));class B extends w{}class D extends B{constructor(t){super(),this.type=A.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[A.CUSTOM_ATTRIBUTE,new D(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new D(this.customAttribute)}toString(t=[]){const e=t.map((t=>t.split("=")[0]));return Object.keys(this.customAttribute).map((t=>e.includes(t)?null:`${t}="${this.customAttribute[t]}"`)).filter(c)}render(t={}){var e;const s=Object.assign({},this.customAttribute);return null===(e=t.filterAttributes)||void 0===e||e.forEach((t=>delete s[t])),Object.keys(s).forEach((t=>{this.BOOLEAN_ATTRS.has(t)&&""===s[t]&&(s[t]="true")})),s}}class M extends B{constructor(t){super(),this.type=A.CUSTOM_CLASS,this.customClass=t}static from(t){return[A.CUSTOM_CLASS,new M(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new M(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class P extends B{constructor(t){super(),this.type=A.CUSTOM_STYLE,this.customStyle=t}static from(t){return[A.CUSTOM_STYLE,new P(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new P(this.customStyle)}renderStyle(){return this.customStyle}removeStyles(t){const e=Object.assign({},this.customStyle);return t.forEach((t=>delete e[t])),e}toString(){return`style="${N(Object.entries(this.customStyle).map((([t,e])=>`${t}: ${e};`)).join(" "))}"`}}class F extends g{constructor(t){super(),this.type=p.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[p.INTERNAL_WRAPPER,new F(t)]}clone(){return new F(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class H{constructor(t){this.dtoName=t instanceof W?"block":"node",this.annotationMap=t.annotationMap}toCssText(t={standalone:!1},e,s){return s=s||this.toJSON(t,e),Object.entries(Object.assign({},s)).map((([t,e])=>`${i(t)}: ${e};`)).join("")}toJSON(t={standalone:!1},e){const s=Array.from(this.annotationMap.values()).filter((t=>this.filterAnnotation(t)||t instanceof P)).map((e=>e.renderStyle(t))).filter(c);return e&&e.length>0?this.mergeAnnotationStyles(s,e):s.reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})}filterAnnotation(t){return"block"===this.dtoName?t instanceof g:t instanceof C}mergeAnnotationStyles(t,e){const s={};for(const n of t)for(const t in n){const r=n[t],i=s[t];s[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return s}}class J{static register(t,e){var s;const n=null!==(s=this.registry.get(t))&&void 0!==s?s:new Set;n.add(e),this.registry.set(t,n)}static getStrategies(t){var e;return Array.from(null!==(e=this.registry.get(t))&&void 0!==e?e:[])}static executeTheStrategyFilterAction(t,e,s){return this.getStrategies(t.dtoName).filter((e=>e.canFilter(t))).reduce(((e,s)=>s.filterAndDeleteStyles(e.styles,e.classNames,t)),{styles:e,classNames:s})}static executeTheStrategyRefillAction(t,e){this.getStrategies(t).filter((s=>s.canRefill(t,e))).forEach((t=>{t.refillStyles(e)}))}static generateAllStylesContent(t=!1){const e=[];return t&&(e.push("/* Font-face imports begin */\n"),e.push(Object.keys(a).map((t=>`@import url('${a[t].url}');\n`)).join(" ")),e.push("/* Font-face imports end */\n")),this.registry.forEach((t=>{t.forEach((t=>{const s=t.toCssText();s&&!e.includes(s)&&e.push(s)}))})),e.join(" ")}}J.registry=new Map,function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(y||(y={}));class K{constructor(t,e){this.annotationMap=new Map,this.dtoName=this.constructor.name,this.id=t,e&&(this.annotationMap=e)}static from(t,e,s){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}, ${s}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return D.from(e);case"customClass":return M.from(e);case"customStyle":return P.from(e)}}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}getStyles(t={standalone:!1}){return new H(this).toJSON(t,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof C||t instanceof M)).map((e=>e.renderClass(t))).filter(c).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(A.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getPlainText(){return""}getElementRef(){return m.getDOMByEntity(this)}generateAttributeString(t,...e){var s;const n=new H(this),r=n.toJSON({standalone:!0},["textDecoration"]),i=this.annotationMap.get(A.CUSTOM_CLASS);let o=r,a=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=J.executeTheStrategyFilterAction(this,r,a);o=t.styles,a=t.classNames}const l=[...(null===(s=this.getCustomAttributesAnnotation())||void 0===s?void 0:s.toString(e))||[],a&&a.length>0?`class="${a.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${N(n.toCssText({standalone:!0},void 0,o))}"`:null,...e].filter(c);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof O?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const n=m.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}doAnnotationActionApply(t){}doModifyActionApply(t){}}const U=new class{constructor(){this.RTE_BLOCK_DTO_CLASS_MAP=new Map,this.RTE_NODE_DTO_CLASS_MAP=new Map}registerRTEDTOClass(t,e){if(e.prototype instanceof W)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof K))throw new Error(`Invalid RTE DTO class type: ${t}`);this.RTE_NODE_DTO_CLASS_MAP.set(t,e)}}getRTEBlockClass(t){return this.RTE_BLOCK_DTO_CLASS_MAP.get(t)}getRTENodeClass(t){return this.RTE_NODE_DTO_CLASS_MAP.get(t)}};class W{constructor(t){this.annotationMap=new Map,this.dtoName=this.constructor.name,this.id=t}static from(t,e){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}) is not implemented. Please implement this method in the subclass.`)}static generateBlockChildren(t,e,s){return t.map((t=>{const n=U.getRTEBlockClass(t.type);if(n){const r=n.from(t,e);return r.parent=s,r}})).filter(c)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return j.from(e);case"indent":return _.from(e);case"customAttribute":return D.from(e);case"customClass":return M.from(e);case"customStyle":return P.from(e);case"internalWrapper":return F.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,s])=>{const n=this.createAnnotationEntity(e,s);c(n)&&t.set(...n)}))}shouldRenderAsInternalWrapper(){const t=this.getAnnotationByType(p.INTERNAL_WRAPPER);return!!t&&t.internalWrapper&&0===Array.from(this.annotationMap.values()).filter((t=>!(t instanceof k||t instanceof F))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof g||t instanceof B)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(n){if(this.doApply(n),n.isFlushable){const n=m.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}allowsCaretDescend(){return!0}getFirstNode(){if(!this.children||!this.children[0])return null;const t=this.children[0];return t instanceof W?t.getFirstNode():t}getPlainText(){var t;return(null!==(t=this.children)&&void 0!==t?t:[]).map((t=>t.getPlainText())).join("")}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){const e=new H(this).toJSON(t);return Object.assign(Object.assign({},e),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof g||t instanceof M)).map((e=>e.renderClass(t))).filter(c).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(A.CUSTOM_ATTRIBUTE)}generateAttributeString(t,...e){var s;const n=new H(this),r=n.toJSON({standalone:!0}),i=this.annotationMap.get(A.CUSTOM_CLASS);let o=r,a=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=J.executeTheStrategyFilterAction(this,r,a);o=t.styles,a=t.classNames}const l=[...(null===(s=this.getCustomAttributesAnnotation())||void 0===s?void 0:s.toString(e))||[],a&&a.length>0?`class="${a.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${N(n.toCssText({standalone:!0},void 0,o))}"`:null,...e].filter(c);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof O?I.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();if(e instanceof k||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply)this.doAnnotationActionApply(t);else{const e=I.get(t.constructor.name,this.constructor.name);e&&e.execute(t,this)}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}class z{}class G extends z{constructor(){super(...arguments),this.doSplit=!0}}class V extends w{constructor(t){super(),this.type=f.SELECTION_RANGE,this.range=t}clone(){return new V(this.range)}}const X="700",q="bold",Y="italic",Z="underline",Q="line-through";class tt extends C{constructor(t){super(),this.type=S.STRIKETHROUGH,this.strikethrough=t}static from(t){return[S.STRIKETHROUGH,new tt(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new tt(this.strikethrough)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.strikethrough?"v-rte--strikethrough":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.strikethrough?{textDecoration:"line-through"}:null}}class et extends C{constructor(t){super(),this.type=S.UNDERLINE,this.underline=t}static from(t){return[S.UNDERLINE,new et(t)]}toJSON(){return{underline:this.underline}}clone(){return new et(this.underline)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.underline?"v-rte--underline":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.underline?{textDecoration:"underline"}:null}}class st extends C{constructor(t){super(),this.type=S.ITALIC,this.italic=t}static from(t){return[S.ITALIC,new st(t)]}toJSON(){return{italic:this.italic}}clone(){return new st(this.italic)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.italic?"v-rte--italic":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.italic?{fontStyle:"italic"}:null}}class nt extends C{constructor(t){super(),this.type=S.BOLD,this.bold=t}static from(t){return[S.BOLD,new nt(t)]}toJSON(){return{bold:this.bold}}clone(){return new nt(this.bold)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.bold?"v-rte--bold":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.bold?{fontWeight:"700"}:null}}class rt extends C{constructor(t,e=!0){super(),this.type=S.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[S.CODE,new rt(t,e)]}static getDefaultStyles(){return{fontFamily:"Roboto Mono",whiteSpace:"pre-wrap"}}toJSON(){return{code:this.code}}clone(){return new rt(this.code,this.useInternalStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.code&&this.useInternalStyle?"v-rte--code":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.code&&this.useInternalStyle?rt.getDefaultStyles():null}}const it={key:"black",light:"#111128",dark:"#E3E3E8"},ot=[it,{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],ct="​";var at;!function(t){t.Default="default",t.Composition="composition"}(at||(at={}));const lt="__updateSource",ut=[{key:"title"},{key:"subtitle"},{key:"heading-1"},{key:"heading-2"},{key:"heading-3"},{key:"paragraph"}],ht=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]],dt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ft=22,pt="url",wt="email",gt=["url","email"],mt="data-vega-rte-block-boundary",xt="application/x-vega-rte-paste-mode",St="word",At="rte-word-count";class yt extends C{constructor(t){super(),this.type=S.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[S.TEXT_COLOR,new yt(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new yt(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:u.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return ot.find((e=>e.key===t))||ot[0]}}class Ot extends C{constructor(t,e=!0){super(),this.type=S.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[S.LINK,new Ot(t,e)]}toJSON(){return{link:this.link}}clone(){return new Ot(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class Tt extends z{constructor(t,e,s){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=s}toAnnotation(){return new k(this.groupKey)}}class Et extends z{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class vt{execute(t,e){return o.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}updateCustomStyleAnnotation(t,e){const s=t.annotationMap.get(A.CUSTOM_STYLE);s&&this.isCustomStyle(s,e)&&t.annotationMap.set(s.type,new P(s.removeStyles(e)))}createNewParagraph(t){const e=U.getRTEBlockClass("paragraph");if(e)return e.from({id:l(),type:"paragraph",nodes:[{id:l(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.dtoName?e:this.getRootContent(e)}isCaretPositionAtBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtBlockEnd(t,e,s){return e.isContentEditable()?this.isCaretPositionAtTextBlockEnd(t,e,s):this.isCaretPositionAtDecoratorBlockEnd(t,e,s)}getDOMByEntity(t){return m.getDOMByEntity(t)}isCaretPositionAtTextBlockEnd(t,e,s){const n=t.children[t.children.length-1];return e===n&&(e.isEmpty()||s===n.text.length)}isCaretPositionAtDecoratorBlockEnd(t,e,s){return e===t.children[t.children.length-1]&&0!==s}isCustomStyle(t,e){return e.some((e=>Object.keys(t.customStyle).includes(e)))}}class Nt extends O{constructor(t){super(),this.type=x.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class bt extends vt{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(f.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof G&&t.doSplit&&s){const{startContainer:t,endContainer:n,startOffset:r,endOffset:i}=s.range,o=t===n&&r===i;e.parent.children=e.parent.children.flatMap((t=>{if(t.id===e.id){if(o)return this.insertNewNode(r,e);if(this.shouldSplitSelection(s.range)&&e.isContentEditable()){const n=this.splitTextNode(s.range,e);return t.annotationMap.has("LINK")&&t.apply(new Nt(n)),n}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const s=e.cloneWithText("");this.setApplyTargetNode(s);const n=e.parent.children.findIndex((t=>t===e));return 0===t||!e.isContentEditable()&&t===n?[s,e]:t===e.text.length||!e.isContentEditable()&&t===n+1?[e,s]:[e.cloneWithText(e.text.substring(0,t)),s,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:s,startOffset:n,endOffset:r}=t;return e!==s||n>0||r<(s.textContent?s.textContent.length:0)}splitTextNode(t,e){const{startContainer:s,endContainer:n,startOffset:r}=t,i=s.parentElement,o=n.parentElement,c=(t,s,n)=>{const r=t.substring(0,s),i=t.substring(s,n),o=t.substring(n);return[e.cloneWithText(r),e.cloneWithText(i),e.cloneWithText(o)]},a=i&&m.getEntityByDOM(i),l=o&&m.getEntityByDOM(o);if(a&&a.id===e.id){const i=s===n?t.endOffset:e.text.length,[o,a,l]=c(e.text,r,i);return this.setApplyTargetNode(a),[o,a,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[s,n,r]=c(e.text,0,t.endOffset);return this.setApplyTargetNode(n),[s,n,r].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}class Ct extends G{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new nt(this.bold)}}class Lt extends w{constructor(){super(...arguments),this.type=f.CLEAR_FORMATTING,this.items=[S.BOLD,S.ITALIC,S.UNDERLINE,S.STRIKETHROUGH,S.TEXT_COLOR,S.CODE,A.CUSTOM_STYLE]}}class Rt extends G{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Lt}}class kt extends G{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new rt(this.code)}}class jt extends z{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class _t extends G{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new st(this.italic)}}class $t extends G{constructor({link:t,newText:e,needMergeNode:s,doSplit:n,type:r}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=s,this.newText=e,this.type=r,c(n)&&(this.doSplit=n)}toAnnotation(){return new Ot(this.link)}}class It extends G{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new tt(this.strikethrough)}}class Bt extends G{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new et(this.underline)}}class Dt extends vt{handleAction(t,e){const s=t.toAnnotation();if(t instanceof jt)e.annotationMap.delete(t.annotationType);else{if(!(s instanceof Lt))return s instanceof C||s instanceof V?(t instanceof $t&&(c(t.newText)&&(e.text=t.newText),e.parent.apply(new Tt(t.link.groupKey,[e],t.type))),t instanceof kt&&this.handleAction(new Rt,e),t instanceof Ct&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof _t&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof Bt||t instanceof It)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(s.type,s)):void 0;s.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class Mt extends O{constructor(){super(...arguments),this.type=x.DELETE_LINK_GROUP}}class Pt extends vt{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new Mt)}}class Ft extends O{constructor(t){super(),this.type=x.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class Ht extends vt{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,s){if(e&&e.startContainer&&e.endContainer){const{startContainer:n,endContainer:r,startOffset:i,endOffset:o}=e;let c=s.text;if(n===r&&i===o&&t)c=s.text.slice(0,i)+t+s.text.slice(i);else{const e=n.parentElement,a=r.parentElement,l=e&&m.getEntityByDOM(e),u=a&&m.getEntityByDOM(a);let h=0,d=s.text.length;l&&l===s?(h=i,d=n===r?o:d):u&&u===s&&(d=o),c=s.text.slice(0,h)+t+s.text.slice(d)}s.apply(new Ft(c))}}}class Jt extends w{constructor(t){super(),this.type=S.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:s,customStyle:n,customClass:r,customAttribute:i}=t,o=new Jt(e);return o.groupId=t.groupId,o.child=s?Jt.from(s)[1]:void 0,o.customAttribute=i?D.from(i)[1]:void 0,o.customClass=r?M.from(r)[1]:void 0,o.customStyle=n?P.from(n)[1]:void 0,[S.INLINE_HTML,o]}clone(){var t,e,s,n;const r=new Jt(this.htmlTag);return r.groupId=this.groupId,r.child=null===(t=this.child)||void 0===t?void 0:t.clone(),r.customAttribute=null===(e=this.customAttribute)||void 0===e?void 0:e.clone(),r.customClass=null===(s=this.customClass)||void 0===s?void 0:s.clone(),r.customStyle=null===(n=this.customStyle)||void 0===n?void 0:n.clone(),r}renderProps(){var t,e,s;return Object.assign(Object.assign({},null===(t=this.customAttribute)||void 0===t?void 0:t.render()),{style:null===(e=this.customStyle)||void 0===e?void 0:e.renderStyle(),class:null===(s=this.customClass)||void 0===s?void 0:s.renderClass().join(" ")})}toJSON(){var t,e,s,n;return{inlineHtml:h({htmlTag:this.htmlTag,groupId:this.groupId,child:null===(t=this.child)||void 0===t?void 0:t.toJSON().inlineHtml,customAttribute:null===(e=this.customAttribute)||void 0===e?void 0:e.toJSON().customAttribute,customClass:null===(s=this.customClass)||void 0===s?void 0:s.toJSON().customClass,customStyle:null===(n=this.customStyle)||void 0===n?void 0:n.toJSON().customStyle})}}}class Kt extends vt{handleAction(t,e){const s=e.parent.getAnnotationByType(f.LINK_GROUP);if(s){const n=e.annotationMap.get("LINK").link.groupKey,r=s.linkGroups.get(n);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),s.linkGroups.set(n,r))}}}}class Ut extends vt{handleAction(t,e){const s=e.parent.getAnnotationByType(f.LINK_GROUP);if(s){const t=e.annotationMap.get(S.LINK).link.groupKey,n=s.linkGroups.get(t);if(n){const r=n.indexOf(e);-1!==r&&n.splice(r,1),0===n.length&&s.linkGroups.delete(t),0===s.linkGroups.size&&e.parent.annotationMap.delete(f.LINK_GROUP)}}e.annotationMap.delete(S.LINK)}}class Wt extends C{constructor(t){super(),this.type=S.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[S.PLAIN_TEXT,new Wt(t)]}clone(){return new Wt(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class zt extends G{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new yt(this.textColor)}}class Gt extends K{constructor(t,e,s,n){super(t,n),this.dtoName=Gt.dtoName,this.type=y.TEXT,this.parent=s,this.text=e,this.registerModifyStrategy()}static supportsHtmlTag(t){return["span","code"].includes(t)}static from(t,e,s={autoMatchFormat:!0}){const n=new Gt(t.id,t.text,e),{annotations:r}=t;return r&&(n.annotationMap=this.generateTextAnnotationMap(r,s,e,n)),n}static generateTextAnnotationMap(t,e,s,n){return new Map(Object.keys(t).map((r=>("link"===r&&t.link&&s&&n&&s.apply(new Tt(t.link.groupKey,[n],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(c))}static createAnnotationEntity(t,e,s){const n=!(!s||!s.autoMatchFormat);switch(t){case"bold":return nt.from(e);case"italic":return st.from(e);case"underline":return et.from(e);case"strikethrough":return tt.from(e);case"code":return rt.from(e,n);case"textColor":return yt.from(e);case"link":return Ot.from(e,n);case"inlineHtml":return Jt.from(e);case"plainText":return Wt.from(e)}return K.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof C||t instanceof B||t instanceof Jt)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}toHtml(t){const e=this.getAnnotationByType(S.INLINE_HTML);return e?this.renderWithWrapperStr(e,t):this.renderTextStr(t)}cloneWithText(t){return new Gt(l(),t,this.parent,super.cloneAnnotations())}clone(t){return new Gt(this.id,this.text,t,super.cloneAnnotations())}isEmpty(){return!(this.getAnnotationByType(S.INLINE_HTML)||this.text&&"​"!==this.text&&"\n"!==this.text)}isTextNode(){return!0}getRangeEndOffset(){return!this.isContentEditable()&&this.parent?this.parent.children.indexOf(this)+1:"\n"===this.text?0:this.text.length}getRangeContainer(){const t=this.getElementRef();if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}getPlainText(){return this.text}getInlineHtmlTagAtDepth(t){const e=this.getInlineHtmlAnnotationAtDepth(t);return e?dt.has(e.htmlTag)?null:{htmlTag:e.htmlTag,attrStr:this.annotationAttrStr(e),groupId:e.groupId,annotation:e}:null}renderHtmlFromDepth(t,e){if(0===t)return this.toHtml(e);const s=this.getInlineHtmlAnnotationAtDepth(t);return s?this.renderWithWrapperStr(s,e):this.renderTextStr(e)}getInlineHtmlAnnotationAtDepth(t){let e=this.getAnnotationByType(S.INLINE_HTML);for(let s=0;s<t&&e;s++)e=e.child;return e}registerModifyStrategy(){const t=this.constructor.name;Gt.registerActionStrategyStatus[t]||(this.isContentEditable()&&(I.register(x.UPDATE_TEXT,t,new Pt),I.register(x.REPLACE_SELECTED_TEXT,t,new Ht),I.register(x.LINK_GROUP_NODE_SPLIT,t,new Kt),I.register($t.name,t,new Dt)),I.register(G.name,t,new bt),I.register(x.DELETE_LINK_GROUP,t,new Ut),I.register(Ct.name,t,new Dt),I.register(Rt.name,t,new Dt),I.register(_t.name,t,new Dt),I.register(Bt.name,t,new Dt),I.register(zt.name,t,new Dt),I.register(It.name,t,new Dt),I.register(kt.name,t,new Dt),I.register(z.name,t,new Dt),Gt.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(f.SELECTION_RANGE);if(t instanceof G&&t.doSplit&&e){const e=I.get(G.name,this.constructor.name);if(e){const s=e.execute(t,this);s&&this.applyActionToNode(s,t)}}else this.applyActionToNode(this,t);"function"==typeof this.parent.mergeNodes&&this.parent.mergeNodes(t)}doModifyActionApply(t){I.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof Et)return void this.syncUpSelectedNodes(t);s instanceof V||this.syncUpSelectedNodes(t);const n=I.get(e.constructor.name,t.constructor.name);if(n)return void n.execute(e,t);const r=I.get(z.name,Gt.name);r&&r.execute(e,t)}syncUpSelectedNodes(s){const r=this.getElementRef();if(r){const i=e.getSubjectFromParentNodeByEventId(r,n);i&&t.notify(i,{node:s})}}renderWithWrapperStr(t,e){const{htmlTag:s,child:n}=t,r=this.annotationAttrStr(t);return n?`<${s}${r}>${this.renderWithWrapperStr(n,e)}</${s}>`:dt.has(s)?`<${s}${r}>`:this.text?`<${s}${r}>${this.renderTextStr(e)}</${s}>`:`<${s}${r}></${s}>`}annotationAttrStr(t){const{customAttribute:e,customClass:s,customStyle:n}=t,r=[...(null==e?void 0:e.toString())||[],null==s?void 0:s.toString(),null==n?void 0:n.toString()].filter(c);return r.length>0?` ${r.join(" ")}`:""}renderTextStr(t){var e;const s=(null===(e=this.getAnnotationByType(S.CODE))||void 0===e?void 0:e.code)?"code":"span",n=super.generateAttributeString(t);return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${s}${n}>${"code"===s?v(this.text):this.text}</${s}>`}shouldRenderAsPlainText(){const t=super.getAnnotationByType(S.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof C&&!(t instanceof Ot)&&!(t instanceof Wt)||t instanceof B)).length}}Gt.registerActionStrategyStatus={},Gt.htmlTag="span",Gt.dtoName="RTETextNode";class Vt extends O{constructor(t){super(),this.type=x.APPEND_CHILDREN,this.entityToBeAppended=t}}const Xt="500",qt={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",minHeight:"22px",fontWeight:"500"},Yt=Object.assign(Object.assign({},qt),{marginTop:"0px",marginBottom:"0px"}),Zt={paragraph:Yt,title:Object.assign(Object.assign({},qt),{fontSize:"36px",lineHeight:"40px",minHeight:"40px"}),subtitle:Object.assign(Object.assign({},qt),{fontSize:"28px",lineHeight:"32px",minHeight:"32px"}),"heading-1":Object.assign(Object.assign({},Yt),{fontSize:"22px",lineHeight:"24px",minHeight:"24px"}),"heading-2":Object.assign(Object.assign({},Yt),{fontSize:"20px",lineHeight:"24px",minHeight:"24px"}),"heading-3":Object.assign(Object.assign({},Yt),{fontSize:"18px"}),"heading-4":Object.assign({},Yt),"heading-5":Object.assign(Object.assign({},Yt),{fontSize:"14px"}),"heading-6":Object.assign(Object.assign({},Yt),{fontSize:"12px"})};class Qt extends g{constructor(t){super(),this.type=p.TEXT_STYLE,this.textStyle=t}static from(t){return[p.TEXT_STYLE,new Qt(t)]}static getDefaultStyles(t){return t?Zt[t]:null}toJSON(){return{textStyle:this.textStyle}}clone(){return new Qt(this.textStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.textStyle?`v-rte--text-style-${this.textStyle}`:null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.textStyle?Qt.getDefaultStyles(this.textStyle):null}}class te extends z{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new Qt(this.textStyle)}}class ee extends vt{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new Ct(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new jt(S.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}class se extends O{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class ne extends O{constructor(t){super(),this.type=x.REPLACE_CHILD_NODES,this.newChildNodes=t}}class re extends vt{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,s){if(t){const n=t.text.slice(0,e),r=t.text.slice(e),i=s.children.indexOf(t);if(i>-1){const o=s.children.slice(0,i),c=s.children.slice(i+1);t.isContentEditable()?(n&&o.push(t.cloneWithText(n)),r&&c.unshift(t.cloneWithText(r))):e>0?o.push(t):c.unshift(t),s.apply(new ne(o));const a=s.cloneWithNodes(c);return s.parent.apply(new se(s,a)),a}}}}class ie extends vt{handleAction(t,e){e.children=[],e.apply(new Vt(t.newChildNodes))}}class oe extends O{constructor(t){super(),this.type=x.DELETE_CHILDREN,this.entityToBeRemoved=t}}class ce extends vt{handleAction(t,e){const s=t.blockNeedToBeMerged;if(e.type===s.type||"image"!==e.type&&"image"!==s.type){let t=s.children;"image"!==s.type&&(t=s.children.filter((t=>t.text))),e.apply(new Vt(t)),"image"!==e.type&&this.transferLinkGroups(t,e),s.parent.apply(new oe(s))}}transferLinkGroups(t,e){t.forEach((t=>{if(!(t instanceof Gt))return;const s=t.getAnnotationByType(S.LINK);s&&e.apply(new Tt(s.link.groupKey,[t],"link"))}))}}class ae extends vt{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new Gt(l(),"\n",s),r=t.text.slice(0,e),i=t.text.slice(e),o=s.children.indexOf(t);if(o>-1){const c=s.children.slice(0,o),a=s.children.slice(o+1);t.isContentEditable()?(r&&c.push(t.cloneWithText(r)),i&&a.unshift(t.cloneWithText(i))):e>0?c.push(t):a.unshift(t),this.mergeLineBreakNodes(c,n,a,s)}return n}}mergeLineBreakNodes(t,e,s,n){if(0===s.length||s[0]&&""===s[0].text){const e=t[t.length-1];s.push(new Gt(l(),"\n",n,e&&new Map(e.annotationMap)))}n.apply(new ne([...t,e,...s]))}}class le extends vt{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new Gt(l(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,r,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new oe(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new Gt(l(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new ne([...t,e,...s]))}}class ue extends O{constructor(t,...e){super(),this.type=x.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class he extends O{constructor(t,e){super(),this.type=x.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}function de(t,e){const s=new Set(t.filter((t=>"RTEListItemBlock"===t.dtoName)));return t.filter((t=>{if("RTEListItemBlock"!==t.dtoName)return!0;let n=t.parent;for(;n.parent&&"RTEListItemBlock"===n.parent.dtoName;){const r=n.parent;if(s.has(r))return t.parent.type=e,!1;n=r.parent}return!0}))}class fe extends z{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new j(this.textAlign)}}class pe extends vt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class we extends z{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new _(this.indent)}}class ge extends W{constructor(t,e,s){super(t),this.dtoName=ge.dtoName,this.children=[],this.type=e;const{autoMatchFormat:n}=s||{autoMatchFormat:!0};n&&(this.annotationMap=ge.isAcceptableTextStyle(e)?new Map([Qt.from(e)]):new Map([Qt.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var s,n;const r=new ge(t.id,t.type,e),i=e.autoMatchFormat?Object.assign(Object.assign({},t.annotations),{textStyle:null!==(n=null===(s=t.annotations)||void 0===s?void 0:s.textStyle)&&void 0!==n?n:r.type}):t.annotations;return r.children=t.nodes.map((t=>{const s=U.getRTENodeClass(t.type);if(s)return s.from(t,r,e)})).filter(c),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?Qt.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,s)=>{const n=e.at(-1);if(t instanceof $t&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(S.LINK),r=s.getAnnotationByType(S.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,s]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag(),s=super.generateAttributeString(t),n=this.getChildrenHtml(t);return super.shouldRenderAsInternalWrapper()?n:[`<${e}${s}>`,n,`</${e}>`].join("")}cloneWithNodes(t){const e=new ge(l(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Vt(t)),e}clone(t){const e=new ge(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.isEmpty()))}getLastNode(){return this.children[this.children.length-1]}getBlockTag(){switch(this.type){case"title":case"subtitle":return"div";case"heading-1":return"h1";case"heading-2":return"h2";case"heading-3":return"h3";case"heading-4":return"h4";case"heading-5":return"h5";case"heading-6":return"h6";case"paragraph":default:return"p"}}getChildrenHtml(t){if(!this.isNotEmpty())return"<br>";const e=this.getAnnotationByType(f.LINK_GROUP);let s=this.renderGroupedNodesAtDepth(this.children,0,t);return e&&this.children.length>0&&(s=this.generateLinkHtml(e,s,t)),s}doAnnotationActionApply(t){const e=I.get(t.constructor.name,ge.name);e&&e.execute(t,this)}renderGroupedNodesAtDepth(t,e,s){var n;let r="",i=0;for(;i<t.length;){const o=t[i].getInlineHtmlTagAtDepth(e);if(!(null==o?void 0:o.groupId)){r+=t[i].renderHtmlFromDepth(e,s),i++;continue}let c=i+1;for(;c<t.length&&(null===(n=t[c].getInlineHtmlTagAtDepth(e))||void 0===n?void 0:n.groupId)===o.groupId;)c++;if(c===i+1)r+=t[i].renderHtmlFromDepth(e,s);else{const n=this.renderGroupedNodesAtDepth(t.slice(i,c),e+1,s);r+=`<${o.htmlTag}${o.attrStr}>${n}</${o.htmlTag}>`}i=c}return r}generateLinkHtml(t,e,s){e="";let n=[];for(let r=0;r<this.children.length;r++){const i=this.children[r].getAnnotationByType(S.LINK),o=this.children[r+1]?this.children[r+1].getAnnotationByType(S.LINK):null;if(i){if(n.push(this.children[r]),!o||i.link.groupKey!==o.link.groupKey){const r=t.toString(i,{standalone:!0,filterInlineStyles:null==s?void 0:s.filterInlineStyles});e+=[`<a${r?` ${r}`:""}>`,this.renderGroupedNodesAtDepth(n,0,s),"</a>"].join(""),n=[]}}else e+=this.children[r].toHtml(s)}return e}}I.register(te.name,ge.name,new ee),I.register(fe.name,ge.name,new pe),I.register(we.name,ge.name,new class extends vt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),I.register(Tt.name,ge.name,new class extends vt{handleAction(t,e){let s=e.getAnnotationByType(f.LINK_GROUP);if("update_link"===t.type){if(s){const e=s.linkGroups.get(t.groupKey);e&&s.linkGroups.set(t.groupKey,[e[0]])}}else{if(s){const e=s.linkGroups.get(t.groupKey)||[];s.linkGroups.set(t.groupKey,[...e,...t.nodes])}else s=t.toAnnotation(),s.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(f.LINK_GROUP,s)}}}),I.register(x.UNLINK_LINK_GROUP,ge.name,new class extends vt{handleAction(t,e){const s=e.getAnnotationByType(f.LINK_GROUP);s&&(s.linkGroups.size>1?s.linkGroups.delete(t.groupKey):e.annotationMap.delete(f.LINK_GROUP))}}),I.register(x.SPLIT_BLOCK_WITH_NODE,ge.name,new re),I.register(x.REPLACE_CHILD_NODES,ge.name,new ie),I.register(x.MERGE_TWO_BLOCKS_NODES,ge.name,new ce),I.register(x.LINE_BREAK_SINGLE_BLOCK,ge.name,new ae),I.register(x.LINE_BREAK_MULTIPLE_BLOCKS,ge.name,new le),I.register(x.INSERT_IMAGE_TO_BLOCK,ge.name,new class extends vt{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,s,n))e.parent.apply(new se(e,r));else if(this.isCaretPositionAtBlockStart(e,s,n))e.parent.apply(new ue(e,r));else{const t=new he(s,n);e.apply(t),e.parent.apply(new se(e,r))}}}),I.register(x.TRANSFORM_LIST_BLOCK,ge.name,new class extends vt{handleAction(t,e){const s=this.getRootContent(e);if(!s)return;const n=e.parent,r=s.createList(t.listType),i=de(t.selectedBlocks,t.listType),o=i.map((t=>s.toListItem(t)));r.apply(new Vt(o)),n.apply(new se(t.selectedBlocks[0],r)),i.forEach((t=>{t.parent.apply(new oe(t))}))}}),ge.dtoName="RTETextBlock";class me extends vt{copyListAnnotations(t,e){t.annotationMap.forEach(((t,s)=>{e.annotationMap.set(s,t.clone())}))}haveSameListAnnotations(t,e){var s,n;const r=Array.from(t.annotationMap.keys()).sort(),i=Array.from(e.annotationMap.keys()).sort();return JSON.stringify(r)===JSON.stringify(i)&&JSON.stringify(this.normalizeAnnotationValue(null!==(s=t.toJSON().annotations)&&void 0!==s?s:{}))===JSON.stringify(this.normalizeAnnotationValue(null!==(n=e.toJSON().annotations)&&void 0!==n?n:{}))}normalizeAnnotationValue(t){if(Array.isArray(t))return t.map((t=>this.normalizeAnnotationValue(t)));if(t&&"object"==typeof t){const e=t;return Object.keys(e).sort().reduce(((t,s)=>(t[s]=this.normalizeAnnotationValue(e[s]),t)),{})}return t}}class xe extends ge{constructor(t,e,s){super(t,"list-item",s),this.dtoName=xe.dtoName,this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new xe(t.id,void 0,e);s.children=t.nodes.map((t=>Gt.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const n=ve.from(t,e);return n.parent=s,n})));const{annotations:n}=t;return n&&Object.entries(n).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);c(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(t){var e;const s=super.generateAttributeString(t),n=(null===(e=this.nestList)||void 0===e?void 0:e.length)?this.nestList.map((e=>e.toHtml(t))).join(""):"";return[`<li${s}>`,this.getChildrenHtml(t),n,"</li>"].join("")}cloneWithNodes(t){const e=new xe(l());return e.children=[],e.apply(new Vt(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}getPlainText(){var t;const e=(null!==(t=this.nestList)&&void 0!==t?t:[]).map((t=>t.getPlainText())).join("");return super.getPlainText()+e}createNewListItem(){return new xe(l())}clone(t){var e;const s=new xe(this.id);return s.children=this.children.map((t=>t.clone(s))),s.annotationMap=super.cloneAnnotations(),s.nestList=null===(e=this.nestList)||void 0===e?void 0:e.map((t=>t.clone(s))),s.parent=t,s}}I.register(te.name,xe.name,new ee),I.register(fe.name,xe.name,new pe),I.register(x.LINE_BREAK_SINGLE_BLOCK,xe.name,new ae),I.register(x.LINE_BREAK_MULTIPLE_BLOCKS,xe.name,new le),I.register(x.DELETE_NEST_LIST,xe.name,new class extends vt{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),I.register(x.SPLIT_BLOCK_WITH_NODE,xe.name,new re),I.register(x.REPLACE_CHILD_NODES,xe.name,new ie),I.register(x.REPLACE_NEST_LIST,xe.name,new class extends me{handleAction(t,e){const s=this.mergeAdjacentSameType(t.newList);s.forEach((t=>{t.parent=e})),e.nestList=s}mergeAdjacentSameType(t){if(t.length<=1)return t;const e=[t[0]];for(let s=1;s<t.length;s++){const n=e[e.length-1],r=t[s];n.type===r.type&&this.haveSameListAnnotations(n,r)?(r.children.forEach((t=>{t.parent=n})),n.children=n.children.concat(r.children)):e.push(r)}return e}}),I.register(x.MERGE_TWO_BLOCKS_NODES,xe.name,new ce),I.register(x.INSERT_IMAGE_TO_BLOCK,xe.name,new class extends vt{handleAction(t,e){e.parent.apply(t)}}),xe.dtoName="RTEListItemBlock";class Se extends O{constructor(t){super(),this.type=x.REPLACE_NEST_LIST,this.newList=t}}class Ae extends O{constructor(t){super(),this.type=x.TRANSFORM_PARAGRAPH_BLOCK,this.isFlushable=!0,this.selectedBlocks=t}}class ye extends W{constructor(t,e){super(t),this.dtoName=ye.dtoName,this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const s=new ye(t.id,t.htmlTag),{annotations:n}=t;return n&&super.convertAnnotationsToMap(s.annotationMap,n),s.children=this.generateBlockChildren(t.children,e,s),s}clone(t){const e=new ye(this.id,this.htmlTag);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return!0}toHtml(t){const e=this.htmlTag,s=super.generateAttributeString(t);return dt.has(this.htmlTag)?`<${e}${s}>`:[`<${e}${s}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}ye.dtoName="RTEHtmlBlock";class Oe extends vt{getOrderedContiguousItems(t,e){const s=[...e].sort(((e,s)=>t.children.indexOf(e)-t.children.indexOf(s))),n=t.children.indexOf(s[0]);return n<0?[]:t.children.slice(n,n+s.length).every(((t,e)=>t===s[e]))?s:[]}}class Te extends O{constructor(t){super(),this.type=x.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class Ee extends g{constructor(){super(...arguments),this.type=p.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}static getDefaultMarkerStyles(){return{fontSize:"16px"}}renderStyle(t){return(null==t?void 0:t.standalone)?Ee.getDefaultStyles():null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new Ee}toJSON(){}}class ve extends W{constructor(t,e,s){super(t),this.dtoName=ve.dtoName,this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:n}=s||{autoMatchFormat:!0};n&&this.annotationMap.set(p.LIST,new Ee)}static from(t,e={autoMatchFormat:!0}){const s=new ve(t.id,t.type,e),{annotations:n}=t;return n&&Object.entries(n).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);c(n)&&s.annotationMap.set(...n)})),s.children=t.blocks.map((t=>{const n=xe.from(t,e);return n.parent=s,n})),s}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return D.from(e);case"customClass":return M.from(e);case"customStyle":return P.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag();return[`<${e}${super.generateAttributeString(t)}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(t){const e=new ve(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"}}I.register(x.TRANSFORM_LIST_BLOCK,ve.name,new class extends me{handleAction(t,e){var s;const n=t.selectedBlocks,r=n.every((t=>t.parent===e)),i=this.getRootContent(e);if(!i)return;if(e.parent instanceof xe){if(r){const r=this.createListFromSource(i,e,t.listType);r.apply(new Vt(e.children));const o=e.parent,c=(null!==(s=o.nestList)&&void 0!==s?s:[]).map((t=>t===e?r:t));o.apply(new Se(c)),n.forEach((t=>t.children.map((t=>t.apply(new Et)))))}else this.handleCrossListTransform(t,e);return}if(!r&&n.every((t=>t instanceof xe))){const e=new Set(n.map((t=>t.parent))),s=new Set;e.forEach((e=>{e.type!==t.listType&&this.convertListTypeInPlace(e,t.listType)}));const r=new Set;return n.forEach((t=>{const e=t.parent;e.parent instanceof xe||(s.add(e),r.add(e.parent))})),r.forEach((t=>{for(let e=0;e<t.children.length-1;){const n=t.children[e],r=t.children[e+1];n instanceof ve&&r instanceof ve&&n.type===r.type&&this.haveSameListAnnotations(n,r)&&s.has(n)&&s.has(r)?(n.apply(new Vt([...r.children])),t.apply(new oe(r)),s.delete(r)):e++}})),void n.forEach((t=>t.children.map((t=>t.apply(new Et)))))}const o=this.createListFromSource(i,e,t.listType),c=e.parent;if(r)o.apply(new Vt(e.children)),c.apply(new se(e,o)),c.apply(new oe(e)),n.forEach((t=>t.children.map((t=>t.apply(new Et)))));else{const s=de(t.selectedBlocks,t.listType),n=s.map((t=>i.toListItem(t)));o.apply(new Vt(n)),c.apply(new se(e,o)),s.forEach((t=>{t.parent.apply(new oe(t))})),0===e.children.length&&c.apply(new oe(e))}}convertListTypeInPlace(t,e){var s;const n=this.getRootContent(t);if(!n)return;const r=t.parent,i=this.createListFromSource(n,t,e);if(i.apply(new Vt([...t.children])),r instanceof xe){const e=(null!==(s=r.nestList)&&void 0!==s?s:[]).map((e=>e===t?i:e));r.apply(new Se(e))}else r.apply(new se(t,i)),r.apply(new oe(t))}handleCrossListTransform(t,e){if(!(e.parent instanceof xe))return;const s=this.getRootContent(e);if(!s)return;const n=e.parent,r=n.nestList,i=new Set(t.selectedBlocks.filter((t=>t instanceof xe)).map((t=>t.parent)).filter((t=>r.includes(t))));if(!i.size)return;const o=r.map((e=>{if(!i.has(e))return e;const n=this.createListFromSource(s,e,t.listType);return n.apply(new Vt(e.children)),n}));n.apply(new Se(o)),t.selectedBlocks.forEach((t=>t.children.map((t=>t.apply(new Et)))))}createListFromSource(t,e,s){const n=t.createList(s);return this.copyListAnnotations(e,n),n}}),I.register(x.TRANSFORM_PARAGRAPH_BLOCK,ve.name,new class extends me{handleAction(t,e){const s=this.getSelectedSegments(t.selectedBlocks);0!==s.length&&this.hasConsistentTargetAndRoot(s,e)&&(this.syncSelection(s),[...s].reverse().forEach((t=>this.transformSegment(t))))}hasConsistentTargetAndRoot(t,e){if(t[0][0].parent!==e)return!1;const s=this.getRootContent(e);return Boolean(s&&t.every((t=>t.every((t=>this.getRootContent(t)===s)))))}syncSelection(t){t.forEach((t=>{t.forEach((t=>{t.children.forEach((t=>t.apply(new Et)))}))}))}transformSegment(t){const e=t[0].parent,s=new Ae(t);e.parent instanceof xe?this.handleNestedListCase(s,e):this.handleRootListCase(s,e)}handleRootListCase(t,e){const s=this.getRootContent(e);let n=!1,r=!1;const i=t.selectedBlocks,o=[];if(i.forEach((t=>{var s;t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),o.push(this.toParagraph(t));for(const e of null!==(s=t.nestList)&&void 0!==s?s:[])this.appendListBlock(o,e)})),n)e.parent.apply(new ue(e,...o));else if(r)e.parent.apply(new se(e,...o));else{const t=e.children.indexOf(i[0]),n=e.children.indexOf(i[i.length-1]),r=this.createListFromSource(s,e);r.apply(new Vt(e.children.slice(0,t)));const c=this.createListFromSource(s,e);c.apply(new Vt(e.children.slice(n+1)));const a=o[o.length-1];a instanceof ve&&c.children.length>0&&a.type===c.type&&this.haveSameListAnnotations(a,c)?(a.apply(new Vt(c.children)),e.parent.apply(new ue(e,r,...o))):e.parent.apply(new ue(e,r,...o,c)),e.parent.apply(new oe(e))}if(i.map((t=>{t.nestList=[],e.apply(new oe(t))})),0===e.children.length)e.parent.apply(new oe(e));else if(n){const t=o[o.length-1];t instanceof ve&&t.type===e.type&&this.haveSameListAnnotations(t,e)&&(t.apply(new Vt([...e.children])),e.parent.apply(new oe(e)))}}handleNestedListCase(t,e){const s=t.selectedBlocks,n=this.getRootContent(e),r=e.children.indexOf(s[0]),i=[];s.forEach((t=>{var e;i.push(this.toParagraph(t));for(const s of null!==(e=t.nestList)&&void 0!==e?e:[])this.appendListBlock(i,s)}));const o=e.children.indexOf(s[s.length-1]),c=e.children.slice(o+1),a=[];let l=e;for(;l.parent instanceof xe;){const t=l.parent,e=t.parent,s=e.children.indexOf(t),n=t.nestList,r=n.indexOf(l),i=n.slice(r+1);a.push({list:e,ancestorIndex:s,trailingNestLists:i}),l=e}const u=l,h=u.parent,d=[];c.length>0&&d.push({items:c,sourceList:e});for(const t of a){for(const e of t.trailingNestLists)e.children.length>0&&d.push({items:[...e.children],sourceList:e});const e=t.list.children.slice(t.ancestorIndex+1);e.length>0&&d.push({items:e,sourceList:t.list})}const f=[];for(const t of d){const e=f[f.length-1];e&&e.sourceList.type===t.sourceList.type&&this.haveSameListAnnotations(e.sourceList,t.sourceList)?e.items.push(...t.items):f.push({items:[...t.items],sourceList:t.sourceList})}f.map((t=>{const e=this.createListFromSource(n,t.sourceList);return e.apply(new Vt(t.items)),e})).forEach((t=>this.appendListBlock(i,t))),e.children=e.children.slice(0,r);const p=e.parent,w=p.nestList,g=w.indexOf(e);let m=w.slice(0,g+1);0===e.children.length&&(m=m.filter((t=>t!==e))),p.apply(new Se(m));for(const t of a)if(t.list.children=t.list.children.slice(0,t.ancestorIndex+1),t.trailingNestLists.length>0){const e=t.list.children[t.ancestorIndex],s=e.nestList,n=s.indexOf(t.trailingNestLists[0]);if(n>=0){const t=s.slice(0,n);e.apply(new Se(t))}}h.apply(new se(u,...i))}getSelectedSegments(t){const e=Array.from(new Set(t.filter((t=>t instanceof xe)))).map((t=>({item:t,path:this.getStructuralPath(t)}))).filter((t=>null!==t.path)).sort(((t,e)=>this.compareStructuralPaths(t.path,e.path))).map((t=>t.item)),s=[];for(const t of e){const e=s[s.length-1],n=null==e?void 0:e[e.length-1];(null==n?void 0:n.parent)===t.parent&&t.parent.children.indexOf(t)-t.parent.children.indexOf(n)==1?e.push(t):s.push([t])}return s}getStructuralPath(t){var e;const s=[],n=new Set;let r=t,i=t.parent;for(;!n.has(i);){n.add(i);const t=i.children.indexOf(r);if(t<0)return null;if(s.unshift(t),"VegaRTEContent"===i.parent.dtoName||"RTEHtmlBlock"===i.parent.dtoName){const t=this.getContainerPath(i);return t?[...t,...s]:null}if(!(i.parent instanceof xe))return null;const o=i.parent,c=(null!==(e=o.nestList)&&void 0!==e?e:[]).indexOf(i);if(c<0)return null;s.unshift(c),r=o,i=o.parent}return null}getContainerPath(t){const e=[],s=new Set;let n=t,r=t.parent;for(;r instanceof ye;){if(s.has(r))return null;s.add(r);const t=r.children.indexOf(n);if(t<0)return null;e.unshift(t),n=r,r=r.parent}const i=r.children.indexOf(n);return i<0?null:(e.unshift(i),e)}compareStructuralPaths(t,e){const s=Math.min(t.length,e.length);for(let n=0;n<s;n++)if(t[n]!==e[n])return t[n]-e[n];return t.length-e.length}appendListBlock(t,e){const s=t[t.length-1];s instanceof ve&&s.type===e.type&&this.haveSameListAnnotations(s,e)?s.apply(new Vt([...e.children])):t.push(e)}createListFromSource(t,e){const s=t.createList(e.type);return this.copyListAnnotations(e,s),s}toParagraph(t){const e=new ge(l(),"paragraph");return e.apply(new Vt(t.children)),e.annotationMap=t.annotationMap,e}}),I.register(x.INSERT_IMAGE_TO_BLOCK,ve.name,new class extends vt{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new se(e,t.imageBlockToBeInserted):t)}}),I.register(x.NEST_LIST_ITEMS,ve.name,new class extends Oe{handleAction(t,e){var s,n;const r=this.getOrderedContiguousItems(e,t.selectedBlocks);if(!r.length)return;const i=e.children.indexOf(r[0]);if(i<=0)return;const o=e.children[i-1],c=new Set(r);let a=null===(s=o.nestList)||void 0===s?void 0:s[o.nestList.length-1];a||(a=new ve(l(),e.type),o.apply(new Se([...null!==(n=o.nestList)&&void 0!==n?n:[],a]))),e.children=e.children.filter((t=>!c.has(t))),a.children=a.children.concat(r),r.forEach((t=>{var e;t.parent=a,(null===(e=t.nestList)||void 0===e?void 0:e.length)&&this.unifyDescendantNestLists(t,t.nestList[0].type),t.children.forEach((t=>t.apply(new Et)))}))}unifyDescendantNestLists(t,e){var s;if(!(null===(s=t.nestList)||void 0===s?void 0:s.length))return;let n=!1;for(const s of t.nestList){s.type!==e&&(s.type=e,n=!0);for(const t of s.children)this.unifyDescendantNestLists(t,e)}n&&t.apply(new Se([...t.nestList]))}}),I.register(x.UNNEST_LIST_ITEMS,ve.name,new class extends Oe{handleAction(t,e){var s;const n=this.getOrderedContiguousItems(e,t.selectedBlocks),r=e.parent;if(!(n.length&&r instanceof xe))return;const i=e.children.indexOf(n[0]),o=e.children.indexOf(n[n.length-1]);if(i<0||o<i)return;const c=r,a=c.parent,u=a.children.indexOf(c);if(u<0)return;const h=e.children.slice(o+1),d=new Set(n);if(e.children=e.children.filter((t=>!d.has(t))),a.children=[...a.children.slice(0,u+1),...n,...a.children.slice(u+1)],n.forEach((t=>{t.parent=a,t.children.forEach((t=>t.apply(new Et)))})),h.length>0){const t=new Set(h);e.children=e.children.filter((e=>!t.has(e)));const r=n[n.length-1];let i=null===(s=r.nestList)||void 0===s?void 0:s[r.nestList.length-1];if(i&&i.type!==e.type&&(i=null),!i){i=new ve(l(),e.type);const t=Array.isArray(r.nestList)?r.nestList:[];r.apply(new Se([...t,i]))}i.children=i.children.concat(h),h.forEach((t=>{t.parent=i}))}const f=this.collectTrailingNestLists(c,e);if(f.length>0){const t=n[n.length-1],e=Array.isArray(t.nestList)?t.nestList:[];t.apply(new Se([...e,...f]))}0===e.children.length&&c.apply(new Te(e))}collectTrailingNestLists(t,e){var s;const n=null!==(s=t.nestList)&&void 0!==s?s:[],r=n.indexOf(e);if(r<0||r>=n.length-1)return[];const i=n.slice(r+1);return t.apply(new Se(n.slice(0,r+1))),i}}),ve.dtoName="RTEListBlock";class Ne extends vt{getPreviousNode(t){var e;const s=t.parent,n=s.children.indexOf(t);if(n>0)return s.children[n-1];if(s.parent){if(s.isListItemBlock()&&0===s.parent.children.indexOf(s)&&s.parent.parent instanceof xe){const t=s.parent.parent;if(0!==(null!==(e=t.nestList)&&void 0!==e?e:[]).indexOf(s.parent)){const t=this.getPreviousBlock(s);return t?this.getBlockLastNode(t):null}const n=t.children;return n.length>0?n[n.length-1]:null}const t=this.getPreviousBlock(s);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,s=e.children.indexOf(t);if(e.children[s+1])return e.children[s+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,s=e.children.indexOf(t),n=e.parent;if(e.isListItemBlock()){const t=n.parent;return 0===s&&Array.isArray(n.children)&&n.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===n}return 0===s&&Array.isArray(n.children)&&n.children[0]===e}getPreviousBlock(t){var e;if(t.parent instanceof xe){const s=null!==(e=t.parent.nestList)&&void 0!==e?e:[],n=s.indexOf(t);if(n>0)return s[n-1];if(0===n)return t.parent}if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(this.isRTEBlock(t.parent)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}isRTEBlock(t){return t&&"VegaRTEContent"!==t.dtoName}}class be extends O{constructor(t,e){super(),this.isFlushable=!0,this.type=x.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class Ce extends z{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new V(this.range)}}class Le extends K{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(Le.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${Le.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=this.getElementRef();if(t)return d(t,`.${Le.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}Le.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",Le.DECORATOR_NODE_CLASS="v-internal-decorator-node";class Re extends b{constructor(){super(...arguments),this.stylesToBeFiltered=Re.STYLES,this.elementTagName="pre code"}canFilter(t){return L.isCodeBlockNode(t)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}Re.STYLES={boxSizing:"border-box",color:"rgba(var(--v-text-primary, 32, 54, 69, 1))",textAlign:"left",fontFamily:"'Roboto Mono'",fontWeight:"400",lineHeight:"22px",fontSize:"16px",whiteSpace:"pre-wrap",minHeight:"22px",tabSize:"2px"};class ke extends Le{constructor(t,e,s,n){super(t),this.dtoName=ke.dtoName,this.type=y.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s,this.annotationMap.set(A.CUSTOM_STYLE,new P(Re.STYLES))}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}getPlainText(){return this.text}toHtml(t){return`<code${this.generateAttributeString(t)}>${E(this.text)}</code>`}clone(t){return new ke(this.id,this.text,this.language,t)}doAnnotationActionApply(t){I.executeTheStrategy(t,this)}doModifyActionApply(t){I.executeTheStrategy(t,this)}}I.register(x.UPDATE_CODE_BLOCK,ke.name,new class extends vt{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),I.register(Ce.name,ke.name,new class extends vt{handleAction(t,e){e.annotationMap.set(f.SELECTION_RANGE,t.toAnnotation())}}),ke.dtoName="RTECodeBlockNode";var je;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(je||(je={}));class _e extends vt{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&"parent"in e&&e.parent&&(e.isListItemBlock()&&e.nestList&&e.nestList.length||e.parent.apply(new oe(e)))}}class $e extends b{constructor(){super(...arguments),this.stylesToBeFiltered=$e.STYLES,this.elementTagName="pre"}canFilter(t){return L.isCodeBlock(t.dtoName)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}$e.STYLES={backgroundColor:"rgba(var(--v-bg-secondary, 245, 247, 247, 1))",padding:"12px"};class Ie extends W{constructor(t,e,s){super(t),this.dtoName=Ie.dtoName,this.type="code-block",this.annotationMap=new Map([P.from($e.STYLES)]),this.children=[new ke(`${t}-1`,e,s,this)]}static from(t){return new Ie(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}toHtml(t){const{language:e=je["Plain Text"]}=this.children[0];return`<pre data-language="${e}"${super.generateAttributeString(t)}>${this.children.map((e=>e.toHtml(t)))}</pre>`}clone(t){const e=Ie.from(this.toJSON());return e.parent=t,e}apply(n){if(n instanceof O&&I.executeTheStrategy(n,this),n.isFlushable){const n=m.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(f.SELECTION_RANGE)}}I.register(x.DELETE_CODE_BLOCK,Ie.name,new class extends Ne{handleAction(t,e){const s=e.children[0],n=e.parent;if(n){let t=this.getPreviousNode(s),r=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(s),r=0),n.apply(new oe(e));const i=t?m.getDOMByEntity(t):null;if(0===n.children.length){const s=ge.from({id:l(),type:"paragraph",nodes:[{id:l(),type:"text",text:""}]});e.parent.apply(new Vt([s])),t=s.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(s,r,i,o){const c=m.getDOMByEntity(o);if(c){const o=e.getSubjectFromParentNodeByEventId(c,n);o&&t.notify(o,{node:s,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),I.register(x.DELETE_CHILDREN,Ie.name,new _e),I.register(x.SWITCH_OUT_FROM_CODE_BLOCK,Ie.name,new class extends vt{handleAction(s,r){const{content:i,language:o}=s,c=i.split("\n"),a=new be(c.slice(0,c.length-2).join("\n"),o);a.isFlushable=!1,r.children[0].apply(a);const u=ge.from({id:l(),type:"paragraph",nodes:[{id:l(),text:"",type:"text"}]});r.parent.apply(new se(r,u));const h=m.getDOMByEntity(r);if(h){const s=e.getSubjectFromParentNodeByEventId(h,n);s&&t.notify(s,{node:u.children[0]})}}}),I.register(x.INSERT_IMAGE_TO_BLOCK,Ie.name,new class extends vt{handleAction(t,e){e.parent.apply(new se(e,t.imageBlockToBeInserted))}}),Ie.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element",Ie.dtoName="RTECodeBlock";export{Y as $,I as A,g as B,A as C,B as D,ne as E,ce as F,ie as G,dt as H,se as I,fe as J,pe as K,Ne as L,O as M,S as N,_e as O,Te as P,Se as Q,Gt as R,he as S,ve as T,Ft as U,ht as V,q as W,X,T as Y,ot as Z,it as _,W as a,Q as a0,Z as a1,Qt as a2,ye as a3,L as a4,Ee as a5,j as a6,rt as a7,Xt as a8,R as a9,St as aA,lt as aB,wt as aC,pt as aD,gt as aE,$e as aa,Re as ab,Et as ac,$ as ad,je as ae,M as af,ut as ag,ct as ah,$t as ai,be as aj,Ce as ak,zt as al,ft as am,Ct as an,_t as ao,Bt as ap,te as aq,nt as ar,p as as,Rt as at,kt as au,It as av,we as aw,Ae as ax,at as ay,v as az,ge as b,mt as c,H as d,vt as e,Vt as f,K as g,ue as h,f as i,x as j,z as k,oe as l,D as m,U as n,b as o,Le as p,Ie as q,xe as r,m as s,ke as t,P as u,J as v,xt as w,At as x,C as y,y as z}