@globalpayments/vega 2.90.0 → 2.91.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 (500) hide show
  1. package/dist/cjs/{app-globals-08924736.js → app-globals-7bb10088.js} +20 -12
  2. package/dist/cjs/{aria-dialog-focusable-trap-slimmer-a0ff1263.js → aria-dialog-focusable-trap-slimmer-73b4c0cb.js} +1 -1
  3. package/dist/cjs/{child-nodes-event-prevent-slimmer-85a7fdb0.js → child-nodes-event-prevent-slimmer-76d19d56.js} +2 -2
  4. package/dist/cjs/{code-block-89850671.js → code-block-c1039791.js} +9 -3
  5. package/dist/cjs/{component-value-history-controller-slimmer.abstract-a8da4087.js → component-value-history-controller-slimmer.abstract-1d36641d.js} +59 -4
  6. package/dist/cjs/{content-state-e1c3efe6.js → content-state-a6105949.js} +3 -3
  7. package/dist/cjs/{create-public-api-runtime-metrics-slimmer-122350c3.js → create-public-api-runtime-metrics-slimmer-91b0cbfb.js} +3 -2
  8. package/dist/cjs/{date-required-rule-3437acbc.js → date-required-rule-c4997459.js} +1 -1
  9. package/dist/cjs/{design-token-939bf72c.js → design-token-f65eab4a.js} +4 -4
  10. package/dist/cjs/{element-appender-slimmer-14e85a91.js → element-appender-slimmer-316668d0.js} +4 -4
  11. package/dist/cjs/{event-emit-slimmer-146316b2.js → event-emit-slimmer-5bab10c2.js} +1 -1
  12. package/dist/cjs/{feature-flag-controller-5fa21654.js → feature-flag-controller-438a1510.js} +12 -0
  13. package/dist/cjs/{file-uploader-required-rule-313ec9e3.js → file-uploader-required-rule-cc51d4ab.js} +1 -1
  14. package/dist/cjs/{form-field-controller-slimmer-c4ebee27.js → form-field-controller-slimmer-b0c35330.js} +3 -3
  15. package/dist/cjs/{icon-manager-e855446d.js → icon-manager-be358b32.js} +2 -2
  16. package/dist/cjs/{image-annotation-action-f86690fd.js → image-annotation-action-e4596726.js} +4 -4
  17. package/dist/cjs/index-58ea899e.js +4 -4
  18. package/dist/cjs/index.cjs.js +29 -27
  19. package/dist/cjs/{inject-keyboard-manager-743de047.js → inject-keyboard-manager-1f5bbb19.js} +1 -1
  20. package/dist/cjs/internal-calendar-period-factory-9c66cf36.js +78 -0
  21. package/dist/cjs/{internal-icon-manager-66c48800.js → internal-icon-manager-40bcac72.js} +1 -1
  22. package/dist/cjs/{internal-translation-controller-9785d4e8.js → internal-translation-controller-5905469e.js} +5 -0
  23. package/dist/cjs/{internal-vega-event-manager-6e49d1ca.js → internal-vega-event-manager-7196a847.js} +3 -1
  24. package/dist/cjs/{keyboard-manager-5396083a.js → keyboard-manager-61e8ce38.js} +1 -1
  25. package/dist/cjs/{keyboard-manager-slimmer-eedcfbc8.js → keyboard-manager-slimmer-079a7e87.js} +1 -1
  26. package/dist/cjs/{legend-input-processor-1e53e5bc.js → legend-input-processor-ce9b38f8.js} +1 -1
  27. package/dist/cjs/{link-extension-dafeeed0.js → link-extension-a7ac28f3.js} +3 -3
  28. package/dist/cjs/loader.cjs.js +21 -20
  29. package/dist/cjs/month-view-generator-48215a05.js +33 -0
  30. package/dist/cjs/{public-rules-b032050f.js → public-rules-66540638.js} +13 -11
  31. package/dist/cjs/{range-efdf6f78.js → range-dea19a90.js} +1 -1
  32. package/dist/cjs/{replace-selected-text-action-0f7b7c78.js → replace-selected-text-action-6d1ebbf9.js} +1 -1
  33. package/dist/cjs/{required-field-rule-d73c1d8c.js → required-field-rule-b12a29e1.js} +10 -1
  34. package/dist/cjs/{responsive-format-facade-d112aa9f.js → responsive-format-facade-10ff730e.js} +2 -2
  35. package/dist/cjs/{rich-text-editor-required-rule-86d9cd4d.js → rich-text-editor-required-rule-63492ca3.js} +1 -1
  36. package/dist/cjs/{split-cell-operation-b41344bd.js → split-cell-operation-30e5dd4a.js} +5 -5
  37. package/dist/cjs/{state-border-formatter-c3c9b90d.js → state-border-formatter-e7779964.js} +1 -1
  38. package/dist/cjs/{string-format-strategy.abstract-d51050cd.js → string-format-strategy.abstract-a22f0cb1.js} +1 -1
  39. package/dist/cjs/{string-input-formatter-slimmer-23fdb50e.js → string-input-formatter-slimmer-8179eb40.js} +3 -3
  40. package/dist/cjs/{string-mask-strategy-10fe0f6d.js → string-mask-strategy-8b9bb0c1.js} +2 -2
  41. package/dist/cjs/{style-formatter-11c95331.js → style-formatter-380b9a86.js} +2 -2
  42. package/dist/cjs/{sub-state-notify-slimmer-450277b6.js → sub-state-notify-slimmer-18891389.js} +1 -1
  43. package/dist/cjs/{sub-state-observer-slimmer-5bfe8e97.js → sub-state-observer-slimmer-eee2f0ae.js} +1 -1
  44. package/dist/cjs/{time-required-rule-2fd7c828.js → time-required-rule-080d975b.js} +1 -1
  45. package/dist/cjs/{token-extension-2e3e1631.js → token-extension-619379a3.js} +40 -19
  46. package/dist/cjs/{translation-slimmer-e8549aff.js → translation-slimmer-2af6f141.js} +1 -1
  47. package/dist/cjs/{type-guard-9917b11f.js → type-guard-0171e779.js} +119 -4
  48. package/dist/cjs/{typography-4560e7f1.js → typography-3ea4fe41.js} +10 -10
  49. package/dist/cjs/{valid-credit-card-number-rule-8c541bcd.js → valid-credit-card-number-rule-fdfca83e.js} +1 -1
  50. package/dist/cjs/vega-accordion.cjs.entry.js +14 -14
  51. package/dist/cjs/vega-app-footer.cjs.entry.js +61 -7
  52. package/dist/cjs/vega-app-header-button.cjs.entry.js +14 -14
  53. package/dist/cjs/vega-banner.cjs.entry.js +7 -7
  54. package/dist/cjs/vega-bar-chart.cjs.entry.js +3 -3
  55. package/dist/cjs/vega-box.cjs.entry.js +8 -8
  56. package/dist/cjs/vega-brand-logo.cjs.entry.js +3 -3
  57. package/dist/cjs/vega-breadcrumb.cjs.entry.js +5 -5
  58. package/dist/cjs/vega-button-circle.cjs.entry.js +12 -12
  59. package/dist/cjs/vega-button-group_2.cjs.entry.js +8 -8
  60. package/dist/cjs/vega-button-link.cjs.entry.js +5 -5
  61. package/dist/cjs/vega-button.cjs.entry.js +10 -10
  62. package/dist/cjs/{vega-calendar_4.cjs.entry.js → vega-calendar_5.cjs.entry.js} +669 -398
  63. package/dist/cjs/vega-card.cjs.entry.js +7 -7
  64. package/dist/cjs/vega-carousel.cjs.entry.js +8 -8
  65. package/dist/cjs/vega-checkbox_2.cjs.entry.js +10 -10
  66. package/dist/cjs/vega-chip.cjs.entry.js +11 -11
  67. package/dist/cjs/vega-code-block.cjs.entry.js +18 -18
  68. package/dist/cjs/vega-color-picker.cjs.entry.js +10 -8
  69. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +15 -15
  70. package/dist/cjs/vega-color-swatch.cjs.entry.js +5 -5
  71. package/dist/cjs/vega-combo-box.cjs.entry.js +18 -18
  72. package/dist/cjs/vega-date-picker_2.cjs.entry.js +26 -26
  73. package/dist/cjs/{vega-dialog-controller-6df7825e.js → vega-dialog-controller-16be85d5.js} +2 -2
  74. package/dist/cjs/vega-dialog_2.cjs.entry.js +11 -11
  75. package/dist/cjs/vega-divider.cjs.entry.js +7 -7
  76. package/dist/cjs/vega-dropdown_5.cjs.entry.js +17 -17
  77. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  78. package/dist/cjs/{vega-event-id-37c1716f.js → vega-event-id-df22d80e.js} +2 -0
  79. package/dist/cjs/vega-field-label.cjs.entry.js +5 -5
  80. package/dist/cjs/vega-file-uploader.cjs.entry.js +15 -13
  81. package/dist/cjs/vega-flag-icon.cjs.entry.js +10 -10
  82. package/dist/cjs/vega-flex.cjs.entry.js +8 -8
  83. package/dist/cjs/vega-font.cjs.entry.js +14 -8
  84. package/dist/cjs/vega-form.cjs.entry.js +12 -12
  85. package/dist/cjs/vega-grid.cjs.entry.js +7 -7
  86. package/dist/cjs/vega-icon.cjs.entry.js +9 -9
  87. package/dist/cjs/vega-image-uploader.cjs.entry.js +17 -17
  88. package/dist/cjs/vega-input-credit-card.cjs.entry.js +18 -18
  89. package/dist/cjs/vega-input-numeric.cjs.entry.js +15 -15
  90. package/dist/cjs/vega-input-passcode.cjs.entry.js +14 -14
  91. package/dist/cjs/vega-input-phone-number.cjs.entry.js +15 -15
  92. package/dist/cjs/vega-input-range.cjs.entry.js +10 -10
  93. package/dist/cjs/vega-input-select.cjs.entry.js +19 -27
  94. package/dist/cjs/vega-input.cjs.entry.js +19 -17
  95. package/dist/cjs/{vega-internal-event-id-e138d4d6.js → vega-internal-event-id-ecc5b87a.js} +2 -0
  96. package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
  97. package/dist/cjs/vega-left-nav_5.cjs.entry.js +18 -18
  98. package/dist/cjs/vega-line-chart.cjs.entry.js +3 -3
  99. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +5 -5
  100. package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
  101. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +5 -5
  102. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +4 -4
  103. package/dist/cjs/vega-pagination.cjs.entry.js +11 -11
  104. package/dist/cjs/vega-pie-chart.cjs.entry.js +2 -2
  105. package/dist/cjs/vega-popover_2.cjs.entry.js +15 -15
  106. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +11 -11
  107. package/dist/cjs/vega-radio_2.cjs.entry.js +15 -15
  108. package/dist/cjs/vega-rich-text-content.cjs.entry.js +15 -15
  109. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +39 -37
  110. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +9 -9
  111. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +17 -17
  112. package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
  113. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +14 -14
  114. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +11 -11
  115. package/dist/cjs/vega-sidenav_3.cjs.entry.js +14 -14
  116. package/dist/cjs/vega-signature-capture.cjs.entry.js +18 -18
  117. package/dist/cjs/vega-stepper.cjs.entry.js +9 -9
  118. package/dist/cjs/vega-tab-group_2.cjs.entry.js +5 -5
  119. package/dist/cjs/vega-table_11.cjs.entry.js +16 -16
  120. package/dist/cjs/vega-textarea.cjs.entry.js +11 -11
  121. package/dist/cjs/vega-time-picker_2.cjs.entry.js +17 -17
  122. package/dist/cjs/vega-toggle-switch.cjs.entry.js +7 -7
  123. package/dist/cjs/vega-tooltip_2.cjs.entry.js +9 -9
  124. package/dist/cjs/vega.cjs.js +21 -20
  125. package/dist/cjs/{wait-for-component-did-render-762084fc.js → wait-for-component-did-render-02ca4bee.js} +1 -1
  126. package/dist/cjs/{y-axis-input-processor-54a26515.js → y-axis-input-processor-d3a3839c.js} +1 -1
  127. package/dist/collection/collection-manifest.json +10 -8
  128. package/dist/collection/components/vega-app-footer/slimmers/renderers/vega-app-footer-additional-links-renderer.js +45 -0
  129. package/dist/collection/components/vega-app-footer/vega-app-footer.js +63 -12
  130. package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-current-period-controller.js +21 -24
  131. package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.js +13 -79
  132. package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-current-period-controller.js +153 -0
  133. package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-state-controller.js +32 -0
  134. package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/slimmers/renderers/vega-calendar-period-renderer.js +55 -0
  135. package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/vega-calendar-period-switcher.css +20 -0
  136. package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/vega-calendar-period-switcher.js +309 -0
  137. package/dist/collection/components/vega-calendar/vega-calendar.css +0 -9
  138. package/dist/collection/components/vega-calendar/vega-calendar.js +73 -1
  139. package/dist/collection/components/vega-combo-box/vega-combo-box.js +1 -1
  140. package/dist/collection/components/vega-font/slimmers/controllers/vega-font-classes-controller.js +7 -0
  141. package/dist/collection/components/vega-font/vega-font.css +72 -10
  142. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +1 -9
  143. package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.css +3 -1
  144. package/dist/collection/components/vega-rich-text-editor/constants/constant.js +5 -0
  145. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +55 -0
  146. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +10 -1
  147. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +2 -2
  148. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +3 -10
  149. package/dist/collection/constants/tokens/typography.js +10 -10
  150. package/dist/collection/constants/ui.js +1 -0
  151. package/dist/collection/global/scripts/before-vega-load.js +8 -0
  152. package/dist/collection/helpers/calendar/calendar-period/day-period.js +9 -0
  153. package/dist/collection/helpers/calendar/calendar-period/internal-calendar-period-factory.js +76 -0
  154. package/dist/collection/helpers/calendar/calendar-period/month-period.js +9 -0
  155. package/dist/collection/helpers/calendar/calendar-period/vega-calendar-period-factory.js +19 -0
  156. package/dist/collection/helpers/calendar/calendar-period/week-period.js +14 -0
  157. package/dist/collection/helpers/calendar/index.js +1 -0
  158. package/dist/collection/helpers/common/wait-for-vega-handler.js +1 -1
  159. package/dist/collection/helpers/dialog/vega-dialog-controller.js +1 -1
  160. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +3 -1
  161. package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +1 -0
  162. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
  163. package/dist/collection/helpers/event-manager/vega-event-manager.js +1 -1
  164. package/dist/collection/helpers/feature-control/feature-flags-map.js +12 -0
  165. package/dist/collection/helpers/icon/icon-manager.js +1 -1
  166. package/dist/collection/helpers/loading-indicator/vega-loader-controller.js +1 -1
  167. package/dist/collection/helpers/notify/vega-notify-controller.js +1 -1
  168. package/dist/collection/helpers/public-api.js +1 -0
  169. package/dist/collection/helpers/skeleton-loader/vega-skeleton-loader-controller.js +1 -1
  170. package/dist/collection/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.js +3 -2
  171. package/dist/collection/helpers/theme/theme-manager.js +1 -1
  172. package/dist/collection/helpers/translation/locales/en.js +5 -0
  173. package/dist/collection/helpers/translation/translation.js +1 -1
  174. package/dist/collection/helpers/validator/rules/required-field-rule.js +10 -1
  175. package/dist/collection/helpers/zindex/vega-z-index-manager.js +1 -1
  176. package/dist/esm/{app-globals-a4134d21.js → app-globals-6041f52f.js} +20 -12
  177. package/dist/esm/{aria-dialog-focusable-trap-slimmer-7db3d5a7.js → aria-dialog-focusable-trap-slimmer-1332c071.js} +1 -1
  178. package/dist/esm/{child-nodes-event-prevent-slimmer-1e3ac106.js → child-nodes-event-prevent-slimmer-50022584.js} +2 -2
  179. package/dist/esm/{code-block-9a17d89b.js → code-block-37294847.js} +9 -4
  180. package/dist/esm/{component-value-history-controller-slimmer.abstract-a64c3678.js → component-value-history-controller-slimmer.abstract-45ccddc9.js} +59 -4
  181. package/dist/esm/{content-state-d59b4560.js → content-state-67950b80.js} +3 -3
  182. package/dist/esm/{create-public-api-runtime-metrics-slimmer-da6615bf.js → create-public-api-runtime-metrics-slimmer-48f85199.js} +3 -2
  183. package/dist/esm/{date-required-rule-cb960229.js → date-required-rule-958cf380.js} +1 -1
  184. package/dist/esm/{design-token-f73ebce9.js → design-token-e7e78f18.js} +4 -4
  185. package/dist/esm/{element-appender-slimmer-c62cf540.js → element-appender-slimmer-ebda526d.js} +4 -4
  186. package/dist/esm/{event-emit-slimmer-3eb4d8ad.js → event-emit-slimmer-b94cec83.js} +1 -1
  187. package/dist/esm/{feature-flag-controller-5ebc0cec.js → feature-flag-controller-2a89f20c.js} +12 -0
  188. package/dist/esm/{file-uploader-required-rule-ad886d01.js → file-uploader-required-rule-82188a61.js} +1 -1
  189. package/dist/esm/{form-field-controller-slimmer-514a3195.js → form-field-controller-slimmer-0a2ba886.js} +3 -3
  190. package/dist/esm/{icon-manager-691c8682.js → icon-manager-4ef3f6dd.js} +2 -2
  191. package/dist/esm/{image-annotation-action-f4ea265c.js → image-annotation-action-7f7a5678.js} +4 -4
  192. package/dist/esm/index-090d31ca.js +4 -4
  193. package/dist/esm/index.js +28 -27
  194. package/dist/esm/{inject-keyboard-manager-6522df5c.js → inject-keyboard-manager-2b19c121.js} +1 -1
  195. package/dist/esm/internal-calendar-period-factory-fff8aaee.js +76 -0
  196. package/dist/esm/{internal-icon-manager-276f968f.js → internal-icon-manager-e7c57096.js} +1 -1
  197. package/dist/esm/{internal-translation-controller-653bd7e3.js → internal-translation-controller-aa09ca87.js} +5 -0
  198. package/dist/esm/{internal-vega-event-manager-a9758b6e.js → internal-vega-event-manager-956cf128.js} +3 -1
  199. package/dist/esm/{keyboard-manager-9615fa9b.js → keyboard-manager-3e5b157f.js} +1 -1
  200. package/dist/esm/{keyboard-manager-slimmer-21bdc3a4.js → keyboard-manager-slimmer-ba5cc767.js} +1 -1
  201. package/dist/esm/{legend-input-processor-122008c5.js → legend-input-processor-3b2de4b7.js} +1 -1
  202. package/dist/esm/{link-extension-be164793.js → link-extension-afb404fb.js} +3 -3
  203. package/dist/esm/loader.js +21 -20
  204. package/dist/esm/month-view-generator-7a0c869c.js +31 -0
  205. package/dist/esm/{public-rules-58f31834.js → public-rules-f64b0b78.js} +13 -11
  206. package/dist/esm/{range-1c1c20fa.js → range-4d09a305.js} +1 -1
  207. package/dist/esm/{replace-selected-text-action-1abc5200.js → replace-selected-text-action-12bc8b82.js} +1 -1
  208. package/dist/esm/{required-field-rule-ab4bdc47.js → required-field-rule-a4634842.js} +10 -1
  209. package/dist/esm/{responsive-format-facade-12697af2.js → responsive-format-facade-844c5e09.js} +2 -2
  210. package/dist/esm/{rich-text-editor-required-rule-050d292b.js → rich-text-editor-required-rule-d62d418e.js} +1 -1
  211. package/dist/esm/{split-cell-operation-8251d2a1.js → split-cell-operation-c515669e.js} +5 -5
  212. package/dist/esm/{state-border-formatter-55cee24d.js → state-border-formatter-f53847a5.js} +1 -1
  213. package/dist/esm/{string-format-strategy.abstract-14c1e874.js → string-format-strategy.abstract-a0327405.js} +1 -1
  214. package/dist/esm/{string-input-formatter-slimmer-ec297247.js → string-input-formatter-slimmer-12de4a25.js} +3 -3
  215. package/dist/esm/{string-mask-strategy-18760123.js → string-mask-strategy-3bb03155.js} +2 -2
  216. package/dist/esm/{style-formatter-6073ae27.js → style-formatter-df7bf8ec.js} +2 -2
  217. package/dist/esm/{sub-state-notify-slimmer-d5a21bb3.js → sub-state-notify-slimmer-7ef94141.js} +1 -1
  218. package/dist/esm/{sub-state-observer-slimmer-d924288a.js → sub-state-observer-slimmer-d9ad2bdd.js} +1 -1
  219. package/dist/esm/{time-required-rule-9b775d24.js → time-required-rule-db0dee53.js} +1 -1
  220. package/dist/esm/{token-extension-6cb7dcb2.js → token-extension-8ff92d14.js} +40 -20
  221. package/dist/esm/{translation-slimmer-d32eb861.js → translation-slimmer-4904e7fe.js} +1 -1
  222. package/dist/esm/{type-guard-fd1f4760.js → type-guard-a2cbaae9.js} +117 -3
  223. package/dist/esm/{typography-396de03f.js → typography-19c3b9be.js} +10 -10
  224. package/dist/esm/{valid-credit-card-number-rule-dfd3e0a6.js → valid-credit-card-number-rule-a3f9858d.js} +1 -1
  225. package/dist/esm/vega-accordion.entry.js +14 -14
  226. package/dist/esm/vega-app-footer.entry.js +63 -9
  227. package/dist/esm/vega-app-header-button.entry.js +14 -14
  228. package/dist/esm/vega-banner.entry.js +7 -7
  229. package/dist/esm/vega-bar-chart.entry.js +3 -3
  230. package/dist/esm/vega-box.entry.js +8 -8
  231. package/dist/esm/vega-brand-logo.entry.js +3 -3
  232. package/dist/esm/vega-breadcrumb.entry.js +5 -5
  233. package/dist/esm/vega-button-circle.entry.js +12 -12
  234. package/dist/esm/vega-button-group_2.entry.js +8 -8
  235. package/dist/esm/vega-button-link.entry.js +5 -5
  236. package/dist/esm/vega-button.entry.js +10 -10
  237. package/dist/esm/{vega-calendar_4.entry.js → vega-calendar_5.entry.js} +666 -396
  238. package/dist/esm/vega-card.entry.js +7 -7
  239. package/dist/esm/vega-carousel.entry.js +8 -8
  240. package/dist/esm/vega-checkbox_2.entry.js +10 -10
  241. package/dist/esm/vega-chip.entry.js +11 -11
  242. package/dist/esm/vega-code-block.entry.js +18 -18
  243. package/dist/esm/vega-color-picker.entry.js +10 -8
  244. package/dist/esm/vega-color-swatch-picker.entry.js +15 -15
  245. package/dist/esm/vega-color-swatch.entry.js +5 -5
  246. package/dist/esm/vega-combo-box.entry.js +18 -18
  247. package/dist/esm/vega-date-picker_2.entry.js +26 -26
  248. package/dist/esm/{vega-dialog-controller-389e7f7c.js → vega-dialog-controller-726b74f9.js} +2 -2
  249. package/dist/esm/vega-dialog_2.entry.js +11 -11
  250. package/dist/esm/vega-divider.entry.js +7 -7
  251. package/dist/esm/vega-dropdown_5.entry.js +17 -17
  252. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  253. package/dist/esm/{vega-event-id-92848bf5.js → vega-event-id-268f8def.js} +2 -1
  254. package/dist/esm/vega-field-label.entry.js +5 -5
  255. package/dist/esm/vega-file-uploader.entry.js +15 -13
  256. package/dist/esm/vega-flag-icon.entry.js +10 -10
  257. package/dist/esm/vega-flex.entry.js +8 -8
  258. package/dist/esm/vega-font.entry.js +14 -8
  259. package/dist/esm/vega-form.entry.js +12 -12
  260. package/dist/esm/vega-grid.entry.js +7 -7
  261. package/dist/esm/vega-icon.entry.js +9 -9
  262. package/dist/esm/vega-image-uploader.entry.js +17 -17
  263. package/dist/esm/vega-input-credit-card.entry.js +18 -18
  264. package/dist/esm/vega-input-numeric.entry.js +15 -15
  265. package/dist/esm/vega-input-passcode.entry.js +14 -14
  266. package/dist/esm/vega-input-phone-number.entry.js +15 -15
  267. package/dist/esm/vega-input-range.entry.js +10 -10
  268. package/dist/esm/vega-input-select.entry.js +19 -27
  269. package/dist/esm/vega-input.entry.js +19 -17
  270. package/dist/esm/{vega-internal-event-id-913e8be6.js → vega-internal-event-id-22151a4d.js} +2 -1
  271. package/dist/esm/vega-item-toggle.entry.js +3 -3
  272. package/dist/esm/vega-left-nav_5.entry.js +18 -18
  273. package/dist/esm/vega-line-chart.entry.js +3 -3
  274. package/dist/esm/vega-loader-wrapper_2.entry.js +5 -5
  275. package/dist/esm/vega-page-notification_2.entry.js +1 -1
  276. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
  277. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +4 -4
  278. package/dist/esm/vega-pagination.entry.js +11 -11
  279. package/dist/esm/vega-pie-chart.entry.js +2 -2
  280. package/dist/esm/vega-popover_2.entry.js +15 -15
  281. package/dist/esm/vega-progress-tracker_2.entry.js +11 -11
  282. package/dist/esm/vega-radio_2.entry.js +15 -15
  283. package/dist/esm/vega-rich-text-content.entry.js +15 -15
  284. package/dist/esm/vega-rich-text-editor_4.entry.js +39 -37
  285. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +9 -9
  286. package/dist/esm/vega-rich-text-table-properties_3.entry.js +17 -17
  287. package/dist/esm/vega-segment-control.entry.js +3 -3
  288. package/dist/esm/vega-selection-chip_2.entry.js +14 -14
  289. package/dist/esm/vega-selection-tile_2.entry.js +11 -11
  290. package/dist/esm/vega-sidenav_3.entry.js +14 -14
  291. package/dist/esm/vega-signature-capture.entry.js +18 -18
  292. package/dist/esm/vega-stepper.entry.js +9 -9
  293. package/dist/esm/vega-tab-group_2.entry.js +5 -5
  294. package/dist/esm/vega-table_11.entry.js +16 -16
  295. package/dist/esm/vega-textarea.entry.js +11 -11
  296. package/dist/esm/vega-time-picker_2.entry.js +17 -17
  297. package/dist/esm/vega-toggle-switch.entry.js +7 -7
  298. package/dist/esm/vega-tooltip_2.entry.js +9 -9
  299. package/dist/esm/vega.js +21 -20
  300. package/dist/esm/{wait-for-component-did-render-b378bf16.js → wait-for-component-did-render-0488922a.js} +1 -1
  301. package/dist/esm/{y-axis-input-processor-c7e05353.js → y-axis-input-processor-c6b2a914.js} +1 -1
  302. package/dist/sri/vega-sri-manifest.json +414 -410
  303. package/dist/types/components/vega-app-footer/slimmers/renderers/vega-app-footer-additional-links-renderer.d.ts +13 -0
  304. package/dist/types/components/vega-app-footer/vega-app-footer.d.ts +18 -1
  305. package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-current-period-controller.d.ts +11 -6
  306. package/dist/types/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.d.ts +2 -29
  307. package/dist/types/components/vega-calendar/types.d.ts +7 -1
  308. package/dist/types/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-current-period-controller.d.ts +63 -0
  309. package/dist/types/components/vega-calendar/vega-calendar-period-switcher/slimmers/controllers/vega-calendar-period-state-controller.d.ts +10 -0
  310. package/dist/types/components/vega-calendar/vega-calendar-period-switcher/slimmers/renderers/vega-calendar-period-renderer.d.ts +11 -0
  311. package/dist/types/components/vega-calendar/vega-calendar-period-switcher/vega-calendar-period-switcher.d.ts +82 -0
  312. package/dist/types/components/vega-calendar/vega-calendar.d.ts +15 -1
  313. package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +2 -10
  314. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +0 -1
  315. package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +5 -0
  316. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +22 -0
  317. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +5 -2
  318. package/dist/types/components.d.ts +99 -6
  319. package/dist/types/constants/ui.d.ts +1 -1
  320. package/dist/types/helpers/calendar/calendar-period/calendar-period.abstract.d.ts +6 -0
  321. package/dist/types/helpers/calendar/calendar-period/day-period.d.ts +4 -0
  322. package/dist/types/helpers/calendar/calendar-period/internal-calendar-period-factory.d.ts +33 -0
  323. package/dist/types/helpers/calendar/calendar-period/month-period.d.ts +4 -0
  324. package/dist/types/helpers/calendar/calendar-period/vega-calendar-period-factory.d.ts +16 -0
  325. package/dist/types/helpers/calendar/calendar-period/week-period.d.ts +5 -0
  326. package/dist/types/helpers/calendar/index.d.ts +1 -0
  327. package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
  328. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
  329. package/dist/types/helpers/feature-control/feature-flag.d.ts +3 -1
  330. package/dist/types/helpers/public-api.d.ts +1 -0
  331. package/dist/types/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.d.ts +2 -1
  332. package/dist/types/helpers/translation/interface.d.ts +6 -1
  333. package/dist/types/types/components.type.d.ts +1 -0
  334. package/dist/vega/index.esm.js +1 -1
  335. package/dist/vega/{p-97e7da55.js → p-014e2cf9.js} +1 -1
  336. package/dist/vega/{p-88c29aae.entry.js → p-044496e0.entry.js} +1 -1
  337. package/dist/vega/{p-99ea0fa0.entry.js → p-0605c656.entry.js} +1 -1
  338. package/dist/vega/p-0707aa21.js +1 -0
  339. package/dist/vega/{p-a809b33a.js → p-0e03daa6.js} +1 -1
  340. package/dist/vega/{p-d6422004.entry.js → p-12b5c5e3.entry.js} +1 -1
  341. package/dist/vega/{p-881622fd.js → p-141f74ff.js} +1 -1
  342. package/dist/vega/p-144d4b30.js +1 -0
  343. package/dist/vega/p-14bfc113.js +1 -0
  344. package/dist/vega/p-15da9d58.entry.js +1 -0
  345. package/dist/vega/{p-bcd3bd79.entry.js → p-1acd5f04.entry.js} +1 -1
  346. package/dist/vega/{p-6528739f.entry.js → p-216ef41e.entry.js} +1 -1
  347. package/dist/vega/p-21775cc7.js +1 -0
  348. package/dist/vega/p-2944c76e.entry.js +1 -0
  349. package/dist/vega/p-2b22091e.js +1 -0
  350. package/dist/vega/{p-581d89bb.entry.js → p-2f48162f.entry.js} +1 -1
  351. package/dist/vega/{p-ed1dbc98.entry.js → p-316a1e5c.entry.js} +1 -1
  352. package/dist/vega/{p-1827a459.entry.js → p-329c808e.entry.js} +1 -1
  353. package/dist/vega/{p-4386625c.entry.js → p-335e3237.entry.js} +1 -1
  354. package/dist/vega/{p-1ee185d9.entry.js → p-3372f34a.entry.js} +1 -1
  355. package/dist/vega/p-3863187f.entry.js +1 -0
  356. package/dist/vega/{p-740f3325.entry.js → p-3911e760.entry.js} +1 -1
  357. package/dist/vega/{p-8666f206.entry.js → p-3cf298a4.entry.js} +1 -1
  358. package/dist/vega/{p-d0e7c14b.entry.js → p-3fe43f7a.entry.js} +1 -1
  359. package/dist/vega/{p-2c7e1bcb.js → p-4037126d.js} +1 -1
  360. package/dist/vega/p-42a1d300.entry.js +1 -0
  361. package/dist/vega/{p-6d99a0b3.entry.js → p-42ed76ee.entry.js} +1 -1
  362. package/dist/vega/{p-c0a6ed53.entry.js → p-42f3c0b1.entry.js} +1 -1
  363. package/dist/vega/{p-465590d1.entry.js → p-4644ccf9.entry.js} +1 -1
  364. package/dist/vega/{p-566ba295.js → p-4979fd7d.js} +1 -1
  365. package/dist/vega/p-49b4ab2b.js +1 -0
  366. package/dist/vega/{p-46e0c6ca.js → p-4cef4812.js} +1 -1
  367. package/dist/vega/p-507612f6.entry.js +1 -0
  368. package/dist/vega/{p-f5c8024e.entry.js → p-50d7a1c4.entry.js} +1 -1
  369. package/dist/vega/p-522dd15f.entry.js +1 -0
  370. package/dist/vega/p-53ed3b1f.js +1 -0
  371. package/dist/vega/p-57f7c257.js +1 -0
  372. package/dist/vega/p-58a00869.entry.js +1 -0
  373. package/dist/vega/{p-3ed6a602.js → p-5a4e598f.js} +1 -1
  374. package/dist/vega/{p-f9ae396b.entry.js → p-5bed3fd2.entry.js} +1 -1
  375. package/dist/vega/{p-7fe292af.entry.js → p-5df53125.entry.js} +1 -1
  376. package/dist/vega/p-5e1cd1cc.js +1 -0
  377. package/dist/vega/p-5e1ec2b8.entry.js +1 -0
  378. package/dist/vega/{p-f0d6e2f2.js → p-5e282e41.js} +1 -1
  379. package/dist/vega/p-5f377954.js +1 -1
  380. package/dist/vega/{p-850ea38b.entry.js → p-5fcb825c.entry.js} +1 -1
  381. package/dist/vega/{p-3a93730e.js → p-5ffc7cb8.js} +1 -1
  382. package/dist/vega/{p-724df1f5.js → p-6031bed1.js} +1 -1
  383. package/dist/vega/{p-8e34b266.js → p-6096ffc3.js} +1 -1
  384. package/dist/vega/p-61d42e9b.entry.js +1 -0
  385. package/dist/vega/p-63ae5ada.entry.js +1 -0
  386. package/dist/vega/{p-6fec4d46.entry.js → p-64b5fe2a.entry.js} +1 -1
  387. package/dist/vega/{p-6cedb325.js → p-66905cbf.js} +1 -1
  388. package/dist/vega/{p-54141828.entry.js → p-6820b488.entry.js} +1 -1
  389. package/dist/vega/{p-d871e8eb.entry.js → p-689070f9.entry.js} +1 -1
  390. package/dist/vega/{p-456890f5.entry.js → p-6e7c1b19.entry.js} +1 -1
  391. package/dist/vega/{p-4694fe27.entry.js → p-6ecb3c7d.entry.js} +1 -1
  392. package/dist/vega/p-70352240.entry.js +1 -0
  393. package/dist/vega/p-73b9868f.js +1 -0
  394. package/dist/vega/{p-3755d8d3.entry.js → p-74fa0f5b.entry.js} +1 -1
  395. package/dist/vega/{p-e4917e76.js → p-7b9ed949.js} +1 -1
  396. package/dist/vega/p-7bb39b97.js +1 -0
  397. package/dist/vega/{p-99545fd7.entry.js → p-7f086e54.entry.js} +1 -1
  398. package/dist/vega/p-7f139b74.js +1 -0
  399. package/dist/vega/{p-b7c90543.js → p-8019c156.js} +1 -1
  400. package/dist/vega/p-81591449.entry.js +1 -0
  401. package/dist/vega/{p-328dbe8e.js → p-822f70b0.js} +1 -1
  402. package/dist/vega/p-85d78ac1.js +1 -0
  403. package/dist/vega/p-8982796b.entry.js +1 -0
  404. package/dist/vega/{p-44f81987.entry.js → p-8bc23bcf.entry.js} +1 -1
  405. package/dist/vega/{p-8a054a13.js → p-92a144bc.js} +1 -1
  406. package/dist/vega/{p-a9a70696.entry.js → p-94845302.entry.js} +1 -1
  407. package/dist/vega/{p-e8c5a446.entry.js → p-9756c6b9.entry.js} +1 -1
  408. package/dist/vega/{p-00d2a013.entry.js → p-9abf7d0a.entry.js} +1 -1
  409. package/dist/vega/{p-1b4abd76.entry.js → p-9e327397.entry.js} +1 -1
  410. package/dist/vega/p-9f608b97.js +1 -0
  411. package/dist/vega/p-9fb3aeeb.entry.js +1 -0
  412. package/dist/vega/{p-1d16a7fa.entry.js → p-a04b95aa.entry.js} +1 -1
  413. package/dist/vega/p-a14d8767.js +1 -0
  414. package/dist/vega/{p-c5621f60.entry.js → p-a4826f3f.entry.js} +1 -1
  415. package/dist/vega/{p-616d7096.entry.js → p-aaa6e976.entry.js} +1 -1
  416. package/dist/vega/{p-f70cfac5.entry.js → p-aca134a3.entry.js} +1 -1
  417. package/dist/vega/{p-bce9f489.entry.js → p-ae728041.entry.js} +1 -1
  418. package/dist/vega/{p-277c306b.js → p-aea912ac.js} +1 -1
  419. package/dist/vega/{p-9a6bd32c.js → p-afcd8f04.js} +1 -1
  420. package/dist/vega/{p-ecea4d24.js → p-b2f89dbd.js} +1 -1
  421. package/dist/vega/{p-8d9c4338.entry.js → p-b2f9698a.entry.js} +1 -1
  422. package/dist/vega/p-b438e68b.js +1 -0
  423. package/dist/vega/p-b504a8b4.entry.js +1 -0
  424. package/dist/vega/{p-dfda6e01.entry.js → p-b77e85e0.entry.js} +1 -1
  425. package/dist/vega/{p-fd2a49be.entry.js → p-b7b0930a.entry.js} +1 -1
  426. package/dist/vega/{p-600f0316.entry.js → p-bb0040d4.entry.js} +1 -1
  427. package/dist/vega/{p-dcf162e9.js → p-bc73ce30.js} +1 -1
  428. package/dist/vega/{p-5a6e2c08.entry.js → p-bd94b904.entry.js} +1 -1
  429. package/dist/vega/{p-1be90bab.entry.js → p-c04a90d8.entry.js} +1 -1
  430. package/dist/vega/{p-85dcd07b.js → p-c0c2a917.js} +1 -1
  431. package/dist/vega/p-c40555c4.entry.js +1 -0
  432. package/dist/vega/{p-92e493ea.entry.js → p-c65a5778.entry.js} +1 -1
  433. package/dist/vega/{p-0278cd2b.entry.js → p-c75872a4.entry.js} +1 -1
  434. package/dist/vega/{p-30487f0e.js → p-c87c7ef4.js} +1 -1
  435. package/dist/vega/{p-fcefb62c.js → p-cb4033ef.js} +1 -1
  436. package/dist/vega/{p-02492864.entry.js → p-cc8bf6e7.entry.js} +1 -1
  437. package/dist/vega/{p-d2916121.js → p-cd21adb8.js} +1 -1
  438. package/dist/vega/{p-844b7826.js → p-cd2a1ffb.js} +1 -1
  439. package/dist/vega/{p-285e5e52.entry.js → p-ce27c273.entry.js} +1 -1
  440. package/dist/vega/{p-788a7a5a.js → p-cec8ffdc.js} +1 -1
  441. package/dist/vega/{p-820ff54c.js → p-d0060bdb.js} +1 -1
  442. package/dist/vega/p-d00b3910.js +1 -0
  443. package/dist/vega/{p-a58cacca.js → p-d14ddf80.js} +1 -1
  444. package/dist/vega/{p-6845ed5c.entry.js → p-da067259.entry.js} +1 -1
  445. package/dist/vega/p-da2b1fd0.entry.js +1 -0
  446. package/dist/vega/p-dc78e8d6.js +1 -0
  447. package/dist/vega/{p-eb927e2b.js → p-ddc2d219.js} +1 -1
  448. package/dist/vega/p-e75e75c9.entry.js +1 -0
  449. package/dist/vega/p-e8f50fc5.js +1 -0
  450. package/dist/vega/{p-fe573f85.entry.js → p-e9a82603.entry.js} +1 -1
  451. package/dist/vega/{p-d7790113.js → p-ef44d516.js} +1 -1
  452. package/dist/vega/p-f362c07b.entry.js +1 -0
  453. package/dist/vega/{p-0cc4a052.entry.js → p-fb1ef3e6.entry.js} +1 -1
  454. package/dist/vega/p-fc103347.entry.js +1 -0
  455. package/dist/vega/{p-0a1c7f80.js → p-fea33425.js} +1 -1
  456. package/dist/vega/{p-1704ff25.js → p-ffdc25ec.js} +1 -1
  457. package/dist/vega/vega.css +1 -1
  458. package/dist/vega/vega.esm.js +1 -1
  459. package/package.json +1 -1
  460. package/style/vega.css +1 -1
  461. package/dist/cjs/month-view-generator-c7492e06.js +0 -101
  462. package/dist/esm/month-view-generator-1b7c9bb8.js +0 -97
  463. package/dist/vega/p-018756ad.entry.js +0 -1
  464. package/dist/vega/p-0542b8ac.js +0 -1
  465. package/dist/vega/p-0bb860cc.js +0 -1
  466. package/dist/vega/p-203f4ce9.entry.js +0 -1
  467. package/dist/vega/p-2620a164.js +0 -1
  468. package/dist/vega/p-2649051e.entry.js +0 -1
  469. package/dist/vega/p-280cbcdb.js +0 -1
  470. package/dist/vega/p-30a6b7aa.entry.js +0 -1
  471. package/dist/vega/p-350d1b75.entry.js +0 -1
  472. package/dist/vega/p-355ea330.entry.js +0 -1
  473. package/dist/vega/p-35d617d5.js +0 -1
  474. package/dist/vega/p-3e956269.entry.js +0 -1
  475. package/dist/vega/p-44f39eee.js +0 -1
  476. package/dist/vega/p-46cab60a.js +0 -1
  477. package/dist/vega/p-47ffdc0f.entry.js +0 -1
  478. package/dist/vega/p-4fdd0a71.js +0 -1
  479. package/dist/vega/p-5f048811.entry.js +0 -1
  480. package/dist/vega/p-667c980d.entry.js +0 -1
  481. package/dist/vega/p-716a393e.entry.js +0 -1
  482. package/dist/vega/p-73ce8fef.js +0 -1
  483. package/dist/vega/p-8258dc37.entry.js +0 -1
  484. package/dist/vega/p-82c133aa.js +0 -1
  485. package/dist/vega/p-8a34c08a.js +0 -1
  486. package/dist/vega/p-939c486f.entry.js +0 -1
  487. package/dist/vega/p-aae71499.entry.js +0 -1
  488. package/dist/vega/p-b0f55f5f.js +0 -1
  489. package/dist/vega/p-b5c08306.entry.js +0 -1
  490. package/dist/vega/p-b6be1f33.js +0 -1
  491. package/dist/vega/p-c1c5bd2c.entry.js +0 -1
  492. package/dist/vega/p-c596bb49.js +0 -1
  493. package/dist/vega/p-c9c42a07.js +0 -1
  494. package/dist/vega/p-d76cb9da.entry.js +0 -1
  495. package/dist/vega/p-d884c644.js +0 -1
  496. package/dist/vega/p-d905159c.entry.js +0 -1
  497. package/dist/vega/p-e30a4f3e.js +0 -1
  498. package/dist/vega/p-f0b99c3a.entry.js +0 -1
  499. package/dist/vega/p-f251a907.entry.js +0 -1
  500. package/dist/vega/p-f830deb8.js +0 -1
