@globalpayments/vega 2.91.0 → 2.92.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 (476) hide show
  1. package/dist/cjs/{app-globals-7bb10088.js → app-globals-2f326662.js} +13 -10
  2. package/dist/cjs/{child-nodes-event-prevent-slimmer-76d19d56.js → child-nodes-event-prevent-slimmer-b9a5b3e2.js} +1 -1
  3. package/dist/cjs/{code-block-c1039791.js → code-block-6435d641.js} +24 -1
  4. package/dist/cjs/{component-value-history-controller-slimmer.abstract-1d36641d.js → component-value-history-controller-slimmer.abstract-e4c9a5ba.js} +3 -3
  5. package/dist/cjs/{content-state-a6105949.js → content-state-96ec9114.js} +32 -3
  6. package/dist/cjs/copy-d021c780.js +7 -0
  7. package/dist/cjs/{date-required-rule-c4997459.js → date-required-rule-8c9e312b.js} +1 -1
  8. package/dist/cjs/{design-token-f65eab4a.js → design-token-3548af29.js} +3 -3
  9. package/dist/cjs/{element-appender-slimmer-316668d0.js → element-appender-slimmer-3bf69990.js} +3 -3
  10. package/dist/cjs/{file-uploader-required-rule-cc51d4ab.js → file-uploader-required-rule-5520bbec.js} +1 -1
  11. package/dist/cjs/{form-field-controller-slimmer-b0c35330.js → form-field-controller-slimmer-e0efac05.js} +1 -1
  12. package/dist/cjs/{image-annotation-action-e4596726.js → image-annotation-action-853f72c8.js} +2 -2
  13. package/dist/cjs/index-58ea899e.js +4 -0
  14. package/dist/cjs/index.cjs.js +25 -20
  15. package/dist/cjs/{inject-keyboard-manager-1f5bbb19.js → inject-keyboard-manager-0dccff1a.js} +1 -1
  16. package/dist/cjs/{internal-calendar-period-factory-9c66cf36.js → internal-calendar-period-factory-6187ec4c.js} +1 -1
  17. package/dist/cjs/{internal-translation-controller-5905469e.js → internal-translation-controller-48ebfd0f.js} +14 -0
  18. package/dist/cjs/{keyboard-manager-61e8ce38.js → keyboard-manager-dfe8d924.js} +1 -1
  19. package/dist/cjs/{keyboard-manager-slimmer-079a7e87.js → keyboard-manager-slimmer-4a2560a1.js} +1 -1
  20. package/dist/cjs/{link-extension-a7ac28f3.js → link-extension-28d95849.js} +3 -3
  21. package/dist/cjs/loader.cjs.js +14 -13
  22. package/dist/cjs/{month-view-generator-48215a05.js → month-view-generator-2e59b188.js} +1 -1
  23. package/dist/cjs/{public-rules-66540638.js → public-rules-8727c42c.js} +10 -10
  24. package/dist/cjs/{range-dea19a90.js → range-5cb3d1e4.js} +25 -3
  25. package/dist/cjs/{replace-selected-text-action-6d1ebbf9.js → replace-selected-text-action-a31563ed.js} +1 -1
  26. package/dist/cjs/{required-field-rule-b12a29e1.js → required-field-rule-400690c3.js} +1 -1
  27. package/dist/cjs/{responsive-format-facade-10ff730e.js → responsive-format-facade-98b89142.js} +2 -2
  28. package/dist/cjs/{rich-text-editor-required-rule-63492ca3.js → rich-text-editor-required-rule-8e4d577d.js} +1 -1
  29. package/dist/cjs/{split-cell-operation-30e5dd4a.js → split-cell-operation-9e3ab88d.js} +3 -3
  30. package/dist/cjs/{state-border-formatter-e7779964.js → state-border-formatter-626b0a14.js} +1 -1
  31. package/dist/cjs/{string-format-strategy.abstract-a22f0cb1.js → string-format-strategy.abstract-981f43e1.js} +1 -1
  32. package/dist/cjs/{string-input-formatter-slimmer-8179eb40.js → string-input-formatter-slimmer-fc4a0ba5.js} +1 -1
  33. package/dist/cjs/{string-mask-strategy-8b9bb0c1.js → string-mask-strategy-b47fa159.js} +2 -2
  34. package/dist/cjs/{style-formatter-380b9a86.js → style-formatter-baf18624.js} +2 -2
  35. package/dist/cjs/{time-required-rule-080d975b.js → time-required-rule-e77d174f.js} +1 -1
  36. package/dist/cjs/{token-extension-619379a3.js → token-extension-3aec039f.js} +1609 -15
  37. package/dist/cjs/{translation-slimmer-2af6f141.js → translation-slimmer-1e05769e.js} +1 -1
  38. package/dist/cjs/{type-guard-0171e779.js → type-guard-7ab48d6c.js} +1 -1
  39. package/dist/cjs/{valid-credit-card-number-rule-fdfca83e.js → valid-credit-card-number-rule-52ba9c67.js} +1 -1
  40. package/dist/cjs/vega-accordion.cjs.entry.js +18 -10
  41. package/dist/cjs/vega-app-header-button.cjs.entry.js +7 -7
  42. package/dist/cjs/vega-banner.cjs.entry.js +3 -6
  43. package/dist/cjs/vega-box.cjs.entry.js +7 -7
  44. package/dist/cjs/vega-breadcrumb.cjs.entry.js +2 -2
  45. package/dist/cjs/vega-button-circle.cjs.entry.js +7 -7
  46. package/dist/cjs/vega-button-group_2.cjs.entry.js +2 -2
  47. package/dist/cjs/vega-button-link.cjs.entry.js +2 -2
  48. package/dist/cjs/vega-button.cjs.entry.js +5 -5
  49. package/dist/cjs/vega-calendar_5.cjs.entry.js +9 -9
  50. package/dist/cjs/vega-card.cjs.entry.js +6 -6
  51. package/dist/cjs/vega-carousel.cjs.entry.js +4 -4
  52. package/dist/cjs/vega-checkbox_2.cjs.entry.js +5 -5
  53. package/dist/cjs/vega-chip.cjs.entry.js +7 -7
  54. package/dist/cjs/vega-code-block.cjs.entry.js +12 -15
  55. package/dist/cjs/vega-color-picker.cjs.entry.js +4 -4
  56. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +6 -6
  57. package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
  58. package/dist/cjs/vega-combo-box.cjs.entry.js +11 -11
  59. package/dist/cjs/vega-date-picker_2.cjs.entry.js +15 -15
  60. package/dist/cjs/vega-dialog_2.cjs.entry.js +5 -5
  61. package/dist/cjs/vega-divider.cjs.entry.js +6 -6
  62. package/dist/cjs/vega-dropdown_5.cjs.entry.js +9 -9
  63. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  64. package/dist/cjs/vega-field-label.cjs.entry.js +13 -9
  65. package/dist/cjs/vega-file-uploader.cjs.entry.js +6 -6
  66. package/dist/cjs/vega-flag-icon.cjs.entry.js +6 -6
  67. package/dist/cjs/vega-flex.cjs.entry.js +7 -7
  68. package/dist/cjs/vega-font.cjs.entry.js +6 -6
  69. package/dist/cjs/vega-form.cjs.entry.js +5 -5
  70. package/dist/cjs/vega-grid.cjs.entry.js +6 -6
  71. package/dist/cjs/vega-icon.cjs.entry.js +6 -6
  72. package/dist/cjs/vega-image-uploader.cjs.entry.js +8 -8
  73. package/dist/cjs/vega-input-credit-card.cjs.entry.js +9 -9
  74. package/dist/cjs/vega-input-numeric.cjs.entry.js +8 -8
  75. package/dist/cjs/vega-input-passcode.cjs.entry.js +8 -8
  76. package/dist/cjs/vega-input-phone-number.cjs.entry.js +6 -6
  77. package/dist/cjs/vega-input-range.cjs.entry.js +5 -5
  78. package/dist/cjs/vega-input-select.cjs.entry.js +8 -8
  79. package/dist/cjs/vega-input.cjs.entry.js +9 -9
  80. package/dist/cjs/vega-left-nav_5.cjs.entry.js +8 -8
  81. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +4 -4
  82. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +2 -2
  83. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
  84. package/dist/cjs/vega-pagination.cjs.entry.js +6 -6
  85. package/dist/cjs/vega-popover_2.cjs.entry.js +9 -9
  86. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +4 -4
  87. package/dist/cjs/vega-radio_2.cjs.entry.js +8 -8
  88. package/dist/cjs/vega-rich-text-content.cjs.entry.js +6 -6
  89. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +220 -48
  90. package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +233 -0
  91. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
  92. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +11 -11
  93. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +7 -7
  94. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +5 -5
  95. package/dist/cjs/vega-sidenav_3.cjs.entry.js +4 -4
  96. package/dist/cjs/vega-signature-capture.cjs.entry.js +9 -9
  97. package/dist/cjs/vega-stepper.cjs.entry.js +4 -4
  98. package/dist/cjs/vega-tab-group_2.cjs.entry.js +2 -2
  99. package/dist/cjs/vega-table_11.cjs.entry.js +6 -6
  100. package/dist/cjs/vega-textarea.cjs.entry.js +5 -5
  101. package/dist/cjs/vega-time-picker_2.cjs.entry.js +11 -11
  102. package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
  103. package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -7
  104. package/dist/cjs/vega.cjs.js +14 -13
  105. package/dist/cjs/xmark-large-faae5a80.js +7 -0
  106. package/dist/collection/collection-manifest.json +6 -0
  107. package/dist/collection/components/vega-accordion/slimmers/vega-accordion-renderer.js +11 -3
  108. package/dist/collection/components/vega-box/vega-box.js +3 -3
  109. package/dist/collection/components/vega-code-block/slimmers/renderers/vega-code-block-copy-button-renderer.js +1 -1
  110. package/dist/collection/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.js +5 -4
  111. package/dist/collection/components/vega-field-label/vega-field-label.css +20 -0
  112. package/dist/collection/components/vega-field-label/vega-field-label.js +6 -3
  113. package/dist/collection/components/vega-input/vega-input.css +1 -0
  114. package/dist/collection/components/vega-input/vega-input.js +1 -1
  115. package/dist/collection/components/vega-input-select/vega-input-select.js +1 -1
  116. package/dist/collection/components/vega-rich-text-editor/assets/cut.js +3 -0
  117. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-or-decorator-node-strategy.js +16 -1
  118. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.js +25 -0
  119. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/delete-selected-content-strategy.js +16 -0
  120. package/dist/collection/components/vega-rich-text-editor/dto/actions/delete-selected-content-action.js +17 -0
  121. package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -0
  122. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +2 -0
  123. package/dist/collection/components/vega-rich-text-editor/dto/range.js +24 -2
  124. package/dist/collection/components/vega-rich-text-editor/extensions/copy/action-handler-strategies/copy-selected-content-strategy.js +226 -0
  125. package/dist/collection/components/vega-rich-text-editor/extensions/copy/actions/copy-selected-content-action.js +21 -0
  126. package/dist/collection/components/vega-rich-text-editor/extensions/copy/copy-extension.js +20 -0
  127. package/dist/collection/components/vega-rich-text-editor/extensions/copy/copy-toolbar-button-renderer.js +58 -0
  128. package/dist/collection/components/vega-rich-text-editor/extensions/cut/cut-extension.js +15 -0
  129. package/dist/collection/components/vega-rich-text-editor/extensions/cut/cut-toolbar-button-renderer.js +44 -0
  130. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/assets/find-and-replace.js +3 -0
  131. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/find-replace-extension.js +18 -0
  132. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-controller.js +105 -0
  133. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-replace-controller.abstract.js +68 -0
  134. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/block-search-strategy.abstract.js +8 -0
  135. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/code-block-search-strategy.js +19 -0
  136. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/container-block-search-strategy.js +23 -0
  137. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/list-item-block-search-strategy.js +30 -0
  138. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/text-block-search-strategy.js +20 -0
  139. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-highlight-manager.js +266 -0
  140. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-state.js +346 -0
  141. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/replace-controller.js +113 -0
  142. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/renderers/find-replace-toolbar-button-renderer.js +194 -0
  143. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/slimmers/renderers/find-replace-panel-renderer.js +153 -0
  144. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/vega-rich-text-find-replace-panel.css +50 -0
  145. package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/vega-rich-text-find-replace-panel.js +156 -0
  146. package/dist/collection/components/vega-rich-text-editor/extensions/functions/function-extension.js +2 -1
  147. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.js +2 -1
  148. package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-extension.js +2 -1
  149. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-extension.js +2 -1
  150. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/special-characters-extension.js +2 -1
  151. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +2 -1
  152. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/controllers/selection-widget-keyboard-controller.js +1 -1
  153. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-extension.js +2 -1
  154. package/dist/collection/components/vega-rich-text-editor/public-api.js +4 -0
  155. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +133 -0
  156. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.js +35 -0
  157. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.js +93 -0
  158. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +9 -3
  159. package/dist/collection/components/vega-textarea/vega-textarea.js +1 -1
  160. package/dist/collection/global/scripts/before-vega-load.js +6 -0
  161. package/dist/collection/helpers/translation/locales/en.js +14 -0
  162. package/dist/esm/{app-globals-6041f52f.js → app-globals-5e0d319a.js} +13 -10
  163. package/dist/esm/{aria-dialog-focusable-trap-slimmer-1332c071.js → aria-dialog-focusable-trap-slimmer-9eae86c6.js} +1 -1
  164. package/dist/esm/{child-nodes-event-prevent-slimmer-50022584.js → child-nodes-event-prevent-slimmer-f24618c5.js} +2 -2
  165. package/dist/esm/{code-block-37294847.js → code-block-b71b2aa4.js} +26 -3
  166. package/dist/esm/{component-value-history-controller-slimmer.abstract-45ccddc9.js → component-value-history-controller-slimmer.abstract-282df6e5.js} +4 -4
  167. package/dist/esm/{content-state-67950b80.js → content-state-909099f8.js} +33 -4
  168. package/dist/esm/copy-54e45e2d.js +5 -0
  169. package/dist/esm/{date-required-rule-958cf380.js → date-required-rule-15edb04a.js} +1 -1
  170. package/dist/esm/{design-token-e7e78f18.js → design-token-cb5ed6b9.js} +3 -3
  171. package/dist/esm/{element-appender-slimmer-ebda526d.js → element-appender-slimmer-e41120ee.js} +4 -4
  172. package/dist/esm/{event-emit-slimmer-b94cec83.js → event-emit-slimmer-03deba18.js} +1 -1
  173. package/dist/esm/{file-uploader-required-rule-82188a61.js → file-uploader-required-rule-96952e1a.js} +1 -1
  174. package/dist/esm/{form-field-controller-slimmer-0a2ba886.js → form-field-controller-slimmer-cfe1d8a7.js} +3 -3
  175. package/dist/esm/{image-annotation-action-7f7a5678.js → image-annotation-action-98232dc4.js} +3 -3
  176. package/dist/esm/index-090d31ca.js +4 -0
  177. package/dist/esm/index.js +24 -23
  178. package/dist/esm/{inject-keyboard-manager-2b19c121.js → inject-keyboard-manager-13cc77ab.js} +1 -1
  179. package/dist/esm/{internal-calendar-period-factory-fff8aaee.js → internal-calendar-period-factory-c3d70f3b.js} +1 -1
  180. package/dist/esm/{internal-translation-controller-aa09ca87.js → internal-translation-controller-8e8a514a.js} +14 -0
  181. package/dist/esm/{internal-vega-event-manager-956cf128.js → internal-vega-event-manager-75e5e3bb.js} +1 -1
  182. package/dist/esm/{keyboard-manager-3e5b157f.js → keyboard-manager-fe885db1.js} +1 -1
  183. package/dist/esm/{keyboard-manager-slimmer-ba5cc767.js → keyboard-manager-slimmer-61d4c79b.js} +1 -1
  184. package/dist/esm/{link-extension-afb404fb.js → link-extension-f1a3bea7.js} +3 -3
  185. package/dist/esm/loader.js +17 -16
  186. package/dist/esm/{month-view-generator-7a0c869c.js → month-view-generator-85eecb95.js} +1 -1
  187. package/dist/esm/{public-rules-f64b0b78.js → public-rules-323bea4b.js} +11 -11
  188. package/dist/esm/{range-4d09a305.js → range-e63068d1.js} +25 -3
  189. package/dist/esm/{replace-selected-text-action-12bc8b82.js → replace-selected-text-action-c0817b2b.js} +1 -1
  190. package/dist/esm/{required-field-rule-a4634842.js → required-field-rule-897fe8d1.js} +1 -1
  191. package/dist/esm/{responsive-format-facade-844c5e09.js → responsive-format-facade-fb424f5b.js} +2 -2
  192. package/dist/esm/{rich-text-editor-required-rule-d62d418e.js → rich-text-editor-required-rule-0edb8ba7.js} +1 -1
  193. package/dist/esm/{split-cell-operation-c515669e.js → split-cell-operation-93b4d775.js} +3 -3
  194. package/dist/esm/{state-border-formatter-f53847a5.js → state-border-formatter-1a528ca4.js} +1 -1
  195. package/dist/esm/{string-format-strategy.abstract-a0327405.js → string-format-strategy.abstract-72fc98aa.js} +1 -1
  196. package/dist/esm/{string-input-formatter-slimmer-12de4a25.js → string-input-formatter-slimmer-b0c480d8.js} +3 -3
  197. package/dist/esm/{string-mask-strategy-3bb03155.js → string-mask-strategy-4e00c173.js} +2 -2
  198. package/dist/esm/{style-formatter-df7bf8ec.js → style-formatter-5c1bea8d.js} +2 -2
  199. package/dist/esm/{sub-state-notify-slimmer-7ef94141.js → sub-state-notify-slimmer-0f72ce74.js} +1 -1
  200. package/dist/esm/{sub-state-observer-slimmer-d9ad2bdd.js → sub-state-observer-slimmer-64532d94.js} +1 -1
  201. package/dist/esm/{time-required-rule-db0dee53.js → time-required-rule-df500b14.js} +1 -1
  202. package/dist/esm/{token-extension-8ff92d14.js → token-extension-32d1fa56.js} +1610 -20
  203. package/dist/esm/{translation-slimmer-4904e7fe.js → translation-slimmer-60408f13.js} +1 -1
  204. package/dist/esm/{type-guard-a2cbaae9.js → type-guard-91087018.js} +1 -1
  205. package/dist/esm/{valid-credit-card-number-rule-a3f9858d.js → valid-credit-card-number-rule-681ecb75.js} +1 -1
  206. package/dist/esm/vega-accordion.entry.js +21 -13
  207. package/dist/esm/vega-app-footer.entry.js +3 -3
  208. package/dist/esm/vega-app-header-button.entry.js +10 -10
  209. package/dist/esm/vega-banner.entry.js +5 -8
  210. package/dist/esm/vega-box.entry.js +7 -7
  211. package/dist/esm/vega-breadcrumb.entry.js +5 -5
  212. package/dist/esm/vega-button-circle.entry.js +11 -11
  213. package/dist/esm/vega-button-group_2.entry.js +8 -8
  214. package/dist/esm/vega-button-link.entry.js +5 -5
  215. package/dist/esm/vega-button.entry.js +9 -9
  216. package/dist/esm/vega-calendar_5.entry.js +15 -15
  217. package/dist/esm/vega-card.entry.js +6 -6
  218. package/dist/esm/vega-carousel.entry.js +7 -7
  219. package/dist/esm/vega-checkbox_2.entry.js +10 -10
  220. package/dist/esm/vega-chip.entry.js +10 -10
  221. package/dist/esm/vega-code-block.entry.js +15 -18
  222. package/dist/esm/vega-color-picker.entry.js +9 -9
  223. package/dist/esm/vega-color-swatch-picker.entry.js +11 -11
  224. package/dist/esm/vega-color-swatch.entry.js +5 -5
  225. package/dist/esm/vega-combo-box.entry.js +16 -16
  226. package/dist/esm/vega-date-picker_2.entry.js +22 -22
  227. package/dist/esm/vega-dialog_2.entry.js +10 -10
  228. package/dist/esm/vega-divider.entry.js +6 -6
  229. package/dist/esm/vega-dropdown_5.entry.js +16 -16
  230. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  231. package/dist/esm/{vega-event-id-268f8def.js → vega-event-id-d3017041.js} +1 -1
  232. package/dist/esm/vega-field-label.entry.js +16 -12
  233. package/dist/esm/vega-file-uploader.entry.js +11 -11
  234. package/dist/esm/vega-flag-icon.entry.js +6 -6
  235. package/dist/esm/vega-flex.entry.js +7 -7
  236. package/dist/esm/vega-font.entry.js +6 -6
  237. package/dist/esm/vega-form.entry.js +11 -11
  238. package/dist/esm/vega-grid.entry.js +6 -6
  239. package/dist/esm/vega-icon.entry.js +6 -6
  240. package/dist/esm/vega-image-uploader.entry.js +13 -13
  241. package/dist/esm/vega-input-credit-card.entry.js +14 -14
  242. package/dist/esm/vega-input-numeric.entry.js +14 -14
  243. package/dist/esm/vega-input-passcode.entry.js +13 -13
  244. package/dist/esm/vega-input-phone-number.entry.js +11 -11
  245. package/dist/esm/vega-input-range.entry.js +10 -10
  246. package/dist/esm/vega-input-select.entry.js +13 -13
  247. package/dist/esm/vega-input.entry.js +15 -15
  248. package/dist/esm/{vega-internal-event-id-22151a4d.js → vega-internal-event-id-827eb1ce.js} +1 -1
  249. package/dist/esm/vega-item-toggle.entry.js +3 -3
  250. package/dist/esm/vega-left-nav_5.entry.js +14 -14
  251. package/dist/esm/vega-loader-wrapper_2.entry.js +4 -4
  252. package/dist/esm/vega-page-notification_2.entry.js +1 -1
  253. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
  254. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +4 -4
  255. package/dist/esm/vega-pagination.entry.js +10 -10
  256. package/dist/esm/vega-popover_2.entry.js +14 -14
  257. package/dist/esm/vega-progress-tracker_2.entry.js +10 -10
  258. package/dist/esm/vega-radio_2.entry.js +13 -13
  259. package/dist/esm/vega-rich-text-content.entry.js +10 -10
  260. package/dist/esm/vega-rich-text-editor_4.entry.js +227 -55
  261. package/dist/esm/vega-rich-text-find-replace-panel.entry.js +229 -0
  262. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +8 -8
  263. package/dist/esm/vega-rich-text-table-properties_3.entry.js +14 -14
  264. package/dist/esm/vega-segment-control.entry.js +3 -3
  265. package/dist/esm/vega-selection-chip_2.entry.js +13 -13
  266. package/dist/esm/vega-selection-tile_2.entry.js +11 -11
  267. package/dist/esm/vega-sidenav_3.entry.js +10 -10
  268. package/dist/esm/vega-signature-capture.entry.js +14 -14
  269. package/dist/esm/vega-stepper.entry.js +9 -9
  270. package/dist/esm/vega-tab-group_2.entry.js +5 -5
  271. package/dist/esm/vega-table_11.entry.js +12 -12
  272. package/dist/esm/vega-textarea.entry.js +10 -10
  273. package/dist/esm/vega-time-picker_2.entry.js +16 -16
  274. package/dist/esm/vega-toggle-switch.entry.js +7 -7
  275. package/dist/esm/vega-tooltip_2.entry.js +8 -8
  276. package/dist/esm/vega.js +17 -16
  277. package/dist/esm/{wait-for-component-did-render-0488922a.js → wait-for-component-did-render-0c237cb8.js} +1 -1
  278. package/dist/esm/xmark-large-c5ae7944.js +5 -0
  279. package/dist/sri/vega-sri-manifest.json +387 -375
  280. package/dist/types/components/vega-accordion/slimmers/vega-accordion-renderer.d.ts +2 -0
  281. package/dist/types/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.d.ts +1 -0
  282. package/dist/types/components/vega-field-label/types.d.ts +12 -0
  283. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.d.ts +9 -0
  284. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/delete-selected-content-strategy.d.ts +13 -0
  285. package/dist/types/components/vega-rich-text-editor/dto/actions/delete-selected-content-action.d.ts +12 -0
  286. package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -1
  287. package/dist/types/components/vega-rich-text-editor/dto/range.d.ts +16 -0
  288. package/dist/types/components/vega-rich-text-editor/extensions/copy/action-handler-strategies/copy-selected-content-strategy.d.ts +79 -0
  289. package/dist/types/components/vega-rich-text-editor/extensions/copy/actions/copy-selected-content-action.d.ts +18 -0
  290. package/dist/types/components/vega-rich-text-editor/extensions/copy/copy-extension.d.ts +10 -0
  291. package/dist/types/components/vega-rich-text-editor/extensions/copy/copy-toolbar-button-renderer.d.ts +36 -0
  292. package/dist/types/components/vega-rich-text-editor/extensions/cut/cut-extension.d.ts +11 -0
  293. package/dist/types/components/vega-rich-text-editor/extensions/cut/cut-toolbar-button-renderer.d.ts +24 -0
  294. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/assets/find-and-replace.d.ts +3 -0
  295. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/find-replace-extension.d.ts +15 -0
  296. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-controller.d.ts +65 -0
  297. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-replace-controller.abstract.d.ts +65 -0
  298. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/block-search-strategy.abstract.d.ts +29 -0
  299. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/code-block-search-strategy.d.ts +17 -0
  300. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/container-block-search-strategy.d.ts +21 -0
  301. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/list-item-block-search-strategy.d.ts +21 -0
  302. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/text-block-search-strategy.d.ts +18 -0
  303. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-highlight-manager.d.ts +88 -0
  304. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-state.d.ts +200 -0
  305. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/replace-controller.d.ts +73 -0
  306. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/renderers/find-replace-toolbar-button-renderer.d.ts +64 -0
  307. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/slimmers/renderers/find-replace-panel-renderer.d.ts +28 -0
  308. package/dist/types/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/vega-rich-text-find-replace-panel.d.ts +56 -0
  309. package/dist/types/components/vega-rich-text-editor/extensions/functions/function-extension.d.ts +1 -0
  310. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.d.ts +1 -0
  311. package/dist/types/components/vega-rich-text-editor/extensions/languages/language-extension.d.ts +1 -0
  312. package/dist/types/components/vega-rich-text-editor/extensions/line-height/line-height-extension.d.ts +1 -0
  313. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/special-characters-extension.d.ts +1 -0
  314. package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +1 -0
  315. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-extension.d.ts +1 -0
  316. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +4 -0
  317. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.d.ts +60 -0
  318. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.d.ts +8 -0
  319. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.d.ts +8 -0
  320. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +2 -1
  321. package/dist/types/components.d.ts +34 -0
  322. package/dist/types/global/icons/copy.d.ts +3 -0
  323. package/dist/types/helpers/translation/interface.d.ts +15 -1
  324. package/dist/types/types/ui.type.d.ts +1 -1
  325. package/dist/vega/index.esm.js +1 -1
  326. package/dist/vega/{p-cb4033ef.js → p-0179f55d.js} +1 -1
  327. package/dist/vega/{p-8bc23bcf.entry.js → p-06c2ce2c.entry.js} +1 -1
  328. package/dist/vega/{p-fb1ef3e6.entry.js → p-07b56f2b.entry.js} +1 -1
  329. package/dist/vega/{p-141f74ff.js → p-136226f8.js} +1 -1
  330. package/dist/vega/{p-e9a82603.entry.js → p-18413b62.entry.js} +1 -1
  331. package/dist/vega/p-209e0166.js +1 -0
  332. package/dist/vega/{p-014e2cf9.js → p-228c5de8.js} +1 -1
  333. package/dist/vega/{p-cc8bf6e7.entry.js → p-22f73e6e.entry.js} +1 -1
  334. package/dist/vega/p-2314494a.entry.js +1 -0
  335. package/dist/vega/p-2353b64f.entry.js +1 -0
  336. package/dist/vega/p-29e3eb12.js +1 -0
  337. package/dist/vega/p-2da12975.entry.js +1 -0
  338. package/dist/vega/{p-8019c156.js → p-2def8e3e.js} +1 -1
  339. package/dist/vega/{p-5bed3fd2.entry.js → p-2e58d99e.entry.js} +1 -1
  340. package/dist/vega/{p-bb0040d4.entry.js → p-30561e1d.entry.js} +1 -1
  341. package/dist/vega/{p-fc103347.entry.js → p-35df0f0a.entry.js} +1 -1
  342. package/dist/vega/{p-15da9d58.entry.js → p-37dffdf6.entry.js} +1 -1
  343. package/dist/vega/{p-5ffc7cb8.js → p-3a68b729.js} +1 -1
  344. package/dist/vega/{p-507612f6.entry.js → p-3cf4339a.entry.js} +1 -1
  345. package/dist/vega/{p-4cef4812.js → p-3f183b52.js} +1 -1
  346. package/dist/vega/{p-42ed76ee.entry.js → p-40501057.entry.js} +1 -1
  347. package/dist/vega/{p-12b5c5e3.entry.js → p-438b7404.entry.js} +1 -1
  348. package/dist/vega/{p-8982796b.entry.js → p-43c3848f.entry.js} +1 -1
  349. package/dist/vega/{p-9756c6b9.entry.js → p-450bf94d.entry.js} +1 -1
  350. package/dist/vega/{p-0e03daa6.js → p-45ab490c.js} +1 -1
  351. package/dist/vega/{p-94845302.entry.js → p-481601c0.entry.js} +1 -1
  352. package/dist/vega/{p-0707aa21.js → p-4953bb1a.js} +1 -1
  353. package/dist/vega/{p-2b22091e.js → p-4d9061fb.js} +1 -1
  354. package/dist/vega/{p-b2f9698a.entry.js → p-4e39adf5.entry.js} +1 -1
  355. package/dist/vega/{p-316a1e5c.entry.js → p-5038b6d7.entry.js} +1 -1
  356. package/dist/vega/{p-3cf298a4.entry.js → p-5319da71.entry.js} +1 -1
  357. package/dist/vega/p-53c76d9d.entry.js +1 -0
  358. package/dist/vega/{p-64b5fe2a.entry.js → p-5545a235.entry.js} +1 -1
  359. package/dist/vega/{p-c75872a4.entry.js → p-56cf1a65.entry.js} +1 -1
  360. package/dist/vega/{p-216ef41e.entry.js → p-5829a66d.entry.js} +1 -1
  361. package/dist/vega/p-590c8720.entry.js +1 -0
  362. package/dist/vega/{p-5e282e41.js → p-5946fadf.js} +1 -1
  363. package/dist/vega/{p-822f70b0.js → p-5beec481.js} +1 -1
  364. package/dist/vega/p-5de1acdb.js +1 -0
  365. package/dist/vega/p-5df9047c.js +1 -0
  366. package/dist/vega/p-5f377954.js +1 -1
  367. package/dist/vega/{p-aaa6e976.entry.js → p-625351a3.entry.js} +1 -1
  368. package/dist/vega/p-683cfe24.js +1 -0
  369. package/dist/vega/p-68e16c70.entry.js +1 -0
  370. package/dist/vega/{p-ef44d516.js → p-70817cf5.js} +1 -1
  371. package/dist/vega/{p-a14d8767.js → p-71e2a3ec.js} +1 -1
  372. package/dist/vega/{p-a4826f3f.entry.js → p-7798254d.entry.js} +1 -1
  373. package/dist/vega/p-7be548a7.js +1 -0
  374. package/dist/vega/{p-4037126d.js → p-802bf369.js} +1 -1
  375. package/dist/vega/{p-b77e85e0.entry.js → p-82279b03.entry.js} +1 -1
  376. package/dist/vega/{p-f362c07b.entry.js → p-8509c140.entry.js} +1 -1
  377. package/dist/vega/p-88a6c89a.js +1 -0
  378. package/dist/vega/p-890a5254.js +1 -0
  379. package/dist/vega/p-8aa07ed0.js +1 -0
  380. package/dist/vega/{p-da2b1fd0.entry.js → p-8b9a8603.entry.js} +1 -1
  381. package/dist/vega/{p-14bfc113.js → p-8bc15ed0.js} +1 -1
  382. package/dist/vega/{p-aea912ac.js → p-8d69b201.js} +1 -1
  383. package/dist/vega/p-8da860f6.js +1 -0
  384. package/dist/vega/{p-329c808e.entry.js → p-8f078d0d.entry.js} +1 -1
  385. package/dist/vega/p-916dfa7e.entry.js +1 -0
  386. package/dist/vega/{p-42a1d300.entry.js → p-9219201a.entry.js} +1 -1
  387. package/dist/vega/{p-cd2a1ffb.js → p-92823583.js} +1 -1
  388. package/dist/vega/{p-cec8ffdc.js → p-93dfab05.js} +1 -1
  389. package/dist/vega/{p-7f086e54.entry.js → p-9440a8a5.entry.js} +1 -1
  390. package/dist/vega/p-970115d6.js +1 -0
  391. package/dist/vega/{p-da067259.entry.js → p-9b1d718c.entry.js} +1 -1
  392. package/dist/vega/{p-c65a5778.entry.js → p-9cdedcfb.entry.js} +1 -1
  393. package/dist/vega/{p-6e7c1b19.entry.js → p-9fafc956.entry.js} +1 -1
  394. package/dist/vega/{p-70352240.entry.js → p-a268a4fb.entry.js} +1 -1
  395. package/dist/vega/{p-cd21adb8.js → p-a2bd621e.js} +1 -1
  396. package/dist/vega/p-a361456d.js +1 -0
  397. package/dist/vega/{p-73b9868f.js → p-aa32f2f3.js} +1 -1
  398. package/dist/vega/p-b6225d01.js +1 -0
  399. package/dist/vega/{p-58a00869.entry.js → p-b6ebfd5c.entry.js} +1 -1
  400. package/dist/vega/{p-fea33425.js → p-b730bf6e.js} +1 -1
  401. package/dist/vega/{p-81591449.entry.js → p-b799fc1f.entry.js} +1 -1
  402. package/dist/vega/{p-4644ccf9.entry.js → p-c0629528.entry.js} +1 -1
  403. package/dist/vega/{p-50d7a1c4.entry.js → p-c2e0f8b7.entry.js} +1 -1
  404. package/dist/vega/{p-522dd15f.entry.js → p-c67ce78c.entry.js} +1 -1
  405. package/dist/vega/{p-6ecb3c7d.entry.js → p-c78aeaf3.entry.js} +1 -1
  406. package/dist/vega/{p-5df53125.entry.js → p-c78e8081.entry.js} +1 -1
  407. package/dist/vega/{p-1acd5f04.entry.js → p-c8eaf91c.entry.js} +1 -1
  408. package/dist/vega/p-ca9852bb.js +1 -0
  409. package/dist/vega/{p-ce27c273.entry.js → p-cd1844ad.entry.js} +1 -1
  410. package/dist/vega/{p-a04b95aa.entry.js → p-cd9fb2ca.entry.js} +1 -1
  411. package/dist/vega/p-ce7e9515.entry.js +1 -0
  412. package/dist/vega/p-d0ce752f.entry.js +1 -0
  413. package/dist/vega/{p-044496e0.entry.js → p-d20587b4.entry.js} +1 -1
  414. package/dist/vega/{p-ae728041.entry.js → p-d3c8b871.entry.js} +1 -1
  415. package/dist/vega/{p-c87c7ef4.js → p-d7369441.js} +1 -1
  416. package/dist/vega/p-de885ef2.js +1 -0
  417. package/dist/vega/{p-b7b0930a.entry.js → p-dee38163.entry.js} +1 -1
  418. package/dist/vega/{p-6820b488.entry.js → p-e160a727.entry.js} +1 -1
  419. package/dist/vega/{p-49b4ab2b.js → p-e371738b.js} +1 -1
  420. package/dist/vega/{p-4979fd7d.js → p-e3803943.js} +1 -1
  421. package/dist/vega/p-e41d9d0e.entry.js +1 -0
  422. package/dist/vega/p-e5502873.entry.js +1 -0
  423. package/dist/vega/{p-5fcb825c.entry.js → p-e9cee498.entry.js} +1 -1
  424. package/dist/vega/p-ea22cba0.js +1 -0
  425. package/dist/vega/p-ea54ce0a.js +3 -0
  426. package/dist/vega/p-ee3155bd.js +1 -0
  427. package/dist/vega/{p-0605c656.entry.js → p-eee01ba7.entry.js} +1 -1
  428. package/dist/vega/{p-3fe43f7a.entry.js → p-ef2b9846.entry.js} +1 -1
  429. package/dist/vega/p-f0bc2bbb.js +1 -0
  430. package/dist/vega/{p-3863187f.entry.js → p-f365601c.entry.js} +1 -1
  431. package/dist/vega/p-f4a01959.js +1 -0
  432. package/dist/vega/{p-9e327397.entry.js → p-f515d189.entry.js} +1 -1
  433. package/dist/vega/{p-b504a8b4.entry.js → p-f5aefb2f.entry.js} +1 -1
  434. package/dist/vega/{p-2f48162f.entry.js → p-f6bccb06.entry.js} +1 -1
  435. package/dist/vega/{p-e75e75c9.entry.js → p-f70f7ad8.entry.js} +1 -1
  436. package/dist/vega/{p-42f3c0b1.entry.js → p-f7739cbb.entry.js} +1 -1
  437. package/dist/vega/{p-335e3237.entry.js → p-fc5dfb52.entry.js} +1 -1
  438. package/dist/vega/p-fd70418f.js +1 -0
  439. package/dist/vega/vega.esm.js +1 -1
  440. package/package.json +1 -1
  441. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/delete-content-handler.js +0 -92
  442. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/delete-content-handler.d.ts +0 -26
  443. package/dist/vega/p-144d4b30.js +0 -1
  444. package/dist/vega/p-21775cc7.js +0 -1
  445. package/dist/vega/p-2944c76e.entry.js +0 -1
  446. package/dist/vega/p-3372f34a.entry.js +0 -1
  447. package/dist/vega/p-53ed3b1f.js +0 -1
  448. package/dist/vega/p-57f7c257.js +0 -1
  449. package/dist/vega/p-5a4e598f.js +0 -1
  450. package/dist/vega/p-5e1cd1cc.js +0 -1
  451. package/dist/vega/p-5e1ec2b8.entry.js +0 -1
  452. package/dist/vega/p-61d42e9b.entry.js +0 -1
  453. package/dist/vega/p-63ae5ada.entry.js +0 -1
  454. package/dist/vega/p-66905cbf.js +0 -1
  455. package/dist/vega/p-689070f9.entry.js +0 -1
  456. package/dist/vega/p-74fa0f5b.entry.js +0 -1
  457. package/dist/vega/p-7bb39b97.js +0 -1
  458. package/dist/vega/p-7f139b74.js +0 -1
  459. package/dist/vega/p-85d78ac1.js +0 -1
  460. package/dist/vega/p-92a144bc.js +0 -1
  461. package/dist/vega/p-9f608b97.js +0 -1
  462. package/dist/vega/p-aca134a3.entry.js +0 -1
  463. package/dist/vega/p-b2f89dbd.js +0 -1
  464. package/dist/vega/p-bd94b904.entry.js +0 -1
  465. package/dist/vega/p-c0c2a917.js +0 -3
  466. package/dist/vega/p-c40555c4.entry.js +0 -1
  467. package/dist/vega/p-d0060bdb.js +0 -1
  468. package/dist/vega/p-d00b3910.js +0 -1
  469. package/dist/vega/p-d14ddf80.js +0 -1
  470. package/dist/vega/p-dc78e8d6.js +0 -1
  471. package/dist/vega/p-ddc2d219.js +0 -1
  472. /package/dist/cjs/{feature-flag-controller-438a1510.js → feature-flag-controller-c19d0b58.js} +0 -0
  473. /package/dist/collection/{components/vega-code-block/assets → global/icons}/copy.js +0 -0
  474. /package/dist/esm/{feature-flag-controller-2a89f20c.js → feature-flag-controller-3fd04ea9.js} +0 -0
  475. /package/dist/types/components/{vega-code-block/assets/copy.d.ts → vega-rich-text-editor/assets/cut.d.ts} +0 -0
  476. /package/dist/vega/{p-bc73ce30.js → p-87a4d75f.js} +0 -0
