@globalpayments/vega 2.95.0 → 2.97.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 (518) hide show
  1. package/dist/cjs/{app-globals-76815382.js → app-globals-3f57f7b9.js} +10 -10
  2. package/dist/cjs/{code-block-493c7ce7.js → code-block-28a7732e.js} +1508 -56
  3. package/dist/cjs/{component-value-history-controller-slimmer.abstract-ab21fcbf.js → component-value-history-controller-slimmer.abstract-50cdba6e.js} +3 -3
  4. package/dist/cjs/{content-state-fc34a814.js → content-state-e2ab0f06.js} +143 -581
  5. package/dist/cjs/{date-required-rule-4ab06a82.js → date-required-rule-5250f26d.js} +1 -1
  6. package/dist/cjs/{design-token-d3d12fa0.js → design-token-74674ee7.js} +3 -3
  7. package/dist/cjs/{element-appender-slimmer-1d6323c2.js → element-appender-slimmer-ccb2e3c2.js} +117 -2
  8. package/dist/cjs/{form-field-controller-slimmer-d638ba12.js → form-field-controller-slimmer-58621b5e.js} +5 -14
  9. package/dist/cjs/form-field-key-8d5edf75.js +25 -0
  10. package/dist/cjs/{image-annotation-action-7c4cd316.js → image-annotation-action-b54dc669.js} +2 -2
  11. package/dist/cjs/{image-extension-30a7c10f.js → image-extension-1e3eeaa3.js} +2 -2
  12. package/dist/cjs/index.cjs.js +19 -19
  13. package/dist/cjs/{inject-keyboard-manager-5a105612.js → inject-keyboard-manager-6a6f5c9f.js} +1 -1
  14. package/dist/cjs/{internal-calendar-period-factory-b76006f7.js → internal-calendar-period-factory-dfcdd3f6.js} +1 -1
  15. package/dist/cjs/{internal-translation-controller-eb02c3b1.js → internal-translation-controller-1dac2df8.js} +7 -0
  16. package/dist/cjs/{keyboard-manager-ca76d4dc.js → keyboard-manager-c56033b1.js} +1 -1
  17. package/dist/cjs/{keyboard-manager-slimmer-a1223714.js → keyboard-manager-slimmer-7043a106.js} +1 -1
  18. package/dist/cjs/{link-extension-92a63cb7.js → link-extension-71c27ff3.js} +3 -3
  19. package/dist/cjs/loader.cjs.js +12 -12
  20. package/dist/cjs/{month-view-generator-876c50d4.js → month-view-generator-7b704a80.js} +1 -1
  21. package/dist/cjs/{public-rules-9e1ea1d9.js → public-rules-55e34d2e.js} +7 -7
  22. package/dist/cjs/{range-30219330.js → range-eebe0e3c.js} +1 -1
  23. package/dist/cjs/{responsive-format-facade-25e9f30d.js → responsive-format-facade-493d1763.js} +1 -1
  24. package/dist/cjs/{rich-text-editor-required-rule-23bf7485.js → rich-text-editor-required-rule-4fdee376.js} +1 -1
  25. package/dist/cjs/{split-cell-operation-43752212.js → split-cell-operation-51097409.js} +3 -3
  26. package/dist/cjs/{state-border-formatter-f1ce0f3b.js → state-border-formatter-711c7aaa.js} +1 -1
  27. package/dist/cjs/{string-format-strategy.abstract-b22f7754.js → string-format-strategy.abstract-b61bdcbd.js} +1 -1
  28. package/dist/cjs/{string-input-formatter-slimmer-d2c248f7.js → string-input-formatter-slimmer-18d45942.js} +1 -1
  29. package/dist/cjs/{string-mask-strategy-fc01a500.js → string-mask-strategy-ad3fa0ac.js} +2 -2
  30. package/dist/cjs/{style-formatter-73205450.js → style-formatter-8f711cb0.js} +2 -2
  31. package/dist/cjs/{time-required-rule-12d2f394.js → time-required-rule-87417359.js} +1 -1
  32. package/dist/cjs/{token-extension-d123d9d0.js → token-extension-608bbf7b.js} +38 -14
  33. package/dist/cjs/{translation-slimmer-9099f56c.js → translation-slimmer-77c7f37d.js} +1 -1
  34. package/dist/cjs/{type-guard-f354af8b.js → type-guard-a57ef3ac.js} +1 -1
  35. package/dist/cjs/{valid-credit-card-number-rule-8d370163.js → valid-credit-card-number-rule-4c0a3040.js} +1 -1
  36. package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
  37. package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
  38. package/dist/cjs/vega-backdrop.cjs.entry.js +63 -8
  39. package/dist/cjs/vega-box.cjs.entry.js +6 -6
  40. package/dist/cjs/vega-button-circle.cjs.entry.js +5 -5
  41. package/dist/cjs/vega-button.cjs.entry.js +3 -3
  42. package/dist/cjs/vega-calendar_5.cjs.entry.js +7 -7
  43. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  44. package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
  45. package/dist/cjs/vega-checkbox_2.cjs.entry.js +20 -3
  46. package/dist/cjs/vega-chip.cjs.entry.js +5 -5
  47. package/dist/cjs/vega-code-block.cjs.entry.js +8 -8
  48. package/dist/cjs/vega-color-picker.cjs.entry.js +11 -2
  49. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +12 -3
  50. package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
  51. package/dist/cjs/vega-combo-box.cjs.entry.js +17 -8
  52. package/dist/cjs/vega-date-picker_2.cjs.entry.js +22 -13
  53. package/dist/cjs/vega-dialog_2.cjs.entry.js +3 -3
  54. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  55. package/dist/cjs/vega-dropdown_5.cjs.entry.js +33 -10
  56. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  57. package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
  58. package/dist/cjs/vega-file-uploader.cjs.entry.js +12 -3
  59. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
  60. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  61. package/dist/cjs/vega-font.cjs.entry.js +5 -5
  62. package/dist/cjs/vega-form.cjs.entry.js +28 -25
  63. package/dist/cjs/vega-grid.cjs.entry.js +5 -5
  64. package/dist/cjs/vega-icon.cjs.entry.js +5 -5
  65. package/dist/cjs/vega-image-uploader.cjs.entry.js +14 -5
  66. package/dist/cjs/vega-input-credit-card.cjs.entry.js +16 -7
  67. package/dist/cjs/vega-input-numeric.cjs.entry.js +14 -5
  68. package/dist/cjs/vega-input-passcode.cjs.entry.js +14 -5
  69. package/dist/cjs/vega-input-phone-number.cjs.entry.js +13 -4
  70. package/dist/cjs/vega-input-range.cjs.entry.js +12 -3
  71. package/dist/cjs/vega-input-select.cjs.entry.js +14 -5
  72. package/dist/cjs/vega-input.cjs.entry.js +9 -7
  73. package/dist/cjs/vega-left-nav_5.cjs.entry.js +71 -11
  74. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  75. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
  76. package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
  77. package/dist/cjs/vega-popover_2.cjs.entry.js +8 -8
  78. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +3 -3
  79. package/dist/cjs/vega-radio_2.cjs.entry.js +17 -5
  80. package/dist/cjs/vega-rich-text-content.cjs.entry.js +86 -14
  81. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +2122 -451
  82. package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +1 -1
  83. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
  84. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +8 -8
  85. package/dist/cjs/vega-section-title.cjs.entry.js +896 -14
  86. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +13 -4
  87. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +11 -2
  88. package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
  89. package/dist/cjs/vega-signature-capture.cjs.entry.js +16 -7
  90. package/dist/cjs/vega-stepper.cjs.entry.js +12 -3
  91. package/dist/cjs/vega-table_11.cjs.entry.js +4 -4
  92. package/dist/cjs/vega-textarea.cjs.entry.js +12 -3
  93. package/dist/cjs/vega-time-picker_2.cjs.entry.js +18 -9
  94. package/dist/cjs/vega-toggle-switch.cjs.entry.js +12 -3
  95. package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
  96. package/dist/cjs/vega.cjs.js +12 -12
  97. package/dist/collection/components/vega-backdrop/slimmers/controller/vega-backdrop-visible-controller.js +63 -8
  98. package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.js +33 -1
  99. package/dist/collection/components/vega-checkbox/vega-checkbox.js +34 -2
  100. package/dist/collection/components/vega-color-picker/vega-color-picker.js +33 -1
  101. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/vega-color-swatch-picker.js +33 -1
  102. package/dist/collection/components/vega-combo-box/vega-combo-box.js +35 -3
  103. package/dist/collection/components/vega-date-picker/vega-date-picker.js +33 -1
  104. package/dist/collection/components/vega-dropdown/vega-dropdown.js +30 -7
  105. package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +33 -1
  106. package/dist/collection/components/vega-form/slimmers/controllers/vega-form-field-controller.js +9 -9
  107. package/dist/collection/components/vega-form/slimmers/controllers/vega-form-field-validation-state-controller.js +5 -5
  108. package/dist/collection/components/vega-form/slimmers/renderers/native-form-renderer.js +4 -1
  109. package/dist/collection/components/vega-form/vega-form.js +32 -0
  110. package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +33 -1
  111. package/dist/collection/components/vega-input/vega-input.js +5 -4
  112. package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +34 -2
  113. package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +33 -1
  114. package/dist/collection/components/vega-input-passcode/vega-input-passcode.js +33 -1
  115. package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +33 -1
  116. package/dist/collection/components/vega-input-range/vega-input-range.js +33 -1
  117. package/dist/collection/components/vega-input-select/vega-input-select.js +35 -3
  118. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-manager.js +17 -1
  119. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.js +48 -5
  120. package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.js +18 -3
  121. package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.css +4 -0
  122. package/dist/collection/components/vega-rich-text-editor/constants/constant.js +3 -0
  123. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +29 -0
  124. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-or-decorator-node-strategy.js +10 -1
  125. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy.js +8 -3
  126. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-annotation-strategy.abstract.js +60 -0
  127. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.js +36 -4
  128. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-items-strategy.abstract.js +27 -0
  129. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-nest-items-strategy.js +74 -0
  130. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.js +81 -1
  131. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-selection.js +30 -0
  132. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.js +160 -9
  133. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.js +376 -10
  134. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-unnest-items-strategy.js +104 -0
  135. package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +2 -0
  136. package/dist/collection/components/vega-rich-text-editor/dto/actions/nest-list-items-action.js +12 -0
  137. package/dist/collection/components/vega-rich-text-editor/dto/actions/unnest-list-items-action.js +12 -0
  138. package/dist/collection/components/vega-rich-text-editor/dto/annotations/list-annotation.js +12 -0
  139. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +10 -1
  140. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +11 -3
  141. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +7 -1
  142. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.js +8 -4
  143. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.js +26 -3
  144. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.js +34 -1
  145. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.js +20 -3
  146. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +25 -1
  147. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/li-to-rte-list-item-block-strategy.js +2 -0
  148. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +29 -0
  149. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.js +1 -1
  150. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/keyboard-link-handler.js +297 -0
  151. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +13 -0
  152. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.js +30 -1
  153. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/abstract-list-keyboard-handler.js +204 -0
  154. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-shift-tab-outdent-handler.js +42 -0
  155. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-tab-indent-handler.js +34 -0
  156. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/list-keyboard-slimmer.js +180 -0
  157. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/link-toolbar-button-slimmer.js +8 -2
  158. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +33 -1
  159. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-editor-controller.js +398 -0
  160. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-editor-state-manager.js +111 -0
  161. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-type-config-controller.js +173 -0
  162. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/link-type-handler.js +49 -0
  163. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.js +114 -106
  164. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/utils/link-url-normalizer.js +80 -0
  165. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/vega-rich-text-link-editor.js +44 -1
  166. package/dist/collection/components/vega-section-title/slimmers/a11y-tree/build-section-title-a11y-tree.js +54 -0
  167. package/dist/collection/components/vega-section-title/slimmers/renderers/vega-section-title-renderer.js +4 -4
  168. package/dist/collection/components/vega-section-title/vega-section-title.js +18 -2
  169. package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.js +33 -1
  170. package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.js +33 -1
  171. package/dist/collection/components/vega-signature-capture/vega-signature-capture.js +33 -1
  172. package/dist/collection/components/vega-stepper/vega-stepper.js +34 -2
  173. package/dist/collection/components/vega-textarea/vega-textarea.js +34 -2
  174. package/dist/collection/components/vega-time-picker/vega-time-picker.js +33 -1
  175. package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.js +34 -2
  176. package/dist/collection/helpers/a11y-tree/a11y-node-dto.js +210 -0
  177. package/dist/collection/helpers/a11y-tree/a11y-tree-applier.js +189 -0
  178. package/dist/collection/helpers/a11y-tree/a11y-tree.types.js +48 -0
  179. package/dist/collection/helpers/a11y-tree/strategies/baseline-strategy.js +78 -0
  180. package/dist/collection/helpers/a11y-tree/strategies/firefox-nvda-strategy.js +56 -0
  181. package/dist/collection/helpers/a11y-tree/strategies/webkit-voiceover-strategy.js +140 -0
  182. package/dist/collection/helpers/a11y-tree/strategy-resolver.js +172 -0
  183. package/dist/collection/helpers/slimmers/a11y-tree-slimmer.js +54 -0
  184. package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +29 -0
  185. package/dist/collection/helpers/slimmers/element-appender/visibility-modifiers/clip-on-scroll-modifier.js +70 -0
  186. package/dist/collection/helpers/slimmers/element-appender/visibility-modifiers/visibility-modifier.interface.js +1 -0
  187. package/dist/collection/helpers/slimmers/{field-error-controller-silmmer.js → form/field-error-controller-silmmer.js} +3 -3
  188. package/dist/collection/helpers/slimmers/{field-error-ui-controller-slimmer.js → form/field-error-ui-controller-slimmer.js} +9 -9
  189. package/dist/collection/helpers/slimmers/{form-field-controller-slimmer.js → form/form-field-controller-slimmer.js} +9 -18
  190. package/dist/collection/helpers/slimmers/{form-field-message-translator.js → form/form-field-message-translator.js} +1 -1
  191. package/dist/collection/helpers/slimmers/{form-field-state-controller-slimmer.js → form/form-field-state-controller-slimmer.js} +1 -1
  192. package/dist/collection/helpers/slimmers/{form-field-valid-invoke-slimmer.js → form/form-field-valid-invoke-slimmer.js} +2 -2
  193. package/dist/collection/helpers/slimmers/form/utils/form-field-key.js +20 -0
  194. package/dist/collection/helpers/translation/locales/en.js +7 -0
  195. package/dist/collection/helpers/ui/element-appender.js +16 -0
  196. package/dist/collection/helpers/validator/form-field-controller.js +5 -4
  197. package/dist/esm/{app-globals-eafcc7a1.js → app-globals-d3991e53.js} +10 -10
  198. package/dist/esm/{code-block-e12588fe.js → code-block-8df86434.js} +1499 -52
  199. package/dist/esm/{component-value-history-controller-slimmer.abstract-4e8eb313.js → component-value-history-controller-slimmer.abstract-e4b95997.js} +3 -3
  200. package/dist/esm/{content-state-8032467a.js → content-state-c63fbeda.js} +106 -542
  201. package/dist/esm/{date-required-rule-b88e1650.js → date-required-rule-85334d0c.js} +1 -1
  202. package/dist/esm/{design-token-76bd217c.js → design-token-10ff79b5.js} +3 -3
  203. package/dist/esm/{element-appender-slimmer-7fcb944b.js → element-appender-slimmer-24be8e94.js} +117 -2
  204. package/dist/esm/{form-field-controller-slimmer-395c23e3.js → form-field-controller-slimmer-d8628837.js} +5 -14
  205. package/dist/esm/form-field-key-44ab39d0.js +22 -0
  206. package/dist/esm/{image-annotation-action-08a20d5e.js → image-annotation-action-fcceff95.js} +2 -2
  207. package/dist/esm/{image-extension-b6c7e4a7.js → image-extension-3280bdb0.js} +2 -2
  208. package/dist/esm/index.js +17 -17
  209. package/dist/esm/{inject-keyboard-manager-86126b5b.js → inject-keyboard-manager-ea1aad5b.js} +1 -1
  210. package/dist/esm/{internal-calendar-period-factory-3a07dba0.js → internal-calendar-period-factory-7b294fb6.js} +1 -1
  211. package/dist/esm/{internal-translation-controller-16709132.js → internal-translation-controller-fac22598.js} +7 -0
  212. package/dist/esm/{keyboard-manager-a0c3e1cf.js → keyboard-manager-50da85d7.js} +1 -1
  213. package/dist/esm/{keyboard-manager-slimmer-f3f66c15.js → keyboard-manager-slimmer-1f7c8bfb.js} +1 -1
  214. package/dist/esm/{link-extension-97fcb8fb.js → link-extension-f92c06ef.js} +3 -3
  215. package/dist/esm/loader.js +12 -12
  216. package/dist/esm/{month-view-generator-fd0e1856.js → month-view-generator-a1a9a4ec.js} +1 -1
  217. package/dist/esm/{public-rules-c06f0d2a.js → public-rules-3695aaf7.js} +7 -7
  218. package/dist/esm/{range-e999837f.js → range-717d552d.js} +1 -1
  219. package/dist/esm/{responsive-format-facade-ced96b0b.js → responsive-format-facade-f19b601c.js} +1 -1
  220. package/dist/esm/{rich-text-editor-required-rule-71f8ee98.js → rich-text-editor-required-rule-2e39264a.js} +1 -1
  221. package/dist/esm/{split-cell-operation-359f8082.js → split-cell-operation-6c26af91.js} +3 -3
  222. package/dist/esm/{state-border-formatter-b680e922.js → state-border-formatter-bfda33aa.js} +1 -1
  223. package/dist/esm/{string-format-strategy.abstract-23faab71.js → string-format-strategy.abstract-1f4ff1b3.js} +1 -1
  224. package/dist/esm/{string-input-formatter-slimmer-4b4866a6.js → string-input-formatter-slimmer-68b2af39.js} +1 -1
  225. package/dist/esm/{string-mask-strategy-66586cd8.js → string-mask-strategy-bbbcdbef.js} +2 -2
  226. package/dist/esm/{style-formatter-f4e16af5.js → style-formatter-e9adc8f4.js} +2 -2
  227. package/dist/esm/{time-required-rule-6e80a9ab.js → time-required-rule-1ce2d0a0.js} +1 -1
  228. package/dist/esm/{token-extension-f5bf9c21.js → token-extension-5082a4d2.js} +33 -9
  229. package/dist/esm/{translation-slimmer-21748a0e.js → translation-slimmer-ee0f0e76.js} +1 -1
  230. package/dist/esm/{type-guard-ec5e8628.js → type-guard-f2624334.js} +1 -1
  231. package/dist/esm/{valid-credit-card-number-rule-ca5a47d6.js → valid-credit-card-number-rule-60212b1d.js} +1 -1
  232. package/dist/esm/vega-accordion.entry.js +6 -6
  233. package/dist/esm/vega-app-header-button.entry.js +5 -5
  234. package/dist/esm/vega-backdrop.entry.js +63 -8
  235. package/dist/esm/vega-box.entry.js +6 -6
  236. package/dist/esm/vega-button-circle.entry.js +5 -5
  237. package/dist/esm/vega-button.entry.js +3 -3
  238. package/dist/esm/vega-calendar_5.entry.js +7 -7
  239. package/dist/esm/vega-card.entry.js +5 -5
  240. package/dist/esm/vega-carousel.entry.js +3 -3
  241. package/dist/esm/vega-checkbox_2.entry.js +20 -3
  242. package/dist/esm/vega-chip.entry.js +5 -5
  243. package/dist/esm/vega-code-block.entry.js +8 -8
  244. package/dist/esm/vega-color-picker.entry.js +11 -2
  245. package/dist/esm/vega-color-swatch-picker.entry.js +12 -3
  246. package/dist/esm/vega-color-swatch.entry.js +2 -2
  247. package/dist/esm/vega-combo-box.entry.js +17 -8
  248. package/dist/esm/vega-date-picker_2.entry.js +22 -13
  249. package/dist/esm/vega-dialog_2.entry.js +3 -3
  250. package/dist/esm/vega-divider.entry.js +5 -5
  251. package/dist/esm/vega-dropdown_5.entry.js +33 -10
  252. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  253. package/dist/esm/vega-field-label.entry.js +2 -2
  254. package/dist/esm/vega-file-uploader.entry.js +12 -3
  255. package/dist/esm/vega-flag-icon.entry.js +5 -5
  256. package/dist/esm/vega-flex.entry.js +6 -6
  257. package/dist/esm/vega-font.entry.js +5 -5
  258. package/dist/esm/vega-form.entry.js +28 -25
  259. package/dist/esm/vega-grid.entry.js +5 -5
  260. package/dist/esm/vega-icon.entry.js +5 -5
  261. package/dist/esm/vega-image-uploader.entry.js +14 -5
  262. package/dist/esm/vega-input-credit-card.entry.js +16 -7
  263. package/dist/esm/vega-input-numeric.entry.js +14 -5
  264. package/dist/esm/vega-input-passcode.entry.js +14 -5
  265. package/dist/esm/vega-input-phone-number.entry.js +13 -4
  266. package/dist/esm/vega-input-range.entry.js +12 -3
  267. package/dist/esm/vega-input-select.entry.js +14 -5
  268. package/dist/esm/vega-input.entry.js +9 -7
  269. package/dist/esm/vega-left-nav_5.entry.js +71 -11
  270. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  271. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
  272. package/dist/esm/vega-pagination.entry.js +4 -4
  273. package/dist/esm/vega-popover_2.entry.js +8 -8
  274. package/dist/esm/vega-progress-tracker_2.entry.js +3 -3
  275. package/dist/esm/vega-radio_2.entry.js +17 -5
  276. package/dist/esm/vega-rich-text-content.entry.js +86 -14
  277. package/dist/esm/vega-rich-text-editor_4.entry.js +2118 -447
  278. package/dist/esm/vega-rich-text-find-replace-panel.entry.js +1 -1
  279. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +5 -5
  280. package/dist/esm/vega-rich-text-table-properties_3.entry.js +8 -8
  281. package/dist/esm/vega-section-title.entry.js +897 -15
  282. package/dist/esm/vega-selection-chip_2.entry.js +13 -4
  283. package/dist/esm/vega-selection-tile_2.entry.js +11 -2
  284. package/dist/esm/vega-sidenav_3.entry.js +3 -3
  285. package/dist/esm/vega-signature-capture.entry.js +16 -7
  286. package/dist/esm/vega-stepper.entry.js +12 -3
  287. package/dist/esm/vega-table_11.entry.js +4 -4
  288. package/dist/esm/vega-textarea.entry.js +12 -3
  289. package/dist/esm/vega-time-picker_2.entry.js +18 -9
  290. package/dist/esm/vega-toggle-switch.entry.js +12 -3
  291. package/dist/esm/vega-tooltip_2.entry.js +6 -6
  292. package/dist/esm/vega.js +12 -12
  293. package/dist/sri/vega-sri-manifest.json +319 -315
  294. package/dist/types/components/vega-backdrop/slimmers/controller/vega-backdrop-visible-controller.d.ts +21 -0
  295. package/dist/types/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.d.ts +9 -1
  296. package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +9 -1
  297. package/dist/types/components/vega-color-picker/vega-color-picker.d.ts +9 -1
  298. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/vega-color-swatch-picker.d.ts +9 -1
  299. package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +15 -7
  300. package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +9 -1
  301. package/dist/types/components/vega-dropdown/types.d.ts +2 -2
  302. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +32 -9
  303. package/dist/types/components/vega-file-uploader/vega-file-uploader.d.ts +9 -1
  304. package/dist/types/components/vega-form/slimmers/controllers/vega-form-field-controller.d.ts +3 -2
  305. package/dist/types/components/vega-form/slimmers/renderers/native-form-renderer.d.ts +1 -0
  306. package/dist/types/components/vega-form/vega-form.d.ts +8 -0
  307. package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +9 -1
  308. package/dist/types/components/vega-input/vega-input.d.ts +3 -2
  309. package/dist/types/components/vega-input-credit-card/vega-input-credit-card.d.ts +9 -1
  310. package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +9 -1
  311. package/dist/types/components/vega-input-passcode/vega-input-passcode.d.ts +9 -1
  312. package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +9 -1
  313. package/dist/types/components/vega-input-range/vega-input-range.d.ts +9 -1
  314. package/dist/types/components/vega-input-select/vega-input-select.d.ts +15 -7
  315. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-manager.d.ts +7 -0
  316. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.d.ts +17 -0
  317. package/dist/types/components/vega-radio/vega-radio-group/vega-radio-group.d.ts +5 -1
  318. package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +3 -0
  319. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-annotation-strategy.abstract.d.ts +36 -0
  320. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.d.ts +14 -2
  321. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-items-strategy.abstract.d.ts +22 -0
  322. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-nest-items-strategy.d.ts +21 -0
  323. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.d.ts +14 -0
  324. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-selection.d.ts +15 -0
  325. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.d.ts +30 -3
  326. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.d.ts +99 -3
  327. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-unnest-items-strategy.d.ts +22 -0
  328. package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -0
  329. package/dist/types/components/vega-rich-text-editor/dto/actions/nest-list-items-action.d.ts +11 -0
  330. package/dist/types/components/vega-rich-text-editor/dto/actions/unnest-list-items-action.d.ts +11 -0
  331. package/dist/types/components/vega-rich-text-editor/dto/annotations/list-annotation.d.ts +8 -0
  332. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +6 -1
  333. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +5 -1
  334. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +2 -2
  335. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.d.ts +2 -0
  336. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.d.ts +8 -0
  337. package/dist/types/components/vega-rich-text-editor/extensions/link/type.d.ts +34 -0
  338. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +18 -0
  339. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.d.ts +4 -4
  340. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/keyboard-link-handler.d.ts +111 -0
  341. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +7 -0
  342. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.d.ts +8 -0
  343. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/abstract-list-keyboard-handler.d.ts +99 -0
  344. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-shift-tab-outdent-handler.d.ts +15 -0
  345. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-tab-indent-handler.d.ts +15 -0
  346. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/list-keyboard-slimmer.d.ts +73 -0
  347. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +9 -1
  348. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-editor-controller.d.ts +149 -0
  349. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-editor-state-manager.d.ts +84 -0
  350. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-type-config-controller.d.ts +82 -0
  351. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/link-type-handler.d.ts +33 -0
  352. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.d.ts +24 -17
  353. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/utils/link-url-normalizer.d.ts +37 -0
  354. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/types.d.ts +4 -0
  355. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/vega-rich-text-link-editor.d.ts +12 -0
  356. package/dist/types/components/vega-section-title/slimmers/a11y-tree/build-section-title-a11y-tree.d.ts +41 -0
  357. package/dist/types/components/vega-section-title/vega-section-title.d.ts +9 -0
  358. package/dist/types/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.d.ts +9 -1
  359. package/dist/types/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.d.ts +9 -1
  360. package/dist/types/components/vega-signature-capture/vega-signature-capture.d.ts +9 -1
  361. package/dist/types/components/vega-stepper/vega-stepper.d.ts +9 -1
  362. package/dist/types/components/vega-textarea/vega-textarea.d.ts +9 -1
  363. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +9 -1
  364. package/dist/types/components/vega-toggle-switch/vega-toggle-switch.d.ts +9 -1
  365. package/dist/types/components.d.ts +297 -14
  366. package/dist/types/helpers/a11y-tree/a11y-node-dto.d.ts +173 -0
  367. package/dist/types/helpers/a11y-tree/a11y-tree-applier.d.ts +28 -0
  368. package/dist/types/helpers/a11y-tree/a11y-tree.types.d.ts +137 -0
  369. package/dist/types/helpers/a11y-tree/strategies/baseline-strategy.d.ts +18 -0
  370. package/dist/types/helpers/a11y-tree/strategies/firefox-nvda-strategy.d.ts +16 -0
  371. package/dist/types/helpers/a11y-tree/strategies/webkit-voiceover-strategy.d.ts +23 -0
  372. package/dist/types/helpers/a11y-tree/strategy-resolver.d.ts +59 -0
  373. package/dist/types/helpers/slimmers/a11y-tree-slimmer.d.ts +49 -0
  374. package/dist/types/helpers/slimmers/element-appender/element-appender-slimmer.d.ts +9 -0
  375. package/dist/types/helpers/slimmers/element-appender/visibility-modifiers/clip-on-scroll-modifier.d.ts +37 -0
  376. package/dist/types/helpers/slimmers/element-appender/visibility-modifiers/visibility-modifier.interface.d.ts +56 -0
  377. package/dist/types/helpers/slimmers/{field-error-controller-silmmer.d.ts → form/field-error-controller-silmmer.d.ts} +1 -1
  378. package/dist/types/helpers/slimmers/{field-error-ui-controller-slimmer.d.ts → form/field-error-ui-controller-slimmer.d.ts} +2 -2
  379. package/dist/types/helpers/slimmers/{form-field-controller-slimmer.d.ts → form/form-field-controller-slimmer.d.ts} +6 -14
  380. package/dist/types/helpers/slimmers/{form-field-message-translator.d.ts → form/form-field-message-translator.d.ts} +2 -2
  381. package/dist/types/helpers/slimmers/{form-field-state-controller-slimmer.d.ts → form/form-field-state-controller-slimmer.d.ts} +2 -2
  382. package/dist/types/helpers/slimmers/{form-field-valid-invoke-slimmer.d.ts → form/form-field-valid-invoke-slimmer.d.ts} +3 -3
  383. package/dist/types/helpers/slimmers/form/utils/form-field-key.d.ts +17 -0
  384. package/dist/types/helpers/translation/interface.d.ts +7 -0
  385. package/dist/types/helpers/ui/element-appender.d.ts +7 -0
  386. package/dist/types/helpers/validator/form-field-controller.d.ts +3 -3
  387. package/dist/vega/index.esm.js +1 -1
  388. package/dist/vega/p-040ea356.entry.js +1 -0
  389. package/dist/vega/p-046203cb.entry.js +1 -0
  390. package/dist/vega/p-0499e65a.entry.js +1 -0
  391. package/dist/vega/{p-0be4df0a.js → p-0809c651.js} +1 -1
  392. package/dist/vega/{p-02355de8.js → p-09524fec.js} +1 -1
  393. package/dist/vega/{p-74f86ff9.entry.js → p-0cf3b5c1.entry.js} +1 -1
  394. package/dist/vega/p-10d43a80.entry.js +1 -0
  395. package/dist/vega/{p-3d6f761a.entry.js → p-1132a74e.entry.js} +1 -1
  396. package/dist/vega/{p-ba662fe5.js → p-12e8a1b2.js} +1 -1
  397. package/dist/vega/p-1d5e05d9.js +3 -0
  398. package/dist/vega/{p-3dee1e55.js → p-1e0a8fd3.js} +1 -1
  399. package/dist/vega/{p-919cddc3.js → p-1ea9ad9a.js} +1 -1
  400. package/dist/vega/p-21626b93.entry.js +1 -0
  401. package/dist/vega/p-21f608e8.entry.js +1 -0
  402. package/dist/vega/p-2540fd1c.entry.js +1 -0
  403. package/dist/vega/{p-9f201152.entry.js → p-26760c66.entry.js} +1 -1
  404. package/dist/vega/{p-892edf88.entry.js → p-2acf9b42.entry.js} +1 -1
  405. package/dist/vega/p-2bb60f89.js +1 -0
  406. package/dist/vega/{p-b1eb9ff0.js → p-2c2e8615.js} +1 -1
  407. package/dist/vega/p-2d158cbd.js +1 -0
  408. package/dist/vega/p-2d7388c9.entry.js +1 -0
  409. package/dist/vega/{p-b3a2ce06.entry.js → p-2eb8e167.entry.js} +1 -1
  410. package/dist/vega/p-2ff4ae1c.js +1 -0
  411. package/dist/vega/p-3488a3f1.entry.js +1 -0
  412. package/dist/vega/p-363ee8a5.entry.js +1 -0
  413. package/dist/vega/p-36c89520.entry.js +1 -0
  414. package/dist/vega/{p-e1737c8e.entry.js → p-3980dfa8.entry.js} +1 -1
  415. package/dist/vega/{p-14baa886.js → p-39c5054b.js} +1 -1
  416. package/dist/vega/p-3af5e87b.entry.js +1 -0
  417. package/dist/vega/{p-8db904dc.js → p-456f678b.js} +1 -1
  418. package/dist/vega/{p-6c9c2f8c.entry.js → p-461100b8.entry.js} +1 -1
  419. package/dist/vega/p-4c3a08be.entry.js +1 -0
  420. package/dist/vega/p-53fd3c41.entry.js +1 -0
  421. package/dist/vega/{p-6fcec7c7.entry.js → p-56417ec5.entry.js} +1 -1
  422. package/dist/vega/{p-8a001caa.js → p-5e37b041.js} +1 -1
  423. package/dist/vega/p-5f377954.js +1 -1
  424. package/dist/vega/{p-a0a58295.entry.js → p-5f96e741.entry.js} +1 -1
  425. package/dist/vega/p-65fee02f.entry.js +1 -0
  426. package/dist/vega/p-6b76b572.entry.js +1 -0
  427. package/dist/vega/{p-75e33859.js → p-6c95a6a3.js} +1 -1
  428. package/dist/vega/p-703ac992.entry.js +1 -0
  429. package/dist/vega/p-71909102.js +1 -0
  430. package/dist/vega/{p-e1b57e8f.entry.js → p-72ab5cd5.entry.js} +1 -1
  431. package/dist/vega/{p-8720816e.js → p-781b7a54.js} +1 -1
  432. package/dist/vega/{p-7950f3e2.entry.js → p-81d4dfcb.entry.js} +1 -1
  433. package/dist/vega/p-8611465f.entry.js +1 -0
  434. package/dist/vega/{p-0d18368b.js → p-874e5624.js} +1 -1
  435. package/dist/vega/{p-4fe40b76.js → p-8e7932bc.js} +1 -1
  436. package/dist/vega/p-8ed3b2b6.entry.js +1 -0
  437. package/dist/vega/{p-9c39f90b.entry.js → p-8ff92914.entry.js} +1 -1
  438. package/dist/vega/{p-9bdc6e11.entry.js → p-92528dc9.entry.js} +1 -1
  439. package/dist/vega/p-9664e914.entry.js +1 -0
  440. package/dist/vega/p-98fc5821.entry.js +1 -0
  441. package/dist/vega/{p-fe24b459.js → p-9be02fa5.js} +1 -1
  442. package/dist/vega/p-9c4c474e.entry.js +1 -0
  443. package/dist/vega/{p-8354cff0.entry.js → p-a034dfc0.entry.js} +1 -1
  444. package/dist/vega/{p-e48a870f.entry.js → p-a484e32d.entry.js} +1 -1
  445. package/dist/vega/{p-b9e72de2.entry.js → p-a8174ad8.entry.js} +1 -1
  446. package/dist/vega/{p-49e1cf4d.entry.js → p-a91927eb.entry.js} +1 -1
  447. package/dist/vega/{p-b187b82d.entry.js → p-abbceebf.entry.js} +1 -1
  448. package/dist/vega/{p-e4266b45.entry.js → p-ac94ba1b.entry.js} +1 -1
  449. package/dist/vega/{p-b775e51f.js → p-ae2abdfa.js} +1 -1
  450. package/dist/vega/{p-bb60e381.entry.js → p-aeb50cad.entry.js} +1 -1
  451. package/dist/vega/{p-a890d60b.entry.js → p-b00ec194.entry.js} +1 -1
  452. package/dist/vega/{p-f78944d7.entry.js → p-b3733762.entry.js} +1 -1
  453. package/dist/vega/p-b594a11c.entry.js +1 -0
  454. package/dist/vega/{p-b4e7c967.js → p-b622c455.js} +1 -1
  455. package/dist/vega/{p-1232b553.entry.js → p-b98ead05.entry.js} +1 -1
  456. package/dist/vega/{p-e5ff77f7.entry.js → p-c2277448.entry.js} +1 -1
  457. package/dist/vega/{p-9f7154d2.js → p-c29934ef.js} +1 -1
  458. package/dist/vega/p-c3646101.entry.js +1 -0
  459. package/dist/vega/p-ca270da3.entry.js +1 -0
  460. package/dist/vega/{p-b4c26035.entry.js → p-ccbe3f1b.entry.js} +1 -1
  461. package/dist/vega/{p-6cde45fc.js → p-cd69aeae.js} +1 -1
  462. package/dist/vega/{p-579cdeae.js → p-d25c1a48.js} +1 -1
  463. package/dist/vega/{p-5924adae.entry.js → p-d2cbcf5e.entry.js} +1 -1
  464. package/dist/vega/{p-df828d90.entry.js → p-d3413a78.entry.js} +1 -1
  465. package/dist/vega/{p-f1974321.js → p-d609c3fd.js} +1 -1
  466. package/dist/vega/{p-a7209700.js → p-dad7d2ac.js} +1 -1
  467. package/dist/vega/{p-61ce8029.js → p-dbb4b1d1.js} +1 -1
  468. package/dist/vega/p-dcd3e3a7.js +1 -0
  469. package/dist/vega/p-de8f0d98.js +1 -0
  470. package/dist/vega/{p-e235020b.entry.js → p-deaf037a.entry.js} +1 -1
  471. package/dist/vega/p-e1029acc.js +1 -0
  472. package/dist/vega/p-e18c0656.entry.js +1 -0
  473. package/dist/vega/p-e3fdb65c.entry.js +1 -0
  474. package/dist/vega/p-e7e963ba.entry.js +1 -0
  475. package/dist/vega/{p-f7e459cd.js → p-e9b005df.js} +1 -1
  476. package/dist/vega/{p-88be9ec5.js → p-e9d09211.js} +1 -1
  477. package/dist/vega/{p-3c309a38.js → p-f1078e63.js} +1 -1
  478. package/dist/vega/{p-595998d9.entry.js → p-f29ea345.entry.js} +1 -1
  479. package/dist/vega/p-f5095035.entry.js +1 -0
  480. package/dist/vega/{p-05d04c07.entry.js → p-f95d8d10.entry.js} +1 -1
  481. package/dist/vega/vega.esm.js +1 -1
  482. package/package.json +3 -2
  483. package/dist/vega/p-0512308f.entry.js +0 -1
  484. package/dist/vega/p-1d8312d3.entry.js +0 -1
  485. package/dist/vega/p-2d77ae73.entry.js +0 -1
  486. package/dist/vega/p-2d8d4d5b.entry.js +0 -1
  487. package/dist/vega/p-320091b7.js +0 -1
  488. package/dist/vega/p-36949349.js +0 -1
  489. package/dist/vega/p-38c9d782.js +0 -1
  490. package/dist/vega/p-4151f53a.entry.js +0 -1
  491. package/dist/vega/p-4ff48b84.js +0 -1
  492. package/dist/vega/p-513bc0d9.js +0 -1
  493. package/dist/vega/p-5e4517eb.entry.js +0 -1
  494. package/dist/vega/p-6680ba17.entry.js +0 -1
  495. package/dist/vega/p-80b7945a.entry.js +0 -1
  496. package/dist/vega/p-841b3281.entry.js +0 -1
  497. package/dist/vega/p-87e5cb56.entry.js +0 -1
  498. package/dist/vega/p-8d4b85e7.entry.js +0 -1
  499. package/dist/vega/p-91303402.entry.js +0 -1
  500. package/dist/vega/p-97215133.js +0 -1
  501. package/dist/vega/p-9d96d83f.entry.js +0 -1
  502. package/dist/vega/p-a05a2f1e.entry.js +0 -1
  503. package/dist/vega/p-a775825e.entry.js +0 -1
  504. package/dist/vega/p-ae146458.entry.js +0 -1
  505. package/dist/vega/p-b8c13ac9.entry.js +0 -1
  506. package/dist/vega/p-ba2b9663.entry.js +0 -1
  507. package/dist/vega/p-bbad318e.entry.js +0 -1
  508. package/dist/vega/p-c079c935.entry.js +0 -1
  509. package/dist/vega/p-c0e42c03.entry.js +0 -1
  510. package/dist/vega/p-c41f5684.entry.js +0 -1
  511. package/dist/vega/p-c54b5a8f.entry.js +0 -1
  512. package/dist/vega/p-c5d3b008.entry.js +0 -1
  513. package/dist/vega/p-cd1e976c.entry.js +0 -1
  514. package/dist/vega/p-d25ca0c3.entry.js +0 -1
  515. package/dist/vega/p-ebe32b25.entry.js +0 -1
  516. package/dist/vega/p-ec162599.entry.js +0 -1
  517. package/dist/vega/p-f4da615a.js +0 -3
  518. package/dist/vega/p-fc7e4c8a.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{g as t}from"./p-8b5d3a52.js";import{a as e,g as n,D as i,f as s,r}from"./p-528748fa.js";import{L as a,I as o}from"./p-6e1ab235.js";import{I as l,c}from"./p-afcd8f04.js";import{I as h}from"./p-781fd6e0.js";import{c as d}from"./p-6a334573.js";import{P as u}from"./p-81dd00d0.js";import{i as p}from"./p-8c30a60d.js";import{V as f}from"./p-874e5624.js";import{I as w}from"./p-39c5054b.js";import{R as g,a as b,b as m}from"./p-e9b005df.js";import{M as v,A as x,R as y,a as C,b as L,c as k,d as S,I as T,e as E,f as O,s as A,g as I,h as R,i as N,B,j as M,k as j,C as D,l as _,m as H,n as V,o as P,S as F,U as z,p as $,q as K,r as q,N as W,t as U,u as G}from"./p-2bb60f89.js";import{U as Z,V as Q,B as J,E as Y,h as X,I as tt,R as et,a as nt,P as it,A as st}from"./p-1d5e05d9.js";import{i as rt}from"./p-456f678b.js";import{V as at}from"./p-6031bed1.js";import{v as ot}from"./p-4866e390.js";import{D as lt,d as ct}from"./p-526e3634.js";import{V as ht,a as dt,b as ut,c as pt,d as ft}from"./p-5447a8e8.js";import{R as wt,a as gt,S as bt,T as mt,b as vt,c as xt,d as yt,e as Ct,C as Lt,M as kt,f as St,g as Tt,h as Et,i as Ot,j as At,k as It,l as Rt,m as Nt,n as Bt,o as Mt,p as jt,q as Dt,s as _t,r as Ht,t as Vt,I as Pt,u as Ft,v as zt,w as $t,x as Kt,y as qt,z as Wt,A as Ut,B as Gt,D as Zt,E as Qt,F as Jt,G as Yt,H as Xt,J as te,K as ee,L as ne,N as ie,O as se,P as re,Q as ae,U as oe,W as le,X as ce,Y as he}from"./p-8e7932bc.js";import{C as de}from"./p-2d0d575f.js";import{V as ue,a as pe,b as fe}from"./p-3a68b729.js";import{r as we}from"./p-77e64f26.js";import{V as ge,a as be}from"./p-3e09aeed.js";import{t as me}from"./p-b75ee3ba.js";import{p as ve}from"./p-0c667d6a.js";import{c as xe}from"./p-a841cf13.js";import{d as ye}from"./p-1bc5b3bc.js";import{c as Ce}from"./p-02841589.js";import{R as Le}from"./p-0809c651.js";import{c as ke}from"./p-890a5254.js";const Se=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaLoaderController is called",canAccept:(t,e)=>"VegaLoaderController"===t&&"load"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaLoaderController is called",canAccept:(t,e)=>"VegaLoaderController"===t&&"close"===e,payloadValue:()=>!0}];class Te{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Te,["load","close"],Se,"VegaLoaderController")}load(t={}){let e=t.containerSelector||"body",n=document.querySelector(e);if(n&&Te.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY.includes(n.tagName)&&(e="body",n=document.querySelector("body")),!n)return a.error("Container is not found by selector: ",e),null;const i=this.createLoadingIndicator(t.indicatorOptions),s=this.createLoader(e);return s.append(i),this.appendLoader(s,n)}close(t){const e=this.findLoader(t);if(e){if(e.dataset.container){const t=document.querySelector(e.dataset.container);t&&t.dataset.vegaLoaderOriginPosition&&(t.style.position=t.dataset.vegaLoaderOriginPosition)}e.remove()}}findLoader(t){var e,n;let i;if(t.includes(">>>")){const[s,r]=t.split(">>>");i=null===(n=null===(e=document.querySelector(s))||void 0===e?void 0:e.shadowRoot)||void 0===n?void 0:n.getElementById(r)}else i=document.getElementById(t);return i}createLoader(n){const i=document.createElement("vega-loader-wrapper");return i.className=e(["body"===n?"fixed-wrapper":"absolute-wrapper"]),i.dataset.container=n,i.id=`vega-loader-${t()}`,i}createLoadingIndicator(t={}){const e=document.createElement("vega-loading-indicator");return Object.assign(e,t),e}appendLoader(t,e){return e.dataset.vegaLoaderOriginPosition=e.style.position,e.style.position="relative",e.shadowRoot?(e.shadowRoot.append(t),`${t.dataset.container}>>>${t.id}`):(e.append(t),t.id)}}Te.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY=["VEGA-MODAL"],function(t,e,n,i){var s,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(a=(r<3?s(a):r>3?s(e,n,a):s(e,n))||a);r>3&&a&&Object.defineProperty(e,n,a)}([l()],Te.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ee=new Te,Oe=[{payloadKey:"IS_OPEN_METHOD_CALLED",payloadDescription:"Indicate if the method open of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"open"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSE_METHOD_CALLED",payloadDescription:"Indicate if the method close of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"close"===e,payloadValue:()=>!0},{payloadKey:"IS_CLOSEALL_METHOD_CALLED",payloadDescription:"Indicate if the method closeAll of public API VegaNotifyController is called",canAccept:(t,e)=>"VegaNotifyController"===t&&"closeAll"===e,payloadValue:()=>!0}];var Ae=function(t,e,n,i){var s,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(a=(r<3?s(a):r>3?s(e,n,a):s(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a};class Ie{constructor(){this.resizeObserverSlimmer=d(Ie,u,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{var e;!(t[0].contentRect.height>0)&&(null===(e=this.container)||void 0===e?void 0:e.classList.contains("hydrated"))&&(h.removeZIndex(this.container,"top"),this.container.remove(),this.container=null)},target:()=>this.container}]),this.vegaPublicAPIRuntimeMetricsSlimmer=c(Ie,["open","close","closeAll"],Oe,"VegaNotifyController")}async open(t){const e=this.createPageNotification(t);return this.getContainer().append(e),e.id}async closeAll(){this.container&&Array.from(this.container.children).forEach((t=>{t.close()}))}async close(t){await document.getElementById(t).close()}connectResizeObserver(){}createPageNotification(e){const s=document.createElement("vega-page-notification");return Object.keys(e).forEach((t=>{void 0!==e[t]&&(s[t]=e[t])})),s.style.marginBottom=n()===i.MOBILE?"12px":"16px",s.id=`vega-page-notification-${t()}`,s}getContainer(){return this.container||(this.container=document.createElement("vega-page-notification-list"),h.setZIndex(this.container,"top"),n()===i.MOBILE?this.container.classList.add("vega-page-notification-list-bottom"):this.container.classList.add("vega-page-notification-list-topRight"),document.body.append(this.container),this.connectResizeObserver()),this.container}}Ae([o()],Ie.prototype,"resizeObserverSlimmer",void 0),Ae([l()],Ie.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Re=new Ie,Ne=[{payloadKey:"IS_SETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method setSemantics of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:()=>!0},{payloadKey:"IS_GETSEMANTICS_METHOD_CALLED",payloadDescription:"Indicate if the method getSemantics of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"getSemantics"===e,payloadValue:()=>!0},{payloadKey:"IS_GETENABLEDEVENTIDSBYCOMPONENT_METHOD_CALLED",payloadDescription:"Indicate if the method getEnabledEventIdsByComponent of public API VegaEventManager is called",canAccept:(t,e)=>"VegaEventManager"===t&&"getEnabledEventIdsByComponent"===e,payloadValue:()=>!0},{payloadKey:"globalEventIsNative",payloadDescription:"Indicate if the vega components will emit events without the vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>!(!t.global||"native"!==t.global.namespace)},{payloadKey:"eventOfSpecificComponentsIsNative",payloadDescription:"Indicate if the vega components will emit events with the vega prefix, but special components will emit events without vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.components){const t=Object.keys(e.components);return!!(t.length>0&&"native"===e.components[t[0]].namespace)}return!1}},{payloadKey:"eventOfSpecificComponentsIsVega",payloadDescription:"Indicate if the vega components will emit events without the vega prefix, but special components will emit events with vega prefix",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.global&&e.components){const t=Object.keys(e.components);return!!("native"===e.global.namespace&&t.length>0&&"vega"===e.components[t[0]].namespace)}return!1}},{payloadKey:"globalJqueryDelegatedEventIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>!(!t.global||!0!==t.global.jqueryDelegatedEvent)},{payloadKey:"jqueryDelegatedEventIsCustomStrategy",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;return!!(e.global&&Array.isArray(e.global.jqueryDelegatedEvent)&&e.global.jqueryDelegatedEvent.length>0)}},{payloadKey:"jqueryDelegatedEventOfSpecialComponentsIsTrue",payloadDescription:"Indicate if the use jQuery with event delegation",canAccept:(t,e)=>"VegaEventManager"===t&&"setSemantics"===e,payloadValue:t=>{const e=t;if(e.components){const t=Object.keys(e.components);return!!(t.length>0&&!0===e.components[t[0]].jqueryDelegatedEvent)}return!1}}];class Be{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Be,["setSemantics","getSemantics","getEnabledEventIdsByComponent"],Ne,"VegaEventManager")}setSemantics(t){p.setSemantics(t)}getSemantics(t){return p.getSemantics(t)}getEnabledEventIdsByComponent(t){return p.getEnabledEventIdsByComponent(t)}}!function(t,e,n,i){var s,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(a=(r<3?s(a):r>3?s(e,n,a):s(e,n))||a);r>3&&a&&Object.defineProperty(e,n,a)}([l()],Be.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Me=new Be,je=[{payloadKey:"IS_OVERRIDEZINDEXBASICVALUES_METHOD_CALLED",payloadDescription:"Indicate if the method overrideZIndexBasicValues of public API ZIndexManager is called",canAccept:(t,e)=>"VegaZIndexManager"===t&&"overrideZIndexBasicValues"===e,payloadValue:()=>!0},{payloadKey:"zIndexBasicValuesGreatThanTenThousand",payloadDescription:"Indicate if the basic z-index value is great than ten thousand",canAccept:(t,e)=>"VegaZIndexManager"===t&&"overrideZIndexBasicValues"===e,payloadValue:t=>t.base>1e4}];class De{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(De,["overrideZIndexBasicValues"],je,"VegaZIndexManager")}overrideZIndexBasicValues(t){h.overrideZIndexBasicValues(t)}}!function(t,e,n,i){var s,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(a=(r<3?s(a):r>3?s(e,n,a):s(e,n))||a);r>3&&a&&Object.defineProperty(e,n,a)}([l()],De.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const _e=new De,He=[{payloadKey:"IS_WAITFORVEGA_METHOD_CALLED",payloadDescription:"Indicate if the method waitForVega of public API WaitForVegaHandler is called",canAccept:(t,e)=>"WaitForVegaHandler"===t&&"handle"===e,payloadValue:()=>!0}];class Ve{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Ve,["handle"],He,"WaitForVegaHandler")}async handle(){return await Promise.all(Array.from(document.querySelectorAll("*:not(.hydrated)")).filter((t=>t.tagName.startsWith("VEGA"))).map((t=>{var e;return null===(e=t.componentOnReady)||void 0===e?void 0:e.call(t)})))}}!function(t,e,n,i){var s,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(a=(r<3?s(a):r>3?s(e,n,a):s(e,n))||a);r>3&&a&&Object.defineProperty(e,n,a)}([l()],Ve.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Pe=new Ve,Fe=async()=>Pe.handle(),ze=[{payloadKey:"IS_LOAD_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"load"===e,payloadValue:()=>!0},{payloadKey:"IS_UNLOAD_METHOD_CALLED",payloadDescription:"Indicate if the method unLoad of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"unLoad"===e,payloadValue:()=>!0},{payloadKey:"IS_UNLOADALL_METHOD_CALLED",payloadDescription:"Indicate if the method unLoadAll of public API VegaSkeletonLoaderController is called",canAccept:(t,e)=>"VegaSkeletonLoaderController"===t&&"unLoadAll"===e,payloadValue:()=>!0}];class $e{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c($e,["load","unLoad","unLoadAll"],ze,"VegaSkeletonLoaderController"),this.loaderMap=new Map}load({target:e,type:n="text",width:i,height:s,items:r,layout:a}){const o=Array.from(document.body.querySelectorAll(e)),l=`vega-skeleton-loader-${t()}`,c=[];return o.forEach((t=>{const e=r?r.map(this.createSkeleton):[this.createSkeleton({type:n,width:i,height:s})],o=(a?[this.wrapLayout(e,a)]:e).map((t=>(t.dataset[$e.LOADER_DATA_SET_KEY]=l,t)));c.push(...o),t.append(...o)})),this.loaderMap.set(l,c),l}unLoad(t){this.loaderMap.has(t)&&(this.loaderMap.get(t).forEach((t=>t.remove())),this.loaderMap.delete(t))}unLoadAll(){for(const t of this.loaderMap.values())t.forEach((t=>t.remove()));this.loaderMap.clear()}createSkeleton(t){const{type:e,width:n,height:i}=t,s=document.createElement("vega-skeleton");return Object.assign(s,{animated:!0,type:e,width:n,height:i}),s}wrapLayout(t,e){const n=document.createElement("vega-flex");return Object.assign(n,Object.assign({className:"vega-skeleton-loader-template-container"},e.props)),Object.assign(n.style,e.style),n.append(...t),n}}$e.LOADER_DATA_SET_KEY="vegaSkeletonLoaderKey",function(t,e,n,i){var s,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(a=(r<3?s(a):r>3?s(e,n,a):s(e,n))||a);r>3&&a&&Object.defineProperty(e,n,a)}([l()],$e.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ke=new $e,qe=[{payloadKey:"IS_INIT_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.init is called",canAccept:(t,e)=>"TranslationController"===t&&"init"===e,payloadValue:()=>!0},{payloadKey:"IS_CHANGE_LANGUAGE_METHOD_CALLED",payloadDescription:"Indicate if the method load of public API VegaTranslation.changeLanguage is called",canAccept:(t,e)=>"TranslationController"===t&&"changeLanguage"===e,payloadValue:()=>!0}];class We{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(We,["init","changeLanguage"],qe,"TranslationController")}get currentLanguage(){return f.currentLanguage}init(t){f.init(t)}changeLanguage(t){f.changeLanguage(t)}}!function(t,e,n,i){var s,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(a=(r<3?s(a):r>3?s(e,n,a):s(e,n))||a);r>3&&a&&Object.defineProperty(e,n,a)}([l()],We.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Ue=new We;class Ge{static fromDate(t,e="month",n,i=!0){const s=w.createCalendarPeriod(t,e,n,i);return w.toCalendarPeriodType(s)}}class Ze{constructor(){this.dropdownEl=null,this.itemsContainerEl=null,this.buttonEl=null}isHidden(t){return t.sourceEditMode}getExtensionContext(t){return g.getExtensionContext(t)}renderDropdown(t,e,n,i){return t("vega-dropdown",Object.assign({trigger:"click",searchable:!1,maxWidth:"200",itemDisplayRule:"ellipsis",isScreenPosition:!0,ref:t=>{this.dropdownEl=t,lt.addUniqueObserverToNode(t,ht,(t=>{this.handleDropdownClick(t.detail,e)}))}},n),i)}renderDropdownListTemplate(t,e,n){return t("div",{slot:"items",onMouseDown:this.preventDefault,onKeyDown:t=>this.handleItemsKeyDown(t),ref:t=>{this.itemsContainerEl=t},class:"rte-dropdown-list"},[t("style",{nonce:ot.nonce},".rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }"),...e.map((e=>"children"in e?this.renderDropdownGroup(t,e,n):this.renderDropdownItem(t,e,n)))])}renderDropdownItem(t,e,n){return t("vega-dropdown-item",{key:e.key,itemKey:e.key,label:n.translation.t(e.label),prefixIcon:e.icon})}renderDropdownGroup(t,e,n){return t("vega-dropdown-group",{key:e.key,label:n.translation.t(e.label),divide:!1},e.children.map((e=>"children"in e?this.renderDropdownGroup(t,e,n):this.renderDropdownItem(t,e,n))))}renderButton(t,e,n){const{icon:i,label:s,showArrowIcon:r,tooltip:a}=n,o=this.isDisabled(e),l=t("vega-rich-text-editor-toolbar-button",{disabled:o,icon:i,hidden:this.isHidden(e),selected:this.isSelected(e),ref:t=>{this.buttonEl=t,lt.addUniqueObserverToNode(t,dt,(()=>this.handleButtonClick(e)))},onMouseDown:this.preventDefault,onKeyDown:t=>this.handleButtonKeyDown(t)},[this.renderButtonLabel(t,e,s),r?t("vega-icon",{size:"size-8",color:o?"text-disabled":"text-secondary",style:{marginLeft:"8px"},icon:at.getIconKey("chevron-down")}):null].filter(rt));return(null==a?void 0:a.text)?t("vega-tooltip",{text:e.translation.t(a.text),placement:["bottom","top"]},[l]):l}renderButtonLabel(t,e,n){return n?t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary"},e.translation.t(n)):null}isDisabled(t){return t.host.disabled}isSelected(t){return!1}preventDefault(t){t.preventDefault()}getListItemByKey(t,e){for(const n of t)if("children"in n){const t=this.getListItemByKey(n.children,e);if(t)return t}else if(n.key===e)return n;return null}handleButtonKeyDown(t){this.dropdownEl&&("Enter"===t.code||"Space"===t.code?(t.preventDefault(),t.stopPropagation(),this.dropdownEl.dispatchEvent(new MouseEvent("click",{bubbles:!0}))):"ArrowDown"!==t.code&&"ArrowUp"!==t.code||(t.preventDefault(),t.stopPropagation(),this.dropdownEl.show().then((()=>{this.focusDropdownItem("ArrowDown"===t.code?"first":"last")}))))}handleItemsKeyDown(t){var e,n,i;if("Escape"===t.code)return t.preventDefault(),t.stopPropagation(),this.dropdownEl&&this.dropdownEl.hide(),void(null===(e=this.buttonEl)||void 0===e||e.focus());if("ArrowDown"!==t.code&&"ArrowUp"!==t.code)return;t.preventDefault(),t.stopPropagation();const s=this.getDropdownItems();if(0===s.length)return;const r=s.findIndex((t=>{var e,n;return(null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("li"))===(null===(n=t.shadowRoot)||void 0===n?void 0:n.activeElement)})),a="ArrowDown"===t.code?1:-1,o=-1===r?"ArrowDown"===t.code?0:s.length-1:r+a;for(let t=0;t<s.length;t++){const e=(o+t*a+s.length)%s.length;if(!s[e].disabled)return void(null===(i=null===(n=s[e].shadowRoot)||void 0===n?void 0:n.querySelector("li"))||void 0===i||i.focus())}}focusDropdownItem(t){var e,n;const i=this.getDropdownItems(),s="first"===t?i:[...i].reverse();for(const t of s)if(!t.disabled)return void(null===(n=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("li"))||void 0===n||n.focus())}getDropdownItems(){return this.itemsContainerEl?Array.from(this.itemsContainerEl.querySelectorAll("vega-dropdown-item")):[]}}class Qe extends v{constructor(t,e){super(),this.type="INSERT_TOKEN_NODE",this.rteRange=null,this.actionHandleResult=!1,this.rteRange=t,this.token=e}}class Je extends Ze{constructor(t){super(),this.tokenList=[],this.tokenList=t}render(t,e){return this.renderDropdown(t,e,{},[this.renderButton(t,e,{label:"Tokens",showArrowIcon:!0,tooltip:{text:"Insert token"}}),this.renderDropdownListTemplate(t,this.tokenList,e)])}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,[i]=n();return i?t.disabled||!x.canHandle("INSERT_TOKEN_NODE",i.parent):t.disabled}return!1}handleButtonClick(t){}handleDropdownClick(t,e){const n=this.getListItemByKey(this.tokenList,t),{rteRange:i}=e,{startNode:s}=i;if(s&&s.parent){const t=new Qe(i,n);s.parent.apply(t),t.actionHandleResult&&this.flushEditorUI(e)}}flushEditorUI(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,flushValue:n}=e;n(t.value)}}}class Ye extends y{constructor(t,e,n,i,s){super(t,n,i,s),this.dtoName=Ye.dtoName,this.type="token",this.token=e,this.text=n}static from(t,e){const n=new Ye(t.id,t.token,t.text,e);return t.annotations&&(n.annotationMap=this.generateTextAnnotationMap(t.annotations)),n}toJSON(){const t=super.toJSON();return Object.assign({id:this.id,type:this.type,text:this.text,token:this.token},t.annotations?{annotations:t.annotations}:{})}isContentEditable(){return!1}clone(t){return new Ye(this.id,this.token,this.text,t,this.annotationMap)}toHtml(){return`<span class="token" contenteditable="false" template-token-key="${this.token}" token-key="${this.token}"${super.generateAttributeString()}>${this.text}</span>`}}Ye.dtoName="RTETokenNode";class Xe extends b{doRender(t,e,n){const{id:i,token:s}=e;return t("span",Object.assign(Object.assign({key:i,"template-token-key":s,"token-key":s,contenteditable:"false",style:e.getStyles(),class:`token ${e.getClasses()}`},this.additionalAttributes(e)),{ref:this.useRef(e),onClick:t=>{t.preventDefault(),n&&!1!==n.editable&&this.handleTokenElementClick(t,e,n.host)}}),e.text)}injectRTEScopeStyles(){return"span[token-key]{padding: 0 2px; margin: 0 1px; background-color: rgba(var(--v-bg-status-info, 205,209,211))}"}handleTokenElementClick(t,e,n){t.preventDefault(),n&&n.value.apply(new Z(e,void 0,!0))}additionalAttributes(t){const e=t.getCustomAttributesAnnotation();let n={wrapped:"true"};return e&&(n=Object.assign(Object.assign({},n),e.render())),n}}class tn extends Ze{constructor(t,e,n=""){super(),this.languageList=[],this.languageChangeCallback=null,this.selectedLanguage="",this.labelRef=null,this.translation=null,this.handleDropdownClick=t=>{this.setSelectedLanguage(t),"function"==typeof this.languageChangeCallback&&this.languageChangeCallback(t)},this.languageList=t,this.languageChangeCallback=e,this.selectedLanguage=n}setSelectedLanguage(t){var e;if(this.selectedLanguage=t,(null===(e=this.labelRef)||void 0===e?void 0:e.firstChild)&&this.translation){const e=this.getLanguageLabelByKey(t);this.labelRef.firstChild.nodeValue=this.translation.t(e)}}isHidden(){return!1}render(t,e){const n=this.languageList.map((t=>this.translateDropdownEntry(t,e)));return this.renderDropdown(t,e,{source:n},[this.renderButton(t,e,{label:this.getLanguageLabelByKey(this.selectedLanguage),showArrowIcon:!0,tooltip:{text:"Select language"}})])}renderButtonLabel(t,e,n){return this.translation=e.translation,t("vega-font",{variant:"font-field-label-sm",color:this.isDisabled(e)?"text-disabled":"text-primary",ref:t=>{this.labelRef=t}},e.translation.t(n))}handleButtonClick(t){}getLanguageLabelByKey(t){var e;const n=this.getListItemByKey(this.languageList,t);return null!==(e=null==n?void 0:n.label)&&void 0!==e?e:"Select Language"}translateDropdownEntry(t,e){const n=e.translation.t(t.label);return Object.assign(Object.assign({},t),"children"in t?{label:n,children:t.children.map((t=>this.translateDropdownEntry(t,e)))}:{label:n})}}class en extends m{constructor(t,e){super(),this.languageToolbarButtonRenderer=null,this.languageState={selectedLanguage:"",contentMap:{}},this.languageChangeCallBack=t=>{const e=this.languageState.selectedLanguage;this.extensionContext&&e&&(this.languageState.contentMap[e]=this.getRTELatestValue(this.extensionContext.host)),this.languageState.selectedLanguage=t,this.applyLanguageContent(t,this.languageState.contentMap)},this.languageList=t,e&&(this.languageState=Object.assign(Object.assign({},this.languageState),e)),!this.languageState.selectedLanguage&&t.length>0&&(this.languageState.selectedLanguage=t[0].key)}prepareBeforeLoad(t){this.languageToolbarButtonRenderer=new tn(this.languageList,this.languageChangeCallBack,this.languageState.selectedLanguage),this.registerToolbarButtonRenderer(en.TOOLBAR_BUTTON_KEY,this.languageToolbarButtonRenderer,t)}initialExtensionAfterLoad(t){super.initialExtensionAfterLoad(t);const{selectedLanguage:e,contentMap:n}=this.languageState;this.languageToolbarButtonRenderer&&this.languageToolbarButtonRenderer.setSelectedLanguage(e),n&&n[e]&&this.applyLanguageContent(this.languageState.selectedLanguage,this.languageState.contentMap)}setState(t){const{selectedLanguage:e,contentMap:n}=t;this.languageToolbarButtonRenderer&&this.languageToolbarButtonRenderer.setSelectedLanguage(e),this.languageState.selectedLanguage=e,this.languageState.contentMap=Object.assign({},n),this.applyLanguageContent(e,n)}getState(){const{selectedLanguage:t,contentMap:e}=this.languageState;return this.extensionContext&&(e[t]=this.getRTELatestValue(this.extensionContext.host)),this.languageState}applyLanguageContent(t,e){if(this.extensionContext&&e){let n=e[t];const{host:i,flushValue:s}=this.extensionContext;n=n?n instanceof Q?n:Q.fromJSON(n,i.sourceEditConfig):Q.createEmptyContent(),i.value!==n&&s(n,!0)}}getRTELatestValue(t){var e;let n=t.value;if(this.extensionContext&&this.extensionContext.isSourceEditMode()&&t.shadowRoot){const i=t.shadowRoot.querySelector(".source-view-container vega-code-block");if(i){let s;t.sourceEditConfig&&(s={autoMatchFormat:null===(e=t.sourceEditConfig.autoMatchFormat)||void 0===e||e,filterInlineStyles:t.sourceEditConfig.filterInlineStyles}),n=Q.fromHtml(i.value.code,s)}}return n}}en.TOOLBAR_BUTTON_KEY="languages";class nn extends v{constructor(t){super(),this.type="INSERT_FUNCTION_BLOCK",this.functionType=t}}class sn extends C{constructor(t){super(t),this.dtoName=sn.dtoName,this.type="function-block",this.children=[]}static from(t,e){const n=new sn(t.id),i={customClass:["statement"]};let{annotations:s}=t;return s=s?Object.assign(Object.assign({},s),i):i,super.convertAnnotationsToMap(n.annotationMap,s),n.children=this.generateBlockChildren(t.children,e,n),n}toHtml(){return`<div class="statement">${this.children.map((t=>t instanceof L?`<div class="statementelement"${this.getFunctionContentStyle(t)}>${t.getChildrenHtml()}</div>`:t.toHtml())).join("")}</div>`}clone(e){const n=new sn(t());return n.parent=e,n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,children:this.children.map((t=>t.toJSON()))})}getFunctionContentStyle(t){const e=new k(t);let n=e.toCssText({standalone:!0});const i=t.getAnnotationByType("TEXT_STYLE");if(i&&"paragraph"===i.textStyle){const t=e.toCssText(void 0,void 0,i.renderStyle({standalone:!0}));n=n.replace(t,"").trim()}return n?` style="${n}"`:""}}sn.dtoName="RTEFunctionBlock";class rn extends S{handleAction(t,e){const{functionType:n}=t,i=this.getFunctionBlock(n),s=this.createNewParagraph(""),r=this.getReferenceBlock(e);r?r.parent.apply(new T(r,i,s)):e.apply(new E([i,s])),s&&(t.nextFocusNode=s.children[0])}getFunctionBlock(e){const n=t();return sn.from({id:n,type:"function-block",children:[{id:`${n}-1`,type:"logic-control-block",statementText:e.toUpperCase()},{id:`${n}-2`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${n}-2-1`,type:"text",text:" "}]},{id:`${n}-3`,type:"logic-control-block",statementText:"SHOW"},{id:`${n}-4`,annotations:{customClass:["statementelement"]},type:"paragraph",nodes:[{id:`${n}-4-1`,type:"text",text:" "}]}]})}getReferenceBlock(t){if(!(t instanceof Q)){const e=t.parent;return e instanceof sn?e:t}}}class an extends O{constructor(t,e,n){super(t),this.dtoName=an.dtoName,this.type="logic-control-node",this.text="",this.text=e,this.parent=n}clone(){return new an(this.id,this.text,this.parent)}toHtml(){return this.text}toJSON(){return{id:this.id,type:this.type,text:this.text}}getRangeEndOffset(){return 1}getRangeContainer(){const t=A.getDOMByEntity(this);if(t)return t.parentElement}isContentEditable(){return!1}}an.dtoName="RTELogicControlNode";class on extends C{constructor(t,e,n){super(t),this.dtoName=on.dtoName,this.type="logic-control-block",this.children=[],this.statementText="",this.statementText=e,this.children=[new an(`${t}-node-1`,e,this)],n&&(this.parent=n)}static from(t){return new on(t.id,t.statementText)}isNotEmpty(){return!0}getLastNode(){return this.children[this.children.length-1]}toHtml(){return`<div class='statementsyntax' contenteditable='false'>${this.statementText}</div>`}clone(t){return new on(this.id,this.statementText,t)}toJSON(){return{id:this.id,type:this.type,statementText:this.statementText}}}on.dtoName="RTELogicControlBlock";class ln extends Ze{render(t,e){return this.renderDropdown(t,e,{},[this.renderButton(t,e,{label:"Functions",showArrowIcon:!0,tooltip:{text:"Insert function"}}),this.renderDropdownListTemplate(t,ln.FUNCTION_LIST,e)])}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,i=n()[0];let s=!0;return i&&(s=x.canHandle("INSERT_FUNCTION_BLOCK",i.parent)),t.disabled||!s}return!1}handleButtonClick(){throw new Error("Method not implemented.")}handleDropdownClick(t,e){if(e){const n=this.getExtensionContext(e.host);if(n){const{host:e,getSelectedNodes:i}=n,s=i()[0],r=new nn(t);s?s.parent&&s.parent.apply(r):e.value.apply(r),r.nextFocusNode&&e.value.apply(new Z(r.nextFocusNode,1))}}}}ln.FUNCTION_LIST=[{key:"IF",label:"Conditional"},{key:"FOREACH",label:"Foreach"}];class cn extends b{doRender(t,e){return t("div",{key:e.id,class:"statementsyntax",ref:this.useRef(e)},t("span",{key:`${e.id}-1`,contenteditable:"false",ref:this.useRef(e.children[0])},e.statementText))}}class hn extends J{constructor(){super(...arguments),this.blockClassName="statementsyntax"}canHandle(t,e){const n=t[e];return n&&n.nodeType===Node.ELEMENT_NODE&&n.classList.contains(this.blockClassName)&&this.isFunctionBlockChild(n)?1:0}handle(e){const n=e[0];return on.from({id:t(),type:"logic-control-block",statementText:n.innerText})}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isFunctionBlockChild(t){return!(!t.parentElement||!t.parentElement.classList.contains("statement"))}}class dn extends b{doRender(t,e){return t("div",{key:e.id,class:this.getElementClassName(e),ref:this.useRef(e)})}injectRTEScopeStyles(){return"div.statement{padding:2px 4px;background:rgba(var(--v-bg-accent3-secondary, 255, 239, 200));border:1px solid rgba(var(--v-bg-accent3-primary, 255, 220, 131));border-radius:4px;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;gap:4px}div.statement .statementsyntax{padding:3px 0;line-height:22px}.rich-text-content div.statement .statementsyntax,.rich-text-content div.statement .statementelement{display:inline-block}div.statement+div.statement{margin-top:2px}div.statement .statementsyntax span{color:rgb(38, 42, 255);font-weight:bold}div.statement .statementelement{padding:2px 4px;background:rgba(var(--v-bg-secondary, 245, 247, 247));border:1px solid rgba(var(--v-border-color-input-field, 171, 198, 216));border-radius:4px;margin:0;min-width:8px}"}getElementClassName(t){let e=t.getClasses();return e.indexOf("statement")<0&&(e="statement "+e),e.trim()}}class un{}class pn extends un{canIntercept(t,e){return e.parent&&e.parent instanceof sn}intercept(t,e,n){const i=new tt(n.children[0],0);i.isFlushable=!0,n.parent.apply(i)}}class fn extends S{handleAction(t,e){const n=this.createNewParagraph("");n&&(e.parent.apply(new T(e,n)),t.newBlock=n,this.focusToNextLine(n))}focusToNextLine(t){const e=this.getRootContent(t);e&&e.apply(new Z(t.children[0],1))}}class wn extends v{constructor(t,e,n){super(),this.type="PASTE_PLAIN_TEXT",this.blocksToBeInserted=t,this.startNode=e,this.startOffset=n}}class gn extends pn{intercept(t,e,n){const{blocksToBeInserted:i,rteRange:s}=e;let{startNode:r,startOffset:a}=e;s&&(r=s.startNode,a=s.startOffset);const o=new wn(i,r,a);n.apply(o)}}class bn extends S{handleAction(t,e){const{blocksToBeInserted:n,startNode:i,startOffset:s}=t;if(i instanceof y){const t=n.flatMap((t=>t instanceof L?(this.copyLinkGroupAnnotations(e.annotationMap,t.annotationMap),t.children):[]));t.length>0&&(e.apply(s>0?new T(i,...t):new I(i,...t)),this.focusToNextLine(t[t.length-1],t[t.length-1].getRangeEndOffset()))}}focusToNextLine(t,e){const n=this.getRootContent(t);n&&n.apply(new Z(t,e))}copyLinkGroupAnnotations(t,e){if(e&&e.has(R.LINK_GROUP)){const n=e.get(R.LINK_GROUP);t.has(R.LINK_GROUP)?n.linkGroups.forEach(((e,n)=>{t.get(R.LINK_GROUP).linkGroups.set(n,e)})):t.set(R.LINK_GROUP,e.get(R.LINK_GROUP))}}}const mn=new hn,vn=new class extends hn{constructor(){super(...arguments),this.blockClassName="statementelement"}handle(e,n){const i=X.generate(L,e[0]),s=Array.from(e[0].childNodes);return L.from({id:t(),type:"paragraph",annotations:Object.assign({customClass:[this.blockClassName]},i),nodes:this.generateChildNodes(s,void 0,n)})}},xn=new class extends Y{canHandle(t,e){const n=t[e];return n&&"DIV"===n.tagName&&n.classList.contains("statement")&&n.childNodes.length&&n.querySelector(".statementsyntax")?1:0}handle(){return sn.from({id:t(),type:"function-block",annotations:{customClass:["statement"]},children:[]})}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}};class yn extends m{constructor(){super(),this.registerBlockBasicStrategies(on.name),this.registerBlockBasicStrategies(sn.name),this.preventFunctionBlockDefaultInsertNewParagraph(),this.registerNode("logic-control-block",on),this.registerRenderer("logic-control-block",new cn),this.registerNode("function-block",sn),this.registerRenderer("function-block",new dn),this.registerElementToBlockDTOClassStrategy(mn),this.registerElementToBlockDTOClassStrategy(vn),this.registerElementToBlockDTOClassStrategy(xn)}prepareBeforeLoad(t){this.registerToolbarButtonRenderer(yn.TOOLBAR_BUTTON_KEY,new ln,t)}preventFunctionBlockDefaultInsertNewParagraph(){this.unRegisterStrategy(N.INSERT_NEW_PARAGRAPH,on.name),this.unRegisterStrategy(N.APPEND_CHILDREN,sn.name),this.unRegisterStrategy(N.INSERT_CHILDREN_AFTER,sn.name),this.unRegisterStrategy(N.INSERT_CHILDREN_BEFORE,sn.name),this.unRegisterStrategy(N.PASTE_CONTENT,on.name),m.registerActionHandleStrategy(sn.name,N.INSERT_NEW_PARAGRAPH,new fn)}}(()=>{const t=new rn;m.registerActionHandleStrategy(Q.name,"INSERT_FUNCTION_BLOCK",t),m.registerActionHandleStrategy(L.name,"INSERT_FUNCTION_BLOCK",t),m.registerActionHandleStrategy(et.name,"INSERT_FUNCTION_BLOCK",t),m.registerActionHandleStrategy(on.name,"INSERT_FUNCTION_BLOCK",t),m.registerActionHandleStrategy(L.name,"PASTE_PLAIN_TEXT",new bn),m.registerActionHandlerInterceptor(L.name,N.INSERT_NEW_PARAGRAPH,new pn),m.registerActionHandlerInterceptor(L.name,N.PASTE_CONTENT,new gn)})(),yn.TOOLBAR_BUTTON_KEY="functions";class Cn extends v{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_BLOCK",this.tableBlock=t}}class Ln extends B{constructor(){super(...arguments),this.type=wt.CAPTION}static getDefaultStyles(){return{padding:"8px",border:"1px solid #ddd",borderBottom:"none",position:"relative",textAlign:"center",minHeight:"22px"}}clone(){return new Ln}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--extension-table-caption"}renderStyle(t){return(null==t?void 0:t.standalone)?Object.assign(Object.assign({},Ln.getDefaultStyles()),{backgroundColor:this.getCaptionBackgroundColor()}):null}toJSON(){return{caption:!0}}getCaptionBackgroundColor(){return ge.isDarkMode()?gt.dark:gt.light}}class kn extends C{constructor(t,e){super(t),this.dtoName=kn.dtoName,this.type="table-caption";const{autoMatchFormat:n}=e||{autoMatchFormat:!0};n&&this.annotationMap.set(wt.CAPTION,new Ln)}static from(t,e){const n=new kn(t.id,e),i=t.annotations||{},{caption:s}=i,r=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n}(i,["caption"]);return s&&n.annotationMap.set(wt.CAPTION,new Ln),super.convertAnnotationsToMap(n.annotationMap,Object.assign({},r)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new kn(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.isNotEmpty()))}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<caption${super.generateAttributeString(t)}>${e}</caption>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}x.register(N.INSERT_CHILDREN_BEFORE,kn.name,new nt),x.register(N.PASTE_CONTENT,kn.name,new it),kn.dtoName="RTETableCaptionBlock";class Sn extends v{constructor(t){super(),this.type="TOGGLE_TABLE_CAPTION",this.isFlushable=!0,this.shouldEnable=t}}class Tn extends bt{canHandle(t){return t[0]===mt.CAPTION}execute(t,e,n){const i="rte-table-caption"===t[1],s=new Sn(i),r=n.getCaption();if(i){const t=r&&r.isNotEmpty()?r:this.createCaptionBlock(null==r?void 0:r.id);r&&t===r||n.setCaption(t),s.nextFocusNode=t.getLastNode()}else r&&(n.setCaption(null),s.nextFocusNode=n.getFirstNode());this.syncCursorPosition(n,s.nextFocusNode)}syncCursorPosition(t,e){super.syncCursorPosition(t,e)}createCaptionBlock(e){const n={id:null!=e?e:t(),type:"table-caption",children:[{id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]}]};return kn.from(n)}}class En{static generateTablePropertiesForm(t){const e=t.annotationMap.get(wt.TABLE);let n={borderStyle:"none",borderColor:"",borderWidth:"",backgroundColor:"",width:"",height:"",textAlign:"center"};if(e){const t=e.toJSON().table,{style:i="none",color:s="",width:r=""}=t.border||{style:"none",color:"",width:""};n={backgroundColor:t.backgroundColor||"",width:t.width||"",height:t.height||"",textAlign:t.alignment,borderStyle:i,borderColor:s,borderWidth:r}}return n}updateCursorPosition(t,e){t&&e&&t.host.value.apply(new Z(e,0))}}class On extends M{constructor(t){super(),this.isFlushable=!0;const{textAlign:e,width:n,borderWidth:i,borderColor:s,borderStyle:r,height:a}=t,o=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n}(t,["textAlign","width","borderWidth","borderColor","borderStyle","height"]);this.tableProperties=Object.assign(Object.assign({},o),{alignment:e,border:{style:r,color:s,width:i?ve(i):""},width:n?ve(n):"",height:a?ve(a):""})}toAnnotation(){return new vt(this.tableProperties)}}class An extends En{handle(t,e,n,i){e.apply(new On(n)),this.updateCursorPosition(t,i)}}class In extends En{handle(t,e,n,i){t&&t.host&&(t.flushValue(t.host.value),this.updateCursorPosition(t,i))}}class Rn extends En{handle(t,e,n){const i=new On(n);i.isFlushable=!1,e.apply(i)}}class Nn extends M{constructor(t,e){super(),this.isFlushable=!0,this.cellAnnotation=t,this.originAnnotation=e}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}updateOriginAnnotation(){Object.keys(this.cellAnnotation).forEach((t=>{this.originAnnotation[t]=this.cellAnnotation[t]}))}}class Bn extends Nn{constructor(t,e){super(t,e),this.isFlushable=!0}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}}var Mn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};class jn{static getStyleCollectionFromCell(t){return t.reduce(((t,e)=>{const n=e.getAnnotationByType(wt.CELL);if(t[e.id]={},n){const i=n.toJSON().tableCell,{border:s}=i,r=Mn(i,["border"]),a={};s&&(a.borderStyle=s.style,a.borderColor=s.color,a.borderWidth=s.width),t[e.id]=xe(Object.assign(Object.assign({},r),a))}return t}),{})}static convertStyleMapToFormField(t){const e={};for(const n in t){const i=t[n];for(const t in i)e[t]?e[t].push(i[t]):e[t]=[i[t]]}const n=Object.keys(t).length,i={};for(const t in e){const s=e[t],r=new Set(s);s.length===n&&1===r.size&&(i[t]=s[0])}return i}applyProperties(t,e,n){t.tableSelection.getSelectedCells().forEach((t=>{const i=e[t.id];if(i){const e=this.convertToVegaTableCellAnnotation(Object.assign({},i));this.applyAnnotation(t,e,n)}}))}updateCursorPosition(t,e){t&&e&&t.host.value.apply(new Z(e,0))}convertToVegaTableCellAnnotation(t){const{borderStyle:e,borderWidth:n,borderColor:i}=t,s=Mn(t,["borderStyle","borderWidth","borderColor"]),r=xe({style:e,width:n?ve(n):"",color:i});return xe(Object.assign(Object.assign({},s),{backgroundColor:s.backgroundColor||"",padding:s.padding?ve(s.padding):"",width:s.width?ve(s.width):"",height:s.height?ve(s.height):"",verticalAlign:s.verticalAlign||"",textAlign:s.textAlign||"",border:r}))}applyAnnotation(t,e,n){const i=t.getAnnotationByType(wt.CELL)||new xt({},!1),s=t instanceof yt?new Bn(e,i):new Nn(e,i);s.isFlushable=n,t.apply(s)}}class Dn extends jn{handle(t,e,n){t&&t.host&&(t.flushValue(t.host.value),this.updateCursorPosition(t,n))}}class _n extends jn{handle(t,e){this.applyProperties(t,e,!1)}}class Hn extends jn{handle(t,e,n){this.applyProperties(t,e,!0),this.updateCursorPosition(t,n)}}class Vn{constructor(t){this.renderContext=t}getTableExtensionContext(){return this.renderContext?g.getExtensionContext(this.renderContext.host):null}}class Pn extends Vn{constructor(t,e){super(e),this.popoverCloseType="none",this.tablePropertiesHandlerMap={save:new In,cancel:new An,change:new Rn},this.cellPropertiesHandlerMap={save:new Dn,cancel:new Hn,change:new _n},this.handleTablePropertiesUpdate=t=>{const e=t.type.replace("vega","").toLowerCase();this.popoverCloseType=e,"change"!==e&&this.hide();const n=this.getTableExtensionContext();n&&this.tablePropertiesHandlerMap[e].handle(n,this.currentTableBlock,t.detail,this.currentFocusNode),"change"===e&&this.popoverRef.show(!0)},this.handleCellPropertiesUpdate=t=>{const e=t.type.replace("vega","").toLowerCase();this.popoverCloseType=e,"change"!==e&&this.hide();const n=this.getTableExtensionContext();n&&this.cellPropertiesHandlerMap[e].handle(n,t.detail,this.currentFocusNode),"change"===e&&this.popoverRef.show(!0)},this.tableColorSchema=t}destroy(){this.selectionAnchorRef&&this.selectionAnchorRef.parentNode&&(lt.removeUniqueObserverFromNode(this.selectionAnchorRef,ue),this.selectionAnchorRef.parentNode.removeChild(this.selectionAnchorRef),this.selectionAnchorRef=null)}async show(t){let e=this.getTableRef();const n=this.getTableExtensionContext();let i=[];if(n&&(i=n.tableSelection.getSelectedCells()),t===mt.CELL&&i.length>1){const t=this.getOrCreateSelectionAnchor(i,e);t&&(e=t)}else t===mt.CELL&&1===i.length&&(e=A.getDOMByEntity(i[0]));this.updateContent(t),this.storeCurrentFocusNode(),we.call(ct.getSubject(this.popoverRef,pe),e),await this.popoverRef.show()}async hide(){await this.popoverRef.hide()}reTarget(t,e){this.getTableRef=e,this.currentTableBlock=t}render(){const t=me();if(t){const e=t.createElement("vega-popover");e.trigger="click",e.isScreenPosition=!0,e.className="rte-table-dynamic-popover",lt.addUniqueObserverToNode(e,ut,(()=>{const t=this.getTableExtensionContext();"change"===this.popoverCloseType&&t&&t.flushValue(t.host.value)}));const n=t.createElement("div");n.setAttribute("slot","popover"),n.className="rte-table-dynamic-popover-content";const i=t.createElement("vega-rich-text-table-properties");i.colors=this.tableColorSchema,i.type=mt.TABLE,i.setAttribute("type",mt.TABLE),i.addEventListener("vegaCancel",this.handleTablePropertiesUpdate),i.addEventListener("vegaChange",this.handleTablePropertiesUpdate),i.addEventListener("vegaSave",this.handleTablePropertiesUpdate);const s=t.createElement("vega-rich-text-table-properties");return s.colors=this.tableColorSchema,s.type=mt.CELL,s.setAttribute("type",mt.CELL),s.addEventListener("vegaCancel",this.handleCellPropertiesUpdate),s.addEventListener("vegaChange",this.handleCellPropertiesUpdate),s.addEventListener("vegaSave",this.handleCellPropertiesUpdate),n.appendChild(i),n.appendChild(s),e.appendChild(n),this.popoverRef=e,this.tablePropertiesFormRef=i,this.cellPropertiesFormRef=s,e}}updateContent(t){this.popoverCloseType="none";const e=this.getTableExtensionContext();"TABLE"===t?(this.tablePropertiesFormRef.classList.remove("vega-hidden"),this.cellPropertiesFormRef.classList.add("vega-hidden"),this.tablePropertiesFormRef.defaultValue=En.generateTablePropertiesForm(this.currentTableBlock)):"CELL"===t&&(this.cellPropertiesFormRef.classList.remove("vega-hidden"),this.tablePropertiesFormRef.classList.add("vega-hidden"),e&&(this.cellPropertiesFormRef.styleMap=jn.getStyleCollectionFromCell(e.tableSelection.getSelectedCells())),this.cellPropertiesFormRef.defaultValue=jn.convertStyleMapToFormField(this.cellPropertiesFormRef.styleMap)),e&&e.getSelection().removeAllRanges()}storeCurrentFocusNode(){const t=this.getTableExtensionContext();t&&(this.currentFocusNode=t.getSelectedNodes()[0])}getOrCreateSelectionAnchor(t,e){const n=me();if(n&&e){const i=e.closest(".rich-text-content"),s=i.getBoundingClientRect();let r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;t.map((t=>A.getDOMByEntity(t))).filter(rt).forEach((t=>{const e=t.getBoundingClientRect();r=Math.min(r,e.left-s.left),a=Math.max(a,e.right-s.left),o=Math.min(o,e.top-s.top),l=Math.max(l,e.bottom-s.top)}));const c=a-r,h=l-o;return this.selectionAnchorRef=i.querySelector(".rte-table-selection-popover-anchor"),this.selectionAnchorRef||(this.selectionAnchorRef=n.createElement("div"),this.selectionAnchorRef.className="rte-table-selection-popover-anchor",this.selectionAnchorRef.style.position="absolute",this.selectionAnchorRef.style.pointerEvents="none",i.appendChild(this.selectionAnchorRef),lt.addUniqueObserverToNode(this.selectionAnchorRef,ue,(()=>{this.destroy()}))),this.selectionAnchorRef.style.left=`${r}px`,this.selectionAnchorRef.style.top=`${o}px`,this.selectionAnchorRef.style.width=`${c}px`,this.selectionAnchorRef.style.height=`${h}px`,this.selectionAnchorRef}}}class Fn extends Vn{constructor(t){super(t),this.settingHandlers=[new Ct,new Tn,new Lt,new kt,new St],this.handleTableClick=(t,e,n)=>{const i=t.target.closest("table");i===n()&&(t.stopPropagation(),this.reTarget(e,n),this.tableDynamicPopover.hide(),we.call(ct.getSubject(this.popoverRef,pe),i),this.popoverRef.show(!0))},this.syncSelectedCells=()=>{this.tableSettingRef&&(this.tableSettingRef.selectedCells=this.getTableSelectedCells())},this.handleSettingMenuClick=t=>{const e=this.settingHandlers.find((e=>e.canHandle(t.detail)));if(e){const n=this.getTableExtensionContext();n&&e.execute(t.detail,n,this.tableBlock),t.detail[0]===mt.CAPTION&&this.updateTableSettingCaption()}t.detail[0]!==mt.TABLE&&t.detail[0]!==mt.CELL||(this.popoverRef.hide(),this.tableDynamicPopover.show(t.detail[0]))},this.handleTableSettingPopoverShow=()=>{this.syncSelectedCells()},this.tableDynamicPopover=new Pn(Tt.getTableColors(),t)}destroy(){this.tableDynamicPopover.destroy(),this.popoverContainer&&this.popoverContainer.remove()}render(){const t=me();if(t&&this.renderContext){this.popoverContainer=t.createElement("div"),this.renderContext.host.appendChild(this.popoverContainer);const e=this.tableDynamicPopover.render(),n=t.createElement("vega-popover");n.trigger="click",n.isScreenPosition=!0,n.className="rte-table-setting-popover",lt.addUniqueObserverToNode(n,pt,this.handleTableSettingPopoverShow);const i=t.createElement("div");i.setAttribute("slot","popover");const s=t.createElement("vega-rich-text-table-setting");s.addEventListener("vegaClick",this.handleSettingMenuClick),i.appendChild(s),n.appendChild(i),this.popoverContainer.appendChild(n),this.popoverContainer.appendChild(e),this.popoverRef=n,this.tableSettingRef=s}}updateTableSettingCaption(){const t=this.tableBlock.hasCaption();this.tableSettingRef&&this.tableSettingRef.hasCaption!==t&&(this.tableSettingRef.hasCaption=t)}reTarget(t,e){this.tableSettingRef&&(this.tableBlock=t,this.tableSettingRef.target=e(),this.tableSettingRef.selectedCells=this.getTableSelectedCells(),this.tableDynamicPopover.reTarget(t,e))}getTableSelectedCells(){let t=[];const e=this.getTableExtensionContext();if(e&&e.tableSelection){const{tableSelection:n}=e;t=n.getSelectedCells()}return t}}class zn extends b{doRender(t,e,n){let i;const s=this.renderTable(t,e,(t=>i=t));this.renderTableToolbar(n);const r=e.getAnnotationByType(wt.TABLE),a=n.editable?[t("vega-rich-text-table-selection-widget",{onVegaRemove:t=>{t.stopPropagation(),this.handleTableRemove(e,i)},onClick:t=>{this.tableToolbar&&this.tableToolbar.handleTableClick(t,e,(()=>i))},onMouseLeave:()=>{this.tableToolbar&&this.tableToolbar.syncSelectedCells()}},[t("div",{contentEditable:!0,ref:this.useRef(e)},[s])])]:[s],o={};if(r){const t=r.renderStyle();o.width=t.width,o.margin=t.margin}const l=t("div",{class:"v-rte--extension-table-container",style:Object.assign({},o)},a);return l.childrenContainerGetter=()=>s,l}destroy(){this.destroyTableToolbar()}injectRTEScopeStyles(){return".v-rte--extension-table-container{display:table}table.v-rte--extension-table{border-collapse:collapse}table.v-rte--extension-table th,table.v-rte--extension-table td{border:1px solid #ddd;padding:12px;text-align:left;vertical-align:middle;min-width:55px;box-sizing:border-box;position:relative}table.v-rte--extension-table th{background-color:#f2f2f2}.rte-table-setting-popover,.rte-table-dynamic-popover{display:block}table.v-rte--extension-table .v-rte-table-cell-focused::after,table.v-rte--extension-table .v-rte-table-cell-selected::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;background-color:rgba(158, 207, 250, 0.3)}table.v-rte--extension-table:has(.v-rte-table-cell-selected){caret-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::selection{background-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::-moz-selection{background-color:transparent}.v-rte--extension-table-caption{padding:8px;border:1px solid #ddd;border-bottom:none;background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));position:relative;display:table-caption;caption-side:top;min-height:22px;text-align:center;word-break:break-word;overflow-wrap:break-word}.v-rte--extension-table-caption.showPlaceholder::before{position:absolute;left:0;right:0;content:attr(data-placeholder);font-family:'Inter', sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"}renderTable(t,e,n){var i;return t("table",Object.assign(Object.assign({key:e.id},null===(i=e.getCustomAttributesAnnotation())||void 0===i?void 0:i.render()),{style:e.getStyles(),class:e.getClasses(),ref:t=>{this.useRef(e)(t),n(t)}}))}handleTableRemove(t,e){t.apply(new Cn(t)),this.destroySelectionAnchor(e)}destroySelectionAnchor(t){const e=t.closest(".rich-text-content");if(e){const t=e.querySelector(".rte-table-selection-popover-anchor");t&&de.notify(ct.getSubject(t,ue),{host:t})}}renderTableToolbar(t){t.editable?this.tableToolbar||(this.tableToolbar=new Fn(t),this.tableToolbar.render()):this.destroyTableToolbar()}destroyTableToolbar(){var t;null===(t=this.tableToolbar)||void 0===t||t.destroy(),this.tableToolbar=null}}class $n extends b{doRender(t,e){return t("thead",{key:e.id,ref:this.useRef(e)})}}class Kn extends b{doRender(t,e){return t("tr",{key:e.id,ref:this.useRef(e)})}}class qn extends b{doRender(t,e,n){return this.renderByCellType(t,e,n,"td")}renderByCellType(t,e,n,i){var s;return t(i,Object.assign(Object.assign(Object.assign({key:`${e.id}-${i}`,ref:this.useRef(e)},null===(s=e.getCustomAttributesAnnotation())||void 0===s?void 0:s.render()),{style:e.getStyles(n),class:e.getClasses()}),n.editable?this.onSelectionListeners(e,n):void 0))}onSelectionListeners(t,e){return{onMouseDown:t=>{const n=s(t.target,"table"),i=s(t.currentTarget,"table")===n,r=t.target.closest("td, th");if(i&&r){const t=this.getExtensionContext(e.host);t&&t.tableSelection.focusCell(r)}},onMouseMove:n=>{n.stopPropagation(),n.preventDefault();const i=this.getExtensionContext(e.host);i&&i.tableSelection.dragOver(t)},onMouseUp:()=>{const t=this.getExtensionContext(e.host);t&&t.tableSelection.endDrag()}}}}class Wn extends b{doRender(t,e){return t("tbody",{key:e.id,ref:this.useRef(e)})}}class Un extends qn{doRender(t,e,n){return super.renderByCellType(t,e,n,"th")}}class Gn extends v{constructor(t,e){super(),this.type="INSERT_TABLE_BLOCK",this.rowCount=t,this.columnCount=e}}class Zn extends Vn{constructor(){super(...arguments),this.hoveredRows=1,this.hoveredCols=1}render(t,e){return t("vega-popover",{trigger:"click",alignment:"start",placement:"bottom",showArrow:!1,isScreenPosition:!0,ref:t=>{t&&(this.tablePickerPopoverRef=t,lt.addUniqueObserverToNode(t,pt,(()=>{this.resetPicker()})))}},[t("div",{slot:"popover"},[this.generatePickerStyles(t),this.generateTableSizeGrid(t)]),t("div",{slot:"popover-content"},e)])}generateTableSizeGrid(t){const e=[];for(let n=1;n<=10;n++)for(let i=1;i<=10;i++)e.push(t("button",{class:"rte-table-picker__cell","data-row":n,"data-col":i,onMouseenter:this.handlePickerCellHover.bind(this,n,i),onClick:this.handlePickerClick.bind(this,n,i)},[]));return t("div",{class:"rte-table-picker"},[t("div",{class:"rte-table-picker__grid",ref:t=>{t&&(this.tablePickerGridRef=t)},style:{gridTemplateColumns:"repeat(10, 16px)",gridTemplateRows:"repeat(10, 16px)"}},e),t("div",{class:"rte-table-picker__hint"},t("vega-hint",{ref:t=>{t&&(this.selectedHintRef=t)}},[`${this.hoveredRows} × ${this.hoveredCols}`]))])}generatePickerStyles(t){return t("style",{},["\n.rte-table-picker__grid { display: grid; gap: 2px; }\n.rte-table-picker__cell {\n box-sizing: border-box;\n border: 1px solid #ccc;\n background-color: transparent;\n cursor: pointer;\n}\n.rte-table-picker__cell:hover {\n background-color: #cae1fc;\n}\n.rte-table-picker__cell.active {\n background-color: #cae1fc;\n}\n.rte-table-picker__hint {\n text-align: center;\n}\n "])}createTable(t,e){const n=this.getTableExtensionContext();if(n){const{host:i,getSelectedNodes:s}=n,r=s()[0],a=new Gn(t,e);r?r.parent&&r.parent.apply(a):i.value.apply(a),a.nextFocusNode&&i.value.apply(new Z(a.nextFocusNode,1))}}handlePickerClick(t,e){this.createTable(t,e),this.tablePickerPopoverRef.hide()}handlePickerCellHover(t,e){this.hoveredRows=t,this.hoveredCols=e,Array.from(this.tablePickerGridRef.children).forEach((t=>{const e=Number(t.dataset.row),n=Number(t.dataset.col);e<=this.hoveredRows&&n<=this.hoveredCols?t.classList.add("active"):t.classList.remove("active")})),this.selectedHintRef.textContent=`${this.hoveredRows} × ${this.hoveredCols}`}resetPicker(){this.handlePickerCellHover(1,1)}}class Qn extends Ze{render(t,e){return new Zn(e).render(t,super.renderButton(t,e,{showArrowIcon:!0,icon:"rte-table",tooltip:{text:"Insert table"}}))}isDisabled(t){let e=super.isDisabled(t);const n=this.getExtensionContext(t.host);if(n){const{host:t,getSelectedNodes:i}=n,s=i()[0];let r=!0;s&&(r=x.canHandle("INSERT_TABLE_BLOCK",s.parent)&&x.canHandle(N.INSERT_CHILDREN_AFTER,s.parent.parent)),e=t.disabled||!r}return e}handleButtonClick(){}handleDropdownClick(){}}at.register({"rte-table":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 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="M48 264V160H232V264H48zm0 48H232V432H64c-8.8 0-16-7.2-16-16V312zM280 432V312H464V416c0 8.8-7.2 16-16 16H280zM464 264H280V160H464V264zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"/></svg>'}});class Jn extends S{handleAction(t,e){const n=this.createTableBlock(t.rowCount,t.columnCount),i=super.createNewParagraph(""),s=this.getReferenceBlock(e);s?s.parent.apply(new T(s,n,i)):e.apply(new E([n,i])),t.nextFocusNode=n.getFirstNode()}createTableBlock(e,n){const i=Math.max(e,1),s=Math.max(n,1);return Et.from({id:t(),type:"table-block",children:[Ot(i,s)]})}getReferenceBlock(t){if(!(t instanceof Q))return t}}class Yn extends un{canIntercept(t,e){const n=e.parent;return n instanceof At&&1===n.children.length&&0===t.startOffset}intercept(){}}class Xn extends S{handleAction(t){const e=t.tableBlock,n=e.parent,i=super.getRootContent(e),s=super.createNewParagraph("");n.apply(new T(e,s)),n.apply(new j(e)),i&&i.apply(new Z(s.getLastNode()))}}class ti extends un{canIntercept(t,e){return t.entityToBeRemoved&&1===e.children.length}intercept(e,n,i){if(!(n.entityToBeRemoved instanceof L)){const e=L.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]});return i.children=[],void i.apply(new E([e]))}n.entityToBeRemoved.apply(new E([new y(t(),"",n.entityToBeRemoved)]))}}class ei extends b{doRender(t,e){return t("caption",{key:e.id,ref:this.useRef(e),style:e.getStyles(),class:[e.getClasses(),e.isNotEmpty()?null:"showPlaceholder"].filter(rt).join(" "),"data-placeholder":"Enter table caption"})}}class ni extends S{getRowsMaxCellCount(t){let e=0;for(const n of t){let t=0;for(const e of n.children)t+=e.colSpan;e=Math.max(e,t)}return e}getRowCellStartCols(t){const e=this.getRowsMaxCellCount(t),n=new Array(t.length),i=new Array(e).fill(0);for(let e=0;e<t.length;e++){const s=t[e].children,r=new Array(s.length);let a=0;for(let t=0;t<s.length;t++){const e=s[t];for(;a<i.length&&i[a]>0;)a++;r[t]=a;const n=Math.max(e.colSpan,ni.DEFAULT_CELLSPAN);if(e.rowSpan>ni.DEFAULT_CELLSPAN)for(let t=0;t<n;t++){const n=a+t;n<i.length&&(i[n]=Math.max(i[n],e.rowSpan))}a+=n}n[e]=r;for(let t=0;t<i.length;t++)i[t]>0&&i[t]--}return n}updateCellSpan(t,e,n){const i=t.getCustomAttributesAnnotation();if(n<=ni.DEFAULT_CELLSPAN){if(i){const n=i.render();delete n[e],t.annotationMap.set(D.CUSTOM_ATTRIBUTE,new _(n))}}else{const s=i?i.render():{};s[e]=n.toString(),t.annotationMap.set(D.CUSTOM_ATTRIBUTE,new _(s))}}insertMovedCells(t,e,n){t.forEach(((t,i)=>{const s=e[i];if(s){const e=n[i]||[];t.sort(((t,e)=>t.logicalStartCol===e.logicalStartCol?e.cellIndex-t.cellIndex:e.logicalStartCol-t.logicalStartCol)),t.forEach((t=>{const{cell:n,logicalStartCol:i}=t;if(0===s.children.length)return s.apply(new E([n])),void(e[0]=i);const r=e.findIndex((t=>t>=i));-1===r?(s.apply(new T(s.children[s.children.length-1],n)),e.push(i)):0===r?(s.apply(new I(s.children[0],n)),e.unshift(i)):(s.apply(new I(s.children[r],n)),e.splice(r,0,i))}))}}))}splitRowsBySection(t){const e=[],n=[];return t.forEach((t=>{t.parent instanceof It?e.push(t):n.push(t)})),[e,n]}buildSelectedIndices(t,e){return new Set(t.map((t=>e.indexOf(t))).filter((t=>t>=0)))}intersectsRemovalRange(t,e,n,i){return t<=i&&e>=n}countRemovedRows(t,e,n){let i=0;for(let s=t;s<=e;s++)n.has(s)&&i++;return i}getHeadCellLength(t){let e=0;for(let n=0;n<t.children.length;n++){const i=t.children[n];if(!(i instanceof yt))break;e+=i.colSpan}return e}getTheStartSpanCell(t,e,n,i){const s={rowIndex:n};for(let r=n;r>=0;r--){const n=e[r];if(n.includes(i)){s.cell=t[r].children[n.indexOf(i)],s.rowIndex=r;break}}return s}getDefaultCellBlockTemplate(e,n,i=1){const s=xe({colspan:n>1?n.toString():null,rowspan:i>1?i.toString():null}),r=t(),a={id:r,type:e,children:[{id:`${r}-p`,type:"paragraph",nodes:[{id:`${r}-p-t`,type:"text",text:""}]}]};return Object.keys(s).length>0&&(a.annotations={customAttribute:s}),a}getSortedValuesByNumericKey(t){return Array.from(t.entries()).sort((([t],[e])=>t-e)).map((([,t])=>t))}}ni.DEFAULT_CELLSPAN=1;class ii extends ni{handleAction(t,e){const{rowsToBeRemoved:n}=t,i=this.getFutureFocusRow(n[0],n[n.length-1],e),s=this.splitRowsBySection(n);if(this.removeRows(s[0]),this.removeRows(s[1]),i){const t=this.getRootContent(e);if(t){const e=i.getLastNode();t.apply(new Z(e,e.getRangeEndOffset()))}}}removeRows(t){if(0===t.length)return;const e=t[0].parent,n=e.children,i=this.buildSelectedIndices(t,n);if(i.size>0){if(n.length===t.length)return void e.parent.apply(new j(e));const s=Math.min(...i),r=Math.max(...i),a=this.getRowCellStartCols(n),o=this.collectCellsToMove(n,a,i,s,r);this.insertMovedCells(o,n,a),t.forEach((t=>{t.parent.apply(new j(t))}))}}collectCellsToMove(t,e,n,i,s){const r=new Map,a=t.length;for(let o=0;o<a;o++){const l=t[o],c=l.children.length;for(let t=0;t<c;t++){const c=l.children[t],h=c.rowSpan;if(h<=ni.DEFAULT_CELLSPAN)continue;const d=o+h-1;if(!this.intersectsRemovalRange(o,d,i,s))continue;const u=h-this.countRemovedRows(o,d,n);if(o<i&&d>=i)this.updateCellSpan(c,"rowspan",u);else if(o>=i&&d>s){const i=s+1;if(i<a&&!n.has(i)){const n=e[o][t];r.has(i)||r.set(i,[]),r.get(i).push({cell:this.cloneCellWithRowSpan(c,u),newRowSpan:u,cellIndex:t,logicalStartCol:n})}}}}return r}cloneCellWithRowSpan(t,e){const n=t.clone(t.parent);return this.updateCellSpan(n,"rowspan",e),n}getFutureFocusRow(t,e,n){const i=n.children.filter((t=>t instanceof It||t instanceof Rt)).flatMap((t=>t.children)),s=i.indexOf(t),r=i.indexOf(e);return i[s-1]?i[s-1]:i[r+1]?i[r+1]:void 0}}class si{constructor(){this.dragging=!1,this.anchorCell=null,this.selectedCells=new Set,this.syncRTESelectionWithDebounce=ye(this.syncRTESelection,100,this),this.handleSelectionChangeWithDebounce=ye(this.handleSelectionChange,10,this),this.filterSelectedCell=(t,e)=>{const n=new Set;if(t.intersectsNode(e)){if(e.nodeType===Node.TEXT_NODE){const t=A.getEntityByDOM(e.parentElement);if(t){const e=Nt(t.parent,At);if(e)return n.add(e),Array.from(n)}}e.childNodes.forEach((e=>this.filterSelectedCell(t,e).forEach((t=>{n.add(t)}))))}return Array.from(n)},this.updateSelectedStyles=(t,e)=>{const n=1===e?"v-rte-table-cell-focused":"v-rte-table-cell-selected",i=A.getDOMByEntity(t);i&&i.classList.add(n)},this.handleDocMouseUp=()=>{this.endDrag();const t=me();t&&t.removeEventListener("mouseup",this.handleDocMouseUp)},this.handleContentClick=()=>{this.clearSelection();const t=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");t&&t.removeEventListener("mousedown",this.handleContentClick,!0)}}static computeRectRange(t,e){const n=t.parent.parent.parent;if(n!==e.parent.parent.parent)return[];const i=[];n.children.forEach((t=>{t.children.forEach((t=>i.push(t)))}));const{grid:s,cellMeta:r}=si.buildCellGrid(i),a=r.get(t),o=r.get(e);if(!a||!o)return[];const l=a.row+a.rowSpan-1,c=a.col,h=a.col+a.colSpan-1,d=o.row+o.rowSpan-1,u=o.col,p=o.col+o.colSpan-1,f=Math.min(a.row,o.row),w=Math.max(l,d),g=Math.min(c,u),b=Math.max(h,p),m=new Set;for(let t=f;t<=w;t++){const e=s[t];for(let t=g;t<=b;t++){const n=e[t];n&&m.add(n)}}return Array.from(m)}static getCellSpan(t){let e=1,n=1;const i=t.getAnnotationByType(D.CUSTOM_ATTRIBUTE);if(i&&i.customAttribute){const t=i.customAttribute;t.rowSpan&&(e=parseInt(t.rowSpan,10)),t.colSpan&&(n=parseInt(t.colSpan,10))}if(1===e&&1===n){const i=A.getDOMByEntity(t);if(i){const t=i.getAttribute("rowSpan"),s=i.getAttribute("colSpan");t&&(e=parseInt(t,10)),s&&(n=parseInt(s,10))}}return{rowSpan:Number.isFinite(e)&&e>0?e:1,colSpan:Number.isFinite(n)&&n>0?n:1}}static buildCellGrid(t){const e=[],n=new Map;for(let i=0;i<t.length;i++){const s=t[i];e[i]||(e[i]=[]);let r=0;for(let t=0;t<s.children.length;t++){const a=s.children[t];for(;e[i][r];)r+=1;const{rowSpan:o,colSpan:l}=si.getCellSpan(a);n.set(a,{row:i,col:r,rowSpan:o,colSpan:l});for(let t=0;t<o;t++){const n=i+t;e[n]||(e[n]=[]);for(let t=0;t<l;t++)e[n][r+t]=a}r+=l}}return{grid:e,cellMeta:n}}destroy(){this.removeSelectionChangeListener()}init(t){this.context=t,this.addSelectionChangeListener()}setSelectedCells(t){const e=Array.from(this.selectedCells)[0]||t[0];this.updateSelectedCells(t),this.emitCellSelectionChange(e,t)}getSelectedCells(){return Array.from(this.selectedCells)}focusCell(t){const e=A.getEntityByDOM(t);e&&(this.anchorCell=e,this.setSelectedCells([e]),this.addListeners())}dragOver(t){if(!this.anchorCell)return;const e=si.computeRectRange(this.anchorCell,t);e.length>1&&this.startDrag(),this.dragging&&(this.preventTextSelection(e),this.updateSelectedCells(e,{debounceSync:!0}))}endDrag(){this.dragging=!1,this.anchorCell=null}emitCellSelectionChange(t,e){const n=Nt(t,Et);if(n){const t=A.getDOMByEntity(n);t&&de.notify(ct.getSubject(t,fe),{host:t,detail:e})}}clearSelection(){this.selectedCells.forEach((t=>{const e=A.getDOMByEntity(t);e&&e.classList.remove("v-rte-table-cell-selected","v-rte-table-cell-focused")})),this.selectedCells.clear()}addSelectionChangeListener(){const t=me();t&&t.addEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}removeSelectionChangeListener(){const t=me();t&&t.removeEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}handleSelectionChange(){if(this.dragging)return void this.syncRTESelectionWithDebounce();const t=this.context.getSelection();if(t.rangeCount>0){const e=t.getRangeAt(0),n=e.commonAncestorContainer;if(s(n,"table")){const t=this.filterSelectedCell(e,n);this.setSelectedCells(t)}}}startDrag(){this.dragging=!0}updateSelectedCells(t,{debounceSync:e}={}){this.clearSelection(),t.forEach((e=>{this.selectedCells.add(e),this.updateSelectedStyles(e,t.length)})),e?this.syncRTESelectionWithDebounce():this.syncRTESelection()}syncRTESelection(){const t=Array.from(this.selectedCells),e=t.flatMap((t=>t.children.flatMap((t=>t.children.flatMap((t=>{if(t instanceof O)return t})))))).filter(rt);t.length>1&&this.context.setSelectedNodes(e,{startNode:e[0],endNode:e[e.length-1],startOffset:0,endOffset:e[e.length-1].getRangeEndOffset()})}preventTextSelection(t){const e=this.context.getSelection();if(e.removeAllRanges(),t.length>0){const n=A.getDOMByEntity(t[0]);if(n){const t=new Range;t.setStart(n,0),t.setEnd(n,0),e.addRange(t)}}}addListeners(){const t=me();t&&t.addEventListener("mouseup",this.handleDocMouseUp);const e=this.context.host.shadowRoot.querySelector(".rich-text-editor-container");e&&e.addEventListener("mousedown",this.handleContentClick,!0)}}class ri extends ni{handleAction(t,e){const{selectedRows:n}=t,[i,s]=this.splitRowsBySection(n);s.length>0?this.convertToHeaderRows(s,e):this.revertToBodyRows(i,e);const r=this.getRootContent(e);if(r){const t=n[0].getFirstNode();t&&r.apply(new Z(t,0))}}convertToHeaderRows(e,n){let i=n.children.find((t=>t instanceof It));const s=e[0].parent;i||(i=It.from({id:t(),type:"table-head",children:[]}),n.apply(new I(s,i)));const r=s.children.indexOf(e[e.length-1]),a=s.children.slice(0,r+1),o=this.buildSelectedIndices(a,s.children),l=Math.min(...o),c=Math.max(...o);if(o.size>0){if(o.size<s.children.length){const t=this.getRowCellStartCols(s.children),e=this.collectCellsToMove(s.children,t,o,l,c);this.insertMovedCells(e,s.children,t)}this.convertBodyRowsToHeaderRows(s,i,a)}}convertBodyRowsToHeaderRows(t,e,n){for(let e=0;e<n.length;e++){const i=n[e];i.children=i.children.map((t=>this.convertTdToTh(t))),t.apply(new j(i))}e.apply(new E(n))}revertToBodyRows(e,n){let i=n.children.find((t=>t instanceof Rt));const s=e[0].parent;i||(i=Rt.from({id:t(),type:"table-body",children:[]}),n.apply(new T(s,i)));const r=s.children.indexOf(e[0]),a=s.children.slice(r),o=this.buildSelectedIndices(a,s.children);if(o.size>0){const t=this.getRowCellStartCols(s.children),e=this.collectCellsToMove(s.children,t,o,Math.min(...o),Math.max(...o));this.insertMovedCells(e,s.children,t),this.convertHeadRowsToBodyRows(s,i,a)}}convertHeadRowsToBodyRows(t,e,n){const i=e.children[0],s=this.getRowCellStartCols(n);for(let r=0;r<n.length;r++){const a=n[r];t.apply(new j(a));const o=i?this.getHeadCellLength(i):0;a.children=this.convertThToTd(a,s[r],o),i&&e.apply(new I(i,a))}i||e.apply(new E(n))}collectCellsToMove(t,e,n,i,s){const r=new Map,a=t.length;for(let o=0;o<a;o++){const l=t[o],c=l.children.length;for(let t=0;t<c;t++){const c=l.children[t],h=c.rowSpan;if(h<=ni.DEFAULT_CELLSPAN)continue;const d=o+h-1;if(!this.intersectsRemovalRange(o,d,i,s))continue;const u=this.countRemovedRows(o,d,n),p=h-u;if(o<i&&d>=i){this.updateCellSpan(c,"rowspan",p);const s=i;if(s<a&&n.has(s)){const n=e[o][t];r.has(s)||r.set(s,[]),r.get(s).push({cell:this.cloneCellWithRowSpan(c,u),newRowSpan:u,cellIndex:t,logicalStartCol:n})}}else if(o>=i&&d>s){this.updateCellSpan(c,"rowspan",u);const i=s+1;if(i<a&&!n.has(i)){const n=e[o][t];r.has(i)||r.set(i,[]),r.get(i).push({cell:this.cloneCellWithRowSpan(c,p),newRowSpan:p,cellIndex:t,logicalStartCol:n})}}}}return r}convertTdToTh(t){if(t instanceof yt)return t;const e=yt.from(t.toJSON());return e.parent=t.parent,e}convertThToTd(t,e,n){return t.children.map(((i,s)=>{let r=i;const a=e[s]<n,o=i.toJSON();return r=a?i:At.from(this.deleteHeadCellDefaultBackground(o)),r.parent=t,r}))}cloneCellWithRowSpan(e,n){const i=e.clone(e.parent);i.id=t(),i.children=[];const s=this.createNewParagraph("");return s&&i.apply(new E([s])),this.updateCellSpan(i,"rowspan",n),i}deleteHeadCellDefaultBackground(t){var e;if(t&&t.annotations&&t.annotations.customStyle){delete t.annotations.tableCell;const n=t.annotations.customStyle.backgroundColor,i=Bt.getDefaultBackgroundColor();!n||n!==i&&(null===(e=r(n))||void 0===e?void 0:e.toUpperCase())!==i||delete t.annotations.customStyle.backgroundColor}return t}}class ai extends Mt{handleAction(t,e){const{insertDirection:n,tableCellInsertRange:i}=t,s=new Set(i.map((t=>t.id))),r=jt(e),a=Dt(r),[o,l]=this.getBoundaryCellColumnRange(i,r,a),c=n===Pt.LEFT?o:l+1,h=this.hasSelectedCellInsideTargetColumn(r,a,c,s),d=new Set;r.forEach(((t,i)=>{if(d.has(i))return;const o=this.findExpandableCell(t,i,c,a,n,s,h);if(o){const t=o.rowSpan;if(_t(o,o.colSpan+1,o.rowSpan,e,!0),t>1)for(let e=1;e<t;e++)d.add(i+e);return}const l=this.findInsertPosition(t,i,c,a,r);if(l){const e=this.generateTableCell(l.templateCell);t.apply(l.before?new I(l.anchorCell,e):new T(l.anchorCell,e))}}))}findExpandableCell(t,e,n,i,s,r,a){const o=i[e],l=t.children.reduce(((t,e)=>t+(r.has(e.id)?1:0)),0);for(const c of t.children){const t=o.indexOf(c.id),h=t+c.colSpan,d=n===h,u=e+c.rowSpan>=i.length,p=r.has(c.id),f=n>t&&n<h;if(s===Pt.LEFT?f:f&&(!p||!u)||d&&c.colSpan>1&&p&&!u&&1===l&&!a)return c}return null}hasSelectedCellInsideTargetColumn(t,e,n,i){for(let s=0;s<t.length;s++){const r=t[s],a=e[s];for(const t of r.children){if(!i.has(t.id))continue;const e=a.indexOf(t.id),s=e+t.colSpan;if(n>e&&n<s)return!0}}return!1}findInsertPosition(t,e,n,i,s){const r=i[e];let a=t.children[0];if(n>=0&&n<r.length){const t=Ht(s,r[n]);t&&(a=t)}let o=0;for(let e=0;e<t.children.length;e++){const i=t.children[e];for(;o<r.length&&r[o]!==i.id;)o++;if(o>=n)return{anchorCell:i,templateCell:a,before:!0};const s=o+i.colSpan;if(s>n||e===t.children.length-1)return{anchorCell:i,templateCell:a,before:!1};o=s}return null}generateTableCell(t){return t instanceof yt?yt.from(Vt(t.type)):At.from(Vt(t.type))}}class oi extends Mt{handleAction(t,e){const n=jt(e),i=Dt(n),[s,r]=this.getBoundaryCellColumnRange(t.tableCellDeleteRange,n,i),a=Math.max(n.indexOf(t.tableCellDeleteRange[t.tableCellDeleteRange.length-1].parent),0),{coveredCellIds:o,coveredCells:l,adjustmentCellInfo:c}=this.getDeleteCellsInfo(n,s,r,i),h=this.findNextFocusableCell(n,i,s,r,o,a);this.deleteCells(l,c,e);const d=this.getRootContent(e),u=$t(h);d&&u&&d.apply(new Z(u))}getDeleteCellsInfo(t,e,n,i){const s=[],r=new Set,a=[],o=Ft(i);return t.forEach((t=>{t.children.forEach((t=>{const i=o.get(t.id);if(void 0===i)return;const{colSpan:l,rowSpan:c}=Kt(t),h=this.getColumnOverlapCount(i,l,e,n);if(h<=0)return;if(h===l)return s.push(t),void r.add(t.id);const d=Math.max(1,l-h);a.push({cell:t,nextColSpan:d,rowSpan:c})}))})),{coveredCells:s,coveredCellIds:r,adjustmentCellInfo:a}}findNextFocusableCell(t,e,n,i,s,r){for(let a=0;a<t.length;a++){const o=this.findFocusableCellIdInGridRow(e[(r+a)%t.length],n,i,s);if(!o)continue;const l=Ht(t,o);if(l)return l}return null}findFocusableCellIdInGridRow(t,e,n,i){for(let e=n+1;e<t.length;e++){const n=t[e];if(n&&!i.has(n))return n}for(let n=e-1;n>=0;n--){const e=t[n];if(e&&!i.has(e))return e}return null}deleteCells(t,e,n){t.forEach((t=>{t.parent.apply(new j(t))}));const i=new Set;e.forEach((({cell:t,nextColSpan:e,rowSpan:s})=>{i.add(t.id),_t(t,e,s,n)})),this.normalizeRemainingCellSpans(n,i)}normalizeRemainingCellSpans(t,e){jt(t).forEach((n=>{n.children.forEach((n=>{const{colSpan:i,rowSpan:s}=Kt(n);if(e.has(n.id)){const e=zt(t);if(!(s>1&&i===e))return}_t(n,i,s,t)}))}))}getColumnOverlapCount(t,e,n,i){const s=t+e-1,r=Math.max(t,n),a=Math.min(s,i);return r<=a?a-r+1:0}}class li extends v{constructor(t){super(),this.isFlushable=!0,this.type="CREATE_SEGMENT_TABLE_CELL",this.payload=t}}class ci extends S{handleAction(t,e){const{table:n,sourceCell:i,colSpan:s,cellType:r,keepSourceContent:a}=t.payload,o=a?this.convertCellType(i,r):qt(r);_t(o,s,i.rowSpan,n),e.apply(new I(i,o))}convertCellType(t,e){return"table-head-cell"===e?yt.from(t.toJSON()):At.from(t.toJSON())}}class hi extends S{handleAction(t,e){const{cell:n,targetCellType:i}=t.payload,s="table-head-cell"===i?yt.from(n.toJSON()):At.from(n.toJSON());e.apply(new I(n,s)),e.apply(new j(n))}}class di extends S{handleAction(t,e){const{table:n,cell:i,col:s,cellStartCol:r,endCol:a,targetCellType:o}=t.payload,l=r+i.colSpan-1,c=s>r?s-r:0,h=Math.min(a,l),d=h-s+1,u=l-h;c>0&&e.apply(new li({table:n,sourceCell:i,colSpan:c,cellType:i.type,keepSourceContent:!0})),e.apply(new li({table:n,sourceCell:i,colSpan:d,cellType:o,keepSourceContent:0===c})),u>0&&e.apply(new li({table:n,sourceCell:i,colSpan:u,cellType:i.type,keepSourceContent:0===c&&d===i.colSpan})),e.apply(new j(i))}}class ui extends Mt{handleAction(t,e){const n=jt(e),i=Dt(n),s=Ft(i),[r,a]=this.getBoundaryCellColumnRange(t.tableCellSelectRange,n,i),o=[],l=new Set;n.forEach((t=>{t.children.forEach((t=>{const e=s.get(t.id);void 0!==e&&e>=r&&e<=a&&!l.has(t.id)&&(l.add(t.id),o.push(t))}))})),t.selectCellCallback(o)}}class pi extends un{canIntercept(t){return t.childrenToBeInserted.some((t=>!(t instanceof At)))}intercept(){}}class fi extends S{handleAction(t,e){const{targetCell:n,mergeCells:i,colSpan:s,rowSpan:r,direction:a}=t;this.mergeContentToTargetCell(n,i),_t(n,s,r,e),this.deleteOtherSelectedCells(i,n),a!==Wt.MERGE_CELL_LEFT&&a!==Wt.MERGE_CELL_RIGHT&&r>1&&this.clearRowSpanIfUniformAcrossRow(n,e,r);const o=this.getRootContent(e),l=$t(n);o&&l&&o.apply(new Z(l))}mergeContentToTargetCell(t,e){const n=e.flatMap((t=>t.children)),i=n.filter((t=>t.isNotEmpty()));t.children=(i.length>0?i:[n[0]]).map((e=>e.clone(t)))}deleteOtherSelectedCells(t,e){t.forEach((t=>{t!==e&&t.parent.apply(new j(t))}))}clearRowSpanIfUniformAcrossRow(t,e,n){const i=t.parent.parent.children,s=Dt(i),r=[];for(let e=0;e<s.length;e++)s[e].includes(t.id)&&r.push(e);if(r.length>1){const t=r[0],a=t+n-1,o=new Set;let l=Number.POSITIVE_INFINITY;for(let e=0;e<s[0].length;e++){let n=s[t][e],i=1,r=!1;for(let c=t+1;c<=a;c++)s[c][e]!==n?(i>1&&(r=!0,l=Math.min(l,i),o.add(n)),i=1,n=s[c][e]):i++;if(i<2&&!r){o.clear();break}i>1&&(l=Math.min(l,i),o.add(n))}o.size>0&&i.forEach((t=>{t.children.forEach((t=>{if(o.has(t.id)){const{rowSpan:n,colSpan:i}=Kt(t);_t(t,i,n-l+1,e)}}))}))}}}class wi extends Y{canHandle(t,e){const n=t[e];return n&&"TABLE"===n.tagName?1:0}handle(e,n){return Et.from({id:t(),type:"table-block",annotations:X.generate(Et,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class gi extends J{canHandle(t,e){const n=t[e];return n&&"THEAD"===n.tagName?1:0}handle(e,n){return It.from({id:t(),type:"table-head",annotations:X.generate(It,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class bi extends J{canHandle(t,e){const n=t[e];return n&&"TBODY"===n.tagName?1:0}handle(e,n){return Rt.from({id:t(),type:"table-body",annotations:X.generate(Rt,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class mi extends J{canHandle(t,e){const n=t[e];return n&&"TR"===n.tagName?1:0}handle(e,n){return Ut.from({id:t(),type:"table-row",annotations:X.generate(Ut,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class vi extends J{canHandle(t,e){const n=t[e];return!n||"TD"!==n.tagName&&"TH"!==n.tagName?0:1}handle(e,n){const i=e[0],s=[{id:t(),type:"paragraph",annotations:{internalWrapper:n&&!n.autoMatchFormat},nodes:[{id:t(),type:"text",annotations:{plainText:n&&!n.autoMatchFormat},text:""}]}];return"TH"===i.tagName?yt.from({id:t(),type:"table-head-cell",annotations:this.getTableHeadCellAnnotations(i,n),children:s},n):At.from({id:t(),type:"table-cell",annotations:X.generate(At,i,n),children:s},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}getTableHeadCellAnnotations(t,e){const n=X.generate(yt,t,e);return n&&n.tableCell&&Tt.getColorKey(n.tableCell.backgroundColor,!0)===gt.key&&(delete n.tableCell.backgroundColor,n.customStyle&&delete n.customStyle.backgroundColor),n}}class xi extends Y{canHandle(t,e){const n=t[e];return n&&n.parentElement&&"TABLE"===n.parentElement.tagName&&"CAPTION"===n.tagName?1:0}handle(e,n){const i=this.getTableCaptionAnnotations(e[0],n);return kn.from({id:t(),type:"table-caption",annotations:Object.assign(Object.assign({},i),{caption:!0}),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}getTableCaptionAnnotations(t,e){const n=X.generate(kn,t,e);return n&&n.customStyle&&n.customStyle.backgroundColor&&Tt.getColorKey(n.customStyle.backgroundColor,!0)===gt.key&&delete n.customStyle.backgroundColor,n}}class yi extends st{getBackgroundColor(t){return t.style.backgroundColor?Tt.getColorKey(t.style.backgroundColor)||t.style.backgroundColor:null}getBorder(t){const e=t.style,n=e.borderStyle,i=e.borderWidth,s=e.borderColor;if(s||n||i){const t="initial"===s?"":s;return{style:"initial"===n?"":n,width:this.normalizeBorderWidth(i),color:Tt.getColorKey(t)||t}}return null}normalizeBorderWidth(t){return"initial"===t||yi.BORDER_WIDTH_KEYWORDS.includes(t)?"":t}getWidth(t){if(t.style.width)return t.style.width;const e=t.getAttribute("width");return e?/^\d+$/.test(e)?`${e}px`:e:null}getHeight(t){if(t.style.height)return t.style.height;const e=t.getAttribute("height");return e?/^\d+$/.test(e)?`${e}px`:e:null}}yi.BORDER_WIDTH_KEYWORDS=["thin","medium","thick"];class Ci extends yi{canHandle(t){return"RTETableBlock"===t.dtoName}handle(t){const e=xe({backgroundColor:this.getBackgroundColor(t),border:this.getBorder(t),width:this.getWidth(t),height:this.getHeight(t),alignment:this.getAlignment(t)});return Object.keys(e).length>0?{table:e}:{}}getAlignment(t){const e=t.classList;if(e.contains("v-rte--extension-table-align-left"))return"left";if(e.contains("v-rte--extension-table-align-center"))return"center";if(e.contains("v-rte--extension-table-align-right"))return"right";const n=t.style,i=n.marginLeft,s=n.marginRight;if("auto"===i&&"auto"===s)return"center";if("0"===i||"0px"===i)return"left";if("0"===s||"0px"===s)return"right";const r=t.getAttribute("align");return r&&["left","center","right"].includes(r)?r:null}}class Li extends yi{canHandle(t){return"RTETableCellBlock"===t.dtoName}handle(t){const e=xe({backgroundColor:this.getBackgroundColor(t),padding:this.getPadding(t),border:this.getBorder(t),width:this.getWidth(t),height:this.getHeight(t),textAlign:this.getTextAlign(t),verticalAlign:this.getVerticalAlign(t),minWidth:this.getMinWidth(t),boxSizing:this.getBoxSizing(t)});return Object.keys(e).length>0?{tableCell:e}:{}}getMinWidth(t){return t.style.minWidth?t.style.minWidth:null}getBoxSizing(t){return t.style.boxSizing?t.style.boxSizing:null}getPadding(t){return t.style.padding?t.style.padding:null}getTextAlign(t){if(t.style.textAlign){const e=t.style.textAlign;if(["left","center","right","justify"].includes(e))return e}const e=t.getAttribute("align");return e&&["left","center","right","justify"].includes(e)?e:null}getVerticalAlign(t){if(t.style.verticalAlign){const e=t.style.verticalAlign;if(["top","middle","bottom"].includes(e))return e}return null}}class ki extends Li{canHandle(t){return"RTETableHeadCellBlock"===t.dtoName}}class Si extends S{handleAction(t,e){const n=t.toAnnotation(),i=this.getDOMByEntity(e);if(i){const t=i.closest(".v-rte--extension-table-container"),{backgroundColorAnnotation:s,width:r,height:a}=n;i.style.backgroundColor=s.renderStyle().color,i.style.border=n.borderStr,i.style.width=r,i.style.height=a;const o=n.renderAlignmentStyle().margin;i.style.margin=o,t&&(t.style.width=r,t.style.height=a,t.style.margin=o),this.updateCustomStyleAnnotation(e,["backgroundColor","border","width","height","margin"])}}}class Ti extends S{handleAction(t,e){const n=t.toAnnotation(),i=this.getDOMByEntity(e);if(i){const{width:t,height:s,borderStr:r,padding:a,textAlign:o,verticalAlign:l}=n,c=n.renderStyle().backgroundColor||"";i.style.backgroundColor=c,i.style.border=r,i.style.width=t,i.style.height=s,i.style.padding=a,i.style.textAlign=o,i.style.verticalAlign=l,this.updateCustomStyleAnnotation(e,["backgroundColor","border","width","height","padding","textAlign","verticalAlign"])}}}class Ei extends S{handleAction(t,e){const n=e.parent,i=n.parent,s=Nt(n,Et),r=jt(s),a=r.indexOf(n),{colSpan:o,rowSpan:l}=Kt(e),c=Gt(e,r),h=Math.ceil(l/2),d=Math.max(1,l-h),u=1===l;_t(e,o,h,s);const p=a+h,f=qt(e.type);if(_t(f,o,d,s),u){const t=this.createNewRowWithCell(i,f),a=i.children.indexOf(n);i.apply(new T(i.children[a],t)),r.splice(p,0,t),this.updateCellsSpanningThroughInsertionPoint(r,p,e,s)}else{const t=r[p],e=this.findInsertPosition(t,c,r,p);t.children.splice(e,0,f),f.parent=t}}findInsertPosition(t,e,n,i){let s=0;for(let t=0;t<i;t++){const r=n[t];for(const a of r.children){const{colSpan:r,rowSpan:o}=Kt(a);t+o>i&&Gt(a,n)<e&&(s+=r)}}let r=s;for(let n=0;n<t.children.length;n++){if(r>=e)return n;const i=t.children[n],{colSpan:s}=Kt(i);r+=s}return t.children.length}createNewRowWithCell(e,n){const i={id:t(),type:"table-row",children:[]},s=Ut.from(i);return s.parent=e,s.children.push(n),n.parent=s,s}updateCellsSpanningThroughInsertionPoint(t,e,n,i){for(let s=0;s<e;s++){const r=t[s];for(const t of r.children){if(t===n)continue;const{colSpan:r,rowSpan:a}=Kt(t);s+a>=e&&_t(t,r,a+1,i)}}}}class Oi extends S{handleAction(t,e){const n=e.parent,i=Nt(n,Et),s=jt(i),r=s.indexOf(n),{colSpan:a,rowSpan:o}=Kt(e),l=Gt(e,s),c=l+a-1,h=Math.ceil(a/2),d=Math.floor(a/2);_t(e,h,o,i);const u=qt(e.type);_t(u,d,o,i),n.apply(new T(e,u));const p=1===a?1:0;p>0&&this.updateOtherRowsCells(s,r,l,c,o,p,i)}updateOtherRowsCells(t,e,n,i,s,r,a){for(let o=0;o<t.length;o++){const l=t[o];if(!(o>=e&&o<e+s))for(const e of l.children){const s=Gt(e,t),{colSpan:o,rowSpan:l}=Kt(e);if(s+o-1>=n&&s<=i){_t(e,o+r,l,a);break}}}}}class Ai extends ni{handleAction(e,n){const{selectedRows:i}=e,s=i[i.length-1];let r=n.children.find((t=>t instanceof Rt));const a={id:t(),type:"table-row",children:[]};let o=0,l=null;r?(l=r.children[0],o=this.getHeadCellLength(l)):(r=Rt.from({id:t(),type:"table-body",children:[]}),n.apply(new E([r])));const c=s.parent.children,h=this.getRowsMaxCellCount(c);if(this.getRowsMaxCellCount([s])<h){const t=c.indexOf(s),e=this.getRowCellStartCols(c),n=new Map;for(let i=0;i<h;i++){const s=i<o?"table-head-cell":"table-cell",{cell:r}=this.getTheStartSpanCell(c,e,t,i);if(r){const t=r.colSpan;n.set(i,this.getDefaultCellBlockTemplate(s,t)),i+=t-1}}a.children=this.getSortedValuesByNumericKey(n)}else a.children=this.createTableCells(s,o);const d=l?new I(l,Ut.from(a)):new E([Ut.from(a)]);r.apply(d)}createTableCells(t,e){const n=[];let i=0;for(const s of t.children)n.push(this.getDefaultCellBlockTemplate(i<e?"table-head-cell":"table-cell",s.colSpan)),i+=s.colSpan;return n}}class Ii extends ni{handleAction(e){const{insertDirection:n,selectedRows:i}=e,s=n===Zt.ABOVE?i[0]:i[i.length-1],r={id:t(),type:"table-row",children:[]},a=s.parent.children,o=this.getRowsMaxCellCount(a),l=a.indexOf(s),c=this.getRowCellStartCols(a),h=new Map;for(let t=0;t<o;t++){const{cell:e,rowIndex:i}=this.getTheStartSpanCell(a,c,l,t);if(e){const{colSpan:s,rowSpan:r}=e;if(n===Zt.ABOVE?i!==l:i+r>l+1){this.updateCellSpan(e,"rowspan",r+1),t+=s-1;continue}h.set(t,this.getDefaultCellBlockTemplate(e.type,s)),t+=s-1}}r.children=this.getSortedValuesByNumericKey(h);const d=Ut.from(r),u=n===Zt.ABOVE?new I(s,d):new T(s,d);s.parent.apply(u)}}class Ri extends un{canIntercept(t,e){return Boolean(e.parent)}intercept(t,e,n){const i=this.createNewParagraph("");i&&(n.parent.apply(0===e.startOffset?new I(n,i):new T(n,i)),e.newBlock=i)}createNewParagraph(e){const n=H.getRTEBlockClass("paragraph");if(n)return n.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:e}]})}}class Ni extends V{constructor(){super(...arguments),this.stylesToBeFiltered=vt.getDefaultStyles(),this.elementTagName="table"}canFilter(t){return this.isTableBlock(t.dtoName)}canRefill(t,e){return this.isTableBlock(t)&&e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableBlock(t){return"RTETableBlock"===t}}class Bi extends V{constructor(){super(...arguments),this.stylesToBeFiltered=Ln.getDefaultStyles(),this.elementTagName="table caption"}canFilter(t){return this.isTableCaption(t.dtoName)}canRefill(t,e){return this.isTableCaption(t)&&"CAPTION"===e.nodeName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableCaption(t){return"RTETableCaptionBlock"===t}}class Mi extends V{constructor(t="td"){super(),this.stylesToBeFiltered=xt.getDefaultStyles(),this.elementTagName="",this.stylesWithRGBColor=xt.getDefaultStyles(!1),this.cellBlockClassName="",this.elementTagName=t,this.cellBlockClassName="td"===t?"RTETableCellBlock":"RTETableHeadCellBlock"}canFilter(t){return this.isTableCell(t.dtoName)}filterAndDeleteStyles(t,e){return this.convertDefaultBorderColorFromRGBToHex(t),super.filterAndDeleteStyles(t,e)}canRefill(t,e){return this.isTableCell(t)&&e.nodeName===this.elementTagName.toUpperCase()}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableCell(t){return t===this.cellBlockClassName}convertDefaultBorderColorFromRGBToHex(t){t&&t.border&&t.border===this.stylesWithRGBColor.border&&(t.border=this.stylesToBeFiltered.border)}}class ji extends m{constructor(t=Qt){super(),this.toolbarButtonRenderer=new Qn,this.tableBlockRenderer=new zn,this.tableRowBlockRenderer=new Kn,this.tableCellRenderer=new qn,this.tableHeadCellRenderer=new Un,this.tableSelection=new si,Tt.setTableColors(t),this.registerToolbarButtonRenderer(ji.TOOLBAR_BUTTON_KEY,this.toolbarButtonRenderer),this.registerBlockBasicStrategies(Et.name),this.registerBlockBasicStrategies(It.name),this.registerBlockBasicStrategies(yt.name),this.registerBlockBasicStrategies(Ut.name),this.registerBlockBasicStrategies(At.name),this.registerBlockBasicStrategies(Rt.name),this.registerRenderer("table-block",this.tableBlockRenderer),this.registerRenderer("table-head",new $n),this.registerRenderer("table-head-cell",this.tableHeadCellRenderer),this.registerRenderer("table-row",this.tableRowBlockRenderer),this.registerRenderer("table-cell",this.tableCellRenderer),this.registerRenderer("table-body",new Wn),this.registerRenderer("table-caption",new ei),this.registerNode("table-block",Et),this.registerNode("table-head",It),this.registerNode("table-head-cell",yt),this.registerNode("table-row",Ut),this.registerNode("table-cell",At),this.registerNode("table-body",Rt),this.registerNode("table-caption",kn),this.registerElementToBlockDTOClassStrategy(new wi),this.registerElementToBlockDTOClassStrategy(new gi),this.registerElementToBlockDTOClassStrategy(new bi),this.registerElementToBlockDTOClassStrategy(new mi),this.registerElementToBlockDTOClassStrategy(new vi),this.registerElementToBlockDTOClassStrategy(new xi),this.registerAnnotationHandler(new Ci),this.registerAnnotationHandler(new Li),this.registerAnnotationHandler(new ki)}initialExtensionAfterLoad(t){this.tableSelection.init(t);const e=Object.assign(Object.assign({},t),{tableSelection:this.tableSelection});super.initialExtensionAfterLoad(e)}destroyExtension(){this.tableBlockRenderer.destroy(),this.tableSelection.destroy()}}(()=>{const t=new Jn,e=new Xn;m.registerActionHandleStrategy(Q.name,"INSERT_TABLE_BLOCK",t),m.registerActionHandleStrategy(Et.name,"DELETE_TABLE_BLOCK",e),m.registerActionHandleStrategy(L.name,"INSERT_TABLE_BLOCK",t),m.registerActionHandleStrategy(et.name,"INSERT_TABLE_BLOCK",t),m.registerActionHandleStrategy(Et.name,Jt,new Ai),m.registerActionHandleStrategy(Et.name,Yt,new Ii),m.registerActionHandleStrategy(Et.name,Xt,new ii),m.registerActionHandleStrategy(Et.name,te,new ri),m.registerActionHandleStrategy(Et.name,ee,new ai),m.registerActionHandleStrategy(Et.name,ne,new oi),m.registerActionHandleStrategy(Et.name,ie,new se),m.registerActionHandleStrategy(Ut.name,re,new di),m.registerActionHandleStrategy(Ut.name,"CREATE_SEGMENT_TABLE_CELL",new ci),m.registerActionHandleStrategy(Ut.name,ae,new hi),m.registerActionHandleStrategy(At.name,oe,new Ei),m.registerActionHandleStrategy(At.name,le,new Oi),m.registerActionHandleStrategy(yt.name,oe,new Ei),m.registerActionHandleStrategy(yt.name,le,new Oi),m.registerActionHandleStrategy(Et.name,ce,new ui),m.registerActionHandleStrategy(Et.name,he,new fi),m.registerActionHandleStrategy(Et.name,On.name,new Si),m.registerActionHandleStrategy(At.name,Nn.name,new Ti),m.registerActionHandleStrategy(yt.name,Bn.name,new Ti),m.registerActionHandlerInterceptor(L.name,N.DELETE_BLOCK_CONTENT,new Yn),m.registerActionHandlerInterceptor(Ut.name,N.INSERT_CHILDREN_BEFORE,new pi),m.registerActionHandlerInterceptor(At.name,N.DELETE_CHILDREN,new ti),m.registerActionHandlerInterceptor(yt.name,N.DELETE_CHILDREN,new ti),m.registerActionHandlerInterceptor(Et.name,N.INSERT_NEW_PARAGRAPH,new Ri),m.registerFilterStylesStrategy(Et.dtoName,new Ni),m.registerFilterStylesStrategy(kn.dtoName,new Bi),m.registerFilterStylesStrategy(At.dtoName,new Mi),m.registerFilterStylesStrategy(yt.dtoName,new Mi("th"))})(),ji.TOOLBAR_BUTTON_KEY="table";class Di extends P{constructor(t,e,n){super(t,n),this.type="horizontal-line",this.parent=e}toJSON(){return{id:this.id,type:"horizontal-line"}}clone(t){return new Di(this.id,t,super.cloneAnnotations())}toHtml(){return"<hr>"}}const _i={display:"inline-block",width:"100%",height:"4px",backgroundColor:"rgb(222, 222, 222)",borderWidth:"0px"};class Hi extends V{constructor(){super(...arguments),this.stylesToBeFiltered=_i,this.elementTagName="hr"}canFilter(t){return class{static isHorizontalLineBlock(t){return"RTEHorizontalLineBlock"===t}}.isHorizontalLineBlock(t.dtoName)}canRefill(t,e){return e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}var Vi;!function(t){t.HORIZONTAL_LINE="HORIZONTAL_LINE"}(Vi||(Vi={}));class Pi extends B{constructor(){super(...arguments),this.type=Vi.HORIZONTAL_LINE}static from(){return[Vi.HORIZONTAL_LINE,new Pi]}static getDefaultStyles(){return _i}toJSON(){return null}clone(){return new Pi}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte-horizontal-line-hr"}renderStyle(t){return(null==t?void 0:t.standalone)?Pi.getDefaultStyles():null}}class Fi extends C{constructor(t,e){super(t),this.dtoName=Fi.dtoName,this.type="horizontal-line",this.children=[];const{autoMatchFormat:n=!0}=null!=e?e:{};n&&(this.annotationMap=new Map([Pi.from()]))}static from(e,n={autoMatchFormat:!0}){var i,s;const r=new Fi(e.id,n),a=(null===(s=null===(i=e.children)||void 0===i?void 0:i[0])||void 0===s?void 0:s.id)||t(),o=new Di(a,r);return r.children=[o],e.annotations&&C.convertAnnotationsToMap(r.annotationMap,e.annotations),r}static create(e,n={autoMatchFormat:!0}){const i=new Fi(t(),n),s=new Di(t(),i);return i.children=[s],e&&C.convertAnnotationsToMap(i.annotationMap,e),i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"horizontal-line",children:this.children.map((t=>t.toJSON()))})}toHtml(t){return`<hr${super.generateAttributeString(t)}>`}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1]}clone(t){const e=new Fi(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}Fi.dtoName="RTEHorizontalLineBlock";class zi extends b{doRender(t,e,n){const i=e.children[0],s=e.getStyles(n),r=e.getClasses(n),a=[P.DECORATOR_NODE_CLASS,r].filter(Boolean).join(" ");return t("div",{key:e.id,class:`v-rte-horizontal-line ${P.DECORATOR_CONTAINER_CLASS}`,ref:this.useRef(e)},[t("hr",{key:(null==i?void 0:i.id)||e.id+"-hr",class:a,style:Object.keys(s).length>0?s:void 0,ref:i?this.useRef(i):void 0})])}injectRTEScopeStyles(){return".v-rte-horizontal-line{padding:8px 0;overflow:hidden}.v-rte-horizontal-line .v-rte-horizontal-line-hr{display:inline-block;width:100%;height:4px;border-width:0px;background-color:rgb(222, 222, 222)}"}}class $i extends v{constructor(t,e=0){super(),this.type="INSERT_HORIZONTAL_LINE_BLOCK",this.splitPointNode=t,this.startOffsetOfNode=e}}class Ki extends Ze{render(t,e){return this.renderButton(t,e,{icon:"horizontal-line",tooltip:{text:f.t("Horizontal line")}})}isDisabled(t){const e=this.getExtensionContext(t.host);if(e){const{host:t,getSelectedNodes:n}=e,[i]=n();return i?t.disabled||!x.canHandle("INSERT_HORIZONTAL_LINE_BLOCK",i.parent):t.disabled}return!1}handleButtonClick(t){if(this.isDisabled(t))return;const e=this.getExtensionContext(t.host);if(e){const{host:n,getSelectedNodes:i,flushValue:s}=e,r=i()[0],a=new $i(r,t.rteRange.startOffset);r?r.parent&&r.parent.apply(a):n.value.apply(a),a.nextFocusNode&&n.value.apply(new Z(a.nextFocusNode,0)),s(n.value)}}handleDropdownClick(){}}at.register({"horizontal-line":{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="M0 224H32 608h32v64H608 32 0V224z"/></svg>'}});class qi extends Y{canHandle(t,e){return"HR"===t[e].tagName?1:0}handle(t,e){const n=X.generate(Fi,t[0],e);return Fi.create(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class Wi extends S{handleAction(t,e){const n=Fi.create();if(t.splitPointNode instanceof y){const i=t.splitPointNode,s=t.startOffsetOfNode;if(this.isCaretPositionAtBlockEnd(e,i,s))this.insertAfterWithFocus(t,e,n);else if(this.isCaretPositionAtBlockStart(e,i,s))e.parent.apply(new I(e,n)),t.nextFocusNode=e.getFirstNode();else{const r=new F(i,s);e.apply(r);const a=this.getNextSiblingBlock(e);e.parent.apply(new T(e,n)),t.nextFocusNode=a.getFirstNode()}}else if(t.splitPointNode)this.insertAfterWithFocus(t,e,n);else{const i=super.createNewParagraph("");e.apply(new E([n,i])),t.nextFocusNode=i.children[0]}}insertAfterWithFocus(t,e,n){const i=this.getNextSiblingBlock(e),s=null==i?void 0:i.getFirstNode();if(s instanceof y)e.parent.apply(new T(e,n)),t.nextFocusNode=s;else{const i=super.createNewParagraph("");e.parent.apply(new T(e,n,i)),t.nextFocusNode=i.children[0]}}getNextSiblingBlock(t){const e=t.parent.children,n=e.indexOf(t);return e[n+1]}}class Ui extends m{constructor(){super(),this.blockRenderer=new zi,this.toolbarButtonRenderer=new Ki,this.registerBlockBasicStrategies(Fi.name),this.registerNode("horizontal-line",Fi),this.registerRenderer("horizontal-line",this.blockRenderer),this.registerToolbarButtonRenderer(Ui.TOOLBAR_BUTTON_KEY,this.toolbarButtonRenderer),this.registerElementToBlockDTOClassStrategy(new qi),m.registerFilterStylesStrategy(Fi.dtoName,new Hi)}}var Gi;(()=>{const t=new Wi;m.registerActionHandleStrategy(Q.name,"INSERT_HORIZONTAL_LINE_BLOCK",t),m.registerActionHandleStrategy(L.name,"INSERT_HORIZONTAL_LINE_BLOCK",t),m.registerActionHandleStrategy(et.name,"INSERT_HORIZONTAL_LINE_BLOCK",t),m.registerActionHandleStrategy(Fi.name,"INSERT_HORIZONTAL_LINE_BLOCK",t)})(),Ui.TOOLBAR_BUTTON_KEY="horizontalLine",function(t){t.BLOCKQUOTE="BLOCKQUOTE"}(Gi||(Gi={}));const Zi={overflow:"hidden",marginInline:"0",paddingInline:"24px",borderInlineStart:"solid 5px hsl(0, 0%, 80%)"};class Qi extends B{constructor(){super(...arguments),this.type=Gi.BLOCKQUOTE}static from(){return[Gi.BLOCKQUOTE,new Qi]}static getDefaultCssText(){return`.v-rte-blockquote {\n${Object.entries(Zi).map((([t,e])=>`\t${Ce(t)}: ${e};`)).join("\n")}\n}`}toJSON(){return null}clone(){return new Qi}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte-blockquote"}renderStyle(t){return(null==t?void 0:t.standalone)?Zi:null}}class Ji extends C{constructor(t,e){super(t),this.dtoName=Ji.dtoName,this.type="blockquote",this.children=[];const{autoMatchFormat:n=!0}=null!=e?e:{};n&&(this.annotationMap=new Map([Qi.from()]))}static from(t,e){const n=new Ji(t.id,e);return t.annotations&&C.convertAnnotationsToMap(n.annotationMap,t.annotations),n.children=C.generateBlockChildren(t.children,e,n),n}clone(t){const e=new Ji(this.id),n=e;return e.children=this.children.map((t=>t.clone(n))),e.annotationMap=this.cloneAnnotations(),e.parent=t,e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){return`<blockquote${this.generateAttributeString(t)}>${this.children.map((e=>e.toHtml(t))).join("")}</blockquote>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:"blockquote",children:this.children.map((t=>t.toJSON()))})}}Ji.dtoName="RTEBlockquoteBlock";class Yi extends S{handleAction(e,n){const i=e.selectedBlocks,s=n.children,r=new Set(i),a=s.indexOf(i[0]),o=s.slice(0,a).filter((t=>!r.has(t))).length,l=new Ji(t());l.parent=n,l.children=i,i.forEach((t=>{t.parent=l}));for(let t=s.length-1;t>=0;t--)r.has(s[t])&&s.splice(t,1);s.splice(o,0,l)}}class Xi extends S{handleAction(t,e){const n=e.parent,i=[...e.children];i.length>0&&n.apply(new I(e,...i)),n.apply(new j(e))}}class ts extends un{canIntercept(t,e){const n=e.parent;return n instanceof Ji&&!e.isNotEmpty()&&n.children[n.children.length-1]===e}intercept(t,e,n){const i=n.parent,s=this.createNewParagraph("");s&&(i.parent.apply(new T(i,s)),i.apply(new j(n)),e.newBlock=s)}createNewParagraph(e){const n=H.getRTEBlockClass("paragraph");if(n)return n.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:e}]})}}class es extends v{constructor(t){super(),this.isFlushable=!0,this.type="TRANSFORM_TO_BLOCKQUOTE",this.selectedBlocks=t}}class ns extends v{constructor(){super(...arguments),this.isFlushable=!0,this.type="REMOVE_BLOCKQUOTE"}}class is extends Y{canHandle(t,e){return"BLOCKQUOTE"===t[e].tagName?1:0}handle(e,n){const i=X.generate(Ji,e[0],n);return Ji.from({id:t(),type:"blockquote",annotations:i,children:[]},n)}appendChildBlocks(t,e){const n=e.flatMap((t=>t instanceof Ji?t.children:[t]));t.children=n.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}const ss=new class extends b{doRender(t,e,n){var i;return t("blockquote",Object.assign({key:e.id,class:e.getClasses(n),style:e.getStyles(n),ref:this.useRef(e)},null===(i=e.getCustomAttributesAnnotation())||void 0===i?void 0:i.render()))}injectRTEScopeStyles(){return Qi.getDefaultCssText()}};class rs extends Ze{render(t,e){return this.renderButton(t,e,{icon:"quote-left",tooltip:{text:"Block quote"}})}isSelected(t){const e=this.getStartNode(t);return!!e&&null!==this.findBlockquoteAncestor(e)}isDisabled(t){if(t.host.disabled)return!0;const e=this.getStartNode(t);if(!e||null!==this.findBlockquoteAncestor(e))return!1;const{container:n}=this.resolveWrapAnchor(e.parent);return!x.canHandle("TRANSFORM_TO_BLOCKQUOTE",n)}handleButtonClick(t){const e=this.getExtensionContext(t.host);if(e){const{host:n,getSelectedNodes:i}=e,s=i(),r=s[0];if(!r)return void this.appendEmptyBlockquote(n.value);this.findBlockquoteAncestor(r)?this.collectBlockquoteAncestors(s).forEach((t=>{t.apply(new ns)})):this.wrapSelectedBlocks(s),n.value.apply(new Z(r,t.rteRange.startOffset))}}handleDropdownClick(){}appendEmptyBlockquote(e){if(e.children.length>0){const n=e.children[e.children.length-1],i=L.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]});e.apply(new T(n,i)),e.apply(new es([i])),e.apply(new Z(i.getLastNode(),0))}}wrapSelectedBlocks(t){var e,n;const i=this.getUniqueBlocks(t),s=new Set(i.map((t=>{var e;return null!==(e=this.resolveWrapAnchor(t,!0).wrapBlock)&&void 0!==e?e:t}))).size>1,r=new Set;for(const t of i){const{wrapBlock:e}=this.resolveWrapAnchor(t,s);e instanceof Ji&&!r.has(e)&&(r.add(e),e.apply(new ns))}const a=new Map;for(const t of i){const i=this.resolveWrapAnchor(t,s),{container:r}=i;if(r){const s=null!==(e=i.wrapBlock)&&void 0!==e?e:t,o=null!==(n=a.get(r))&&void 0!==n?n:new Set;o.add(s),a.set(r,o)}}for(const[t,e]of a)t.apply(new es([...e]))}getStartNode(t){const e=this.getExtensionContext(t.host);return null==e?void 0:e.getSelectedNodes()[0]}collectBlockquoteAncestors(t){const e=new Set;return t.forEach((t=>{const n=this.findBlockquoteAncestor(t);n&&e.add(n)})),e}findBlockquoteAncestor(t){let e=t.parent;for(;e&&!(e instanceof Q);){if(e instanceof Ji)return e;e=e.parent}return null}getUniqueBlocks(t){const e=new Set,n=[];return t.forEach((t=>{const i=t.parent;i&&!e.has(i)&&(e.add(i),n.push(i))})),n}resolveWrapAnchor(t,e=!1){let n=t;for(;n.parent&&!(n.parent instanceof Q)&&(e||!x.canHandle("TRANSFORM_TO_BLOCKQUOTE",n.parent));)n=n.parent;return{wrapBlock:n!==t?n:null,container:n.parent}}}at.register({"quote-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M0 216C0 149.7 53.7 96 120 96l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64L0 216zm256 0c0-66.3 53.7-120 120-120l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64l0-136z"/></svg>'}});class as extends V{constructor(){super(...arguments),this.stylesToBeFiltered=Zi,this.elementTagName="blockquote"}static isBlockquoteBlock(t){return"RTEBlockquoteBlock"===t}canFilter(t){return as.isBlockquoteBlock(t.dtoName)}canRefill(t,e){return e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}class os extends m{constructor(){super(),this.toolbarButtonRenderer=new rs,this.registerBlockBasicStrategies(Ji.name),this.registerNode("blockquote",Ji),this.registerRenderer("blockquote",ss),this.registerToolbarButtonRenderer(os.TOOLBAR_BUTTON_KEY,this.toolbarButtonRenderer),this.registerElementToBlockDTOClassStrategy(new is),m.registerFilterStylesStrategy(Ji.dtoName,new as)}}(()=>{const t=new Yi;m.registerActionHandleStrategy(Q.name,"TRANSFORM_TO_BLOCKQUOTE",t),m.registerActionHandleStrategy(At.name,"TRANSFORM_TO_BLOCKQUOTE",t),m.registerActionHandleStrategy(yt.name,"TRANSFORM_TO_BLOCKQUOTE",t),m.registerActionHandleStrategy(Ji.name,"REMOVE_BLOCKQUOTE",new Xi),m.registerActionHandlerInterceptor(L.name,N.INSERT_NEW_PARAGRAPH,new ts)})(),os.TOOLBAR_BUTTON_KEY="blockquote";const ls={key:"latin",label:"Latin",characters:[{character:"Ā",title:"Latin capital letter a with macron"},{character:"ā",title:"Latin small letter a with macron"},{character:"Ă",title:"Latin capital letter a with breve"},{character:"ă",title:"Latin small letter a with breve"},{character:"Ą",title:"Latin capital letter a with ogonek"},{character:"ą",title:"Latin small letter a with ogonek"},{character:"Ć",title:"Latin capital letter c with acute"},{character:"ć",title:"Latin small letter c with acute"},{character:"Ĉ",title:"Latin capital letter c with circumflex"},{character:"ĉ",title:"Latin small letter c with circumflex"},{character:"Ċ",title:"Latin capital letter c with dot above"},{character:"ċ",title:"Latin small letter c with dot above"},{character:"Č",title:"Latin capital letter c with caron"},{character:"č",title:"Latin small letter c with caron"},{character:"Ď",title:"Latin capital letter d with caron"},{character:"ď",title:"Latin small letter d with caron"},{character:"Đ",title:"Latin capital letter d with stroke"},{character:"đ",title:"Latin small letter d with stroke"},{character:"Ē",title:"Latin capital letter e with macron"},{character:"ē",title:"Latin small letter e with macron"},{character:"Ĕ",title:"Latin capital letter e with breve"},{character:"ĕ",title:"Latin small letter e with breve"},{character:"Ė",title:"Latin capital letter e with dot above"},{character:"ė",title:"Latin small letter e with dot above"},{character:"Ę",title:"Latin capital letter e with ogonek"},{character:"ę",title:"Latin small letter e with ogonek"},{character:"Ě",title:"Latin capital letter e with caron"},{character:"ě",title:"Latin small letter e with caron"},{character:"Ĝ",title:"Latin capital letter g with circumflex"},{character:"ĝ",title:"Latin small letter g with circumflex"},{character:"Ğ",title:"Latin capital letter g with breve"},{character:"ğ",title:"Latin small letter g with breve"},{character:"Ġ",title:"Latin capital letter g with dot above"},{character:"ġ",title:"Latin small letter g with dot above"},{character:"Ģ",title:"Latin capital letter g with cedilla"},{character:"ģ",title:"Latin small letter g with cedilla"},{character:"Ĥ",title:"Latin capital letter h with circumflex"},{character:"ĥ",title:"Latin small letter h with circumflex"},{character:"Ħ",title:"Latin capital letter h with stroke"},{character:"ħ",title:"Latin small letter h with stroke"},{character:"Ĩ",title:"Latin capital letter i with tilde"},{character:"ĩ",title:"Latin small letter i with tilde"},{character:"Ī",title:"Latin capital letter i with macron"},{character:"ī",title:"Latin small letter i with macron"},{character:"Ĭ",title:"Latin capital letter i with breve"},{character:"ĭ",title:"Latin small letter i with breve"},{character:"Į",title:"Latin capital letter i with ogonek"},{character:"į",title:"Latin small letter i with ogonek"},{character:"İ",title:"Latin capital letter i with dot above"},{character:"ı",title:"Latin small letter dotless i"},{character:"IJ",title:"Latin capital ligature ij"},{character:"ij",title:"Latin small ligature ij"},{character:"Ĵ",title:"Latin capital letter j with circumflex"},{character:"ĵ",title:"Latin small letter j with circumflex"},{character:"Ķ",title:"Latin capital letter k with cedilla"},{character:"ķ",title:"Latin small letter k with cedilla"},{character:"ĸ",title:"Latin small letter kra"},{character:"Ĺ",title:"Latin capital letter l with acute"},{character:"ĺ",title:"Latin small letter l with acute"},{character:"Ļ",title:"Latin capital letter l with cedilla"},{character:"ļ",title:"Latin small letter l with cedilla"},{character:"Ľ",title:"Latin capital letter l with caron"},{character:"ľ",title:"Latin small letter l with caron"},{character:"Ŀ",title:"Latin capital letter l with middle dot"},{character:"ŀ",title:"Latin small letter l with middle dot"},{character:"Ł",title:"Latin capital letter l with stroke"},{character:"ł",title:"Latin small letter l with stroke"},{character:"Ń",title:"Latin capital letter n with acute"},{character:"ń",title:"Latin small letter n with acute"},{character:"Ņ",title:"Latin capital letter n with cedilla"},{character:"ņ",title:"Latin small letter n with cedilla"},{character:"Ň",title:"Latin capital letter n with caron"},{character:"ň",title:"Latin small letter n with caron"},{character:"ʼn",title:"Latin small letter n preceded by apostrophe"},{character:"Ŋ",title:"Latin capital letter eng"},{character:"ŋ",title:"Latin small letter eng"},{character:"Ō",title:"Latin capital letter o with macron"},{character:"ō",title:"Latin small letter o with macron"},{character:"Ŏ",title:"Latin capital letter o with breve"},{character:"ŏ",title:"Latin small letter o with breve"},{character:"Ő",title:"Latin capital letter o with double acute"},{character:"ő",title:"Latin small letter o with double acute"},{character:"Œ",title:"Latin capital ligature oe"},{character:"œ",title:"Latin small ligature oe"},{character:"Ŕ",title:"Latin capital letter r with acute"},{character:"ŕ",title:"Latin small letter r with acute"},{character:"Ŗ",title:"Latin capital letter r with cedilla"},{character:"ŗ",title:"Latin small letter r with cedilla"},{character:"Ř",title:"Latin capital letter r with caron"},{character:"ř",title:"Latin small letter r with caron"},{character:"Ś",title:"Latin capital letter s with acute"},{character:"ś",title:"Latin small letter s with acute"},{character:"Ŝ",title:"Latin capital letter s with circumflex"},{character:"ŝ",title:"Latin small letter s with circumflex"},{character:"Ş",title:"Latin capital letter s with cedilla"},{character:"ş",title:"Latin small letter s with cedilla"},{character:"Š",title:"Latin capital letter s with caron"},{character:"š",title:"Latin small letter s with caron"},{character:"Ţ",title:"Latin capital letter t with cedilla"},{character:"ţ",title:"Latin small letter t with cedilla"},{character:"Ť",title:"Latin capital letter t with caron"},{character:"ť",title:"Latin small letter t with caron"},{character:"Ŧ",title:"Latin capital letter t with stroke"},{character:"ŧ",title:"Latin small letter t with stroke"},{character:"Ũ",title:"Latin capital letter u with tilde"},{character:"ũ",title:"Latin small letter u with tilde"},{character:"Ū",title:"Latin capital letter u with macron"},{character:"ū",title:"Latin small letter u with macron"},{character:"Ŭ",title:"Latin capital letter u with breve"},{character:"ŭ",title:"Latin small letter u with breve"},{character:"Ů",title:"Latin capital letter u with ring above"},{character:"ů",title:"Latin small letter u with ring above"},{character:"Ű",title:"Latin capital letter u with double acute"},{character:"ű",title:"Latin small letter u with double acute"},{character:"Ų",title:"Latin capital letter u with ogonek"},{character:"ų",title:"Latin small letter u with ogonek"},{character:"Ŵ",title:"Latin capital letter w with circumflex"},{character:"ŵ",title:"Latin small letter w with circumflex"},{character:"Ŷ",title:"Latin capital letter y with circumflex"},{character:"ŷ",title:"Latin small letter y with circumflex"},{character:"Ÿ",title:"Latin capital letter y with diaeresis"},{character:"Ź",title:"Latin capital letter z with acute"},{character:"ź",title:"Latin small letter z with acute"},{character:"Ż",title:"Latin capital letter z with dot above"},{character:"ż",title:"Latin small letter z with dot above"},{character:"Ž",title:"Latin capital letter z with caron"},{character:"ž",title:"Latin small letter z with caron"},{character:"ſ",title:"Latin small letter long s"}]},cs={key:"mathematical",label:"Mathematical",characters:[{character:"<",title:"Less-than sign"},{character:">",title:"Greater-than sign"},{character:"≤",title:"Less-than or equal to"},{character:"≥",title:"Greater-than or equal to"},{character:"–",title:"En dash"},{character:"—",title:"Em dash"},{character:"¯",title:"Macron"},{character:"‾",title:"Overline"},{character:"°",title:"Degree sign"},{character:"−",title:"Minus sign"},{character:"±",title:"Plus-minus sign"},{character:"÷",title:"Division sign"},{character:"⁄",title:"Fraction slash"},{character:"×",title:"Multiplication sign"},{character:"ƒ",title:"Latin small letter f with hook"},{character:"∫",title:"Integral"},{character:"∑",title:"N-ary summation"},{character:"∞",title:"Infinity"},{character:"√",title:"Square root"},{character:"∼",title:"Tilde operator"},{character:"≅",title:"Approximately equal to"},{character:"≈",title:"Almost equal to"},{character:"≠",title:"Not equal to"},{character:"≡",title:"Identical to"},{character:"∈",title:"Element of"},{character:"∉",title:"Not an element of"},{character:"∋",title:"Contains as member"},{character:"∏",title:"N-ary product"},{character:"∧",title:"Logical and"},{character:"∨",title:"Logical or"},{character:"¬",title:"Not sign"},{character:"∩",title:"Intersection"},{character:"∪",title:"Union"},{character:"∂",title:"Partial differential"},{character:"∀",title:"For all"},{character:"∃",title:"There exists"},{character:"∅",title:"Empty set"},{character:"∇",title:"Nabla"},{character:"∗",title:"Asterisk operator"},{character:"∝",title:"Proportional to"},{character:"∠",title:"Angle"},{character:"¼",title:"Vulgar fraction one quarter"},{character:"½",title:"Vulgar fraction one half"},{character:"¾",title:"Vulgar fraction three quarters"}]},hs={key:"arrows",label:"Arrows",characters:[{character:"←",title:"leftwards simple arrow"},{character:"→",title:"rightwards simple arrow"},{character:"↑",title:"upwards simple arrow"},{character:"↓",title:"downwards simple arrow"},{character:"⇐",title:"leftwards double arrow"},{character:"⇒",title:"rightwards double arrow"},{character:"⇑",title:"upwards double arrow"},{character:"⇓",title:"downwards double arrow"},{character:"⇠",title:"leftwards dashed arrow"},{character:"⇢",title:"rightwards dashed arrow"},{character:"⇡",title:"upwards dashed arrow"},{character:"⇣",title:"downwards dashed arrow"},{character:"⇤",title:"leftwards arrow to bar"},{character:"⇥",title:"rightwards arrow to bar"},{character:"⤒",title:"upwards arrow to bar"},{character:"⤓",title:"downwards arrow to bar"},{character:"↨",title:"up down arrow with base"},{character:"🔙",title:"back with leftwards arrow above"},{character:"🔚",title:"end with leftwards arrow above"},{character:"🔛",title:"on with exclamation mark with left right arrow above"},{character:"🔜",title:"soon with rightwards arrow above"},{character:"🔝",title:"top with upwards arrow above"}]},ds={key:"currency",label:"Currency",characters:[{character:"$",title:"Dollar sign"},{character:"€",title:"Euro sign"},{character:"¥",title:"Yen sign"},{character:"£",title:"Pound sign"},{character:"¢",title:"Cent sign"},{character:"₠",title:"Euro-currency sign"},{character:"₡",title:"Colon sign"},{character:"₢",title:"Cruzeiro sign"},{character:"₣",title:"French franc sign"},{character:"₤",title:"Lira sign"},{character:"¤",title:"Currency sign"},{character:"₿",title:"Bitcoin sign"},{character:"₥",title:"Mill sign"},{character:"₦",title:"Naira sign"},{character:"₧",title:"Peseta sign"},{character:"₨",title:"Rupee sign"},{character:"₩",title:"Won sign"},{character:"₪",title:"New sheqel sign"},{character:"₫",title:"Dong sign"},{character:"₭",title:"Kip sign"},{character:"₮",title:"Tugrik sign"},{character:"₯",title:"Drachma sign"},{character:"₰",title:"German penny sign"},{character:"₱",title:"Peso sign"},{character:"₲",title:"Guarani sign"},{character:"₳",title:"Austral sign"},{character:"₴",title:"Hryvnia sign"},{character:"₵",title:"Cedi sign"},{character:"₶",title:"Livre tournois sign"},{character:"₷",title:"Spesmilo sign"},{character:"₸",title:"Tenge sign"},{character:"₹",title:"Indian rupee sign"},{character:"₺",title:"Turkish lira sign"},{character:"₻",title:"Nordic mark sign"},{character:"₼",title:"Manat sign"},{character:"₽",title:"Ruble sign"}]},us={key:"text",label:"Text",characters:[{character:"‹",title:"Single left-pointing angle quotation mark"},{character:"›",title:"Single right-pointing angle quotation mark"},{character:"«",title:"Left-pointing double angle quotation mark"},{character:"»",title:"Right-pointing double angle quotation mark"},{character:"‘",title:"Left single quotation mark"},{character:"’",title:"Right single quotation mark"},{character:"“",title:"Left double quotation mark"},{character:"”",title:"Right double quotation mark"},{character:"‚",title:"Single low-9 quotation mark"},{character:"„",title:"Double low-9 quotation mark"},{character:"¡",title:"Inverted exclamation mark"},{character:"¿",title:"Inverted question mark"},{character:"‥",title:"Two dot leader"},{character:"…",title:"Horizontal ellipsis"},{character:"‡",title:"Double dagger"},{character:"‰",title:"Per mille sign"},{character:"‱",title:"Per ten thousand sign"},{character:"‼",title:"Double exclamation mark"},{character:"⁈",title:"Question exclamation mark"},{character:"⁉",title:"Exclamation question mark"},{character:"⁇",title:"Double question mark"},{character:"©",title:"Copyright sign"},{character:"®",title:"Registered sign"},{character:"™",title:"Trade mark sign"},{character:"§",title:"Section sign"},{character:"¶",title:"Paragraph sign"},{character:"⁋",title:"Reversed paragraph sign"}]},ps=[ds,us,cs,hs,ls];class fs extends Ze{constructor(t){super(),this.panelRef=null,this.categories=t}render(t,e){return t("vega-popover",{trigger:"click",alignment:"start",placement:"bottom",showArrow:!1,isScreenPosition:!0,ref:t=>{t&&lt.addUniqueObserverToNode(t,pt,(()=>{this.handlePopoverShow()}))}},[t("div",{slot:"popover"},[t("vega-rich-text-special-characters-panel",{categories:this.categories,ref:t=>{t&&(this.panelRef=t,lt.addUniqueObserverToNode(t,dt,(t=>{this.insertCharacter(e,t.detail)})))}})]),t("div",{slot:"popover-content"},this.renderButton(t,e,{icon:"rte-special-characters",tooltip:{text:"Special Characters"}}))])}handleButtonClick(){}handleDropdownClick(){}handlePopoverShow(){this.panelRef&&this.panelRef.resetPanel()}insertCharacter(t,e){const n=t.rteRange,i=n.startNode;if(!i)return;const s=this.isCaretOnLineBreak(i,n)?this.insertAtLineBreak(i,e,n):this.insertAtTextNode(i,e,n);t.host.value.apply(new Z(s.node,s.offset))}isCaretOnLineBreak(t,e){return t instanceof y&&"\n"===t.text&&e.startOffset===e.endOffset}insertAtTextNode(t,e,n){const i=new Le(e,n);return i.isFlushable=!0,t.apply(i),{node:t,offset:Math.min(n.startOffset+e.length,t.getRangeEndOffset())}}insertAtLineBreak(t,e,n){return{node:this.insertTextToLineBreakNode(t,e,n),offset:e.length}}insertTextToLineBreakNode(t,e,n){const i=t.parent,s=i.children.indexOf(t);if(0===n.startOffset&&i.children[s+1]){const n=t.cloneWithText(e),s=new I(t,n);return s.isFlushable=!0,i.apply(s),n}const r=new z(e);return r.isFlushable=!0,t.apply(r),t}}at.register({"rte-special-characters":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 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="M224 80C126.8 80 48 158.8 48 256c0 63.7 33.8 119.5 84.6 150.4c11.4 7 19.4 19.6 19.4 34.2c0 21.8-17.6 39.4-39.4 39.4H24c-13.3 0-24-10.7-24-24s10.7-24 24-24H85.4C33.4 391 0 327.4 0 256C0 132.3 100.3 32 224 32s224 100.3 224 224c0 71.4-33.4 135-85.4 176H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H335.4c-21.8 0-39.4-17.6-39.4-39.4c0-14.6 8-27.2 19.4-34.2C366.2 375.5 400 319.7 400 256c0-97.2-78.8-176-176-176z"/></svg>'}});class ws extends m{constructor(t){super(),this.categories=this.buildCategories(t)}prepareBeforeLoad(t){this.registerToolbarButtonRenderer(ws.TOOLBAR_BUTTON_KEY,new fs(this.categories),t)}buildCategories(t){const e=!1!==(null==t?void 0:t.includeDefaults)?ps:[];return(null==t?void 0:t.categories)?[...e,...t.categories]:e}}ws.TOOLBAR_BUTTON_KEY="special-characters";class gs{}class bs extends gs{canHandle(t){return t instanceof $}collect(t){return[t]}}class ms extends gs{canHandle(t){return t instanceof K}collect(t,e){const n=t,i=[n];if(n.nestList&&n.nestList.length>0)for(const t of n.nestList)i.push(...e(t.children));return i}}class vs extends gs{canHandle(t){return t instanceof L}collect(t){return[t]}}class xs extends gs{canHandle(t){return null!=t.children&&t.children.length>0&&!(t.children[0]instanceof y)}collect(t,e){return e(t.children)}}class ys{constructor(){this.matches=[],this.currentIndex=-1,this.flatCache=new WeakMap,this.cachedContent=null,this.matchCase=!1,this.wholeWords=!1,this.blockSearchStrategies=[new bs,new ms,new vs,new xs]}search(t,e){if(this.invalidateCacheIfNeeded(t),!e)return this.matches=[],void(this.currentIndex=-1);const n=this.buildRegExp(e,this.getFindOptions()),i=this.collectSearchableBlocks(t.children),s=[];for(const t of i){let e=this.flatCache.get(t);e||(e=t instanceof $?this.buildCodeBlockFlat(t):this.buildTextBlockFlat(t),this.flatCache.set(t,e));const{flatText:i,segments:r}=e;if(!i)continue;let a;for(n.lastIndex=0;null!==(a=n.exec(i));){const e=a.index+a[0].length,n=this.flatOffsetToNodePositions(r,e-a[1].length,e);n.length>0&&s.push({block:t,nodes:n,matchText:a[1]})}}this.matches=s,this.currentIndex=s.length>0?0:-1}next(){0!==this.matches.length&&(this.currentIndex=(this.currentIndex+1)%this.matches.length)}prev(){0!==this.matches.length&&(this.currentIndex=(this.currentIndex-1+this.matches.length)%this.matches.length)}setCurrentIndex(t){this.currentIndex=0!==this.matches.length?Math.max(0,Math.min(t,this.matches.length-1)):-1}getCurrentMatch(){var t;return null!==(t=this.matches[this.currentIndex])&&void 0!==t?t:null}getMatches(){return this.matches}getTotal(){return this.matches.length}getCurrentIndex(){return this.currentIndex}clearResults(){this.matches=[],this.currentIndex=-1}clear(){this.matches=[],this.currentIndex=-1,this.flatCache=new WeakMap,this.cachedContent=null}setMatchCase(t){this.matchCase=t}setWholeWords(t){this.wholeWords=t}invalidateCacheIfNeeded(t){t!==this.cachedContent&&(this.flatCache=new WeakMap,this.cachedContent=t)}buildRegExp(t,e){const n=this.escapeRegExp(t);let i="gu";if(e.matchCase||(i+="i"),e.wholeWords){const e="[^a-zA-ZÀ-ɏḀ-ỿ]",s=new RegExp(`^${e}`).test(t)?"":`(?:^|${e})`,r=new RegExp(`${e}$`).test(t)?"":`(?=${e}|$)`;return new RegExp(`${s}(${n})${r}`,i)}return new RegExp(`(${n})`,i)}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}collectSearchableBlocks(t){const e=[],n=this.collectSearchableBlocks.bind(this);for(const i of t){const t=this.blockSearchStrategies.find((t=>t.canHandle(i)));t&&e.push(...t.collect(i,n))}return e}buildTextBlockFlat(t){const e=[],n=[];let i=0;for(const s of t.children){if(!s.isContentEditable()){n.push("\0"),i+="\0".length;continue}const t=s.text.length;e.push({node:s,start:i,end:i+t}),n.push(s.text),i+=t}return{flatText:n.join(""),segments:e}}buildCodeBlockFlat(t){const e=t.children[0];if(!e)return{flatText:"",segments:[]};const n=e.text;return{flatText:n,segments:[{node:e,start:0,end:n.length}]}}flatOffsetToNodePositions(t,e,n){const i=[];for(const s of t){if(s.end<=e)continue;if(s.start>=n)break;const t=Math.max(0,e-s.start),r=Math.min(s.end,n)-s.start;i.push({node:s.node,startOffset:t,endOffset:r})}return i}getFindOptions(){return{matchCase:this.matchCase,wholeWords:this.wholeWords}}}class Cs{constructor(){this.overlayContainer=null,be.registerCustomDarkModeColor({"rte-find-highlight-bg":"255, 235, 0, 0.55","rte-find-highlight-active-bg":"255, 190, 0, 0.7","rte-find-highlight-blend":"lighten"})}apply(t,e,n,i=!0){if(this.clear(),0===t.length)return;const s=this.getOrCreateOverlay(n);if(s){const n=s.getBoundingClientRect();let r=null;t.forEach(((t,i)=>{const a=i===e,o=a?"rgba(var(--v-rte-find-highlight-active-bg, 255, 150, 0, 0.5))":"rgba(var(--v-rte-find-highlight-bg, 255, 220, 0, 0.35))";t.nodes.forEach((t=>{const e=this.createHighlightRectangles(s,n,t,o);a&&!r&&e&&(r=e)}))})),i&&r&&r.scrollIntoView({block:"center",inline:"nearest"})}}clear(){this.overlayContainer&&(this.overlayContainer.innerHTML="")}getOrCreateOverlay(t){if(this.overlayContainer&&this.overlayContainer.isConnected)return this.overlayContainer;const e=me();if(e){const n=this.resolveOverlayMountTarget(t);if(n){const t=e.createElement("div");return t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.pointerEvents="none",t.style.overflow="visible",t.style.setProperty("mix-blend-mode","var(--v-rte-find-highlight-blend, multiply)"),n.appendChild(t),this.overlayContainer=t,t}}return null}resolveOverlayMountTarget(t){var e,n,i,s;return null!==(s=null===(i=null===(n=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("vega-rich-text-content"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.querySelector(".rich-text-content"))&&void 0!==s?s:null}createHighlightRectangles(t,e,n,i){const s=A.getDOMByEntity(n.node);if(!s)return null;const r=this.buildRange(s,n);if(!r)return null;const a=r.getClientRects(),o=me();let l=null;if(o)for(let n=0;n<a.length;n++){const s=a[n];if(0===s.width||0===s.height)continue;const r=o.createElement("div");r.style.position="absolute",r.style.top=s.top-e.top+"px",r.style.left=s.left-e.left+"px",r.style.width=`${s.width}px`,r.style.height=`${s.height}px`,r.style.backgroundColor=i,r.style.pointerEvents="none",r.style.borderRadius="2px",t.appendChild(r),l||(l=r)}return l}buildRange(t,e){if(e.node instanceof q)return this.buildCodeBlockRange(t,e);const n=t.firstChild;if(!n)return null;const i=me();if(i){const t=i.createRange();try{return t.setStart(n,e.startOffset),t.setEnd(n,e.endOffset),t}catch(t){return null}}return null}buildCodeBlockRange(t,e){const n=t.shadowRoot.querySelector("code");if(!n)return null;const i=me();if(i){const t=i.createTreeWalker(n,NodeFilter.SHOW_TEXT);let s=0,r=null,a=0,o=null,l=0,c=t.nextNode();for(;c;){const n=c.textContent.length;if(!r&&s+n>e.startOffset&&(r=c,a=e.startOffset-s),s+n>=e.endOffset){o=c,l=e.endOffset-s;break}s+=n,c=t.nextNode()}if(r&&o){const t=i.createRange();try{return t.setStart(r,a),t.setEnd(o,l),t}catch(t){return null}}}return null}}class Ls{constructor(t){this.context=t}setHost(t){this.context.hostRef=t}setKeyword(t){return this.context.keyword=t,this.context.state.clearResults(),this.context.hostRef&&this.context.highlightManager.clear(),{current:0,total:0}}applyAndGetResult(t=!0){const e=this.context.state.getTotal(),n=e>0?this.context.state.getCurrentIndex()+1:0;return this.context.hostRef&&this.context.highlightManager.apply(this.context.state.getMatches(),this.context.state.getCurrentIndex(),this.context.hostRef,t),{current:n,total:e}}}class ks extends Ls{constructor(t){super(t)}find(){return this.context.hostRef?(this.context.state.search(this.context.hostRef.value,this.context.keyword),this.applyAndGetResult()):{current:0,total:0}}next(){return this.context.state.next(),this.applyAndGetResult()}prev(){return this.context.state.prev(),this.applyAndGetResult()}clear(){this.context.state.clear(),this.context.hostRef&&this.context.highlightManager.clear()}refresh(t=!0){if(!this.context.keyword||!this.context.hostRef)return null;const e=this.context.state.getCurrentIndex();return this.context.state.search(this.context.hostRef.value,this.context.keyword),this.context.state.setCurrentIndex(e),this.applyAndGetResult(t)}setMatchCase(t){return this.context.state.setMatchCase(t),this.updateFindResults()}setWholeWords(t){return this.context.state.setWholeWords(t),this.updateFindResults()}updateFindResults(){return this.context.state.clearResults(),this.context.keyword&&this.context.hostRef?(this.context.state.search(this.context.hostRef.value,this.context.keyword),this.applyAndGetResult()):{current:0,total:0}}}class Ss extends Ls{constructor(t){super(t),this.replacement="",this.flushFn=null}setFlushValue(t){this.flushFn=t}setReplacement(t){this.replacement=t}replace(){const t=this.context.state.getCurrentMatch();if(t&&this.context.hostRef&&this.flushFn){const e=this.context.state.getCurrentIndex();this.applyMatchReplacement(t),this.flushFn(this.context.hostRef.value),this.context.state.clear(),this.context.state.search(this.context.hostRef.value,this.context.keyword),this.context.state.setCurrentIndex(e)}return this.applyAndGetResult()}replaceAll(){if(this.context.state.getTotal()>0&&this.flushFn&&this.context.hostRef){const t=this.context.state.getMatches();for(let e=t.length-1;e>=0;e-=1)this.applyMatchReplacement(t[e]);this.flushFn(this.context.hostRef.value),this.context.state.clear(),this.context.state.search(this.context.hostRef.value,this.context.keyword)}return this.applyAndGetResult()}applyMatchReplacement(t){t.nodes.forEach(((t,e)=>{const n=0===e?this.replacement:"";t.node.text=t.node.text.slice(0,t.startOffset)+n+t.node.text.slice(t.endOffset)}))}}class Ts extends Ze{constructor(){super(...arguments),this.sharedContext={state:new ys,highlightManager:new Cs,hostRef:null,keyword:""},this.findController=new ks(this.sharedContext),this.replaceController=new Ss(this.sharedContext),this.panelRef=null,this.popoverRef=null,this.isPopoverOpen=!1,this.scrollOnNextRefresh=!1,this.debouncedRefresh=ye(this.onContentChanged,100,this),this.panelActionHandlers={find:()=>this.findController.find(),prev:()=>this.findController.prev(),next:()=>this.findController.next(),replace:()=>(this.scrollOnNextRefresh=!0,this.replaceController.replace()),"replace-all":()=>(this.scrollOnNextRefresh=!0,this.replaceController.replaceAll()),"match-case":t=>this.findController.setMatchCase(t),"whole-words":t=>this.findController.setWholeWords(t),close:()=>this.closePanel()}}render(t,e){return this.syncEditorState(e),t("vega-popover",{trigger:"none",alignment:"start",placement:"bottom",showArrow:!1,isScreenPosition:!0,ref:t=>{t&&(this.popoverRef=t,lt.addUniqueObserverToNode(t,ut,(()=>{this.isPopoverOpen=!1,this.findController.clear(),this.updatePanel({current:0,total:0})})),lt.addUniqueObserverToNode(t,pt,(()=>{this.isPopoverOpen=!0})))}},[t("div",{slot:"popover"},[t("vega-rich-text-find-replace-panel",{ref:t=>{t&&(this.panelRef=t,lt.addUniqueObserverToNode(t,ft,(t=>{"keyword"===t.detail.type?this.updatePanel(this.findController.setKeyword(t.detail.value)):"replace"===t.detail.type&&this.replaceController.setReplacement(t.detail.value)})),lt.addUniqueObserverToNode(t,dt,(t=>{this.handlePanelAction(t.detail)})))}})]),t("div",{slot:"popover-content"},this.renderButton(t,e,{icon:"rte-find-replace",tooltip:{text:f.t("Find and replace")}}))])}handleButtonClick(){this.popoverRef&&(this.isPopoverOpen?this.popoverRef.hide():this.popoverRef.show())}handleDropdownClick(){}syncEditorState(t){this.findController.setHost(t.host);const e=this.getExtensionContext(t.host);e&&this.replaceController.setFlushValue(e.flushValue),lt.addUniqueObserverToNode(t.host,ft,this.debouncedRefresh),this.isHidden(t)&&this.isPopoverOpen&&this.popoverRef?this.popoverRef.hide():this.isPopoverOpen&&this.popoverRef&&this.popoverRef.show(!0)}handlePanelAction(t){const{action:e,data:n}=t,i=this.panelActionHandlers[e];if(i){const t=i(n);t&&this.updatePanel(t)}}updatePanel(t){this.panelRef&&this.panelRef.updateResult(t.current,t.total)}onContentChanged(){if(!this.isPopoverOpen)return;const t=this.scrollOnNextRefresh;this.scrollOnNextRefresh=!1;const e=this.findController.refresh(t);e&&this.updatePanel(e)}closePanel(){this.popoverRef&&this.popoverRef.hide()}}at.register({"rte-find-replace":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2026 Fonticons, Inc. --\x3e<path fill="currentColor" d="M208 48c39.6 0 75.9 14.4 103.8 38.2L279 119c-6.9 6.9-8.9 17.2-5.2 26.2S286.3 160 296 160l96 0c13.3 0 24-10.7 24-24l0-96c0-9.7-5.8-18.5-14.8-22.2S381.9 16.2 375 23L345.8 52.2c-36.7-32.5-85-52.2-137.8-52.2-99.4 0-182.4 69.7-203.1 162.8-2.9 12.9 5.3 25.8 18.2 28.6 1.4 .3 2.7 .5 4.1 .5l2.3 0C40.1 191.5 49.4 184 51.8 173.2 67.7 101.6 131.6 48 208 48zM386 224c-10.4 .7-19.4 8.1-21.8 18.8-15.9 71.7-79.8 125.2-156.2 125.2-39.6 0-75.9-14.4-103.8-38.2L137 297c6.9-6.9 8.9-17.2 5.2-26.2S129.7 256 120 256l-96 0c-13.3 0-24 10.7-24 24l0 96c0 9.7 5.8 18.5 14.8 22.2S34.1 399.8 41 393l29.2-29.2c36.7 32.5 85 52.2 137.8 52.2 48.8 0 93.7-16.8 129.1-44.9L471 505c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L371.1 337.1c19.2-24.2 33.1-52.8 40-84 2.9-12.9-5.3-25.8-18.2-28.6-1.2-.3-2.4-.4-3.6-.5l-3.2 0z"/></svg>'}});class Es extends m{prepareBeforeLoad(t){this.registerToolbarButtonRenderer(Es.TOOLBAR_BUTTON_KEY,new Ts,t)}}Es.TOOLBAR_BUTTON_KEY="findReplace";const Os=[{title:"0.5",value:"0.5"},{title:"1",value:"1"},{title:"1.5",value:"1.5"},{title:"2",value:"2"},{title:"2.5",value:"2.5"}];var As;!function(t){t.LINE_HEIGHT="LINE_HEIGHT"}(As||(As={}));class Is extends B{constructor(t){super(),this.type=As.LINE_HEIGHT,this.lineHeight=t}static from(t){return[As.LINE_HEIGHT,new Is(t)]}static getDefaultStyles(t){return{lineHeight:t}}toJSON(){return{lineHeight:this.lineHeight}}renderClass(){return null}clone(){return new Is(this.lineHeight)}renderStyle(){return Is.getDefaultStyles(this.lineHeight)}}class Rs extends M{constructor(t){super(),this.isFlushable=!0,this.lineHeight=t}toAnnotation(){return new Is(this.lineHeight)}}class Ns extends S{handleAction(t,e){this.updateCustomStyleAnnotation(e,["lineHeight"])}}class Bs extends Ze{constructor(t){super(),this.options=t}render(t,e){const n=this.options.map((t=>{var e;return{key:t.value,label:null!==(e=t.title)&&void 0!==e?e:t.value}}));return this.renderDropdown(t,e,{selectType:"single",selectedSourceKey:this.getSelectedSourceValue(e)},[this.renderButton(t,e,{icon:"line-height",showArrowIcon:!0,tooltip:{text:f.t("Line Height")}}),this.renderDropdownListTemplate(t,n,e)])}isSelected(){return!1}isDisabled(t){var e;if(t.host.disabled)return!0;const n=this.getExtensionContext(t.host);return!!(null!==(e=null==n?void 0:n.getSelectedNodes())&&void 0!==e?e:[]).some((t=>{var e;return(null===(e=t.getAnnotationByType(W.CODE))||void 0===e?void 0:e.code)||t.parent instanceof $}))||this.getSelectedBlocks(t).some((t=>t instanceof $||t instanceof et||!x.canHandle(Rs.name,t)))}handleDropdownClick(t,e){const n=t;this.getSelectedBlocks(e).forEach((t=>{t.apply(new Rs(n))}))}handleButtonClick(){}getSelectedSourceValue(t){const e=this.getSelectedBlocks(t);if(0===e.length)return"";const n=e[0].getAnnotationByType(As.LINE_HEIGHT);return e.every((t=>{const e=t.getAnnotationByType(As.LINE_HEIGHT);return(null==e?void 0:e.lineHeight)===(null==n?void 0:n.lineHeight)}))&&n?n.lineHeight:""}getSelectedBlocks(t){var e,n;const i=this.getExtensionContext(t.host),s=null!==(e=null==i?void 0:i.getSelectedNodes())&&void 0!==e?e:[],r=[];return s.forEach((t=>{t.parent instanceof C&&!r.includes(t.parent)&&r.push(t.parent)})),0===r.length&&(null===(n=t.rteRange.startNode)||void 0===n?void 0:n.parent)instanceof C&&r.push(t.rteRange.startNode.parent),r}}at.register({"line-height":{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="M113.8 39.9c-4.6-5.1-11-7.9-17.8-7.9s-13.3 2.9-17.8 7.9l-72 80c-8.9 9.9-8.1 25 1.8 33.9s25 8.1 33.9-1.8L72 118.5V393.5L41.8 359.9c-8.9-9.9-24-10.7-33.9-1.8s-10.7 24-1.8 33.9l72 80c4.6 5.1 11 7.9 17.8 7.9s13.3-2.9 17.8-7.9l72-80c8.9-9.9 8.1-25-1.8-33.9s-25-8.1-33.9 1.8L120 393.5V118.5l30.2 33.5c8.9 9.9 24 10.7 33.9 1.8s10.7-24 1.8-33.9l-72-80zM248 72c-13.3 0-24 10.7-24 24s10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248zm0 160c-13.3 0-24 10.7-24 24s10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248zM224 416c0 13.3 10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248c-13.3 0-24 10.7-24 24z"/></svg>'}});const Ms=new Set([L.name,K.name]);class js extends st{constructor(t=Os){super(),this.allowedLineHeights=new Set(t.map((t=>t.value)))}canHandle(t){return Ms.has(t.name)}handle(t){var e,n;const i=null!==(n=null===(e=null==t?void 0:t.style.lineHeight)||void 0===e?void 0:e.trim())&&void 0!==n?n:"";return i&&this.allowedLineHeights.has(i)?{lineHeight:i}:{}}}class Ds extends V{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const e=t,n=e.lineHeight,i=e.customStyle;return n&&i&&i.lineHeight===n&&delete i.lineHeight,i&&0===Object.keys(i).length&&delete e.customStyle,t}}const _s=new WeakMap,Hs=new WeakSet;class Vs extends m{constructor(t=Os){super(),this.options=t,this.toolbarButtonRenderer=null,this.registerAnnotationHandler(new js(this.options)),[L,K].forEach((t=>{!function(t,e){_s.set(t,new Set(e.map((t=>t.value))))}(t,this.options)}))}prepareBeforeLoad(t){this.toolbarButtonRenderer=new Bs(this.options),this.registerToolbarButtonRenderer(Vs.TOOLBAR_BUTTON_KEY,this.toolbarButtonRenderer,t)}}[L,K].forEach((t=>{m.registerActionHandleStrategy(t.name,Rs.name,new Ns),G.register(t.name,new Ds),function(t){Hs.has(t)||(Hs.add(t),m.attachAnnotationFromJson(t,"lineHeight",((e,n)=>{if("string"!=typeof n||""===n)return;e.annotationMap.set(...Is.from(n));const i=_s.get(t);i&&i.size>0&&function(t,e){const n=t.annotationMap.get(As.LINE_HEIGHT);if(!n||e.has(n.lineHeight))return;const i=n.lineHeight;t.annotationMap.delete(As.LINE_HEIGHT);const s=t.annotationMap.get(D.CUSTOM_STYLE);s?s.customStyle=Object.assign(Object.assign({},s.customStyle),{lineHeight:i}):t.annotationMap.set(...U.from({lineHeight:i}))}(e,i)})))}(t)})),Vs.TOOLBAR_BUTTON_KEY="lineHeight";class Ps extends Ze{constructor(t){super(),this.controller=t}isHidden(){return!1}render(t,e){const n=this.isSelected();return this.renderButton(t,e,{icon:n?"rte-fullscreen-exit":"rte-fullscreen-enter",tooltip:{text:f.t(n?"Exit fullscreen mode":"Enter fullscreen mode")}})}isSelected(){return this.controller.isActive()}handleButtonClick(t){this.controller.toggleFullscreen();const e=this.getExtensionContext(t.host);e&&e.forceUpdate(t.host)}handleDropdownClick(){}}at.register({"rte-fullscreen-enter":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 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="M295 183c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l135-135V168c0 13.3 10.7 24 24 24s24-10.7 24-24V24c0-13.3-10.7-24-24-24H344c-13.3 0-24 10.7-24 24s10.7 24 24 24h86.1L295 183zM217 329c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L48 430.1V344c0-13.3-10.7-24-24-24s-24 10.7-24 24V488c0 13.3 10.7 24 24 24H168c13.3 0 24-10.7 24-24s-10.7-24-24-24H81.9L217 329z"/></svg>'},"rte-fullscreen-exit":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 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="M473 57c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-135 135V72c0-13.3-10.7-24-24-24s-24 10.7-24 24V216c0 13.3 10.7 24 24 24H424c13.3 0 24-10.7 24-24s-10.7-24-24-24H337.9L473 57zM7 455c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l135-135V440c0 13.3 10.7 24 24 24s24-10.7 24-24V296c0-13.3-10.7-24-24-24H56c-13.3 0-24 10.7-24 24s10.7 24 24 24h86.1L7 455z"/></svg>'}});class Fs{constructor(t){this.active=!1,this.hostStyle=null,this.scrollX=0,this.scrollY=0,this.host=t}isActive(){return this.active}enterFullscreen(){var t,e,n,i;const s=this.host;if(this.active||!s.shadowRoot||!s.ownerDocument)return;this.hostStyle=s.getAttribute("style"),this.scrollX=null!==(e=null===(t=s.ownerDocument.defaultView)||void 0===t?void 0:t.scrollX)&&void 0!==e?e:0,this.scrollY=null!==(i=null===(n=s.ownerDocument.defaultView)||void 0===n?void 0:n.scrollY)&&void 0!==i?i:0,this.lockDocumentScroll(s.ownerDocument);const r=this.hostStyle?/;\s*$/.test(this.hostStyle)?this.hostStyle:`${this.hostStyle};`:"";s.setAttribute("style",`${r}${Fs.HOST_FULLSCREEN_STYLE}`),s instanceof HTMLElement&&h.setZIndex(s,"base");const a=s.ownerDocument.createElement("style");a.id=Fs.STYLE_TAG_ID,ot.nonce&&a.setAttribute("nonce",ot.nonce),a.textContent=Fs.INNER_FULLSCREEN_CSS,s.shadowRoot.appendChild(a),this.active=!0}exitFullscreen(){var t,e,n,i;const s=this.host;this.active&&(s.ownerDocument&&this.unlockDocumentScroll(s.ownerDocument),s instanceof HTMLElement&&h.removeZIndex(s,"base"),null===this.hostStyle?s.removeAttribute("style"):s.setAttribute("style",this.hostStyle),null===(e=null===(t=s.shadowRoot)||void 0===t?void 0:t.querySelector(`#${Fs.STYLE_TAG_ID}`))||void 0===e||e.remove(),null===(i=null===(n=s.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===i||i.scrollTo(this.scrollX,this.scrollY),this.active=!1)}toggleFullscreen(){this.active?this.exitFullscreen():this.enterFullscreen()}lockDocumentScroll(t){const e=Fs.documentScrollLockStates.get(t);e?Fs.documentScrollLockStates.set(t,Object.assign(Object.assign({},e),{lockCount:e.lockCount+1})):(Fs.documentScrollLockStates.set(t,{lockCount:1,bodyOverflow:t.body.style.overflow,documentOverflow:t.documentElement.style.overflow}),t.body.style.overflow="hidden",t.documentElement.style.overflow="hidden")}unlockDocumentScroll(t){const e=Fs.documentScrollLockStates.get(t);e&&(e.lockCount>1?Fs.documentScrollLockStates.set(t,Object.assign(Object.assign({},e),{lockCount:e.lockCount-1})):(t.body.style.overflow=e.bodyOverflow,t.documentElement.style.overflow=e.documentOverflow,Fs.documentScrollLockStates.delete(t)))}}Fs.STYLE_TAG_ID="v-rte-fullscreen-styles",Fs.HOST_FULLSCREEN_STYLE="position:fixed;inset:0;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));",Fs.INNER_FULLSCREEN_CSS=":host > vega-flex { height: 100%; padding: 5px; box-sizing: border-box; } .rich-text-editor-container { flex: 1 !important; height: auto !important; min-height: 0 !important; resize: none !important; overflow: auto !important; } .source-view-container:not(.vega-hidden) { display: flex !important; flex: 1 !important; min-height: 0 !important; overflow: auto !important; flex-direction: column; }",Fs.documentScrollLockStates=new WeakMap;class zs extends m{prepareBeforeLoad(t){const e=new Fs(t);zs.controllerStore.set(t,e),this.registerToolbarButtonRenderer(zs.TOOLBAR_BUTTON_KEY,new Ps(e),t)}destroyExtension(){var t,e;if(null===(t=this.extensionContext)||void 0===t?void 0:t.host){const t=this.extensionContext.host;null===(e=zs.controllerStore.get(t))||void 0===e||e.exitFullscreen(),zs.controllerStore.delete(t)}}}zs.TOOLBAR_BUTTON_KEY="fullscreen",zs.controllerStore=zs.createStateStore();class $s{constructor(t,e){this.hostRoot=t,this.callbacks=e,this.chooserEl=null,this.dropdownEl=null,this.triggerButtonEl=null}open(t){this.destroy();const e=this.hostRoot.ownerDocument,n=e.createElement("div");n.setAttribute($s.CHOOSER_ATTR,"true"),n.style.position="fixed",n.style.zIndex="1000",n.style.left=`${t.left}px`,n.style.top=`${t.top}px`;const i=this.createPasteChooserDropdown(e,t.placement);i.placement=t.placement,n.append(i),this.hostRoot.appendChild(n),this.chooserEl=n,this.dropdownEl=i,i.addEventListener("vegaShow",(()=>{this.triggerButtonEl&&(this.triggerButtonEl.selected=!0)})),i.addEventListener("vegaHide",(()=>{this.triggerButtonEl&&(this.triggerButtonEl.selected=!1)}))}destroy(){var t;this.dropdownEl&&"function"==typeof this.dropdownEl.hide&&this.dropdownEl.hide(),(null===(t=this.chooserEl)||void 0===t?void 0:t.parentNode)&&this.chooserEl.parentNode.removeChild(this.chooserEl),this.triggerButtonEl&&(this.triggerButtonEl.selected=!1),this.dropdownEl=null,this.chooserEl=null,this.triggerButtonEl=null}includesEventPath(t){if(!this.chooserEl)return!1;const e=t.some((t=>"tagName"in t&&"VEGA-DROPDOWN-CONTENT-BOX"===t.tagName));return t.includes(this.chooserEl)||e}createPasteChooserDropdown(t,e){const n=t.createElement("vega-dropdown");n.trigger="click",n.selectType="single",n.selectedSourceKey="rich",n.maxWidth=220,n.alignment="start",n.itemDisplayRule="ellipsis",n.isScreenPosition=!0;const i=t.createElement("vega-rich-text-editor-toolbar-button"),s="top"===e[0]?"chevron-up":"chevron-down";i.setAttribute($s.CHOOSER_TRIGGER_ATTR,"true"),i.setAttribute("aria-label",f.t("Paste options")),i.setAttribute("arrow-icon",s),i.icon="rte-paste",i.showArrowIcon=!0,i.selected=!1,this.triggerButtonEl=i;const r=t.createElement("vega-tooltip");r.text=f.t("Paste options"),r.placement=["bottom","top"],r.append(i),n.append(r);const a=t.createElement("div");return a.setAttribute("slot","items"),a.append(this.createDropdownItem(t,"rich",f.t("Use rich text"),$s.CHOOSER_RICH_ATTR)),n.append(a),n.addEventListener("vegaDropdownClick",(t=>{const e=t.detail;"rich"===e&&this.callbacks.onModeSelect(e)})),n}createDropdownItem(t,e,n,i){const s=t.createElement("vega-dropdown-item");return s.itemKey=e,s.label=n,s.setAttribute(i,"true"),s}}at.register({"rte-paste":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 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="M80 96v16c0 17.7 14.3 32 32 32h60.8c16.6-28.7 47.6-48 83.2-48h62c-7.1-27.6-32.2-48-62-48H215.4C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48H64C28.7 48 0 76.7 0 112V384c0 35.3 28.7 64 64 64h96V400H64c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H80zm64-40a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM256 464c-8.8 0-16-7.2-16-16V192c0-8.8 7.2-16 16-16H384v48c0 17.7 14.3 32 32 32h48V448c0 8.8-7.2 16-16 16H256zm192 48c35.3 0 64-28.7 64-64V227.9c0-12.7-5.1-24.9-14.1-33.9l-51.9-51.9c-9-9-21.2-14.1-33.9-14.1H256c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></svg>'}}),$s.CHOOSER_ATTR="data-rte-paste-chooser",$s.CHOOSER_RICH_ATTR="data-rte-paste-type-rich",$s.CHOOSER_TRIGGER_ATTR="data-rte-paste-trigger";class Ks extends m{constructor(){super(...arguments),this.editableEl=null,this.contentHostEl=null,this.chooserUI=null,this.pendingPastePayload=null,this.listenerDocument=null,this.listenerWindow=null,this.handlePasteEvent=t=>{var e,n;const i=t.clipboardData;if(!i)return;const s=i.getData("text/html")||"",r=i.getData("text/plain")||"";if(!s&&!r)return t.preventDefault(),void t.stopPropagation();t.preventDefault(),t.stopPropagation();const a=this.cloneCurrentSelectionRange(),o=(null===(n=null===(e=this.extensionContext)||void 0===e?void 0:e.getSelectedNodes)||void 0===n?void 0:n.call(e))||[];this.pendingPastePayload={html:s,text:r,range:a,selectedNodes:[...o]},this.renderPasteChooser(t)},this.handleOutsidePointerDown=t=>{if(!this.chooserUI)return;const e="function"==typeof t.composedPath?t.composedPath():[];this.chooserUI.includesEventPath(e)||this.clearPasteChooser()},this.handleOutsideKeyDown=t=>{"Escape"===t.key&&this.clearPasteChooser()},this.handleOutsideScroll=()=>{this.clearPasteChooser()}}initialExtensionAfterLoad(t){super.initialExtensionAfterLoad(t),this.hostEl=t.host,this.attachPasteListener()}destroyExtension(){this.detachPasteListener(),this.clearPasteChooser()}attachPasteListener(){const{editableEl:t,contentHostEl:e}=this.getEditorElements();this.editableEl=t,this.contentHostEl=e,this.editableEl&&this.editableEl.addEventListener("paste",this.handlePasteEvent)}detachPasteListener(){this.editableEl&&this.editableEl.removeEventListener("paste",this.handlePasteEvent),this.editableEl=null,this.contentHostEl=null}getEditorElements(){var t,e,n,i,s;const r=null!==(n=null===(e=null===(t=this.hostEl)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.querySelector("vega-rich-text-content"))&&void 0!==n?n:null;return{editableEl:null!==(s=null===(i=null==r?void 0:r.shadowRoot)||void 0===i?void 0:i.querySelector(".rich-text-content"))&&void 0!==s?s:null,contentHostEl:r}}getEditableElement(){const{editableEl:t}=this.getEditorElements();return t}cloneCurrentSelectionRange(){var t;const e=null===(t=this.extensionContext)||void 0===t?void 0:t.getSelection();return e&&e.rangeCount>0?e.getRangeAt(0).cloneRange():null}renderPasteChooser(t){var e,n;const i=null!==(n=null===(e=this.hostEl)||void 0===e?void 0:e.shadowRoot)&&void 0!==n?n:null;if(!i)return;this.clearPasteChooser(!1);const s=this.computeChooserPosition(t);this.chooserUI=new $s(i,{onModeSelect:t=>{this.applyPasteMode(t)}}),this.chooserUI.open(s),this.listenerDocument=this.hostEl.ownerDocument,this.listenerWindow=this.listenerDocument.defaultView,this.listenerDocument.addEventListener("mousedown",this.handleOutsidePointerDown,!0),this.listenerDocument.addEventListener("keydown",this.handleOutsideKeyDown,!0),this.listenerDocument.addEventListener("scroll",this.handleOutsideScroll,!0),this.listenerWindow&&this.listenerWindow.addEventListener("scroll",this.handleOutsideScroll,!0),this.contentHostEl&&this.contentHostEl.addEventListener("scroll",this.handleOutsideScroll)}computeChooserPosition(t){var e,n,i;const s=this.hostEl.getBoundingClientRect(),r=null!==(n=null===(e=this.hostEl.ownerDocument.defaultView)||void 0===e?void 0:e.innerHeight)&&void 0!==n?n:window.innerHeight,a=t,o="number"==typeof a.clientX&&a.clientX>0&&"number"==typeof a.clientY&&a.clientY>0,l=o?null:this.getCaretRect(),c=12,h=o?a.clientX:null!==(i=null==l?void 0:l.left)&&void 0!==i?i:s.left+c,d=o?a.clientY:l?l.bottom:s.top+40,u=Math.max(s.left+c,s.right-220),p=Math.min(Math.max(h,s.left+c),u),f=Math.max(d+8,s.top+c),w=r-f-c;return{left:p,top:f,placement:w>=88||w>=f-c?["bottom","top"]:["top","bottom"]}}getCaretRect(){var t,e;const n=null!==(e=null===(t=this.pendingPastePayload)||void 0===t?void 0:t.range)&&void 0!==e?e:this.cloneCurrentSelectionRange();if(!n)return null;const i=n.getBoundingClientRect();if(this.isUnavailableRect(i)){const t=n.getClientRects();return t.length>0?t[0]:this.getRangeContainerRect(n)}return i}isUnavailableRect(t){return 0===t.width&&0===t.height&&0===t.left&&0===t.top}getRangeContainerRect(t){var e,n,i,s,r,a;const o=null!==(e=t.startContainer)&&void 0!==e?e:null;if(!o)return null;if(o.nodeType===Node.ELEMENT_NODE){const e=o,a=null!==(n=e.childNodes[t.startOffset-1])&&void 0!==n?n:null,l=null!==(i=e.childNodes[t.startOffset])&&void 0!==i?i:null;return null!==(r=null!==(s=this.getNodeRect(a))&&void 0!==s?s:this.getNodeRect(l))&&void 0!==r?r:this.getNodeRect(e)}return null!==(a=this.getNodeRect(o))&&void 0!==a?a:this.getNodeRect(o.parentNode)}getNodeRect(t){var e,n;if(!t)return null;if(t.nodeType===Node.TEXT_NODE)return null!==(n=null===(e=t.parentElement)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==n?n:null;if(t.nodeType===Node.ELEMENT_NODE){const e=t.getBoundingClientRect();return this.isUnavailableRect(e)?null:e}return null}applyPasteMode(t){var e;if(!this.pendingPastePayload)return void this.clearPasteChooser();const n=null!==(e=this.editableEl)&&void 0!==e?e:this.getEditableElement();if(!n)return void this.clearPasteChooser();n.focus(),this.restoreSelectionRange(this.pendingPastePayload.range),this.restoreSelectionControllerState(this.pendingPastePayload);const i=this.createDataTransfer(this.pendingPastePayload.html,this.pendingPastePayload.text,t);this.dispatchBeforeInputPaste(n,i),this.clearPasteChooser()}restoreSelectionControllerState(t){t.range&&this.extensionContext&&this.extensionContext.setSelectedNodes(t.selectedNodes||[],{startNode:t.range.startContainer,endNode:t.range.endContainer,startOffset:t.range.startOffset,endOffset:t.range.endOffset})}restoreSelectionRange(t){var e;if(!t)return;const n=null===(e=this.extensionContext)||void 0===e?void 0:e.getSelection();n&&(n.removeAllRanges(),n.addRange(t))}dispatchBeforeInputPaste(t,e){const n=new CustomEvent("beforeinput",{bubbles:!0,cancelable:!0});try{Object.defineProperties(n,{inputType:{value:"insertFromPaste",configurable:!0},dataTransfer:{value:e,configurable:!0}})}catch(t){Object.assign(n,{inputType:"insertFromPaste",dataTransfer:e})}t.dispatchEvent(n)}createDataTransfer(t,e,n){if("undefined"!=typeof DataTransfer){const i=new DataTransfer;return t&&i.setData("text/html",t),e&&i.setData("text/plain",e),n&&i.setData("application/x-vega-rte-paste-mode",n),i}return{getData:i=>"text/html"===i?t:"text/plain"===i?e:"application/x-vega-rte-paste-mode"===i&&null!=n?n:""}}clearPasteChooser(t=!0){this.contentHostEl&&this.contentHostEl.removeEventListener("scroll",this.handleOutsideScroll),this.listenerWindow&&(this.listenerWindow.removeEventListener("scroll",this.handleOutsideScroll,!0),this.listenerWindow=null),this.listenerDocument&&(this.listenerDocument.removeEventListener("mousedown",this.handleOutsidePointerDown,!0),this.listenerDocument.removeEventListener("keydown",this.handleOutsideKeyDown,!0),this.listenerDocument.removeEventListener("scroll",this.handleOutsideScroll,!0),this.listenerDocument=null),this.chooserUI&&this.chooserUI.destroy(),this.chooserUI=null,t&&(this.pendingPastePayload=null)}}class qs extends v{constructor(t,e){super(),this.type="COPY_SELECTED_CONTENT_ACTION",this.selection=null,this.selectedNodes=[],this.copyResult=null,this.selection=t,this.selectedNodes=e}}class Ws extends Ze{render(t,e){return this.renderButton(t,e,{icon:"rte-copy",tooltip:{text:"Copy"}})}isDisabled(t){const e=this.getExtensionContext(t.host);return!e||e.host.disabled||!e.getSelection()||e.getSelection().isCollapsed}handleButtonClick(t){const e=this.getExtensionContext(t.host);e&&e.host&&e.host.value.apply(new qs(e.getSelection(),e.getSelectedNodes()))}handleDropdownClick(){}}at.register({"rte-copy":ke});class Us extends m{prepareBeforeLoad(t){this.registerToolbarButtonRenderer(Us.TOOLBAR_BUTTON_KEY,new Ws,t)}}x.register("COPY_SELECTED_CONTENT_ACTION",Q.name,new class extends S{handleAction(t){const e=this.getParentBlocks(t.selectedNodes),{html:n,text:i}=this.getSelectedContent(t.selection,e);(i||n)&&(t.copyResult=this.copyToClipboard(n,i))}getSelectedContent(t,e){const n={html:"",text:""};if(!t||0===t.rangeCount||t.isCollapsed)return n;const i=t.getRangeAt(0),s=me();if(!s)return n;const r=i.cloneContents(),a=s.createElement("div"),o=i.commonAncestorContainer;if(1===e.length){const t=this.getDOMByEntity(e[0]);if(t&&t.contains(o)){const e=this.wrapWithAncestorChain(r,o,t);return a.appendChild(e),n.html=a.innerHTML,n.text=a.textContent,n}}else if(e.length>1&&e.every((t=>"list-item"===t.type))){const t=e[0].parent;if(t&&e.every((e=>e.parent===t))){const e=this.getDOMByEntity(t);if(e&&e.contains(o)){const t=e.cloneNode(!1);return t.appendChild(r),a.appendChild(t),n.html=a.innerHTML,n.text=a.textContent,n}}}return a.appendChild(r),n.html=a.innerHTML,n.text=a.textContent,n}wrapWithAncestorChain(t,e,n){const i=n.cloneNode(!1),s=e.nodeType===Node.TEXT_NODE?e.parentElement:e;if(s===n)return i.appendChild(t),i;const r=s.cloneNode(!1);r.appendChild(t);let a=r,o=s.parentElement;for(;o&&o!==n;){const t=o.cloneNode(!1);t.appendChild(a),a=t,o=o.parentElement}if(i.appendChild(a),"LI"===i.tagName&&o&&o.parentElement&&"OL"===o.parentElement.tagName){const t=o.parentElement.cloneNode(!1);return t.appendChild(i),t}return i}getParentBlocks(t){const e=[];for(const n of t){const t=n.parent;t&&!e.includes(t)&&e.push(t)}return e}async copyToClipboard(t,e){let n=!1;try{const i=new Blob([t],{type:"text/html"}),s=new Blob([e],{type:"text/plain"}),r=new ClipboardItem({"text/html":i,"text/plain":s});await navigator.clipboard.write([r]),n=!0}catch(i){n=this.copyWithExecCommand(t,e),n||a.warn("Failed to copy the selected content to the clipboard. Use keyboard shortcuts instead.")}return n}copyWithExecCommand(t,e){const n=me();if(!n)return!1;const i=n=>{n.clipboardData&&(n.clipboardData.setData("text/html",t),n.clipboardData.setData("text/plain",e)),n.preventDefault()};n.addEventListener("copy",i);try{return n.execCommand("copy")}finally{n.removeEventListener("copy",i)}}}),Us.TOOLBAR_BUTTON_KEY="copy";class Gs extends v{constructor(t,e,n=!1){super(),this.type=N.DELETE_SELECTED_CONTENT,this.mergeFlag=!1,this.host=t,this.mergeFlag=e,this.isFlushable=n}}class Zs extends Ws{render(t,e){return this.renderButton(t,e,{icon:"rte-cut",tooltip:{text:"Cut"}})}async handleButtonClick(t){const e=this.getExtensionContext(t.host);if(e&&e.host){const{host:t}=e,n=new qs(e.getSelection(),e.getSelectedNodes());t.value.apply(n),await n.copyResult&&t.value.apply(new Gs(t,!0,!0))}}}at.register({"rte-cut":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2026 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 112a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zm176 0C224 50.1 173.9 0 112 0S0 50.1 0 112 50.1 224 112 224c24 0 46.3-7.6 64.5-20.4l57.3 52.4-57.3 52.4C158.3 295.6 136 288 112 288 50.1 288 0 338.1 0 400s50.1 112 112 112 112-50.1 112-112c0-20.5-5.5-39.6-15.1-56.2L504.2 73.7c9.8-8.9 10.5-24.1 1.5-33.9s-24.1-10.5-33.9-1.5l-202.4 185.2-60.5-55.3c9.6-16.5 15.1-35.7 15.1-56.2zM471.8 473.7c9.8 8.9 25 8.3 33.9-1.5s8.3-25-1.5-33.9L338.6 286.8 302.7 319 471.8 473.7zM48 400a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"/></svg>'}});class Qs extends m{prepareBeforeLoad(t){this.registerToolbarButtonRenderer(Qs.TOOLBAR_BUTTON_KEY,new Zs,t)}}Qs.TOOLBAR_BUTTON_KEY="cut";class Js extends v{constructor(t,e){super(),this.type=N.INSERT_NODE_TO_NEAREST_ROOT,this.rteRange=t,this.nodeToBeInserted=e}}class Ys extends S{handleAction(e,n){const{rteRange:i,token:s}=e;if(i&&i.startNode){const{key:r,label:a,customAttrs:o={wrapped:"true"}}=s,l=new Ye(t(),r,a,n);l.annotationMap.set("CUSTOM_ATTRIBUTE",new _(o)),n.apply(new Js(i,l)),e.actionHandleResult=!0}}}const Xs=new class extends Y{canHandle(t,e){const n=t[e];return"SPAN"===n.nodeName&&n.classList.contains("token")&&n.hasAttribute("token-key")?1:0}handle(e){const n=e[0],i=n.getAttribute("token-key"),s=n.textContent,r=X.generate(y,n),{customAttribute:a}=r,o=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n}(r,["customAttribute","customClass"]);return{id:t(),type:"token",token:i,text:s,annotations:Object.assign(Object.assign({},o),{customAttribute:this.createCustomAttrs(a)})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}createCustomAttrs(t){const e=Object.assign(Object.assign({},t),{contenteditable:null,"template-token-key":null,"token-key":null,wrapped:"false"===t.wrapped?"false":"true"});return xe(e)}};class tr extends m{constructor(t=[]){super(),this.tokenRenderer=new Xe,this.tokenList=t,this.registerNode("token",Ye),this.registerRenderer("token",this.tokenRenderer),this.registerElementToNodeDTOClassStrategy(Xs)}prepareBeforeLoad(t){this.registerToolbarButtonRenderer(tr.TOOLBAR_BUTTON_KEY,new Je(this.tokenList),t)}}(()=>{const t=new Ys;m.registerActionHandleStrategy(L.name,"INSERT_TOKEN_NODE",t),m.registerActionHandleStrategy(K.name,"INSERT_TOKEN_NODE",t)})(),tr.TOOLBAR_BUTTON_KEY="token";export{Ge as A,Ze as B,Ye as C,Xe as D,tn as E,Ji as F,Gs as G,un as H,Js as I,Je as R,Ee as V,Re as a,Me as b,_e as c,Ke as d,Ue as e,tr as f,en as g,Os as h,yn as i,ji as j,Ui as k,os as l,ws as m,Es as n,ps as o,ls as p,cs as q,hs as r,ds as s,us as t,Vs as u,Ks as v,Fe as w,zs as x,Us as y,Qs as z}
@@ -0,0 +1 @@
1
+ import{h as e,F as t,r as i,c as o,H as n,g as a}from"./p-6b2342e0.js";import{s}from"./p-519a7d55.js";import{c as r,M as l,V as c,I as d}from"./p-6e1ab235.js";import{s as h}from"./p-6bd5c49b.js";import{V as p,I as f}from"./p-8ce9e214.js";import{P as v}from"./p-81dd00d0.js";import{e as u}from"./p-272440e8.js";import{F as g}from"./p-87a4d75f.js";import{j as m,k as x,f as b}from"./p-528748fa.js";import{g as C}from"./p-49a2e141.js";import{V as w}from"./p-6031bed1.js";import{I as y}from"./p-781fd6e0.js";import{S as j}from"./p-31216140.js";import{I as k}from"./p-2d158cbd.js";import{c as O}from"./p-66647244.js";import{W as R,X as S,Y as L,a as H,Z as I}from"./p-5447a8e8.js";import{C as A}from"./p-2bb5a232.js";import{D as V,d as z}from"./p-526e3634.js";import{J as M,K as E,L as N,M as _,N as G}from"./p-3a68b729.js";import{c as D}from"./p-3f183b52.js";import{B as W}from"./p-b3420fcf.js";import{V as B}from"./p-3e09aeed.js";import{c as U}from"./p-1ec763ab.js";import{c as Z}from"./p-613ddaab.js";import{C as T}from"./p-2d0d575f.js";import{O as F}from"./p-331a62d5.js";import{S as K}from"./p-29e3eb12.js";import{c as P}from"./p-2a9960c9.js";import{f as X}from"./p-781b7a54.js";import"./p-b75ee3ba.js";import"./p-982747ef.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-ffdc25ec.js";import"./p-afcd8f04.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-262ec334.js";import"./p-6c95a6a3.js";import"./p-456f678b.js";import"./p-b438e68b.js";import"./p-874e5624.js";import"./p-cb378636.js";import"./p-8c30a60d.js";import"./p-4866e390.js";import"./p-f0e828d8.js";import"./p-fb5ea4b2.js";import"./p-a841cf13.js";import"./p-1e0a8fd3.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-dcd3e3a7.js";var $=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class J extends v{constructor(){super({callback:()=>{this.showAsOverlay||(this.updateMainContentUI(this.openState),this.backdropManager.setEffectiveOverlayValue(this.getResolvedOverlayValue()),this.backdropManager.watchOpenState(this.openState))}}),this.isVoiceOverClick=!1,this.triggerElement=null,this.lastSyncedOverlayValue=null,this.handleClickEvent=e=>{this.isVoiceOverClick=m(e)}}componentDidLoad(){!0===this.open?(this.openState="open",g.isEnabled("VEGA_LEFT_NAV.DISABLE_ANIMATION_ON_LOAD")&&this.host.classList.add("disableAnimation")):this.openState="close",window.addEventListener("click",this.handleClickEvent,{capture:!0})}componentDidRender(){this.watchShowAsOverlay()}async toggle(){"close"===this.openState?(this.triggerElement=document.activeElement,this.openState="open"):this.openState="close"}watchOpen(e){this.openState=e?"open":"close"}watchOpenState(e){this.updateMainContentUI(e),(this.hasHydratedOverlayValue()||"open"!==e)&&(this.backdropManager.setEffectiveOverlayValue(this.getResolvedOverlayValue()),this.backdropManager.watchOpenState(e)),"open"===e?this.open=!0:(this.open=!1,g.isEnabled("VEGA_LEFT_NAV.DISABLE_ANIMATION_ON_LOAD")&&this.host.classList.contains("disableAnimation")&&this.host.classList.remove("disableAnimation")),this.stateUpdateEventEmitter.emit(this.openState),"open"===e?this.focusFirstFocusableInDialog():this.focusFirstFocusableOutsideDialog()}watchShowAsOverlay(){const e=this.getResolvedOverlayValue();this.lastSyncedOverlayValue!==e&&(this.backdropManager.setEffectiveOverlayValue(e),this.backdropManager.watchShowAsOverlay(),this.lastSyncedOverlayValue=e),this.updateMainContentUI(this.openState)}setOpenState(e){this.openState=e}hasHydratedOverlayValue(){var e,t;const i=null!==(t=null===(e=this.host)||void 0===e?void 0:e.getAttribute("show-as-overlay"))&&void 0!==t?t:null;return"false"===i||"true"===i||""===i}getResolvedOverlayValue(){var e,t;const i=null!==(t=null===(e=this.host)||void 0===e?void 0:e.getAttribute("show-as-overlay"))&&void 0!==t?t:null;return"false"!==i&&("true"===i||""===i||this.showAsOverlay)}focusFirstFocusableInDialog(){if(!this.isVoiceOverClick)return;const e=this.host,t=x(e);t&&u((()=>t.focus()),e,300)}focusFirstFocusableOutsideDialog(){var e;const t=this.triggerElement;this.triggerElement=null;const i=this.host;if(t&&t.isConnected)return void(null!==(e=x(t))&&void 0!==e?e:t).focus();const o=this.findFirstFocusableOutside(i);o&&o.focus()}findFirstFocusableOutside(e){const t=i=>{const o=Array.from(i.children);for(const i of o){if(i===e||e.contains(i))continue;if(i.contains(e)){const e=t(i);if(e)return e;continue}const o=x(i);if(o)return o}return null};return t(document.body)}updateMainContentUI(e){const t=document.querySelector("body"),i=document.querySelector("vega-left-nav + .vega-left-nav-content");"open"===e?(this.host.style.display="flex",setTimeout((()=>{this.host.classList.add("open"),i&&!this.shouldShowBackdrop()?(null==t||t.classList.remove("vega-overflow-hidden"),i.classList.add("open")):(null==t||t.classList.add("vega-overflow-hidden"),i&&i.classList.remove("open"))}))):(this.host.classList.remove("open"),null==t||t.classList.remove("vega-overflow-hidden"),i&&i.classList.remove("open"),u((()=>{this.open||(this.host.style.display="none")}),this.host))}shouldShowBackdrop(){const e=this.getResolvedOverlayValue(),t=C();return e||"L"!==t&&"XL"!==t}}$([r()],J.prototype,"host",void 0),$([r({writable:!0})],J.prototype,"open",void 0),$([r({writable:!0})],J.prototype,"openState",void 0),$([r()],J.prototype,"stateUpdateEventEmitter",void 0),$([r()],J.prototype,"showAsOverlay",void 0),$([r()],J.prototype,"backdropManager",void 0),$([l("componentDidLoad")],J.prototype,"componentDidLoad",null),$([l("componentDidRender")],J.prototype,"componentDidRender",null),$([l("toggle")],J.prototype,"toggle",null),$([l("watchOpen")],J.prototype,"watchOpen",null),$([l("watchOpenState")],J.prototype,"watchOpenState",null),$([l("watchShowAsOverlay")],J.prototype,"watchShowAsOverlay",null);const Y=()=>e("div",{class:"header-footer-separator-container"},e("div",{class:"header-footer-separator"}));var q=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Q extends c{componentWillLoad(){this.hasHeaderSlot=!!this.host.querySelector('[slot="header-slot"]')}render(){return this.renderHeader()}renderHeader(){const{title:i,subtitle:o}=this.headerConfig;return e(t,null,e("div",{class:"header-container"},this.hasHeaderSlot?e("slot",{name:"header-slot"}):i?e("div",{class:"header-title"},i):this.renderHeaderLogo(),o&&e("div",{class:"header-subtitle"},o)),e(Y,null))}renderHeaderLogo(){return"gp"===this.currentBranding?e("vega-brand-logo",{name:"global-payments",size:"small"}):"genius"===this.currentBranding?e("vega-brand-logo",{name:"genius",size:"small"}):e("vega-icon",{icon:w.getIconKey("heartland-logo")})}}w.register({"heartland-logo":{icon:'<svg width="142" height="26" viewBox="0 0 142 26" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H5.38012V9.88886H14.7732V0H20.2857V24.7222H14.9056V13.9144H5.42422V24.7659H0V0ZM81.3186 0H86.4784V24.7222H81.3186V0ZM141.868 0.0435179H136.708C136.708 3.19395 136.708 6.38814 136.664 9.58233C135.959 8.53217 134.856 7.78833 133.666 7.48204C131.461 6.86946 129.079 7.35077 127.227 8.70716C125.727 9.97612 124.669 11.7264 124.317 13.6516C123.92 15.4894 123.92 17.4147 124.317 19.2962C124.669 21.1339 125.684 22.7966 127.182 23.8906C128.77 24.8969 130.667 25.2907 132.519 25.0282C134.283 24.8531 135.826 23.8468 136.664 22.2716C136.664 22.824 136.703 23.3764 136.742 23.9288C136.762 24.2077 136.782 24.4867 136.796 24.7656H142C141.912 23.5843 141.868 22.3591 141.868 21.1777V0.0435179ZM129.784 13.039C130.137 11.9889 130.976 10.9388 132.166 10.6762C133.357 10.3262 134.636 10.6762 135.518 11.5514C136.444 12.4702 136.753 13.8267 136.841 15.0956C136.885 16.7583 136.753 18.4648 135.959 19.9525C135.076 21.4839 132.916 22.2716 131.284 21.3964C130.094 20.7401 129.609 19.3399 129.388 18.071C129.124 16.3645 129.256 14.6581 129.784 13.039ZM70.3382 4.15601L75.4537 2.31827V7.52523H79.5991V10.9382H75.4537V17.1515C75.4096 18.1142 75.4537 19.0768 75.5859 20.0394C75.6742 20.5645 76.1152 21.0021 76.6443 21.1334C77.6146 21.3084 78.5847 21.3084 79.5549 21.1771V24.5026C77.7469 25.0276 75.8506 25.1589 73.9984 24.9401C72.94 24.8088 71.9258 24.3276 71.2202 23.5399C70.6028 22.7085 70.3382 21.7021 70.3823 20.6958C70.3382 15.1826 70.3382 9.66925 70.3382 4.15601ZM35.5 8.2703C33.6037 7.04514 31.3106 6.56382 29.1056 7.00138C26.9889 7.35143 25.1367 8.48907 23.946 10.2831C22.4907 12.3396 22.1379 14.9212 22.2261 17.3716C22.3584 19.4718 22.9758 21.7909 24.4752 23.3224C25.9746 24.8538 28.1795 25.3789 30.2522 25.4664C32.0603 25.5539 33.9124 25.1601 35.5441 24.3725C37.264 23.4099 38.3665 21.6158 38.4546 19.6469H33.7361C33.6037 20.2595 33.2509 20.8283 32.81 21.3095C32.2808 21.7471 31.6193 22.0097 30.9577 22.0097C29.8553 22.1409 28.7969 21.7471 28.0473 20.9158C27.2534 19.9094 27.077 18.5967 27.1211 17.4153H38.8515C38.9838 15.7963 38.8075 14.1774 38.4106 12.6021C37.9696 10.8519 36.9553 9.32044 35.5 8.2703ZM27.2975 14.1774C27.2975 13.1272 27.6503 12.1208 28.3118 11.2895C29.5025 9.93302 32.0603 10.0205 32.9864 11.5958C33.4274 12.3833 33.6037 13.3022 33.6037 14.1774H27.2975ZM42.5126 8.75203C44.056 7.39558 46.2169 7.00178 48.2014 6.95802C50.1859 6.91427 52.3908 7.30807 54.0225 8.62074C55.2131 9.5834 55.6983 11.1586 55.7865 12.6463C55.8368 13.696 55.8297 14.7314 55.8225 15.7689V15.769C55.8171 16.5478 55.8117 17.3278 55.8306 18.1158C55.8389 18.5271 55.8425 18.9415 55.8461 19.3576V19.3576C55.8618 21.1545 55.8777 22.982 56.2715 24.723H51.553C51.4206 23.9791 51.3766 23.1915 51.3766 22.4039C50.4504 23.8478 48.9069 24.8105 47.1871 25.0293C45.776 25.2043 44.3207 25.0293 42.9536 24.5042C41.7629 23.9353 40.8368 22.8852 40.484 21.5725C39.9548 19.8661 40.2635 18.0283 41.2778 16.5844C42.2921 15.3154 43.6592 14.4403 45.2468 14.0465C46.9417 13.606 48.6735 13.5686 50.3747 13.5319C50.5325 13.5285 50.6901 13.5251 50.8474 13.5214C50.8474 13.4493 50.8477 13.377 50.848 13.3045V13.3038V13.3032V13.3026C50.8514 12.4946 50.8548 11.662 50.4504 10.9399C49.6567 9.80219 48.1132 9.53961 46.9666 10.3273C46.8343 10.4148 46.7461 10.5023 46.6579 10.5898C46.2169 11.0711 45.9964 11.7274 46.0847 12.3838H41.0132C40.9691 11.0711 41.4983 9.71469 42.5126 8.75203ZM47.0989 17.0657C46.4374 17.2844 45.8641 17.7657 45.5113 18.3783C45.0263 19.4285 45.3349 20.6536 46.261 21.3537C47.5399 22.1851 49.2598 21.8351 50.0977 20.5661C50.8914 19.3847 50.8914 17.9408 50.8914 16.5844C49.6126 16.4531 48.2896 16.5844 47.0989 17.0657ZM96.1373 6.95649C94.1088 6.95649 91.9474 7.35029 90.4039 8.70676C89.3901 9.66934 88.8168 11.0258 88.8605 12.426H93.9322C93.844 11.7259 94.1525 10.982 94.6821 10.5007C95.7405 9.66934 97.2394 9.80063 98.1658 10.7633C98.7448 11.5023 98.742 12.5111 98.7395 13.428C98.7393 13.4882 98.7392 13.5481 98.7392 13.6074C96.7543 13.6074 94.7704 13.6511 92.8738 14.1762C91.3741 14.5701 90.0071 15.4451 89.0816 16.7141C87.9786 18.3331 87.8021 20.3458 88.5519 22.1398C89.037 23.3212 89.9634 24.2401 91.1538 24.6777C92.477 25.0714 93.844 25.2027 95.2109 25.0277C96.8863 24.8527 98.3424 23.7151 99.2679 22.4023C99.2679 23.19 99.3125 23.9338 99.4445 24.7214H104.119C103.671 22.7031 103.674 20.573 103.678 18.5029V18.5028V18.5016V18.5003C103.678 18.3274 103.678 18.1549 103.678 17.983C103.678 16.189 103.678 14.3513 103.634 12.5135C103.502 11.1133 103.061 9.58184 101.914 8.66297C100.326 7.35029 98.1658 6.95649 96.1373 6.95649ZM93.5354 18.1143C93.9322 17.5455 94.5493 17.1516 95.2554 16.9329C96.4013 16.5828 97.5925 16.4953 98.7392 16.5828L98.7394 16.7751C98.7413 18.0786 98.7434 19.4825 97.9447 20.6084C97.1074 21.8335 95.4311 22.1835 94.1525 21.396C93.0941 20.6521 92.8293 19.2081 93.5354 18.1143ZM112.982 7.74535C114.526 6.95774 116.334 6.73897 118.01 7.13276C119.641 7.43906 121.009 8.53297 121.671 10.0644C122.123 11.1017 122.163 12.221 122.204 13.3359L122.204 13.3364C122.214 13.6322 122.225 13.9276 122.243 14.2212V24.7226H116.952V13.2148C116.952 12.2522 116.379 11.3771 115.496 10.8958C113.953 10.1957 112.145 10.8083 111.351 12.2959C110.93 13.169 110.941 14.1409 110.951 15.0687V15.0698C110.952 15.2111 110.954 15.3514 110.954 15.4901V24.6789H105.75V13.4336C105.75 13.0309 105.752 12.6264 105.754 12.2206C105.761 10.5979 105.768 8.95287 105.662 7.30779H110.602L110.63 7.84104C110.664 8.49637 110.699 9.15749 110.734 9.84562C111.263 9.01425 112.057 8.27042 112.982 7.74535ZM68.8393 7.35106C67.5163 7.21979 66.1933 7.48232 65.0026 8.09491C64.0325 8.7075 63.3268 9.58258 62.8859 10.7202C62.8859 9.6286 62.8419 8.53696 62.798 7.44526L62.7977 7.43857H57.9467C58.1672 9.58258 58.2554 11.7704 58.2114 13.9144C58.2114 15.125 58.2065 16.3356 58.2016 17.5462C58.1918 19.9674 58.1819 22.3886 58.2114 24.8097H63.3268V15.8398C63.3268 14.7021 63.5915 13.3894 64.5617 12.6893C65.7965 11.8142 67.384 11.8142 68.8393 11.9454V7.35106Z" fill="#596063" /></svg>',autoSize:!0}}),q([r()],Q.prototype,"host",void 0),q([r()],Q.prototype,"headerConfig",void 0),q([r()],Q.prototype,"currentBranding",void 0),q([l("componentWillLoad")],Q.prototype,"componentWillLoad",null);var ee=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class te extends c{componentWillLoad(){this.hasFooterSlot=!!this.host.querySelector('[slot="footer-slot"]')}render(){return this.renderFooter()}renderFooter(){return(this.footnote||this.hasFooterSlot)&&e(t,null,e(Y,null),e("div",{class:"footer-container"},this.hasFooterSlot?e("slot",{name:"footer-slot"}):e("div",{class:"footer-footnote"},this.footnote)))}}ee([r()],te.prototype,"host",void 0),ee([r()],te.prototype,"footnote",void 0),ee([l("componentWillLoad")],te.prototype,"componentWillLoad",null);var ie=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class oe extends c{watchOpenState(){this.updateZIndex()}updateZIndex(){const e=this.backdropManager.getBackdrop();"open"==this.openState?(e&&y.setZIndex(e,"base"),y.setZIndex(this.host,"base")):u((()=>{e&&y.removeZIndex(e,"base"),y.removeZIndex(this.host,"base")}),this.host,300)}}ie([r()],oe.prototype,"host",void 0),ie([r()],oe.prototype,"openState",void 0),ie([r()],oe.prototype,"backdropManager",void 0),ie([l("watchOpenState")],oe.prototype,"watchOpenState",null);var ne=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ae extends j{constructor(){super(...arguments),this.effectiveShowAsOverlay=!0}setEffectiveOverlayValue(e){this.effectiveShowAsOverlay=e}watchOpenState(e){const t="open"===e&&this.shouldShowBackdrop();this.setVisibilityIntent(t)}watchShowAsOverlay(){this.setEffectiveOverlayValue(this.showAsOverlay),this.watchOpenState(this.openState)}createBackdrop(e){const t=e.createElement("vega-backdrop");return t.classList.add(ae.backdropClassName),t.duration=150,t.style.display="none",t.style.opacity="0",t.visible=!1,e.body.append(t),t}shouldShowBackdrop(){return this.effectiveShowAsOverlay||!this.isLargeScreen()}isLargeScreen(){const e=C();return"L"===e||"XL"===e}}ae.backdropClassName="vega-left-nav-backdrop",ne([r()],ae.prototype,"openState",void 0),ne([r()],ae.prototype,"showAsOverlay",void 0),ne([l("watchOpenState")],ae.prototype,"watchOpenState",null),ne([l("watchShowAsOverlay")],ae.prototype,"watchShowAsOverlay",null);var se=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class re{constructor(){this.handleBackdropClick=()=>{this.openStateController.setOpenState("close")}}connectedCallback(){this.attachBackdropClickEvent()}disconnectedCallback(){this.detachBackdropClickEvent()}attachBackdropClickEvent(){const e=this.backdropManager.getBackdrop();e&&(e.removeEventListener("vegaClick",this.handleBackdropClick),e.addEventListener("vegaClick",this.handleBackdropClick))}detachBackdropClickEvent(){const e=this.backdropManager.getBackdrop();e&&e.removeEventListener("vegaClick",this.handleBackdropClick)}}se([r()],re.prototype,"openStateController",void 0),se([r()],re.prototype,"backdropManager",void 0),se([l("connectedCallback")],re.prototype,"connectedCallback",null),se([l("disconnectedCallback")],re.prototype,"disconnectedCallback",null);class le extends c{render(){var t;return e("div",{class:"vega-nav-list-container"},(null===(t=this.source)||void 0===t?void 0:t.length)?this.renderListBySource():e("slot",null))}renderListBySource(){return e(t,null,this.source.map((i=>e(t,null,this.renderLeftNavSourceItem(i)))))}renderLeftNavSourceItem(e){return"section"==e.type?this.renderSection(e):"group"==e.type?this.renderGroup(e):this.renderLink(e)}renderSection(t){var i;return e("vega-left-nav-section",{itemKey:t.key,sectionHeader:t.sectionHeader},null===(i=t.children)||void 0===i?void 0:i.map((e=>"group"==e.type?this.renderGroup(e):this.renderLink(e))))}renderGroup(t){var i;return e("vega-left-nav-group",{itemKey:t.key,key:t.key||t.name,icon:t.icon,label:t.name,"open-by-default":t.openByDefault},null===(i=t.children)||void 0===i?void 0:i.map((e=>"group"==e.type?this.renderGroup(e):this.renderLink(e))))}renderLink(t){return e("vega-left-nav-link",{itemKey:t.key,key:t.key||t.name,icon:t.icon,url:t.url,target:t.target,selected:t.selected,counterBadge:t.counterBadge},t.name)}}!function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);a>3&&s&&Object.defineProperty(t,i,s)}([r()],le.prototype,"source",void 0);var ce=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class de extends c{registerMenuClickObserver(){V.addUniqueObserverToNode(this.host,M,(()=>{this.shouldAutoCollapse()&&this.openStateController.setOpenState("close")}))}unregisterMenuClickObserver(){V.removeUniqueObserverFromNode(this.host,M)}shouldAutoCollapse(){const e=C();return this.autoCollapseOnOverlay&&(this.showAsOverlay||"L"!==e&&"XL"!==e)&&"open"===this.openState}}ce([r()],de.prototype,"host",void 0),ce([r()],de.prototype,"openState",void 0),ce([r()],de.prototype,"autoCollapseOnOverlay",void 0),ce([r()],de.prototype,"showAsOverlay",void 0),ce([r()],de.prototype,"openStateController",void 0),ce([l("connectedCallback")],de.prototype,"registerMenuClickObserver",null),ce([l("disconnectedCallback")],de.prototype,"unregisterMenuClickObserver",null);const he=[{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the left nav",payloadValue:e=>!e.source||0===e.source.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the left nav",payloadValue:e=>!!e.source&&e.source.length>0}];var pe=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const fe=class{constructor(e){i(this,e),this.vegaStateUpdate=o(this,"vegaStateUpdate",7),this.stateUpdate=o(this,"stateUpdate",7),this.globalSlimmers={},this.headerRenderer=new Q,this.footerRenderer=new te,this.openStateController=new J,this.backdropManager=new ae,this.backdropController=new re,this.zIndexController=new oe,this.listRenderer=new le,this.vegaLeftNavAutoCollapseController=new de,this.stateUpdateEventEmitter=O(fe,R),this.componentGlobalStyleSlimmer=new A(".vega-left-nav-content{transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-duration:200ms;transition-property:margin}vega-left-nav.disableAnimation+.vega-left-nav-content.open{transition-duration:0s}.vega-left-nav-content.open{margin-left:300px}"),this.vegaComponentUsageRuntimeMetricsSlimmer=new p(he),this.autoCollapseGroupsNotifySlimmer=D(fe,"autoCollapseGroups","watchAutoCollapseGroups"),this.brandSwitchControllerSlimmer=new W,this.currentBranding=B.getBranding(),this.openState="close",this.open=!1,this.headerConfig={},this.footnote="",this.showAsOverlay=!0,this.autoCollapseOnOverlay=!1,this.autoCollapseGroups=!1}watchOpenState(){}watchOpen(){}watchShowAsOverlay(){}watchAutoCollapseGroups(){}componentWillLoad(){"string"==typeof this.autoCollapseGroups&&(this.autoCollapseGroups.includes("true")?this.autoCollapseGroups=!0:this.autoCollapseGroups.includes("false")&&(this.autoCollapseGroups=!1))}async toggle(){}render(){return h(e("slot",null)),s(e(n,null,this.headerRenderer.render(),this.listRenderer.render(),this.footerRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{openState:["watchOpenState"],open:["watchOpen"],showAsOverlay:["watchShowAsOverlay"],autoCollapseGroups:["watchAutoCollapseGroups"]}}};pe([f()],fe.prototype,"globalSlimmers",void 0),pe([d()],fe.prototype,"headerRenderer",void 0),pe([d()],fe.prototype,"footerRenderer",void 0),pe([d()],fe.prototype,"openStateController",void 0),pe([d()],fe.prototype,"backdropManager",void 0),pe([d()],fe.prototype,"backdropController",void 0),pe([d()],fe.prototype,"zIndexController",void 0),pe([d()],fe.prototype,"listRenderer",void 0),pe([d()],fe.prototype,"vegaLeftNavAutoCollapseController",void 0),pe([d()],fe.prototype,"stateUpdateEventEmitter",void 0),pe([d()],fe.prototype,"componentGlobalStyleSlimmer",void 0),pe([d()],fe.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),pe([d()],fe.prototype,"autoCollapseGroupsNotifySlimmer",void 0),pe([d()],fe.prototype,"brandSwitchControllerSlimmer",void 0),pe([k((e=>[{keyCode:"Escape",activeElementInScope:()=>{const t=e.backdropManager.getBackdrop();return t&&t.visible?[document.body]:[e.host]},callback:()=>{const t=e.backdropManager.getBackdrop();t&&t.visible&&e.openStateController.setOpenState("close")}}]))],fe.prototype,"host",void 0),fe.style=':host{display:none;flex-direction:column;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:fixed;top:0px;right:0px;bottom:0px;left:0px;text-align:left;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);width:300px;transition-duration:200ms;transition-property:transform;transform:translateX(-320px)}:host(.open.disableAnimation){transition-duration:0s}:host(.open){transform:translateX(0px)}.header-container{padding-left:24px;padding-right:24px;padding-top:24px;padding-bottom:16px}.header-container .header-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:24px;font-weight:700;line-height:32px;letter-spacing:0px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){.header-container .header-title{font-family:"Inter", sans-serif;font-size:24px;font-weight:700;line-height:32px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.header-container .header-title{font-family:"Inter", sans-serif;font-size:24px;font-weight:700;line-height:32px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.header-container .header-title{font-family:"Inter", sans-serif;font-size:28px;font-weight:700;line-height:36px;letter-spacing:0px}}.header-container .header-subtitle{color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;margin-top:2px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){.header-container .header-subtitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.header-container .header-subtitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.header-container .header-subtitle{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}.header-footer-separator-container{padding-left:12px;padding-right:12px}.header-footer-separator{width:100%;height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1))}.vega-nav-list-container{flex-grow:1;padding-left:12px;padding-right:12px;padding-top:12px;overflow-y:auto;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-nav-list-container .vega-links-icon .prefix-icon{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:20px;height:20px}a .vega-links-name{flex:1 1 0%;overflow:hidden;overflow-wrap:break-word}.footer-container{padding-top:16px;padding-bottom:16px;padding-left:24px;padding-right:24px}.footer-container .footer-footnote{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){.footer-container .footer-footnote{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.footer-container .footer-footnote{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.footer-container .footer-footnote{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px}}body.vega-overflow-hidden{overflow:hidden}.header-container vega-icon[icon="v-internal-icon heartland-logo"]+.header-subtitle{margin-top:8px}';var ve=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ue extends c{constructor(){super(...arguments),this.handleClick=e=>{const t=e.currentTarget;if(t&&"$1"===t.dataset.root){e.preventDefault(),this.vegaLeftNavGroupOpenStateController.toggle();const t=this.vegaLeftNavGroupOpenStateController.isOpen();this.groupClickEventEmitter.emit(t?"EXPAND":"COLLAPSE"),this.notifyOtherGroup()}}}getGroupContainer(){return this.groupContainer}render(){return e("div",{class:"vega-li-main "+(this.openByDefault?"open":""),ref:e=>this.groupContainer=e},e("a",{href:`#${this.label}`,role:"button",tabIndex:0,"data-root":"$1",onClick:this.handleClick,"aria-label":this.label||"No label defined"},this.icon&&e("div",{class:"vega-links-icon"},e("div",{class:"prefix-icon"},e("vega-icon",{icon:this.icon,size:"size-16"}))),e("span",{class:"vega-links-name"},this.label),e("div",{class:"suffix-icons"},e("vega-icon",{icon:w.getIconKey("chevron-down"),size:"size-12"}),e("vega-icon",{icon:w.getIconKey("chevron-up"),size:"size-12"}))),e("div",{class:"vega-nav-list-sub"},e("slot",null)))}notifyOtherGroup(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.notify(z.getSubject(e,E),{host:this.host})}}w.register({"chevron-up":U,"chevron-down":Z}),ve([r()],ue.prototype,"host",void 0),ve([r()],ue.prototype,"autoCollapseGroups",void 0),ve([r()],ue.prototype,"icon",void 0),ve([r()],ue.prototype,"label",void 0),ve([r()],ue.prototype,"groupClickEventEmitter",void 0),ve([r()],ue.prototype,"vegaLeftNavHierarchyController",void 0),ve([r()],ue.prototype,"openByDefault",void 0),ve([r()],ue.prototype,"itemKey",void 0),ve([r()],ue.prototype,"vegaLeftNavGroupOpenStateController",void 0);var ge=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class me extends c{disconnectedCallback(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.unregister(z.getSubject(e,N),this.observer)}componentWillLoad(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&(this.observer=new F(this.isAcceptableObserver.bind(this),this.observerListener.bind(this)),T.register(z.getSubject(e,N),this.observer))}isAcceptableObserver(e){return!this.host.contains(e.host)}shouldCollapse(){return"on-link-click"===this.autoCollapseGroups||!0===this.autoCollapseGroups||!1===this.autoCollapseGroups||"always"===this.autoCollapseGroups}observerListener(){this.shouldCollapse()&&this.vegaLeftNavGroupOpenStateController.close()}}ge([r()],me.prototype,"host",void 0),ge([r()],me.prototype,"autoCollapseGroups",void 0),ge([r()],me.prototype,"vegaLeftNavGroupOpenStateController",void 0),ge([r()],me.prototype,"vegaLeftNavHierarchyController",void 0),ge([r()],me.prototype,"openByDefault",void 0),ge([l("disconnectedCallback")],me.prototype,"disconnectedCallback",null),ge([l("componentWillLoad")],me.prototype,"componentWillLoad",null);var xe=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class be extends c{disconnectedCallback(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.unregister(z.getSubject(e,E),this.observer)}componentWillLoad(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&(this.observer=new F(this.isAcceptableObserver.bind(this),this.observerListener.bind(this)),T.register(z.getSubject(e,E),this.observer))}isAcceptableObserver(e){return e.host!==this.host&&!this.host.contains(e.host)}shouldCollapse(){return 1==this.autoCollapseGroups||"on-group-click"===this.autoCollapseGroups||"always"===this.autoCollapseGroups}observerListener(){this.shouldCollapse()&&this.vegaLeftNavGroupOpenStateController.close()}}xe([r()],be.prototype,"host",void 0),xe([r()],be.prototype,"autoCollapseGroups",void 0),xe([r()],be.prototype,"vegaLeftNavGroupOpenStateController",void 0),xe([r()],be.prototype,"vegaLeftNavHierarchyController",void 0),xe([l("disconnectedCallback")],be.prototype,"disconnectedCallback",null),xe([l("componentWillLoad")],be.prototype,"componentWillLoad",null);var Ce=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class we extends K{constructor(){super({parent:"vega-left-nav",subStates:[{subStateName:"autoCollapseGroups",parentStateName:"autoCollapseGroups"}]})}}Ce([r()],we.prototype,"host",void 0),Ce([r({writable:!0})],we.prototype,"autoCollapseGroups",void 0);class ye extends c{isOpen(){return this.renderer.getGroupContainer().classList.contains("open")}open(){this.renderer.getGroupContainer().classList.add("open")}close(){this.renderer.getGroupContainer().classList.remove("open")}toggle(){this.isOpen()?this.close():this.open()}}!function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);a>3&&s&&Object.defineProperty(t,i,s)}([r()],ye.prototype,"renderer",void 0);var je=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ke extends c{componentWillLoad(){const e=b(this.host,"vega-left-nav"),t=b(this.host,"vega-nav-card");(e||t)&&(this.parent=e||t)}getTopParent(){return this.parent}}je([r()],ke.prototype,"host",void 0),je([l("componentWillLoad")],ke.prototype,"componentWillLoad",null);var Oe=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Re extends c{disconnectedCallback(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.unregister(z.getSubject(e,_),this.observer)}componentWillLoad(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&!this.openByDefault&&(this.observer=new F(this.isAcceptableObserver.bind(this),this.observerListener.bind(this)),T.register(z.getSubject(e,_),this.observer))}isAcceptableObserver(e){return this.host.contains(e.host)}observerListener(){this.vegaLeftNavGroupOpenStateController.open()}}Oe([r()],Re.prototype,"host",void 0),Oe([r()],Re.prototype,"vegaLeftNavGroupOpenStateController",void 0),Oe([r()],Re.prototype,"vegaLeftNavHierarchyController",void 0),Oe([r()],Re.prototype,"openByDefault",void 0),Oe([l("disconnectedCallback")],Re.prototype,"disconnectedCallback",null),Oe([l("componentWillLoad")],Re.prototype,"componentWillLoad",null);var Se=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const Le=class{constructor(e){i(this,e),this.vegaGroupClick=o(this,"vegaGroupClick",7),this.groupClick=o(this,"groupClick",7),this.globalSlimmers={},this.renderer=new ue,this.vegaLeftNavHierarchyController=new ke,this.linkClickObserverController=new me,this.otherGroupsClickObserverController=new be,this.groupClickEventEmitter=O(Le,S),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.vegaLeftNavGroupStateController=new we,this.vegaLeftNavGroupOpenStateController=new ye,this.vegaLeftNavGroupForInitializeSelectedController=new Re,this.autoCollapseGroups=!1,this.label="",this.openByDefault=!1}render(){return h(e("slot",null)),e(n,{"data-key":this.itemKey},s(this.renderer.render(),this.host))}get host(){return a(this)}};Se([f()],Le.prototype,"globalSlimmers",void 0),Se([d()],Le.prototype,"renderer",void 0),Se([d()],Le.prototype,"vegaLeftNavHierarchyController",void 0),Se([d()],Le.prototype,"linkClickObserverController",void 0),Se([d()],Le.prototype,"otherGroupsClickObserverController",void 0),Se([d()],Le.prototype,"groupClickEventEmitter",void 0),Se([d()],Le.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Se([d()],Le.prototype,"vegaLeftNavGroupStateController",void 0),Se([d()],Le.prototype,"vegaLeftNavGroupOpenStateController",void 0),Se([d()],Le.prototype,"vegaLeftNavGroupForInitializeSelectedController",void 0),Le.style=':host{display:block}.suffix-icons{padding-left:8px}.suffix-icons vega-icon,.vega-li-main.open>a>.suffix-icons vega-icon:first-of-type{display:none}.suffix-icons vega-icon:first-of-type,.vega-li-main.open>a>.suffix-icons vega-icon:last-of-type{display:inline-flex}.vega-nav-list-sub{display:none}.vega-li-main.open>.vega-nav-list-sub{display:block}.vega-li-main>a{display:flex;align-items:center;overflow:hidden;padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;border-radius:8px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px;cursor:pointer;text-decoration:none}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-li-main>a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-li-main>a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-li-main>a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}.vega-li-main>a:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.vega-li-main>a:hover{background-color:rgba(var(--v-bg-tertiary, 240, 243, 247, 1))}.vega-li-main>a .vega-links-name{flex:1 1 0%;overflow:hidden;overflow-wrap:break-word}.vega-links-icon{color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-right:12px;box-sizing:border-box}.vega-links-icon .prefix-icon{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:20px;height:20px}::slotted(vega-left-nav-group){padding-left:32px}::slotted(vega-left-nav-link){padding-left:32px}';var He=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ie extends c{constructor(){super(...arguments),this.handleClick=()=>{this.selected||this.customSelectionEnabled||this.controller.setSelected(!0),this.menuClickEventEmitter.emit(),this.notifyVegaLeftNav(),this.notifyVegaLeftGroup()}}render(){return e(n,{class:!0===this.selected?"selected":"","data-key":this.itemKey},e("a",{href:this.url||"javascript:void(0);",target:this.target,onClick:this.handleClick},this.icon&&e("div",{class:"vega-links-icon"},e("div",{class:"prefix-icon"},e("vega-icon",{icon:this.icon,size:"size-16"}))),e("span",{class:"vega-links-name"},e("slot",null)),!!this.deprecatedPropertySlimmer.getValue()&&e("div",{class:"vega-counter-badge"},e("vega-counter-badge",{count:this.deprecatedPropertySlimmer.getValue(),color:this.counterBadge.color}))))}notifyVegaLeftNav(){const e=b(this.host,"vega-left-nav");e&&T.notify(z.getSubject(e,M),{host:this.host})}notifyVegaLeftGroup(){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.notify(z.getSubject(e,N),{host:this.host})}}He([r()],Ie.prototype,"host",void 0),He([r()],Ie.prototype,"selected",void 0),He([r()],Ie.prototype,"url",void 0),He([r()],Ie.prototype,"counterBadge",void 0),He([r()],Ie.prototype,"icon",void 0),He([r()],Ie.prototype,"menuClickEventEmitter",void 0),He([r()],Ie.prototype,"controller",void 0),He([r()],Ie.prototype,"deprecatedPropertySlimmer",void 0),He([r()],Ie.prototype,"customSelectionEnabled",void 0),He([r()],Ie.prototype,"itemKey",void 0),He([r()],Ie.prototype,"target",void 0),He([r()],Ie.prototype,"vegaLeftNavHierarchyController",void 0);var Ae=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ve extends c{disconnectedCallback(){const e=this.getObserverSubject();e&&T.unregister(e,this.observer)}componentWillLoad(){this.observer=new F(this.isAcceptableNavListObserver.bind(this),this.observerListener.bind(this));const e=this.getObserverSubject();e&&T.register(e,this.observer)}isAcceptableNavListObserver(e){return e instanceof HTMLElement&&b(this.host,".vega-nav-list-container")===b(e,".vega-nav-list-container")}}Ae([l("disconnectedCallback")],Ve.prototype,"disconnectedCallback",null),Ae([l("componentWillLoad")],Ve.prototype,"componentWillLoad",null);var ze=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Me extends Ve{componentWillRender(){if(this.selected){const e=this.vegaLeftNavHierarchyController.getTopParent();e&&T.notify(z.getSubject(e,_),{host:this.host})}}componentDidRender(){if(this.selected){const e=this.getObserverSubject();e&&T.notify(e,this.host)}}setSelected(e){this.customSelectionEnabled||(this.selected=e)}observerListener(e){e!==this.host&&this.setSelected(!1)}getObserverSubject(){const e=this.vegaLeftNavHierarchyController.getTopParent();return e?z.getSubject(e,G):null}}ze([r()],Me.prototype,"host",void 0),ze([r({writable:!0})],Me.prototype,"selected",void 0),ze([r()],Me.prototype,"customSelectionEnabled",void 0),ze([r()],Me.prototype,"vegaLeftNavHierarchyController",void 0),ze([l("componentWillRender")],Me.prototype,"componentWillRender",null),ze([l("componentDidRender")],Me.prototype,"componentDidRender",null);var Ee=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const Ne=class{constructor(e){i(this,e),this.vegaMenuClick=o(this,"vegaMenuClick",7),this.menuClick=o(this,"menuClick",7),this.globalSlimmers={},this.renderer=new Ie,this.vegaLeftNavHierarchyController=new ke,this.controller=new Me,this.menuClickEventEmitter=O(Ne,L),this.deprecatedPropertySlimmer=P(Ne,"counterBadge.count","counterBadge.counter",void 0),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.selected=!1,this.customSelectionEnabled=!1,this.target="_self"}render(){return h(e("slot",null)),s(this.renderer.render(),this.host)}get host(){return a(this)}};Ee([f()],Ne.prototype,"globalSlimmers",void 0),Ee([d()],Ne.prototype,"renderer",void 0),Ee([d()],Ne.prototype,"vegaLeftNavHierarchyController",void 0),Ee([d()],Ne.prototype,"controller",void 0),Ee([d()],Ne.prototype,"menuClickEventEmitter",void 0),Ee([d()],Ne.prototype,"deprecatedPropertySlimmer",void 0),Ee([d()],Ne.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ne.style=':host{display:block}:host(.selected) .vega-links-icon{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host(.selected) a{background-color:rgba(var(--v-bg-selected, 0, 151, 255, 0.3))}:host .vega-counter-badge{position:relative;width:32px;height:20px}:host vega-counter-badge{position:absolute;top:10px;left:18px}:host a{display:flex;align-items:center;overflow:hidden;padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;border-radius:8px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px;cursor:pointer;text-decoration:none}@media screen and (min-width: 768px) and (max-width: 1023px){:host a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host a{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:24px;letter-spacing:0px}}:host a .vega-links-name{flex:1 1 0%;overflow:hidden;overflow-wrap:break-word}:host .vega-links-icon{color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-right:12px;box-sizing:border-box}:host .vega-links-icon .prefix-icon{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:20px;height:20px}:host(:not(.selected)) a:hover{background-color:rgba(var(--v-bg-tertiary, 240, 243, 247, 1))}:host>a:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}';var _e=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ge extends c{render(){return e(n,{"data-key":this.itemKey},this.renderSectionHeader(),e("slot",null),this.renderListSeparator())}renderListSeparator(){return e("div",{class:"list-separator-container"},e("div",{class:"list-separator"}))}renderSectionHeader(){var t;return(null===(t=this.sectionHeader)||void 0===t?void 0:t.title)&&e("div",{class:"section-header"},e("div",{class:"section-header-title"},this.sectionHeader.title),this.sectionHeader.actionTitle&&e("vega-button-link",{label:this.sectionHeader.actionTitle,size:"small",link:this.sectionHeader.actionLink,eventful:this.sectionHeader.actionEventful,ref:e=>{V.addUniqueObserverToNode(e,H,(()=>{this.actionClickEventEmitter.emit()}))}}))}}_e([r()],Ge.prototype,"sectionHeader",void 0),_e([r()],Ge.prototype,"actionClickEventEmitter",void 0),_e([r()],Ge.prototype,"itemKey",void 0);var De=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const We=class{constructor(e){i(this,e),this.vegaActionClick=o(this,"vegaActionClick",7),this.actionClick=o(this,"actionClick",7),this.globalSlimmers={},this.renderer=new Ge,this.actionClickEventEmitter=O(We,I),this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return h(e("slot",null)),s(this.renderer.render(),this.host)}get host(){return a(this)}};De([f()],We.prototype,"globalSlimmers",void 0),De([d()],We.prototype,"renderer",void 0),De([d()],We.prototype,"actionClickEventEmitter",void 0),De([d()],We.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),We.style=':host{display:block}:host(:last-child) .list-separator-container{display:none}.list-separator-container{padding-left:12px;padding-right:12px;padding-top:20px;padding-bottom:20px}.list-separator{width:100%;height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1))}.section-header{display:flex;align-items:center;gap:12px;padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;border-radius:4px}.section-header>.section-header-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;flex:1 1 0%;overflow:hidden;text-transform:uppercase}@media screen and (min-width: 768px) and (max-width: 1023px){.section-header>.section-header-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.section-header>.section-header-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.section-header>.section-header-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}.section-header>vega-button-link{flex-basis:0}';var Be=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ue extends v{constructor(){super({callback:()=>{this.updateMaxHeight()}})}watchMaxHeight(){this.updateMaxHeight()}updateMaxHeight(){const e=X(this.maxHeight,"widthAndHeight");this.currentMaxHeight=e}}Be([r()],Ue.prototype,"maxHeight",void 0),Be([r({writable:!0})],Ue.prototype,"currentMaxHeight",void 0),Be([l("watchMaxHeight")],Ue.prototype,"watchMaxHeight",null);const Ze=[{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the nav card",payloadValue:e=>!e.source||0===e.source.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the nav card",payloadValue:e=>!!e.source&&e.source.length>0}];var Te=function(e,t,i,o){var n,a=arguments.length,s=a<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 r=e.length-1;r>=0;r--)(n=e[r])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const Fe=class{constructor(e){i(this,e),this.globalSlimmers={},this.listRenderer=new le,this.maxHeightController=new Ue,this.vegaComponentUsageRuntimeMetricsSlimmer=new p(Ze)}watchMaxHeight(){}render(){return h(e("slot",null)),s(e(n,{style:{maxHeight:this.currentMaxHeight}},this.listRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{maxHeight:["watchMaxHeight"]}}};Te([f()],Fe.prototype,"globalSlimmers",void 0),Te([d()],Fe.prototype,"listRenderer",void 0),Te([d()],Fe.prototype,"maxHeightController",void 0),Te([d()],Fe.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Fe.style=":host{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:12px;box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));text-align:left;overflow-y:auto;width:300px}.vega-nav-list-container{padding:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-nav-list-container .vega-links-icon .prefix-icon{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:20px;height:20px}a .vega-links-name{flex:1 1 0%;overflow:hidden;overflow-wrap:break-word}";export{fe as vega_left_nav,Le as vega_left_nav_group,Ne as vega_left_nav_link,We as vega_left_nav_section,Fe as vega_nav_card}