@@ -1 +1 @@
1
- import{L as e}from"./p-6e1ab235.js";import t from"./p-982747ef.js";const r=Object.freeze({"VEGA_DATE_PICKER.COMPONENT_LOAD_REQUIRED_DECORATOR":{description:"Feature flag to enable the required decorator for the date picker component. <br/> <b>Note: This feature flag is for demonstration purpose and will be persisted permanently.</b>",createdTimestamp:1660330561422,createdAtVersion:"1.2.0",removedAfterVersion:"1.11.1"},"VEGA_COMPONENT.SANITIZE_VEGA_COMPONENT":{description:"Feature flag to enable sanitize vega components.",createdTimestamp:1664262689486,createdAtVersion:"1.8.1",removedAfterVersion:"2.0.0"},"VEGA_TEXT.LABEL_OR_CONTENT_NESTED_VEGA_TEXT_COMPONENT":{description:"Feature flag to enable the label or content of other component nested vega-text component.",createdTimestamp:1665218525140,createdAtVersion:"1.8.1",removedAfterVersion:"1.9.1"},"VEGA_FLEX.ENABLE_DIRECTION_ONLY":{description:"Feature flag to make direction take effect only regardless of breakpoint for vega-flex component.",createdTimestamp:1665639912117,createdAtVersion:"1.9.0"},"VEGA_FIELD_LABEL.SHOW_LABEL":{description:"Feature flag to enable the vega-field-label component for vega-input, vega-input-select and vega-date-picker.",createdTimestamp:1666184962131,createdAtVersion:"1.9.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.USE_NATIVE_FLEX_BEHAVIOR":{description:"Feature flag to enable the **default** use of native flex behavior for vega-flex component.",createdTimestamp:1668059639449,createdAtVersion:"1.11.1",removedAfterVersion:"2.0.0"},"VEGA_TABLE.DEPRECATED_ROW_SELECTION_CHANGE_PROP":{description:"Feature flag to deprecate the rowSelection.onSelectChange and rowSelection.onSelectAllChange",createdTimestamp:1673321949321,createdAtVersion:"1.18.0",removedAfterVersion:"2.0.0"},"VEGA_ICON.USE_SIZE_PROP_FOR_THIRD_PARTY_ICONS":{description:"Feature flag to make size prop of vega-icon to take effect for third party icons.",createdTimestamp:1675752744795,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_INJECT_FORM_FIELD_CONTROLLER.ADD_DATA_VEGA_FORM_FILTER":{description:"Feature flag to deprecate the form field should validate only have data-vega-from attribute",createdTimestamp:1676017004107,createdAtVersion:"1.19.0",removedAfterVersion:"2.0.0"},"VEGA_FORM_FIELD.CHANGE_BLOCK_TO_INLINE_BLOCK":{description:"Feature flag to deprecate the form fields like input/datePicker/timePicker should use inline block",createdTimestamp:1676512727310,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_CHECKBOX_RADIO_GROUP.FLEX_DIRECTION_COL_DEFAULT":{description:"Feature flag to make the checkbox group and radio group prop vegaFlexProp default direction to col",createdTimestamp:16811712e5,createdAtVersion:"1.27.3",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_SSR":{description:"Feature flag to prevent the SSR in vega-react",createdTimestamp:1679450185124,createdAtVersion:"1.25.0",disabledByDefault:!0},"VEGA_STEPPER.INPUT_DISABLED":{description:"Feature flag to rename the prop input-editable to input-disabled ",createdTimestamp:1683252081350,createdAtVersion:"1.30.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.ALIGNITEM_JUSTIFYCONTENT_USE_PREFIX_V_INSTEAD_OF_VEGA":{description:"Feature flag to render vega-flex prop alignItems and justifyContent classes by using v- instead of vega-",createdTimestamp:1684128467390,createdAtVersion:"1.32.0",removedAfterVersion:"1.48.3"},"VEGA_ANGULAR.USE_JUGGLE_RESIZE_OBSERVER":{description:"Feature flag to enable the @juggle/resizeObserver to instead window resizeObserver",createdTimestamp:1684203399089,createdAtVersion:"1.31.0"},"VEGA_INPUT.FOCUS_ON_INPUT_BY_CLICK_CLEAR_BUTTON":{description:"Feature flag to keep the input focused whenever click the clear button",createdTimestamp:1685513925082,createdAtVersion:"1.34.0",removedAfterVersion:"1.38.2"},"VEGA_VUE.EMIT_CAMEL_CASE_EVENT_NAME":{description:"Feature flag to emit camel case event name for Vue framework",createdTimestamp:1688971026741,createdAtVersion:"1.37.0"},VEGA_ITEM_TOGGLE_ISERROR_DEPRECATED:{description:"Feature flag to deprecated the component vega-item-toggle property isError",createdTimestamp:1687934508330,createdAtVersion:"1.36.0",removedAfterVersion:"2.0.0"},"VEGA_BUTTON_LINK.DEPRECATED_EVENTFUL":{description:"Feature flag to deprecated eventful property",createdTimestamp:1689313658898,createdAtVersion:"1.36.1",removedAfterVersion:"2.0.0"},"VEGA_DROPDOWN.RENAME_PREFIX_TO_PREFIX_ICON":{description:"Feature flag to rename prefix to prefixIcon",createdTimestamp:1689576347049,createdAtVersion:"1.37.0",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad",createdTimestamp:1706598728908,createdAtVersion:"2.0.0"},"VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad in all framework",createdTimestamp:1708495728180,createdAtVersion:"2.0.0"},"VEGA_REACT.ENABLE_ON_CHANGE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onChange event handle under react version 19 or below",createdTimestamp:1709603823660,createdAtVersion:"2.0.0"},"VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD":{description:"Feature flag to enable the hide card number mask upon initial loading of the credit card.",createdTimestamp:1715932781059,createdAtVersion:"2.9.0"},"VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE":{description:"Feature flag to enable the new cell words break style",createdTimestamp:1719282763075,createdAtVersion:"2.11.2"},"VEGA_TELEMETRY.ENABLE_COLLECT_COMPONENTS_USAGE":{description:"Feature flag to enable the collection of component usage.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_TELEMETRY.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN":{description:"Feature flag to enable the feature flag overridden.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_REACT.ENABLE_ON_CLOSE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onClose event handle under react version 19 or below",createdTimestamp:1719910557333,createdAtVersion:"2.12.0"},VEGA_BANNER_DEPRECATED_ACTION_BUTTON_PROP_VEGA_CLICK:{description:"Feature flag to deprecated the vega-banner component property actionButtons property vegaClick",createdTimestamp:1723449433833,createdAtVersion:"2.18.0"},"VEGA_REACT.SKIP_NATIVE_EVENT_PREVENT_BY_DEFAULT":{description:"Feature flag to skip the native event prevent logic in default",createdTimestamp:17239968e5,createdAtVersion:"2.18.1",disabledByDefault:!0},"VEGA_TELEMETRY.ENABLE_COLLECT_PUBLIC_API":{description:"Feature flag to enable the collection of public api.",createdTimestamp:1727232497961,createdAtVersion:"2.21.0"},"VEGA_LEFT_NAV.DISABLE_ANIMATION_ON_LOAD":{description:"Feature flag that disables the transition animation of the left nav.",createdTimestamp:1730361348399,createdAtVersion:"2.26.0"},"VEGA_DATE_PICKER.ENABLE_CALCULATION_POSITION_BY_SCREEN":{description:"Feature flag that enable use screen to calculation position.",createdTimestamp:1733293586535,createdAtVersion:"2.29.0"},"VEGA_TABLE.REVERSE_SORT_ORDER":{description:"Feature flag that reverses table column sorting order from default>asc>desc to default>desc>asc",createdTimestamp:1737521148363,createdAtVersion:"2.32.0",disabledByDefault:!1},"VEGA_PAGINATION.ENABLE_EXTENSIONS_RESPONSIVE_DEFAULT_VALUE":{description:"Feature flag to enable responsive default values for the extensions property in vega-pagination.",createdTimestamp:1744876233415,createdAtVersion:"2.42.0",disabledByDefault:!0},"VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR":{description:"Feature flag that the component corners style weights are sorted according to the [0, 9999, 2, 4, 8, ..., 48]",createdTimestamp:1744772429681,createdAtVersion:"2.41.0",disabledByDefault:!0},"VEGA_INPUT_PHONE_NUMBER.ENABLE_CALCULATION_POSITION_BY_SCREEN":{description:"Feature flag that enable use screen to calculation position.",createdTimestamp:1750317683577,createdAtVersion:"2.48.1",disabledByDefault:!0},"VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT":{description:"A feature flag to automatic placement for appendable pop-ups when isScreenPosition is enabled.",createdTimestamp:17709408e5,createdAtVersion:"2.76.0",disabledByDefault:!1}}),a=new class{constructor(){this.enabledFeatureFlagKeySet=new Set,this.init()}enable(...e){e.forEach((e=>{this.versionGuard(e)&&(this.enabledFeatureFlagKeySet.add(e),this.sendFeatureFlagKeyToTelemetry(e,!0))}))}disable(...e){e.forEach((e=>{this.versionGuard(e)&&(this.enabledFeatureFlagKeySet.delete(e),this.sendFeatureFlagKeyToTelemetry(e,!1))}))}isEnabled(e){return this.enabledFeatureFlagKeySet.has(e)}init(){Object.keys(r).map((e=>{r[e].disabledByDefault||this.isRemoved(e)||this.enabledFeatureFlagKeySet.add(e)}))}versionGuard(t){return!this.isRemoved(t)||(e.error(`The feature flag key '${t}' has been removed after v${r[t].removedAfterVersion}`),!1)}isRemoved(e){return!!r[e].removedAfterVersion}sendFeatureFlagKeyToTelemetry(e,r){this.canSendFeatureFlagsToTelemetry(e,r)&&t.emit("featureFlagOverridden",{featureFlagName:e,featureFlagOverriddenValue:r})}canSendFeatureFlagsToTelemetry(e,t){return!!r[e].disabledByDefault===t}};export{a as F}
1
+ import{L as e}from"./p-6e1ab235.js";import t from"./p-982747ef.js";const a=Object.freeze({"VEGA_DATE_PICKER.COMPONENT_LOAD_REQUIRED_DECORATOR":{description:"Feature flag to enable the required decorator for the date picker component. <br/> <b>Note: This feature flag is for demonstration purpose and will be persisted permanently.</b>",createdTimestamp:1660330561422,createdAtVersion:"1.2.0",removedAfterVersion:"1.11.1"},"VEGA_COMPONENT.SANITIZE_VEGA_COMPONENT":{description:"Feature flag to enable sanitize vega components.",createdTimestamp:1664262689486,createdAtVersion:"1.8.1",removedAfterVersion:"2.0.0"},"VEGA_TEXT.LABEL_OR_CONTENT_NESTED_VEGA_TEXT_COMPONENT":{description:"Feature flag to enable the label or content of other component nested vega-text component.",createdTimestamp:1665218525140,createdAtVersion:"1.8.1",removedAfterVersion:"1.9.1"},"VEGA_FLEX.ENABLE_DIRECTION_ONLY":{description:"Feature flag to make direction take effect only regardless of breakpoint for vega-flex component.",createdTimestamp:1665639912117,createdAtVersion:"1.9.0"},"VEGA_FIELD_LABEL.SHOW_LABEL":{description:"Feature flag to enable the vega-field-label component for vega-input, vega-input-select and vega-date-picker.",createdTimestamp:1666184962131,createdAtVersion:"1.9.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.USE_NATIVE_FLEX_BEHAVIOR":{description:"Feature flag to enable the **default** use of native flex behavior for vega-flex component.",createdTimestamp:1668059639449,createdAtVersion:"1.11.1",removedAfterVersion:"2.0.0"},"VEGA_TABLE.DEPRECATED_ROW_SELECTION_CHANGE_PROP":{description:"Feature flag to deprecate the rowSelection.onSelectChange and rowSelection.onSelectAllChange",createdTimestamp:1673321949321,createdAtVersion:"1.18.0",removedAfterVersion:"2.0.0"},"VEGA_ICON.USE_SIZE_PROP_FOR_THIRD_PARTY_ICONS":{description:"Feature flag to make size prop of vega-icon to take effect for third party icons.",createdTimestamp:1675752744795,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_INJECT_FORM_FIELD_CONTROLLER.ADD_DATA_VEGA_FORM_FILTER":{description:"Feature flag to deprecate the form field should validate only have data-vega-from attribute",createdTimestamp:1676017004107,createdAtVersion:"1.19.0",removedAfterVersion:"2.0.0"},"VEGA_FORM_FIELD.CHANGE_BLOCK_TO_INLINE_BLOCK":{description:"Feature flag to deprecate the form fields like input/datePicker/timePicker should use inline block",createdTimestamp:1676512727310,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_CHECKBOX_RADIO_GROUP.FLEX_DIRECTION_COL_DEFAULT":{description:"Feature flag to make the checkbox group and radio group prop vegaFlexProp default direction to col",createdTimestamp:16811712e5,createdAtVersion:"1.27.3",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_SSR":{description:"Feature flag to prevent the SSR in vega-react",createdTimestamp:1679450185124,createdAtVersion:"1.25.0",disabledByDefault:!0},"VEGA_STEPPER.INPUT_DISABLED":{description:"Feature flag to rename the prop input-editable to input-disabled ",createdTimestamp:1683252081350,createdAtVersion:"1.30.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.ALIGNITEM_JUSTIFYCONTENT_USE_PREFIX_V_INSTEAD_OF_VEGA":{description:"Feature flag to render vega-flex prop alignItems and justifyContent classes by using v- instead of vega-",createdTimestamp:1684128467390,createdAtVersion:"1.32.0",removedAfterVersion:"1.48.3"},"VEGA_ANGULAR.USE_JUGGLE_RESIZE_OBSERVER":{description:"Feature flag to enable the @juggle/resizeObserver to instead window resizeObserver",createdTimestamp:1684203399089,createdAtVersion:"1.31.0"},"VEGA_INPUT.FOCUS_ON_INPUT_BY_CLICK_CLEAR_BUTTON":{description:"Feature flag to keep the input focused whenever click the clear button",createdTimestamp:1685513925082,createdAtVersion:"1.34.0",removedAfterVersion:"1.38.2"},"VEGA_VUE.EMIT_CAMEL_CASE_EVENT_NAME":{description:"Feature flag to emit camel case event name for Vue framework",createdTimestamp:1688971026741,createdAtVersion:"1.37.0"},VEGA_ITEM_TOGGLE_ISERROR_DEPRECATED:{description:"Feature flag to deprecated the component vega-item-toggle property isError",createdTimestamp:1687934508330,createdAtVersion:"1.36.0",removedAfterVersion:"2.0.0"},"VEGA_BUTTON_LINK.DEPRECATED_EVENTFUL":{description:"Feature flag to deprecated eventful property",createdTimestamp:1689313658898,createdAtVersion:"1.36.1",removedAfterVersion:"2.0.0"},"VEGA_DROPDOWN.RENAME_PREFIX_TO_PREFIX_ICON":{description:"Feature flag to rename prefix to prefixIcon",createdTimestamp:1689576347049,createdAtVersion:"1.37.0",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad",createdTimestamp:1706598728908,createdAtVersion:"2.0.0"},"VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad in all framework",createdTimestamp:1708495728180,createdAtVersion:"2.0.0"},"VEGA_REACT.ENABLE_ON_CHANGE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onChange event handle under react version 19 or below",createdTimestamp:1709603823660,createdAtVersion:"2.0.0"},"VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD":{description:"Feature flag to enable the hide card number mask upon initial loading of the credit card.",createdTimestamp:1715932781059,createdAtVersion:"2.9.0"},"VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE":{description:"Feature flag to enable the new cell words break style",createdTimestamp:1719282763075,createdAtVersion:"2.11.2"},"VEGA_TELEMETRY.ENABLE_COLLECT_COMPONENTS_USAGE":{description:"Feature flag to enable the collection of component usage.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_TELEMETRY.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN":{description:"Feature flag to enable the feature flag overridden.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_REACT.ENABLE_ON_CLOSE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onClose event handle under react version 19 or below",createdTimestamp:1719910557333,createdAtVersion:"2.12.0"},VEGA_BANNER_DEPRECATED_ACTION_BUTTON_PROP_VEGA_CLICK:{description:"Feature flag to deprecated the vega-banner component property actionButtons property vegaClick",createdTimestamp:1723449433833,createdAtVersion:"2.18.0"},"VEGA_REACT.SKIP_NATIVE_EVENT_PREVENT_BY_DEFAULT":{description:"Feature flag to skip the native event prevent logic in default",createdTimestamp:17239968e5,createdAtVersion:"2.18.1",disabledByDefault:!0},"VEGA_TELEMETRY.ENABLE_COLLECT_PUBLIC_API":{description:"Feature flag to enable the collection of public api.",createdTimestamp:1727232497961,createdAtVersion:"2.21.0"},"VEGA_LEFT_NAV.DISABLE_ANIMATION_ON_LOAD":{description:"Feature flag that disables the transition animation of the left nav.",createdTimestamp:1730361348399,createdAtVersion:"2.26.0"},"VEGA_DATE_PICKER.ENABLE_CALCULATION_POSITION_BY_SCREEN":{description:"Feature flag that enable use screen to calculation position.",createdTimestamp:1733293586535,createdAtVersion:"2.29.0"},"VEGA_TABLE.REVERSE_SORT_ORDER":{description:"Feature flag that reverses table column sorting order from default>asc>desc to default>desc>asc",createdTimestamp:1737521148363,createdAtVersion:"2.32.0",disabledByDefault:!1},"VEGA_PAGINATION.ENABLE_EXTENSIONS_RESPONSIVE_DEFAULT_VALUE":{description:"Feature flag to enable responsive default values for the extensions property in vega-pagination.",createdTimestamp:1744876233415,createdAtVersion:"2.42.0",disabledByDefault:!0},"VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR":{description:"Feature flag that the component corners style weights are sorted according to the [0, 9999, 2, 4, 8, ..., 48]",createdTimestamp:1744772429681,createdAtVersion:"2.41.0",disabledByDefault:!0},"VEGA_INPUT_PHONE_NUMBER.ENABLE_CALCULATION_POSITION_BY_SCREEN":{description:"Feature flag that enable use screen to calculation position.",createdTimestamp:1750317683577,createdAtVersion:"2.48.1",disabledByDefault:!0},"VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT":{description:"A feature flag to automatic placement for appendable pop-ups when isScreenPosition is enabled.",createdTimestamp:17709408e5,createdAtVersion:"2.76.0",disabledByDefault:!1},"VEGA_FONT.LEGACY_LETTER_SPACING":{description:"Feature flag to restore the legacy (positive) letter-spacing values on `vega-font` variants h1/h2/h3 as an opt-in safety net. The new (negative) values are now the default and reflect the source design tokens; enable this flag only if a consumer needs the legacy rendering during transition.",createdTimestamp:17505648e5,createdAtVersion:"2.91.0",disabledByDefault:!0},"VEGA_REQUIRED_FIELD_RULE.TRIM_WHITESPACE":{description:"Feature flag to enable trimming whitespace in required field validation. When enabled, strings containing only whitespace will be treated as empty and fail required validation.",createdTimestamp:17497728e5,createdAtVersion:"2.91.0",disabledByDefault:!0}}),r=new class{constructor(){this.enabledFeatureFlagKeySet=new Set,this.init()}enable(...e){e.forEach((e=>{this.versionGuard(e)&&(this.enabledFeatureFlagKeySet.add(e),this.sendFeatureFlagKeyToTelemetry(e,!0))}))}disable(...e){e.forEach((e=>{this.versionGuard(e)&&(this.enabledFeatureFlagKeySet.delete(e),this.sendFeatureFlagKeyToTelemetry(e,!1))}))}isEnabled(e){return this.enabledFeatureFlagKeySet.has(e)}init(){Object.keys(a).map((e=>{a[e].disabledByDefault||this.isRemoved(e)||this.enabledFeatureFlagKeySet.add(e)}))}versionGuard(t){return!this.isRemoved(t)||(e.error(`The feature flag key '${t}' has been removed after v${a[t].removedAfterVersion}`),!1)}isRemoved(e){return!!a[e].removedAfterVersion}sendFeatureFlagKeyToTelemetry(e,a){this.canSendFeatureFlagsToTelemetry(e,a)&&t.emit("featureFlagOverridden",{featureFlagName:e,featureFlagOverriddenValue:a})}canSendFeatureFlagsToTelemetry(e,t){return!!a[e].disabledByDefault===t}};export{r as F}
@@ -1 +1 @@
1
- import{h as t,H as n,r as e,c as o,g as r}from"./p-6b2342e0.js";import{c as i,V as s,I as a}from"./p-6e1ab235.js";import{V as c,I as b}from"./p-8ce9e214.js";import{s as l}from"./p-519a7d55.js";import{c as p}from"./p-3a620268.js";import{g as h,D as d,a as f}from"./p-528748fa.js";import{V as g}from"./p-724df1f5.js";import{D as u}from"./p-526e3634.js";import{a as v,g as m,h as x}from"./p-fcefb62c.js";import{F as w}from"./p-dcf162e9.js";import{c as y}from"./p-d7790113.js";import"./p-1704ff25.js";import"./p-9a6bd32c.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-982747ef.js";import"./p-46cab60a.js";import"./p-b75ee3ba.js";var C=function(t,n,e,o){var r,i=arguments.length,s=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(n,e,s):r(n,e))||s);return i>3&&s&&Object.defineProperty(n,e,s),s};class j extends s{constructor(){super(...arguments),this.isMobileDevice=h()===d.MOBILE,this.space=this.isMobileDevice?"size-16":"size-24",this.handleCloseButtonClick=()=>{const t=this.closeEventEmitter.emit();t&&!t.defaultPrevented&&this.host.remove()}}render(){const e=[`banner-${this.type}`,this.isMobileDevice&&"banner-mobile",!this.isOpen&&"banner-hidden",!this.bannerTitle&&"banner-no-title"].filter(Boolean);return t(n,{class:f(e),padding:this.space},t("vega-flex",{direction:"row",gap:this.isMobileDevice?"size-8":"size-16",justifyContent:"space-between",alignItems:"start"},this.renderPrefixIcon(),this.renderBannerContent(),this.renderCloseButton()),this.isMobileDevice?this.actionButtonRenderer.render():null)}renderBannerContent(){const n=this.hasContentSlot();return t("div",{class:{"banner-content-container":!0,linear:!(this.isMobileDevice||(this.content||n)&&this.bannerTitle)}},this.renderBannerTitle(),t("div",{class:"banner-content"},n?t("slot",{name:"content"}):t("vega-font",{variant:this.isMobileDevice?"font-footnote1-long":"font-p2-short",color:"error"===this.type?"text-primary":"text-black"},this.content),this.isMobileDevice?null:this.actionButtonRenderer.render()))}hasContentSlot(){return null!==this.host.querySelector('[slot="content"]')}renderBannerTitle(){if(this.bannerTitle)return t("vega-font",{class:"banner-title",variant:this.isMobileDevice?"font-h6":"font-h5",color:"error"===this.type?"text-primary":"text-black"},this.bannerTitle)}renderCloseButton(){if(this.showCloseButton)return t("div",{class:"banner-close-button","aria-label":"Close Button",role:"button",tabIndex:0,onClick:this.handleCloseButtonClick,onKeyDown:p()},t("vega-icon",{size:this.isMobileDevice?"size-12":"size-16",icon:this.iconController.getCloseIcon()}))}renderPrefixIcon(){return t("div",{class:"banner-prefix-icon"},t("vega-icon",{size:this.space,icon:this.iconController.getIconByType()}))}}C([i()],j.prototype,"host",void 0),C([i()],j.prototype,"type",void 0),C([i()],j.prototype,"bannerTitle",void 0),C([i()],j.prototype,"content",void 0),C([i()],j.prototype,"showCloseButton",void 0),C([i()],j.prototype,"actionButtons",void 0),C([i()],j.prototype,"actionButtonRenderer",void 0),C([i()],j.prototype,"iconController",void 0),C([i()],j.prototype,"isOpen",void 0),C([i()],j.prototype,"closeEventEmitter",void 0);var z;!function(t){t.warning="triangle-exclamation",t.success="circle-check",t.error="circle-question",t.info="circle-info"}(z||(z={}));class k extends s{getIconByType(){return g.getIconKey(z[this.type])}getCloseIcon(){return g.getIconKey("xmark-large")}}g.register({"triangle-exclamation":{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="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/></svg>'},"circle-check":{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="M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>'},"circle-question":{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="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"/></svg>'},"circle-info":{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="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>'},"xmark-large":{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="M393.4 41.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L269.3 256 438.6 425.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 301.3 54.6 470.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L178.7 256 9.4 86.6C-3.1 74.1-3.1 53.9 9.4 41.4s32.8-12.5 45.3 0L224 210.7 393.4 41.4z"/></svg>'}}),function(t,n,e,o){var r,i=arguments.length,s=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(n,e,s):r(n,e))||s);i>3&&s&&Object.defineProperty(n,e,s)}([i()],k.prototype,"type",void 0);var B=function(t,n,e,o){var r,i=arguments.length,s=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(n,e,s):r(n,e))||s);return i>3&&s&&Object.defineProperty(n,e,s),s};class I extends s{render(){var n;if((null===(n=this.actionButtons)||void 0===n?void 0:n.length)>0)return t("div",{class:"banner-buttons"},this.actionButtons.map(((t,n)=>this.renderButtonItem(t,`${t.label}${n}`))))}renderButtonItem(n,e){return t("vega-button",{key:e,size:"small",variant:"secondary",ref:t=>{u.addUniqueObserverToNode(t,v,(()=>{w.isEnabled("VEGA_BANNER_DEPRECATED_ACTION_BUTTON_PROP_VEGA_CLICK")||"function"!=typeof n.vegaClick||n.vegaClick(n),this.actionButtonClickEventEmitter.emit(n)}))}},n.label)}}B([i()],I.prototype,"actionButtons",void 0),B([i()],I.prototype,"actionButtonClickEventEmitter",void 0);var L=function(t,n,e,o){var r,i=arguments.length,s=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(n,e,s):r(n,e))||s);return i>3&&s&&Object.defineProperty(n,e,s),s};const R=class{constructor(t){e(this,t),this.vegaClose=o(this,"vegaClose",7),this.close=o(this,"close",7),this.vegaActionButtonClick=o(this,"vegaActionButtonClick",7),this.actionButtonClick=o(this,"actionButtonClick",7),this.globalSlimmers={},this.closeEventEmitter=y(R,m),this.renderer=new j,this.actionButtonRenderer=new I,this.iconController=new k,this.vegaComponentUsageRuntimeMetricsSlimmer=new c,this.actionButtonClickEventEmitter=y(R,x),this.type="info",this.bannerTitle="",this.content="",this.actionButtons=null,this.showCloseButton=!0,this.isOpen=!0}async doClose(){this.host.remove(),this.closeEventEmitter.emit()}render(){return l(this.renderer.render(),this.host)}get host(){return r(this)}};L([b()],R.prototype,"globalSlimmers",void 0),L([a()],R.prototype,"closeEventEmitter",void 0),L([a()],R.prototype,"renderer",void 0),L([a()],R.prototype,"actionButtonRenderer",void 0),L([a()],R.prototype,"iconController",void 0),L([a()],R.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),L([a()],R.prototype,"actionButtonClickEventEmitter",void 0),R.style=':host{display:block;width:100%;padding:24px;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));box-sizing:border-box;box-shadow:var(--v-shadow-card, 0px 2px 8px 0px rgba(0, 0, 0, 0.04), 0px 2px 4px 0px rgba(0, 0, 0, 0.02));border-radius:12px;color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host .banner-prefix-icon{padding-top:4px}:host .banner-prefix-icon vega-icon{display:block}:host .banner-content-container{width:100%}:host .banner-content-container .banner-title{display:block;padding-top:2px}:host .banner-content-container .banner-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}:host .banner-content-container .banner-content>vega-font:last-child{padding-top:6px}:host .banner-content-container.linear{display:flex;justify-content:space-between}:host .banner-content-container.linear .banner-content{flex-grow:1}:host .banner-buttons{text-align:right;text-wrap:nowrap;flex:auto}:host .banner-buttons vega-button{margin-left:16px}:host .banner-buttons vega-button::part(button){padding-top:4px;padding-bottom:4px}:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-black, 32, 54, 69, 1));background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border:2px solid rgba(var(--v-border-notification-btn-black, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host .banner-buttons vega-button::part(button):focus-visible{outline:2px solid;outline-offset:2px;box-shadow:0 0 0}:host .banner-close-button{padding:4px;padding-top:8px}:host .banner-close-button:focus-visible{outline:2px solid;outline-offset:0px}:host .banner-close-button vega-icon{cursor:pointer;display:block}:host(.banner-mobile){padding:16px}:host(.banner-mobile) .banner-content-container .banner-title{padding-top:0px}:host(.banner-mobile) .banner-content-container .banner-content{padding-top:2px;gap:16px}:host(.banner-mobile) .banner-content-container .banner-content>vega-font:last-child{padding-top:0px}:host(.banner-mobile) .banner-buttons vega-button{margin-left:8px;margin-top:16px}:host(.banner-mobile) .banner-close-button{padding:2px;padding-top:4px}:host(.banner-success){background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.banner-error){background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host(.banner-error) .banner-buttons vega-button::part(button),:host(.banner-error) .banner-buttons vega-button::part(button):hover{color:rgba(var(--v-text-primary, 32, 54, 69, 1));border:2px solid rgba(var(--v-border-notification-btn, 32, 54, 69, 1))}:host(.banner-error) .banner-buttons vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-notification-btn, 32, 54, 69, 1));outline-offset:2px}:host(.banner-error) .banner-close-button:focus-visible{outline:2px solid rgba(var(--v-border-color-notification-btn, 32, 54, 69, 1));outline-offset:0px}:host(.banner-info){background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1))}:host(.banner-warning){background-color:rgba(var(--v-bg-status-warning, 255, 220, 131, 1))}:host(.banner-no-title) .banner-prefix-icon{padding-top:2px}:host(.banner-no-title) .banner-close-button{padding-top:6px}:host(.banner-no-title) .banner-content-container .banner-content>vega-font:last-child{padding-top:0px}@media (min-width: 768px){:host(.banner-no-title) .banner-prefix-icon{padding-top:0px}:host(.banner-no-title) .banner-close-button{padding-top:3px}}:host(.banner-no-title.banner-mobile) .banner-prefix-icon{padding-top:2px}:host(.banner-no-title.banner-mobile) .banner-close-button{padding-top:2px}:host(.banner-no-title.banner-mobile) .banner-content-container .banner-content{padding-top:0px}@media (min-width: 768px){:host(.banner-no-title.banner-mobile) .banner-prefix-icon{padding-top:1px}:host(.banner-no-title.banner-mobile) .banner-close-button{padding-top:3px}}:host(.banner-hidden){display:none}';export{R as vega_banner}
1
+ import{h as t,H as n,r as e,c as o,g as r}from"./p-6b2342e0.js";import{c as i,V as s,I as a}from"./p-6e1ab235.js";import{V as c,I as b}from"./p-8ce9e214.js";import{s as l}from"./p-519a7d55.js";import{c as p}from"./p-3a620268.js";import{g as h,D as d,a as f}from"./p-528748fa.js";import{V as g}from"./p-6031bed1.js";import{D as u}from"./p-526e3634.js";import{a as v,h as m,i as x}from"./p-cb4033ef.js";import{F as w}from"./p-bc73ce30.js";import{c as y}from"./p-ef44d516.js";import"./p-ffdc25ec.js";import"./p-afcd8f04.js";import"./p-6a334573.js";import"./p-8b5d3a52.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-982747ef.js";import"./p-53ed3b1f.js";import"./p-b75ee3ba.js";var C=function(t,n,e,o){var r,i=arguments.length,s=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(n,e,s):r(n,e))||s);return i>3&&s&&Object.defineProperty(n,e,s),s};class j extends s{constructor(){super(...arguments),this.isMobileDevice=h()===d.MOBILE,this.space=this.isMobileDevice?"size-16":"size-24",this.handleCloseButtonClick=()=>{const t=this.closeEventEmitter.emit();t&&!t.defaultPrevented&&this.host.remove()}}render(){const e=[`banner-${this.type}`,this.isMobileDevice&&"banner-mobile",!this.isOpen&&"banner-hidden",!this.bannerTitle&&"banner-no-title"].filter(Boolean);return t(n,{class:f(e),padding:this.space},t("vega-flex",{direction:"row",gap:this.isMobileDevice?"size-8":"size-16",justifyContent:"space-between",alignItems:"start"},this.renderPrefixIcon(),this.renderBannerContent(),this.renderCloseButton()),this.isMobileDevice?this.actionButtonRenderer.render():null)}renderBannerContent(){const n=this.hasContentSlot();return t("div",{class:{"banner-content-container":!0,linear:!(this.isMobileDevice||(this.content||n)&&this.bannerTitle)}},this.renderBannerTitle(),t("div",{class:"banner-content"},n?t("slot",{name:"content"}):t("vega-font",{variant:this.isMobileDevice?"font-footnote1-long":"font-p2-short",color:"error"===this.type?"text-primary":"text-black"},this.content),this.isMobileDevice?null:this.actionButtonRenderer.render()))}hasContentSlot(){return null!==this.host.querySelector('[slot="content"]')}renderBannerTitle(){if(this.bannerTitle)return t("vega-font",{class:"banner-title",variant:this.isMobileDevice?"font-h6":"font-h5",color:"error"===this.type?"text-primary":"text-black"},this.bannerTitle)}renderCloseButton(){if(this.showCloseButton)return t("div",{class:"banner-close-button","aria-label":"Close Button",role:"button",tabIndex:0,onClick:this.handleCloseButtonClick,onKeyDown:p()},t("vega-icon",{size:this.isMobileDevice?"size-12":"size-16",icon:this.iconController.getCloseIcon()}))}renderPrefixIcon(){return t("div",{class:"banner-prefix-icon"},t("vega-icon",{size:this.space,icon:this.iconController.getIconByType()}))}}C([i()],j.prototype,"host",void 0),C([i()],j.prototype,"type",void 0),C([i()],j.prototype,"bannerTitle",void 0),C([i()],j.prototype,"content",void 0),C([i()],j.prototype,"showCloseButton",void 0),C([i()],j.prototype,"actionButtons",void 0),C([i()],j.prototype,"actionButtonRenderer",void 0),C([i()],j.prototype,"iconController",void 0),C([i()],j.prototype,"isOpen",void 0),C([i()],j.prototype,"closeEventEmitter",void 0);var z;!function(t){t.warning="triangle-exclamation",t.success="circle-check",t.error="circle-question",t.info="circle-info"}(z||(z={}));class k extends s{getIconByType(){return g.getIconKey(z[this.type])}getCloseIcon(){return g.getIconKey("xmark-large")}}g.register({"triangle-exclamation":{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="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/></svg>'},"circle-check":{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="M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>'},"circle-question":{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="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"/></svg>'},"circle-info":{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="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>'},"xmark-large":{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="M393.4 41.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L269.3 256 438.6 425.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 301.3 54.6 470.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L178.7 256 9.4 86.6C-3.1 74.1-3.1 53.9 9.4 41.4s32.8-12.5 45.3 0L224 210.7 393.4 41.4z"/></svg>'}}),function(t,n,e,o){var r,i=arguments.length,s=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(n,e,s):r(n,e))||s);i>3&&s&&Object.defineProperty(n,e,s)}([i()],k.prototype,"type",void 0);var B=function(t,n,e,o){var r,i=arguments.length,s=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(n,e,s):r(n,e))||s);return i>3&&s&&Object.defineProperty(n,e,s),s};class I extends s{render(){var n;if((null===(n=this.actionButtons)||void 0===n?void 0:n.length)>0)return t("div",{class:"banner-buttons"},this.actionButtons.map(((t,n)=>this.renderButtonItem(t,`${t.label}${n}`))))}renderButtonItem(n,e){return t("vega-button",{key:e,size:"small",variant:"secondary",ref:t=>{u.addUniqueObserverToNode(t,v,(()=>{w.isEnabled("VEGA_BANNER_DEPRECATED_ACTION_BUTTON_PROP_VEGA_CLICK")||"function"!=typeof n.vegaClick||n.vegaClick(n),this.actionButtonClickEventEmitter.emit(n)}))}},n.label)}}B([i()],I.prototype,"actionButtons",void 0),B([i()],I.prototype,"actionButtonClickEventEmitter",void 0);var L=function(t,n,e,o){var r,i=arguments.length,s=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(n,e,s):r(n,e))||s);return i>3&&s&&Object.defineProperty(n,e,s),s};const R=class{constructor(t){e(this,t),this.vegaClose=o(this,"vegaClose",7),this.close=o(this,"close",7),this.vegaActionButtonClick=o(this,"vegaActionButtonClick",7),this.actionButtonClick=o(this,"actionButtonClick",7),this.globalSlimmers={},this.closeEventEmitter=y(R,m),this.renderer=new j,this.actionButtonRenderer=new I,this.iconController=new k,this.vegaComponentUsageRuntimeMetricsSlimmer=new c,this.actionButtonClickEventEmitter=y(R,x),this.type="info",this.bannerTitle="",this.content="",this.actionButtons=null,this.showCloseButton=!0,this.isOpen=!0}async doClose(){this.host.remove(),this.closeEventEmitter.emit()}render(){return l(this.renderer.render(),this.host)}get host(){return r(this)}};L([b()],R.prototype,"globalSlimmers",void 0),L([a()],R.prototype,"closeEventEmitter",void 0),L([a()],R.prototype,"renderer",void 0),L([a()],R.prototype,"actionButtonRenderer",void 0),L([a()],R.prototype,"iconController",void 0),L([a()],R.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),L([a()],R.prototype,"actionButtonClickEventEmitter",void 0),R.style=':host{display:block;width:100%;padding:24px;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));box-sizing:border-box;box-shadow:var(--v-shadow-card, 0px 2px 8px 0px rgba(0, 0, 0, 0.04), 0px 2px 4px 0px rgba(0, 0, 0, 0.02));border-radius:12px;color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host .banner-prefix-icon{padding-top:4px}:host .banner-prefix-icon vega-icon{display:block}:host .banner-content-container{width:100%}:host .banner-content-container .banner-title{display:block;padding-top:2px}:host .banner-content-container .banner-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}:host .banner-content-container .banner-content>vega-font:last-child{padding-top:6px}:host .banner-content-container.linear{display:flex;justify-content:space-between}:host .banner-content-container.linear .banner-content{flex-grow:1}:host .banner-buttons{text-align:right;text-wrap:nowrap;flex:auto}:host .banner-buttons vega-button{margin-left:16px}:host .banner-buttons vega-button::part(button){padding-top:4px;padding-bottom:4px}:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-black, 32, 54, 69, 1));background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border:2px solid rgba(var(--v-border-notification-btn-black, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host .banner-buttons vega-button::part(button):focus-visible{outline:2px solid;outline-offset:2px;box-shadow:0 0 0}:host .banner-close-button{padding:4px;padding-top:8px}:host .banner-close-button:focus-visible{outline:2px solid;outline-offset:0px}:host .banner-close-button vega-icon{cursor:pointer;display:block}:host(.banner-mobile){padding:16px}:host(.banner-mobile) .banner-content-container .banner-title{padding-top:0px}:host(.banner-mobile) .banner-content-container .banner-content{padding-top:2px;gap:16px}:host(.banner-mobile) .banner-content-container .banner-content>vega-font:last-child{padding-top:0px}:host(.banner-mobile) .banner-buttons vega-button{margin-left:8px;margin-top:16px}:host(.banner-mobile) .banner-close-button{padding:2px;padding-top:4px}:host(.banner-success){background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.banner-error){background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host(.banner-error) .banner-buttons vega-button::part(button),:host(.banner-error) .banner-buttons vega-button::part(button):hover{color:rgba(var(--v-text-primary, 32, 54, 69, 1));border:2px solid rgba(var(--v-border-notification-btn, 32, 54, 69, 1))}:host(.banner-error) .banner-buttons vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-notification-btn, 32, 54, 69, 1));outline-offset:2px}:host(.banner-error) .banner-close-button:focus-visible{outline:2px solid rgba(var(--v-border-color-notification-btn, 32, 54, 69, 1));outline-offset:0px}:host(.banner-info){background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1))}:host(.banner-warning){background-color:rgba(var(--v-bg-status-warning, 255, 220, 131, 1))}:host(.banner-no-title) .banner-prefix-icon{padding-top:2px}:host(.banner-no-title) .banner-close-button{padding-top:6px}:host(.banner-no-title) .banner-content-container .banner-content>vega-font:last-child{padding-top:0px}@media (min-width: 768px){:host(.banner-no-title) .banner-prefix-icon{padding-top:0px}:host(.banner-no-title) .banner-close-button{padding-top:3px}}:host(.banner-no-title.banner-mobile) .banner-prefix-icon{padding-top:2px}:host(.banner-no-title.banner-mobile) .banner-close-button{padding-top:2px}:host(.banner-no-title.banner-mobile) .banner-content-container .banner-content{padding-top:0px}@media (min-width: 768px){:host(.banner-no-title.banner-mobile) .banner-prefix-icon{padding-top:1px}:host(.banner-no-title.banner-mobile) .banner-close-button{padding-top:3px}}:host(.banner-hidden){display:none}';export{R as vega_banner}
@@ -1 +1 @@
1
- import{r as t,h as e,g as s,H as r}from"./p-6b2342e0.js";import{I as n,s as o,B as i,p as a,a as c,L as h,P as d,b as u,c as p}from"./p-e4917e76.js";import{s as l}from"./p-519a7d55.js";import{I as m}from"./p-6e1ab235.js";import{V as f,I as v}from"./p-8ce9e214.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-d884c644.js";import"./p-0c667d6a.js";class w extends n{constructor(){super(...arguments),this.eventType="mouseover"}createShouldHandle(){return this.shouldHandle}createHandle(){return this.handle}shouldHandle(t){return t.target.classList.contains("vega-chart-arc-path")}handle(t){const e=o(t.currentTarget),s=t.target,r=s.dataset.name;e.selectAll(".vega-chart-arc-path").each((function(){const t=this;if(t!==s&&t.classList.contains("hover")){t.classList.remove("hover");const e=t.getAttribute("d"),s=t.dataset.d;t.dataset.d=e,o(this).transition(100).duration(100).attr("d",s)}else if(!s.classList.contains("hover")){s.classList.add("hover");const t=s.getAttribute("d"),n=s.dataset.d;s.dataset.d=t,o(s).transition(100).duration(100).attr("d",n),e.select(".vega-chart-draw-g text").text(r)}}))}}class j extends i{constructor(){super(...arguments),this.arcPathHoverEntryGenerator=new w}addInteractionSupport(t){this.interactor.register(this,t,this.arcPathHoverEntryGenerator.generate())}draw(){const{data:t,colors:e,donutRadius:s,outerRadius:r,center:n}=this.options.renderOptions;return t.map(((t,o)=>{const i=this.getColorFromToken(this.getColorByIndex(o,e));return this.renderer.drawArcPath(n,t,i,r,s)}))}}class g extends i{addInteractionSupport(){}draw(){this.options.renderOptions.forEach((t=>{const{position:e,text:s,styleToken:r,textAnchor:n,rotate:o}=t;this.renderer.drawText(e,s,this.getStyleTextFromToken(r),n,o)}))}}class b{process(t,e){const{dataSource:s,colors:r}=t,{radius:n,innerRadius:o,center:i}=e;return{data:a().value((t=>t.value))(s),colors:r,outerRadius:n,donutRadius:o,center:i}}}class O{process(t){const{center:e}=t;return[{text:"",position:e,textAnchor:"middle",styleToken:"v-font-footnote2-short"}]}}class R{process(t){const e=t.dataSource.filter((t=>!(!t.name||!t.value)));return t.dataSource=e,t}}class x{process(t,e){const{type:s,donutRadius:r}=t,{innerWidth:n,innerHeight:o}=e,i=Math.min(n,o)/2;return{radius:i,innerRadius:("Donut"===s?!r||r<=0?.6:Math.min(r,.9):0)*i,center:{x:n/2,y:o/2}}}}class y extends c{constructor(){super(...arguments),this.layoutInputProcessor=new h,this.filterInputProcessor=new R,this.radiusInputProcessor=new x,this.arcPathInputProcessorChain=new d([this.filterInputProcessor,this.layoutInputProcessor,this.radiusInputProcessor,new b]),this.textInputProcessor=new O,this.legendInputProcessChain=new d([this.layoutInputProcessor,new u])}createDrawerChain(t,e){const s=this.arcPathInputProcessorChain.process(this.options),r=this.legendInputProcessChain.process(this.options);return[new j(t,e,{renderOptions:s}),new g(t,e,{renderOptions:this.textInputProcessor.process(s)}),new p(t,e,{renderOptions:r})]}}var S=function(t,e,s,r){var n,o=arguments.length,i=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,s,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(i=(o<3?n(i):o>3?n(e,s,i):n(e,s))||i);return o>3&&i&&Object.defineProperty(e,s,i),i};const H=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new f}watchOptionsHandel(t){this.updateChart(t)}disconnectedCallback(){this.chart=null,this.reRenderTimer&&clearTimeout(this.reRenderTimer)}componentWillLoad(){this.updateChart(this.options)}async reRender(){this.reRenderTimer&&clearTimeout(this.reRenderTimer),this.reRenderTimer=setTimeout((()=>{this.chart.reRender()}),0)}render(){return l(e(r,null),this.host)}updateChart(t){if(!t)return;const{mode:e="svg",dataSource:s}=t,r=function(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(s[r[n]]=t[r[n]])}return s}(t,["mode","dataSource"]),n=Object.assign(Object.assign({},r),{mode:e,container:this.host,dataSource:s||[]});this.chart?this.chart.updateOptions(n):(this.chart=new y(n),this.chart.render())}get host(){return s(this)}static get watchers(){return{options:["watchOptionsHandel"]}}};S([v()],H.prototype,"globalSlimmers",void 0),S([m()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),H.style=".vega-chart-legend-item{cursor:pointer}.vega-chart-line-path:hover{stroke-width:5}:host{display:block}";export{H as vega_pie_chart}
1
+ import{r as t,h as e,g as s,H as r}from"./p-6b2342e0.js";import{I as n,s as o,B as i,p as a,a as c,L as h,P as d,b as u,c as p}from"./p-7b9ed949.js";import{s as l}from"./p-519a7d55.js";import{I as m}from"./p-6e1ab235.js";import{V as f,I as v}from"./p-8ce9e214.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-b438e68b.js";import"./p-0c667d6a.js";class w extends n{constructor(){super(...arguments),this.eventType="mouseover"}createShouldHandle(){return this.shouldHandle}createHandle(){return this.handle}shouldHandle(t){return t.target.classList.contains("vega-chart-arc-path")}handle(t){const e=o(t.currentTarget),s=t.target,r=s.dataset.name;e.selectAll(".vega-chart-arc-path").each((function(){const t=this;if(t!==s&&t.classList.contains("hover")){t.classList.remove("hover");const e=t.getAttribute("d"),s=t.dataset.d;t.dataset.d=e,o(this).transition(100).duration(100).attr("d",s)}else if(!s.classList.contains("hover")){s.classList.add("hover");const t=s.getAttribute("d"),n=s.dataset.d;s.dataset.d=t,o(s).transition(100).duration(100).attr("d",n),e.select(".vega-chart-draw-g text").text(r)}}))}}class b extends i{constructor(){super(...arguments),this.arcPathHoverEntryGenerator=new w}addInteractionSupport(t){this.interactor.register(this,t,this.arcPathHoverEntryGenerator.generate())}draw(){const{data:t,colors:e,donutRadius:s,outerRadius:r,center:n}=this.options.renderOptions;return t.map(((t,o)=>{const i=this.getColorFromToken(this.getColorByIndex(o,e));return this.renderer.drawArcPath(n,t,i,r,s)}))}}class j extends i{addInteractionSupport(){}draw(){this.options.renderOptions.forEach((t=>{const{position:e,text:s,styleToken:r,textAnchor:n,rotate:o}=t;this.renderer.drawText(e,s,this.getStyleTextFromToken(r),n,o)}))}}class g{process(t,e){const{dataSource:s,colors:r}=t,{radius:n,innerRadius:o,center:i}=e;return{data:a().value((t=>t.value))(s),colors:r,outerRadius:n,donutRadius:o,center:i}}}class O{process(t){const{center:e}=t;return[{text:"",position:e,textAnchor:"middle",styleToken:"v-font-footnote2-short"}]}}class R{process(t){const e=t.dataSource.filter((t=>!(!t.name||!t.value)));return t.dataSource=e,t}}class x{process(t,e){const{type:s,donutRadius:r}=t,{innerWidth:n,innerHeight:o}=e,i=Math.min(n,o)/2;return{radius:i,innerRadius:("Donut"===s?!r||r<=0?.6:Math.min(r,.9):0)*i,center:{x:n/2,y:o/2}}}}class y extends c{constructor(){super(...arguments),this.layoutInputProcessor=new h,this.filterInputProcessor=new R,this.radiusInputProcessor=new x,this.arcPathInputProcessorChain=new d([this.filterInputProcessor,this.layoutInputProcessor,this.radiusInputProcessor,new g]),this.textInputProcessor=new O,this.legendInputProcessChain=new d([this.layoutInputProcessor,new u])}createDrawerChain(t,e){const s=this.arcPathInputProcessorChain.process(this.options),r=this.legendInputProcessChain.process(this.options);return[new b(t,e,{renderOptions:s}),new j(t,e,{renderOptions:this.textInputProcessor.process(s)}),new p(t,e,{renderOptions:r})]}}var S=function(t,e,s,r){var n,o=arguments.length,i=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,s,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(i=(o<3?n(i):o>3?n(e,s,i):n(e,s))||i);return o>3&&i&&Object.defineProperty(e,s,i),i};const H=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new f}watchOptionsHandel(t){this.updateChart(t)}disconnectedCallback(){this.chart=null,this.reRenderTimer&&clearTimeout(this.reRenderTimer)}componentWillLoad(){this.updateChart(this.options)}async reRender(){this.reRenderTimer&&clearTimeout(this.reRenderTimer),this.reRenderTimer=setTimeout((()=>{this.chart.reRender()}),0)}render(){return l(e(r,null),this.host)}updateChart(t){if(!t)return;const{mode:e="svg",dataSource:s}=t,r=function(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(s[r[n]]=t[r[n]])}return s}(t,["mode","dataSource"]),n=Object.assign(Object.assign({},r),{mode:e,container:this.host,dataSource:s||[]});this.chart?this.chart.updateOptions(n):(this.chart=new y(n),this.chart.render())}get host(){return s(this)}static get watchers(){return{options:["watchOptionsHandel"]}}};S([v()],H.prototype,"globalSlimmers",void 0),S([m()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),H.style=".vega-chart-legend-item{cursor:pointer}.vega-chart-line-path:hover{stroke-width:5}:host{display:block}";export{H as vega_pie_chart}
@@ -1,3 +1,3 @@
1
- import{d as t,b as e,R as n,e as s,A as r,T as i,t as a,H as o,u as l,i as c,v as h,w as u,x as d,y as w,z as p,I as m,k as f,D as g,g as x,B as T,E as b,a as O,q as y,F as E,l as A,p as k,s as H,G as N,N as j,o as C,J as B,K as v,j as S,L as I,M as R,S as L,O as $,P as D,U as M,Q as P,W as F,X as z,Y as U,Z as V,_ as W,$ as G,a0 as J,a1 as K,r as Y,a2 as X,n as Q,a3 as Z,a4 as _,a5 as q,m as tt,a6 as et,a7 as nt,a8 as st,a9 as rt}from"./p-35d617d5.js";import{g as it}from"./p-8b5d3a52.js";import{i as at}from"./p-b0f55f5f.js";import{C as ot}from"./p-2d0d575f.js";import{d as lt}from"./p-526e3634.js";import{c as ct,d as ht}from"./p-3a93730e.js";import{r as ut,i as dt}from"./p-528748fa.js";import{c as wt}from"./p-a841cf13.js";import{L as pt}from"./p-6e1ab235.js";class mt extends e{constructor(t,e,n){super(t,"list-item",n),this.dtoName=mt.dtoName,this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new mt(t.id,void 0,e);s.children=t.nodes.map((t=>n.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const e=gt.from(t);return e.parent=s,e})));const{annotations:r}=t;return r&&Object.entries(r).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);at(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(t){return[`<li${super.generateAttributeString(t)}>`,this.getChildrenHtml(t),"</li>"].join("")}cloneWithNodes(t){const e=new mt(it());return e.children=[],e.apply(new s(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new mt(it())}clone(t){var e;const n=new mt(this.id);return n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n.nestList=null===(e=this.nestList)||void 0===e?void 0:e.map((t=>t.clone(n))),n.parent=t,n}}r.register(i.name,mt.name,new a),r.register(o.name,mt.name,new l),r.register(c.LINE_BREAK_SINGLE_BLOCK,mt.name,new h),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,mt.name,new u),r.register(c.DELETE_NEST_LIST,mt.name,new class extends t{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),r.register(c.SPLIT_BLOCK_WITH_NODE,mt.name,new d),r.register(c.REPLACE_CHILD_NODES,mt.name,new w),r.register(c.REPLACE_NEST_LIST,mt.name,new class extends t{handleAction(t,e){t.newList.forEach((t=>{t.parent=e})),e.nestList=t.newList}}),r.register(c.MERGE_TWO_BLOCKS_NODES,mt.name,new p),r.register(c.INSERT_IMAGE_TO_BLOCK,mt.name,new class extends t{handleAction(t,e){e.parent.apply(t)}}),mt.dtoName="RTEListItemBlock";class ft extends T{constructor(){super(...arguments),this.type=b.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}renderStyle(t){return(null==t?void 0:t.standalone)?ft.getDefaultStyles():null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new ft}toJSON(){}}class gt extends O{constructor(t,e,n){super(t),this.dtoName=gt.dtoName,this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&this.annotationMap.set(b.LIST,new ft)}static from(t,e={autoMatchFormat:!0}){const n=new gt(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);at(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=mt.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return A.from(e);case"customClass":return E.from(e);case"customStyle":return y.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag();return[`<${e}${super.generateAttributeString(t)}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(t){const e=new gt(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getBlockTag(){return"number-list"===this.type?"ol":"ul"}}r.register(c.TRANSFORM_LIST_BLOCK,gt.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,r=e.parent.createList(t.listType);if(n.every((t=>t.parent===e)))r.apply(new s(e.children)),e.parent.apply(new m(e,r)),e.parent.apply(new f(e)),n.forEach((t=>t.children.map((t=>t.apply(new g)))));else{const n=t.selectedBlocks.map((t=>e.parent.toListItem(t)));r.apply(new s(n)),e.parent.apply(new m(e,r)),t.selectedBlocks.forEach((t=>{t.parent.apply(new f(t))})),0===e.children.length&&e.parent.apply(new f(e))}}}),r.register(c.TRANSFORM_PARAGRAPH_BLOCK,gt.name,new class extends t{handleAction(t,e){let n=!1,r=!1;const i=t.selectedBlocks,a=i.map((t=>(t.children.map((t=>t.apply(new g))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new x(e,...a));else if(r)e.parent.apply(new m(e,...a));else{const t=e.children.indexOf(i[0]),n=e.children.indexOf(i[i.length-1]),r=e.parent.createList(e.type);r.apply(new s(e.children.slice(0,t)));const o=e.parent.createList(e.type);o.apply(new s(e.children.slice(n+1))),e.parent.apply(new x(e,r,...a,o)),e.parent.apply(new f(e))}i.map((t=>{e.apply(new f(t))})),0===e.children.length&&e.parent.apply(new f(e))}toParagraph(t){const n=new e(it(),"paragraph");return n.apply(new s(t.children)),n.annotationMap=t.annotationMap,n}}),r.register(c.INSERT_IMAGE_TO_BLOCK,gt.name,new class extends t{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new m(e,t.imageBlockToBeInserted):t)}}),gt.dtoName="RTEListBlock";class xt{}class Tt{constructor(t,e){this.childrenOutput=[],this.currentStrategy=t,this.currentElements=e}setChildrenOutput(t){this.childrenOutput=t}toDto(t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const e=this.currentStrategy.handle(this.currentElements,t);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto(t))).filter(at)),e}}const bt=new class{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(t){this.hasDuplicateStrategy(t,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(t)}registerElementToNodeStrategy(t){this.hasDuplicateStrategy(t,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(t)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(t,e){return e.includes(t)}},Ot=new class{process(t,e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),s=[];for(let r=0;r<t.length;r++){if(this.isInvalidElement(t[r],e))continue;let i=0;for(const a of n)if(i=a.canHandle(t,r,e),i>0){const n=t.slice(r,r+i),o=new Tt(a,n);1===i&&a.shouldProceedToElementChildren()&&o.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(o),r+=i-1;break}if(0===i&&r<t.length){const n=Array.from(t[r].childNodes),i=this.process(Array.from(n),e);i.length>0&&s.push(...i)}}return s}isInvalidElement(t,e){return t.nodeType===Node.COMMENT_NODE||!1!==e.autoMatchFormat&&["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return bt.getElementToBlockStrategies()}};class yt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class Et extends t{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[...t.childrenToBeInserted,t.referChildren])}replaceElementWithElements(t,e,n){t.children&&(n.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?n:t)))}}class At extends Et{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class kt extends N{constructor(t,e){super(),this.type=j.IMAGE,this.size=t,this.alt=e}static from(t,e){return[j.IMAGE,new kt(t,e)]}static getDefaultStyles(){return{verticalAlign:"bottom"}}toJSON(){return at(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new kt(this.size,this.alt)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e=kt.getDefaultStyles();switch(this.size){case"sm":return Object.assign(Object.assign({},e),{width:"25%"});case"md":return Object.assign(Object.assign({},e),{width:"50%"});case"lg":return Object.assign(Object.assign({},e),{width:"100%"})}}}kt.BASE_STYLES={verticalAlign:"bottom"};class Ht extends C{constructor(t,e,n,s){super(t,s),this.dtoName=Ht.dtoName,this.type=B.IMAGE,this.url=e,this.parent=n}static from(t,e,n={autoMatchFormat:!0}){const s=new Ht(t.id,t.url,e),r=!!n.autoMatchFormat,i=Object.assign({},t.annotations),{size:a}=i,o=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(i,["size"]),l=Object.assign(Object.assign({},o),{size:null!=a?a:r?"md":void 0});return s.annotationMap=new Map(Object.keys(l).map((t=>"size"===t||"alt"===t?kt.from(l.size,l.alt):this.createAnnotationEntity(t,l[t]))).filter(at)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof kt||t instanceof v)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return""==t.alt&&delete t.alt,Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}clone(t){return new Ht(this.id,this.url,t,super.cloneAnnotations())}toHtml(t){const e=this.getAnnotationByType(j.IMAGE);return`<img${super.generateAttributeString(t,...[e&&e.alt?`alt="${e.alt}"`:null,`src="${this.url}"`,e&&e.size?`data-size="${e.size}"`:null].filter(at))}>`}doAnnotationActionApply(t){const e=r.get(S.name,Ht.name);e&&e.execute(t,this)}doModifyActionApply(t){r.executeTheStrategy(t,this)}}r.register(c.UPDATE_IMAGE_NODE_URL,Ht.name,new class extends t{handleAction(t,e){e.url=t.url}}),r.register(S.name,Ht.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}}),Ht.dtoName="RTEImageNode";class Nt extends R{constructor(t,e){super(),this.type=c.INSERT_NEW_PARAGRAPH,this.startContainerNode=t,this.startOffset=e}}class jt extends O{constructor(t){super(t),this.dtoName=jt.dtoName,this.type="image",this.children=[]}static from(t,e={autoMatchFormat:!0}){const n=new jt(t.id),{annotations:s}=t;return n.children=t.nodes.map((t=>Ht.from(t,n,e))),s&&super.convertAnnotationsToMap(n.annotationMap,s),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=super.generateAttributeString(t),n=this.children.map((e=>e.toHtml(t))).join("");return super.shouldRenderAsInternalWrapper()?n:[`<div${e}>`,n,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.url.length>0))}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new jt(it())}clone(t){const e=new jt(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}r.register(c.MERGE_TWO_BLOCKS_NODES,jt.name,new p),r.register(c.REPLACE_CHILD_NODES,jt.name,new w),r.register(c.SPLIT_BLOCK_WITH_NODE,jt.name,new class extends t{handleAction(t,e){t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode,e)}splitImageNodes(t,e,n){const s=n.children.indexOf(t);if(s>-1){const t=n.children.slice(0,s+e),r=n.children.slice(s+e);n.apply(new I(t));const i=this.cloneWithNodes(r,n);return n.parent.apply(new m(n,i)),i}}cloneWithNodes(t,e){const n=e.createNewImageBlock();return n.children=[],n.apply(new s(t)),n}}),r.register(c.LINE_BREAK_SINGLE_BLOCK,jt.name,new class extends t{handleAction(t,e){const n=new Nt(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,jt.name,new class extends t{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,r){const i=e.from({id:it(),type:"paragraph",nodes:[{id:it(),type:"text",text:"\n"}]});r.parent.apply(new m(r,i));const a=this.concatBlocksNodes(t.slice(1));return(0===a.length||a[0]&&""===a[0].text)&&a.push(new n(it(),"\n",i)),i.apply(new s(a)),i.children[0]}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new f(t)))})),e}}),r.register(c.INSERT_IMAGE_TO_BLOCK,jt.name,new class extends t{handleAction(t,e){const n=t.splitPointNode,r=t.startOffsetOfNode,i=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(i.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new m(e,i)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new x(e,i)):(e.apply(new L(n,r)),e.parent.apply(new m(e,i)))}}),r.register(o.name,jt.name,new l),jt.dtoName="RTEImageBlock";class Ct extends O{constructor(t,e){super(t),this.dtoName=Ct.dtoName,this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new Ct(t.id,t.htmlTag),{annotations:s}=t;return s&&super.convertAnnotationsToMap(n.annotationMap,s),n.children=this.generateBlockChildren(t.children,e,n),n}clone(t){const e=new Ct(this.id,this.htmlTag);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return!0}toHtml(t){const e=this.htmlTag,n=super.generateAttributeString(t);return $.has(this.htmlTag)?`<${e}${n}>`:[`<${e}${n}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}Ct.dtoName="RTEHtmlBlock";class Bt extends R{constructor(t){super(),this.type=c.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class vt extends D{handleAction(t,e){const{startContainerNode:n}=t;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(t,e):this.deleteDecoratorNodeContent(t,e);const s=e.parent;s&&e.isListItemBlock()&&0===s.children.length&&s.parent.apply(new f(s))}deleteTextNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;if(0!==s&&!n.isEmpty()){const r=n.text.slice(0,s-1)+n.text.slice(s);if(n.apply(new M(r)),r)return void(t.previousNode=n);{const s=this.getPreviousNode(n);return s&&s.parent===e&&"\n"===s.text||1===e.children.length?void(t.previousNode=n):(e.apply(new f(n)),void(t.previousNode=s))}}{let s=this.getPreviousNode(n),r=null;const i=n.isEmpty();if(e.children.length&&s&&s.parent!==e)i&&e.apply(new f(n)),e.type===s.parent.type&&s.parent.apply(new Bt(e));else if(this.isContentFirstNode(n)&&i&&(r=this.getNextNode(n)),i&&e.apply(new f(n)),s&&s.isTextNode()&&(s.isEmpty()||!s.isContentEditable()&&s.parent===e)){const t=s;s=this.getPreviousNode(s),t.parent.apply(new f(t)),s||i||(r=n)}0===e.children.length&&e.parent.apply(new f(e)),s?t.previousNode=s:r&&(t.nextNode=r)}}deleteDecoratorNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;let r=this.getPreviousNode(n),i=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(i=this.getNextNode(n)),1===t.children.length?t.parent.apply(new f(t)):t.apply(new f(n))}else{const e=r;e&&!e.isContentEditable()&&(r=this.getPreviousNode(e),e.parent.apply(new f(e)),r||(t.nextNode=n))}r?t.previousNode=r:i&&(t.nextNode=i)}}class St extends t{handleAction(t,e){const{startContainerNode:n}=t;t.newBlock=this.breakSingleBlock(n,t.startOffset,e)}breakSingleBlock(t,e,n){const s=this.getNewParagraph(t);if(s){if(this.isCaretPositionAtBlockEnd(n,t,e))n.parent.apply(new m(n,s));else{if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new L(t,e);return n.apply(s),s.newBlock}n.parent.apply(new x(n,s))}return s}}getNewParagraph(t){const e=this.createNewParagraph("");if(e){let n=e.children[0];return t.isTextNode()&&t.isContentEditable()&&(e.children=[],n=t.cloneWithText(""),n.annotationMap.delete(j.LINK),e.apply(new s([n]))),e}}}class It extends R{constructor(t,e,n=!1){super(),this.isFlushable=!0,this.type=c.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=t,this.offset=e,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class Rt extends t{handleAction(t,e){const{rteRange:n,nodeToBeInserted:s}=t,{startNode:r,startOffset:i}=n;if(r){const t=e;if(r.isContentEditable()&&r.isTextNode())if("\n"!==r.text&&r.text&&0!==i){const e=r.text.substring(0,i),n=r.text.substring(i),a=r.cloneWithText(e),o=r.cloneWithText(n),l=[a,s];n&&l.push(o),t.apply(new x(r,...l)),t.apply(new f(r))}else t.apply(new x(r,s));else t.apply(0!==i?new m(r,s):new x(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new It(t))}}class Lt extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,i=this.createNewParagraph(n);if(i){const t=i.children[0];e.apply(0!==s?new m(r,t):new x(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new It(t))}}class $t extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),i=this.copyInlineStyleToNewNode(t);if(r.apply(new s([i])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new L(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new x(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],i=1===n.children.length&&n.children[0].isEmpty();if(n===r&&i){const r=n.parent.parent;if("list-item"!==r.type){const i=e.from({id:it(),type:"paragraph",nodes:[]});return i.apply(new s(t.children)),r.apply(new m(n.parent,i)),n.parent.apply(new f(n)),i}r.parent.apply(new m(r,t)),n.parent.apply(new f(n))}else n.parent.apply(new m(n,t));return t}copyInlineStyleToNewNode(t){const e=t.cloneWithText("");return e.annotationMap.delete(j.LINK),e}}class Dt extends R{constructor(t){super(),this.type=c.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class Mt extends P{handleAction(t,e){super.handleAction(t,e);const n=e.parent;0===e.children.length&&n&&n.apply("list-item"===n.type?new Dt(e):new f(e))}}class Pt extends t{handleAction(t,e){if(e.parent){const{blocksToBeInserted:n,startNode:s,startOffset:r}=t;let i=e;if(s===e.children[0]&&0===r)e.parent.apply(new x(e,...n));else{const t=new L(s,r);e.apply(t),e.parent.apply(new m(e,...n)),i=t.newBlock}t.futureFocusBlock=i}}}const Ft=new class{registerBlockBasicStrategies(t){r.register(c.DELETE_CHILDREN,t,t===gt.name?new Mt:new P),r.register(c.APPEND_CHILDREN,t,new yt),r.register(c.INSERT_CHILDREN_BEFORE,t,new Et),r.register(c.INSERT_CHILDREN_AFTER,t,new At),r.register(c.DELETE_BLOCK_CONTENT,t,new vt),r.register(c.INSERT_NEW_PARAGRAPH,t,t===mt.name?new $t:new St),r.register(c.INSERT_TEXT_TO_DECORATOR_NODE,t,new Lt),r.register(c.INSERT_NODE_TO_NEAREST_ROOT,t,new Rt),r.register(c.PASTE_CONTENT,t,new Pt)}};class zt{}class Ut extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isBold(t)||e.bold?{bold:!0}:{}}isBold(t){return"STRONG"===t.nodeName||"B"===t.nodeName||t.style.fontWeight===F||t.style.fontWeight===z||t.classList.contains("v-rte--bold")}}class Vt extends zt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getAttributes(t);return Object.keys(e).length>0?{customAttribute:e}:{}}getAttributes(t){return t.getAttributeNames().filter((t=>"style"!==t&&"class"!==t&&this.isValidAttr(t))).reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{})}isValidAttr(t){return/^[a-zA-Z_][\w-]*$/.test(t)}}class Wt extends zt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getCustomClass(t);return e.length>0?{customClass:e}:{}}getCustomClass(t){return t.classList.toString().split(" ").filter((t=>!t.includes("v-rte")&&""!==t))}}class Gt extends zt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=U(t);return Object.keys(e).length>0?{customStyle:e}:{}}}class Jt extends zt{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.dtoName)}handle(t){const e=this.getIndent(t);return e?{indent:e}:{}}getIndent(t){const e=t.style;let n;if(e.marginLeft)n=e.marginLeft;else{if(!e.margin)return null;{const t=e.margin.split(" ");switch(t.length){case 4:n=t[3];break;case 2:case 3:n=t[1];break;default:n=t[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}}class Kt extends zt{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.dtoName)}handle(t){const e=this.getTextAlign(t);return e?{textAlign:e}:{}}getTextAlign(t){const e=t.classList;if(e.contains("v-rte--horizontal-alignment-left"))return"left";if(e.contains("v-rte--horizontal-alignment-center"))return"center";if(e.contains("v-rte--horizontal-alignment-right"))return"right";if(e.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(t.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class Yt extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isCode(t)||e.code?{code:!0}:{}}isCode(t){return t.classList.contains("v-rte--code")||"CODE"===t.nodeName||"PRE"===t.nodeName||"monospace"===t.style.fontFamily||"Roboto Mono"===t.style.fontFamily.replace(/["']/g,"")}}class Xt extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){const n=this.getColor(t)||e.textColor;return n?{textColor:n}:{}}getColor(t){var e;const n=null===(e=ut(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=V.filter((t=>t.key!==W.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of V)if(t.style.color.includes(e.key))return e.key;return null}}class Qt extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||t.style.fontStyle===G||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class Zt extends zt{canHandle(t,e){return!!e.autoMatchFormat&&"RTETextBlock"===t.dtoName}handle(t){const e=this.getTextStyle(t);return e?{textStyle:e}:{}}getTextStyle(t){const e=this.getElementTypeByDataType(t);if(e)return e;const n=this.getElementTypeByNodeName(t);if(n)return n;const s=this.getElementTypeByFontSize(t);if(s)return s;return this.getElementTypeByClassName(t)||null}getElementTypeByDataType(t){return t.nodeType!==Node.TEXT_NODE&&t.hasAttribute("data-type")?t.getAttribute("data-type"):null}getElementTypeByFontSize(t){var e;switch(null===(e=t.style)||void 0===e?void 0:e.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(t){switch(t.nodeName){case"P":return"paragraph";case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(t){if(t.className){const e=/\bv-rte-(?:-text-style-)?(title|subtitle|heading-1|heading-2|heading-3|heading-4|heading-5|heading-6|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class _t{static isTitleOrSubtitle(t){if("DIV"===t.nodeName){const e=_t.textStyleHandler.getTextStyle(t);return"title"===e||"subtitle"===e}return!1}static isLinkElement(t){return"A"===t.nodeName}}_t.textStyleHandler=new Zt;class qt extends zt{constructor(){super(...arguments),this.handlers=[new Vt,new Wt,new Gt]}canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return e.link?{link:e.link}:_t.isLinkElement(t)?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:it()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class te extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes(J)||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class ee extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes(K)||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class ne extends zt{canHandle(t){return"RTEImageNode"===t.dtoName}handle(t){const e=this.getImageSize(t);return e?{size:e}:{}}getImageSize(t){return t.getAttribute("data-size")?t.getAttribute("data-size"):null}}class se extends zt{canHandle(t){return"RTEImageNode"===t.dtoName}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}const re=new Set(["P","H1","H2","H3","H4","H5","H6","LI"]),ie=new Set(["P","H1","H2","H3","H4","H5","H6","LI","UL","OL","IMG","CODE"]),ae=new Set(["BR","VEGA-RICH-TEXT-LINK-EDITOR","CODE","A"]),oe=new Set(["TABLE","THEAD","TBODY","TFOOT","TR","DL"]),le=new Set(["ABBR","B","BDI","BDO","CITE","DEL","DFN","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SAMP","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR"]);function ce(t){return re.has(t.parentElement.nodeName)}class he extends zt{constructor(){super(...arguments),this.customAttributeHandler=new Vt,this.customStyleAnnotationHandler=new Gt,this.customClassAnnotationHandler=new Wt}canHandle(t,e){return"RTETextNode"===t.dtoName&&!1===e.autoMatchFormat}handle(t,e){if(ie.has(t.nodeName)&&!ae.has(t.nodeName))return{};const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));return n?{inlineHtml:n}:{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;const r=Array.from(t.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE));if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||r){const e=Object.assign(Object.assign({htmlTag:t.nodeName.toLowerCase()},r?{groupId:it()}:{}),{customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass});s=s?this.appendToInlineHtmlChain(s,e,t.parentNode):e}return s?Object.assign({},s):null}appendToInlineHtmlChain(t,e,n){return t.child&&n&&t.child.htmlTag===n.nodeName.toLowerCase()?Object.assign(Object.assign({},t),{child:this.appendToInlineHtmlChain(t.child,e,n)}):Object.assign(Object.assign({},t),{child:e})}}const ue=new class{constructor(){this.handlers=[new Kt,new Jt,new Ut,new Qt,new ee,new te,new Xt,new qt,new Yt,new ne,new se,new Vt,new Wt,new Gt,new Zt,new he]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){n&&n.filterInlineStyles&&Y.executeTheStrategyRefillAction(t.dtoName,e);const s=_t.isLinkElement(e)&&"RTETextNode"===t.dtoName,r=this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof qt)).filter((r=>e.nodeType!==Node.TEXT_NODE&&r.canHandle(t,{skipCustomAnnotations:n.skipCustomAnnotations||s,autoMatchFormat:n.autoMatchFormat}))).reduce(((t,s)=>{const r=s.handle(e,n.parentAnnotations);return Object.assign(Object.assign({},t),r)}),{});this.removeTextStyleDefaultsFromCustomStyle(r);const i=Y.getStrategies(t.dtoName);for(const t of i)(n.autoMatchFormat||t.alwaysFilter)&&t.filterAnnotations(r);return r}removeTextStyleDefaultsFromCustomStyle(t){const e="textStyle"in t?t.textStyle:void 0,n=t.customStyle;if(!e||!n)return t;const s=X.getDefaultStyles(e);if(!s)return t;for(const t of Object.keys(s))n[t]===s[t]&&delete n[t];return 0===Object.keys(n).length&&delete t.customStyle,t}};class de extends xt{constructor(){super(...arguments),this.annotationHandler=new Zt}generateChildNodes(t,e,s){const r=[],i=!(!s||!1!==s.autoMatchFormat),a=Object.assign({},e);return t.forEach((t=>{const o=bt.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let l=null;if(o&&(l=o.handle([t],s,a)),l)r.push(l);else if(dt(t)&&t.childNodes.length>0){const o=ue.generate(n,t,Object.assign({parentAnnotations:i?{inlineHtml:a.inlineHtml,link:a.link,code:a.code}:e},s));r.push(...this.generateChildNodes(Array.from(t.childNodes),o,s))}})),r}matchTextBlockType(t){var e;return null!==(e=this.annotationHandler.handle(t).textStyle)&&void 0!==e?e:"paragraph"}}class we extends de{canHandle(t,e){return"PRE"!==t[e].tagName&&"CODE"!==t[e].tagName||!t[e].hasAttribute("data-language")?0:1}handle(t){const e=t[0];if(e){const t=e.textContent,n=e.dataset.language;return k.from({id:it(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class pe extends de{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return jt.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:t.src,annotations:ue.generate(Ht,t,e)}],annotations:Object.assign(Object.assign({},ue.generate(jt,t.parentElement,e)),{internalWrapper:n})},e)}}class me extends xt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:it(),type:"text",text:t,annotations:e}}}class fe extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const{textAlign:e,customStyle:n}=t;return e&&n?(this.stylesToBeFiltered=_.getDefaultStyles(e),super.filterAnnotations(t)):t}}class ge extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.type="paragraph",this.elementTagName="p"}filterAnnotations(t){return t}canFilter(t){return Z.isTextBlock(t.dtoName)&&t.type===this.type}canRefill(t,e){const n=this.classNameToBeAdded?`.${this.classNameToBeAdded}`:this.elementTagName;return Z.isTextBlock(t)&&e.matches(n)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}class xe extends ge{constructor(t){super(),this.type="heading-1",this.elementTagName="h1",this.type=`heading-${t}`,this.elementTagName=`h${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class Te extends ge{constructor(t){super(),this.type="title",this.elementTagName="div",this.classNameToBeAdded="v-rte-title",this.type=t,this.classNameToBeAdded=`v-rte-${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class be extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=be.BOLD_STYLES,this.elementTagName="span",this.parentBlockTypes=["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title"],this.parentElementSelectors=["h1","h2","h3","h4","h5","h6",".v-rte-title"],this.toBeCheckedSelector=this.parentElementSelectors.join(",")}filterAnnotations(t){return t}canFilter(t){return Z.isTextNode(t.dtoName)&&this.parentBlockIsHeadingOrTitle(t)}canRefill(t,e){return Z.isTextNode(t)&&"SPAN"===e.nodeName&&this.isHeadingOrTitleChild(e)}toCssText(){return`${this.parentElementSelectors.map((t=>`.${be.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t}`)).join(",")} { ${this.convertStylesMapToCssText()} }`}parentBlockIsHeadingOrTitle(t){const e=t.parent;return!!e&&this.parentBlockTypes.includes(e.type)}isHeadingOrTitleChild(t){let e=t.parentElement;for(;e;){if(e.matches(this.toBeCheckedSelector))return!0;if(be.NON_HEADING_TITLE_ELEMENT_TAGS.includes(e.tagName))return!1;e=e.parentElement}return!1}}be.BOLD_STYLES={fontWeight:"700"},be.NON_HEADING_TITLE_ELEMENT_TAGS=["TD","TH","TR","TABLE","THEAD","TBODY","DIV","BODY"];class Oe extends xe{constructor(t){super(t),this.classNameToBeAdded=`v-rte-h${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.dtoName)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}class ye extends Te{constructor(t){super(t),this.classNameToBeAdded=`v-rte-${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.dtoName)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}tt.registerRTEDTOClass("paragraph",e),tt.registerRTEDTOClass("title",e),tt.registerRTEDTOClass("subtitle",e),tt.registerRTEDTOClass("heading-1",e),tt.registerRTEDTOClass("heading-2",e),tt.registerRTEDTOClass("heading-3",e),tt.registerRTEDTOClass("heading-4",e),tt.registerRTEDTOClass("heading-5",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("list-item",mt),tt.registerRTEDTOClass("bullet-list",gt),tt.registerRTEDTOClass("number-list",gt),tt.registerRTEDTOClass("image",jt),tt.registerRTEDTOClass("code-block",k),tt.registerRTEDTOClass("html-block",Ct),tt.registerRTEDTOClass("text",n),tt.registerRTEDTOClass("image",Ht),Ft.registerBlockBasicStrategies(e.name),Ft.registerBlockBasicStrategies(gt.name),Ft.registerBlockBasicStrategies(mt.name),Ft.registerBlockBasicStrategies(jt.name),Ft.registerBlockBasicStrategies(Ct.name),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e,n){let s=0;for(let r=e;r<t.length&&this.isInlineCandidate(t[r],n);r++)s++;return s}handle(t,s){const r=t[0].parentElement,i=s&&s.autoMatchFormat,a=this.generateChildNodes(t,i?ue.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),o=i?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),l=!i&&!o;return e.from(Object.assign({id:it(),type:o||"paragraph",nodes:a},l?{annotations:{internalWrapper:l}}:{annotations:ue.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}isInlineCandidate(t,e){return t.nodeType===Node.TEXT_NODE||!!ae.has(t.nodeName)||!this.isDedicatedBlockTag(t.nodeName)&&(!(!1!==e.autoMatchFormat||!ce(t))||this.isInlineLeafOrWrapper(t))}isDedicatedBlockTag(t){return ie.has(t)&&!ae.has(t)}isInlineLeafOrWrapper(t){return 0===t.childNodes.length?le.has(t.nodeName):this.isTextOnlyElement(t)?le.has(t.nodeName)||ae.has(t.nodeName):this.hasOnlyInlineDescendants(t)}isTextOnlyElement(t){const e=Array.from(t.childNodes);return!e.some((t=>t.nodeType===Node.ELEMENT_NODE))&&e.some((t=>t.nodeType===Node.TEXT_NODE))}hasOnlyInlineDescendants(t){for(let e=0;e<t.children.length;e++){const n=t.children[e];if(this.isDedicatedBlockTag(n.nodeName))return!1;if(!n.hasChildNodes())return!1;if(!this.hasOnlyInlineDescendants(n))return!1}return!0}}),bt.registerElementToBlockStrategy(new class extends pe{canHandle(t,e){const n=t[e];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(t,e){const n=t[0].querySelector("img");return this.createRTEImageBlock(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends pe{canHandle(t,e){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===t[e].tagName?1:0}handle(t,e){const n=t[0],s=n.querySelector("img");if(at(s))return jt.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:s.src,annotations:ue.generate(Ht,n,e)}],annotations:ue.generate(jt,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends pe{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(t[e]))?1:0}handle(t,n){const s=this.generateChildNodes(Array.from(t[0].childNodes),{},n);return 0===s.length?null:e.from({id:it(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:ue.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){if(!["UL","OL"].includes(t[e].parentElement.nodeName)&&t.some((t=>"LI"===t.nodeName))){let n=0;for(let s=e;s<t.length&&"LI"===t[s].nodeName;s++)n++;return n}return"LI"===t[e].tagName?1:0}handle(t,e){const n=t[0];return["UL","OL"].includes(n.parentElement.nodeName)?mt.from(this.generateListItemBlockDTO(n,e),e):this.generateWithListBlock(t,e)}appendChildBlocks(t,e){t.nestList=e.filter((t=>["bullet-list","number-list"].includes(t.type)))}shouldProceedToElementChildren(){return!0}generateWithListBlock(t,e){return gt.from({id:it(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:it(),type:"list-item",annotations:ue.generate(mt,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),ue.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,i=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),a=at(s)&&["UL","OL"].includes(s.nodeName);return r&&!i&&a?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return mt.from({id:it(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:gt.from({id:it(),type:"number-list",blocks:[],annotations:ue.generate(gt,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof mt)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:gt.from({id:it(),type:"bullet-list",blocks:[],annotations:ue.generate(gt,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof mt)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e,n){const s=t[e];return s.nodeType===Node.TEXT_NODE||this.isInlineTagWithoutBlockChildren(s,n)||ie.has(s.nodeName)&&!this.shouldFallBackToHtmlBlock(s)||n.autoMatchFormat||!this.isCustomHtmlContainer(s)||_t.isTitleOrSubtitle(s)?0:1}handle(t,e){return Ct.from(this.generateHtmlBlock(t[0],e),e)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}isInlineTagWithoutBlockChildren(t,e){if(ae.has(t.nodeName)&&0===t.childNodes.length)return!0;if(ce(t))return!(0===t.childNodes.length&&""===t.textContent&&!ae.has(t.nodeName)&&!le.has(t.nodeName));const n=Array.from(t.childNodes);return!(n.some((t=>t.nodeType===Node.ELEMENT_NODE))||!n.some((t=>t.nodeType===Node.TEXT_NODE)))&&(!1!==e.autoMatchFormat||!oe.has(t.parentElement.nodeName)&&(le.has(t.nodeName)||ae.has(t.nodeName)))}shouldFallBackToHtmlBlock(t){const e=Array.from(t.childNodes);if(0===e.length)return!1;const n=t.parentElement.nodeName;return"UL"!==n&&"OL"!==n&&e.every((t=>t.nodeType===Node.ELEMENT_NODE&&""===t.textContent&&!ae.has(t.nodeName)&&!le.has(t.nodeName)))}isCustomHtmlContainer(t){return"DIV"!==t.nodeName||t.childNodes.length>0&&"IMG"!==t.childNodes[0].nodeName}generateHtmlBlock(t,e){return{id:it(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:ue.generate(Ct,t,e),children:[]}}}),
1
+ import{d as t,b as e,R as n,e as s,A as r,T as i,t as a,H as o,u as l,i as c,v as h,w as u,x as d,y as w,z as p,I as m,k as f,D as g,g as x,B as T,E as b,a as O,q as y,F as E,l as A,p as k,s as H,G as N,N as j,o as C,J as B,K as v,j as S,L as I,M as R,S as L,O as $,P as D,U as M,Q as P,W as F,X as z,Y as U,Z as V,_ as W,$ as G,a0 as J,a1 as K,r as Y,a2 as X,n as Q,a3 as Z,a4 as _,a5 as q,m as tt,a6 as et,a7 as nt,a8 as st,a9 as rt}from"./p-9f608b97.js";import{g as it}from"./p-8b5d3a52.js";import{i as at}from"./p-2b22091e.js";import{C as ot}from"./p-2d0d575f.js";import{d as lt}from"./p-526e3634.js";import{c as ct,d as ht}from"./p-5ffc7cb8.js";import{r as ut,i as dt}from"./p-528748fa.js";import{c as wt}from"./p-a841cf13.js";import{L as pt}from"./p-6e1ab235.js";class mt extends e{constructor(t,e,n){super(t,"list-item",n),this.dtoName=mt.dtoName,this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new mt(t.id,void 0,e);s.children=t.nodes.map((t=>n.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const e=gt.from(t);return e.parent=s,e})));const{annotations:r}=t;return r&&Object.entries(r).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);at(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(t){return[`<li${super.generateAttributeString(t)}>`,this.getChildrenHtml(t),"</li>"].join("")}cloneWithNodes(t){const e=new mt(it());return e.children=[],e.apply(new s(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new mt(it())}clone(t){var e;const n=new mt(this.id);return n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n.nestList=null===(e=this.nestList)||void 0===e?void 0:e.map((t=>t.clone(n))),n.parent=t,n}}r.register(i.name,mt.name,new a),r.register(o.name,mt.name,new l),r.register(c.LINE_BREAK_SINGLE_BLOCK,mt.name,new h),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,mt.name,new u),r.register(c.DELETE_NEST_LIST,mt.name,new class extends t{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),r.register(c.SPLIT_BLOCK_WITH_NODE,mt.name,new d),r.register(c.REPLACE_CHILD_NODES,mt.name,new w),r.register(c.REPLACE_NEST_LIST,mt.name,new class extends t{handleAction(t,e){t.newList.forEach((t=>{t.parent=e})),e.nestList=t.newList}}),r.register(c.MERGE_TWO_BLOCKS_NODES,mt.name,new p),r.register(c.INSERT_IMAGE_TO_BLOCK,mt.name,new class extends t{handleAction(t,e){e.parent.apply(t)}}),mt.dtoName="RTEListItemBlock";class ft extends T{constructor(){super(...arguments),this.type=b.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}renderStyle(t){return(null==t?void 0:t.standalone)?ft.getDefaultStyles():null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new ft}toJSON(){}}class gt extends O{constructor(t,e,n){super(t),this.dtoName=gt.dtoName,this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&this.annotationMap.set(b.LIST,new ft)}static from(t,e={autoMatchFormat:!0}){const n=new gt(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);at(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=mt.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return A.from(e);case"customClass":return E.from(e);case"customStyle":return y.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag();return[`<${e}${super.generateAttributeString(t)}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(t){const e=new gt(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getBlockTag(){return"number-list"===this.type?"ol":"ul"}}r.register(c.TRANSFORM_LIST_BLOCK,gt.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,r=e.parent.createList(t.listType);if(n.every((t=>t.parent===e)))r.apply(new s(e.children)),e.parent.apply(new m(e,r)),e.parent.apply(new f(e)),n.forEach((t=>t.children.map((t=>t.apply(new g)))));else{const n=t.selectedBlocks.map((t=>e.parent.toListItem(t)));r.apply(new s(n)),e.parent.apply(new m(e,r)),t.selectedBlocks.forEach((t=>{t.parent.apply(new f(t))})),0===e.children.length&&e.parent.apply(new f(e))}}}),r.register(c.TRANSFORM_PARAGRAPH_BLOCK,gt.name,new class extends t{handleAction(t,e){let n=!1,r=!1;const i=t.selectedBlocks,a=i.map((t=>(t.children.map((t=>t.apply(new g))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new x(e,...a));else if(r)e.parent.apply(new m(e,...a));else{const t=e.children.indexOf(i[0]),n=e.children.indexOf(i[i.length-1]),r=e.parent.createList(e.type);r.apply(new s(e.children.slice(0,t)));const o=e.parent.createList(e.type);o.apply(new s(e.children.slice(n+1))),e.parent.apply(new x(e,r,...a,o)),e.parent.apply(new f(e))}i.map((t=>{e.apply(new f(t))})),0===e.children.length&&e.parent.apply(new f(e))}toParagraph(t){const n=new e(it(),"paragraph");return n.apply(new s(t.children)),n.annotationMap=t.annotationMap,n}}),r.register(c.INSERT_IMAGE_TO_BLOCK,gt.name,new class extends t{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new m(e,t.imageBlockToBeInserted):t)}}),gt.dtoName="RTEListBlock";class xt{}class Tt{constructor(t,e){this.childrenOutput=[],this.currentStrategy=t,this.currentElements=e}setChildrenOutput(t){this.childrenOutput=t}toDto(t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const e=this.currentStrategy.handle(this.currentElements,t);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto(t))).filter(at)),e}}const bt=new class{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(t){this.hasDuplicateStrategy(t,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(t)}registerElementToNodeStrategy(t){this.hasDuplicateStrategy(t,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(t)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(t,e){return e.includes(t)}},Ot=new class{process(t,e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),s=[];for(let r=0;r<t.length;r++){if(this.isInvalidElement(t[r],e))continue;let i=0;for(const a of n)if(i=a.canHandle(t,r,e),i>0){const n=t.slice(r,r+i),o=new Tt(a,n);1===i&&a.shouldProceedToElementChildren()&&o.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(o),r+=i-1;break}if(0===i&&r<t.length){const n=Array.from(t[r].childNodes),i=this.process(Array.from(n),e);i.length>0&&s.push(...i)}}return s}isInvalidElement(t,e){return t.nodeType===Node.COMMENT_NODE||!1!==e.autoMatchFormat&&["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return bt.getElementToBlockStrategies()}};class yt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class Et extends t{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[...t.childrenToBeInserted,t.referChildren])}replaceElementWithElements(t,e,n){t.children&&(n.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?n:t)))}}class At extends Et{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class kt extends N{constructor(t,e){super(),this.type=j.IMAGE,this.size=t,this.alt=e}static from(t,e){return[j.IMAGE,new kt(t,e)]}static getDefaultStyles(){return{verticalAlign:"bottom"}}toJSON(){return at(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new kt(this.size,this.alt)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e=kt.getDefaultStyles();switch(this.size){case"sm":return Object.assign(Object.assign({},e),{width:"25%"});case"md":return Object.assign(Object.assign({},e),{width:"50%"});case"lg":return Object.assign(Object.assign({},e),{width:"100%"})}}}kt.BASE_STYLES={verticalAlign:"bottom"};class Ht extends C{constructor(t,e,n,s){super(t,s),this.dtoName=Ht.dtoName,this.type=B.IMAGE,this.url=e,this.parent=n}static from(t,e,n={autoMatchFormat:!0}){const s=new Ht(t.id,t.url,e),r=!!n.autoMatchFormat,i=Object.assign({},t.annotations),{size:a}=i,o=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(i,["size"]),l=Object.assign(Object.assign({},o),{size:null!=a?a:r?"md":void 0});return s.annotationMap=new Map(Object.keys(l).map((t=>"size"===t||"alt"===t?kt.from(l.size,l.alt):this.createAnnotationEntity(t,l[t]))).filter(at)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof kt||t instanceof v)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return""==t.alt&&delete t.alt,Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}clone(t){return new Ht(this.id,this.url,t,super.cloneAnnotations())}toHtml(t){const e=this.getAnnotationByType(j.IMAGE);return`<img${super.generateAttributeString(t,...[e&&e.alt?`alt="${e.alt}"`:null,`src="${this.url}"`,e&&e.size?`data-size="${e.size}"`:null].filter(at))}>`}doAnnotationActionApply(t){const e=r.get(S.name,Ht.name);e&&e.execute(t,this)}doModifyActionApply(t){r.executeTheStrategy(t,this)}}r.register(c.UPDATE_IMAGE_NODE_URL,Ht.name,new class extends t{handleAction(t,e){e.url=t.url}}),r.register(S.name,Ht.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}}),Ht.dtoName="RTEImageNode";class Nt extends R{constructor(t,e){super(),this.type=c.INSERT_NEW_PARAGRAPH,this.startContainerNode=t,this.startOffset=e}}class jt extends O{constructor(t){super(t),this.dtoName=jt.dtoName,this.type="image",this.children=[]}static from(t,e={autoMatchFormat:!0}){const n=new jt(t.id),{annotations:s}=t;return n.children=t.nodes.map((t=>Ht.from(t,n,e))),s&&super.convertAnnotationsToMap(n.annotationMap,s),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=super.generateAttributeString(t),n=this.children.map((e=>e.toHtml(t))).join("");return super.shouldRenderAsInternalWrapper()?n:[`<div${e}>`,n,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.url.length>0))}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new jt(it())}clone(t){const e=new jt(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}r.register(c.MERGE_TWO_BLOCKS_NODES,jt.name,new p),r.register(c.REPLACE_CHILD_NODES,jt.name,new w),r.register(c.SPLIT_BLOCK_WITH_NODE,jt.name,new class extends t{handleAction(t,e){t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode,e)}splitImageNodes(t,e,n){const s=n.children.indexOf(t);if(s>-1){const t=n.children.slice(0,s+e),r=n.children.slice(s+e);n.apply(new I(t));const i=this.cloneWithNodes(r,n);return n.parent.apply(new m(n,i)),i}}cloneWithNodes(t,e){const n=e.createNewImageBlock();return n.children=[],n.apply(new s(t)),n}}),r.register(c.LINE_BREAK_SINGLE_BLOCK,jt.name,new class extends t{handleAction(t,e){const n=new Nt(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,jt.name,new class extends t{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,r){const i=e.from({id:it(),type:"paragraph",nodes:[{id:it(),type:"text",text:"\n"}]});r.parent.apply(new m(r,i));const a=this.concatBlocksNodes(t.slice(1));return(0===a.length||a[0]&&""===a[0].text)&&a.push(new n(it(),"\n",i)),i.apply(new s(a)),i.children[0]}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new f(t)))})),e}}),r.register(c.INSERT_IMAGE_TO_BLOCK,jt.name,new class extends t{handleAction(t,e){const n=t.splitPointNode,r=t.startOffsetOfNode,i=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(i.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new m(e,i)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new x(e,i)):(e.apply(new L(n,r)),e.parent.apply(new m(e,i)))}}),r.register(o.name,jt.name,new l),jt.dtoName="RTEImageBlock";class Ct extends O{constructor(t,e){super(t),this.dtoName=Ct.dtoName,this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new Ct(t.id,t.htmlTag),{annotations:s}=t;return s&&super.convertAnnotationsToMap(n.annotationMap,s),n.children=this.generateBlockChildren(t.children,e,n),n}clone(t){const e=new Ct(this.id,this.htmlTag);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return!0}toHtml(t){const e=this.htmlTag,n=super.generateAttributeString(t);return $.has(this.htmlTag)?`<${e}${n}>`:[`<${e}${n}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}Ct.dtoName="RTEHtmlBlock";class Bt extends R{constructor(t){super(),this.type=c.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class vt extends D{handleAction(t,e){const{startContainerNode:n}=t;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(t,e):this.deleteDecoratorNodeContent(t,e);const s=e.parent;s&&e.isListItemBlock()&&0===s.children.length&&s.parent.apply(new f(s))}deleteTextNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;if(0!==s&&!n.isEmpty()){const r=n.text.slice(0,s-1)+n.text.slice(s);if(n.apply(new M(r)),r)return void(t.previousNode=n);{const s=this.getPreviousNode(n);return s&&s.parent===e&&"\n"===s.text||1===e.children.length?void(t.previousNode=n):(e.apply(new f(n)),void(t.previousNode=s))}}{let s=this.getPreviousNode(n),r=null;const i=n.isEmpty();if(e.children.length&&s&&s.parent!==e)i&&e.apply(new f(n)),e.type===s.parent.type&&s.parent.apply(new Bt(e));else if(this.isContentFirstNode(n)&&i&&(r=this.getNextNode(n)),i&&e.apply(new f(n)),s&&s.isTextNode()&&(s.isEmpty()||!s.isContentEditable()&&s.parent===e)){const t=s;s=this.getPreviousNode(s),t.parent.apply(new f(t)),s||i||(r=n)}0===e.children.length&&e.parent.apply(new f(e)),s?t.previousNode=s:r&&(t.nextNode=r)}}deleteDecoratorNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;let r=this.getPreviousNode(n),i=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(i=this.getNextNode(n)),1===t.children.length?t.parent.apply(new f(t)):t.apply(new f(n))}else{const e=r;e&&!e.isContentEditable()&&(r=this.getPreviousNode(e),e.parent.apply(new f(e)),r||(t.nextNode=n))}r?t.previousNode=r:i&&(t.nextNode=i)}}class St extends t{handleAction(t,e){const{startContainerNode:n}=t;t.newBlock=this.breakSingleBlock(n,t.startOffset,e)}breakSingleBlock(t,e,n){const s=this.getNewParagraph(t);if(s){if(this.isCaretPositionAtBlockEnd(n,t,e))n.parent.apply(new m(n,s));else{if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new L(t,e);return n.apply(s),s.newBlock}n.parent.apply(new x(n,s))}return s}}getNewParagraph(t){const e=this.createNewParagraph("");if(e){let n=e.children[0];return t.isTextNode()&&t.isContentEditable()&&(e.children=[],n=t.cloneWithText(""),n.annotationMap.delete(j.LINK),e.apply(new s([n]))),e}}}class It extends R{constructor(t,e,n=!1){super(),this.isFlushable=!0,this.type=c.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=t,this.offset=e,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class Rt extends t{handleAction(t,e){const{rteRange:n,nodeToBeInserted:s}=t,{startNode:r,startOffset:i}=n;if(r){const t=e;if(r.isContentEditable()&&r.isTextNode())if("\n"!==r.text&&r.text&&0!==i){const e=r.text.substring(0,i),n=r.text.substring(i),a=r.cloneWithText(e),o=r.cloneWithText(n),l=[a,s];n&&l.push(o),t.apply(new x(r,...l)),t.apply(new f(r))}else t.apply(new x(r,s));else t.apply(0!==i?new m(r,s):new x(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new It(t))}}class Lt extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,i=this.createNewParagraph(n);if(i){const t=i.children[0];e.apply(0!==s?new m(r,t):new x(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new It(t))}}class $t extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),i=this.copyInlineStyleToNewNode(t);if(r.apply(new s([i])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new L(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new x(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],i=1===n.children.length&&n.children[0].isEmpty();if(n===r&&i){const r=n.parent.parent;if("list-item"!==r.type){const i=e.from({id:it(),type:"paragraph",nodes:[]});return i.apply(new s(t.children)),r.apply(new m(n.parent,i)),n.parent.apply(new f(n)),i}r.parent.apply(new m(r,t)),n.parent.apply(new f(n))}else n.parent.apply(new m(n,t));return t}copyInlineStyleToNewNode(t){const e=t.cloneWithText("");return e.annotationMap.delete(j.LINK),e}}class Dt extends R{constructor(t){super(),this.type=c.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class Mt extends P{handleAction(t,e){super.handleAction(t,e);const n=e.parent;0===e.children.length&&n&&n.apply("list-item"===n.type?new Dt(e):new f(e))}}class Pt extends t{handleAction(t,e){if(e.parent){const{blocksToBeInserted:n,startNode:s,startOffset:r}=t;let i=e;if(s===e.children[0]&&0===r)e.parent.apply(new x(e,...n));else{const t=new L(s,r);e.apply(t),e.parent.apply(new m(e,...n)),i=t.newBlock}t.futureFocusBlock=i}}}const Ft=new class{registerBlockBasicStrategies(t){r.register(c.DELETE_CHILDREN,t,t===gt.name?new Mt:new P),r.register(c.APPEND_CHILDREN,t,new yt),r.register(c.INSERT_CHILDREN_BEFORE,t,new Et),r.register(c.INSERT_CHILDREN_AFTER,t,new At),r.register(c.DELETE_BLOCK_CONTENT,t,new vt),r.register(c.INSERT_NEW_PARAGRAPH,t,t===mt.name?new $t:new St),r.register(c.INSERT_TEXT_TO_DECORATOR_NODE,t,new Lt),r.register(c.INSERT_NODE_TO_NEAREST_ROOT,t,new Rt),r.register(c.PASTE_CONTENT,t,new Pt)}};class zt{}class Ut extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isBold(t)||e.bold?{bold:!0}:{}}isBold(t){return"STRONG"===t.nodeName||"B"===t.nodeName||t.style.fontWeight===F||t.style.fontWeight===z||t.classList.contains("v-rte--bold")}}class Vt extends zt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getAttributes(t);return Object.keys(e).length>0?{customAttribute:e}:{}}getAttributes(t){return t.getAttributeNames().filter((t=>"style"!==t&&"class"!==t&&this.isValidAttr(t))).reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{})}isValidAttr(t){return/^[a-zA-Z_][\w-]*$/.test(t)}}class Wt extends zt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getCustomClass(t);return e.length>0?{customClass:e}:{}}getCustomClass(t){return t.classList.toString().split(" ").filter((t=>!t.includes("v-rte")&&""!==t))}}class Gt extends zt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=U(t);return Object.keys(e).length>0?{customStyle:e}:{}}}class Jt extends zt{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.dtoName)}handle(t){const e=this.getIndent(t);return e?{indent:e}:{}}getIndent(t){const e=t.style;let n;if(e.marginLeft)n=e.marginLeft;else{if(!e.margin)return null;{const t=e.margin.split(" ");switch(t.length){case 4:n=t[3];break;case 2:case 3:n=t[1];break;default:n=t[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}}class Kt extends zt{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.dtoName)}handle(t){const e=this.getTextAlign(t);return e?{textAlign:e}:{}}getTextAlign(t){const e=t.classList;if(e.contains("v-rte--horizontal-alignment-left"))return"left";if(e.contains("v-rte--horizontal-alignment-center"))return"center";if(e.contains("v-rte--horizontal-alignment-right"))return"right";if(e.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(t.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class Yt extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isCode(t)||e.code?{code:!0}:{}}isCode(t){return t.classList.contains("v-rte--code")||"CODE"===t.nodeName||"PRE"===t.nodeName||"monospace"===t.style.fontFamily||"Roboto Mono"===t.style.fontFamily.replace(/["']/g,"")}}class Xt extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){const n=this.getColor(t)||e.textColor;return n?{textColor:n}:{}}getColor(t){var e;const n=null===(e=ut(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=V.filter((t=>t.key!==W.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of V)if(t.style.color.includes(e.key))return e.key;return null}}class Qt extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||t.style.fontStyle===G||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class Zt extends zt{canHandle(t,e){return!!e.autoMatchFormat&&"RTETextBlock"===t.dtoName}handle(t){const e=this.getTextStyle(t);return e?{textStyle:e}:{}}getTextStyle(t){const e=this.getElementTypeByDataType(t);if(e)return e;const n=this.getElementTypeByNodeName(t);if(n)return n;const s=this.getElementTypeByFontSize(t);if(s)return s;return this.getElementTypeByClassName(t)||null}getElementTypeByDataType(t){return t.nodeType!==Node.TEXT_NODE&&t.hasAttribute("data-type")?t.getAttribute("data-type"):null}getElementTypeByFontSize(t){var e;switch(null===(e=t.style)||void 0===e?void 0:e.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(t){switch(t.nodeName){case"P":return"paragraph";case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(t){if(t.className){const e=/\bv-rte-(?:-text-style-)?(title|subtitle|heading-1|heading-2|heading-3|heading-4|heading-5|heading-6|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class _t{static isTitleOrSubtitle(t){if("DIV"===t.nodeName){const e=_t.textStyleHandler.getTextStyle(t);return"title"===e||"subtitle"===e}return!1}static isLinkElement(t){return"A"===t.nodeName}}_t.textStyleHandler=new Zt;class qt extends zt{constructor(){super(...arguments),this.handlers=[new Vt,new Wt,new Gt]}canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return e.link?{link:e.link}:_t.isLinkElement(t)?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:it()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class te extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes(J)||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class ee extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes(K)||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class ne extends zt{canHandle(t){return"RTEImageNode"===t.dtoName}handle(t){const e=this.getImageSize(t);return e?{size:e}:{}}getImageSize(t){return t.getAttribute("data-size")?t.getAttribute("data-size"):null}}class se extends zt{canHandle(t){return"RTEImageNode"===t.dtoName}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}const re=new Set(["P","H1","H2","H3","H4","H5","H6","LI"]),ie=new Set(["P","H1","H2","H3","H4","H5","H6","LI","UL","OL","IMG","CODE"]),ae=new Set(["BR","VEGA-RICH-TEXT-LINK-EDITOR","CODE","A"]),oe=new Set(["TABLE","THEAD","TBODY","TFOOT","TR","DL"]),le=new Set(["ABBR","B","BDI","BDO","CITE","DEL","DFN","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SAMP","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR"]);function ce(t){return re.has(t.parentElement.nodeName)}class he extends zt{constructor(){super(...arguments),this.customAttributeHandler=new Vt,this.customStyleAnnotationHandler=new Gt,this.customClassAnnotationHandler=new Wt}canHandle(t,e){return"RTETextNode"===t.dtoName&&!1===e.autoMatchFormat}handle(t,e){if(ie.has(t.nodeName)&&!ae.has(t.nodeName))return{};const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));return n?{inlineHtml:n}:{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;const r=Array.from(t.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE));if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||r){const e=Object.assign(Object.assign({htmlTag:t.nodeName.toLowerCase()},r?{groupId:it()}:{}),{customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass});s=s?this.appendToInlineHtmlChain(s,e,t.parentNode):e}return s?Object.assign({},s):null}appendToInlineHtmlChain(t,e,n){return t.child&&n&&t.child.htmlTag===n.nodeName.toLowerCase()?Object.assign(Object.assign({},t),{child:this.appendToInlineHtmlChain(t.child,e,n)}):Object.assign(Object.assign({},t),{child:e})}}const ue=new class{constructor(){this.handlers=[new Kt,new Jt,new Ut,new Qt,new ee,new te,new Xt,new qt,new Yt,new ne,new se,new Vt,new Wt,new Gt,new Zt,new he]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){n&&n.filterInlineStyles&&Y.executeTheStrategyRefillAction(t.dtoName,e);const s=_t.isLinkElement(e)&&"RTETextNode"===t.dtoName,r=this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof qt)).filter((r=>e.nodeType!==Node.TEXT_NODE&&r.canHandle(t,{skipCustomAnnotations:n.skipCustomAnnotations||s,autoMatchFormat:n.autoMatchFormat}))).reduce(((t,s)=>{const r=s.handle(e,n.parentAnnotations);return Object.assign(Object.assign({},t),r)}),{});this.removeTextStyleDefaultsFromCustomStyle(r);const i=Y.getStrategies(t.dtoName);for(const t of i)(n.autoMatchFormat||t.alwaysFilter)&&t.filterAnnotations(r);return r}removeTextStyleDefaultsFromCustomStyle(t){const e="textStyle"in t?t.textStyle:void 0,n=t.customStyle;if(!e||!n)return t;const s=X.getDefaultStyles(e);if(!s)return t;for(const t of Object.keys(s))n[t]===s[t]&&delete n[t];return 0===Object.keys(n).length&&delete t.customStyle,t}};class de extends xt{constructor(){super(...arguments),this.annotationHandler=new Zt}generateChildNodes(t,e,s){const r=[],i=!(!s||!1!==s.autoMatchFormat),a=Object.assign({},e);return t.forEach((t=>{const o=bt.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let l=null;if(o&&(l=o.handle([t],s,a)),l)r.push(l);else if(dt(t)&&t.childNodes.length>0){const o=ue.generate(n,t,Object.assign({parentAnnotations:i?{inlineHtml:a.inlineHtml,link:a.link,code:a.code}:e},s));r.push(...this.generateChildNodes(Array.from(t.childNodes),o,s))}})),r}matchTextBlockType(t){var e;return null!==(e=this.annotationHandler.handle(t).textStyle)&&void 0!==e?e:"paragraph"}}class we extends de{canHandle(t,e){return"PRE"!==t[e].tagName&&"CODE"!==t[e].tagName||!t[e].hasAttribute("data-language")?0:1}handle(t){const e=t[0];if(e){const t=e.textContent,n=e.dataset.language;return k.from({id:it(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class pe extends de{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return jt.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:t.src,annotations:ue.generate(Ht,t,e)}],annotations:Object.assign(Object.assign({},ue.generate(jt,t.parentElement,e)),{internalWrapper:n})},e)}}class me extends xt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:it(),type:"text",text:t,annotations:e}}}class fe extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const{textAlign:e,customStyle:n}=t;return e&&n?(this.stylesToBeFiltered=_.getDefaultStyles(e),super.filterAnnotations(t)):t}}class ge extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.type="paragraph",this.elementTagName="p"}filterAnnotations(t){return t}canFilter(t){return Z.isTextBlock(t.dtoName)&&t.type===this.type}canRefill(t,e){const n=this.classNameToBeAdded?`.${this.classNameToBeAdded}`:this.elementTagName;return Z.isTextBlock(t)&&e.matches(n)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}class xe extends ge{constructor(t){super(),this.type="heading-1",this.elementTagName="h1",this.type=`heading-${t}`,this.elementTagName=`h${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class Te extends ge{constructor(t){super(),this.type="title",this.elementTagName="div",this.classNameToBeAdded="v-rte-title",this.type=t,this.classNameToBeAdded=`v-rte-${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class be extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=be.BOLD_STYLES,this.elementTagName="span",this.parentBlockTypes=["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title"],this.parentElementSelectors=["h1","h2","h3","h4","h5","h6",".v-rte-title"],this.toBeCheckedSelector=this.parentElementSelectors.join(",")}filterAnnotations(t){return t}canFilter(t){return Z.isTextNode(t.dtoName)&&this.parentBlockIsHeadingOrTitle(t)}canRefill(t,e){return Z.isTextNode(t)&&"SPAN"===e.nodeName&&this.isHeadingOrTitleChild(e)}toCssText(){return`${this.parentElementSelectors.map((t=>`.${be.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t}`)).join(",")} { ${this.convertStylesMapToCssText()} }`}parentBlockIsHeadingOrTitle(t){const e=t.parent;return!!e&&this.parentBlockTypes.includes(e.type)}isHeadingOrTitleChild(t){let e=t.parentElement;for(;e;){if(e.matches(this.toBeCheckedSelector))return!0;if(be.NON_HEADING_TITLE_ELEMENT_TAGS.includes(e.tagName))return!1;e=e.parentElement}return!1}}be.BOLD_STYLES={fontWeight:"700"},be.NON_HEADING_TITLE_ELEMENT_TAGS=["TD","TH","TR","TABLE","THEAD","TBODY","DIV","BODY"];class Oe extends xe{constructor(t){super(t),this.classNameToBeAdded=`v-rte-h${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.dtoName)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}class ye extends Te{constructor(t){super(t),this.classNameToBeAdded=`v-rte-${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.dtoName)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}tt.registerRTEDTOClass("paragraph",e),tt.registerRTEDTOClass("title",e),tt.registerRTEDTOClass("subtitle",e),tt.registerRTEDTOClass("heading-1",e),tt.registerRTEDTOClass("heading-2",e),tt.registerRTEDTOClass("heading-3",e),tt.registerRTEDTOClass("heading-4",e),tt.registerRTEDTOClass("heading-5",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("list-item",mt),tt.registerRTEDTOClass("bullet-list",gt),tt.registerRTEDTOClass("number-list",gt),tt.registerRTEDTOClass("image",jt),tt.registerRTEDTOClass("code-block",k),tt.registerRTEDTOClass("html-block",Ct),tt.registerRTEDTOClass("text",n),tt.registerRTEDTOClass("image",Ht),Ft.registerBlockBasicStrategies(e.name),Ft.registerBlockBasicStrategies(gt.name),Ft.registerBlockBasicStrategies(mt.name),Ft.registerBlockBasicStrategies(jt.name),Ft.registerBlockBasicStrategies(Ct.name),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e,n){let s=0;for(let r=e;r<t.length&&this.isInlineCandidate(t[r],n);r++)s++;return s}handle(t,s){const r=t[0].parentElement,i=s&&s.autoMatchFormat,a=this.generateChildNodes(t,i?ue.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),o=i?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),l=!i&&!o;return e.from(Object.assign({id:it(),type:o||"paragraph",nodes:a},l?{annotations:{internalWrapper:l}}:{annotations:ue.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}isInlineCandidate(t,e){return t.nodeType===Node.TEXT_NODE||!!ae.has(t.nodeName)||!this.isDedicatedBlockTag(t.nodeName)&&(!(!1!==e.autoMatchFormat||!ce(t))||this.isInlineLeafOrWrapper(t))}isDedicatedBlockTag(t){return ie.has(t)&&!ae.has(t)}isInlineLeafOrWrapper(t){return 0===t.childNodes.length?le.has(t.nodeName):this.isTextOnlyElement(t)?le.has(t.nodeName)||ae.has(t.nodeName):this.hasOnlyInlineDescendants(t)}isTextOnlyElement(t){const e=Array.from(t.childNodes);return!e.some((t=>t.nodeType===Node.ELEMENT_NODE))&&e.some((t=>t.nodeType===Node.TEXT_NODE))}hasOnlyInlineDescendants(t){for(let e=0;e<t.children.length;e++){const n=t.children[e];if(this.isDedicatedBlockTag(n.nodeName))return!1;if(!n.hasChildNodes())return!1;if(!this.hasOnlyInlineDescendants(n))return!1}return!0}}),bt.registerElementToBlockStrategy(new class extends pe{canHandle(t,e){const n=t[e];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(t,e){const n=t[0].querySelector("img");return this.createRTEImageBlock(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends pe{canHandle(t,e){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===t[e].tagName?1:0}handle(t,e){const n=t[0],s=n.querySelector("img");if(at(s))return jt.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:s.src,annotations:ue.generate(Ht,n,e)}],annotations:ue.generate(jt,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends pe{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(t[e]))?1:0}handle(t,n){const s=this.generateChildNodes(Array.from(t[0].childNodes),{},n);return 0===s.length?null:e.from({id:it(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:ue.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){if(!["UL","OL"].includes(t[e].parentElement.nodeName)&&t.some((t=>"LI"===t.nodeName))){let n=0;for(let s=e;s<t.length&&"LI"===t[s].nodeName;s++)n++;return n}return"LI"===t[e].tagName?1:0}handle(t,e){const n=t[0];return["UL","OL"].includes(n.parentElement.nodeName)?mt.from(this.generateListItemBlockDTO(n,e),e):this.generateWithListBlock(t,e)}appendChildBlocks(t,e){t.nestList=e.filter((t=>["bullet-list","number-list"].includes(t.type)))}shouldProceedToElementChildren(){return!0}generateWithListBlock(t,e){return gt.from({id:it(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:it(),type:"list-item",annotations:ue.generate(mt,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),ue.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,i=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),a=at(s)&&["UL","OL"].includes(s.nodeName);return r&&!i&&a?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return mt.from({id:it(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:gt.from({id:it(),type:"number-list",blocks:[],annotations:ue.generate(gt,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof mt)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:gt.from({id:it(),type:"bullet-list",blocks:[],annotations:ue.generate(gt,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof mt)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e,n){const s=t[e];return s.nodeType===Node.TEXT_NODE||this.isInlineTagWithoutBlockChildren(s,n)||ie.has(s.nodeName)&&!this.shouldFallBackToHtmlBlock(s)||n.autoMatchFormat||!this.isCustomHtmlContainer(s)||_t.isTitleOrSubtitle(s)?0:1}handle(t,e){return Ct.from(this.generateHtmlBlock(t[0],e),e)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}isInlineTagWithoutBlockChildren(t,e){if(ae.has(t.nodeName)&&0===t.childNodes.length)return!0;if(ce(t))return!(0===t.childNodes.length&&""===t.textContent&&!ae.has(t.nodeName)&&!le.has(t.nodeName));const n=Array.from(t.childNodes);return!(n.some((t=>t.nodeType===Node.ELEMENT_NODE))||!n.some((t=>t.nodeType===Node.TEXT_NODE)))&&(!1!==e.autoMatchFormat||!oe.has(t.parentElement.nodeName)&&(le.has(t.nodeName)||ae.has(t.nodeName)))}shouldFallBackToHtmlBlock(t){const e=Array.from(t.childNodes);if(0===e.length)return!1;const n=t.parentElement.nodeName;return"UL"!==n&&"OL"!==n&&e.every((t=>t.nodeType===Node.ELEMENT_NODE&&""===t.textContent&&!ae.has(t.nodeName)&&!le.has(t.nodeName)))}isCustomHtmlContainer(t){return"DIV"!==t.nodeName||t.childNodes.length>0&&"IMG"!==t.childNodes[0].nodeName}generateHtmlBlock(t,e){return{id:it(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:ue.generate(Ct,t,e),children:[]}}}),
2
2
  //!important: Code block strategies must be registered after HtmlBlockStrategy because registerElementToBlockStrategy uses unshift, giving later registrations higher priority.
3
3
  bt.registerElementToBlockStrategy(new we),bt.registerElementToBlockStrategy(new class extends we{canHandle(t,e){return"VEGA-CODE-BLOCK"===t[e].tagName&&0==!!t[e].querySelector("vega-code-block")||this.isCodeBlockContainer(t[e])?1:0}handle(t){const e=this.isCodeBlockContainer(t[0])?t[0].querySelector("vega-code-block"):t[0],n=e.querySelector("code");if(n)return super.handle([n]);if(e.hasAttribute("data-content")){const t=document.createElement("code");return t.textContent=e.dataset.content,t.dataset.language=e.dataset.language,super.handle([t])}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isCodeBlockContainer(t){return"PRE"===t.tagName&&t.classList.contains("code-block-container")&&1===t.querySelectorAll("vega-code-block").length}}),bt.registerElementToNodeStrategy(new class extends me{canHandle(t,e){const n=t[e];return!dt(n)||"BR"!==n.nodeName&&0!==n.childNodes.length?0:1}handle(t,e,s){const r=!(!e||!1!==e.autoMatchFormat),i=Object.assign({},s),a=t[0],o=ue.generate(n,a,Object.assign({parentAnnotations:r?{inlineHtml:i.inlineHtml,link:i.link,code:i.code}:s},e));if("BR"===a.nodeName){const{inlineHtml:t}=o,e=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(o,["inlineHtml"]);return this.generateTextNode("\n",t&&"br"===t.htmlTag?e:o)}if(0===a.childNodes.length){const t=r?wt(Object.assign(Object.assign({},n.supportsHtmlTag(a.nodeName.toLowerCase())?o:{}),{inlineHtml:o.inlineHtml})):o;return Object.assign({},this.generateTextNode("",t))}}}),bt.registerElementToNodeStrategy(new class extends me{canHandle(t,e){return t[e].nodeType===Node.TEXT_NODE?1:0}handle(t,e,s){const r=Object.assign({},s),i=!(!e||!1!==e.autoMatchFormat),a=t[0],o=a.parentNode.nodeName.toLowerCase(),l=i&&!n.supportsHtmlTag(o),c=this.generateTextNode(String(a.textContent),i?wt(Object.assign(Object.assign({},"span"===o?r:{link:r.link,code:"code"===o?r.code:void 0}),{inlineHtml:r.inlineHtml,plainText:l||void 0})):r);return Object.assign({},c)}}),Y.register(e.dtoName,new fe),Y.register(gt.dtoName,new fe),Y.register(mt.dtoName,new fe),Y.register(n.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const e=t,n=e.customStyle;if(!n)return t;e.bold&&n.fontWeight===z&&delete n.fontWeight,e.italic&&n.fontStyle===G&&delete n.fontStyle;const s=this.normalizeTextDecoration(n.textDecoration);return s&&this.shouldRemoveTextDecoration(s,e)&&delete n.textDecoration,0===Object.keys(n).length&&delete e.customStyle,t}normalizeTextDecoration(t){if(!t)return;const e=t.trim().toLowerCase().split(/\s+/);return e.some((t=>t!==K&&t!==J))?void 0:Array.from(new Set(e)).sort().join(" ")}shouldRemoveTextDecoration(t,e){const n=[];return e.underline&&n.push(K),e.strikethrough&&n.push(J),0!==n.length&&t===n.sort().join(" ")}}),Y.register(e.dtoName,new ge),Y.register(e.dtoName,new xe(1)),Y.register(e.dtoName,new xe(2)),Y.register(e.dtoName,new xe(3)),Y.register(e.dtoName,new xe(4)),Y.register(e.dtoName,new xe(5)),Y.register(e.dtoName,new xe(6)),Y.register(e.dtoName,new Te("title")),Y.register(e.dtoName,new Te("subtitle")),Y.register(n.dtoName,new be),Y.register(n.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=q.getDefaultStyles(),this.elementTagName="code"}filterAnnotations(t){const{code:e,customStyle:n}=t;return e&&n?super.filterAnnotations(t):t}canFilter(t){return Z.isCodeNode(t)}canRefill(t,e){return Z.isTextNode(t)&&e.matches(this.elementTagName)}toCssText(){return`.${Q.RTE_CONTENT_CONTAINER_CLASS_NAME} ${this.elementTagName} { ${this.convertStylesMapToCssText(Object.assign(Object.assign({},this.stylesToBeFiltered),{fontWeight:"500"}))} }`}}),Y.register(n.dtoName,new et),Y.register(Ht.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=kt.getDefaultStyles(),this.elementTagName="img"}get alwaysFilter(){return!0}canFilter(t){return Z.isImageNode(t)}canRefill(t,e){return e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}),Y.register(k.dtoName,new nt),Y.register(st.dtoName,new rt),Y.register(gt.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=ft.getDefaultStyles(),this.elementTagName="ol,ul"}canFilter(t){return Z.isListBlock(t.dtoName)}canRefill(t,e){return Z.isListBlock(t)&&e.matches(this.elementTagName)}toCssText(){return`${this.elementTagName.split(",").map((t=>`.${Q.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t.trim()}`)).join(", ")} { ${this.convertStylesMapToCssText(this.stylesToBeFiltered)} }`}}),Y.register(mt.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.elementTagName="li",this.headingOrTitleClassNamePattern=/^v-rte-(h[1-6]|title|subtitle)$/}canFilter(t){const e=!t.getStyles().fontSize||this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"]);return Z.isListItemBlock(t.dtoName)&&e}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&this.isElementNotHeadingOrTitle(e)}toCssText(){return this.buildCssTextForStyles(this.elementTagName)}isElementNotHeadingOrTitle(t){return!t.className.split(" ").some((t=>this.headingOrTitleClassNamePattern.test(t.trim())))}}),Y.register(mt.dtoName,new Oe(1)),Y.register(mt.dtoName,new Oe(2)),Y.register(mt.dtoName,new Oe(3)),Y.register(mt.dtoName,new Oe(4)),Y.register(mt.dtoName,new Oe(5)),Y.register(mt.dtoName,new Oe(6)),Y.register(mt.dtoName,new ye("title")),Y.register(mt.dtoName,new ye("subtitle"));class Ee{static preserve(t){const e=t.replace(/\s+style=/g," data-style=");return new Ae(e)}}class Ae{constructor(t){this.processedHtml=t}getProcessedHtml(){return this.processedHtml}restore(t){this.walkNodes(t)}walkNodes(t){t.forEach((t=>{if(dt(t)){const e=t.getAttribute("data-style");e&&(t.style.cssText=e,t.removeAttribute("data-style")),t.children.length>0&&this.walkNodes(Array.from(t.children))}}))}}class ke{process(t){return t.replace(/(<[^>]+>)(\s+)(<[^>]+>)/g,((t,e,n,s)=>{const r=this.extractOpeningTagName(e),i=this.extractClosingTagName(s);return r&&i&&r===i?`${e}${n}${s}`:`${e}${s}`}))}extractOpeningTagName(t){const e=t.match(/<(\w[\w-]*)/);return e?e[1]:null}extractClosingTagName(t){const e=t.match(/<\/(\w[\w-]*)/);return e?e[1]:null}}class He{process(t){return t.replace(/(>)[\n\t]+(?=.)/g,"$1")}}class Ne{process(t){return t.replace(/(.?)[\n\t]+(?=<)/g,"$1")}}class je{constructor(){this.processors=[new ke,new He,new Ne]}clean(t){if(!t||0===t.trim().length)return t;let e,n=t;do{e=n;for(const t of this.processors)n=t.process(n)}while(n!==e);return n}}class Ce{constructor(t){this.dtoName=Ce.dtoName,t.forEach((t=>{t.parent=this})),this.children=t}static fromJSON(t,e={autoMatchFormat:!0}){const n=t.map((t=>{const n=tt.getRTEBlockClass(t.type);if(n)return n.from(t,e);throw new Error(`[Vega] Unknown block type: ${t.type}`)}));return new Ce(n)}static createEmptyContent(t={autoMatchFormat:!0}){return Ce.fromJSON([{id:it(),type:"paragraph",annotations:{internalWrapper:!t.autoMatchFormat},nodes:[{id:it(),annotations:{plainText:!t.autoMatchFormat},type:"text",text:""}]}],t)}static fromHtml(t,e={autoMatchFormat:!0,skipCustomAnnotations:!1}){const n=(new je).clean(t),s=Ee.preserve(n),r=s.getProcessedHtml(),i=(new DOMParser).parseFromString(r,"text/html").body,a=Array.from(i.childNodes);s.restore(a);const o=Ot.process(a,e).filter(at).map((t=>t.toDto(e))).filter(at);return new Ce(o)}static generateContentStyles(t){return Y.generateAllStylesContent(null==t?void 0:t.enableFontImports)}clone(t=!1){return new Ce(t?this.children.map((t=>t.clone(this))):[...this.children])}toJSON(){return this.children.map((t=>t.toJSON()))}toHtml(t){return t&&(at(t.autoMatchFormat)||at(t.skipCustomAnnotations))&&pt.warn("The 'options' parameter's properties 'autoMatchFormat' and 'skipCustomAnnotations' in toHtml method are deprecated and will be removed in the future."),this.isEmpty()?"":this.children.map((e=>e.toHtml({filterInlineStyles:null==t?void 0:t.filterInlineStyles}))).join("")}isEmpty(){return 0===this.children.length||1===this.children.length&&!this.children[0].isNotEmpty()}apply(t){if(r.executeTheStrategy(t,this),t.executedFlag&&t.isFlushable){const t=H.getDOMByEntity(this);t&&ot.notify(lt.getSubject(t,ht),{})}}getLastNode(){return 0===this.children.length?null:this.children[this.children.length-1].getLastNode()}toListItem(t){t.children.map((t=>t.apply(new g)));const e=new mt(it());return e.apply(new s(t.children)),e.annotationMap=t.annotationMap,e}createList(t){return new gt(it(),t)}findNodeById(t){return this.findNodeInBlocksById(t,this.children)}findNodeInBlocksById(t,e){for(const n of e){if("children"in n)for(const e of n.children)if(e.id===t)return e;if(n instanceof mt&&n.nestList)for(const e of n.nestList){const n=this.findNodeInBlocksById(t,e.children);if(n)return n}if(n instanceof gt&&n.children){const e=this.findNodeInBlocksById(t,n.children);if(e)return e}}return null}}r.register(c.DELETE_CHILDREN,Ce.name,new P),r.register(c.APPEND_CHILDREN,Ce.name,new yt),r.register(c.INSERT_CHILDREN_BEFORE,Ce.name,new Et),r.register(c.INSERT_CHILDREN_AFTER,Ce.name,new At),r.register(c.TRANSFORM_TO_CODE_BLOCK,Ce.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,s=new k(it(),this.getCodeContent(n),"plainText");e.apply(new x(n[0],s)),t.newCodeBlock=s,this.removeSelectBlocks(n,e)}getCodeContent(t){return t.filter((t=>"image"!==t.type&&"list-item"!==t.type)).map((t=>t.children.map((t=>t.text)).join(""))).join("\n")}removeSelectBlocks(t,e){for(let n=0;n<t.length;n++)e.apply(new f(t[n]))}}),r.register(c.UPDATE_CURSOR_POSITION,Ce.name,new class extends t{handleAction(t,e){const{offset:n,nextFocusNode:s,immediatelyRun:r}=t,i=H.getDOMByEntity(e);i&&ot.notify(lt.getSubject(i,ct),{node:s,offset:n,updateDirectly:r})}}),Ce.dtoName="VegaRTEContent";export{zt as A,de as B,xt as E,Nt as I,Bt as M,Pt as P,jt as R,Ee as S,It as U,Ce as V,Et as a,mt as b,Ft as c,bt as d,gt as e,Ht as f,kt as g,ue as h,Ot as i}
@@ -0,0 +1 @@
1
+ import{h as e,H as t,r as i,c as o,g as r}from"./p-6b2342e0.js";import{s}from"./p-519a7d55.js";import{c as a,M as l,V as n,I as d,L as c}from"./p-6e1ab235.js";import{V as h,I as p}from"./p-8ce9e214.js";import{R as v}from"./p-a14d8767.js";import{c as g}from"./p-3a620268.js";import{S as b}from"./p-d14ddf80.js";import{O as f}from"./p-331a62d5.js";import{d as m}from"./p-526e3634.js";import{h as u}from"./p-5ffc7cb8.js";import{f as x}from"./p-528748fa.js";import{C as w}from"./p-2d0d575f.js";import{P as j}from"./p-81dd00d0.js";import{g as y}from"./p-49a2e141.js";import{j as k}from"./p-cb4033ef.js";import{c as C}from"./p-ef44d516.js";import{F as R}from"./p-cb378636.js";import{M as z}from"./p-78a57a17.js";import{a as S}from"./p-52b8f2d2.js";import{i as O}from"./p-d27ae9ff.js";import{c as E}from"./p-4cef4812.js";import{C as T}from"./p-822f70b0.js";import{F as I}from"./p-141f74ff.js";import{R as V}from"./p-14bfc113.js";import"./p-2b22091e.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-ddc2d219.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-bc73ce30.js";import"./p-982747ef.js";import"./p-b75ee3ba.js";import"./p-6a334573.js";import"./p-53ed3b1f.js";import"./p-5f377954.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-f0e828d8.js";import"./p-abd7aeaa.js";var N=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class L extends n{componentWillRender(){this.currentSize=v.formatCustom(this.size)}render(){return e(t,{class:{block:this.block}},this.renderTooltip())}renderTooltip(){return e("vega-tooltip",Object.assign({trigger:this.disabled&&this.disabledTooltip?"hover":"none",alignment:"center"},this.disabledTooltip),this.renderSelectionChip())}renderSelectionChip(){return e("vega-box",{corners:"rounded-full",class:{"vega-selection-chip":!0,[`size-${this.currentSize}`]:!0,[`variant-${this.variant||"text"}`]:!0,checked:this.checked,error:this.showError,disabled:this.disabled},"aria-label":this.label||"No label defined",onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:g(),tabIndex:this.disabled?-1:0},this.renderContent())}renderContent(){return e("vega-flex",{gap:L.gapSizeMap[this.currentSize],"align-items":"center","justify-content":"text"===this.variant?"center":"start"},"swatch"===this.variant&&this.renderSwatch(),this.renderLabel())}renderLabel(){return e("vega-font",{color:"text-primary",class:"label vega-flex-grow",variant:L.labelFontMap[this.currentSize]},this.label)}renderSwatch(){return e("vega-box",{"background-color":"bg-primary",corners:"rounded-full",class:"swatch vega-flex-shrink-0"},e("vega-box",{"background-color":this.swatchColor,corners:"rounded-full"}))}}L.gapSizeMap={"extra-small":"size-4",small:"size-4",medium:"size-8",large:"size-8"},L.labelFontMap={"extra-small":"font-field-label-xs",small:"font-field-label-sm",medium:"font-field-label",large:"font-field-label-lg"},N([a()],L.prototype,"host",void 0),N([a()],L.prototype,"label",void 0),N([a()],L.prototype,"block",void 0),N([a()],L.prototype,"size",void 0),N([a()],L.prototype,"variant",void 0),N([a()],L.prototype,"swatchColor",void 0),N([a()],L.prototype,"disabledTooltip",void 0),N([a()],L.prototype,"disabled",void 0),N([a()],L.prototype,"selectType",void 0),N([a()],L.prototype,"checked",void 0),N([a()],L.prototype,"checkedController",void 0),N([a()],L.prototype,"showError",void 0),N([l("componentWillRender")],L.prototype,"componentWillRender",null);var A=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class F extends n{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.setChecked(e),this.changeEventEmitter.emit(t)}}A([a()],F.prototype,"host",void 0),A([a({writable:!0})],F.prototype,"checked",void 0),A([a()],F.prototype,"changeEventEmitter",void 0),A([a()],F.prototype,"value",void 0);var D=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class G extends b{constructor(){super({parent:"vega-selection-chip-group",subStates:[{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"selectType",parentStateName:"selectType",callback:e=>{this.selectType="checkbox"===e?"checkbox":"radio"}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}D([a()],G.prototype,"host",void 0),D([a({writable:!0})],G.prototype,"disabled",void 0),D([a({writable:!0})],G.prototype,"selectType",void 0),D([a()],G.prototype,"value",void 0),D([a()],G.prototype,"checkedController",void 0);var W=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class M extends n{connectedCallback(){this.selectionChipGroup=x(this.host,"vega-selection-chip-group"),this.selectionChipGroup&&(this.fieldErrorObserver=new f(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),w.register(m.getSubject(this.selectionChipGroup,u),this.fieldErrorObserver))}disconnectedCallback(){this.selectionChipGroup&&w.unregister(m.getSubject(this.selectionChipGroup,u),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}W([a({writable:!0})],M.prototype,"showError",void 0),W([a()],M.prototype,"host",void 0),W([l("connectedCallback")],M.prototype,"connectedCallback",null),W([l("disconnectedCallback")],M.prototype,"disconnectedCallback",null);var _=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const H=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.checkedController=new F,this.stateController=new G,this.showErrorController=new M,this.pageResizeObserverSlimmer=new j,this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(H,k),this.showError=!1,this.currentBreakpoint=y(),this.label="",this.size="medium",this.variant="text",this.disabled=!1,this.block=!1,this.swatchColor="bg-status-info"}watchSize(){}componentWillRender(){}render(){return s(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{size:["watchSize"]}}};_([p()],H.prototype,"globalSlimmers",void 0),_([d()],H.prototype,"renderer",void 0),_([d()],H.prototype,"checkedController",void 0),_([d()],H.prototype,"stateController",void 0),_([d()],H.prototype,"showErrorController",void 0),_([d()],H.prototype,"pageResizeObserverSlimmer",void 0),_([d()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_([d()],H.prototype,"changeEventEmitter",void 0),H.style=":host(.block){display:block}:host(.block) vega-tooltip{display:block}:host{max-width:100%;display:inline-block;vertical-align:middle;line-height:0}:host vega-tooltip{max-width:100%}:host .swatch{margin:2px;padding:1px;box-sizing:border-box}:host .swatch vega-box{width:100%;height:100%}:host .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .vega-selection-chip{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));cursor:pointer;margin:1px}:host .variant-text .label{text-align:center}:host .size-extra-small.variant-swatch.vega-selection-chip{padding-top:2px;padding-bottom:2px;padding-left:2px;padding-right:12px}:host .size-extra-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:2px;padding-bottom:2px}:host .size-extra-small vega-flex{height:16px}:host .size-extra-small .swatch{width:12px;height:12px}:host .size-small.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:12px}:host .size-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:4px;padding-bottom:4px}:host .size-small vega-flex{height:24px}:host .size-small .swatch{width:20px;height:20px}:host .size-medium.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:16px}:host .size-medium.variant-text.vega-selection-chip{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .size-medium vega-flex{height:32px}:host .size-medium .swatch{width:28px;height:28px}:host .size-large.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:20px}:host .size-large.variant-text.vega-selection-chip{padding-left:20px;padding-right:20px;padding-top:4px;padding-bottom:4px}:host .size-large vega-flex{height:40px}:host .size-large .swatch{width:36px;height:36px}:host .vega-selection-chip:not(.disabled){background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-tile, 171, 198, 216, 1))}:host .vega-selection-chip:not(.disabled):hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-tile-hover, 115, 160, 190, 1))}:host .vega-selection-chip:not(.disabled):focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-tile-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .vega-selection-chip:not(.disabled).checked:hover{background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1))}:host .vega-selection-chip:not(.disabled).checked:focus-visible{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).error{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-selection-chip:not(.disabled).error:hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-selection-chip:not(.disabled).error:focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))}:host .vega-selection-chip.disabled{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));pointer-events:none;color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled:focus-visible{outline:none}:host .vega-selection-chip.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled .swatch{opacity:0.5}";var P=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class $ extends n{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,optional:this.optional,label:this.label})}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("slot",null))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([a()],$.prototype,"host",void 0),P([a()],$.prototype,"label",void 0),P([a()],$.prototype,"required",void 0),P([a()],$.prototype,"optional",void 0),P([a()],$.prototype,"hint",void 0),P([a()],$.prototype,"disabled",void 0);var q=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class U extends n{watchValue(){this.changeEventEmitter.emit(this.value),w.notify(R,{host:this.host,detail:this.value})}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"radio":return"string"==typeof e;case"checkbox":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return c.warn(`Invalid selection chip group value ${e} for ${this.selectType} mode`),!1}}}q([a()],U.prototype,"host",void 0),q([a({writable:!0})],U.prototype,"value",void 0),q([a()],U.prototype,"changeEventEmitter",void 0),q([a()],U.prototype,"selectType",void 0),q([l("watchValue")],U.prototype,"watchValue",null);var K=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class B extends n{constructor(){super(...arguments),this.mutationObserver=new z({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["checked"]},mutationFilter:S("VEGA-SELECTION-CHIP"),callback:this.syncChipArrayAndValue.bind(this)}),this.selectionChipArray=[]}disconnectedCallback(){}componentWillLoad(){this.value&&0!==this.value.length||this.syncChipArrayAndValue()}componentDidLoad(){}watchSelectType(){this.syncChipArrayAndValue()}getSelectionChipArray(){return this.selectionChipArray}syncChipArrayAndValue(e){this.selectionChipArray=Array.from(this.host.querySelectorAll("vega-selection-chip")),"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems(e)}setValueFromCheckboxItems(){const e=this.selectionChipArray.filter((e=>e.checked)).map((e=>e.value));O(this.value,e,!0)||this.valueController.setValue(e)}setValueFromRadioItems(e){const t=this.findAttributeMutation(e);if(t){const e=this.getCurrentChip(t);e&&e.checked&&this.valueController.setValue(e.value)}else{const e=this.getFirstCheckedChip();this.valueController.setValue(e?e.value:"")}}findAttributeMutation(e){return e&&e.find((e=>e.attributeName))}getCurrentChip(e){if(e&&"VEGA-SELECTION-CHIP"===e.target.tagName&&"checked"===e.attributeName)return e.target}getFirstCheckedChip(){return this.selectionChipArray.find((e=>e.checked))}}K([a()],B.prototype,"host",void 0),K([a()],B.prototype,"selectType",void 0),K([a()],B.prototype,"valueController",void 0),K([a()],B.prototype,"value",void 0),K([d()],B.prototype,"mutationObserver",void 0),K([l("disconnectedCallback")],B.prototype,"disconnectedCallback",null),K([l("componentWillLoad")],B.prototype,"componentWillLoad",null),K([l("componentDidLoad")],B.prototype,"componentDidLoad",null),K([l("watchSelectType")],B.prototype,"watchSelectType",null);var J=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const Q=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new $,this.itemsController=new B,this.valueController=new U,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new V:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.getSelectionChipArray(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(Q,k),this.valueNotifySlimmer=E(Q,"value","watchValue"),this.disabledNotifySlimmer=E(Q,"disabled","watchDisabled"),this.selectTypeNotifySlimmer=E(Q,"selectType","watchSelectType"),this.changeEventPrevent=new T([k],(()=>this.host),!0),this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.optional=!1,this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return s(e(t,null,this.renderer.render()),this.host)}get host(){return r(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};J([p()],Q.prototype,"globalSlimmers",void 0),J([d()],Q.prototype,"renderer",void 0),J([d()],Q.prototype,"itemsController",void 0),J([d()],Q.prototype,"valueController",void 0),J([d()],Q.prototype,"formFieldController",void 0),J([d()],Q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),J([d()],Q.prototype,"changeEventEmitter",void 0),J([d()],Q.prototype,"valueNotifySlimmer",void 0),J([d()],Q.prototype,"disabledNotifySlimmer",void 0),J([d()],Q.prototype,"selectTypeNotifySlimmer",void 0),J([d()],Q.prototype,"changeEventPrevent",void 0),Q.style=':host{display:block}:host vega-field-label{margin-bottom:8px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:4px;padding-left:8px;padding-right:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:block;margin-top:12px;margin-left:8px;margin-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}';export{H as vega_selection_chip,Q as vega_selection_chip_group}
@@ -1 +1 @@
1
- import{h as e,F as t,r as i,c as n,H as s,g as o}from"./p-6b2342e0.js";import{s as a}from"./p-519a7d55.js";import{c as r,V as l,M as c,I as d}from"./p-6e1ab235.js";import{V as h,I as g}from"./p-8ce9e214.js";import{c as m}from"./p-d7790113.js";import{i as p}from"./p-fcefb62c.js";import{P as f}from"./p-81dd00d0.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-526e3634.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-46cab60a.js";import"./p-b75ee3ba.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";var v=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class x extends l{render(){var t;return e("div",{class:"vega-segment-control-container"},null===(t=this.segments)||void 0===t?void 0:t.map((e=>this.segmentRenderer.render(e))))}}v([r()],x.prototype,"segments",void 0),v([r()],x.prototype,"segmentRenderer",void 0);var b=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class u extends l{componentWillLoad(){this.setDefaultSelected()}watchSegments(){this.setDefaultSelected()}watchSelected(){this.changeEventEmitter.emit(this.selected)}setSelected(e){this.selected=e.key}setDefaultSelected(){var e;(null===(e=this.segments)||void 0===e?void 0:e.length)>0&&!this.segments.find((e=>e.key===this.selected))&&(this.selected=this.segments[0].key)}}b([r({writable:!0})],u.prototype,"selected",void 0),b([r()],u.prototype,"segments",void 0),b([r()],u.prototype,"changeEventEmitter",void 0),b([c("componentWillLoad")],u.prototype,"componentWillLoad",null),b([c("watchSegments")],u.prototype,"watchSegments",null),b([c("watchSelected")],u.prototype,"watchSelected",null);var w=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class j extends l{watchSegments(){this.setIsOverflowBlockSegments()}watchBlock(){this.setIsOverflowBlockSegments()}watchSize(){this.setIsOverflowBlockSegments()}setIsOverflowBlockSegments(){this.isOverflowBlockSegments=this.isExceedContainerWidth()}isExceedContainerWidth(){if(this.block){const e=this.host.shadowRoot.querySelector(".vega-segment-control-container");return e.clientWidth<e.children.length*j.SEGMENTS_OVERFLOW_THRESHOLD[this.size]+4*(e.children.length-1)+5}return!1}}j.SEGMENTS_OVERFLOW_THRESHOLD={medium:101.9,small:82},w([r()],j.prototype,"host",void 0),w([r()],j.prototype,"block",void 0),w([r()],j.prototype,"size",void 0),w([r({writable:!0})],j.prototype,"isOverflowBlockSegments",void 0),w([c("watchSegments")],j.prototype,"watchSegments",null),w([c("watchBlock")],j.prototype,"watchBlock",null),w([c("watchSize")],j.prototype,"watchSize",null);var y=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class S extends l{render(t){return e("button",{key:t.key,class:{"vega-segment":!0,selected:this.selected===t.key,disabled:t.disabled,[`${this.size}`]:!0},onClick:()=>this.selectedController.setSelected(t),disabled:t.disabled},this.renderSegments(t))}renderSegments(i){return e(t,null,(this.isOverflowBlockSegments||!this.isOverflowBlockSegments&&"text-only"!==this.variant)&&i.icon&&this.renderIcon(i),(this.isOverflowBlockSegments&&!i.icon||!this.isOverflowBlockSegments&&"icon-only"!==this.variant)&&i.text&&this.renderText(i))}renderIcon(t){return e("vega-tooltip",{text:t.text,trigger:t.text&&(this.isOverflowBlockSegments||!this.isOverflowBlockSegments&&"icon-only"===this.variant)?"hover":"none",placement:["bottom","top"],disableInteractive:!1},e("vega-icon",{icon:t.icon,size:"size-16"}))}renderText(t){return e("vega-text",{overflow:"ellipsis",tooltip:{placement:["bottom","top"]},text:t.text})}}y([r()],S.prototype,"host",void 0),y([r()],S.prototype,"size",void 0),y([r()],S.prototype,"selected",void 0),y([r()],S.prototype,"variant",void 0),y([r()],S.prototype,"block",void 0),y([r()],S.prototype,"isOverflowBlockSegments",void 0),y([r()],S.prototype,"selectedController",void 0);var k=function(e,t,i,n){var s,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(a=(o<3?s(a):o>3?s(t,i,a):s(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const R=class{constructor(e){i(this,e),this.vegaChange=n(this,"vegaChange",7),this.change=n(this,"change",7),this.globalSlimmers={},this.segmentControlRenderer=new x,this.segmentOverflowController=new j,this.segmentRenderer=new S,this.selectedController=new u,this.changeEventEmitter=m(R,p),this.pageResizeObserverSlimmer=new f({callback:()=>{this.segmentControlWidth=this.host.clientWidth,this.segmentOverflowController.setIsOverflowBlockSegments()},shouldTrigger:()=>this.host.clientWidth!==this.segmentControlWidth}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.segmentControlWidth=0,this.isOverflowBlockSegments=!1,this.block=!1,this.size="medium",this.segments=[],this.variant="default"}watchBlock(){}watchSize(){}watchSegments(){}watchSelected(){}componentWillLoad(){}render(){return a(e(s,{class:{"vega-segment-control-block":this.block}},this.segmentControlRenderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{block:["watchBlock"],size:["watchSize"],segments:["watchSegments"],selected:["watchSelected"]}}};k([g()],R.prototype,"globalSlimmers",void 0),k([d()],R.prototype,"segmentControlRenderer",void 0),k([d()],R.prototype,"segmentOverflowController",void 0),k([d()],R.prototype,"segmentRenderer",void 0),k([d()],R.prototype,"selectedController",void 0),k([d()],R.prototype,"changeEventEmitter",void 0),k([d()],R.prototype,"pageResizeObserverSlimmer",void 0),k([d()],R.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),R.style=':host{display:inline-block}.vega-segment-control-container{display:flex;gap:4px;border-radius:9999px;background-color:rgba(var(--v-bg-segment-control, 89, 96, 99, 0.1));padding:3px}:host(.vega-segment-control-block){display:block}:host(.vega-segment-control-block) .vega-segment{flex-basis:0;flex-grow:1}.vega-segment{display:flex;align-items:center;justify-content:center;gap:8px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));border-radius:9999px;cursor:pointer;text-align:center;border-width:1px;border-style:solid;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border-color:transparent}.vega-segment vega-icon{vertical-align:middle}.vega-segment.medium{padding-left:24px;padding-right:24px;padding-top:8px;padding-bottom:8px;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.vega-segment.small{padding-left:16px;padding-right:16px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;padding-top:3px;padding-bottom:3px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-segment.disabled{color:rgba(var(--v-text-disabled, 176, 180, 181, 1));pointer-events:none}.vega-segment:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.vega-segment:hover{background-color:rgba(var(--v-bg-segment-hover, 205, 209, 211, 1))}.vega-segment.selected{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-chip, 205, 209, 211, 1))}';export{R as vega_segment_control}
1
+ import{h as e,F as t,r as i,c as n,H as s,g as o}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as a,V as l,M as c,I as d}from"./p-6e1ab235.js";import{V as h,I as g}from"./p-8ce9e214.js";import{c as m}from"./p-ef44d516.js";import{j as p}from"./p-cb4033ef.js";import{P as f}from"./p-81dd00d0.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-526e3634.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-53ed3b1f.js";import"./p-b75ee3ba.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";var v=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class x extends l{render(){var t;return e("div",{class:"vega-segment-control-container"},null===(t=this.segments)||void 0===t?void 0:t.map((e=>this.segmentRenderer.render(e))))}}v([a()],x.prototype,"segments",void 0),v([a()],x.prototype,"segmentRenderer",void 0);var b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class u extends l{componentWillLoad(){this.setDefaultSelected()}watchSegments(){this.setDefaultSelected()}watchSelected(){this.changeEventEmitter.emit(this.selected)}setSelected(e){this.selected=e.key}setDefaultSelected(){var e;(null===(e=this.segments)||void 0===e?void 0:e.length)>0&&!this.segments.find((e=>e.key===this.selected))&&(this.selected=this.segments[0].key)}}b([a({writable:!0})],u.prototype,"selected",void 0),b([a()],u.prototype,"segments",void 0),b([a()],u.prototype,"changeEventEmitter",void 0),b([c("componentWillLoad")],u.prototype,"componentWillLoad",null),b([c("watchSegments")],u.prototype,"watchSegments",null),b([c("watchSelected")],u.prototype,"watchSelected",null);var w=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class j extends l{watchSegments(){this.setIsOverflowBlockSegments()}watchBlock(){this.setIsOverflowBlockSegments()}watchSize(){this.setIsOverflowBlockSegments()}setIsOverflowBlockSegments(){this.isOverflowBlockSegments=this.isExceedContainerWidth()}isExceedContainerWidth(){if(this.block){const e=this.host.shadowRoot.querySelector(".vega-segment-control-container");return e.clientWidth<e.children.length*j.SEGMENTS_OVERFLOW_THRESHOLD[this.size]+4*(e.children.length-1)+5}return!1}}j.SEGMENTS_OVERFLOW_THRESHOLD={medium:101.9,small:82},w([a()],j.prototype,"host",void 0),w([a()],j.prototype,"block",void 0),w([a()],j.prototype,"size",void 0),w([a({writable:!0})],j.prototype,"isOverflowBlockSegments",void 0),w([c("watchSegments")],j.prototype,"watchSegments",null),w([c("watchBlock")],j.prototype,"watchBlock",null),w([c("watchSize")],j.prototype,"watchSize",null);var y=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class S extends l{render(t){return e("button",{key:t.key,class:{"vega-segment":!0,selected:this.selected===t.key,disabled:t.disabled,[`${this.size}`]:!0},onClick:()=>this.selectedController.setSelected(t),disabled:t.disabled},this.renderSegments(t))}renderSegments(i){return e(t,null,(this.isOverflowBlockSegments||!this.isOverflowBlockSegments&&"text-only"!==this.variant)&&i.icon&&this.renderIcon(i),(this.isOverflowBlockSegments&&!i.icon||!this.isOverflowBlockSegments&&"icon-only"!==this.variant)&&i.text&&this.renderText(i))}renderIcon(t){return e("vega-tooltip",{text:t.text,trigger:t.text&&(this.isOverflowBlockSegments||!this.isOverflowBlockSegments&&"icon-only"===this.variant)?"hover":"none",placement:["bottom","top"],disableInteractive:!1},e("vega-icon",{icon:t.icon,size:"size-16"}))}renderText(t){return e("vega-text",{overflow:"ellipsis",tooltip:{placement:["bottom","top"]},text:t.text})}}y([a()],S.prototype,"host",void 0),y([a()],S.prototype,"size",void 0),y([a()],S.prototype,"selected",void 0),y([a()],S.prototype,"variant",void 0),y([a()],S.prototype,"block",void 0),y([a()],S.prototype,"isOverflowBlockSegments",void 0),y([a()],S.prototype,"selectedController",void 0);var k=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};const R=class{constructor(e){i(this,e),this.vegaChange=n(this,"vegaChange",7),this.change=n(this,"change",7),this.globalSlimmers={},this.segmentControlRenderer=new x,this.segmentOverflowController=new j,this.segmentRenderer=new S,this.selectedController=new u,this.changeEventEmitter=m(R,p),this.pageResizeObserverSlimmer=new f({callback:()=>{this.segmentControlWidth=this.host.clientWidth,this.segmentOverflowController.setIsOverflowBlockSegments()},shouldTrigger:()=>this.host.clientWidth!==this.segmentControlWidth}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.segmentControlWidth=0,this.isOverflowBlockSegments=!1,this.block=!1,this.size="medium",this.segments=[],this.variant="default"}watchBlock(){}watchSize(){}watchSegments(){}watchSelected(){}componentWillLoad(){}render(){return r(e(s,{class:{"vega-segment-control-block":this.block}},this.segmentControlRenderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{block:["watchBlock"],size:["watchSize"],segments:["watchSegments"],selected:["watchSelected"]}}};k([g()],R.prototype,"globalSlimmers",void 0),k([d()],R.prototype,"segmentControlRenderer",void 0),k([d()],R.prototype,"segmentOverflowController",void 0),k([d()],R.prototype,"segmentRenderer",void 0),k([d()],R.prototype,"selectedController",void 0),k([d()],R.prototype,"changeEventEmitter",void 0),k([d()],R.prototype,"pageResizeObserverSlimmer",void 0),k([d()],R.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),R.style=':host{display:inline-block}.vega-segment-control-container{display:flex;gap:4px;border-radius:9999px;background-color:rgba(var(--v-bg-segment-control, 89, 96, 99, 0.1));padding:3px}:host(.vega-segment-control-block){display:block}:host(.vega-segment-control-block) .vega-segment{flex-basis:0;flex-grow:1}.vega-segment{display:flex;align-items:center;justify-content:center;gap:8px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));border-radius:9999px;cursor:pointer;text-align:center;border-width:1px;border-style:solid;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border-color:transparent}.vega-segment vega-icon{vertical-align:middle}.vega-segment.medium{padding-left:24px;padding-right:24px;padding-top:8px;padding-bottom:8px;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.vega-segment.small{padding-left:16px;padding-right:16px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;padding-top:3px;padding-bottom:3px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-segment.disabled{color:rgba(var(--v-text-disabled, 176, 180, 181, 1));pointer-events:none}.vega-segment:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.vega-segment:hover{background-color:rgba(var(--v-bg-segment-hover, 205, 209, 211, 1))}.vega-segment.selected{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-chip, 205, 209, 211, 1))}';export{R as vega_segment_control}