@@ -1 +1 @@
1
- import{B as t,a as e,M as s,C as n,l as r,f as i,d as o}from"./p-9f608b97.js";import{c as a}from"./p-a841cf13.js";import{V as c}from"./p-3e09aeed.js";import"./p-6e1ab235.js";import{I as l,c as h}from"./p-afcd8f04.js";import{r as u}from"./p-528748fa.js";import{i as d}from"./p-2b22091e.js";import{g as p}from"./p-8b5d3a52.js";import{U as E,V as f}from"./p-c0c2a917.js";const L=[{payloadKey:"IS_OVERRIDECOLORS_METHOD_CALLED",payloadDescription:"Indicate if the method overrideColors of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"overrideColors"===e,payloadValue:()=>!0},{payloadKey:"IS_RESET_METHOD_CALLED",payloadDescription:"Indicate if the method reset of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"reset"===e,payloadValue:()=>!0},{payloadKey:"IS_TOGGLEDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method toggleDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"toggleDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_ISDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method isDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"isDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_APPLY_BRANDING_METHOD_CALLED",payloadDescription:"Indicate if the method applyBranding of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"applyBranding"===e,payloadValue:()=>!0},{payloadKey:"IS_VALIDATECOLORACCESSIBILITY_METHOD_CALLED",payloadDescription:"Indicate if the method validateColorAccessibility of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"validateColorAccessibility"===e,payloadValue:()=>!0}];class b{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=h(b,["overrideColors","reset","toggleDarkMode","isDarkMode","applyBranding","validateColorAccessibility"],L,"ThemeManager")}async overrideColors(t){c.overrideColors(t)}async reset(){c.reset()}toggleDarkMode(t){c.toggleDarkMode(t)}isDarkMode(){return c.isDarkMode()}applyBranding(t){c.applyBranding(t)}async validateColorAccessibility(t){return c.validateColorAccessibility(t)}}!function(t,e,s,n){var r,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,s,o):r(e,s))||o);i>3&&o&&Object.defineProperty(e,s,o)}([l()],b.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const g=new b,C=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],T=[{key:"white",dark:"#04041C",light:"#FCFCFC"},{key:"red",dark:"#AA091C",light:"#FF4C61"},{key:"orange",dark:"#974502",light:"#FDAB68"},{key:"yellow",dark:"#735C00",light:"#FFDC4C"},{key:"green",dark:"#2E6D18",light:"#7BDA58"},{key:"teal",dark:"#287171",light:"#7BD1D1"},{key:"gray",dark:"#595959",light:"#999999"},{key:"black",dark:"#FCFCFC",light:"#04041C"}],_={key:"default-head-bg",dark:"#181830",light:"#F0F3F7"};class m{static getTableColors(){return m.TABLE_COLORS}static setTableColors(t){m.TABLE_COLORS=t}static getColorKey(t,e=!1){var s;let n=null;const r=m.TABLE_COLORS,i=e?[...r,_]:r;if(i){const e=null===(s=u(t))||void 0===s?void 0:s.toUpperCase();if(e)n=i.find((t=>g.isDarkMode()?t.dark===e:t.light===e));else for(const e of i)if(e.key===t){n=e;break}}return n?n.key:""}}m.TABLE_COLORS=T;class O extends t{constructor(t){super(),this.type=A.COLOR,this.colorKey=t,t&&(this.color=this.formatColor(t))}renderStyle(){return{color:this.color?c.isDarkMode()?this.color.dark:this.color.light:this.colorKey||""}}renderClass(){return null}toJSON(){var t;return{color:(null===(t=this.color)||void 0===t?void 0:t.key)||this.colorKey||""}}clone(){return new O(this.colorKey)}formatColor(t){return m.getTableColors().find((e=>e.key===t))}}var A,S;!function(t){t.TABLE="EXTENSION_TABLE",t.CELL="EXTENSION_TABLE_CELL",t.CAPTION="EXTENSION_TABLE_CAPTION",t.COLOR="EXTENSION_TABLE_COLOR"}(A||(A={}));class y extends t{constructor({backgroundColor:t,border:e,width:s,height:n,alignment:r,borderCollapse:i}={},o=!0){super(),this.type=A.TABLE,this.useInternalStyle=o,this.backgroundColor=t,this.border=e,this.width=s,this.height=n,this.alignment=o&&void 0===r?y.DEFAULT_ALIGNMENT:r,this.backgroundColorAnnotation=new O(t),this.borderColorAnnotation=new O(null==e?void 0:e.color),this.borderCollapse=o&&void 0===i?y.DEFAULT_BORDER_COLLAPSE:i}static from(t,e=!0){return[A.TABLE,new y(t,e)]}static getDefaultStyles(){return{borderCollapse:y.DEFAULT_BORDER_COLLAPSE,margin:y.DEFAULT_ALIGNMENT_STYLE_VALUE}}get borderStr(){return this.border?`${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}clone(){return new y({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse},this.useInternalStyle)}toJSON(){return{table:a({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse})}}renderStyle(){const t=this.backgroundColorAnnotation.renderStyle().color,e=Object.assign({border:this.borderStr,width:this.width,height:this.height,borderCollapse:this.borderCollapse},this.renderAlignmentStyle());return t&&(e.backgroundColor=t),a(e)}renderClass(){return"v-rte--extension-table"}renderAlignmentStyle(){return this.alignment?{margin:"center"===this.alignment?y.DEFAULT_ALIGNMENT_STYLE_VALUE:"left"===this.alignment?"0":"0 0 0 auto"}:{}}}y.DEFAULT_BORDER_COLLAPSE="collapse",y.DEFAULT_ALIGNMENT="center",y.DEFAULT_ALIGNMENT_STYLE_VALUE="0 auto";class w extends e{constructor(t,e){super(t),this.dtoName=w.dtoName,this.type="table-block",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.TABLE,new y)}static from(t,e){var s;const n=new w(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),n.children=super.generateBlockChildren(t.children,e,n),(null===(s=t.annotations)||void 0===s?void 0:s.table)&&n.annotationMap.set(...y.from(t.annotations.table,null==e?void 0:e.autoMatchFormat)),n}clone(t){const e=new w(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}getFirstNode(){return this.hasCaption()?this.children[0].children[0].getLastNode():this.children[0].children[0].children[0].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<table${super.generateAttributeString(t)}>${e}</table>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCaption(){const t=this.children.find((t=>"table-caption"===t.type));return null!=t?t:null}setCaption(t){const e=this.children.findIndex((t=>"table-caption"===t.type));t?(t.parent=this,e>=0?this.children[e]=t:this.children.unshift(t)):e>=0&&this.children.splice(e,1)}hasCaption(){return d(this.getCaption())}}w.dtoName="RTETableBlock",function(t){t.ROW="ROW",t.CAPTION="CAPTION",t.COLUMN="COLUMN",t.MERGE_CELLS="MERGE_CELLS",t.TABLE="TABLE",t.CELL="CELL",t.SPLIT_CELL="SPLIT_CELL"}(S||(S={}));class R{syncCursorPosition(t,e){const s=this.findRootContent(t);if(e&&s){const t=e.getRangeEndOffset();s.apply(new E(e,t))}}findRootContent(t){let e=t.parent;for(;e;){if(e instanceof f)return e;e=e.parent}}}const N="DELETE_TABLE_ROW";class M extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_ROW",this.rowsToBeRemoved=t}}const I="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION";class D extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const v="INSERT_TABLE_ROW_INTO_SAME_SECTION";var x;!function(t){t.ABOVE="ABOVE",t.BELOW="BELOW"}(x||(x={}));class k extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_SAME_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const B="TOGGLE_HEADER_ROW";class j extends s{constructor(t){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_ROW",this.selectedRows=t}}class H extends e{constructor(t){super(t),this.dtoName=H.dtoName,this.type="table-body",this.children=[]}static from(t,e){const s=new H(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new H(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tbody${super.generateAttributeString(t)}>${e}</tbody>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}H.dtoName="RTETableBodyBlock";class F extends e{constructor(t){super(t),this.dtoName=F.dtoName,this.type="table-head",this.children=[]}static from(t,e){const s=new F(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new F(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<thead${super.generateAttributeString(t)}>${e}</thead>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}F.dtoName="RTETableHeadBlock";class $ extends e{constructor(t){super(t),this.dtoName=$.dtoName,this.type="table-row",this.children=[]}static from(t,e){const s=new $(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new $(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tr${super.generateAttributeString(t)}>${e}</tr>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}$.dtoName="RTETableRowBlock";class P extends t{constructor({backgroundColor:t,padding:e,border:s,width:n,height:r,textAlign:i,verticalAlign:o,minWidth:a,boxSizing:c}={},l=!0){super(),this.type=A.CELL,this.useInternalStyle=l,this.backgroundColor=t,this.width=n,this.height=r,this.border=l&&void 0===s?P.DEFAULT_BORDER:s,this.padding=l&&void 0===e?P.DEFAULT_PADDING:e,this.textAlign=l&&void 0===i?P.DEFAULT_HORIZONTAL_TEXT_ALIGN:i,this.verticalAlign=l&&void 0===o?P.DEFAULT_VERTICAL_TEXT_ALIGN:o,this.minWidth=l&&void 0===a?P.DEFAULT_CELL_MIN_WIDTH:a,this.boxSizing=l&&void 0===c?P.DEFAULT_BOX_SIZING:c}static from(t,e){return[A.CELL,new P(t,e)]}static getDefaultStyles(t=!0){return{padding:P.DEFAULT_PADDING,textAlign:P.DEFAULT_HORIZONTAL_TEXT_ALIGN,verticalAlign:P.DEFAULT_VERTICAL_TEXT_ALIGN,minWidth:P.DEFAULT_CELL_MIN_WIDTH,boxSizing:P.DEFAULT_BOX_SIZING,border:`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${t?P.DEFAULT_BORDER.color:P.DEFAULT_BORDER_RGB_COLOR}`}}get borderStr(){return this.border?`${this.border.style||""} ${this.border.width||""} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}set backgroundColor(t){this._backgroundColor=t,this.backgroundColorAnnotation=new O(t)}get backgroundColor(){return this._backgroundColor}set border(t){this._border=t,this.borderColorAnnotation=new O(null==t?void 0:t.color)}get border(){return this._border}clone(){return new P({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}toJSON(){return{tableCell:a({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing})}}renderStyle(t){const e=this.backgroundColorAnnotation.renderStyle().color,s={padding:this.padding,border:this.borderStr,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing};return e&&(s.backgroundColor=e),a((null==t?void 0:t.standalone)?s:this.removeDefaultValues(s),{cleanEmptyString:!0})}renderClass(){return null}removeDefaultValues(t){const e=Object.assign({},t);return e.padding===P.DEFAULT_PADDING&&delete e.padding,e.border===`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${P.DEFAULT_BORDER.color}`&&delete e.border,e.textAlign===P.DEFAULT_HORIZONTAL_TEXT_ALIGN&&delete e.textAlign,e.verticalAlign===P.DEFAULT_VERTICAL_TEXT_ALIGN&&delete e.verticalAlign,e.minWidth===P.DEFAULT_CELL_MIN_WIDTH&&delete e.minWidth,e.boxSizing===P.DEFAULT_BOX_SIZING&&delete e.boxSizing,e}}P.DEFAULT_PADDING="12px",P.DEFAULT_BORDER={style:"solid",width:"1px",color:"#ddd"},P.DEFAULT_BORDER_RGB_COLOR="rgb(221, 221, 221)",P.DEFAULT_HORIZONTAL_TEXT_ALIGN="left",P.DEFAULT_VERTICAL_TEXT_ALIGN="middle",P.DEFAULT_CELL_MIN_WIDTH="55px",P.DEFAULT_BOX_SIZING="border-box";class W extends e{constructor(t,e){super(t),this.dtoName=W.dtoName,this.type="table-cell",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new P)}static from(t,e){var s;const n=new W(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...P.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new W(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}get rowSpan(){const t=this.getCustomAttributeByName("rowspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}get colSpan(){const t=this.getCustomAttributeByName("colspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<td${super.generateAttributeString(t)}>${e}</td>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCustomAttributeByName(t){const e=this.getCustomAttributesAnnotation();if(e)return(e.toJSON().customAttribute||{})[t]}}W.dtoName="RTETableCellBlock";class G extends P{constructor(t={},e=!0){super(t,e)}static from(t,e){return[A.CELL,new G(t,e)]}static getDefaultBackgroundColor(){return c.isDarkMode()?_.dark:_.light}clone(){return new G({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}renderStyle(t){var e;const s=super.renderStyle(t);return a(Object.assign(Object.assign({},s),{backgroundColor:null!==(e=s.backgroundColor)&&void 0!==e?e:G.getDefaultBackgroundColor()}))}}class V extends W{constructor(t,e){super(t,e),this.dtoName=V.dtoName,this.type="table-head-cell";const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new G)}static from(t,e){var s;const n=new V(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...G.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new V(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<th${super.generateAttributeString(t)}>${e}</th>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}V.dtoName="RTETableHeadCellBlock";const U="MERGE_CELLS";class J extends s{constructor(t,e,s,n,r){super(),this.type="MERGE_CELLS",this.isFlushable=!0,this.targetCell=t,this.mergeCells=e,this.colSpan=s,this.rowSpan=n,this.direction=r}}var K,Y;!function(t){t.MERGE_CELLS="MERGE_CELLS",t.MERGE_CELL_UP="MERGE_CELL_UP",t.MERGE_CELL_RIGHT="MERGE_CELL_RIGHT",t.MERGE_CELL_DOWN="MERGE_CELL_DOWN",t.MERGE_CELL_LEFT="MERGE_CELL_LEFT"}(K||(K={}));class z extends R{canHandle(t){return t[0]===S.MERGE_CELLS}execute(t,e){const s=e.tableSelection.getSelectedCells(),n=t[1];switch(n){case K.MERGE_CELL_UP:case K.MERGE_CELL_RIGHT:case K.MERGE_CELL_DOWN:case K.MERGE_CELL_LEFT:{const t=this.getDirectionMergeCells(n,s[0]);this.handleMergeCells(t,n)}break;default:s.length>1&&this.handleMergeCells(s,K.MERGE_CELLS)}}getDirectionMergeCells(t,e){const s=it(e,t);if(!s)return[e];switch(t){case K.MERGE_CELL_UP:return[s,e];case K.MERGE_CELL_DOWN:return[e,s];case K.MERGE_CELL_LEFT:return[s,e];default:return[e,s]}}handleMergeCells(t,e){if(t.length<2)return;const s=ot(t),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:a}=s,c=new J(a,t,o-i+1,r-n+1,e);this.applyActionOnTable(c,a)}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}function X(t,e){return t?t instanceof e?t:X(t.parent,e):null}function Z(t,e){return{id:p(),type:"table-body",children:Array.from({length:t},(()=>function(t){return{id:p(),type:"table-row",children:Array.from({length:t},(()=>et("table-cell")))}}(e)))}}function q(t){return t.children.filter((t=>t instanceof H||t instanceof F)).flatMap((t=>t.children))}function Q(t){if(!t||!t.children||!t.children[0])return null;const e=t.children[0];return e instanceof i?e:Q(e)}function tt(t,e){for(const s of t){const t=s.children.find((t=>t.id===e));if(t)return t}return null}function et(t){const e=p();return{id:e,type:t,children:[{id:`${e}-p`,type:"paragraph",nodes:[{id:`${e}-p-t`,type:"text",text:""}]}]}}function st(t){return{colSpan:t.colSpan,rowSpan:t.rowSpan}}function nt(t,e,s){const n=null!=s?s:rt(e);for(let e=0;e<n.length;e++){const s=n[e];for(let e=0;e<s.length;e++)if(s[e]===t.id)return e}return-1}function rt(t){const e=[];return t.forEach(((t,s)=>{e[s]||(e[s]=[]);let n=0;t.children.forEach((t=>{const{colSpan:r,rowSpan:i}=st(t);for(;void 0!==e[s][n];)n++;for(let o=0;o<i;o++)for(let i=0;i<r;i++)e[s+o]||(e[s+o]=[]),e[s+o][n+i]=t.id;n+=r}))})),e}function it(t,e){if(!t)return null;const s=t.parent,n=s.parent.children,r=n.indexOf(s),{colSpan:i,rowSpan:o}=st(t),a=nt(t,n);let c=r,l=a;switch(e){case K.MERGE_CELL_LEFT:l=a-1;break;case K.MERGE_CELL_RIGHT:l=a+i;break;case K.MERGE_CELL_UP:c=r-1;break;default:c=r+o}return function(t,e,s){const n=rt(t);for(let r=0;r<t.length;r++){const i=t[r];for(const o of i.children){const{colSpan:i,rowSpan:a}=st(o),c=nt(o,t,n),l=r+a-1,h=c+i-1,u=s>=c&&s<=h;if(e>=r&&e<=l&&u)return o}}return null}(n,c,l)}function ot(t){const e=t[0].parent.parent.children,s=rt(e);let n=Number.POSITIVE_INFINITY,r=-1,i=Number.POSITIVE_INFINITY,o=-1;const a=new Set;return t.forEach((t=>{const c=e.indexOf(t.parent),l=nt(t,e,s),{colSpan:h,rowSpan:u}=st(t),d=c,p=c+u-1,E=l,f=l+h-1;for(let t=d;t<=p;t++)for(let e=E;e<=f;e++)a.add(`${t},${e}`);n=Math.min(n,d),r=Math.max(r,p),i=Math.min(i,E),o=Math.max(o,f)})),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:t[0],coveredPositions:a}}function at(t){let e=0;const s=q(t)[0];for(const t of s.children){const{colSpan:s}=st(t);e+=s}return e}function ct(t){if(1===t.length)return!0;const e=ot(t),{minRow:s,maxRow:n,minCol:r,maxCol:i,coveredPositions:o}=e;return o.size===(n-s+1)*(i-r+1)}function lt(t,e,s,i,o){const a=t.annotationMap.get(n.CUSTOM_ATTRIBUTE),c=a?Object.assign({},a.customAttribute):{};delete c.colspan,delete c.rowspan,e>1&&(c.colspan=String(e));const l=at(i)+(o?1:0);if(s>1&&e!==l&&(c.rowspan=String(s)),Object.keys(c).length>0){const e=new r(c);t.annotationMap.set(n.CUSTOM_ATTRIBUTE,e)}else t.annotationMap.delete(n.CUSTOM_ATTRIBUTE)}function ht(t){const e=et(t);return"table-head-cell"===t?V.from(e):W.from(e)}function ut(t,e,s){for(let n=0;n<s;n++){const s=t[n],r=e.children.find((t=>t.id===s));if(r&&!(r instanceof V))return n}return-1}function dt(t){const e=new Map;return t.forEach((t=>{for(let s=0;s<t.length;s++){const n=t[s];n&&!e.has(n)&&e.set(n,s)}})),e}function pt(t,e,s,n){if(0===t.length)return[0,-1];const r=s||q(e),i=null!=n?n:rt(r);let o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const e=nt(t,r,i);o=Math.min(o,e),a=Math.max(a,e)})),[o,a]}!function(t){t.HEADER_ROW="HEADER_ROW",t.ADD_ROW_ABOVE="ADD_ROW_ABOVE",t.ADD_ROW_BELOW="ADD_ROW_BELOW",t.DELETE_ROW="DELETE_ROW",t.SELECT_ROW="SELECT_ROW"}(Y||(Y={}));class Et extends R{canHandle(t){return t[0]===S.ROW}execute(t,e){const s=t[1];switch(s){case Y.ADD_ROW_ABOVE:case Y.ADD_ROW_BELOW:this.handleInsertRow(s,e);break;case Y.DELETE_ROW:this.handleDeleteRow(e);break;case Y.HEADER_ROW:this.handleToggleHeader(e);break;case Y.SELECT_ROW:this.handleSelectRow(e)}}handleInsertRow(t,e){const s=this.getAllSelectedRows(e);if(s.length>0){const e=t===Y.ADD_ROW_ABOVE?x.ABOVE:x.BELOW,n=e===x.ABOVE?s[0]:s[s.length-1],r=n.parent instanceof H,i=this.shouldInsertHeaderRow(n,e)||r?new k(e,s):new D(e,s);this.applyActionToTable(s[0],i)}}shouldInsertHeaderRow(t,e){if(e===x.ABOVE)return t.parent instanceof F;{const e=t.parent;return e instanceof F&&e.children[e.children.length-1]!==t}}handleDeleteRow(t){const e=this.getAllSelectedRows(t);if(e.length){const t=new M(e);this.applyActionToTable(e[0],t)}}handleToggleHeader(t){const e=this.getAllSelectedRows(t);if(e.length>0){const t=new j(e);this.applyActionToTable(e[0],t)}}handleSelectRow(t){const e=this.getAllSelectedRows(t);if(e.length>0&&t&&t.tableSelection){const s=e.flatMap((t=>t.children));t.tableSelection.setSelectedCells(s)}}getAllSelectedRows(t){const e=new Set;if(t&&t.tableSelection){const{tableSelection:s}=t;s.getSelectedCells().forEach((t=>{const s=X(t,$);s&&e.add(s)}))}return Array.from(e)}applyActionToTable(t,e){const s=X(t,w);s&&s.apply(e)}}const ft="REPLACE_TABLE_CELL";class Lt extends s{constructor(t){super(),this.isFlushable=!0,this.type="REPLACE_TABLE_CELL",this.payload=t}}const bt="SPLIT_TABLE_CELL";class gt extends s{constructor(t){super(),this.isFlushable=!0,this.type="SPLIT_TABLE_CELL",this.payload=t}}class Ct extends o{getBoundaryCellColumnRange(t,e,s){let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const i=nt(t,e,s);n=Math.min(n,i),r=Math.max(r,i)})),[n,r]}}class Tt extends Ct{static isFullHeaderSelection(t){if(0===t.length)return!1;const e=X(t[0],w);if(e){const s=q(e),n=rt(s),r=new Map;s.forEach((t=>{t.children.forEach((t=>r.set(t.id,t)))}));const[i,o]=pt(t,e,s,n);for(const t of n)for(let e=i;e<=o;e++){const s=r.get(t[e]);if(s&&!(s instanceof V))return!1}return!0}return!1}handleAction(t,e){const s=t.headerOn,n=q(e),r=rt(n),[i,o]=this.getBoundaryCellColumnRange(t.tableCellHeaderRange,n,r);(s||!s&&i>0)&&this.toggleHeadRows(e,n,r,s,o,i),this.toggleBodyRows(e,n,r,s,i,o);const a=this.getRootContent(e);if(a&&t.tableCellHeaderRange[0].parent){const e=t.tableCellHeaderRange[0].parent.getFirstNode();e&&a.apply(new E(e,0))}}toggleHeadRows(t,e,s,n,r,i){var o;const a=((null===(o=t.children.find((t=>t instanceof F)))||void 0===o?void 0:o.children)||[]).length;for(let o=0;o<a;o++)this.toggleCellType(t,e[o],s[o],0,n?r:i-1,(()=>!0),(t=>V.from(t.toJSON())))}toggleBodyRows(t,e,s,n,r,i){var o;const a=s[0].length,c=(null===(o=t.children.find((t=>t instanceof H)))||void 0===o?void 0:o.children)||[],l=e.length-c.length;for(let o=0;o<c.length;o++){const c=o+l,h=e[c],u=s[c],d=ut(u,h,a);n?d>-1&&this.toggleCellType(t,h,u,d,i,(t=>!(t instanceof V)),(t=>V.from(t.toJSON()))):this.toggleCellType(t,h,u,r,-1===d?a-1:d-1,(t=>t instanceof V),(t=>W.from(t.toJSON())))}}toggleCellType(t,e,s,n,r,i,o){for(let a=n;a<=r;a++){const n=s[a],c=e.children.find((t=>t.id===n));if(c&&i(c)){const i=s.indexOf(n),l={table:t,cell:c,col:a,cellStartCol:i,endCol:r,targetCellType:o(c).type},h=i+c.colSpan-1;if(h>r||i<a){if(e.apply(new gt(l)),h>r)return;a=h;continue}e.apply(new Lt(l))}c&&(a+=c.colSpan-1)}}}const _t="DELETE_TABLE_COLUMN";class mt extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_COLUMN",this.tableCellDeleteRange=t}}const Ot="INSERT_TABLE_COLUMN";var At;!function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(At||(At={}));class St extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="INSERT_TABLE_COLUMN",this.tableCellInsertRange=e,this.insertDirection=t}}const yt="SELECT_TABLE_COLUMN";class wt extends s{constructor(t,e){super(),this.type="SELECT_TABLE_COLUMN",this.tableCellSelectRange=t,this.selectCellCallback=e}}const Rt="TOGGLE_HEADER_TABLE_COLUMN";class Nt extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_TABLE_COLUMN",this.headerOn=!1,this.tableCellHeaderRange=t,this.headerOn=e}}var Mt;!function(t){t.HEADER_COLUMN="HEADER_COLUMN",t.ADD_COLUMN_LEFT="ADD_COLUMN_LEFT",t.ADD_COLUMN_RIGHT="ADD_COLUMN_RIGHT",t.DELETE_COLUMN="DELETE_COLUMN",t.SELECT_COLUMN="SELECT_COLUMN"}(Mt||(Mt={}));class It extends R{canHandle(t){return t[0]===S.COLUMN}execute(t,e){const s=e.tableSelection.getSelectedCells();if(!s||0===s.length)return;const n=t[1];switch(n){case Mt.ADD_COLUMN_LEFT:case Mt.ADD_COLUMN_RIGHT:this.handleInsertColumn(n,s);break;case Mt.DELETE_COLUMN:this.handleDeleteColumn(s);break;case Mt.SELECT_COLUMN:this.handleSelectColumn(s,e);break;case Mt.HEADER_COLUMN:this.handleToggleHeaderColumn(s)}}handleInsertColumn(t,e){const s=new St(t===Mt.ADD_COLUMN_LEFT?At.LEFT:At.RIGHT,e);this.applyActionOnTable(s,e[0])}handleDeleteColumn(t){const e=new mt(t);this.applyActionOnTable(e,t[0])}handleSelectColumn(t,e){const s=new wt(t,(t=>{e.tableSelection.setSelectedCells(t)}));this.applyActionOnTable(s,t[0])}handleToggleHeaderColumn(t){const e=!Tt.isFullHeaderSelection(t),s=new Nt(t,e);this.applyActionOnTable(s,t[0])}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}const Dt="SPLIT_CELL_HORIZONTALLY";class vt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_HORIZONTALLY"}}const xt="SPLIT_CELL_VERTICALLY";class kt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_VERTICALLY"}}var Bt;!function(t){t.SPLIT_CELL_HORIZONTALLY="SPLIT_CELL_HORIZONTALLY",t.SPLIT_CELL_VERTICALLY="SPLIT_CELL_VERTICALLY"}(Bt||(Bt={}));class jt extends R{canHandle(t){return t[0]===S.SPLIT_CELL}execute(t,e){const s=e.tableSelection.getSelectedCells();if(s&&1===s.length){const e=s[0];switch(t[1]){case Bt.SPLIT_CELL_HORIZONTALLY:this.handleSplitCellHorizontally(e);break;case Bt.SPLIT_CELL_VERTICALLY:this.handleSplitCellVertically(e)}}}handleSplitCellHorizontally(t){const e=new vt;t.apply(e)}handleSplitCellVertically(t){const e=new kt;t.apply(e)}}export{pt as $,$ as A,nt as B,It as C,x as D,T as E,I as F,v as G,N as H,At as I,B as J,Ot as K,_t as L,z as M,Rt as N,Tt as O,bt as P,ft as Q,A as R,R as S,S as T,Dt as U,g as V,xt as W,yt as X,U as Y,C as Z,Mt as _,_ as a,Y as a0,Bt as a1,ct as a2,it as a3,y as b,P as c,V as d,Et as e,jt as f,m as g,w as h,Z as i,W as j,F as k,H as l,X as m,G as n,Ct as o,q as p,rt as q,tt as r,lt as s,et as t,dt as u,at as v,Q as w,st as x,ht as y,K as z}
1
+ import{B as t,a as e,M as s,C as n,l as r,f as i,d as o}from"./p-f4a01959.js";import{c as a}from"./p-a841cf13.js";import{V as c}from"./p-3e09aeed.js";import"./p-6e1ab235.js";import{I as l,c as h}from"./p-afcd8f04.js";import{r as u}from"./p-528748fa.js";import{i as d}from"./p-4d9061fb.js";import{g as p}from"./p-8b5d3a52.js";import{U as E,V as f}from"./p-ea54ce0a.js";const L=[{payloadKey:"IS_OVERRIDECOLORS_METHOD_CALLED",payloadDescription:"Indicate if the method overrideColors of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"overrideColors"===e,payloadValue:()=>!0},{payloadKey:"IS_RESET_METHOD_CALLED",payloadDescription:"Indicate if the method reset of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"reset"===e,payloadValue:()=>!0},{payloadKey:"IS_TOGGLEDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method toggleDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"toggleDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_ISDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method isDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"isDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_APPLY_BRANDING_METHOD_CALLED",payloadDescription:"Indicate if the method applyBranding of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"applyBranding"===e,payloadValue:()=>!0},{payloadKey:"IS_VALIDATECOLORACCESSIBILITY_METHOD_CALLED",payloadDescription:"Indicate if the method validateColorAccessibility of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"validateColorAccessibility"===e,payloadValue:()=>!0}];class b{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=h(b,["overrideColors","reset","toggleDarkMode","isDarkMode","applyBranding","validateColorAccessibility"],L,"ThemeManager")}async overrideColors(t){c.overrideColors(t)}async reset(){c.reset()}toggleDarkMode(t){c.toggleDarkMode(t)}isDarkMode(){return c.isDarkMode()}applyBranding(t){c.applyBranding(t)}async validateColorAccessibility(t){return c.validateColorAccessibility(t)}}!function(t,e,s,n){var r,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,s,o):r(e,s))||o);i>3&&o&&Object.defineProperty(e,s,o)}([l()],b.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const g=new b,C=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],T=[{key:"white",dark:"#04041C",light:"#FCFCFC"},{key:"red",dark:"#AA091C",light:"#FF4C61"},{key:"orange",dark:"#974502",light:"#FDAB68"},{key:"yellow",dark:"#735C00",light:"#FFDC4C"},{key:"green",dark:"#2E6D18",light:"#7BDA58"},{key:"teal",dark:"#287171",light:"#7BD1D1"},{key:"gray",dark:"#595959",light:"#999999"},{key:"black",dark:"#FCFCFC",light:"#04041C"}],_={key:"default-head-bg",dark:"#181830",light:"#F0F3F7"};class m{static getTableColors(){return m.TABLE_COLORS}static setTableColors(t){m.TABLE_COLORS=t}static getColorKey(t,e=!1){var s;let n=null;const r=m.TABLE_COLORS,i=e?[...r,_]:r;if(i){const e=null===(s=u(t))||void 0===s?void 0:s.toUpperCase();if(e)n=i.find((t=>g.isDarkMode()?t.dark===e:t.light===e));else for(const e of i)if(e.key===t){n=e;break}}return n?n.key:""}}m.TABLE_COLORS=T;class O extends t{constructor(t){super(),this.type=A.COLOR,this.colorKey=t,t&&(this.color=this.formatColor(t))}renderStyle(){return{color:this.color?c.isDarkMode()?this.color.dark:this.color.light:this.colorKey||""}}renderClass(){return null}toJSON(){var t;return{color:(null===(t=this.color)||void 0===t?void 0:t.key)||this.colorKey||""}}clone(){return new O(this.colorKey)}formatColor(t){return m.getTableColors().find((e=>e.key===t))}}var A,S;!function(t){t.TABLE="EXTENSION_TABLE",t.CELL="EXTENSION_TABLE_CELL",t.CAPTION="EXTENSION_TABLE_CAPTION",t.COLOR="EXTENSION_TABLE_COLOR"}(A||(A={}));class y extends t{constructor({backgroundColor:t,border:e,width:s,height:n,alignment:r,borderCollapse:i}={},o=!0){super(),this.type=A.TABLE,this.useInternalStyle=o,this.backgroundColor=t,this.border=e,this.width=s,this.height=n,this.alignment=o&&void 0===r?y.DEFAULT_ALIGNMENT:r,this.backgroundColorAnnotation=new O(t),this.borderColorAnnotation=new O(null==e?void 0:e.color),this.borderCollapse=o&&void 0===i?y.DEFAULT_BORDER_COLLAPSE:i}static from(t,e=!0){return[A.TABLE,new y(t,e)]}static getDefaultStyles(){return{borderCollapse:y.DEFAULT_BORDER_COLLAPSE,margin:y.DEFAULT_ALIGNMENT_STYLE_VALUE}}get borderStr(){return this.border?`${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}clone(){return new y({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse},this.useInternalStyle)}toJSON(){return{table:a({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse})}}renderStyle(){const t=this.backgroundColorAnnotation.renderStyle().color,e=Object.assign({border:this.borderStr,width:this.width,height:this.height,borderCollapse:this.borderCollapse},this.renderAlignmentStyle());return t&&(e.backgroundColor=t),a(e)}renderClass(){return"v-rte--extension-table"}renderAlignmentStyle(){return this.alignment?{margin:"center"===this.alignment?y.DEFAULT_ALIGNMENT_STYLE_VALUE:"left"===this.alignment?"0":"0 0 0 auto"}:{}}}y.DEFAULT_BORDER_COLLAPSE="collapse",y.DEFAULT_ALIGNMENT="center",y.DEFAULT_ALIGNMENT_STYLE_VALUE="0 auto";class w extends e{constructor(t,e){super(t),this.dtoName=w.dtoName,this.type="table-block",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.TABLE,new y)}static from(t,e){var s;const n=new w(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),n.children=super.generateBlockChildren(t.children,e,n),(null===(s=t.annotations)||void 0===s?void 0:s.table)&&n.annotationMap.set(...y.from(t.annotations.table,null==e?void 0:e.autoMatchFormat)),n}clone(t){const e=new w(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}getFirstNode(){return this.hasCaption()?this.children[0].children[0].getLastNode():this.children[0].children[0].children[0].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<table${super.generateAttributeString(t)}>${e}</table>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCaption(){const t=this.children.find((t=>"table-caption"===t.type));return null!=t?t:null}setCaption(t){const e=this.children.findIndex((t=>"table-caption"===t.type));t?(t.parent=this,e>=0?this.children[e]=t:this.children.unshift(t)):e>=0&&this.children.splice(e,1)}hasCaption(){return d(this.getCaption())}}w.dtoName="RTETableBlock",function(t){t.ROW="ROW",t.CAPTION="CAPTION",t.COLUMN="COLUMN",t.MERGE_CELLS="MERGE_CELLS",t.TABLE="TABLE",t.CELL="CELL",t.SPLIT_CELL="SPLIT_CELL"}(S||(S={}));class R{syncCursorPosition(t,e){const s=this.findRootContent(t);if(e&&s){const t=e.getRangeEndOffset();s.apply(new E(e,t))}}findRootContent(t){let e=t.parent;for(;e;){if(e instanceof f)return e;e=e.parent}}}const N="DELETE_TABLE_ROW";class M extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_ROW",this.rowsToBeRemoved=t}}const I="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION";class D extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const v="INSERT_TABLE_ROW_INTO_SAME_SECTION";var x;!function(t){t.ABOVE="ABOVE",t.BELOW="BELOW"}(x||(x={}));class k extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_SAME_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const B="TOGGLE_HEADER_ROW";class j extends s{constructor(t){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_ROW",this.selectedRows=t}}class H extends e{constructor(t){super(t),this.dtoName=H.dtoName,this.type="table-body",this.children=[]}static from(t,e){const s=new H(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new H(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tbody${super.generateAttributeString(t)}>${e}</tbody>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}H.dtoName="RTETableBodyBlock";class F extends e{constructor(t){super(t),this.dtoName=F.dtoName,this.type="table-head",this.children=[]}static from(t,e){const s=new F(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new F(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<thead${super.generateAttributeString(t)}>${e}</thead>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}F.dtoName="RTETableHeadBlock";class $ extends e{constructor(t){super(t),this.dtoName=$.dtoName,this.type="table-row",this.children=[]}static from(t,e){const s=new $(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new $(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tr${super.generateAttributeString(t)}>${e}</tr>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}$.dtoName="RTETableRowBlock";class P extends t{constructor({backgroundColor:t,padding:e,border:s,width:n,height:r,textAlign:i,verticalAlign:o,minWidth:a,boxSizing:c}={},l=!0){super(),this.type=A.CELL,this.useInternalStyle=l,this.backgroundColor=t,this.width=n,this.height=r,this.border=l&&void 0===s?P.DEFAULT_BORDER:s,this.padding=l&&void 0===e?P.DEFAULT_PADDING:e,this.textAlign=l&&void 0===i?P.DEFAULT_HORIZONTAL_TEXT_ALIGN:i,this.verticalAlign=l&&void 0===o?P.DEFAULT_VERTICAL_TEXT_ALIGN:o,this.minWidth=l&&void 0===a?P.DEFAULT_CELL_MIN_WIDTH:a,this.boxSizing=l&&void 0===c?P.DEFAULT_BOX_SIZING:c}static from(t,e){return[A.CELL,new P(t,e)]}static getDefaultStyles(t=!0){return{padding:P.DEFAULT_PADDING,textAlign:P.DEFAULT_HORIZONTAL_TEXT_ALIGN,verticalAlign:P.DEFAULT_VERTICAL_TEXT_ALIGN,minWidth:P.DEFAULT_CELL_MIN_WIDTH,boxSizing:P.DEFAULT_BOX_SIZING,border:`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${t?P.DEFAULT_BORDER.color:P.DEFAULT_BORDER_RGB_COLOR}`}}get borderStr(){return this.border?`${this.border.style||""} ${this.border.width||""} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}set backgroundColor(t){this._backgroundColor=t,this.backgroundColorAnnotation=new O(t)}get backgroundColor(){return this._backgroundColor}set border(t){this._border=t,this.borderColorAnnotation=new O(null==t?void 0:t.color)}get border(){return this._border}clone(){return new P({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}toJSON(){return{tableCell:a({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing})}}renderStyle(t){const e=this.backgroundColorAnnotation.renderStyle().color,s={padding:this.padding,border:this.borderStr,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing};return e&&(s.backgroundColor=e),a((null==t?void 0:t.standalone)?s:this.removeDefaultValues(s),{cleanEmptyString:!0})}renderClass(){return null}removeDefaultValues(t){const e=Object.assign({},t);return e.padding===P.DEFAULT_PADDING&&delete e.padding,e.border===`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${P.DEFAULT_BORDER.color}`&&delete e.border,e.textAlign===P.DEFAULT_HORIZONTAL_TEXT_ALIGN&&delete e.textAlign,e.verticalAlign===P.DEFAULT_VERTICAL_TEXT_ALIGN&&delete e.verticalAlign,e.minWidth===P.DEFAULT_CELL_MIN_WIDTH&&delete e.minWidth,e.boxSizing===P.DEFAULT_BOX_SIZING&&delete e.boxSizing,e}}P.DEFAULT_PADDING="12px",P.DEFAULT_BORDER={style:"solid",width:"1px",color:"#ddd"},P.DEFAULT_BORDER_RGB_COLOR="rgb(221, 221, 221)",P.DEFAULT_HORIZONTAL_TEXT_ALIGN="left",P.DEFAULT_VERTICAL_TEXT_ALIGN="middle",P.DEFAULT_CELL_MIN_WIDTH="55px",P.DEFAULT_BOX_SIZING="border-box";class W extends e{constructor(t,e){super(t),this.dtoName=W.dtoName,this.type="table-cell",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new P)}static from(t,e){var s;const n=new W(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...P.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new W(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}get rowSpan(){const t=this.getCustomAttributeByName("rowspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}get colSpan(){const t=this.getCustomAttributeByName("colspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<td${super.generateAttributeString(t)}>${e}</td>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCustomAttributeByName(t){const e=this.getCustomAttributesAnnotation();if(e)return(e.toJSON().customAttribute||{})[t]}}W.dtoName="RTETableCellBlock";class G extends P{constructor(t={},e=!0){super(t,e)}static from(t,e){return[A.CELL,new G(t,e)]}static getDefaultBackgroundColor(){return c.isDarkMode()?_.dark:_.light}clone(){return new G({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}renderStyle(t){var e;const s=super.renderStyle(t);return a(Object.assign(Object.assign({},s),{backgroundColor:null!==(e=s.backgroundColor)&&void 0!==e?e:G.getDefaultBackgroundColor()}))}}class V extends W{constructor(t,e){super(t,e),this.dtoName=V.dtoName,this.type="table-head-cell";const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new G)}static from(t,e){var s;const n=new V(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...G.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new V(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<th${super.generateAttributeString(t)}>${e}</th>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}V.dtoName="RTETableHeadCellBlock";const U="MERGE_CELLS";class J extends s{constructor(t,e,s,n,r){super(),this.type="MERGE_CELLS",this.isFlushable=!0,this.targetCell=t,this.mergeCells=e,this.colSpan=s,this.rowSpan=n,this.direction=r}}var K,Y;!function(t){t.MERGE_CELLS="MERGE_CELLS",t.MERGE_CELL_UP="MERGE_CELL_UP",t.MERGE_CELL_RIGHT="MERGE_CELL_RIGHT",t.MERGE_CELL_DOWN="MERGE_CELL_DOWN",t.MERGE_CELL_LEFT="MERGE_CELL_LEFT"}(K||(K={}));class z extends R{canHandle(t){return t[0]===S.MERGE_CELLS}execute(t,e){const s=e.tableSelection.getSelectedCells(),n=t[1];switch(n){case K.MERGE_CELL_UP:case K.MERGE_CELL_RIGHT:case K.MERGE_CELL_DOWN:case K.MERGE_CELL_LEFT:{const t=this.getDirectionMergeCells(n,s[0]);this.handleMergeCells(t,n)}break;default:s.length>1&&this.handleMergeCells(s,K.MERGE_CELLS)}}getDirectionMergeCells(t,e){const s=it(e,t);if(!s)return[e];switch(t){case K.MERGE_CELL_UP:return[s,e];case K.MERGE_CELL_DOWN:return[e,s];case K.MERGE_CELL_LEFT:return[s,e];default:return[e,s]}}handleMergeCells(t,e){if(t.length<2)return;const s=ot(t),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:a}=s,c=new J(a,t,o-i+1,r-n+1,e);this.applyActionOnTable(c,a)}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}function X(t,e){return t?t instanceof e?t:X(t.parent,e):null}function Z(t,e){return{id:p(),type:"table-body",children:Array.from({length:t},(()=>function(t){return{id:p(),type:"table-row",children:Array.from({length:t},(()=>et("table-cell")))}}(e)))}}function q(t){return t.children.filter((t=>t instanceof H||t instanceof F)).flatMap((t=>t.children))}function Q(t){if(!t||!t.children||!t.children[0])return null;const e=t.children[0];return e instanceof i?e:Q(e)}function tt(t,e){for(const s of t){const t=s.children.find((t=>t.id===e));if(t)return t}return null}function et(t){const e=p();return{id:e,type:t,children:[{id:`${e}-p`,type:"paragraph",nodes:[{id:`${e}-p-t`,type:"text",text:""}]}]}}function st(t){return{colSpan:t.colSpan,rowSpan:t.rowSpan}}function nt(t,e,s){const n=null!=s?s:rt(e);for(let e=0;e<n.length;e++){const s=n[e];for(let e=0;e<s.length;e++)if(s[e]===t.id)return e}return-1}function rt(t){const e=[];return t.forEach(((t,s)=>{e[s]||(e[s]=[]);let n=0;t.children.forEach((t=>{const{colSpan:r,rowSpan:i}=st(t);for(;void 0!==e[s][n];)n++;for(let o=0;o<i;o++)for(let i=0;i<r;i++)e[s+o]||(e[s+o]=[]),e[s+o][n+i]=t.id;n+=r}))})),e}function it(t,e){if(!t)return null;const s=t.parent,n=s.parent.children,r=n.indexOf(s),{colSpan:i,rowSpan:o}=st(t),a=nt(t,n);let c=r,l=a;switch(e){case K.MERGE_CELL_LEFT:l=a-1;break;case K.MERGE_CELL_RIGHT:l=a+i;break;case K.MERGE_CELL_UP:c=r-1;break;default:c=r+o}return function(t,e,s){const n=rt(t);for(let r=0;r<t.length;r++){const i=t[r];for(const o of i.children){const{colSpan:i,rowSpan:a}=st(o),c=nt(o,t,n),l=r+a-1,h=c+i-1,u=s>=c&&s<=h;if(e>=r&&e<=l&&u)return o}}return null}(n,c,l)}function ot(t){const e=t[0].parent.parent.children,s=rt(e);let n=Number.POSITIVE_INFINITY,r=-1,i=Number.POSITIVE_INFINITY,o=-1;const a=new Set;return t.forEach((t=>{const c=e.indexOf(t.parent),l=nt(t,e,s),{colSpan:h,rowSpan:u}=st(t),d=c,p=c+u-1,E=l,f=l+h-1;for(let t=d;t<=p;t++)for(let e=E;e<=f;e++)a.add(`${t},${e}`);n=Math.min(n,d),r=Math.max(r,p),i=Math.min(i,E),o=Math.max(o,f)})),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:t[0],coveredPositions:a}}function at(t){let e=0;const s=q(t)[0];for(const t of s.children){const{colSpan:s}=st(t);e+=s}return e}function ct(t){if(1===t.length)return!0;const e=ot(t),{minRow:s,maxRow:n,minCol:r,maxCol:i,coveredPositions:o}=e;return o.size===(n-s+1)*(i-r+1)}function lt(t,e,s,i,o){const a=t.annotationMap.get(n.CUSTOM_ATTRIBUTE),c=a?Object.assign({},a.customAttribute):{};delete c.colspan,delete c.rowspan,e>1&&(c.colspan=String(e));const l=at(i)+(o?1:0);if(s>1&&e!==l&&(c.rowspan=String(s)),Object.keys(c).length>0){const e=new r(c);t.annotationMap.set(n.CUSTOM_ATTRIBUTE,e)}else t.annotationMap.delete(n.CUSTOM_ATTRIBUTE)}function ht(t){const e=et(t);return"table-head-cell"===t?V.from(e):W.from(e)}function ut(t,e,s){for(let n=0;n<s;n++){const s=t[n],r=e.children.find((t=>t.id===s));if(r&&!(r instanceof V))return n}return-1}function dt(t){const e=new Map;return t.forEach((t=>{for(let s=0;s<t.length;s++){const n=t[s];n&&!e.has(n)&&e.set(n,s)}})),e}function pt(t,e,s,n){if(0===t.length)return[0,-1];const r=s||q(e),i=null!=n?n:rt(r);let o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const e=nt(t,r,i);o=Math.min(o,e),a=Math.max(a,e)})),[o,a]}!function(t){t.HEADER_ROW="HEADER_ROW",t.ADD_ROW_ABOVE="ADD_ROW_ABOVE",t.ADD_ROW_BELOW="ADD_ROW_BELOW",t.DELETE_ROW="DELETE_ROW",t.SELECT_ROW="SELECT_ROW"}(Y||(Y={}));class Et extends R{canHandle(t){return t[0]===S.ROW}execute(t,e){const s=t[1];switch(s){case Y.ADD_ROW_ABOVE:case Y.ADD_ROW_BELOW:this.handleInsertRow(s,e);break;case Y.DELETE_ROW:this.handleDeleteRow(e);break;case Y.HEADER_ROW:this.handleToggleHeader(e);break;case Y.SELECT_ROW:this.handleSelectRow(e)}}handleInsertRow(t,e){const s=this.getAllSelectedRows(e);if(s.length>0){const e=t===Y.ADD_ROW_ABOVE?x.ABOVE:x.BELOW,n=e===x.ABOVE?s[0]:s[s.length-1],r=n.parent instanceof H,i=this.shouldInsertHeaderRow(n,e)||r?new k(e,s):new D(e,s);this.applyActionToTable(s[0],i)}}shouldInsertHeaderRow(t,e){if(e===x.ABOVE)return t.parent instanceof F;{const e=t.parent;return e instanceof F&&e.children[e.children.length-1]!==t}}handleDeleteRow(t){const e=this.getAllSelectedRows(t);if(e.length){const t=new M(e);this.applyActionToTable(e[0],t)}}handleToggleHeader(t){const e=this.getAllSelectedRows(t);if(e.length>0){const t=new j(e);this.applyActionToTable(e[0],t)}}handleSelectRow(t){const e=this.getAllSelectedRows(t);if(e.length>0&&t&&t.tableSelection){const s=e.flatMap((t=>t.children));t.tableSelection.setSelectedCells(s)}}getAllSelectedRows(t){const e=new Set;if(t&&t.tableSelection){const{tableSelection:s}=t;s.getSelectedCells().forEach((t=>{const s=X(t,$);s&&e.add(s)}))}return Array.from(e)}applyActionToTable(t,e){const s=X(t,w);s&&s.apply(e)}}const ft="REPLACE_TABLE_CELL";class Lt extends s{constructor(t){super(),this.isFlushable=!0,this.type="REPLACE_TABLE_CELL",this.payload=t}}const bt="SPLIT_TABLE_CELL";class gt extends s{constructor(t){super(),this.isFlushable=!0,this.type="SPLIT_TABLE_CELL",this.payload=t}}class Ct extends o{getBoundaryCellColumnRange(t,e,s){let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const i=nt(t,e,s);n=Math.min(n,i),r=Math.max(r,i)})),[n,r]}}class Tt extends Ct{static isFullHeaderSelection(t){if(0===t.length)return!1;const e=X(t[0],w);if(e){const s=q(e),n=rt(s),r=new Map;s.forEach((t=>{t.children.forEach((t=>r.set(t.id,t)))}));const[i,o]=pt(t,e,s,n);for(const t of n)for(let e=i;e<=o;e++){const s=r.get(t[e]);if(s&&!(s instanceof V))return!1}return!0}return!1}handleAction(t,e){const s=t.headerOn,n=q(e),r=rt(n),[i,o]=this.getBoundaryCellColumnRange(t.tableCellHeaderRange,n,r);(s||!s&&i>0)&&this.toggleHeadRows(e,n,r,s,o,i),this.toggleBodyRows(e,n,r,s,i,o);const a=this.getRootContent(e);if(a&&t.tableCellHeaderRange[0].parent){const e=t.tableCellHeaderRange[0].parent.getFirstNode();e&&a.apply(new E(e,0))}}toggleHeadRows(t,e,s,n,r,i){var o;const a=((null===(o=t.children.find((t=>t instanceof F)))||void 0===o?void 0:o.children)||[]).length;for(let o=0;o<a;o++)this.toggleCellType(t,e[o],s[o],0,n?r:i-1,(()=>!0),(t=>V.from(t.toJSON())))}toggleBodyRows(t,e,s,n,r,i){var o;const a=s[0].length,c=(null===(o=t.children.find((t=>t instanceof H)))||void 0===o?void 0:o.children)||[],l=e.length-c.length;for(let o=0;o<c.length;o++){const c=o+l,h=e[c],u=s[c],d=ut(u,h,a);n?d>-1&&this.toggleCellType(t,h,u,d,i,(t=>!(t instanceof V)),(t=>V.from(t.toJSON()))):this.toggleCellType(t,h,u,r,-1===d?a-1:d-1,(t=>t instanceof V),(t=>W.from(t.toJSON())))}}toggleCellType(t,e,s,n,r,i,o){for(let a=n;a<=r;a++){const n=s[a],c=e.children.find((t=>t.id===n));if(c&&i(c)){const i=s.indexOf(n),l={table:t,cell:c,col:a,cellStartCol:i,endCol:r,targetCellType:o(c).type},h=i+c.colSpan-1;if(h>r||i<a){if(e.apply(new gt(l)),h>r)return;a=h;continue}e.apply(new Lt(l))}c&&(a+=c.colSpan-1)}}}const _t="DELETE_TABLE_COLUMN";class mt extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_COLUMN",this.tableCellDeleteRange=t}}const Ot="INSERT_TABLE_COLUMN";var At;!function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(At||(At={}));class St extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="INSERT_TABLE_COLUMN",this.tableCellInsertRange=e,this.insertDirection=t}}const yt="SELECT_TABLE_COLUMN";class wt extends s{constructor(t,e){super(),this.type="SELECT_TABLE_COLUMN",this.tableCellSelectRange=t,this.selectCellCallback=e}}const Rt="TOGGLE_HEADER_TABLE_COLUMN";class Nt extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_TABLE_COLUMN",this.headerOn=!1,this.tableCellHeaderRange=t,this.headerOn=e}}var Mt;!function(t){t.HEADER_COLUMN="HEADER_COLUMN",t.ADD_COLUMN_LEFT="ADD_COLUMN_LEFT",t.ADD_COLUMN_RIGHT="ADD_COLUMN_RIGHT",t.DELETE_COLUMN="DELETE_COLUMN",t.SELECT_COLUMN="SELECT_COLUMN"}(Mt||(Mt={}));class It extends R{canHandle(t){return t[0]===S.COLUMN}execute(t,e){const s=e.tableSelection.getSelectedCells();if(!s||0===s.length)return;const n=t[1];switch(n){case Mt.ADD_COLUMN_LEFT:case Mt.ADD_COLUMN_RIGHT:this.handleInsertColumn(n,s);break;case Mt.DELETE_COLUMN:this.handleDeleteColumn(s);break;case Mt.SELECT_COLUMN:this.handleSelectColumn(s,e);break;case Mt.HEADER_COLUMN:this.handleToggleHeaderColumn(s)}}handleInsertColumn(t,e){const s=new St(t===Mt.ADD_COLUMN_LEFT?At.LEFT:At.RIGHT,e);this.applyActionOnTable(s,e[0])}handleDeleteColumn(t){const e=new mt(t);this.applyActionOnTable(e,t[0])}handleSelectColumn(t,e){const s=new wt(t,(t=>{e.tableSelection.setSelectedCells(t)}));this.applyActionOnTable(s,t[0])}handleToggleHeaderColumn(t){const e=!Tt.isFullHeaderSelection(t),s=new Nt(t,e);this.applyActionOnTable(s,t[0])}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}const Dt="SPLIT_CELL_HORIZONTALLY";class vt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_HORIZONTALLY"}}const xt="SPLIT_CELL_VERTICALLY";class kt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_VERTICALLY"}}var Bt;!function(t){t.SPLIT_CELL_HORIZONTALLY="SPLIT_CELL_HORIZONTALLY",t.SPLIT_CELL_VERTICALLY="SPLIT_CELL_VERTICALLY"}(Bt||(Bt={}));class jt extends R{canHandle(t){return t[0]===S.SPLIT_CELL}execute(t,e){const s=e.tableSelection.getSelectedCells();if(s&&1===s.length){const e=s[0];switch(t[1]){case Bt.SPLIT_CELL_HORIZONTALLY:this.handleSplitCellHorizontally(e);break;case Bt.SPLIT_CELL_VERTICALLY:this.handleSplitCellVertically(e)}}}handleSplitCellHorizontally(t){const e=new vt;t.apply(e)}handleSplitCellVertically(t){const e=new kt;t.apply(e)}}export{pt as $,$ as A,nt as B,It as C,x as D,T as E,I as F,v as G,N as H,At as I,B as J,Ot as K,_t as L,z as M,Rt as N,Tt as O,bt as P,ft as Q,A as R,R as S,S as T,Dt as U,g as V,xt as W,yt as X,U as Y,C as Z,Mt as _,_ as a,Y as a0,Bt as a1,ct as a2,it as a3,y as b,P as c,V as d,Et as e,jt as f,m as g,w as h,Z as i,W as j,F as k,H as l,X as m,G as n,Ct as o,q as p,rt as q,tt as r,lt as s,et as t,dt as u,at as v,Q as w,st as x,ht as y,K as z}
@@ -1 +1 @@
1
- import{c as t,I as e,V as i,L as s,M as n}from"./p-6e1ab235.js";import{f as o,d as r,b as h}from"./p-528748fa.js";import{I as a}from"./p-781fd6e0.js";import{c as l}from"./p-6a334573.js";import{P as c}from"./p-81dd00d0.js";import{A as u,P as d}from"./p-d4ea8e22.js";import{J as p,i as f,a9 as v}from"./p-2b22091e.js";import{R as m}from"./p-a14d8767.js";import{t as g}from"./p-b75ee3ba.js";import{F as w}from"./p-bc73ce30.js";import{C as b}from"./p-2d0d575f.js";import{S as R}from"./p-cb378636.js";import{O as j}from"./p-331a62d5.js";import{d as E,D as y}from"./p-526e3634.js";import{B as A}from"./p-5ffc7cb8.js";class O{canRetrieve(){return!0}retrieve(){const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],O.prototype,"showConfig",void 0);class x{canRetrieve(){return!this.showConfig.isScreenPosition}}class S extends x{canRetrieve(){return super.canRetrieve()&&!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo)}retrieve(){const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],S.prototype,"showConfig",void 0);class C extends x{canRetrieve(){return super.canRetrieve()&&!!o(this.showConfig.target,"vega-modal")}retrieve(){return this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=o(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t({writable:!0})],C.prototype,"showConfig",void 0);class P extends x{canRetrieve(){return super.canRetrieve()&&!!o(this.showConfig.target,".vega-popover")}retrieve(){const t=o(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],P.prototype,"showConfig",void 0);class k extends x{canRetrieve(){return this.focusTrapRoot=this.findFocusTrapRoot(this.showConfig.target),!!this.focusTrapRoot}retrieve(){const t=this.focusTrapRoot;return this.focusTrapRoot=null,this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}findFocusTrapRoot(t){var e;const i=o(t,'dialog, [aria-modal="true"]');return!i||this.isVegaOwned(i)?null:null!==(e=i.closest('[tabindex="-1"]'))&&void 0!==e?e:i}isVegaOwned(t){return t.tagName.startsWith("VEGA-")}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],k.prototype,"showConfig",void 0);var T=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class V extends i{constructor(){super(...arguments),this.positionRelativeToWrapper=new S,this.vegaPopoverWrapper=new P,this.vegaModalWrapper=new C,this.thirdPartyDialogWrapper=new k,this.defaultWrapper=new O}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.thirdPartyDialogWrapper,this.defaultWrapper]}}T([t({writable:!0})],V.prototype,"container",void 0),T([t({writable:!0})],V.prototype,"showConfig",void 0),T([e()],V.prototype,"positionRelativeToWrapper",void 0),T([e()],V.prototype,"vegaPopoverWrapper",void 0),T([e()],V.prototype,"vegaModalWrapper",void 0),T([e()],V.prototype,"thirdPartyDialogWrapper",void 0),T([e()],V.prototype,"defaultWrapper",void 0);class M extends i{shouldAdjustPosition(){return!0}getPositionBox(t,e){const i=t&&t.length>0?t:this.getPlacements(),s=e&&e.length>0?e:this.getAlignments(),n=this.getTargetBoundBox(),o=this.getElementBoundBox(),r=this.getElementScrollDimension(),h=this.getSuitablePlacement(r,o,n,i),a=h||i[0],l=this.getSuitableAlignment(r,o,n,a,s),c=this.calculatePosition(o,n,a,l||s[0]),u=this.getTranslocationBox(a);return c.placement=h,c.alignment=l,c.left+=u.X,c.top+=u.Y,!this.showConfig.positionRelativeTo&&this.showConfig.isScreenPosition&&this.adjustPositionForViewport(c,o,n,a),c}hasEnoughAlignmentSpace(t,e,i,s,n){if(["top","bottom"].includes(s))switch(n){case"start":return e.left+i.width<=t.width;case"center":return e.left>=(i.width-e.width)/2&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(n){case"start":return e.top+i.height<=t.height;case"center":return e.top>=(i.height-e.height)/2&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}calculateLeft(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}calculateTop(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}getAlignments(){const t=this.showConfig.alignment;if("string"==typeof t){const e=u.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...u]}getSuitablePlacement(t,e,i,n){const o=n[0];return n.find((s=>this.hasEnoughSpace(t,s,i,e)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined placement:\n ${o}\n `),null)}getElementBoundBox(){const t=this.showConfig.appendableElement,e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}getPlacements(){const t=this.showConfig.placement;if("string"==typeof t){const e=d.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...d]}calculatePosition(t,e,i,s){return{top:this.calculateTop(t,e,i,s),left:this.calculateLeft(t,e,i,s)}}keepVerticallyInView(t,e){return Math.max(0,Math.min(t,window.innerHeight-e))}keepHorizontallyInView(t,e){return Math.max(0,Math.min(t,window.innerWidth-e))}isTargetInView(t){const e=window.innerHeight,i=window.innerWidth;return t.top<=e&&t.top+t.height>=0&&t.left<=i&&t.left+t.width>=0}adjustPositionForViewport(t,e,i,s){this.isTargetInView(i)&&("top"===s||"bottom"===s?t.top=this.adjustForVerticalOverflow(t.top,e.height,i.height):"left"!==s&&"right"!==s||(t.left=this.adjustForHorizontalOverflow(t.left,e.width,i.width)),t.top=this.keepVerticallyInView(t.top,e.height),t.left=this.keepHorizontallyInView(t.left,e.width))}adjustForVerticalOverflow(t,e,i){const s=t+e-window.innerHeight,n=-t;return s>0&&s<i?t-s:n>0&&n<i?t+n:t}adjustForHorizontalOverflow(t,e,i){const s=t+e-window.innerWidth,n=-t;return s>0&&s<i?t-s:n>0&&n<i?t+n:t}getTranslocationBox(t){const e=Array.isArray(this.showConfig.placement)?this.showConfig.placement[0]:this.showConfig.placement,i=this.getTranslocation(),s={X:0,Y:0};if(p(i)){let n=i.X,o=i.Y;(e&&["left","right"].includes(e)&&["top","bottom"].includes(t)||e&&["top","bottom"].includes(e)&&["left","right"].includes(t))&&(n=i.Y,o=i.X),["bottom","top"].includes(t)&&(s.Y="top"===t?-o:o,s.X=n),["left","right"].includes(t)&&(s.X="left"===t?-n:n,s.Y=o)}return s}getSuitableAlignment(t,e,i,n,o){const r=o[0];return o.find((s=>this.hasEnoughAlignmentSpace(t,i,e,n,s)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined alignment:\n ${r}\n `),null)}hasEnoughSpace(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}getTranslocation(){const t=this.showConfig.translocation;return t&&m.format(t,"translocation")}}var D=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class F extends M{getPosition(){return"relative"!==window.getComputedStyle(this.container).position&&s.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate."),this.getPositionBox()}getTargetBoundBox(){const t=this.container.getBoundingClientRect(),e=this.showConfig.target.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top-t.top+this.container.scrollTop,left:e.left-t.left+this.container.scrollLeft}}getElementScrollDimension(){return{width:this.container.scrollWidth,height:this.container.scrollHeight}}}D([t()],F.prototype,"container",void 0),D([t()],F.prototype,"showConfig",void 0);class L{constructor(){this.viewportWidth=window.innerWidth,this.viewportHeight=window.innerHeight}shouldUpdatePosition(t){const{previousTargetRect:e,currentTargetRect:i,appendableRect:s,viewportWidth:n,viewportHeight:o}=t;this.viewportWidth=n,this.viewportHeight=o;const r=!e||i.left!==e.left||i.top!==e.top,h=!this.isRectOutsideViewport(i),a=!this.isRectEntirelyWithinViewport(s);return{shouldUpdate:r&&h&&a}}isRectEntirelyWithinViewport(t){return t.left>=0&&t.top>=0&&t.right<=this.viewportWidth&&t.bottom<=this.viewportHeight}isRectOutsideViewport(t){return t.right<=0||t.bottom<=0||t.left>=this.viewportWidth||t.top>=this.viewportHeight}}class W extends M{constructor(){super(...arguments),this.scrollFrameRequestId=null,this.usePreviousPlacement=!1,this.scrollPositionUpdateStrategy=new L}shouldAdjustPosition(){return null===this.scrollFrameRequestId&&(w.isEnabled("VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT")?this.previousTargetRect?(this.scrollFrameRequestId=requestAnimationFrame((()=>{var t;this.scrollFrameRequestId=null;let e=window.innerWidth,i=window.innerHeight;if(this.showConfig.positionRelativeTo){const s=null===(t=g())||void 0===t?void 0:t.querySelector(this.showConfig.positionRelativeTo);s&&(e=s.getBoundingClientRect().width,i=s.getBoundingClientRect().height)}const s=this.showConfig.target.getBoundingClientRect(),n=this.showConfig.appendableElement.getBoundingClientRect(),{shouldUpdate:o}=this.scrollPositionUpdateStrategy.shouldUpdatePosition({currentTargetRect:s,previousTargetRect:this.previousTargetRect,appendableRect:n,viewportWidth:e,viewportHeight:i});this.usePreviousPlacement=!o,this.previousTargetRect=s})),!0):(this.previousTargetRect=this.showConfig.target.getBoundingClientRect(),this.usePreviousPlacement=!1,!0):(this.usePreviousPlacement=!0,!0))}clearScrollFrame(){null!==this.scrollFrameRequestId&&(cancelAnimationFrame(this.scrollFrameRequestId),this.scrollFrameRequestId=null)}getPosition(t){let e;return t&&this.usePreviousPlacement?(e=this.getPositionBox([this.previousPositionBox.placement].filter(f),[this.previousPositionBox.alignment].filter(f)),w.isEnabled("VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT")||(e.placement=this.previousPositionBox.placement,e.alignment=this.previousPositionBox.alignment)):e=this.getPositionBox(),this.previousPositionBox=e,e}getTargetBoundBox(){const t=this.showConfig.target.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,left:t.left}}getElementScrollDimension(){return{width:window.innerWidth,height:window.innerHeight}}hasEnoughAlignmentSpace(t,e,i,s,n){const o=this.calculateLeft(i,e,s,n),r=this.calculateTop(i,e,s,n);return o>=0&&r>=0&&o+i.width<=t.width&&r+i.height<=t.height}getSuitablePlacement(t,e,i,s){const n=this.getAlignments();return s.find((s=>n.some((n=>this.hasEnoughAlignmentSpace(t,i,e,s,n)))))||super.getSuitablePlacement(t,e,i,s)}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],W.prototype,"showConfig",void 0);var $=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class z extends i{constructor(){super(...arguments),this.bodyPositionStrategy=new F,this.screenPositionStrategy=new W}clearScreenPositionScrollFrame(){this.screenPositionStrategy.clearScrollFrame()}setCalculationStrategy(){this.positionStrategy=this.showConfig.isScreenPosition?this.screenPositionStrategy:this.bodyPositionStrategy}adjustPosition(t){this.positionStrategy.shouldAdjustPosition()&&(this.adjustWidth(),this.adjustHeight(),this.applyPosition(this.positionStrategy.getPosition(t)))}applyPosition(t){const e=this.showConfig.appendableElement;this.showConfig.isScreenPosition?e.style.position="fixed":e.classList.contains("date-picker-content-box")&&(e.style.position="absolute"),e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom","vega-no-suitable-placement"),e.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end","vega-no-suitable-alignment"),e.classList.add(t.placement?`vega-placement-${t.placement}`:"vega-no-suitable-placement"),e.classList.add(t.alignment?`vega-alignment-${t.alignment}`:"vega-no-suitable-alignment")}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=m.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight&&!this.showConfig.isScreenPosition){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}}$([t()],z.prototype,"container",void 0),$([t()],z.prototype,"showConfig",void 0),$([e()],z.prototype,"bodyPositionStrategy",void 0),$([e()],z.prototype,"screenPositionStrategy",void 0);var B=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class N{constructor(t,e){var i;this.resizeObserverSlimmer=l(N,c,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{r(this.showConfig.target)&&r(this.showConfig.appendableElement)&&this.adjustPosition()},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new V,this.positionCalculationController=new z,this.showConfigCallback=t,this.showConfigCallbackTarget=e;const s=this.getShowConfig();this.hideElementAppender(s.appendableElement),null===(i=s.appendableElement)||void 0===i||i.classList.add("vega-element-appender-appendable")}show(){this.positionCalculationController.clearScreenPositionScrollFrame(),this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):s.error("No appendable element found, please add it at new elementAppender."):s.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.toggleShow(!1),this.resetContainerPosition(),a.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(){this.showConfig.isScreenPosition&&this.adjustPosition(!0)}destroy(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.removeVisibleAppendElement(this.showConfig.appendableElement),this.resetContainerPosition(),a.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showElementAppender(this.showConfig.appendableElement),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.hideElementAppender(this.showConfig.appendableElement),this.removeVisibleAppendElement(this.showConfig.appendableElement))}showElementAppender(t){t.classList.contains("date-picker-content-box")?t.style.display="block":t.classList.remove("vega-force-hidden")}hideElementAppender(t){t&&(t.classList.contains("date-picker-content-box")?t.style.display="none":t.classList.add("vega-force-hidden"))}saveVisibleAppendElement(t){const e=N.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=N.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=N.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,N.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){this.showConfig.isScreenPosition||this.initVisibleAppendElement(),this.showConfig.appendableElement.style.boxSizing="border-box",this.positionCalculationController.setCalculationStrategy()}initVisibleAppendElement(){const t=window.getComputedStyle(this.container).position;N.containerMap.has(this.container)||N.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative")}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){a.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}N.containerMap=new Map,B([e()],N.prototype,"resizeObserverSlimmer",void 0),B([e()],N.prototype,"elementAppenderContainerController",void 0),B([e()],N.prototype,"positionCalculationController",void 0);var H,U=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.SHOW="show",t.HIDE="hide"}(H||(H={}));class I extends i{constructor(t){super(),this.childrenEA=[],this.currentEA=t}componentDidLoad(){this.register()}onShow(){this.notify(H.SHOW)}onHide(){this.notify(H.HIDE)}getParent(){return this.parentEA}getChildren(){return this.childrenEA}notify(t){const e=o(this.showConfig.target,".vega-element-appender-appendable");e&&b.notify(E.getSubject(e,A),{type:t,child:this.currentEA,callback:t=>{this.parentEA=t}})}register(){this.showConfig&&y.addUniqueObserverToNode(this.showConfig.appendableElement,A,(t=>{t.type===H.SHOW?this.childrenEA.push(t.child):t.type===H.HIDE&&(this.childrenEA=this.childrenEA.filter((e=>e!==t.child))),t.callback(this.currentEA)}))}}U([t()],I.prototype,"showConfig",void 0),U([n("componentDidLoad")],I.prototype,"componentDidLoad",null),U([n("show")],I.prototype,"onShow",null),U([n("hide")],I.prototype,"onHide",null);class _{canEvaluate(t){return"target-click"===t||"click-outside"===t}evaluate(t){return"target-click"===t.eventType?{nextAction:t.currentState.isVisible?"hide":"show"}:"click-outside"===t.eventType&&t.currentState.isVisible?{nextAction:"hide"}:{}}}class G{canEvaluate(t){return["target-mouseenter","target-mouseleave","element-mouseenter","element-mouseleave"].includes(t)}evaluate(t){return["target-mouseenter","element-mouseenter"].includes(t.eventType)?t.currentState.isVisible?{}:{nextAction:"show"}:["target-mouseleave","element-mouseleave"].includes(t.eventType)?{nextAction:"hide"}:{}}}class q{canEvaluate(){return!1}evaluate(){return{}}}var J=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class X extends i{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.hierarchyTreeManager=new I(this),this.registerElementAppenderListener=()=>{var t,e,i,s,n,o;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler),document.addEventListener("scroll",this.globalScrollHandler,{capture:!0}),this.listenShadowRootElementScrolling()},this.targetClickHandler=t=>{const e=this.getTriggerStrategy();e.canEvaluate("target-click")&&this.executeTriggerStrategy(e,t,"target-click")},this.targetMouseEnterHandler=t=>{const e=this.getTriggerStrategy();e.canEvaluate("target-mouseenter")&&(this.executeTriggerStrategy(e,t,"target-mouseenter"),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=t=>{this.getTriggerStrategy().canEvaluate("target-mouseleave")&&this.createDelayHideTimer(t,"target-mouseleave")},this.targetFocusoutHandler=t=>{var e;h(t.relatedTarget,null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)||this.targetMouseLeaveHandler(t)},this.elementMouseEnterHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseEnterHandler(),this.getTriggerStrategy().canEvaluate("element-mouseenter")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=t=>{var e;null===(e=this.hierarchyTreeManager.getParent())||void 0===e||e.elementMouseLeaveHandler(t),this.getTriggerStrategy().canEvaluate("element-mouseleave")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer(t,"element-mouseleave")},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0],i=this.hierarchyTreeManager.getChildren().some((t=>t.isShowing())),s=this.getTriggerStrategy();i||!s.canEvaluate("click-outside")||!this.showConfig||h(e,this.showConfig.appendableElement)||h(e,this.showConfig.target)||!this.showConfig.isScreenPosition&&o(e,"vega-modal")!==o(this.showConfig.target,"vega-modal")||this.executeTriggerStrategy(s,t,"click-outside")},this.globalScrollHandler=()=>{var t;this.showConfig&&this.showConfig.isScreenPosition&&this.isShowing()&&(null===(t=this.elementAppender)||void 0===t||t.onScroll())},this.createDelayHideTimer=(t,e)=>{const i=this.getTriggerStrategy();this.delayHideTimer=setTimeout((()=>{this.executeTriggerStrategy(i,t,e),clearTimeout(this.delayHideTimer)}),X.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.executeTriggerStrategy=(t,e,i)=>{if(this.showConfig){const s=t.evaluate({target:this.showConfig.target,appendableElement:this.showConfig.appendableElement,htmlEvent:e,eventType:i,currentState:{isVisible:this.isShowing()}});s&&("hide"===s.nextAction&&this.hide(),"show"===s.nextAction&&this.show())}},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.destroyElementAppender()}componentDidLoad(){this.initElementAppender()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0,this.setAriaOwns()}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1,this.hierarchyTreeManager.getChildren().map((t=>{t.hide()}))}destroy(){this.removeAriaOwns(),this.destroyElementAppender(),this[this.isDropdownShowName]=!1}updateShowConfigFactory(t){this.showConfigFactory=t,this.initElementAppender()}destroyElementAppender(){this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}initElementAppender(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}setElementAppender(){this.elementAppender=new N(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,n,o;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler),document.removeEventListener("scroll",this.globalScrollHandler),this.removeShadowRootElementScrolling()}listenShadowRootElementScrolling(){this.shadowRootElementScrollingObserver=new j(this.canAcceptShadowRootScrollEvent.bind(this),this.globalScrollHandler.bind(this)),b.register(R,this.shadowRootElementScrollingObserver)}canAcceptShadowRootScrollEvent(t){return Boolean(this.showConfig&&h(this.showConfig.target,t.host))}removeShadowRootElementScrolling(){b.unregister(R,this.shadowRootElementScrollingObserver)}getTriggerStrategy(){const t=this.getTrigger();return"click"===t?new _:"hover"===t?new G:v(t)?t:new q}setAriaOwns(){if(this.showConfig){const t=this.showConfig.target,e=this.showConfig.appendableElement;t&&e&&(t.ariaOwnsElements=[e])}}removeAriaOwns(){var t;(null===(t=this.showConfig)||void 0===t?void 0:t.target)&&(this.showConfig.target.ariaOwnsElements=[])}}X.DELAY_HIDE_TIME=100,J([e()],X.prototype,"hierarchyTreeManager",void 0),J([n("connectedCallback")],X.prototype,"connectedCallback",null),J([n("disconnectedCallback")],X.prototype,"disconnectedCallback",null),J([n("componentDidLoad")],X.prototype,"componentDidLoad",null);export{X as E}
1
+ import{c as t,I as e,V as i,L as s,M as n}from"./p-6e1ab235.js";import{f as o,d as r,b as h}from"./p-528748fa.js";import{I as a}from"./p-781fd6e0.js";import{c as l}from"./p-6a334573.js";import{P as c}from"./p-81dd00d0.js";import{A as u,P as d}from"./p-d4ea8e22.js";import{J as p,i as f,a9 as v}from"./p-4d9061fb.js";import{R as m}from"./p-71e2a3ec.js";import{t as g}from"./p-b75ee3ba.js";import{F as w}from"./p-87a4d75f.js";import{C as b}from"./p-2d0d575f.js";import{S as R}from"./p-cb378636.js";import{O as j}from"./p-331a62d5.js";import{d as E,D as y}from"./p-526e3634.js";import{C as A}from"./p-3a68b729.js";class O{canRetrieve(){return!0}retrieve(){const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],O.prototype,"showConfig",void 0);class x{canRetrieve(){return!this.showConfig.isScreenPosition}}class S extends x{canRetrieve(){return super.canRetrieve()&&!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo)}retrieve(){const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],S.prototype,"showConfig",void 0);class C extends x{canRetrieve(){return super.canRetrieve()&&!!o(this.showConfig.target,"vega-modal")}retrieve(){return this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=o(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t({writable:!0})],C.prototype,"showConfig",void 0);class P extends x{canRetrieve(){return super.canRetrieve()&&!!o(this.showConfig.target,".vega-popover")}retrieve(){const t=o(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],P.prototype,"showConfig",void 0);class k extends x{canRetrieve(){return this.focusTrapRoot=this.findFocusTrapRoot(this.showConfig.target),!!this.focusTrapRoot}retrieve(){const t=this.focusTrapRoot;return this.focusTrapRoot=null,this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}findFocusTrapRoot(t){var e;const i=o(t,'dialog, [aria-modal="true"]');return!i||this.isVegaOwned(i)?null:null!==(e=i.closest('[tabindex="-1"]'))&&void 0!==e?e:i}isVegaOwned(t){return t.tagName.startsWith("VEGA-")}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],k.prototype,"showConfig",void 0);var T=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class V extends i{constructor(){super(...arguments),this.positionRelativeToWrapper=new S,this.vegaPopoverWrapper=new P,this.vegaModalWrapper=new C,this.thirdPartyDialogWrapper=new k,this.defaultWrapper=new O}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.thirdPartyDialogWrapper,this.defaultWrapper]}}T([t({writable:!0})],V.prototype,"container",void 0),T([t({writable:!0})],V.prototype,"showConfig",void 0),T([e()],V.prototype,"positionRelativeToWrapper",void 0),T([e()],V.prototype,"vegaPopoverWrapper",void 0),T([e()],V.prototype,"vegaModalWrapper",void 0),T([e()],V.prototype,"thirdPartyDialogWrapper",void 0),T([e()],V.prototype,"defaultWrapper",void 0);class M extends i{shouldAdjustPosition(){return!0}getPositionBox(t,e){const i=t&&t.length>0?t:this.getPlacements(),s=e&&e.length>0?e:this.getAlignments(),n=this.getTargetBoundBox(),o=this.getElementBoundBox(),r=this.getElementScrollDimension(),h=this.getSuitablePlacement(r,o,n,i),a=h||i[0],l=this.getSuitableAlignment(r,o,n,a,s),c=this.calculatePosition(o,n,a,l||s[0]),u=this.getTranslocationBox(a);return c.placement=h,c.alignment=l,c.left+=u.X,c.top+=u.Y,!this.showConfig.positionRelativeTo&&this.showConfig.isScreenPosition&&this.adjustPositionForViewport(c,o,n,a),c}hasEnoughAlignmentSpace(t,e,i,s,n){if(["top","bottom"].includes(s))switch(n){case"start":return e.left+i.width<=t.width;case"center":return e.left>=(i.width-e.width)/2&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(n){case"start":return e.top+i.height<=t.height;case"center":return e.top>=(i.height-e.height)/2&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}calculateLeft(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}calculateTop(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}getAlignments(){const t=this.showConfig.alignment;if("string"==typeof t){const e=u.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...u]}getSuitablePlacement(t,e,i,n){const o=n[0];return n.find((s=>this.hasEnoughSpace(t,s,i,e)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined placement:\n ${o}\n `),null)}getElementBoundBox(){const t=this.showConfig.appendableElement,e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}getPlacements(){const t=this.showConfig.placement;if("string"==typeof t){const e=d.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...d]}calculatePosition(t,e,i,s){return{top:this.calculateTop(t,e,i,s),left:this.calculateLeft(t,e,i,s)}}keepVerticallyInView(t,e){return Math.max(0,Math.min(t,window.innerHeight-e))}keepHorizontallyInView(t,e){return Math.max(0,Math.min(t,window.innerWidth-e))}isTargetInView(t){const e=window.innerHeight,i=window.innerWidth;return t.top<=e&&t.top+t.height>=0&&t.left<=i&&t.left+t.width>=0}adjustPositionForViewport(t,e,i,s){this.isTargetInView(i)&&("top"===s||"bottom"===s?t.top=this.adjustForVerticalOverflow(t.top,e.height,i.height):"left"!==s&&"right"!==s||(t.left=this.adjustForHorizontalOverflow(t.left,e.width,i.width)),t.top=this.keepVerticallyInView(t.top,e.height),t.left=this.keepHorizontallyInView(t.left,e.width))}adjustForVerticalOverflow(t,e,i){const s=t+e-window.innerHeight,n=-t;return s>0&&s<i?t-s:n>0&&n<i?t+n:t}adjustForHorizontalOverflow(t,e,i){const s=t+e-window.innerWidth,n=-t;return s>0&&s<i?t-s:n>0&&n<i?t+n:t}getTranslocationBox(t){const e=Array.isArray(this.showConfig.placement)?this.showConfig.placement[0]:this.showConfig.placement,i=this.getTranslocation(),s={X:0,Y:0};if(p(i)){let n=i.X,o=i.Y;(e&&["left","right"].includes(e)&&["top","bottom"].includes(t)||e&&["top","bottom"].includes(e)&&["left","right"].includes(t))&&(n=i.Y,o=i.X),["bottom","top"].includes(t)&&(s.Y="top"===t?-o:o,s.X=n),["left","right"].includes(t)&&(s.X="left"===t?-n:n,s.Y=o)}return s}getSuitableAlignment(t,e,i,n,o){const r=o[0];return o.find((s=>this.hasEnoughAlignmentSpace(t,i,e,n,s)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined alignment:\n ${r}\n `),null)}hasEnoughSpace(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}getTranslocation(){const t=this.showConfig.translocation;return t&&m.format(t,"translocation")}}var D=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class F extends M{getPosition(){return"relative"!==window.getComputedStyle(this.container).position&&s.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate."),this.getPositionBox()}getTargetBoundBox(){const t=this.container.getBoundingClientRect(),e=this.showConfig.target.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top-t.top+this.container.scrollTop,left:e.left-t.left+this.container.scrollLeft}}getElementScrollDimension(){return{width:this.container.scrollWidth,height:this.container.scrollHeight}}}D([t()],F.prototype,"container",void 0),D([t()],F.prototype,"showConfig",void 0);class L{constructor(){this.viewportWidth=window.innerWidth,this.viewportHeight=window.innerHeight}shouldUpdatePosition(t){const{previousTargetRect:e,currentTargetRect:i,appendableRect:s,viewportWidth:n,viewportHeight:o}=t;this.viewportWidth=n,this.viewportHeight=o;const r=!e||i.left!==e.left||i.top!==e.top,h=!this.isRectOutsideViewport(i),a=!this.isRectEntirelyWithinViewport(s);return{shouldUpdate:r&&h&&a}}isRectEntirelyWithinViewport(t){return t.left>=0&&t.top>=0&&t.right<=this.viewportWidth&&t.bottom<=this.viewportHeight}isRectOutsideViewport(t){return t.right<=0||t.bottom<=0||t.left>=this.viewportWidth||t.top>=this.viewportHeight}}class W extends M{constructor(){super(...arguments),this.scrollFrameRequestId=null,this.usePreviousPlacement=!1,this.scrollPositionUpdateStrategy=new L}shouldAdjustPosition(){return null===this.scrollFrameRequestId&&(w.isEnabled("VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT")?this.previousTargetRect?(this.scrollFrameRequestId=requestAnimationFrame((()=>{var t;this.scrollFrameRequestId=null;let e=window.innerWidth,i=window.innerHeight;if(this.showConfig.positionRelativeTo){const s=null===(t=g())||void 0===t?void 0:t.querySelector(this.showConfig.positionRelativeTo);s&&(e=s.getBoundingClientRect().width,i=s.getBoundingClientRect().height)}const s=this.showConfig.target.getBoundingClientRect(),n=this.showConfig.appendableElement.getBoundingClientRect(),{shouldUpdate:o}=this.scrollPositionUpdateStrategy.shouldUpdatePosition({currentTargetRect:s,previousTargetRect:this.previousTargetRect,appendableRect:n,viewportWidth:e,viewportHeight:i});this.usePreviousPlacement=!o,this.previousTargetRect=s})),!0):(this.previousTargetRect=this.showConfig.target.getBoundingClientRect(),this.usePreviousPlacement=!1,!0):(this.usePreviousPlacement=!0,!0))}clearScrollFrame(){null!==this.scrollFrameRequestId&&(cancelAnimationFrame(this.scrollFrameRequestId),this.scrollFrameRequestId=null)}getPosition(t){let e;return t&&this.usePreviousPlacement?(e=this.getPositionBox([this.previousPositionBox.placement].filter(f),[this.previousPositionBox.alignment].filter(f)),w.isEnabled("VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT")||(e.placement=this.previousPositionBox.placement,e.alignment=this.previousPositionBox.alignment)):e=this.getPositionBox(),this.previousPositionBox=e,e}getTargetBoundBox(){const t=this.showConfig.target.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,left:t.left}}getElementScrollDimension(){return{width:window.innerWidth,height:window.innerHeight}}hasEnoughAlignmentSpace(t,e,i,s,n){const o=this.calculateLeft(i,e,s,n),r=this.calculateTop(i,e,s,n);return o>=0&&r>=0&&o+i.width<=t.width&&r+i.height<=t.height}getSuitablePlacement(t,e,i,s){const n=this.getAlignments();return s.find((s=>n.some((n=>this.hasEnoughAlignmentSpace(t,i,e,s,n)))))||super.getSuitablePlacement(t,e,i,s)}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],W.prototype,"showConfig",void 0);var $=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class z extends i{constructor(){super(...arguments),this.bodyPositionStrategy=new F,this.screenPositionStrategy=new W}clearScreenPositionScrollFrame(){this.screenPositionStrategy.clearScrollFrame()}setCalculationStrategy(){this.positionStrategy=this.showConfig.isScreenPosition?this.screenPositionStrategy:this.bodyPositionStrategy}adjustPosition(t){this.positionStrategy.shouldAdjustPosition()&&(this.adjustWidth(),this.adjustHeight(),this.applyPosition(this.positionStrategy.getPosition(t)))}applyPosition(t){const e=this.showConfig.appendableElement;this.showConfig.isScreenPosition?e.style.position="fixed":e.classList.contains("date-picker-content-box")&&(e.style.position="absolute"),e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom","vega-no-suitable-placement"),e.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end","vega-no-suitable-alignment"),e.classList.add(t.placement?`vega-placement-${t.placement}`:"vega-no-suitable-placement"),e.classList.add(t.alignment?`vega-alignment-${t.alignment}`:"vega-no-suitable-alignment")}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=m.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight&&!this.showConfig.isScreenPosition){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}}$([t()],z.prototype,"container",void 0),$([t()],z.prototype,"showConfig",void 0),$([e()],z.prototype,"bodyPositionStrategy",void 0),$([e()],z.prototype,"screenPositionStrategy",void 0);var N=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class B{constructor(t,e){var i;this.resizeObserverSlimmer=l(B,c,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{r(this.showConfig.target)&&r(this.showConfig.appendableElement)&&this.adjustPosition()},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new V,this.positionCalculationController=new z,this.showConfigCallback=t,this.showConfigCallbackTarget=e;const s=this.getShowConfig();this.hideElementAppender(s.appendableElement),null===(i=s.appendableElement)||void 0===i||i.classList.add("vega-element-appender-appendable")}show(){this.positionCalculationController.clearScreenPositionScrollFrame(),this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):s.error("No appendable element found, please add it at new elementAppender."):s.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.toggleShow(!1),this.resetContainerPosition(),a.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(){this.showConfig.isScreenPosition&&this.adjustPosition(!0)}destroy(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.removeVisibleAppendElement(this.showConfig.appendableElement),this.resetContainerPosition(),a.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showElementAppender(this.showConfig.appendableElement),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.hideElementAppender(this.showConfig.appendableElement),this.removeVisibleAppendElement(this.showConfig.appendableElement))}showElementAppender(t){t.classList.contains("date-picker-content-box")?t.style.display="block":t.classList.remove("vega-force-hidden")}hideElementAppender(t){t&&(t.classList.contains("date-picker-content-box")?t.style.display="none":t.classList.add("vega-force-hidden"))}saveVisibleAppendElement(t){const e=B.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=B.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=B.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,B.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){this.showConfig.isScreenPosition||this.initVisibleAppendElement(),this.showConfig.appendableElement.style.boxSizing="border-box",this.positionCalculationController.setCalculationStrategy()}initVisibleAppendElement(){const t=window.getComputedStyle(this.container).position;B.containerMap.has(this.container)||B.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative")}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){a.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}B.containerMap=new Map,N([e()],B.prototype,"resizeObserverSlimmer",void 0),N([e()],B.prototype,"elementAppenderContainerController",void 0),N([e()],B.prototype,"positionCalculationController",void 0);var H,U=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.SHOW="show",t.HIDE="hide"}(H||(H={}));class I extends i{constructor(t){super(),this.childrenEA=[],this.currentEA=t}componentDidLoad(){this.register()}onShow(){this.notify(H.SHOW)}onHide(){this.notify(H.HIDE)}getParent(){return this.parentEA}getChildren(){return this.childrenEA}notify(t){const e=o(this.showConfig.target,".vega-element-appender-appendable");e&&b.notify(E.getSubject(e,A),{type:t,child:this.currentEA,callback:t=>{this.parentEA=t}})}register(){this.showConfig&&y.addUniqueObserverToNode(this.showConfig.appendableElement,A,(t=>{t.type===H.SHOW?this.childrenEA.push(t.child):t.type===H.HIDE&&(this.childrenEA=this.childrenEA.filter((e=>e!==t.child))),t.callback(this.currentEA)}))}}U([t()],I.prototype,"showConfig",void 0),U([n("componentDidLoad")],I.prototype,"componentDidLoad",null),U([n("show")],I.prototype,"onShow",null),U([n("hide")],I.prototype,"onHide",null);class _{canEvaluate(t){return"target-click"===t||"click-outside"===t}evaluate(t){return"target-click"===t.eventType?{nextAction:t.currentState.isVisible?"hide":"show"}:"click-outside"===t.eventType&&t.currentState.isVisible?{nextAction:"hide"}:{}}}class G{canEvaluate(t){return["target-mouseenter","target-mouseleave","element-mouseenter","element-mouseleave"].includes(t)}evaluate(t){return["target-mouseenter","element-mouseenter"].includes(t.eventType)?t.currentState.isVisible?{}:{nextAction:"show"}:["target-mouseleave","element-mouseleave"].includes(t.eventType)?{nextAction:"hide"}:{}}}class q{canEvaluate(){return!1}evaluate(){return{}}}var J=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class X extends i{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.hierarchyTreeManager=new I(this),this.registerElementAppenderListener=()=>{var t,e,i,s,n,o;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler),document.addEventListener("scroll",this.globalScrollHandler,{capture:!0}),this.listenShadowRootElementScrolling()},this.targetClickHandler=t=>{const e=this.getTriggerStrategy();e.canEvaluate("target-click")&&this.executeTriggerStrategy(e,t,"target-click")},this.targetMouseEnterHandler=t=>{const e=this.getTriggerStrategy();e.canEvaluate("target-mouseenter")&&(this.executeTriggerStrategy(e,t,"target-mouseenter"),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=t=>{this.getTriggerStrategy().canEvaluate("target-mouseleave")&&this.createDelayHideTimer(t,"target-mouseleave")},this.targetFocusoutHandler=t=>{var e;h(t.relatedTarget,null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)||this.targetMouseLeaveHandler(t)},this.elementMouseEnterHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseEnterHandler(),this.getTriggerStrategy().canEvaluate("element-mouseenter")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=t=>{var e;null===(e=this.hierarchyTreeManager.getParent())||void 0===e||e.elementMouseLeaveHandler(t),this.getTriggerStrategy().canEvaluate("element-mouseleave")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer(t,"element-mouseleave")},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0],i=this.hierarchyTreeManager.getChildren().some((t=>t.isShowing())),s=this.getTriggerStrategy();i||!s.canEvaluate("click-outside")||!this.showConfig||h(e,this.showConfig.appendableElement)||h(e,this.showConfig.target)||!this.showConfig.isScreenPosition&&o(e,"vega-modal")!==o(this.showConfig.target,"vega-modal")||this.executeTriggerStrategy(s,t,"click-outside")},this.globalScrollHandler=()=>{var t;this.showConfig&&this.showConfig.isScreenPosition&&this.isShowing()&&(null===(t=this.elementAppender)||void 0===t||t.onScroll())},this.createDelayHideTimer=(t,e)=>{const i=this.getTriggerStrategy();this.delayHideTimer=setTimeout((()=>{this.executeTriggerStrategy(i,t,e),clearTimeout(this.delayHideTimer)}),X.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.executeTriggerStrategy=(t,e,i)=>{if(this.showConfig){const s=t.evaluate({target:this.showConfig.target,appendableElement:this.showConfig.appendableElement,htmlEvent:e,eventType:i,currentState:{isVisible:this.isShowing()}});s&&("hide"===s.nextAction&&this.hide(),"show"===s.nextAction&&this.show())}},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.destroyElementAppender()}componentDidLoad(){this.initElementAppender()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0,this.setAriaOwns()}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1,this.hierarchyTreeManager.getChildren().map((t=>{t.hide()}))}destroy(){this.removeAriaOwns(),this.destroyElementAppender(),this[this.isDropdownShowName]=!1}updateShowConfigFactory(t){this.showConfigFactory=t,this.initElementAppender()}destroyElementAppender(){this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}initElementAppender(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}setElementAppender(){this.elementAppender=new B(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,n,o;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler),document.removeEventListener("scroll",this.globalScrollHandler),this.removeShadowRootElementScrolling()}listenShadowRootElementScrolling(){this.shadowRootElementScrollingObserver=new j(this.canAcceptShadowRootScrollEvent.bind(this),this.globalScrollHandler.bind(this)),b.register(R,this.shadowRootElementScrollingObserver)}canAcceptShadowRootScrollEvent(t){return Boolean(this.showConfig&&h(this.showConfig.target,t.host))}removeShadowRootElementScrolling(){b.unregister(R,this.shadowRootElementScrollingObserver)}getTriggerStrategy(){const t=this.getTrigger();return"click"===t?new _:"hover"===t?new G:v(t)?t:new q}setAriaOwns(){if(this.showConfig){const t=this.showConfig.target,e=this.showConfig.appendableElement;t&&e&&(t.ariaOwnsElements=[e])}}removeAriaOwns(){var t;(null===(t=this.showConfig)||void 0===t?void 0:t.target)&&(this.showConfig.target.ariaOwnsElements=[])}}X.DELAY_HIDE_TIME=100,J([e()],X.prototype,"hierarchyTreeManager",void 0),J([n("connectedCallback")],X.prototype,"connectedCallback",null),J([n("disconnectedCallback")],X.prototype,"disconnectedCallback",null),J([n("componentDidLoad")],X.prototype,"componentDidLoad",null);export{X as E}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as i,H as n,g as s}from"./p-6b2342e0.js";import{s as a}from"./p-519a7d55.js";import{c as o,V as l,I as r}from"./p-6e1ab235.js";import{V as p,I as f}from"./p-8ce9e214.js";import{c as h}from"./p-70817cf5.js";import{a as d,B as c}from"./p-0179f55d.js";import{c as m}from"./p-3a620268.js";import{T as x}from"./p-b730bf6e.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-526e3634.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-5de1acdb.js";import"./p-b75ee3ba.js";import"./p-683cfe24.js";import"./p-cb378636.js";var g=function(t,e,i,n){var s,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(o=(a<3?s(o):a>3?s(e,i,o):s(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class b extends l{constructor(){super(...arguments),this.handleSuffixButtonClick=t=>{t.stopPropagation(),this.suffixButtonClickEventEmitter.emit()}}render(){if(this.suffixButtonConfig||this.suffixButtonProps){const{icon:e,buttonSize:i="extra-small",text:n,size:s,minWidth:a,maxWidth:o,placement:l="right",alignment:r="start",trigger:p="hover"}=this.suffixButtonConfig||this.suffixButtonProps&&{icon:this.suffixButtonProps.icon,text:this.suffixButtonProps.tooltipText,trigger:this.suffixButtonProps.trigger};return t("div",{class:"label-suffix-button",role:"button",tabIndex:0,onClick:this.handleSuffixButtonClick,onKeyDown:m()},n?t("vega-tooltip",{trigger:p,text:n,size:s,minWidth:a,maxWidth:o,alignment:r,placement:l},this.renderSuffixButton(e,i)):this.renderSuffixButton(e,i))}}renderSuffixButton(e,i){return t("vega-button-circle",{size:i,variant:"icon-only",iconColor:"text-link",showTooltip:!1,icon:e})}}g([o()],b.prototype,"suffixButtonProps",void 0),g([o()],b.prototype,"suffixButtonConfig",void 0),g([o()],b.prototype,"suffixButtonClickEventEmitter",void 0);var u=function(t,e,i,n){var s,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(o=(a<3?s(o):a>3?s(e,i,o):s(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class v extends l{render(){return this.label&&t("span",{class:"aria-announcement"},this.generateAnnouncement())}generateAnnouncement(){let t=this.label;return this.isFieldRequired?t+=`, ${this.translationSlimmer.t("Required")}`:this.optional&&(t+=`, ${this.translationSlimmer.t("Optional")}`),this.disabled&&(t+=`, ${this.translationSlimmer.t("Disabled")}`),t}}u([o()],v.prototype,"label",void 0),u([o()],v.prototype,"isFieldRequired",void 0),u([o()],v.prototype,"optional",void 0),u([o()],v.prototype,"disabled",void 0),u([o()],v.prototype,"translationSlimmer",void 0);var w=function(t,e,i,n){var s,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(o=(a<3?s(o):a>3?s(e,i,o):s(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};const y=class{constructor(t){e(this,t),this.vegaClick=i(this,"vegaClick",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",1),this.labelButtonClick=i(this,"labelButtonClick",1),this.globalSlimmers={},this.clickEventEmitter=h(y,d),this.suffixButtonClickEventEmitter=h(y,c),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.suffixElementRenderer=new b,this.labelAnnouncementRenderer=new v,this.translationSlimmer=new x,this.suffixButtonProps=null,this.suffixButtonConfig=null,this.label="",this.isFieldRequired=!1,this.disabled=!1,this.optional=!1,this.handleClick=t=>{this.clickEventEmitter.emit(void 0,t)}}componentWillLoad(){""===this.label&&(this.label=this.host.textContent,this.host.textContent="")}render(){var e;const i=!!(null===(e=this.suffixButtonConfig)||void 0===e?void 0:e.centerAlign);return a(t(n,{class:{hidden:""===this.label,disabled:this.disabled,"center-align":i},onClick:this.handleClick},this.labelAnnouncementRenderer.render(),t("label",{"aria-hidden":"true",part:"container"},t("span",{class:"vega-field-label",part:"label"},this.label),!this.isFieldRequired&&this.optional&&t("span",{class:"optional"},"(",this.translationSlimmer.t("Optional"),")"),t("span",{class:{"vega-field-label-required":!0,hidden:!this.isFieldRequired}},"*")),this.suffixElementRenderer.render()),this.host)}get host(){return s(this)}};w([f()],y.prototype,"globalSlimmers",void 0),w([r()],y.prototype,"clickEventEmitter",void 0),w([r()],y.prototype,"suffixButtonClickEventEmitter",void 0),w([r()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),w([r()],y.prototype,"suffixElementRenderer",void 0),w([r()],y.prototype,"labelAnnouncementRenderer",void 0),w([r()],y.prototype,"translationSlimmer",void 0),y.style=':host{display:inline-block}:host(.center-align){display:inline-flex;align-items:center}:host(.disabled){pointer-events:none}:host(.hidden){display:none}label:first-of-type{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;word-break:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host(.center-align) label:first-of-type{display:inline-flex;align-items:center}:host(.disabled)>label>span.vega-field-label{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}:host(.center-align) .vega-field-label{min-width:0}.vega-field-label-required{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-field-label-required.hidden{display:none}.label-suffix-button{display:inline-block;margin-left:4px;vertical-align:top}:host(.center-align) .label-suffix-button{display:inline-flex;align-items:center;vertical-align:baseline}.optional{margin-left:4px;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.optional{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){.optional{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){.optional{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.aria-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}';export{y as vega_field_label}