@globalpayments/vega 2.59.1 → 2.61.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 (405) hide show
  1. package/dist/cjs/{app-globals-64aff1a9.js → app-globals-7e624dd0.js} +5 -5
  2. package/dist/cjs/{child-nodes-event-prevent-slimmer-5df43771.js → child-nodes-event-prevent-slimmer-184fe3b2.js} +1 -1
  3. package/dist/cjs/{code-block-4bfae76d.js → code-block-ecb2df41.js} +3 -3
  4. package/dist/cjs/{component-value-history-controller-slimmer.abstract-34f4577a.js → component-value-history-controller-slimmer.abstract-58a0f64c.js} +5 -5
  5. package/dist/cjs/{content-state-b82b74de.js → content-state-d7b8e70b.js} +4 -4
  6. package/dist/cjs/{design-token-0b1315f2.js → design-token-16f74439.js} +3 -3
  7. package/dist/cjs/{dom-node-subject-factory-bad99695.js → dom-node-subject-factory-4eb1fec2.js} +4 -0
  8. package/dist/cjs/{dom-node-subject-observer-factory-df6e6df0.js → dom-node-subject-observer-factory-15130e50.js} +1 -1
  9. package/dist/cjs/{element-appender-slimmer-f14737af.js → element-appender-slimmer-c4816142.js} +6 -6
  10. package/dist/cjs/{event-emit-slimmer-efc70b94.js → event-emit-slimmer-2da7c9d6.js} +3 -3
  11. package/dist/cjs/{form-field-controller-slimmer-772d1892.js → form-field-controller-slimmer-dab30e5c.js} +4 -4
  12. package/dist/cjs/{image-annotation-action-a3146135.js → image-annotation-action-7eaab3ce.js} +4 -4
  13. package/dist/cjs/{index-10199ee8.js → index-da628bba.js} +2 -2
  14. package/dist/cjs/index.cjs.js +13 -14
  15. package/dist/cjs/{inject-keyboard-manager-70382bae.js → inject-keyboard-manager-ad865c95.js} +1 -1
  16. package/dist/cjs/{internal-vega-event-manager-83065493.js → internal-vega-event-manager-7b87c2f4.js} +3 -3
  17. package/dist/cjs/{keyboard-manager-6858915b.js → keyboard-manager-7f4e1f43.js} +1 -1
  18. package/dist/cjs/{keyboard-manager-slimmer-faca2038.js → keyboard-manager-slimmer-138a90e5.js} +1 -1
  19. package/dist/cjs/loader.cjs.js +11 -12
  20. package/dist/cjs/{public-rules-26467413.js → public-rules-21622bd0.js} +6 -7
  21. package/dist/cjs/{responsive-format-facade-d2e03695.js → responsive-format-facade-0d22ff78.js} +3 -3
  22. package/dist/cjs/{rich-text-editor-required-rule-026c8c3f.js → rich-text-editor-required-rule-8d7e441a.js} +1 -1
  23. package/dist/cjs/{state-background-color-formatter-c57409ea.js → state-background-color-formatter-aa5570f6.js} +1 -1
  24. package/dist/cjs/string-format-strategy.abstract-07a95352.js +60 -0
  25. package/dist/cjs/{string-input-formatter-slimmer-1b757bad.js → string-input-formatter-slimmer-5a744e71.js} +4 -227
  26. package/dist/cjs/string-mask-strategy-6bdad95e.js +172 -0
  27. package/dist/cjs/{style-formatter-effb0730.js → style-formatter-a66813a2.js} +2 -2
  28. package/dist/cjs/{sub-state-notify-slimmer-943eb7cc.js → sub-state-notify-slimmer-9602b5bb.js} +2 -2
  29. package/dist/cjs/{sub-state-observer-slimmer-0788232a.js → sub-state-observer-slimmer-df7df5bb.js} +2 -2
  30. package/dist/cjs/{type-guard-aa8fdeaf.js → type-guard-f12b5bae.js} +13 -3
  31. package/dist/cjs/{valid-credit-card-number-rule-4a1b00b8.js → valid-credit-card-number-rule-ce5c9147.js} +9 -9
  32. package/dist/cjs/vega-accordion.cjs.entry.js +12 -13
  33. package/dist/cjs/vega-app-header-button.cjs.entry.js +13 -14
  34. package/dist/cjs/vega-banner.cjs.entry.js +4 -4
  35. package/dist/cjs/vega-box.cjs.entry.js +11 -12
  36. package/dist/cjs/vega-breadcrumb.cjs.entry.js +5 -5
  37. package/dist/cjs/vega-button-circle.cjs.entry.js +13 -14
  38. package/dist/cjs/vega-button-group_2.cjs.entry.js +8 -8
  39. package/dist/cjs/vega-button-link.cjs.entry.js +5 -5
  40. package/dist/cjs/vega-button.cjs.entry.js +11 -12
  41. package/dist/cjs/vega-calendar_4.cjs.entry.js +196 -82
  42. package/dist/cjs/vega-card.cjs.entry.js +10 -11
  43. package/dist/cjs/vega-carousel.cjs.entry.js +10 -11
  44. package/dist/cjs/vega-checkbox_2.cjs.entry.js +8 -8
  45. package/dist/cjs/vega-chip.cjs.entry.js +13 -14
  46. package/dist/cjs/vega-code-block.cjs.entry.js +11 -12
  47. package/dist/cjs/vega-color-picker.cjs.entry.js +7 -7
  48. package/dist/cjs/vega-combo-box.cjs.entry.js +11 -12
  49. package/dist/cjs/vega-date-picker_2.cjs.entry.js +369 -136
  50. package/dist/cjs/vega-dialog_2.cjs.entry.js +13 -14
  51. package/dist/cjs/vega-divider.cjs.entry.js +10 -11
  52. package/dist/cjs/vega-dropdown_5.cjs.entry.js +16 -17
  53. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  54. package/dist/cjs/vega-field-label.cjs.entry.js +4 -4
  55. package/dist/cjs/vega-file-uploader.cjs.entry.js +7 -7
  56. package/dist/cjs/vega-flag-icon.cjs.entry.js +10 -11
  57. package/dist/cjs/vega-flex.cjs.entry.js +11 -12
  58. package/dist/cjs/vega-font.cjs.entry.js +10 -11
  59. package/dist/cjs/vega-form.cjs.entry.js +9 -9
  60. package/dist/cjs/vega-grid.cjs.entry.js +10 -11
  61. package/dist/cjs/vega-icon.cjs.entry.js +10 -11
  62. package/dist/cjs/vega-image-uploader.cjs.entry.js +13 -14
  63. package/dist/cjs/vega-input-credit-card.cjs.entry.js +249 -20
  64. package/dist/cjs/vega-input-numeric.cjs.entry.js +12 -13
  65. package/dist/cjs/vega-input-phone-number.cjs.entry.js +119 -30
  66. package/dist/cjs/vega-input-range.cjs.entry.js +8 -8
  67. package/dist/cjs/vega-input-select.cjs.entry.js +13 -14
  68. package/dist/cjs/vega-input.cjs.entry.js +24 -199
  69. package/dist/cjs/{vega-internal-event-id-ae6e2c13.js → vega-internal-event-id-9647aaf8.js} +2 -0
  70. package/dist/cjs/vega-item-toggle.cjs.entry.js +4 -4
  71. package/dist/cjs/vega-left-nav_5.cjs.entry.js +14 -15
  72. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +8 -9
  73. package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -2
  74. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +5 -5
  75. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +3 -3
  76. package/dist/cjs/vega-pagination.cjs.entry.js +11 -12
  77. package/dist/cjs/vega-popover_2.cjs.entry.js +15 -16
  78. package/dist/cjs/vega-progress-tracker.cjs.entry.js +4 -4
  79. package/dist/cjs/vega-radio_2.cjs.entry.js +11 -12
  80. package/dist/cjs/vega-rich-text-content.cjs.entry.js +9 -10
  81. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +18 -19
  82. package/dist/cjs/vega-segment-control.cjs.entry.js +4 -4
  83. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +14 -15
  84. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +9 -9
  85. package/dist/cjs/vega-sidenav_3.cjs.entry.js +12 -13
  86. package/dist/cjs/vega-signature-capture.cjs.entry.js +14 -15
  87. package/dist/cjs/{vega-skeleton-loader-controller-b1971f43.js → vega-skeleton-loader-controller-9c54f3aa.js} +1 -1
  88. package/dist/cjs/vega-stepper.cjs.entry.js +8 -8
  89. package/dist/cjs/vega-tab-group_2.cjs.entry.js +5 -5
  90. package/dist/cjs/vega-table_8.cjs.entry.js +94 -76
  91. package/dist/cjs/vega-textarea.cjs.entry.js +8 -8
  92. package/dist/cjs/vega-time-picker_2.cjs.entry.js +16 -17
  93. package/dist/cjs/vega-toggle-switch.cjs.entry.js +7 -7
  94. package/dist/cjs/vega-tooltip_2.cjs.entry.js +12 -13
  95. package/dist/cjs/vega.cjs.js +11 -12
  96. package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-date-block-renderer.abstract.js +82 -0
  97. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.js +26 -21
  98. package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +51 -31
  99. package/dist/collection/components/vega-calendar/vega-calendar.js +83 -3
  100. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-month-year-change-event-controller.js +139 -0
  101. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-month-year-dropdown-renderer.js +21 -1
  102. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +59 -0
  103. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +4 -0
  104. package/dist/collection/components/vega-date-picker/vega-date-picker.js +102 -1
  105. package/dist/collection/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.js +4 -11
  106. package/dist/collection/components/vega-input/vega-input.css +4 -0
  107. package/dist/collection/components/vega-input/vega-input.js +1 -1
  108. package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +6 -3
  109. package/dist/collection/components/vega-input-phone-number/slimmers/renderers/phone-number-input-renderer.js +3 -16
  110. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-children-controller.js +31 -16
  111. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-body-renderer.js +8 -4
  112. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-row-renderer.js +4 -1
  113. package/dist/collection/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-cell-state-controller.js +0 -16
  114. package/dist/collection/components/vega-table/vega-table-cell/slimmers/controllers/{vega-table-row-state-controller.js → vega-table-row-state-subscriber.js} +15 -14
  115. package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +3 -3
  116. package/dist/collection/components/vega-table/vega-table-expand-row/slimmers/renderers/vega-table-expand-row-renderer.js +4 -0
  117. package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.css +1 -1
  118. package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.js +20 -0
  119. package/dist/collection/components/vega-table/vega-table-row/slimmers/controllers/vega-table-row-state-controller.js +0 -7
  120. package/dist/collection/components/vega-table/vega-table-row/vega-table-row.css +1 -1
  121. package/dist/collection/components/vega-table/vega-table-row/vega-table-row.js +61 -1
  122. package/dist/collection/constants/card-config.js +4 -4
  123. package/dist/collection/constants/ui.js +2 -0
  124. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +3 -3
  125. package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +2 -0
  126. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
  127. package/dist/collection/helpers/formatter/string-formatter/credit-card-blur-mask-strategy.js +1 -1
  128. package/dist/collection/helpers/formatter/string-formatter/vega-phone-number-input-strategy.js +104 -0
  129. package/dist/collection/helpers/formatter/test/string-formatter/vega-phone-number-input-strategy.test.js +43 -0
  130. package/dist/collection/utils/spec-utils.js +28 -0
  131. package/dist/esm/{app-globals-05dbca3e.js → app-globals-ce54f0ac.js} +5 -5
  132. package/dist/esm/{child-nodes-event-prevent-slimmer-6b5b31f5.js → child-nodes-event-prevent-slimmer-2a3115ae.js} +1 -1
  133. package/dist/esm/{code-block-3d519665.js → code-block-89a4dd13.js} +3 -3
  134. package/dist/esm/{component-value-history-controller-slimmer.abstract-8b5be007.js → component-value-history-controller-slimmer.abstract-95b199df.js} +5 -5
  135. package/dist/esm/{content-state-73900a67.js → content-state-fc47457c.js} +4 -4
  136. package/dist/esm/{design-token-dbc8c235.js → design-token-eaa7c221.js} +3 -3
  137. package/dist/esm/{dom-node-subject-factory-202655e7.js → dom-node-subject-factory-3c2e13f1.js} +3 -1
  138. package/dist/esm/{dom-node-subject-observer-factory-999e21e3.js → dom-node-subject-observer-factory-1e456cd4.js} +1 -1
  139. package/dist/esm/{element-appender-slimmer-6ad38a9b.js → element-appender-slimmer-ce83db8a.js} +6 -6
  140. package/dist/esm/{event-emit-slimmer-40973ec2.js → event-emit-slimmer-4428ce26.js} +3 -3
  141. package/dist/esm/{form-field-controller-slimmer-47820eaa.js → form-field-controller-slimmer-6e69ca4e.js} +4 -4
  142. package/dist/esm/{image-annotation-action-4ebed11f.js → image-annotation-action-53812eb7.js} +4 -4
  143. package/dist/esm/{index-18a340fb.js → index-1d479c88.js} +2 -2
  144. package/dist/esm/index.js +13 -14
  145. package/dist/esm/{inject-keyboard-manager-a28dfee4.js → inject-keyboard-manager-109817bf.js} +1 -1
  146. package/dist/esm/{internal-vega-event-manager-526f8ed1.js → internal-vega-event-manager-a654cf8a.js} +3 -3
  147. package/dist/esm/{keyboard-manager-fa6355cb.js → keyboard-manager-ab521d22.js} +1 -1
  148. package/dist/esm/{keyboard-manager-slimmer-818050ee.js → keyboard-manager-slimmer-cae3a002.js} +1 -1
  149. package/dist/esm/loader.js +11 -12
  150. package/dist/esm/{public-rules-f28aca10.js → public-rules-095284f6.js} +6 -7
  151. package/dist/esm/{responsive-format-facade-81b72f39.js → responsive-format-facade-86b6de3b.js} +3 -3
  152. package/dist/esm/{rich-text-editor-required-rule-c4ba68b8.js → rich-text-editor-required-rule-4e8d2db8.js} +1 -1
  153. package/dist/esm/{state-background-color-formatter-da5e76e8.js → state-background-color-formatter-0f01d27a.js} +1 -1
  154. package/dist/esm/string-format-strategy.abstract-452f4398.js +58 -0
  155. package/dist/esm/{string-input-formatter-slimmer-b144e8d7.js → string-input-formatter-slimmer-60897659.js} +5 -226
  156. package/dist/esm/string-mask-strategy-6232a1c1.js +170 -0
  157. package/dist/esm/{style-formatter-7d817448.js → style-formatter-a0719a8f.js} +2 -2
  158. package/dist/esm/{sub-state-notify-slimmer-b3524c09.js → sub-state-notify-slimmer-ee730968.js} +2 -2
  159. package/dist/esm/{sub-state-observer-slimmer-c823d69c.js → sub-state-observer-slimmer-d474634d.js} +2 -2
  160. package/dist/esm/{type-guard-84b1f192.js → type-guard-12f7654b.js} +8 -2
  161. package/dist/esm/{valid-credit-card-number-rule-cc497bec.js → valid-credit-card-number-rule-81443274.js} +1 -1
  162. package/dist/esm/vega-accordion.entry.js +12 -13
  163. package/dist/esm/vega-app-header-button.entry.js +13 -14
  164. package/dist/esm/vega-banner.entry.js +4 -4
  165. package/dist/esm/vega-box.entry.js +11 -12
  166. package/dist/esm/vega-breadcrumb.entry.js +5 -5
  167. package/dist/esm/vega-button-circle.entry.js +13 -14
  168. package/dist/esm/vega-button-group_2.entry.js +8 -8
  169. package/dist/esm/vega-button-link.entry.js +5 -5
  170. package/dist/esm/vega-button.entry.js +11 -12
  171. package/dist/esm/vega-calendar_4.entry.js +196 -82
  172. package/dist/esm/vega-card.entry.js +10 -11
  173. package/dist/esm/vega-carousel.entry.js +10 -11
  174. package/dist/esm/vega-checkbox_2.entry.js +8 -8
  175. package/dist/esm/vega-chip.entry.js +13 -14
  176. package/dist/esm/vega-code-block.entry.js +11 -12
  177. package/dist/esm/vega-color-picker.entry.js +7 -7
  178. package/dist/esm/vega-combo-box.entry.js +11 -12
  179. package/dist/esm/vega-date-picker_2.entry.js +368 -135
  180. package/dist/esm/vega-dialog_2.entry.js +13 -14
  181. package/dist/esm/vega-divider.entry.js +10 -11
  182. package/dist/esm/vega-dropdown_5.entry.js +16 -17
  183. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  184. package/dist/esm/vega-field-label.entry.js +4 -4
  185. package/dist/esm/vega-file-uploader.entry.js +7 -7
  186. package/dist/esm/vega-flag-icon.entry.js +10 -11
  187. package/dist/esm/vega-flex.entry.js +11 -12
  188. package/dist/esm/vega-font.entry.js +10 -11
  189. package/dist/esm/vega-form.entry.js +9 -9
  190. package/dist/esm/vega-grid.entry.js +10 -11
  191. package/dist/esm/vega-icon.entry.js +10 -11
  192. package/dist/esm/vega-image-uploader.entry.js +13 -14
  193. package/dist/esm/vega-input-credit-card.entry.js +248 -19
  194. package/dist/esm/vega-input-numeric.entry.js +12 -13
  195. package/dist/esm/vega-input-phone-number.entry.js +119 -30
  196. package/dist/esm/vega-input-range.entry.js +8 -8
  197. package/dist/esm/vega-input-select.entry.js +13 -14
  198. package/dist/esm/vega-input.entry.js +18 -193
  199. package/dist/esm/{vega-internal-event-id-b7c865de.js → vega-internal-event-id-5a143cd2.js} +2 -1
  200. package/dist/esm/vega-item-toggle.entry.js +4 -4
  201. package/dist/esm/vega-left-nav_5.entry.js +14 -15
  202. package/dist/esm/vega-loader-wrapper_2.entry.js +8 -9
  203. package/dist/esm/vega-page-notification_2.entry.js +2 -2
  204. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
  205. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +3 -3
  206. package/dist/esm/vega-pagination.entry.js +11 -12
  207. package/dist/esm/vega-popover_2.entry.js +15 -16
  208. package/dist/esm/vega-progress-tracker.entry.js +4 -4
  209. package/dist/esm/vega-radio_2.entry.js +11 -12
  210. package/dist/esm/vega-rich-text-content.entry.js +9 -10
  211. package/dist/esm/vega-rich-text-editor_4.entry.js +18 -19
  212. package/dist/esm/vega-segment-control.entry.js +4 -4
  213. package/dist/esm/vega-selection-chip_2.entry.js +14 -15
  214. package/dist/esm/vega-selection-tile_2.entry.js +9 -9
  215. package/dist/esm/vega-sidenav_3.entry.js +12 -13
  216. package/dist/esm/vega-signature-capture.entry.js +14 -15
  217. package/dist/esm/{vega-skeleton-loader-controller-38864fcd.js → vega-skeleton-loader-controller-394a6026.js} +1 -1
  218. package/dist/esm/vega-stepper.entry.js +8 -8
  219. package/dist/esm/vega-tab-group_2.entry.js +5 -5
  220. package/dist/esm/vega-table_8.entry.js +94 -76
  221. package/dist/esm/vega-textarea.entry.js +8 -8
  222. package/dist/esm/vega-time-picker_2.entry.js +16 -17
  223. package/dist/esm/vega-toggle-switch.entry.js +7 -7
  224. package/dist/esm/vega-tooltip_2.entry.js +12 -13
  225. package/dist/esm/vega.js +11 -12
  226. package/dist/types/components/vega-calendar/slimmers/common/renderers/vega-calendar-date-block-renderer.abstract.d.ts +58 -0
  227. package/dist/types/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.d.ts +10 -9
  228. package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +15 -8
  229. package/dist/types/components/vega-calendar/vega-calendar.d.ts +22 -2
  230. package/dist/types/components/vega-date-picker/slimmers/controllers/vega-date-picker-month-year-change-event-controller.d.ts +46 -0
  231. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-month-year-dropdown-renderer.d.ts +12 -0
  232. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +17 -0
  233. package/dist/types/components/vega-date-picker/types.d.ts +7 -0
  234. package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +31 -1
  235. package/dist/types/components/vega-input/types.d.ts +3 -10
  236. package/dist/types/components/vega-table/interface.d.ts +1 -0
  237. package/dist/types/components/vega-table/slimmers/controllers/vega-table-children-controller.d.ts +13 -1
  238. package/dist/types/components/vega-table/slimmers/renderers/vega-table-body-renderer.d.ts +1 -0
  239. package/dist/types/components/vega-table/slimmers/renderers/vega-table-row-renderer.d.ts +1 -0
  240. package/dist/types/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-cell-state-controller.d.ts +0 -1
  241. package/dist/types/components/vega-table/vega-table-cell/slimmers/controllers/{vega-table-row-state-controller.d.ts → vega-table-row-state-subscriber.d.ts} +3 -6
  242. package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +2 -2
  243. package/dist/types/components/vega-table/vega-table-expand-row/slimmers/renderers/vega-table-expand-row-renderer.d.ts +1 -0
  244. package/dist/types/components/vega-table/vega-table-expand-row/vega-table-expand-row.d.ts +6 -0
  245. package/dist/types/components/vega-table/vega-table-row/slimmers/controllers/vega-table-row-state-controller.d.ts +0 -1
  246. package/dist/types/components/vega-table/vega-table-row/vega-table-row.d.ts +16 -4
  247. package/dist/types/components.d.ts +79 -3
  248. package/dist/types/constants/ui.d.ts +1 -1
  249. package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +2 -0
  250. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
  251. package/dist/types/helpers/formatter/string-formatter/vega-phone-number-input-strategy.d.ts +49 -0
  252. package/dist/types/helpers/formatter/test/string-formatter/vega-phone-number-input-strategy.test.d.ts +1 -0
  253. package/dist/types/types/components.type.d.ts +1 -0
  254. package/dist/types/utils/spec-utils.d.ts +7 -0
  255. package/dist/vega/index.esm.js +1 -1
  256. package/dist/vega/p-0070e970.entry.js +1 -0
  257. package/dist/vega/p-0169af6b.entry.js +1 -0
  258. package/dist/vega/{p-8baacfc5.js → p-03e9cbc8.js} +1 -1
  259. package/dist/vega/{p-70939752.entry.js → p-04341cd4.entry.js} +1 -1
  260. package/dist/vega/p-0664ca9c.js +1 -0
  261. package/dist/vega/{p-4a368e1e.js → p-074b73f8.js} +1 -1
  262. package/dist/vega/{p-4b7edf72.entry.js → p-08fb66a4.entry.js} +1 -1
  263. package/dist/vega/p-0cf35281.entry.js +1 -0
  264. package/dist/vega/{p-09ddae74.entry.js → p-0e75ddb2.entry.js} +1 -1
  265. package/dist/vega/{p-b5bef48a.js → p-0e954b9b.js} +1 -1
  266. package/dist/vega/{p-63c9eb58.js → p-129f5938.js} +1 -1
  267. package/dist/vega/p-13cb5a04.entry.js +1 -0
  268. package/dist/vega/{p-86f17433.js → p-18223240.js} +1 -1
  269. package/dist/vega/{p-1a195e28.js → p-19ce9ae6.js} +1 -1
  270. package/dist/vega/{p-b40adb9e.js → p-2608b9fe.js} +1 -1
  271. package/dist/vega/{p-0f0baac3.js → p-27dfa896.js} +1 -1
  272. package/dist/vega/p-27f922fe.entry.js +1 -0
  273. package/dist/vega/{p-61d1f3cb.entry.js → p-2c7b7dd6.entry.js} +1 -1
  274. package/dist/vega/p-310f9e76.entry.js +1 -0
  275. package/dist/vega/p-330d7ba8.js +1 -0
  276. package/dist/vega/{p-7f087c8b.js → p-34fdbe7a.js} +1 -1
  277. package/dist/vega/p-3a6abcd7.entry.js +1 -0
  278. package/dist/vega/p-3bf95faf.entry.js +13 -0
  279. package/dist/vega/{p-42033e59.js → p-3d6c302d.js} +1 -1
  280. package/dist/vega/p-42563036.entry.js +1 -0
  281. package/dist/vega/p-441a681b.js +1 -0
  282. package/dist/vega/p-4a357f30.entry.js +1 -0
  283. package/dist/vega/p-4e8b6eb6.entry.js +1 -0
  284. package/dist/vega/p-50dd3cf1.js +1 -0
  285. package/dist/vega/p-518722aa.js +1 -0
  286. package/dist/vega/p-5422fdc4.entry.js +1 -0
  287. package/dist/vega/p-5c36a6cb.entry.js +1 -0
  288. package/dist/vega/p-5d095f9b.entry.js +1 -0
  289. package/dist/vega/p-5f377954.js +1 -1
  290. package/dist/vega/p-5f85811c.entry.js +1 -0
  291. package/dist/vega/p-5faa7313.entry.js +1 -0
  292. package/dist/vega/p-67101f43.entry.js +1 -0
  293. package/dist/vega/p-68806f9c.entry.js +1 -0
  294. package/dist/vega/{p-606d1f7c.entry.js → p-6cf490d9.entry.js} +1 -1
  295. package/dist/vega/{p-7a3b142b.js → p-6def20e1.js} +1 -1
  296. package/dist/vega/p-71f9c4d4.js +1 -0
  297. package/dist/vega/{p-436f7e27.js → p-743c5baf.js} +1 -1
  298. package/dist/vega/{p-847dbae4.entry.js → p-78d3f99b.entry.js} +1 -1
  299. package/dist/vega/{p-4474bc63.js → p-792715f3.js} +1 -1
  300. package/dist/vega/p-7a201c6e.entry.js +1 -0
  301. package/dist/vega/p-7c22a1c3.entry.js +1 -0
  302. package/dist/vega/p-7ecf65ec.js +1 -0
  303. package/dist/vega/{p-446d0317.entry.js → p-7f329473.entry.js} +1 -1
  304. package/dist/vega/{p-f6d25220.js → p-80f1b680.js} +1 -1
  305. package/dist/vega/p-824a06ba.js +1 -0
  306. package/dist/vega/{p-4fc18f2f.entry.js → p-82beb586.entry.js} +1 -1
  307. package/dist/vega/{p-0c247128.entry.js → p-84eb131b.entry.js} +1 -1
  308. package/dist/vega/p-867a4970.js +1 -0
  309. package/dist/vega/{p-d45f79ce.entry.js → p-909820dd.entry.js} +1 -1
  310. package/dist/vega/{p-fc8badd3.entry.js → p-927cab0c.entry.js} +1 -1
  311. package/dist/vega/{p-a7baad6d.entry.js → p-989e141d.entry.js} +1 -1
  312. package/dist/vega/{p-6f90d444.js → p-9ce249a9.js} +1 -1
  313. package/dist/vega/p-a29e5d32.js +1 -0
  314. package/dist/vega/{p-e9ad8223.entry.js → p-a3942d0b.entry.js} +1 -1
  315. package/dist/vega/p-a66533c1.entry.js +1 -0
  316. package/dist/vega/p-a9b831d8.entry.js +1 -0
  317. package/dist/vega/p-aeccc7f8.js +1 -0
  318. package/dist/vega/{p-b4be8573.entry.js → p-b1d0e4cb.entry.js} +1 -1
  319. package/dist/vega/p-b1faebe0.js +1 -0
  320. package/dist/vega/p-b34f9891.entry.js +1 -0
  321. package/dist/vega/p-b820e42f.entry.js +1 -0
  322. package/dist/vega/{p-ae21e5f5.entry.js → p-c4677b0c.entry.js} +1 -1
  323. package/dist/vega/p-c467fe81.entry.js +1 -0
  324. package/dist/vega/{p-bbb96a13.js → p-c5e862aa.js} +1 -1
  325. package/dist/vega/p-c7762c86.entry.js +1 -0
  326. package/dist/vega/{p-850a6305.entry.js → p-c9e57cf1.entry.js} +1 -1
  327. package/dist/vega/{p-1bd516c5.js → p-cd18f0fe.js} +1 -1
  328. package/dist/vega/p-d0b3e319.entry.js +1 -0
  329. package/dist/vega/p-d7b4ffed.entry.js +1 -0
  330. package/dist/vega/p-dc6f45af.entry.js +1 -0
  331. package/dist/vega/p-e4586f13.entry.js +1 -0
  332. package/dist/vega/p-e66aef91.entry.js +1 -0
  333. package/dist/vega/p-e71c4a09.entry.js +1 -0
  334. package/dist/vega/{p-9773c913.js → p-e764acd5.js} +1 -1
  335. package/dist/vega/p-ea66d9f7.entry.js +1 -0
  336. package/dist/vega/p-ec6819fe.entry.js +1 -0
  337. package/dist/vega/p-ec9a8f81.entry.js +1 -0
  338. package/dist/vega/p-ed01328c.entry.js +1 -0
  339. package/dist/vega/p-ed798cd4.entry.js +1 -0
  340. package/dist/vega/{p-27b5f69c.entry.js → p-edb71a72.entry.js} +1 -1
  341. package/dist/vega/{p-a204a2b2.js → p-f2a1fe6a.js} +1 -1
  342. package/dist/vega/{p-c81cb852.entry.js → p-f4e23c23.entry.js} +1 -1
  343. package/dist/vega/p-f825e8a2.entry.js +1 -0
  344. package/dist/vega/p-f9deb43e.entry.js +1 -0
  345. package/dist/vega/p-fb232e29.entry.js +1 -0
  346. package/dist/vega/{p-fe6ea6cf.entry.js → p-fdd930a9.entry.js} +1 -1
  347. package/dist/vega/{p-f47de801.entry.js → p-fe52c370.entry.js} +1 -1
  348. package/dist/vega/vega.esm.js +1 -1
  349. package/package.json +4 -3
  350. package/dist/cjs/card-config-2ee5505e.js +0 -65
  351. package/dist/cjs/regex-c1f70fd4.js +0 -15
  352. package/dist/esm/card-config-d2ad484e.js +0 -63
  353. package/dist/esm/regex-dfe11abf.js +0 -8
  354. package/dist/vega/p-0cd89fb6.js +0 -1
  355. package/dist/vega/p-12ed3141.entry.js +0 -1
  356. package/dist/vega/p-13eca7f3.entry.js +0 -1
  357. package/dist/vega/p-17d517c8.entry.js +0 -1
  358. package/dist/vega/p-1ff1deaf.entry.js +0 -1
  359. package/dist/vega/p-2004317b.entry.js +0 -1
  360. package/dist/vega/p-29e0d4c8.entry.js +0 -1
  361. package/dist/vega/p-369f38ed.entry.js +0 -1
  362. package/dist/vega/p-36ed226a.js +0 -1
  363. package/dist/vega/p-3a0a4d15.js +0 -1
  364. package/dist/vega/p-4452e085.js +0 -1
  365. package/dist/vega/p-490f5e3f.entry.js +0 -1
  366. package/dist/vega/p-4996b853.entry.js +0 -1
  367. package/dist/vega/p-49fd1009.js +0 -1
  368. package/dist/vega/p-4fb159d5.js +0 -1
  369. package/dist/vega/p-51cce3f9.entry.js +0 -1
  370. package/dist/vega/p-53d67971.entry.js +0 -1
  371. package/dist/vega/p-555804a0.entry.js +0 -1
  372. package/dist/vega/p-59e990c7.entry.js +0 -1
  373. package/dist/vega/p-5e2c9e69.js +0 -1
  374. package/dist/vega/p-675b9501.entry.js +0 -1
  375. package/dist/vega/p-707bb905.entry.js +0 -1
  376. package/dist/vega/p-7183bd72.entry.js +0 -1
  377. package/dist/vega/p-73b487b0.entry.js +0 -1
  378. package/dist/vega/p-76de6b00.entry.js +0 -1
  379. package/dist/vega/p-7b1bb372.entry.js +0 -1
  380. package/dist/vega/p-8a317208.entry.js +0 -1
  381. package/dist/vega/p-9479866e.entry.js +0 -1
  382. package/dist/vega/p-9f453b90.entry.js +0 -1
  383. package/dist/vega/p-a328d448.entry.js +0 -1
  384. package/dist/vega/p-ad1b22b4.entry.js +0 -1
  385. package/dist/vega/p-ae415e7e.entry.js +0 -1
  386. package/dist/vega/p-af464251.js +0 -1
  387. package/dist/vega/p-b5822a21.js +0 -1
  388. package/dist/vega/p-bca1f8f9.js +0 -1
  389. package/dist/vega/p-bdce4143.js +0 -1
  390. package/dist/vega/p-be8bbaa5.entry.js +0 -1
  391. package/dist/vega/p-bf6187f7.entry.js +0 -1
  392. package/dist/vega/p-c5c5509c.entry.js +0 -13
  393. package/dist/vega/p-c9c2c8c6.entry.js +0 -1
  394. package/dist/vega/p-ca30b996.js +0 -1
  395. package/dist/vega/p-cc20f01f.entry.js +0 -1
  396. package/dist/vega/p-d3bcaa82.entry.js +0 -1
  397. package/dist/vega/p-dbb06804.entry.js +0 -1
  398. package/dist/vega/p-dc5026e7.entry.js +0 -1
  399. package/dist/vega/p-df647e48.entry.js +0 -1
  400. package/dist/vega/p-e989ce94.entry.js +0 -1
  401. package/dist/vega/p-e9d2e0dc.entry.js +0 -1
  402. package/dist/vega/p-f6b11a21.entry.js +0 -1
  403. package/dist/vega/p-f8e62e5e.entry.js +0 -1
  404. package/dist/vega/p-fd6f90fd.entry.js +0 -1
  405. package/dist/vega/p-ffaee583.entry.js +0 -1
@@ -0,0 +1,13 @@
1
+ import{h as t,H as e,F as i,r as n,c as r,g as s}from"./p-48a58baf.js";import{s as o}from"./p-519a7d55.js";import{D as a}from"./p-8fae8f9e.js";import{c as h,i as d,b as c,d as l}from"./p-08835909.js";import{I as p}from"./p-abd7aeaa.js";import{c as u,V as f,M as m,L as v,I as g}from"./p-6e1ab235.js";import{V as w,I as x}from"./p-d849e0f5.js";import{F as b}from"./p-6def20e1.js";import{a as y,g as k,D}from"./p-575235c8.js";import{D as _}from"./p-441a681b.js";import{a as j,d as M,b as R,o as I,f as C}from"./p-0664ca9c.js";import{V as O}from"./p-f08a4adf.js";import{c as E}from"./p-86194314.js";import{i as S}from"./p-d27ae9ff.js";import{c as z}from"./p-112455b1.js";import{C as Y}from"./p-2d0d575f.js";import{q as P,r as T}from"./p-0e954b9b.js";import{I as V}from"./p-074b73f8.js";import{b as L}from"./p-8a877e12.js";import{S as A}from"./p-71f9c4d4.js";import{S as N}from"./p-7ecf65ec.js";import{E as H}from"./p-19ce9ae6.js";import"./p-5f377954.js";import{F}from"./p-e77a83e4.js";import"./p-8c46e116.js";import"./p-5d676a94.js";import"./p-bf0ced3c.js";import"./p-3d6c302d.js";import{K as B}from"./p-743c5baf.js";import{C as W}from"./p-75b58efe.js";import{c as Z}from"./p-792715f3.js";import{C as $}from"./p-c5e862aa.js";import{T as U}from"./p-02b29c18.js";import{r as G}from"./p-77e64f26.js";import{O as K}from"./p-331a62d5.js";import"./p-02841589.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-7d9cd9c8.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-cd18f0fe.js";import"./p-262ec334.js";import"./p-7e8f055d.js";import"./p-aeccc7f8.js";import"./p-867a4970.js";import"./p-b1faebe0.js";import"./p-d884c644.js";import"./p-50dd3cf1.js";import"./p-03e9cbc8.js";import"./p-0c667d6a.js";import"./p-db8cdba6.js";import"./p-34fdbe7a.js";import"./p-bf19682d.js";import"./p-2608b9fe.js";class q extends p{canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=new Date(t[0]),i=new Date(t[1]),n=h(e,i);return{isValid:n,message:n?"":"The end date should be later than start date"}}isAcceptedInputType(t){return Array.isArray(t)&&2===t.length&&t.every(d)}}class X extends p{constructor(t){super(),this.evaluateSingleDate=t=>{const e=new Date(t);return this.minDate&&c(e,this.minDate)?this.invalidResult({key:"The date should be later than {0}",args:[this.config.minDate]}):this.maxDate&&l(e,this.maxDate)?this.invalidResult({key:"The date should be earlier than {0}",args:[this.config.maxDate]}):this.validResult()},this.evaluateRangeDates=t=>{const e=new Date(t[0]),i=new Date(t[1]);return this.minDate&&c(e,this.minDate)?this.invalidResult({key:"The start date should be later than {0}",args:[this.config.minDate]}):this.maxDate&&l(e,this.maxDate)?this.invalidResult({key:"The start date should be earlier than {0}",args:[this.config.maxDate]}):i&&this.maxDate&&l(i,this.maxDate)?this.invalidResult({key:"The end date should be earlier than {0}",args:[this.config.maxDate]}):this.validResult()},this.invalidResult=t=>({isValid:!1,message:t}),this.validResult=()=>({isValid:!0,message:""}),this.config=t,this.minDate=t.minDate?new Date(t.minDate):null,this.maxDate=t.maxDate?new Date(t.maxDate):null}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);return"string"==typeof t?this.evaluateSingleDate(t):this.evaluateRangeDates(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t&&d(t)||Array.isArray(t)&&2===t.length&&t.every(d)}}const J={"chevron-left":{icon:'<svg width="12" height="16" viewBox="0 0 12 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M1.2937 7.29414C0.903076 7.68477 0.903076 8.31914 1.2937 8.70977L7.2937 14.7098C7.68433 15.1004 8.3187 15.1004 8.70933 14.7098C9.09995 14.3191 9.09995 13.6848 8.70933 13.2941L3.41558 8.00039L8.7062 2.70664C9.09683 2.31602 9.09683 1.68164 8.7062 1.29102C8.31558 0.900391 7.6812 0.900391 7.29058 1.29102L1.29058 7.29102L1.2937 7.29414Z" fill="currentColor"/></svg>'},"chevron-right":{icon:'<svg width="12" height="16" viewBox="0 0 12 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M10.7063 7.29414C11.0969 7.68477 11.0969 8.31914 10.7063 8.70977L4.70627 14.7098C4.31565 15.1004 3.68127 15.1004 3.29065 14.7098C2.90002 14.3191 2.90002 13.6848 3.29065 13.2941L8.5844 8.00039L3.29377 2.70664C2.90315 2.31602 2.90315 1.68164 3.29377 1.29102C3.6844 0.900391 4.31877 0.900391 4.7094 1.29102L10.7094 7.29102L10.7063 7.29414Z" fill="currentColor"/></svg>'},calendar:{icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_41275_12898)"><path d="M5.75 2H10.25V0.75C10.25 0.335938 10.5844 0 11 0C11.4156 0 11.75 0.335938 11.75 0.75V2H13C14.1031 2 15 2.89531 15 4V14C15 15.1031 14.1031 16 13 16H3C1.89531 16 1 15.1031 1 14V4C1 2.89531 1.89531 2 3 2H4.25V0.75C4.25 0.335938 4.58437 0 5 0C5.41563 0 5.75 0.335938 5.75 0.75V2ZM2.5 7.75H5V6H2.5V7.75ZM2.5 9.25V11.25H5V9.25H2.5ZM6.5 9.25V11.25H9.5V9.25H6.5ZM11 9.25V11.25H13.5V9.25H11ZM13.5 6H11V7.75H13.5V6ZM13.5 12.75H11V14.5H13C13.275 14.5 13.5 14.275 13.5 14V12.75ZM9.5 12.75H6.5V14.5H9.5V12.75ZM5 12.75H2.5V14C2.5 14.275 2.72375 14.5 3 14.5H5V12.75ZM9.5 6H6.5V7.75H9.5V6Z" fill="currentColor"/></g><defs><clipPath id="clip0_41275_12898"><rect width="14" height="16" fill="white" transform="translate(1)"/></clipPath></defs></svg>'},"caret-down":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--\x3e<path fill="currentColor" d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"/></svg>'}};var Q=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class tt extends f{constructor(){super(...arguments),this.renderInputPrefix=()=>t("div",{class:"vega-input-prefix"},t("vega-icon",{icon:O.getIconKey("calendar"),color:"text-secondary",onClick:()=>{this.disabled||this.focusInput()}})),this.isInputEnabled=()=>!this.readOnly&&!this.vegaDatePickerMobileController.getIsMobileDevice(),this.renderLabel=()=>this.label&&t("vega-field-label",{ref:t=>{_.addUniqueObserverToNode(t,j,(()=>{this.focusInput()}))},isFieldRequired:this.required,disabled:this.disabled,label:this.label}),this.focusInput=()=>{var t,e;null===(t=this.vegaDatePickerSingleInputRenderer.getSingleDateInputRef())||void 0===t||t.focus(),null===(e=this.vegaDatePickerRangeInputRenderer.getStartDateInputRef())||void 0===e||e.focus(),this.vegaDatePickerCalendarRenderer.getDatePicker().show()}}getDatePickerContainer(){return this.datePickerContainer}render(){const i=["vega-input-container",this.size,`${this.mode}-mode`,this.vegaDatePickerMobileController.getIsMobileDevice()?"mobile":""];return t(e,{class:{disabled:this.disabled}},this.renderLabel(),t("div",{class:y(i),ref:t=>this.datePickerContainer=t},"range"===this.mode?this.vegaDatePickerRangeInputRenderer.render():this.vegaDatePickerSingleInputRenderer.render(),this.showYearMonthDropdowns&&this.monthYearDropdownRenderer.render()))}}O.register({calendar:J.calendar}),Q([u()],tt.prototype,"disabled",void 0),Q([u()],tt.prototype,"size",void 0),Q([u()],tt.prototype,"mode",void 0),Q([u()],tt.prototype,"label",void 0),Q([u()],tt.prototype,"required",void 0),Q([u()],tt.prototype,"readOnly",void 0),Q([u()],tt.prototype,"autoValidation",void 0),Q([u()],tt.prototype,"host",void 0),Q([u()],tt.prototype,"showYearMonthDropdowns",void 0),Q([u()],tt.prototype,"vegaDatePickerMobileController",void 0),Q([u()],tt.prototype,"vegaDatePickerSingleInputRenderer",void 0),Q([u()],tt.prototype,"vegaDatePickerRangeInputRenderer",void 0),Q([u()],tt.prototype,"vegaDatePickerCalendarRenderer",void 0),Q([u()],tt.prototype,"monthYearDropdownRenderer",void 0);var et=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class it extends f{constructor(){super(...arguments),this.isMobileDevice=k()===D.MOBILE}getIsMobileDevice(){return this.isMobileDevice}preventElementTouchMoveInMobile(){const t=this.host.shadowRoot.querySelector(".litepicker-backdrop");t&&(t.removeEventListener("touchmove",(t=>t.preventDefault())),t.addEventListener("touchmove",(t=>t.preventDefault()))),this.vegaDatePickerCalendarRenderer.getCalendarContainerRef().removeEventListener("touchmove",(t=>t.preventDefault())),this.vegaDatePickerCalendarRenderer.getCalendarContainerRef().addEventListener("touchmove",(t=>t.preventDefault()))}}et([u()],it.prototype,"host",void 0),et([u()],it.prototype,"vegaDatePickerCalendarRenderer",void 0);var nt=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class rt extends f{constructor(){super(...arguments),this.onClickClearIcon=()=>{this.vegaDatePickerValueController.setValue("range"===this.mode?["",""]:"")},this.isClearIconVisible=()=>{if("range"===this.mode){const t=this.vegaDatePickerValueController.getValue();return!this.disabled&&!S(t,["",""])}{const t=this.vegaDatePickerValueController.getValue();return!this.disabled&&Boolean(t.length)}}}renderClearIcon(){return t(i,null,this.showClearIcon&&this.isClearIconVisible()&&t("div",{class:"vega-input-clear-icon",tabIndex:-1,"aria-label":"clear input",role:"button",onClick:this.onClickClearIcon,onKeyDown:E()},t("vega-icon",{icon:"close"})))}}nt([u()],rt.prototype,"disabled",void 0),nt([u()],rt.prototype,"showClearIcon",void 0),nt([u()],rt.prototype,"mode",void 0),nt([u()],rt.prototype,"vegaDatePickerValueController",void 0);var st=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class ot extends rt{constructor(){super(...arguments),this.render=()=>t("div",{class:"date-picker-input"},this.vegaDatePickerRenderer.renderInputPrefix(),t("input",{readOnly:!this.vegaDatePickerRenderer.isInputEnabled(),placeholder:this.getSinglePlaceholder(),value:this.vegaDatePickerValueController.getValue(),ref:t=>this.singleDateInputRef=t,onChange:this.onSingleDateChange,disabled:this.disabled,onClick:()=>{this.vegaDatePickerCalendarRenderer.getDatePicker().show()}}),this.renderClearIcon()),this.getSinglePlaceholder=()=>this.placeholder?"string"!=typeof this.placeholder?(v.warn("The placeholder should be a string"),this.format):this.placeholder:this.format,this.onSingleDateChange=t=>{const e=t.currentTarget.value;d(e)?this.vegaDatePickerValueController.setValue(this.vegaDatePickerFormatController.formatDate(e)):(this.vegaDatePickerValueController.setValue(""),this.singleDateInputRef.value="",v.warn("The date value of ${date} is invalid"))}}componentWillRender(){this.oldSingleDateInputRef=this.singleDateInputRef}getSingleDateInputRef(){return this.singleDateInputRef}getOldSingleDateInputRef(){return this.oldSingleDateInputRef}}st([u()],ot.prototype,"placeholder",void 0),st([u()],ot.prototype,"format",void 0),st([u()],ot.prototype,"vegaDatePickerFormatController",void 0),st([u()],ot.prototype,"vegaDatePickerRenderer",void 0),st([u()],ot.prototype,"vegaDatePickerCalendarRenderer",void 0),st([m("componentWillRender")],ot.prototype,"componentWillRender",null);var at=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class ht extends rt{constructor(){super(...arguments),this.render=()=>t(i,null,t("div",{class:"date-picker-input"},this.vegaDatePickerRenderer.renderInputPrefix(),t("input",{readOnly:!this.vegaDatePickerRenderer.isInputEnabled(),placeholder:this.getRangePlaceholder()[0],value:this.vegaDatePickerValueController.getValue()[0],ref:t=>this.startDateInputRef=t,onChange:this.onStartDateChange,disabled:this.disabled})),t("span",{class:{"range-input-divider":!0}}),t("div",{class:"date-picker-input"},t("input",{readOnly:!this.vegaDatePickerRenderer.isInputEnabled(),placeholder:this.getRangePlaceholder()[1],value:this.vegaDatePickerValueController.getValue()[1],ref:t=>this.endDateInputRef=t,onChange:this.onEndDateChange,disabled:this.disabled}),this.renderClearIcon())),this.getRangePlaceholder=()=>this.placeholder?Array.isArray(this.placeholder)&&2===this.placeholder.length?this.placeholder:(v.warn("The placeholder should be an array, including start and end placeholder"),["Start Date","End Date"].map((t=>this.translationSlimmer.t(t)))):["Start Date","End Date"].map((t=>this.translationSlimmer.t(t))),this.onStartDateChange=t=>{const e=t.currentTarget.value;d(e)?this.vegaDatePickerValueController.setValue([this.vegaDatePickerFormatController.formatDate(e),this.vegaDatePickerValueController.getValue()[1]]):(this.vegaDatePickerValueController.setValue(["",this.vegaDatePickerValueController.getValue()[1]]),this.startDateInputRef.value="",v.warn("The date value of ${date} is invalid"))},this.onEndDateChange=t=>{const e=t.currentTarget.value;d(e)?this.vegaDatePickerValueController.setValue([this.vegaDatePickerValueController.getValue()[0],this.vegaDatePickerFormatController.formatDate(e)]):(this.vegaDatePickerValueController.setValue([this.vegaDatePickerValueController.getValue()[0],""]),this.endDateInputRef.value="",v.warn("The date value of ${date} is invalid"))}}componentWillRender(){this.oldStartDateInputRef=this.startDateInputRef,this.oldEndDateInputRef=this.endDateInputRef}getStartDateInputRef(){return this.startDateInputRef}getEndDateInputRef(){return this.endDateInputRef}getOldStartDateInputRef(){return this.oldStartDateInputRef}getOldEndDateInputRef(){return this.oldEndDateInputRef}}at([u()],ht.prototype,"placeholder",void 0),at([u()],ht.prototype,"vegaDatePickerFormatController",void 0),at([u()],ht.prototype,"vegaDatePickerRenderer",void 0),at([u()],ht.prototype,"translationSlimmer",void 0),at([m("componentWillRender")],ht.prototype,"componentWillRender",null);var dt=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class ct extends f{constructor(){super(...arguments),this.handleClear=()=>{this.vegaDatePickerCalendarRenderer.getDatePicker().clearSelection(),this.vegaDatePickerValueController.setDefaultValueByMode(),this.vegaDatePickerCalendarRenderer.getDatePicker().hide()},this.shouldUpdateCalendar=t=>{var e,i;const n=(null===(e=this.vegaDatePickerCalendarRenderer.getDatePicker().getStartDate())||void 0===e?void 0:e.format(this.format))||"",r=(null===(i=this.vegaDatePickerCalendarRenderer.getDatePicker().getEndDate())||void 0===i?void 0:i.format(this.format))||"";("single"===this.mode&&t!==n||"range"===this.mode&&!S(t,[n,r]))&&this.updateCalendar()},this.onDatePickerSelected=(t,e)=>{if("range"===this.mode){const i=t.format(this.format),n=e.format(this.format);this.vegaDatePickerRangeInputRenderer.getStartDateInputRef().value=i,this.vegaDatePickerRangeInputRenderer.getEndDateInputRef().value=n,this.vegaDatePickerValueController.syncUpValueWithCalendar()}else this.vegaDatePickerSingleInputRenderer.getSingleDateInputRef().value=t.format(this.format),this.vegaDatePickerValueController.syncUpValueWithCalendar()},this.getDefaultLitePickerConfig=()=>{const t=Object.assign(Object.assign({},this.getModeConfig()),{splitView:!1,showTooltip:!1,firstDay:0,minDate:this.minDate,maxDate:this.maxDate,allowRepick:this.allowRepick,format:this.format,plugins:[this.vegaDatePickerMobileController.getIsMobileDevice()?"mobilefriendly":null].filter(Boolean),parentEl:this.vegaDatePickerCalendarRenderer.getCalendarContainerRef()});if(this.showYearMonthDropdowns){const e=this.minDate?new Date(this.minDate).getFullYear():(new Date).getFullYear()-ct.DEFAULT_MINIMUM_DROPDOWN_YEAR_BEFORE_CURRENT_YEAR,i=this.maxDate?new Date(this.maxDate).getFullYear():(new Date).getFullYear()+ct.DEFAULT_MINIMUM_DROPDOWN_YEAR_AFTER_CURRENT_YEAR;t.dropdowns={months:!0,years:!0,minYear:e,maxYear:i}}return t},this.getModeConfig=()=>({singleMode:"single"===this.mode,numberOfMonths:"single"===this.mode?1:2,numberOfColumns:"single"===this.mode?1:2,startDate:"range"===this.mode?this.vegaDatePickerValueController.getValue()[0]:this.vegaDatePickerValueController.getValue(),endDate:"range"===this.mode?this.vegaDatePickerValueController.getValue()[1]:null,element:"range"===this.mode?this.vegaDatePickerRangeInputRenderer.getStartDateInputRef():this.vegaDatePickerSingleInputRenderer.getSingleDateInputRef(),elementEnd:"range"===this.mode?this.vegaDatePickerRangeInputRenderer.getEndDateInputRef():null})}watchMinDate(t){this.minDate=t?this.vegaDatePickerFormatController.formatDate(t):"",this.vegaDatePickerCalendarRenderer.getDatePicker().setOptions({minDate:this.minDate?this.minDate:null}),this.goToDate()}watchMaxDate(t){this.maxDate=t?this.vegaDatePickerFormatController.formatDate(t):"",this.vegaDatePickerCalendarRenderer.getDatePicker().setOptions({maxDate:this.maxDate?this.maxDate:null}),this.goToDate()}watchValue(){this.goToDate()}goToDate(){const t="range"===this.mode?this.vegaDatePickerValueController.getValue()[0]:this.vegaDatePickerValueController.getValue(),e=this.vegaDatePickerCalendarRenderer.getDatePicker(),i=new Date;t?e.gotoDate(t,0):this.minDate&&(c(i,new Date(this.minDate))||this.maxDate&&l(i,new Date(this.maxDate)))?e.gotoDate(this.minDate,0):this.maxDate&&l(i,new Date(this.maxDate))?e.gotoDate(this.maxDate,0):e.gotoDate(i,0)}updateCalendar(){if(this.vegaDatePickerCalendarRenderer.getDatePicker()&&("single"===this.mode&&(this.vegaDatePickerValueController.getValue()?this.vegaDatePickerCalendarRenderer.getDatePicker().setDate(this.vegaDatePickerValueController.getValue()):this.vegaDatePickerCalendarRenderer.getDatePicker().clearSelection()),"range"===this.mode)){const t=this.vegaDatePickerValueController.getValue()[0],e=this.vegaDatePickerValueController.getValue()[1];t&&e?this.vegaDatePickerCalendarRenderer.getDatePicker().setDateRange(t,e):""===t&&""===e&&this.vegaDatePickerCalendarRenderer.getDatePicker().clearSelection()}}}ct.DEFAULT_MINIMUM_DROPDOWN_YEAR_BEFORE_CURRENT_YEAR=10,ct.DEFAULT_MINIMUM_DROPDOWN_YEAR_AFTER_CURRENT_YEAR=10,dt([u({writable:!0})],ct.prototype,"minDate",void 0),dt([u({writable:!0})],ct.prototype,"maxDate",void 0),dt([u()],ct.prototype,"allowRepick",void 0),dt([u()],ct.prototype,"format",void 0),dt([u()],ct.prototype,"mode",void 0),dt([u()],ct.prototype,"showYearMonthDropdowns",void 0),dt([u()],ct.prototype,"vegaDatePickerMobileController",void 0),dt([u()],ct.prototype,"vegaDatePickerValueController",void 0),dt([u()],ct.prototype,"vegaDatePickerFormatController",void 0),dt([u()],ct.prototype,"vegaDatePickerSingleInputRenderer",void 0),dt([u()],ct.prototype,"vegaDatePickerRangeInputRenderer",void 0),dt([u()],ct.prototype,"vegaDatePickerCalendarRenderer",void 0),dt([m("watchMinDate")],ct.prototype,"watchMinDate",null),dt([m("watchMaxDate")],ct.prototype,"watchMaxDate",null),dt([m("watchValue")],ct.prototype,"watchValue",null);var lt=z((function(t){
2
+ /*!
3
+ *
4
+ * litepicker.umd.js
5
+ * Litepicker v2.0.12 (https://github.com/wakirin/Litepicker)
6
+ * Package: litepicker (https://www.npmjs.com/package/litepicker)
7
+ * License: MIT (https://github.com/wakirin/Litepicker/blob/master/LICENCE.md)
8
+ * Copyright 2019-2021 Rinat G.
9
+ *
10
+ * Hash: f46190e781537007f2f2
11
+ *
12
+ */
13
+ window,t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=4)}([function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(e,i,n){void 0===e&&(e=null),void 0===i&&(i=null),void 0===n&&(n="en-US"),this.dateInstance="object"==typeof i&&null!==i?i.parse(e instanceof t?e.clone().toJSDate():e):"string"==typeof i?t.parseDateTime(e,i,n):t.parseDateTime(e||new Date),this.lang=n}return t.parseDateTime=function(e,i,n){if(void 0===i&&(i="YYYY-MM-DD"),void 0===n&&(n="en-US"),!e)return new Date(NaN);if(e instanceof Date)return new Date(e);if(e instanceof t)return e.clone().toJSDate();if(/^-?\d{10,}$/.test(e))return t.getDateZeroTime(new Date(Number(e)));if("string"==typeof e){for(var r=[],s=null;null!=(s=t.regex.exec(i));)"\\"!==s[1]&&r.push(s);if(r.length){var o={year:null,month:null,shortMonth:null,longMonth:null,day:null,value:""};r[0].index>0&&(o.value+=".*?");for(var a=0,h=Object.entries(r);a<h.length;a++){var d=h[a],c=d[1],l=Number(d[0]),p=t.formatPatterns(c[0],n),u=p.pattern;o[p.group]=l+1,o.value+=u,o.value+=".*?"}var f=new RegExp("^"+o.value+"$");if(f.test(e)){var m=f.exec(e),v=Number(m[o.year]),g=null;o.month?g=Number(m[o.month])-1:o.shortMonth?g=t.shortMonths(n).indexOf(m[o.shortMonth]):o.longMonth&&(g=t.longMonths(n).indexOf(m[o.longMonth]));var w=Number(m[o.day])||1;return new Date(v,g,w,0,0,0,0)}}}return t.getDateZeroTime(new Date(e))},t.convertArray=function(e,i){return e.map((function(e){return e instanceof Array?e.map((function(e){return new t(e,i)})):new t(e,i)}))},t.getDateZeroTime=function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},t.shortMonths=function(e){return t.MONTH_JS.map((function(t){return new Date(2019,t).toLocaleString(e,{month:"short"})}))},t.longMonths=function(e){return t.MONTH_JS.map((function(t){return new Date(2019,t).toLocaleString(e,{month:"long"})}))},t.formatPatterns=function(e,i){switch(e){case"YY":case"YYYY":return{group:"year",pattern:"(\\d{"+e.length+"})"};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:"("+t.shortMonths(i).join("|")+")"};case"MMMM":return{group:"longMonth",pattern:"("+t.longMonths(i).join("|")+")"};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"}}},t.prototype.toJSDate=function(){return this.dateInstance},t.prototype.toLocaleString=function(t,e){return this.dateInstance.toLocaleString(t,e)},t.prototype.toDateString=function(){return this.dateInstance.toDateString()},t.prototype.getSeconds=function(){return this.dateInstance.getSeconds()},t.prototype.getDay=function(){return this.dateInstance.getDay()},t.prototype.getTime=function(){return this.dateInstance.getTime()},t.prototype.getDate=function(){return this.dateInstance.getDate()},t.prototype.getMonth=function(){return this.dateInstance.getMonth()},t.prototype.getFullYear=function(){return this.dateInstance.getFullYear()},t.prototype.setMonth=function(t){return this.dateInstance.setMonth(t)},t.prototype.setHours=function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.dateInstance.setHours(t,e,i,n)},t.prototype.setSeconds=function(t){return this.dateInstance.setSeconds(t)},t.prototype.setDate=function(t){return this.dateInstance.setDate(t)},t.prototype.setFullYear=function(t){return this.dateInstance.setFullYear(t)},t.prototype.getWeek=function(t){var e=new Date(this.timestamp()),i=(this.getDay()+(7-t))%7;e.setDate(e.getDate()-i);var n=e.getTime();return e.setMonth(0,1),e.getDay()!==t&&e.setMonth(0,1+(4-e.getDay()+7)%7),1+Math.ceil((n-e.getTime())/6048e5)},t.prototype.clone=function(){return new t(this.toJSDate())},t.prototype.isBetween=function(t,e,i){switch(void 0===i&&(i="()"),i){default:case"()":return this.timestamp()>t.getTime()&&this.timestamp()<e.getTime();case"[)":return this.timestamp()>=t.getTime()&&this.timestamp()<e.getTime();case"(]":return this.timestamp()>t.getTime()&&this.timestamp()<=e.getTime();case"[]":return this.timestamp()>=t.getTime()&&this.timestamp()<=e.getTime()}},t.prototype.isBefore=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return t.getTime()>this.getTime();case"day":case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(t.getFullYear(),t.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return t.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")},t.prototype.isSameOrBefore=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return t.getTime()>=this.getTime();case"day":case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(t.getFullYear(),t.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")},t.prototype.isAfter=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()>t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(t.getFullYear(),t.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>t.getFullYear()}throw new Error("isAfter: Invalid unit!")},t.prototype.isSameOrAfter=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()>=t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(t.getFullYear(),t.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")},t.prototype.isSame=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()===t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(t.getFullYear(),t.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")},t.prototype.add=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":this.setSeconds(this.getSeconds()+t);break;case"day":case"days":this.setDate(this.getDate()+t);break;case"month":case"months":this.setMonth(this.getMonth()+t)}return this},t.prototype.subtract=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":this.setSeconds(this.getSeconds()-t);break;case"day":case"days":this.setDate(this.getDate()-t);break;case"month":case"months":this.setMonth(this.getMonth()-t)}return this},t.prototype.diff=function(t,e){switch(void 0===e&&(e="seconds"),e){default:case"second":case"seconds":return this.getTime()-t.getTime();case"day":case"days":return Math.round((this.timestamp()-t.getTime())/864e5);case"month":case"months":}},t.prototype.format=function(e,i){if(void 0===i&&(i="en-US"),"object"==typeof e)return e.output(this.clone().toJSDate());for(var n="",r=[],s=null;null!=(s=t.regex.exec(e));)"\\"!==s[1]&&r.push(s);if(r.length){r[0].index>0&&(n+=e.substring(0,r[0].index));for(var o=0,a=Object.entries(r);o<a.length;o++){var h=a[o],d=h[1],c=Number(h[0]);n+=this.formatTokens(d[0],i),r[c+1]&&(n+=e.substring(d.index+d[0].length,r[c+1].index)),c===r.length-1&&(n+=e.substring(d.index+d[0].length))}}return n.replace(/\\/g,"")},t.prototype.timestamp=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()},t.prototype.formatTokens=function(e,i){switch(e){case"YY":return String(this.getFullYear()).slice(-2);case"YYYY":return String(this.getFullYear());case"M":return String(this.getMonth()+1);case"MM":return("0"+(this.getMonth()+1)).slice(-2);case"MMM":return t.shortMonths(i)[this.getMonth()];case"MMMM":return t.longMonths(i)[this.getMonth()];case"D":return String(this.getDate());case"DD":return("0"+this.getDate()).slice(-2);default:return""}},t.regex=/(\\)?(Y{2,4}|M{1,4}|D{1,2}|d{1,4})/g,t.MONTH_JS=[0,1,2,3,4,5,6,7,8,9,10,11],t}();e.DateTime=i},function(t,e,i){var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,r++)n[r]=s[o];return n};Object.defineProperty(e,"__esModule",{value:!0});var o=i(5),a=i(0),h=i(3),d=i(2),c=function(t){function e(e){var i=t.call(this,e)||this;return i.preventClick=!1,i.bindEvents(),i}return r(e,t),e.prototype.scrollToDate=function(t){if(this.options.scrollToDate){var e=this.options.startDate instanceof a.DateTime?this.options.startDate.clone():null,i=this.options.endDate instanceof a.DateTime?this.options.endDate.clone():null;!this.options.startDate||t&&t!==this.options.element?t&&this.options.endDate&&t===this.options.elementEnd&&(i.setDate(1),this.options.numberOfMonths>1&&i.isAfter(e)&&i.setMonth(i.getMonth()-(this.options.numberOfMonths-1)),this.calendars[0]=i.clone()):(e.setDate(1),this.calendars[0]=e.clone())}},e.prototype.bindEvents=function(){document.addEventListener("click",this.onClick.bind(this),!0),this.ui=document.createElement("div"),this.ui.className=h.litepicker,this.ui.style.display="none",this.ui.addEventListener("mouseenter",this.onMouseEnter.bind(this),!0),this.ui.addEventListener("mouseleave",this.onMouseLeave.bind(this),!1),this.options.autoRefresh?(this.options.element instanceof HTMLElement&&this.options.element.addEventListener("keyup",this.onInput.bind(this),!0),this.options.elementEnd instanceof HTMLElement&&this.options.elementEnd.addEventListener("keyup",this.onInput.bind(this),!0)):(this.options.element instanceof HTMLElement&&this.options.element.addEventListener("change",this.onInput.bind(this),!0),this.options.elementEnd instanceof HTMLElement&&this.options.elementEnd.addEventListener("change",this.onInput.bind(this),!0)),this.options.parentEl?this.options.parentEl instanceof HTMLElement?this.options.parentEl.appendChild(this.ui):document.querySelector(this.options.parentEl).appendChild(this.ui):this.options.inlineMode?this.options.element instanceof HTMLInputElement?this.options.element.parentNode.appendChild(this.ui):this.options.element.appendChild(this.ui):document.body.appendChild(this.ui),this.updateInput(),this.init(),"function"==typeof this.options.setup&&this.options.setup.call(this,this),this.render(),this.options.inlineMode&&this.show()},e.prototype.updateInput=function(){if(this.options.element instanceof HTMLInputElement){var t=this.options.startDate,e=this.options.endDate;if(this.options.singleMode&&t)this.options.element.value=t.format(this.options.format,this.options.lang);else if(!this.options.singleMode&&t&&e){var i=t.format(this.options.format,this.options.lang),n=e.format(this.options.format,this.options.lang);this.options.elementEnd instanceof HTMLInputElement?(this.options.element.value=i,this.options.elementEnd.value=n):this.options.element.value=""+i+this.options.delimiter+n}t||e||(this.options.element.value="",this.options.elementEnd instanceof HTMLInputElement&&(this.options.elementEnd.value=""))}},e.prototype.isSamePicker=function(t){return t.closest("."+h.litepicker)===this.ui},e.prototype.shouldShown=function(t){return!t.disabled&&(t===this.options.element||this.options.elementEnd&&t===this.options.elementEnd)},e.prototype.shouldResetDatePicked=function(){return this.options.singleMode||2===this.datePicked.length},e.prototype.shouldSwapDatePicked=function(){return 2===this.datePicked.length&&this.datePicked[0].getTime()>this.datePicked[1].getTime()},e.prototype.shouldCheckLockDays=function(){return this.options.disallowLockDaysInRange&&2===this.datePicked.length},e.prototype.onClick=function(t){var e=t.target;if(t.target.shadowRoot&&(e=t.composedPath()[0]),e&&this.ui)if(this.shouldShown(e))this.show(e);else if(e.closest("."+h.litepicker)||!this.isShowning()){if(this.isSamePicker(e))if(this.emit("before:click",e),this.preventClick)this.preventClick=!1;else{if(e.classList.contains(h.dayItem)){if(t.preventDefault(),e.classList.contains(h.isLocked))return;if(this.shouldResetDatePicked()&&(this.datePicked.length=0),this.datePicked[this.datePicked.length]=new a.DateTime(e.dataset.time),this.shouldSwapDatePicked()){var i=this.datePicked[1].clone();this.datePicked[1]=this.datePicked[0].clone(),this.datePicked[0]=i.clone()}return this.shouldCheckLockDays()&&d.rangeIsLocked(this.datePicked,this.options)&&(this.emit("error:range",this.datePicked),this.datePicked.length=0),this.render(),this.emit.apply(this,s(["preselect"],s(this.datePicked).map((function(t){return t.clone()})))),void(this.options.autoApply&&(this.options.singleMode&&this.datePicked.length?(this.setDate(this.datePicked[0]),this.hide()):this.options.singleMode||2!==this.datePicked.length||(this.setDateRange(this.datePicked[0],this.datePicked[1]),this.hide())))}if(e.classList.contains(h.buttonPreviousMonth)){t.preventDefault();var n=0,r=this.options.switchingMonths||this.options.numberOfMonths;if(this.options.splitView){var o=e.closest("."+h.monthItem);n=d.findNestedMonthItem(o),r=1}return this.calendars[n].setMonth(this.calendars[n].getMonth()-r),this.gotoDate(this.calendars[n],n),void this.emit("change:month",this.calendars[n],n)}if(e.classList.contains(h.buttonNextMonth))return t.preventDefault(),n=0,r=this.options.switchingMonths||this.options.numberOfMonths,this.options.splitView&&(o=e.closest("."+h.monthItem),n=d.findNestedMonthItem(o),r=1),this.calendars[n].setMonth(this.calendars[n].getMonth()+r),this.gotoDate(this.calendars[n],n),void this.emit("change:month",this.calendars[n],n);e.classList.contains(h.buttonCancel)&&(t.preventDefault(),this.hide(),this.emit("button:cancel")),e.classList.contains(h.buttonApply)&&(t.preventDefault(),this.options.singleMode&&this.datePicked.length?this.setDate(this.datePicked[0]):this.options.singleMode||2!==this.datePicked.length||this.setDateRange(this.datePicked[0],this.datePicked[1]),this.hide(),this.emit("button:apply",this.options.startDate,this.options.endDate))}}else this.hide()},e.prototype.showTooltip=function(t,e){var i=this.ui.querySelector("."+h.containerTooltip);i.style.visibility="visible",i.innerHTML=e;var n=this.ui.getBoundingClientRect(),r=i.getBoundingClientRect(),s=t.getBoundingClientRect(),o=s.top,a=s.left;if(this.options.inlineMode&&this.options.parentEl){var d=this.ui.parentNode.getBoundingClientRect();o-=d.top,a-=d.left}else o-=n.top,a-=n.left;a-=r.width/2,a+=s.width/2,i.style.top=(o-=r.height)+"px",i.style.left=a+"px",this.emit("tooltip",i,t)},e.prototype.hideTooltip=function(){this.ui.querySelector("."+h.containerTooltip).style.visibility="hidden"},e.prototype.shouldAllowMouseEnter=function(t){return!this.options.singleMode&&!t.classList.contains(h.isLocked)},e.prototype.shouldAllowRepick=function(){return this.options.elementEnd&&this.options.allowRepick&&this.options.startDate&&this.options.endDate},e.prototype.isDayItem=function(t){return t.classList.contains(h.dayItem)},e.prototype.onMouseEnter=function(t){var e=this,i=t.target;if(this.isDayItem(i)&&this.shouldAllowMouseEnter(i)){if(this.shouldAllowRepick()&&(this.triggerElement===this.options.element?this.datePicked[0]=this.options.endDate.clone():this.triggerElement===this.options.elementEnd&&(this.datePicked[0]=this.options.startDate.clone())),1!==this.datePicked.length)return;var n=this.ui.querySelector("."+h.dayItem+'[data-time="'+this.datePicked[0].getTime()+'"]'),r=this.datePicked[0].clone(),s=new a.DateTime(i.dataset.time),o=!1;if(r.getTime()>s.getTime()){var d=r.clone();r=s.clone(),s=d.clone(),o=!0}if(Array.prototype.slice.call(this.ui.querySelectorAll("."+h.dayItem)).forEach((function(t){var i=new a.DateTime(t.dataset.time),n=e.renderDay(i);i.isBetween(r,s)&&n.classList.add(h.isInRange),t.className=n.className})),i.classList.add(h.isEndDate),o?(n&&n.classList.add(h.isFlipped),i.classList.add(h.isFlipped)):(n&&n.classList.remove(h.isFlipped),i.classList.remove(h.isFlipped)),this.options.showTooltip){var c=s.diff(r,"day")+1;if("function"==typeof this.options.tooltipNumber&&(c=this.options.tooltipNumber.call(this,c)),c>0){var l=this.pluralSelector(c);this.showTooltip(i,c+" "+(this.options.tooltipText[l]?this.options.tooltipText[l]:"["+l+"]"));var p=window.navigator.userAgent,u=/(iphone|ipad)/i.test(p),f=/OS 1([0-2])/i.test(p);u&&f&&i.dispatchEvent(new Event("click"))}else this.hideTooltip()}}},e.prototype.onMouseLeave=function(){this.options.allowRepick&&(!this.options.allowRepick||this.options.startDate||this.options.endDate)&&(this.datePicked.length=0,this.render())},e.prototype.onInput=function(t){var e=this.parseInput(),i=e[0],n=e[1],r=this.options.format;if(this.options.elementEnd?i instanceof a.DateTime&&n instanceof a.DateTime&&i.format(r)===this.options.element.value&&n.format(r)===this.options.elementEnd.value:this.options.singleMode?i instanceof a.DateTime&&i.format(r)===this.options.element.value:i instanceof a.DateTime&&n instanceof a.DateTime&&""+i.format(r)+this.options.delimiter+n.format(r)===this.options.element.value){if(n&&i.getTime()>n.getTime()){var s=i.clone();i=n.clone(),n=s.clone()}this.options.startDate=new a.DateTime(i,this.options.format,this.options.lang),n&&(this.options.endDate=new a.DateTime(n,this.options.format,this.options.lang)),this.updateInput(),this.render();var o=i.clone(),h=0;(this.options.elementEnd?i.format(r)===t.target.value:t.target.value.startsWith(i.format(r)))||(o=n.clone(),h=this.options.numberOfMonths-1),this.emit("selected",this.getStartDate(),this.getEndDate()),this.gotoDate(o,h)}},e}(o.Calendar);e.Litepicker=c},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.findNestedMonthItem=function(t){for(var e=t.parentNode.childNodes,i=0;i<e.length;i+=1)if(e.item(i)===t)return i;return 0},e.dateIsLocked=function(t,e,i){var n=!1;return e.lockDays.length&&(n=e.lockDays.filter((function(i){return i instanceof Array?t.isBetween(i[0],i[1],e.lockDaysInclusivity):i.isSame(t,"day")})).length),n||"function"!=typeof e.lockDaysFilter||(n=e.lockDaysFilter.call(this,t.clone(),null,i)),n},e.rangeIsLocked=function(t,e){var i=!1;return e.lockDays.length&&(i=e.lockDays.filter((function(i){if(i instanceof Array){var n=t[0].toDateString()===i[0].toDateString()&&t[1].toDateString()===i[1].toDateString();return i[0].isBetween(t[0],t[1],e.lockDaysInclusivity)||i[1].isBetween(t[0],t[1],e.lockDaysInclusivity)||n}return i.isBetween(t[0],t[1],e.lockDaysInclusivity)})).length),i||"function"!=typeof e.lockDaysFilter||(i=e.lockDaysFilter.call(this,t[0].clone(),t[1].clone(),t)),i}},function(t){t.exports={showWeekNumbers:"show-week-numbers",litepicker:"litepicker",containerMain:"container__main",containerMonths:"container__months",columns2:"columns-2",columns3:"columns-3",columns4:"columns-4",splitView:"split-view",monthItemHeader:"month-item-header",buttonPreviousMonth:"button-previous-month",buttonNextMonth:"button-next-month",monthItem:"month-item",monthItemName:"month-item-name",monthItemYear:"month-item-year",resetButton:"reset-button",monthItemWeekdaysRow:"month-item-weekdays-row",noPreviousMonth:"no-previous-month",noNextMonth:"no-next-month",containerDays:"container__days",dayItem:"day-item",isToday:"is-today",isLocked:"is-locked",isInRange:"is-in-range",isStartDate:"is-start-date",isFlipped:"is-flipped",isEndDate:"is-end-date",isHighlighted:"is-highlighted",weekNumber:"week-number",containerFooter:"container__footer",previewDateRange:"preview-date-range",buttonCancel:"button-cancel",buttonApply:"button-apply",containerTooltip:"container__tooltip"}},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var n=i(1);e.Litepicker=n.Litepicker,i(8),window.Litepicker=n.Litepicker,e.default=n.Litepicker},function(t,e,i){var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var s=i(6),o=i(0),a=i(3),h=i(2),d=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.prototype.render=function(){var t=this;this.emit("before:render",this.ui);var e=document.createElement("div");e.className=a.containerMain;var i=document.createElement("div");i.className=a.containerMonths,a["columns"+this.options.numberOfColumns]&&(i.classList.remove(a.columns2,a.columns3,a.columns4),i.classList.add(a["columns"+this.options.numberOfColumns])),this.options.splitView&&i.classList.add(a.splitView),this.options.showWeekNumbers&&i.classList.add(a.showWeekNumbers);for(var n=this.calendars[0].clone(),r=n.getMonth(),s=n.getMonth()+this.options.numberOfMonths,o=0,h=r;h<s;h+=1){var d=n.clone();d.setDate(1),d.setHours(0,0,0,0),this.options.splitView?d=this.calendars[o].clone():d.setMonth(h),i.appendChild(this.renderMonth(d,o)),o+=1}if(this.ui.innerHTML="",e.appendChild(i),this.options.resetButton){var c=void 0;"function"==typeof this.options.resetButton?c=this.options.resetButton.call(this):((c=document.createElement("button")).type="button",c.className=a.resetButton,c.innerHTML=this.options.buttonText.reset),c.addEventListener("click",(function(e){e.preventDefault(),t.clearSelection()})),e.querySelector("."+a.monthItem+":last-child").querySelector("."+a.monthItemHeader).appendChild(c)}this.ui.appendChild(e),this.options.autoApply&&!this.options.footerHTML||this.ui.appendChild(this.renderFooter()),this.options.showTooltip&&this.ui.appendChild(this.renderTooltip()),this.ui.dataset.plugins=(this.options.plugins||[]).join("|"),this.emit("render",this.ui)},e.prototype.renderMonth=function(t){var e=this,i=t.clone(),n=32-new Date(i.getFullYear(),i.getMonth(),32).getDate(),r=document.createElement("div");r.className=a.monthItem;var s=document.createElement("div");s.className=a.monthItemHeader;var d=document.createElement("div");if(this.options.dropdowns.months){var c=document.createElement("select");c.className=a.monthItemName;for(var l=0;l<12;l+=1){var p=document.createElement("option"),u=new o.DateTime(new Date(t.getFullYear(),l,2,0,0,0)),f=new o.DateTime(new Date(t.getFullYear(),l,1,0,0,0));p.value=String(l),p.text=u.toLocaleString(this.options.lang,{month:"long"}),p.disabled=this.options.minDate&&f.isBefore(new o.DateTime(this.options.minDate),"month")||this.options.maxDate&&f.isAfter(new o.DateTime(this.options.maxDate),"month"),p.selected=f.getMonth()===t.getMonth(),c.appendChild(p)}c.addEventListener("change",(function(t){var i=t.target,n=0;if(e.options.splitView){var r=i.closest("."+a.monthItem);n=h.findNestedMonthItem(r)}e.calendars[n].setMonth(Number(i.value)),e.render(),e.emit("change:month",e.calendars[n],n,t)})),d.appendChild(c)}else(u=document.createElement("strong")).className=a.monthItemName,u.innerHTML=t.toLocaleString(this.options.lang,{month:"long"}),d.appendChild(u);if(this.options.dropdowns.years){var m=document.createElement("select");m.className=a.monthItemYear;var v=this.options.dropdowns.minYear,g=this.options.dropdowns.maxYear?this.options.dropdowns.maxYear:(new Date).getFullYear();for(t.getFullYear()>g&&((p=document.createElement("option")).value=String(t.getFullYear()),p.text=String(t.getFullYear()),p.selected=!0,p.disabled=!0,m.appendChild(p)),l=g;l>=v;l-=1){p=document.createElement("option");var w=new o.DateTime(new Date(l,0,1,0,0,0));p.value=String(l),p.text=String(l),p.disabled=this.options.minDate&&w.isBefore(new o.DateTime(this.options.minDate),"year")||this.options.maxDate&&w.isAfter(new o.DateTime(this.options.maxDate),"year"),p.selected=t.getFullYear()===l,m.appendChild(p)}if(t.getFullYear()<v&&((p=document.createElement("option")).value=String(t.getFullYear()),p.text=String(t.getFullYear()),p.selected=!0,p.disabled=!0,m.appendChild(p)),"asc"===this.options.dropdowns.years){var x=Array.prototype.slice.call(m.childNodes).reverse();m.innerHTML="",x.forEach((function(t){t.innerHTML=t.value,m.appendChild(t)}))}m.addEventListener("change",(function(t){var i=t.target,n=0;if(e.options.splitView){var r=i.closest("."+a.monthItem);n=h.findNestedMonthItem(r)}e.calendars[n].setFullYear(Number(i.value)),e.render(),e.emit("change:year",e.calendars[n],n,t)})),d.appendChild(m)}else{var b=document.createElement("span");b.className=a.monthItemYear,b.innerHTML=String(t.getFullYear()),d.appendChild(b)}var y=document.createElement("button");y.type="button",y.className=a.buttonPreviousMonth,y.innerHTML=this.options.buttonText.previousMonth;var k=document.createElement("button");k.type="button",k.className=a.buttonNextMonth,k.innerHTML=this.options.buttonText.nextMonth,s.appendChild(y),s.appendChild(d),s.appendChild(k),this.options.minDate&&i.isSameOrBefore(new o.DateTime(this.options.minDate),"month")&&r.classList.add(a.noPreviousMonth),this.options.maxDate&&i.isSameOrAfter(new o.DateTime(this.options.maxDate),"month")&&r.classList.add(a.noNextMonth);var D=document.createElement("div");D.className=a.monthItemWeekdaysRow,this.options.showWeekNumbers&&(D.innerHTML="<div>W</div>");for(var _=1;_<=7;_+=1){var j=3+this.options.firstDay+_,M=document.createElement("div");M.innerHTML=this.weekdayName(j),M.title=this.weekdayName(j,"long"),D.appendChild(M)}var R=document.createElement("div");R.className=a.containerDays;var I=this.calcSkipDays(i);this.options.showWeekNumbers&&I&&R.appendChild(this.renderWeekNumber(i));for(var C=0;C<I;C+=1){var O=document.createElement("div");R.appendChild(O)}for(C=1;C<=n;C+=1)i.setDate(C),this.options.showWeekNumbers&&i.getDay()===this.options.firstDay&&R.appendChild(this.renderWeekNumber(i)),R.appendChild(this.renderDay(i));return r.appendChild(s),r.appendChild(D),r.appendChild(R),this.emit("render:month",r,t),r},e.prototype.renderDay=function(t){t.setHours();var e=document.createElement("div");if(e.className=a.dayItem,e.innerHTML=String(t.getDate()),e.dataset.time=String(t.getTime()),t.toDateString()===(new Date).toDateString()&&e.classList.add(a.isToday),this.datePicked.length)this.datePicked[0].toDateString()===t.toDateString()&&(e.classList.add(a.isStartDate),this.options.singleMode&&e.classList.add(a.isEndDate)),2===this.datePicked.length&&this.datePicked[1].toDateString()===t.toDateString()&&e.classList.add(a.isEndDate),2===this.datePicked.length&&t.isBetween(this.datePicked[0],this.datePicked[1])&&e.classList.add(a.isInRange);else if(this.options.startDate){var i=this.options.startDate,n=this.options.endDate;i.toDateString()===t.toDateString()&&(e.classList.add(a.isStartDate),this.options.singleMode&&e.classList.add(a.isEndDate)),n&&n.toDateString()===t.toDateString()&&e.classList.add(a.isEndDate),i&&n&&t.isBetween(i,n)&&e.classList.add(a.isInRange)}if(this.options.minDate&&t.isBefore(new o.DateTime(this.options.minDate))&&e.classList.add(a.isLocked),this.options.maxDate&&t.isAfter(new o.DateTime(this.options.maxDate))&&e.classList.add(a.isLocked),this.options.minDays>1&&1===this.datePicked.length){var r=this.options.minDays-1,s=this.datePicked[0].clone().subtract(r,"day"),d=this.datePicked[0].clone().add(r,"day");t.isBetween(s,this.datePicked[0],"(]")&&e.classList.add(a.isLocked),t.isBetween(this.datePicked[0],d,"[)")&&e.classList.add(a.isLocked)}if(this.options.maxDays&&1===this.datePicked.length){var c=this.options.maxDays;s=this.datePicked[0].clone().subtract(c,"day"),d=this.datePicked[0].clone().add(c,"day"),t.isSameOrBefore(s)&&e.classList.add(a.isLocked),t.isSameOrAfter(d)&&e.classList.add(a.isLocked)}return this.options.selectForward&&1===this.datePicked.length&&t.isBefore(this.datePicked[0])&&e.classList.add(a.isLocked),this.options.selectBackward&&1===this.datePicked.length&&t.isAfter(this.datePicked[0])&&e.classList.add(a.isLocked),h.dateIsLocked(t,this.options,this.datePicked)&&e.classList.add(a.isLocked),this.options.highlightedDays.length&&this.options.highlightedDays.filter((function(e){return e instanceof Array?t.isBetween(e[0],e[1],"[]"):e.isSame(t,"day")})).length&&e.classList.add(a.isHighlighted),e.tabIndex=e.classList.contains("is-locked")?-1:0,this.emit("render:day",e,t),e},e.prototype.renderFooter=function(){var t=document.createElement("div");if(t.className=a.containerFooter,t.innerHTML=this.options.footerHTML?this.options.footerHTML:'\n <span class="'+a.previewDateRange+'"></span>\n <button type="button" class="'+a.buttonCancel+'">'+this.options.buttonText.cancel+'</button>\n <button type="button" class="'+a.buttonApply+'">'+this.options.buttonText.apply+"</button>\n ",this.options.singleMode){if(1===this.datePicked.length){var e=this.datePicked[0].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=e}}else if(1===this.datePicked.length&&t.querySelector("."+a.buttonApply).setAttribute("disabled",""),2===this.datePicked.length){e=this.datePicked[0].format(this.options.format,this.options.lang);var i=this.datePicked[1].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=""+e+this.options.delimiter+i}return this.emit("render:footer",t),t},e.prototype.renderWeekNumber=function(t){var e=document.createElement("div"),i=t.getWeek(this.options.firstDay);return e.className=a.weekNumber,e.innerHTML=53===i&&0===t.getMonth()?"53 / 1":i,e},e.prototype.renderTooltip=function(){var t=document.createElement("div");return t.className=a.containerTooltip,t},e.prototype.weekdayName=function(t,e){return void 0===e&&(e="short"),new Date(1970,0,t,12,0,0,0).toLocaleString(this.options.lang,{weekday:e})},e.prototype.calcSkipDays=function(t){var e=t.getDay()-this.options.firstDay;return e<0&&(e+=7),e},e}(s.LPCore);e.Calendar=d},function(t,e,i){var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=i(7),a=i(0),h=i(1),d=function(t){function e(e){var i=t.call(this)||this;i.datePicked=[],i.calendars=[],i.options={element:null,elementEnd:null,parentEl:null,firstDay:1,format:"YYYY-MM-DD",lang:"en-US",delimiter:" - ",numberOfMonths:1,numberOfColumns:1,startDate:null,endDate:null,zIndex:9999,position:"auto",selectForward:!1,selectBackward:!1,splitView:!1,inlineMode:!1,singleMode:!0,autoApply:!0,allowRepick:!1,showWeekNumbers:!1,showTooltip:!0,scrollToDate:!0,mobileFriendly:!0,resetButton:!1,autoRefresh:!1,lockDaysFormat:"YYYY-MM-DD",lockDays:[],disallowLockDaysInRange:!1,lockDaysInclusivity:"[]",highlightedDaysFormat:"YYYY-MM-DD",highlightedDays:[],dropdowns:{minYear:1990,maxYear:null,months:!1,years:!1},buttonText:{apply:"Apply",cancel:"Cancel",previousMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.919 0l2.748 2.667L5.333 8l5.334 5.333L7.919 16 0 8z" fill-rule="nonzero"/></svg>',nextMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.748 16L0 13.333 5.333 8 0 2.667 2.748 0l7.919 8z" fill-rule="nonzero"/></svg>',reset:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/>\n </svg>'},tooltipText:{one:"day",other:"days"}},i.options=s(s({},i.options),e.element.dataset),Object.keys(i.options).forEach((function(t){"true"!==i.options[t]&&"false"!==i.options[t]||(i.options[t]="true"===i.options[t])}));var n=s(s({},i.options.dropdowns),e.dropdowns),r=s(s({},i.options.buttonText),e.buttonText),o=s(s({},i.options.tooltipText),e.tooltipText);i.options=s(s({},i.options),e),i.options.dropdowns=s({},n),i.options.buttonText=s({},r),i.options.tooltipText=s({},o),i.options.elementEnd||(i.options.allowRepick=!1),i.options.lockDays.length&&(i.options.lockDays=a.DateTime.convertArray(i.options.lockDays,i.options.lockDaysFormat)),i.options.highlightedDays.length&&(i.options.highlightedDays=a.DateTime.convertArray(i.options.highlightedDays,i.options.highlightedDaysFormat));var h=i.parseInput(),d=h[0],c=h[1];i.options.startDate&&(i.options.singleMode||i.options.endDate)&&(d=new a.DateTime(i.options.startDate,i.options.format,i.options.lang)),d&&i.options.endDate&&(c=new a.DateTime(i.options.endDate,i.options.format,i.options.lang)),d instanceof a.DateTime&&!isNaN(d.getTime())&&(i.options.startDate=d),i.options.startDate&&c instanceof a.DateTime&&!isNaN(c.getTime())&&(i.options.endDate=c),!i.options.singleMode||i.options.startDate instanceof a.DateTime||(i.options.startDate=null),i.options.singleMode||i.options.startDate instanceof a.DateTime&&i.options.endDate instanceof a.DateTime||(i.options.startDate=null,i.options.endDate=null);for(var l=0;l<i.options.numberOfMonths;l+=1){var p=i.options.startDate instanceof a.DateTime?i.options.startDate.clone():new a.DateTime;if(!i.options.startDate&&(0===l||i.options.splitView)){var u=i.options.maxDate?new a.DateTime(i.options.maxDate):null,f=i.options.minDate?new a.DateTime(i.options.minDate):null,m=i.options.numberOfMonths-1;f&&u&&p.isAfter(u)?(p=f.clone()).setDate(1):!f&&u&&p.isAfter(u)&&((p=u.clone()).setDate(1),p.setMonth(p.getMonth()-m))}p.setDate(1),p.setMonth(p.getMonth()+l),i.calendars[l]=p}if(i.options.showTooltip)if(i.options.tooltipPluralSelector)i.pluralSelector=i.options.tooltipPluralSelector;else try{var v=new Intl.PluralRules(i.options.lang);i.pluralSelector=v.select.bind(v)}catch(t){i.pluralSelector=function(t){return 0===Math.abs(t)?"one":"other"}}return i}return r(e,t),e.add=function(t,e){h.Litepicker.prototype[t]=e},e.prototype.DateTime=function(t,e){return t?new a.DateTime(t,e):new a.DateTime},e.prototype.init=function(){var t=this;this.options.plugins&&this.options.plugins.length&&this.options.plugins.forEach((function(e){h.Litepicker.prototype.hasOwnProperty(e)?h.Litepicker.prototype[e].init.call(t,t):console.warn("Litepicker: plugin «"+e+"» not found.")}))},e.prototype.parseInput=function(){var t=this.options.delimiter,e=new RegExp(""+t),i=this.options.element instanceof HTMLInputElement?this.options.element.value.split(t):[];if(this.options.elementEnd){if(this.options.element instanceof HTMLInputElement&&this.options.element.value.length&&this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length)return[new a.DateTime(this.options.element.value,this.options.format),new a.DateTime(this.options.elementEnd.value,this.options.format)]}else if(this.options.singleMode){if(this.options.element instanceof HTMLInputElement&&this.options.element.value.length)return[new a.DateTime(this.options.element.value,this.options.format)]}else if(this.options.element instanceof HTMLInputElement&&e.test(this.options.element.value)&&i.length&&i.length%2==0){var n=i.slice(0,i.length/2).join(t),r=i.slice(i.length/2).join(t);return[new a.DateTime(n,this.options.format),new a.DateTime(r,this.options.format)]}return[]},e.prototype.isShowning=function(){return this.ui&&"none"!==this.ui.style.display},e.prototype.findPosition=function(t){var e=t.getBoundingClientRect(),i=this.ui.getBoundingClientRect(),n=this.options.position.split(" "),r=window.scrollX||window.pageXOffset,s=window.scrollY||window.pageYOffset,o=0,a=0;if("auto"!==n[0]&&/top|bottom/.test(n[0]))o=e[n[0]]+s,"top"===n[0]&&(o-=i.height);else{o=e.bottom+s;var h=e.bottom+i.height>window.innerHeight;h&&e.top+s-i.height>=i.height&&(o=e.top+s-i.height)}return/left|right/.test(n[0])||n[1]&&"auto"!==n[1]&&/left|right/.test(n[1])?(a=/left|right/.test(n[0])?e[n[0]]+r:e[n[1]]+r,"right"!==n[0]&&"right"!==n[1]||(a-=i.width)):(a=e.left+r,(h=e.left+i.width>window.innerWidth)&&e.right+r-i.width>=0&&(a=e.right+r-i.width)),{left:a,top:o}},e}(o.EventEmitter);e.LPCore=d},function(t){var e,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)};e=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function h(t,e,i,n){var r,s,o;if("function"!=typeof i)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i);if(void 0===(s=t._events)?(s=t._events=Object.create(null),t._eventsCount=0):(void 0!==s.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),s=t._events),o=s[e]),void 0===o)o=s[e]=i,++t._eventsCount;else if("function"==typeof o?o=s[e]=n?[i,o]:[o,i]:n?o.unshift(i):o.push(i),(r=a(t))>0&&o.length>r&&!o.warned){o.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=o.length,console&&console.warn&&console.warn(h)}return t}function d(){for(var t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,n(this.listener,this.target,t))}function c(t,e,i){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},r=d.bind(n);return r.listener=i,n.wrapFn=r,r}function l(t,e,i){var n=t._events;if(void 0===n)return[];var r=n[e];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(t){for(var e=new Array(t.length),i=0;i<e.length;++i)e[i]=t[i].listener||t[i];return e}(r):u(r,r.length)}function p(t){var e=this._events;if(void 0!==e){var i=e[t];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function u(t,e){for(var i=new Array(e),n=0;n<e;++n)i[n]=t[n];return i}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t||t<0||r(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");o=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||r(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return a(this)},s.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e.push(arguments[i]);var r="error"===t,s=this._events;if(void 0!==s)r=r&&void 0===s.error;else if(!r)return!1;if(r){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var h=s[t];if(void 0===h)return!1;if("function"==typeof h)n(h,this,e);else{var d=h.length,c=u(h,d);for(i=0;i<d;++i)n(c[i],this,e)}return!0},s.prototype.on=s.prototype.addListener=function(t,e){return h(this,t,e,!1)},s.prototype.prependListener=function(t,e){return h(this,t,e,!0)},s.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);return this.on(t,c(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);return this.prependListener(t,c(this,t,e)),this},s.prototype.off=s.prototype.removeListener=function(t,e){var i,n,r,s,o;if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);if(void 0===(n=this._events))return this;if(void 0===(i=n[t]))return this;if(i===e||i.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,i.listener||e));else if("function"!=typeof i){for(r=-1,s=i.length-1;s>=0;s--)if(i[s]===e||i[s].listener===e){o=i[s].listener,r=s;break}if(r<0)return this;0===r?i.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(i,r),1===i.length&&(n[t]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",t,o||e)}return this},s.prototype.removeAllListeners=function(t){var e,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[t]),this;if(0===arguments.length){var r,s=Object.keys(i);for(n=0;n<s.length;++n)"removeListener"!==(r=s[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=i[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return l(this,t,!0)},s.prototype.rawListeners=function(t){return l(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},function(t,e,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),s=i(1),o=i(2);s.Litepicker.prototype.show=function(t){void 0===t&&(t=null),this.emit("before:show",t);var e=t||this.options.element;if(this.triggerElement=e,!this.isShowning()){if(this.options.inlineMode)return this.ui.style.position="relative",this.ui.style.display="inline-block",this.ui.style.top=null,this.ui.style.left=null,this.ui.style.bottom=null,void(this.ui.style.right=null);this.scrollToDate(t),this.render(),this.ui.style.position="absolute",this.ui.style.display="block",this.ui.style.zIndex=this.options.zIndex;var i=this.findPosition(e);this.ui.style.top=i.top+"px",this.ui.style.left=i.left+"px",this.ui.style.right=null,this.ui.style.bottom=null,this.emit("show",t)}},s.Litepicker.prototype.hide=function(){this.isShowning()&&(this.datePicked.length=0,this.updateInput(),this.options.inlineMode?this.render():(this.ui.style.display="none",this.emit("hide")))},s.Litepicker.prototype.getDate=function(){return this.getStartDate()},s.Litepicker.prototype.getStartDate=function(){return this.options.startDate?this.options.startDate.clone():null},s.Litepicker.prototype.getEndDate=function(){return this.options.endDate?this.options.endDate.clone():null},s.Litepicker.prototype.setDate=function(t,e){void 0===e&&(e=!1);var i=new r.DateTime(t,this.options.format,this.options.lang);o.dateIsLocked(i,this.options,[i])&&!e?this.emit("error:date",i):(this.setStartDate(t),this.options.inlineMode&&this.render(),this.emit("selected",this.getDate()))},s.Litepicker.prototype.setStartDate=function(t){t&&(this.options.startDate=new r.DateTime(t,this.options.format,this.options.lang),this.updateInput())},s.Litepicker.prototype.setEndDate=function(t){t&&(this.options.endDate=new r.DateTime(t,this.options.format,this.options.lang),this.options.startDate.getTime()>this.options.endDate.getTime()&&(this.options.endDate=this.options.startDate.clone(),this.options.startDate=new r.DateTime(t,this.options.format,this.options.lang)),this.updateInput())},s.Litepicker.prototype.setDateRange=function(t,e,i){void 0===i&&(i=!1),this.triggerElement=void 0;var n=new r.DateTime(t,this.options.format,this.options.lang),s=new r.DateTime(e,this.options.format,this.options.lang);(this.options.disallowLockDaysInRange?o.rangeIsLocked([n,s],this.options):o.dateIsLocked(n,this.options,[n,s])||o.dateIsLocked(s,this.options,[n,s]))&&!i?this.emit("error:range",[n,s]):(this.setStartDate(n),this.setEndDate(s),this.options.inlineMode&&this.render(),this.updateInput(),this.emit("selected",this.getStartDate(),this.getEndDate()))},s.Litepicker.prototype.gotoDate=function(t,e){void 0===e&&(e=0);var i=new r.DateTime(t);i.setDate(1),this.calendars[e]=i.clone(),this.render()},s.Litepicker.prototype.setLockDays=function(t){this.options.lockDays=r.DateTime.convertArray(t,this.options.lockDaysFormat),this.render()},s.Litepicker.prototype.setHighlightedDays=function(t){this.options.highlightedDays=r.DateTime.convertArray(t,this.options.highlightedDaysFormat),this.render()},s.Litepicker.prototype.setOptions=function(t){delete t.element,delete t.elementEnd,delete t.parentEl,t.startDate&&(t.startDate=new r.DateTime(t.startDate,this.options.format,this.options.lang)),t.endDate&&(t.endDate=new r.DateTime(t.endDate,this.options.format,this.options.lang));var e=n(n({},this.options.dropdowns),t.dropdowns),i=n(n({},this.options.buttonText),t.buttonText),s=n(n({},this.options.tooltipText),t.tooltipText);this.options=n(n({},this.options),t),this.options.dropdowns=n({},e),this.options.buttonText=n({},i),this.options.tooltipText=n({},s),!this.options.singleMode||this.options.startDate instanceof r.DateTime||(this.options.startDate=null,this.options.endDate=null),this.options.singleMode||this.options.startDate instanceof r.DateTime&&this.options.endDate instanceof r.DateTime||(this.options.startDate=null,this.options.endDate=null);for(var o=0;o<this.options.numberOfMonths;o+=1){var a=this.options.startDate?this.options.startDate.clone():new r.DateTime;a.setDate(1),a.setMonth(a.getMonth()+o),this.calendars[o]=a}this.options.lockDays.length&&(this.options.lockDays=r.DateTime.convertArray(this.options.lockDays,this.options.lockDaysFormat)),this.options.highlightedDays.length&&(this.options.highlightedDays=r.DateTime.convertArray(this.options.highlightedDays,this.options.highlightedDaysFormat)),this.render(),this.options.inlineMode&&this.show(),this.updateInput()},s.Litepicker.prototype.clearSelection=function(){this.options.startDate=null,this.options.endDate=null,this.datePicked.length=0,this.updateInput(),this.isShowning()&&this.render(),this.emit("clear:selection")},s.Litepicker.prototype.destroy=function(){this.ui&&this.ui.parentNode&&(this.ui.parentNode.removeChild(this.ui),this.ui=null),this.emit("destroy")}}])})),pt=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class ut extends f{constructor(){super(...arguments),this.startMonthYearHeaderRef={month:null,year:null},this.endMonthYearHeaderRef={month:null,year:null},this.alterLitePickerHeader=t=>{this.showYearMonthDropdowns?this.monthYearDropdownRenderer.renderMonthYearDropdowns(this.datePicker):(this.renderMonthName(t),this.setYearMonthHeaderRef(t)),this.renderWeekdays(t),this.renderPrevAndNextMonthButtons(t)},this.alterLitePickerFooter=t=>{this.clearButton&&this.renderClearButton(t)},this.alterLitePickerHeight=t=>{!1===this.dropdownConfig.staticHeight?t.classList.remove("static-height"):t.classList.add("static-height")},this.renderWeekdays=t=>{t.querySelectorAll(".month-item-weekdays-row").forEach((t=>{Array.from(t.children).forEach((t=>{t.innerText=t.innerText.replace(/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)$/,(t=>this.translationSlimmer.t(`${t}-short`)))}))}))},this.renderPrevAndNextMonthButtons=t=>{t.querySelectorAll(".button-previous-month").forEach((t=>{t.innerHTML=J["chevron-left"].icon,t.addEventListener("click",(()=>{this.emitMonthYearChangeEvent()}))})),t.querySelectorAll(".button-next-month").forEach((t=>{t.innerHTML=J["chevron-right"].icon,t.addEventListener("click",(()=>{this.emitMonthYearChangeEvent()}))}))},this.renderClearButton=t=>{const e=document.createElement("div");e.className="footer-container";const i=document.createElement("vega-button-link");i.label=this.translationSlimmer.t("Clear"),i.addEventListener("click",this.vegaDatePickerCalendarController.handleClear),e.append(i);const n=t.querySelector(".container__main");n&&n.append(e)},this.getSystemTimeZone=()=>Intl.DateTimeFormat().resolvedOptions().timeZone}connectedCallback(){null===this.datePicker&&this.initDatePicker(),this.calendarContainerRef=document.createElement("vega-date-picker-calendar"),document.body.append(this.calendarContainerRef)}disconnectedCallback(){var t;null===(t=this.datePicker)||void 0===t||t.destroy(),this.datePicker=null,this.calendarContainerRef.remove()}async componentWillLoad(){this.vegaDatePickerMobileController.getIsMobileDevice()&&await import("./p-a10b9f2e.js")}componentDidLoad(){this.initDatePicker()}componentDidRender(){(this.requireRefreshLitePicker||this.vegaDatePickerSingleInputRenderer.getOldSingleDateInputRef()&&this.vegaDatePickerSingleInputRenderer.getOldSingleDateInputRef()!==this.vegaDatePickerSingleInputRenderer.getSingleDateInputRef()||this.vegaDatePickerRangeInputRenderer.getOldStartDateInputRef()&&this.vegaDatePickerRangeInputRenderer.getOldStartDateInputRef()!==this.vegaDatePickerRangeInputRenderer.getStartDateInputRef()||this.vegaDatePickerRangeInputRenderer.getOldEndDateInputRef()&&this.vegaDatePickerRangeInputRenderer.getOldEndDateInputRef()!==this.vegaDatePickerRangeInputRenderer.getEndDateInputRef())&&this.refreshLitePicker()}doOpen(){this.datePicker.show()}doClose(){this.datePicker.hide()}watchAllowRepick(){this.datePicker.setOptions({allowRepick:this.allowRepick})}watchDisabled(){this.datePicker.hide()}watchFormat(){this.datePicker.setOptions({format:this.format})}watchMode(){this.requireRefreshLitePicker=!0}watchShowYearMonthDropdowns(){this.requireRefreshLitePicker=!0}getStartMonthYearHeaderRef(){return this.startMonthYearHeaderRef}getEndMonthYearHeaderRef(){return this.endMonthYearHeaderRef}getDatePicker(){return this.datePicker}getCalendarContainerRef(){return this.calendarContainerRef}refreshLitePicker(){this.datePicker&&(this.datePicker.destroy(),this.initDatePicker(),this.requireRefreshLitePicker=!1)}renderMonthName(t){t.querySelectorAll(".month-item-name").forEach((t=>{t.innerText=this.translationSlimmer.t(t.innerText)}))}setYearMonthHeaderRef(t){this.startMonthYearHeaderRef.month=t.querySelectorAll(".month-item-name")[0],this.endMonthYearHeaderRef.month=t.querySelectorAll(".month-item-name")[1],this.startMonthYearHeaderRef.year=t.querySelectorAll(".month-item-year")[0],this.endMonthYearHeaderRef.year=t.querySelectorAll(".month-item-year")[1]}emitMonthYearChangeEvent(){const t=this.showYearMonthDropdowns?this.vegaDatePickerMonthYearChangeEventController.getMonthYearSummaryWithMonthYearDropdownEnabled():this.vegaDatePickerMonthYearChangeEventController.getMonthYearSummaryWithMonthYearDropdownDisabled();Y.notify(M.getSubject(this.host,P),t)}resetTodayByTimezone(){if(this.timezone&&this.timezone!==this.getSystemTimeZone())try{const t=new Intl.DateTimeFormat([],{timeZone:this.timezone,year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date),e=new Date(t.split("/").join("-")).getTime(),i=this.calendarContainerRef.shadowRoot.querySelectorAll(".day-item");for(let t=0;t<i.length;t++)i[t].classList.contains("is-today")&&Number(i[t].dataset.time)!==e&&i[t].classList.remove("is-today"),i[t].classList.contains("is-today")||Number(i[t].dataset.time)!==e||i[t].classList.add("is-today")}catch(t){v.warn("Invalid timezone: ",this.timezone)}}initDatePicker(){this.datePicker=new lt.Litepicker(this.vegaDatePickerCalendarController.getDefaultLitePickerConfig()).on("render",(t=>{this.alterLitePickerHeader(t),this.alterLitePickerFooter(t),this.alterLitePickerHeight(t),this.litepickerRef=t,this.getCalendarContainerRef().shadowRoot.append(this.litepickerRef),this.vegaDatePickerMobileController.getIsMobileDevice()&&this.vegaDatePickerMobileController.preventElementTouchMoveInMobile(),this.resetTodayByTimezone()})).on("selected",this.vegaDatePickerCalendarController.onDatePickerSelected).on("before:show",(()=>{this.vegaDatePickerCalendarController.goToDate()})).on("show",(()=>{this.vegaDatePickerElementAppenderController.show()})).on("render:day",((t,e)=>{this.isDateDisabled(e.toJSDate())&&(t.classList.add("is-locked"),t.classList.add("is-disabled"),t.tabIndex=-1)})).on("mobilefriendly.show",(()=>{this.vegaDatePickerZIndexController.setZIndex(),this.getCalendarContainerRef().style.position="fixed",this.getCalendarContainerRef().style.top="50%",this.getCalendarContainerRef().style.left="50%",this.getCalendarContainerRef().style.transform="translate(-50%, -50%)",this.getCalendarContainerRef().classList.remove("vega-force-hidden")})).on("hide",(()=>{this.vegaDatePickerValueController.syncUpValueWithCalendar(),this.vegaDatePickerMobileController.getIsMobileDevice()?(this.getCalendarContainerRef().classList.add("vega-force-hidden"),this.vegaDatePickerZIndexController.removeZIndex()):this.vegaDatePickerElementAppenderController.hide()}))}}pt([u()],ut.prototype,"host",void 0),pt([u()],ut.prototype,"clearButton",void 0),pt([u()],ut.prototype,"dropdownConfig",void 0),pt([u()],ut.prototype,"allowRepick",void 0),pt([u()],ut.prototype,"format",void 0),pt([u()],ut.prototype,"showYearMonthDropdowns",void 0),pt([u()],ut.prototype,"vegaDatePickerCalendarController",void 0),pt([u()],ut.prototype,"vegaDatePickerMobileController",void 0),pt([u()],ut.prototype,"vegaDatePickerElementAppenderController",void 0),pt([u()],ut.prototype,"vegaDatePickerZIndexController",void 0),pt([u()],ut.prototype,"vegaDatePickerValueController",void 0),pt([u()],ut.prototype,"vegaDatePickerSingleInputRenderer",void 0),pt([u()],ut.prototype,"vegaDatePickerRangeInputRenderer",void 0),pt([u()],ut.prototype,"monthYearDropdownRenderer",void 0),pt([u()],ut.prototype,"translationSlimmer",void 0),pt([u()],ut.prototype,"timezone",void 0),pt([u()],ut.prototype,"isDateDisabled",void 0),pt([u()],ut.prototype,"mode",void 0),pt([u()],ut.prototype,"monthYearChangeEventEmitter",void 0),pt([u()],ut.prototype,"vegaDatePickerMonthYearChangeEventController",void 0),pt([m("connectedCallback")],ut.prototype,"connectedCallback",null),pt([m("disconnectedCallback")],ut.prototype,"disconnectedCallback",null),pt([m("componentWillLoad")],ut.prototype,"componentWillLoad",null),pt([m("componentDidLoad")],ut.prototype,"componentDidLoad",null),pt([m("componentDidRender")],ut.prototype,"componentDidRender",null),pt([m("doOpen")],ut.prototype,"doOpen",null),pt([m("doClose")],ut.prototype,"doClose",null),pt([m("watchAllowRepick")],ut.prototype,"watchAllowRepick",null),pt([m("watchDisabled")],ut.prototype,"watchDisabled",null),pt([m("watchFormat")],ut.prototype,"watchFormat",null),pt([m("watchMode")],ut.prototype,"watchMode",null),pt([m("watchShowYearMonthDropdowns")],ut.prototype,"watchShowYearMonthDropdowns",null);var ft=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class mt extends f{setZIndex(){const t=this.host.shadowRoot.querySelector(".litepicker-backdrop");V.setZIndex(t,"base"),V.setZIndex(this.vegaDatePickerCalendarRenderer.getCalendarContainerRef(),"base")}removeZIndex(){const t=this.host.shadowRoot.querySelector(".litepicker-backdrop");V.removeZIndex(t,"base"),V.removeZIndex(this.vegaDatePickerCalendarRenderer.getCalendarContainerRef(),"base")}}ft([u()],mt.prototype,"host",void 0),ft([u()],mt.prototype,"vegaDatePickerCalendarRenderer",void 0);var vt=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class gt extends f{constructor(){super(...arguments),this.syncUpValueWithCalendar=()=>{var t,e;const i=(null===(t=this.vegaDatePickerCalendarRenderer.getDatePicker().getStartDate())||void 0===t?void 0:t.format(this.format))||"",n=(null===(e=this.vegaDatePickerCalendarRenderer.getDatePicker().getEndDate())||void 0===e?void 0:e.format(this.format))||"";"range"!==this.mode||S(this.getValue(),[i,n])||this.setValue([i,n]),"single"===this.mode&&this.getValue()!==i&&this.setValue(i)}}componentWillLoad(){this.value&&this.valueGuard(this.value)||this.setDefaultValueByMode()}watchValue(t,e){"range"===this.mode&&S(t,e)||(this.valueGuard(t)?this.vegaDatePickerCalendarController.shouldUpdateCalendar(t):this.setDefaultValueByMode(),this.changeEventEmitter.emit(this.value),Y.notify(L,{host:this.host,detail:this.value}))}watchMode(){this.setDefaultValueByMode()}getValue(){return this.valueGuard(this.value),this.value}setValue(t){this.valueGuard(t)&&(this.value=t)}setDefaultValueByMode(){"range"===this.mode&&this.setValue(["",""]),"single"===this.mode&&this.setValue("")}valueGuard(t){let e;switch(this.mode){case"single":e=t&&"string"==typeof t&&d(t)||""===t;break;case"range":e=Array.isArray(t)&&2===t.length&&t.every((t=>d(t)||""===t))}return e||v.warn(`Invalid date picker value ${t} for ${this.mode} mode`),e}}vt([u({writable:!0})],gt.prototype,"value",void 0),vt([u()],gt.prototype,"mode",void 0),vt([u()],gt.prototype,"format",void 0),vt([u()],gt.prototype,"changeEventEmitter",void 0),vt([u()],gt.prototype,"host",void 0),vt([u()],gt.prototype,"vegaDatePickerCalendarController",void 0),vt([u()],gt.prototype,"vegaDatePickerCalendarRenderer",void 0),vt([m("componentWillLoad")],gt.prototype,"componentWillLoad",null),vt([m("watchValue")],gt.prototype,"watchValue",null),vt([m("watchMode")],gt.prototype,"watchMode",null);var wt=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class xt extends N{constructor(t){super(),this.formatDate=t=>this.vegaDatePickerCalendarRenderer.getDatePicker().DateTime(t).format(this.format),this.getInputElementRef=()=>{switch(this.inputType){case"single":return this.vegaDatePickerSingleInputRenderer.getSingleDateInputRef();case"rangeStart":return this.vegaDatePickerRangeInputRenderer.getStartDateInputRef();case"rangeEnd":return this.vegaDatePickerRangeInputRenderer.getEndDateInputRef()}},this.getInputModeStrategy=()=>this.datePickerFormatStrategy,this.getBlurModeStrategy=()=>null,this.getDateFormatMask=t=>{const e=t.match(/M/gi);return new A({mask:t.replace(/[MDY]/gi,"9"),slot:"9",accept:(e&&e.length)>2?/\w/g:/\d/g})},this.inputType=t}componentDidLoad(){this.setupStringFormatter(this.format)}watchFormat(t){this.setupStringFormatter(t)}setupStringFormatter(t){this.datePickerFormatStrategy=this.getDateFormatMask(t),this.setup()}}wt([u()],xt.prototype,"format",void 0),wt([u()],xt.prototype,"mode",void 0),wt([u()],xt.prototype,"vegaDatePickerCalendarRenderer",void 0),wt([u()],xt.prototype,"vegaDatePickerSingleInputRenderer",void 0),wt([u()],xt.prototype,"vegaDatePickerRangeInputRenderer",void 0),wt([m("componentDidLoad")],xt.prototype,"componentDidLoad",null),wt([m("watchFormat")],xt.prototype,"watchFormat",null);var bt=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class yt extends H{constructor(){super((()=>({target:this.vegaDatePickerRenderer.getDatePickerContainer(),appendableElement:this.vegaDatePickerCalendarRenderer.getCalendarContainerRef(),positionRelativeTo:this.dropdownConfig.positionRelativeTo,translocation:{X:0,Y:8},placement:["bottom","top"],alignment:["start","end"],isScreenPosition:F.isEnabled("VEGA_DATE_PICKER.ENABLE_CALCULATION_POSITION_BY_SCREEN")})),(()=>"none"))}}bt([u()],yt.prototype,"dropdownConfig",void 0),bt([u()],yt.prototype,"vegaDatePickerRenderer",void 0),bt([u()],yt.prototype,"vegaDatePickerCalendarRenderer",void 0);var kt=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class Dt extends B{constructor(){super((t=>[{keyCode:"Enter",activeElementInScope:()=>[t.vegaDatePickerSingleInputRenderer.getSingleDateInputRef(),t.vegaDatePickerRangeInputRenderer.getStartDateInputRef(),t.vegaDatePickerRangeInputRenderer.getEndDateInputRef(),t.vegaDatePickerCalendarRenderer.getCalendarContainerRef()],eventName:"keydown",callback:t=>{var e;const i=(null===(e=t.target.shadowRoot)||void 0===e?void 0:e.activeElement)||t.target;return null==i?void 0:i.click()}}]))}}kt([u()],Dt.prototype,"vegaDatePickerCalendarRenderer",void 0),kt([u()],Dt.prototype,"vegaDatePickerSingleInputRenderer",void 0),kt([u()],Dt.prototype,"vegaDatePickerRangeInputRenderer",void 0);const _t=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented when a date or range is selected",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented when a date or range is selected",payloadValue:t=>!1===t.autoValidation},{payloadKey:"MODE_IS_SINGLE",payloadDescription:"Specifies the selection mode of the date picker. Use `single` to allow selecting a single date",payloadValue:t=>"single"===t.mode},{payloadKey:"MODE_IS_RANGE",payloadDescription:"Specifies the selection mode of the date picker. Use `range` to allow selecting a date range",payloadValue:t=>"range"===t.mode}];var jt=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class Mt extends f{constructor(){super(...arguments),this.startDropdownRef={month:null,year:null},this.endDropdownRef={month:null,year:null},this.onVegaDropdownContentBoxClick=t=>{"VEGA-DROPDOWN-CONTENT-BOX"===t.target.tagName&&(this.datePickerCalendar.classList.remove("vega-force-hidden"),this.datePickerCalendar.shadowRoot.querySelector(".litepicker").style.display="block")},this.onVegaDropdownContentBoxActivate=t=>{const e=t.target;"VEGA-DROPDOWN-CONTENT-BOX"===e.tagName?(this.isMonthsOrYearsDropdownContentBoxOnFocus=!0,e.classList.remove("vega-force-hidden")):this.isMonthsOrYearsDropdownContentBoxOnFocus=!1}}getStartDropdownRef(){return this.startDropdownRef}getEndDropdownRef(){return this.endDropdownRef}renderMonthYearDropdowns(t){this.datePicker=t,this.datePickerCalendar=this.vegaDatePickerCalendarRenderer.getCalendarContainerRef(),this.renderMonthButton(this.datePicker.ui),this.renderYearButton(this.datePicker.ui),this.initSetup()}render(){return t("div",{class:"month-year-dropdown-container",style:{display:"none"}},t("div",{class:"start-date-month-year"},this.renderDropdown("month","start"),this.renderDropdown("year","start")),t("div",{class:"end-date-month-year"},this.renderDropdown("month","end"),this.renderDropdown("year","end")))}renderMonthButton(t){t.querySelectorAll("select.month-item-name").forEach(((t,e)=>{this.syncDropdownOptions("month",t,e);const i=this.getSelectedOptionFromSelect(t),n=Mt.monthName[parseInt(i)],r=document.createElement("span");r.classList.add("dropdown-current-value"),r.innerText=`${this.translationSlimmer.t(n)}`,this.appendDropdownIconToButton(r),t.parentNode&&t.parentNode.replaceChild(r,t);const s=0===e?this.startDropdownRef.month:this.endDropdownRef.month;s&&this.updateDropdownValueAndTarget(r,s,t.value),r.addEventListener("click",(()=>{this.setDropdownAsActive(r)}))}))}renderYearButton(t){t.querySelectorAll("select.month-item-year").forEach(((t,e)=>{this.syncDropdownOptions("year",t,e);const i=this.getSelectedOptionFromSelect(t),n=document.createElement("span");n.classList.add("dropdown-current-value"),n.innerText=`${this.translationSlimmer.t(i)}`,this.appendDropdownIconToButton(n),t.parentNode&&t.parentNode.replaceChild(n,t);const r=0===e?this.startDropdownRef.year:this.endDropdownRef.year;r&&this.updateDropdownValueAndTarget(n,r,t.value),n.addEventListener("click",(()=>{this.setDropdownAsActive(n)}))}))}getSelectedOptionFromSelect(t){return Array.from(t.querySelectorAll("option")).find((t=>t.selected)).value}renderDropdown(e,i){return t("vega-dropdown",{trigger:"click",selectType:"single",class:"vega-force-hidden","match-target-width":"false","max-height":"300",ref:t=>{this.onDropdownShowOrHide(t),"start"===i?this.startDropdownRef[e]=t:this.endDropdownRef[e]=t,_.addUniqueObserverToNode(t,R,(n=>{this.setDefaultViewValues(e,t),this.monthYearDropdownClick(e,i,n.detail)}))}},t("span",null,e))}syncDropdownOptions(t,e,i){const n=e.querySelectorAll("option"),r=Array.from(n).map((t=>({key:t.value,label:this.translationSlimmer.t(t.text),disabled:!!t.disabled})));if("month"===t){const t=0===i?this.startDropdownRef.month:this.endDropdownRef.month;t&&(t.source=r)}if("year"===t){r.sort(((t,e)=>Number(t.key)-Number(e.key)));const t=0===i?this.startDropdownRef.year:this.endDropdownRef.year;t&&(t.source=r)}}onDropdownShowOrHide(t){null==t||t.addEventListener("vegaShow",(()=>{this.onDropdownShow()})),null==t||t.addEventListener("vegaHide",(()=>{this.onDropdownHide()}))}setDefaultViewValues(t,e){"month"===t?this.currentStartYearInView=parseInt(e.nextElementSibling.selectedSourceKey):this.currentStartMonthInView=parseInt(e.previousElementSibling.selectedSourceKey)}appendDropdownIconToButton(t){t.innerHTML+=`<vega-icon icon='${O.getIconKey("caret-down")}'></vega-icon>`,t.tabIndex=0}monthYearDropdownClick(t,e,i){const n=parseInt(i);this.updateDatePickerOnSelect(t,e,n),Y.notify(M.getSubject(this.host,P),this.vegaDatePickerMonthYearChangeEventController.getMonthYearSummaryWithMonthYearDropdownEnabled())}updateDropdownValueAndTarget(t,e,i){const n=t.closest("div");n&&n.classList.add("dropdown-section"),e.selectedSourceKey=i,G.call(M.getSubject(e,T),t)}updateDatePickerOnSelect(t,e,i){"month"===t?null!==this.currentStartYearInView&&("start"===e&&this.datePicker.gotoDate(new Date(this.currentStartYearInView,i,1)),"end"===e&&this.datePicker.gotoDate(new Date(this.currentStartYearInView,i-1,1))):null!==this.currentStartMonthInView&&("start"===e&&this.datePicker.gotoDate(new Date(i,this.currentStartMonthInView,1)),"end"===e&&this.datePicker.gotoDate(new Date(i,this.currentStartMonthInView-1,1)))}setDropdownAsActive(t){Array.from(this.datePicker.ui.querySelectorAll(".dropdown-current-value.active")).forEach((t=>t.classList.remove("active"))),t.classList.add("active")}removeActiveDropdownClass(){Array.from(this.datePicker.ui.querySelectorAll(".dropdown-current-value.active")).forEach((t=>t.classList.remove("active")))}onDropdownShow(){document.addEventListener("mouseenter",this.onVegaDropdownContentBoxActivate,!0),document.addEventListener("click",this.onVegaDropdownContentBoxClick)}onDropdownHide(){this.isMonthsOrYearsDropdownContentBoxOnFocus=!1,this.removeActiveDropdownClass(),document.removeEventListener("mouseenter",this.onVegaDropdownContentBoxActivate,!0),document.removeEventListener("click",this.onVegaDropdownContentBoxClick)}initSetup(){const t=this.datePicker.hide.bind(this.datePicker);this.datePicker.hide=async()=>{const e=document.activeElement;this.isMonthsOrYearsDropdownContentBoxOnFocus||"VEGA-DROPDOWN-CONTENT-BOX"===(null==e?void 0:e.tagName)||(await this.closeOpenDropdowns(),t())}}async closeOpenDropdowns(){const t=[this.startDropdownRef,this.endDropdownRef];await Promise.all(t.flatMap((t=>[t.month,t.year])).filter(Boolean).map((t=>{t&&t.hide()})))}}O.register({"caret-down":J["caret-down"]}),Mt.monthName=["January","February","March","April","May","June","July","August","September","October","November","December"],jt([u()],Mt.prototype,"host",void 0),jt([u()],Mt.prototype,"translationSlimmer",void 0),jt([u()],Mt.prototype,"vegaDatePickerCalendarRenderer",void 0),jt([u()],Mt.prototype,"monthYearChangeEventEmitter",void 0),jt([u()],Mt.prototype,"mode",void 0),jt([u()],Mt.prototype,"vegaDatePickerMonthYearChangeEventController",void 0);var Rt=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};class It extends f{registerObserver(){this.observer=new K(this.canAcceptMonthYearChangeObserver.bind(this),this.monthYearChangeObserverListener.bind(this)),Y.register(M.getSubject(this.host,P),this.observer)}unregisterObserver(){this.observer&&Y.unregister(M.getSubject(this.host,P),this.observer)}getMonthYearSummaryWithMonthYearDropdownDisabled(){return"single"===this.mode?{month:this.vegaDatePickerCalendarRenderer.getStartMonthYearHeaderRef().month.innerText,year:this.vegaDatePickerCalendarRenderer.getStartMonthYearHeaderRef().year.innerText}:[{month:this.vegaDatePickerCalendarRenderer.getStartMonthYearHeaderRef().month.innerText,year:this.vegaDatePickerCalendarRenderer.getStartMonthYearHeaderRef().year.innerText},{month:this.vegaDatePickerCalendarRenderer.getEndMonthYearHeaderRef().month.innerText,year:this.vegaDatePickerCalendarRenderer.getEndMonthYearHeaderRef().year.innerText}]}getMonthYearSummaryWithMonthYearDropdownEnabled(){return"single"===this.mode?{month:Mt.monthName[parseInt(this.monthYearDropdownRenderer.getStartDropdownRef().month.selectedSourceKey)],year:this.monthYearDropdownRenderer.getStartDropdownRef().year.selectedSourceKey}:[{month:Mt.monthName[parseInt(this.monthYearDropdownRenderer.getStartDropdownRef().month.selectedSourceKey)],year:this.monthYearDropdownRenderer.getStartDropdownRef().year.selectedSourceKey},{month:Mt.monthName[parseInt(this.monthYearDropdownRenderer.getEndDropdownRef().month.selectedSourceKey)],year:this.monthYearDropdownRenderer.getEndDropdownRef().year.selectedSourceKey}]}canAcceptMonthYearChangeObserver(){return!0}monthYearChangeObserverListener(t){this.monthYearChangeEventEmitter.emit(t)}}Rt([u()],It.prototype,"host",void 0),Rt([u()],It.prototype,"monthYearChangeEventEmitter",void 0),Rt([u()],It.prototype,"mode",void 0),Rt([u()],It.prototype,"vegaDatePickerCalendarRenderer",void 0),Rt([u()],It.prototype,"monthYearDropdownRenderer",void 0),Rt([m("componentWillLoad")],It.prototype,"registerObserver",null),Rt([m("disconnectedCallback")],It.prototype,"unregisterObserver",null);var Ct=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const Ot=class{constructor(t){n(this,t),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaMonthYearChange=r(this,"vegaMonthYearChange",7),this.monthYearChange=r(this,"monthYearChange",7),this.globalSlimmers={},this.translationSlimmer=new U,this.vegaDatePickerMobileController=new it,this.vegaDatePickerCalendarController=new ct,this.vegaDatePickerZIndexController=new mt,this.vegaDatePickerValueController=new gt,this.vegaDatePickerFormatController=new xt("single"),this.startInputFormatController=new xt("rangeStart"),this.endInputFormatController=new xt("rangeEnd"),this.vegaDatePickerElementAppenderController=new yt,this.vegaDatePickerKeyboardController=new Dt,this.vegaDatePickerRenderer=new tt,this.vegaDatePickerSingleInputRenderer=new ot,this.vegaDatePickerRangeInputRenderer=new ht,this.vegaDatePickerCalendarRenderer=new ut,this.formFieldController=new b({propertyRules:[{propertyName:"required",ruleFactory:(t,e)=>t?new a({mode:e}):null,dependence:"mode"},{propertyName:"mode",ruleFactory:t=>"range"===t?new q:null},{propertyName:"minDate",ruleFactory:(t,e)=>new X({minDate:t,maxDate:e}),dependence:"maxDate"},{propertyName:"maxDate",ruleFactory:(t,e)=>new X({minDate:e,maxDate:t}),dependence:"minDate"}],validationRulesName:"validationRules",defaultValue:t=>"range"===t.mode?["",""]:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.vegaDatePickerRenderer.getDatePickerContainer(),touchableAreaGetter:()=>[this.vegaDatePickerSingleInputRenderer.getSingleDateInputRef(),this.vegaDatePickerRangeInputRenderer.getStartDateInputRef(),this.vegaDatePickerRangeInputRenderer.getEndDateInputRef()].filter(Boolean)}),this.monthYearChangeEventEmitter=Z(Ot,I),this.changeEventEmitter=Z(Ot,C),this.inputEventPrevent=new $([C],(()=>this.vegaDatePickerRenderer.getDatePickerContainer())),this.vegaComponentUsageRuntimeMetricsSlimmer=new w(_t),this.monthYearDropdownRenderer=new Mt,this.vegaDatePickerMonthYearChangeEventController=new It,this.mode="single",this.value="range"===this.mode?["",""]:"",this.required=!1,this.isValid=null,this.autoValidation=!0,this.format="MM/DD/YYYY",this.size="default",this.validationRules=[],this.clearButton=!1,this.readOnly=!1,this.allowRepick=!1,this.dropdownConfig={},this.showClearIcon=!0,this.showYearMonthDropdowns=!1,this.disabled=!1,this.isDateDisabled=()=>!1}watchMode(){}watchValue(t,e){}watchFormat(t){}watchValidationRules(){}watchMinDate(t){}watchMaxDate(t){}watchAllowRepick(){}watchShowYearMonthDropdowns(){}watchDisabled(){}async doClose(){}async doOpen(){}render(){return o(this.vegaDatePickerRenderer.render(),this.host)}get host(){return s(this)}static get watchers(){return{mode:["watchMode"],value:["watchValue"],format:["watchFormat"],validationRules:["watchValidationRules"],minDate:["watchMinDate"],maxDate:["watchMaxDate"],allowRepick:["watchAllowRepick"],showYearMonthDropdowns:["watchShowYearMonthDropdowns"],disabled:["watchDisabled"]}}};Ct([x()],Ot.prototype,"globalSlimmers",void 0),Ct([g()],Ot.prototype,"translationSlimmer",void 0),Ct([g()],Ot.prototype,"vegaDatePickerMobileController",void 0),Ct([g()],Ot.prototype,"vegaDatePickerCalendarController",void 0),Ct([g()],Ot.prototype,"vegaDatePickerZIndexController",void 0),Ct([g()],Ot.prototype,"vegaDatePickerValueController",void 0),Ct([g()],Ot.prototype,"vegaDatePickerFormatController",void 0),Ct([g()],Ot.prototype,"startInputFormatController",void 0),Ct([g()],Ot.prototype,"endInputFormatController",void 0),Ct([g()],Ot.prototype,"vegaDatePickerElementAppenderController",void 0),Ct([g()],Ot.prototype,"vegaDatePickerKeyboardController",void 0),Ct([g()],Ot.prototype,"vegaDatePickerRenderer",void 0),Ct([g()],Ot.prototype,"vegaDatePickerSingleInputRenderer",void 0),Ct([g()],Ot.prototype,"vegaDatePickerRangeInputRenderer",void 0),Ct([g()],Ot.prototype,"vegaDatePickerCalendarRenderer",void 0),Ct([g()],Ot.prototype,"formFieldController",void 0),Ct([g()],Ot.prototype,"monthYearChangeEventEmitter",void 0),Ct([g()],Ot.prototype,"changeEventEmitter",void 0),Ct([g()],Ot.prototype,"inputEventPrevent",void 0),Ct([g()],Ot.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ct([g()],Ot.prototype,"monthYearDropdownRenderer",void 0),Ct([g()],Ot.prototype,"vegaDatePickerMonthYearChangeEventController",void 0),Ct([W()],Ot.prototype,"watchValue",null),Ot.style=':host{display:inline-block;width:100%;text-align:left;line-height:normal}:host vega-field-label{margin-bottom:8px}:host .vega-input-container{position:relative;display:block;border-radius:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));display:flex;align-items:center}:host .vega-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-input-container .date-picker-input{padding-left:16px;padding-right:16px;width:100%;box-sizing:border-box;display:flex;align-items:center}:host .vega-input-container.default .date-picker-input{padding-left:16px;padding-right:16px}:host .vega-input-container.small .date-picker-input{padding-left:12px;padding-right:12px}:host .vega-input-container.default .date-picker-input input{padding-top:12px;padding-bottom:12px}:host .vega-input-container.small .date-picker-input input{padding-top:8px;padding-bottom:8px}:host .vega-input-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-input-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-input-container.single-mode.error:focus-within,:host .vega-input-container.range-mode.error .date-picker-input:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1));border-radius:8px}:host .vega-input-container.range-mode.error .date-picker-input:first-of-type:focus-within{margin:-1px 0 -1px -1px}:host .vega-input-container.range-mode.error .date-picker-input:last-of-type:focus-within{margin:-1px -1px -1px 0}:host .vega-input-container.single-mode:not(.error):focus-within,:host .vega-input-container.range-mode:not(.error) .date-picker-input:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1));border-radius:8px}:host .vega-input-container.range-mode .date-picker-input:first-of-type:focus-within{margin:-1px 0 -1px -1px}:host .vega-input-container.range-mode .date-picker-input:last-of-type:focus-within{margin:-1px -1px -1px 0}:host .vega-input-container input{width:100%;box-sizing:content-box;border-width:0px;margin:0px;outline:2px solid transparent;outline-offset:2px;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-input-container input::placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-container input::placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-container input::placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-container input::placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1));display:block;padding-left:8px;padding-right:8px;padding-top:12px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}.vega-input-clear-icon{width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-input-clear-icon vega-icon{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}:host .range-input-divider{width:1px;height:24px;border-style:solid;border-right-width:1px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1))}:host .vega-input-container.range-mode.mobile .range-input-divider{width:100%;height:1px;border-style:solid;border-right-width:0px;border-top-width:1px;border-bottom-width:0px;border-left-width:0px;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1))}:host .vega-input-prefix{display:flex;margin-right:8px}:host .vega-input-container.range-mode.mobile.small .vega-input-prefix{margin-right:8px}:host .vega-input-container.range-mode.mobile{flex-direction:column}:host .vega-input-container.range-mode.mobile .date-picker-input:last-of-type{padding-left:40px}:host .vega-input-container.range-mode.mobile.small .date-picker-input:last-of-type{padding-left:36px}:host(.disabled) .vega-input-container{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.disabled) .vega-input-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.disabled) .vega-input-container input{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.litepicker-backdrop{display:none;background-color:var(--litepicker-mobilefriendly-backdrop-color-bg);opacity:0.3;position:fixed;top:0;right:0;bottom:0;left:0}';var Et=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const St=class{constructor(t){n(this,t),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new w}render(){return t(e,null)}get host(){return s(this)}};Et([x()],St.prototype,"globalSlimmers",void 0),Et([g()],St.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),St.style=':host{--vega-litepicker-container-width:calc(var(--vega-litepicker-day-width) * 7);--vega-litepicker-day-width:40px;--vega-litepicker-day-height:40px}.litepicker{display:none}.litepicker button{border-width:0px;background:none}.litepicker .container__main{display:flex;flex-direction:column;padding:32px;border-radius:12px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));box-shadow:var(--v-shadow-dropdown-menu, 0px 2px 4px -2px rgba(0, 0, 0, 0.1), 0px 4px 6px -1px rgba(0, 0, 0, 0.1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))}@media screen and (min-width: 320px) and (max-width: 350px){.litepicker .container__main{padding:12px}}.litepicker .container__months{display:flex}.litepicker .container__months.columns-2{width:100%}@media (min-width: 320px){.litepicker .container__months.columns-2{flex-direction:column}}@media (min-width: 768px){.litepicker .container__months.columns-2{flex-direction:row}}.litepicker .container__months .month-item{box-sizing:content-box;position:relative;width:var(--vega-litepicker-container-width);z-index:1}@media (min-width: 768px){.litepicker .container__months.columns-2 .month-item:first-of-type{padding-right:32px}}@media (min-width: 768px){.litepicker .container__months.columns-2 .month-item:last-of-type{padding-left:32px}}.litepicker .container__months .month-item:nth-child(2)::before{background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1));margin-top:32px;margin-bottom:32px;position:absolute;top:0px;right:0px;bottom:0px;left:0px;display:none;width:1px;content:""}@media (min-width: 768px){.litepicker .container__months .month-item:nth-child(2)::before{display:block}}.litepicker .container__months .month-item-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px;text-align:center;font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.litepicker .container__months .month-item-header{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.litepicker .container__months .month-item-header{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.litepicker .container__months .month-item-header{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px}}.litepicker .container__months .month-item-header div>.month-item-name{margin-right:5px}.litepicker .container__months .month-item-header .button-previous-month,.litepicker .container__months .month-item-header .button-next-month{visibility:hidden;text-decoration:none;cursor:default}.litepicker .container__months .month-item-header .button-previous-month *,.litepicker .container__months .month-item-header .button-next-month *{pointer-events:none}.litepicker .container__months .month-item-header .button-previous-month>svg,.litepicker .container__months .month-item-header .button-previous-month>img{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.litepicker .container__months .month-item-header .button-next-month>svg,.litepicker .container__months .month-item-header .button-next-month>img{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.litepicker .container__months .month-item-weekdays-row{display:flex;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.litepicker .container__months .month-item-weekdays-row{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.litepicker .container__months .month-item-weekdays-row{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.litepicker .container__months .month-item-weekdays-row{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.litepicker .container__months .month-item-weekdays-row>div{padding-top:12px;padding-bottom:12px;padding-left:8px;padding-right:8px;display:flex;align-items:center;justify-content:center;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;width:var(--vega-litepicker-day-width)}@media screen and (min-width: 768px) and (max-width: 1023px){.litepicker .container__months .month-item-weekdays-row>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.litepicker .container__months .month-item-weekdays-row>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.litepicker .container__months .month-item-weekdays-row>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.litepicker .container__months .month-item:first-child .button-previous-month{visibility:visible}.litepicker .container__months .month-item:last-child .button-next-month{visibility:visible}.litepicker .container__months .month-item.no-previous-month .button-previous-month{visibility:hidden}.litepicker .container__months .month-item.no-next-month .button-next-month{visibility:hidden}.litepicker .container__days{display:flex;flex-wrap:wrap;justify-content:flex-start;text-align:center}.litepicker.static-height .container__days{align-content:flex-start;height:calc(var(--vega-litepicker-day-height) * 6)}.litepicker .container__days>div,.litepicker .container__days>a{padding:4px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--vega-litepicker-day-height);width:var(--vega-litepicker-day-width)}.litepicker .container__days .day-item{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;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;text-align:center;border-radius:9999px;cursor:default}@media screen and (min-width: 768px) and (max-width: 1023px){.litepicker .container__days .day-item{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){.litepicker .container__days .day-item{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){.litepicker .container__days .day-item{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 768px) and (max-width: 1023px){.litepicker .container__days .day-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.litepicker .container__days .day-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.litepicker .container__days .day-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.litepicker .container__days .day-item:not(.is-locked):active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1));color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));border-width:0px}.litepicker .day-item.is-start-date.is-end-date.is-locked:active{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}.litepicker .container__days .day-item:hover:before{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1));border-radius:9999px;position:absolute;top:0px;right:0px;bottom:0px;left:0px;content:" ";z-index:-1}.litepicker .container__days .day-item.is-locked:hover:before,html.dark .litepicker .container__days .day-item.is-locked:hover:before{border-style:none}.litepicker .container__days .day-item:hover{position:relative}.litepicker .container__days .day-item.is-today{color:rgba(var(--v-text-link, 19, 98, 226, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.litepicker .container__days .day-item.is-today{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.litepicker .container__days .day-item.is-today{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.litepicker .container__days .day-item.is-today{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.litepicker .container__days .day-item.is-in-range{border-radius:0px;position:relative;z-index:2;background-color:rgba(var(--v-bg-date-picker-range, 229, 239, 255, 1))}.litepicker .container__days .day-item:not(.is-locked).is-in-range:hover:before{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1));border-radius:9999px;position:absolute;top:0px;right:0px;bottom:0px;left:0px;content:" ";z-index:-1}.litepicker .container__days .day-item.is-start-date{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-radius:9999px;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));position:relative}@media screen and (min-width: 768px) and (max-width: 1023px){.litepicker .container__days .day-item.is-start-date{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.litepicker .container__days .day-item.is-start-date{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.litepicker .container__days .day-item.is-start-date{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.litepicker .container__days .day-item.is-start-date:hover:before{z-index:2}.litepicker .container__days .day-item.is-start-date:after{position:absolute;top:0px;right:0px;bottom:0px;left:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-top-left-radius:9999px;border-bottom-left-radius:9999px;content:" ";z-index:-1;background-color:rgba(var(--v-bg-date-picker-range, 229, 239, 255, 1))}.litepicker .container__days .day-item.is-start-date.is-flipped{border-radius:9999px;position:relative}.litepicker .container__days .day-item.is-start-date.is-flipped:after{position:absolute;top:0px;right:0px;bottom:0px;left:0px;border-top-left-radius:0px;border-bottom-left-radius:0px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;content:" ";z-index:-1}.litepicker .container__days .day-item.is-end-date{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-radius:9999px;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));position:relative}@media screen and (min-width: 768px) and (max-width: 1023px){.litepicker .container__days .day-item.is-end-date{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.litepicker .container__days .day-item.is-end-date{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.litepicker .container__days .day-item.is-end-date{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.litepicker .container__days .day-item.is-end-date:hover:before{z-index:2}.litepicker .container__days .day-item.is-end-date:after{position:absolute;top:0px;right:0px;bottom:0px;left:0px;border-top-left-radius:0px;border-bottom-left-radius:0px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;content:" ";z-index:-1;background-color:rgba(var(--v-bg-date-picker-range, 229, 239, 255, 1))}.litepicker .container__days .day-item.is-end-date.is-flipped{border-radius:9999px;position:relative}.litepicker .container__days .day-item.is-end-date.is-flipped:after{position:absolute;top:0px;right:0px;bottom:0px;left:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-top-left-radius:9999px;border-bottom-left-radius:9999px;content:" ";z-index:-1}.litepicker .container__days .day-item.is-start-date.is-end-date{border-radius:9999px}.litepicker .container__days .day-item.is-start-date.is-end-date:after,html.dark .litepicker .container__days .day-item.is-start-date.is-end-date:after{background:none}.litepicker .container__tooltip{display:none}.litepicker .container__days .day-item.is-locked{color:rgba(var(--v-text-disabled, 176, 180, 181, 1));cursor:not-allowed}.litepicker .container__days .day-item.is-disabled{text-decoration:line-through}.litepicker.mobilefriendly[data-plugins*=mobilefriendly] .container__days>div{height:var(--vega-litepicker-day-height)}.litepicker .clear-button{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.litepicker .clear-button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.litepicker .clear-button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.litepicker .clear-button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}.litepicker .footer-container{margin-top:16px;height:24px}:host(.vega-force-hidden){display:none !important}.litepicker{left:initial !important;top:initial !important;position:initial !important}:host{position:absolute}.button-next-month svg,.button-previous-month svg{width:12px;height:16px}.litepicker .month-item-header>div.dropdown-section{display:flex;gap:12px}.litepicker .month-item-header>div.dropdown-section .dropdown-current-value{position:relative;display:flex;gap:4px;align-items:center;cursor:pointer}.litepicker .month-item-header>div.dropdown-section .dropdown-current-value.active{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}.litepicker .month-item-header>div.dropdown-section .dropdown-current-value.active:active{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}.litepicker .month-item-header>div.dropdown-section .dropdown-current-value.active:hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}.litepicker .month-item-header>div.dropdown-section .dropdown-current-value.active:focus-visible{color:rgba(var(--v-text-link-focus, 4, 112, 236, 1))}';export{Ot as vega_date_picker,St as vega_date_picker_calendar}
@@ -1 +1 @@
1
- import{A as t,R as e,a as n,b as s,c as r,M as i,B as o,d as a,e as c,f as l,g as u,I as d,h,S as w,i as p,j as m,k as g,l as f,C as x,m as b,n as T,o as O,s as E,N as A,p as y,q as k,r as N,t as C,u as j,v as B,w as H,x as I,H as S,y as v,z as R,D as L,U as D,E as M,F as P,G as F}from"./p-7f087c8b.js";import{g as z}from"./p-a4670e23.js";import{i as U}from"./p-5e2c9e69.js";import{C as $}from"./p-2d0d575f.js";import{d as G}from"./p-b5822a21.js";import{a as V}from"./p-b5bef48a.js";import{d as J}from"./p-02841589.js";import{r as W,i as K}from"./p-575235c8.js";import{c as X}from"./p-bf19682d.js";class Y extends e{constructor(t,e,n){super(t,"list-item",n),this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new Y(t.id,void 0,e);s.children=t.nodes.map((t=>n.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const e=_.from(t);return e.parent=s,e})));const{annotations:r}=t;return r&&Object.entries(r).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);U(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(){return[`<li${super.generateAttributeString()}>`,this.children.map((t=>t.toHtml())).join(""),"</li>"].join("")}cloneWithNodes(t){const e=new Y(z());return e.children=[],e.apply(new s(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new Y(z())}clone(){var t;const e=new Y(this.id);return e.children=this.children.map((t=>{const n=t.clone();return n.parent=e,n})),e.annotationMap=super.cloneAnnotations(),e.nestList=null===(t=this.nestList)||void 0===t?void 0:t.map((t=>{const n=t.clone();return n.parent=e,n})),e.parent=this.parent,e}}r.register(i.LINE_BREAK_SINGLE_BLOCK,Y.name,new o),r.register(i.LINE_BREAK_MULTIPLE_BLOCKS,Y.name,new a),r.register(i.DELETE_NEST_LIST,Y.name,new class extends t{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),r.register(i.SPLIT_BLOCK_WITH_NODE,Y.name,new c),r.register(i.REPLACE_CHILD_NODES,Y.name,new l),r.register(i.REPLACE_NEST_LIST,Y.name,new class extends t{handleAction(t,e){t.newList.forEach((t=>{t.parent=e})),e.nestList=t.newList}}),r.register(i.MERGE_TWO_BLOCKS_NODES,Y.name,new u),r.register(i.INSERT_IMAGE_TO_BLOCK,Y.name,new class extends t{handleAction(t,e){e.parent.apply(t)}});class Z extends m{constructor(){super(...arguments),this.type=g.LIST}renderStyle(t){return(null==t?void 0:t.standalone)?{paddingLeft:"8px",marginLeft:"16px"}:null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new Z}toJSON(){}}class _ extends f{constructor(t,e,n){super(t),this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&this.annotationMap.set(g.LIST,new Z)}static from(t,e={autoMatchFormat:!0}){const n=new _(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);U(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=Y.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return T.from(e);case"customClass":return b.from(e);case"customStyle":return x.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(){const t=this.getBlockTag();return[`<${t}${super.generateAttributeString()}>`,this.children.map((t=>t.toHtml())).join(""),`</${t}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(){const t=new _(this.id,this.type);return t.children=this.children.map((e=>{const n=e.clone();return n.parent=t,n})),t.annotationMap=super.cloneAnnotations(),t.parent=this.parent,t}getBlockTag(){return"number-list"===this.type?"ol":"ul"}}r.register(i.TRANSFORM_LIST_BLOCK,_.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,r=e.parent.createList(t.listType);if(n.every((t=>t.parent===e)))r.apply(new s(e.children)),e.parent.apply(new d(e,r)),e.parent.apply(new h(e)),n.forEach((t=>t.children.map((t=>t.apply(new w)))));else{const n=t.selectedBlocks.map((t=>e.parent.toListItem(t)));r.apply(new s(n)),e.parent.apply(new d(e,r)),t.selectedBlocks.forEach((t=>{t.parent.apply(new h(t))})),0===e.children.length&&e.parent.apply(new h(e))}}}),r.register(i.TRANSFORM_PARAGRAPH_BLOCK,_.name,new class extends t{handleAction(t,e){let n=!1,r=!1;const i=t.selectedBlocks,o=i.map((t=>(t.children.map((t=>t.apply(new w))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new p(e,...o));else if(r)e.parent.apply(new d(e,...o));else{const t=e.children.indexOf(i[0]),n=e.children.indexOf(i[i.length-1]),r=e.parent.createList(e.type);r.apply(new s(e.children.slice(0,t)));const a=e.parent.createList(e.type);a.apply(new s(e.children.slice(n+1))),e.parent.apply(new p(e,r,...o,a)),e.parent.apply(new h(e))}i.map((t=>{e.apply(new h(t))})),0===e.children.length&&e.parent.apply(new h(e))}toParagraph(t){const n=new e(z(),"paragraph");return n.apply(new s(t.children)),n.annotationMap=t.annotationMap,n}}),r.register(i.INSERT_IMAGE_TO_BLOCK,_.name,new class extends t{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new d(e,t.imageBlockToBeInserted):t)}});class Q{}class q{constructor(t,e){this.childrenOutput=[],this.currentStrategy=t,this.currentElements=e}setChildrenOutput(t){this.childrenOutput=t}toDto(t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const e=this.currentStrategy.handle(this.currentElements,t);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto(t))).filter(U)),e}}const tt=new class{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(t){this.hasDuplicateStrategy(t,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(t)}registerElementToNodeStrategy(t){this.hasDuplicateStrategy(t,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(t)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(t,e){return e.includes(t)}},et=new class{process(t,e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),s=[];for(let r=0;r<t.length;r++){if(this.isInvalidElement(t[r]))continue;let i=0;for(const o of n)if(i=o.canHandle(t,r,e),i>0){const n=t.slice(r,r+i),a=new q(o,n);1===i&&o.shouldProceedToElementChildren()&&a.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(a),r+=i-1;break}if(0===i&&r<t.length){const n=Array.from(t[r].childNodes),i=this.process(Array.from(n),e);i.length>0&&s.push(...i)}}return s}isInvalidElement(t){return t.nodeType===Node.COMMENT_NODE||["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return tt.getElementToBlockStrategies()}};class nt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class st extends t{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[...t.childrenToBeInserted,t.referChildren])}replaceElementWithElements(t,e,n){t.children&&(n.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?n:t)))}}class rt extends st{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class it extends A{constructor(t,e){super(),this.type=y.IMAGE,this.size=t,this.alt=e}static from(t,e){return[y.IMAGE,new it(t,e)]}toJSON(){return U(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new it(this.size,this.alt)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e={verticalAlign:"bottom"};switch(this.size){case"sm":return Object.assign(Object.assign({},e),{width:"25%"});case"md":return Object.assign(Object.assign({},e),{width:"50%"});case"lg":return Object.assign(Object.assign({},e),{width:"100%"})}}}class ot extends k{constructor(t,e,n,s){super(t,s),this.type=N.IMAGE,this.url=e,this.parent=n}static from(t,e,n={autoMatchFormat:!0}){const s=new ot(t.id,t.url,e),r=!!n.autoMatchFormat,i=Object.assign({},t.annotations),{size:o}=i,a=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(i,["size"]),c=Object.assign(Object.assign({},a),{size:null!=o?o:r?"md":void 0});return s.annotationMap=new Map(Object.keys(c).map((t=>"size"===t||"alt"===t?it.from(c.size,c.alt):this.createAnnotationEntity(t,c[t]))).filter(U)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof it||t instanceof C)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return""==t.alt&&delete t.alt,Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}clone(){return new ot(this.id,this.url,this.parent,super.cloneAnnotations())}toHtml(){const t=this.getAnnotationByType(y.IMAGE);return`<img${super.generateAttributeString(...[t&&t.alt?`alt="${t.alt}"`:null,`src="${this.url}"`,t&&t.size?`data-size="${t.size}"`:null].filter(U))}>`}doAnnotationActionApply(t){const e=r.get(j.name,ot.name);e&&e.execute(t,this)}doModifyActionApply(t){r.executeTheStrategy(t,this)}}r.register(i.UPDATE_IMAGE_NODE_URL,ot.name,new class extends t{handleAction(t,e){e.url=t.url}}),r.register(j.name,ot.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}});class at extends H{constructor(t,e){super(),this.type=i.INSERT_NEW_PARAGRAPH,this.startContainerNode=t,this.startOffset=e}}class ct extends f{constructor(t){super(t),this.type="image",this.children=[]}static from(t,e={autoMatchFormat:!0}){const n=new ct(t.id),{annotations:s}=t;return n.children=t.nodes.map((t=>ot.from(t,n,e))),s&&super.convertAnnotationsToMap(n.annotationMap,s),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map((t=>t.toJSON()))})}toHtml(){const t=super.generateAttributeString(),e=this.children.map((t=>t.toHtml())).join("");return super.shouldRenderAsInternalWrapper()?e:[`<div${t}>`,e,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.url.length>0))}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new ct(z())}clone(){const t=new ct(this.id);return t.children=this.children.map((e=>{const n=e.clone();return n.parent=t,n})),t.annotationMap=super.cloneAnnotations(),t.parent=this.parent,t}}r.register(i.MERGE_TWO_BLOCKS_NODES,ct.name,new u),r.register(i.REPLACE_CHILD_NODES,ct.name,new l),r.register(i.SPLIT_BLOCK_WITH_NODE,ct.name,new class extends t{handleAction(t,e){t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode,e)}splitImageNodes(t,e,n){const s=n.children.indexOf(t);if(s>-1){const t=n.children.slice(0,s+e),r=n.children.slice(s+e);n.apply(new B(t));const i=this.cloneWithNodes(r,n);return n.parent.apply(new d(n,i)),i}}cloneWithNodes(t,e){const n=e.createNewImageBlock();return n.children=[],n.apply(new s(t)),n}}),r.register(i.LINE_BREAK_SINGLE_BLOCK,ct.name,new class extends t{handleAction(t,e){const n=new at(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(i.LINE_BREAK_MULTIPLE_BLOCKS,ct.name,new class extends t{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,r){const i=e.from({id:z(),type:"paragraph",nodes:[{id:z(),type:"text",text:"\n"}]});r.parent.apply(new d(r,i));const o=this.concatBlocksNodes(t.slice(1));return(0===o.length||o[0]&&""===o[0].text)&&o.push(new n(z(),"\n",i)),i.apply(new s(o)),i.children[0]}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new h(t)))})),e}}),r.register(i.INSERT_IMAGE_TO_BLOCK,ct.name,new class extends t{handleAction(t,e){const n=t.splitPointNode,r=t.startOffsetOfNode,i=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(i.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new d(e,i)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new p(e,i)):(e.apply(new I(n,r)),e.parent.apply(new d(e,i)))}}),r.register(S.name,ct.name,new v);class lt extends f{constructor(t,e){super(t),this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new lt(t.id,t.htmlTag),{annotations:s}=t;return s&&super.convertAnnotationsToMap(n.annotationMap,s),n.children=t.children.map((t=>{const s=R.getRTEBlockClass(t.type);if(s){const r=s.from(t,e);return r.parent=n,r}})).filter(U),n}clone(){const t=new lt(this.id,this.htmlTag);return t.children=this.children.map((t=>t.clone())),t.annotationMap=super.cloneAnnotations(),t}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(){const t=this.htmlTag;return[`<${t}${super.generateAttributeString()}>`,this.children.map((t=>t.toHtml())).join(""),`</${t}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}class ut extends H{constructor(t){super(),this.type=i.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class dt extends L{handleAction(t,e){const{startContainerNode:n}=t;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(t,e):this.deleteDecoratorNodeContent(t,e);const s=e.parent;s&&e.isListItemBlock()&&0===s.children.length&&s.parent.apply(new h(s))}deleteTextNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;if(0!==s&&!n.isEmpty()){const r=n.text.slice(0,s-1)+n.text.slice(s);if(n.apply(new D(r)),r)return void(t.previousNode=n);{const s=this.getPreviousNode(n);return s&&s.parent===e&&"\n"===s.text||1===e.children.length?void(t.previousNode=n):(e.apply(new h(n)),void(t.previousNode=s))}}{let s=this.getPreviousNode(n),r=null;if(e.children.length&&s&&s.parent!==e)n.isEmpty()&&e.apply(new h(n)),e.type===s.parent.type&&s.parent.apply(new ut(e));else if(this.isContentFirstNode(n)&&n.isEmpty()&&(r=this.getNextNode(n)),n.isEmpty()&&e.apply(new h(n)),s&&s.isTextNode()&&s.isEmpty()){const t=s;s=this.getPreviousNode(s),t.parent.apply(new h(t)),s||(r=n)}0===e.children.length&&e.parent.apply(new h(e)),s?t.previousNode=s:r&&(t.nextNode=r)}}deleteDecoratorNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;let r=this.getPreviousNode(n),i=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(i=this.getNextNode(n)),1===t.children.length?t.parent.apply(new h(t)):t.apply(new h(n))}else{const e=r;e&&!e.isContentEditable()&&(r=this.getPreviousNode(e),e.parent.apply(new h(e)),r||(t.nextNode=n))}r?t.previousNode=r:i&&(t.nextNode=i)}}class ht extends t{handleAction(t,e){const{startContainerNode:n}=t;t.newBlock=this.breakSingleBlock(n,t.startOffset,e)}breakSingleBlock(t,e,n){const s=this.getNewParagraph(t);if(s){if(this.isCaretPositionAtBlockEnd(n,t,e))n.parent.apply(new d(n,s));else{if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new I(t,e);return n.apply(s),s.newBlock}n.parent.apply(new p(n,s))}return s}}getNewParagraph(t){const e=this.createNewParagraph("");if(e){let n=e.children[0];return t.isTextNode()&&t.isContentEditable()&&(e.children=[],n=t.cloneWithText(""),n.annotationMap.delete(y.LINK),e.apply(new s([n]))),e}}}class wt extends H{constructor(t,e){super(),this.type=i.UPDATE_CURSOR_POSITION,this.nextFocusNode=t,this.offset=e}}class pt extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,i=this.createNewParagraph(n);if(i){const t=i.children[0];e.apply(0!==s?new d(r,t):new p(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new wt(t))}}class mt extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),i=this.copyInlineStyleToNewNode(t);if(r.apply(new s([i])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new I(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new p(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],i=1===n.children.length&&n.children[0].isEmpty();if(n===r&&i){const r=n.parent.parent;if("list-item"!==r.type){const i=e.from({id:z(),type:"paragraph",nodes:[]});return i.apply(new s(t.children)),r.apply(new d(n.parent,i)),n.parent.apply(new h(n)),i}r.parent.apply(new d(r,t)),n.parent.apply(new h(n))}else n.parent.apply(new d(n,t));return t}copyInlineStyleToNewNode(t){const e=t.cloneWithText("");return e.annotationMap.delete(y.LINK),e}}class gt extends H{constructor(t){super(),this.type=i.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class ft extends M{handleAction(t,e){super.handleAction(t,e);const n=e.parent;0===e.children.length&&n&&n.apply("list-item"===n.type?new gt(e):new h(e))}}const xt=new class{registerBlockBasicStrategies(t){r.register(i.DELETE_CHILDREN,t,t===_.name?new ft:new M),r.register(i.APPEND_CHILDREN,t,new nt),r.register(i.INSERT_CHILDREN_BEFORE,t,new st),r.register(i.INSERT_CHILDREN_AFTER,t,new rt),r.register(i.DELETE_BLOCK_CONTENT,t,new dt),r.register(i.INSERT_NEW_PARAGRAPH,t,t===Y.name?new mt:new ht),r.register(i.INSERT_TEXT_TO_DECORATOR_NODE,t,new pt)}};class bt{}class Tt extends bt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isBold(t)||e.bold?{bold:!0}:{}}isBold(t){return"STRONG"===t.nodeName||"B"===t.nodeName||"bold"===t.style.fontWeight||"700"===t.style.fontWeight||t.classList.contains("v-rte--bold")}}class Ot extends bt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getAttributes(t);return Object.keys(e).length>0?{customAttribute:e}:{}}getAttributes(t){return t.getAttributeNames().filter((t=>"style"!==t&&"class"!==t&&this.isValidAttr(t))).reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{})}isValidAttr(t){return/^[a-zA-Z_][\w-]*$/.test(t)}}class Et extends bt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getCustomClass(t);return e.length>0?{customClass:e}:{}}getCustomClass(t){return t.classList.toString().split(" ").filter((t=>!t.includes("v-rte")&&""!==t))}}class At extends bt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.generateCustomStyleAnnotations(t);return Object.keys(e).length>0?{customStyle:e}:{}}generateCustomStyleAnnotations(t){const e=t.getAttribute("style");return e?e.split(";").filter(Boolean).filter((t=>" "!==t)).map((t=>{const e=t.replace(/(['"])(.*?)\1/g,"$2").split(":");return{[J(e[0].trim())]:e[1].trim().replace(";","")}})).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{}):{}}}class yt extends bt{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getIndent(t);return e?{indent:e}:{}}getIndent(t){const e=t.style;let n;if(e.marginLeft)n=e.marginLeft;else{if(!e.margin)return null;{const t=e.margin.split(" ");switch(t.length){case 4:n=t[3];break;case 2:case 3:n=t[1];break;default:n=t[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}}class kt extends bt{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getTextAlign(t);return e?{textAlign:e}:{}}getTextAlign(t){const e=t.classList;if(e.contains("v-rte--horizontal-alignment-left"))return"left";if(e.contains("v-rte--horizontal-alignment-center"))return"center";if(e.contains("v-rte--horizontal-alignment-right"))return"right";if(e.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(t.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class Nt extends bt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isCode(t)||e.code?{code:!0}:{}}isCode(t){return t.classList.contains("v-rte--code")||"CODE"===t.nodeName||"PRE"===t.nodeName||"monospace"===t.style.fontFamily||"Roboto Mono"===t.style.fontFamily.replace(/["']/g,"")}}class Ct extends bt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){const n=this.getColor(t)||e.textColor;return n?{textColor:n}:{}}getColor(t){var e;const n=null===(e=W(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=P.filter((t=>t.key!==F.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of P)if(t.style.color.includes(e.key))return e.key;return null}}class jt extends bt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||"italic"===t.style.fontStyle||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class Bt extends bt{constructor(){super(...arguments),this.handlers=[new Ot,new Et,new At]}canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return e.link?{link:e.link}:"A"===t.tagName?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:z()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class Ht extends bt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes("line-through")||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class It extends bt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes("underline")||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class St extends bt{canHandle(t,e){return!!e.autoMatchFormat&&"RTETextBlock"===t.name}handle(t){const e=this.getTextStyle(t);return e?{textStyle:e}:{}}getTextStyle(t){const e=this.getElementTypeByDataType(t);if(e)return e;const n=this.getElementTypeByNodeName(t);if(n)return n;const s=this.getElementTypeByFontSize(t);if(s)return s;return this.getElementTypeByClassName(t)||null}getElementTypeByDataType(t){return t.nodeType!==Node.TEXT_NODE&&t.hasAttribute("data-type")?t.getAttribute("data-type"):null}getElementTypeByFontSize(t){var e;switch(null===(e=t.style)||void 0===e?void 0:e.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(t){switch(t.nodeName){case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(t){if(t.className){const e=/\bv-rte--text-style-(title|subtitle|heading-1|heading-2|heading-3|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class vt extends bt{canHandle(t){return"RTEImageNode"===t.name}handle(t){const e=this.getImageSize(t);return e?{size:e}:{}}getImageSize(t){return t.getAttribute("data-size")?t.getAttribute("data-size"):null}}class Rt extends bt{canHandle(t){return"RTEImageNode"===t.name}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}class Lt extends bt{constructor(){super(...arguments),this.customAttributeHandler=new Ot,this.customStyleAnnotationHandler=new At,this.customClassAnnotationHandler=new Et}canHandle(t,e){return"RTETextNode"===t.name&&!1===e.autoMatchFormat}handle(t,e){if(Lt.canHandleTags.includes(t.nodeName)){const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));if(n)return{inlineHtml:n}}return{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||1===t.childNodes.length&&t.childNodes[0].nodeType!==Node.TEXT_NODE){const e={htmlTag:t.nodeName.toLowerCase(),customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass};if(s){let n=s;for(;n.child&&t.parentNode&&n.child.htmlTag===t.parentNode.nodeName.toLowerCase();)n=n.child;n.child=e}else s=e}return s?Object.assign({},s):null}}Lt.canHandleTags=["A","ABBR","AUDIO","B","BDI","BDO","CITE","CODE","DEL","DFN","EMBED","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR","VIDEO"];const Dt=new class{constructor(){this.handlers=[new kt,new yt,new Tt,new jt,new It,new Ht,new Ct,new Bt,new Nt,new vt,new Rt,new Ot,new Et,new At,new Bt,new St,new Lt]}generate(t,e,n={autoMatchFormat:!0}){const s="A"===e.tagName;return this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof Bt)).filter((r=>e.nodeType!==Node.TEXT_NODE&&r.canHandle(t,{skipCustomAnnotations:n.skipCustomAnnotations||s,autoMatchFormat:n.autoMatchFormat}))).reduce(((t,s)=>{const r=s.handle(e,n.parentAnnotations);return Object.assign(Object.assign({},t),r)}),{})}};class Mt extends Q{constructor(){super(...arguments),this.annotationHandler=new St}generateChildNodes(t,e,s){const r=[],i=!(!s||!1!==s.autoMatchFormat),o=Object.assign({},e);return t.forEach((t=>{const a=tt.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let c=null;if(a&&(c=a.handle([t],s,o)),c)r.push(c);else if(K(t)&&t.childNodes.length>0){const a=Dt.generate(n,t,Object.assign({parentAnnotations:i?{inlineHtml:o.inlineHtml,link:o.link,code:o.code}:e},s));r.push(...this.generateChildNodes(Array.from(t.childNodes),a,s))}})),r}matchTextBlockType(t){var e;return null!==(e=this.annotationHandler.handle(t).textStyle)&&void 0!==e?e:"paragraph"}}class Pt extends Mt{canHandle(t,e,n){const s=t[e];return!n.autoMatchFormat&&("DIV"!==s.nodeName||s.childNodes.length>0&&"IMG"!==s.childNodes[0].nodeName)&&Pt.canHandleTags.includes(t[e].nodeName)?1:0}handle(t,e){return lt.from(this.generateHtmlBlock(t[0],e),e)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}generateHtmlBlock(t,e){return{id:z(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:Dt.generate(lt,t,e),children:[]}}}Pt.canHandleTags=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BUTTON","CAPTION","COL","COLGROUP","DIV","DD","DETAILS","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","HEADER","HR","HX","INPUT","LEGEND","MAIN","NAV","PRE","SECTION","SUMMARY","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR"];class Ft extends Mt{canHandle(t,e){return"PRE"!==t[e].tagName&&"CODE"!==t[e].tagName||!t[e].hasAttribute("data-language")?0:1}handle(t){const e=t[0];if(e){const t=e.textContent,n=e.dataset.language;return O.from({id:z(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class zt extends Mt{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return ct.from({id:z(),type:"image",nodes:[{id:z(),type:"image",url:t.src,annotations:Dt.generate(ot,t,e)}],annotations:Object.assign(Object.assign({},Dt.generate(ct,t.parentElement,e)),{internalWrapper:n})},e)}}class Ut extends Mt{canHandle(t,e){let n=0;for(let s=e;s<t.length;s++){const e=t[s];if(e.nodeType!==Node.TEXT_NODE&&(!Ut.canHandleTags.includes(e.nodeName)||""===e.textContent&&e.querySelector("IMG")))break;n++}return n}handle(t,s){const r=t[0].parentElement,i=s&&s.autoMatchFormat,o=this.generateChildNodes(t,i?Dt.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),a=i?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),c=!i&&!a;return e.from(Object.assign({id:z(),type:a||"paragraph",nodes:o},c?{annotations:{internalWrapper:c}}:{annotations:Dt.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}}Ut.canHandleTags=[...Lt.canHandleTags,"CODE","A","VEGA-RICH-TEXT-LINK-EDITOR","BR"];class $t extends Q{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:z(),type:"text",text:t,annotations:e}}}R.registerRTEDTOClass("paragraph",e),R.registerRTEDTOClass("title",e),R.registerRTEDTOClass("subtitle",e),R.registerRTEDTOClass("heading-1",e),R.registerRTEDTOClass("heading-2",e),R.registerRTEDTOClass("heading-3",e),R.registerRTEDTOClass("heading-4",e),R.registerRTEDTOClass("heading-5",e),R.registerRTEDTOClass("heading-6",e),R.registerRTEDTOClass("heading-6",e),R.registerRTEDTOClass("list-item",Y),R.registerRTEDTOClass("bullet-list",_),R.registerRTEDTOClass("number-list",_),R.registerRTEDTOClass("image",ct),R.registerRTEDTOClass("code-block",O),R.registerRTEDTOClass("html-block",lt),R.registerRTEDTOClass("text",n),R.registerRTEDTOClass("image",ot),xt.registerBlockBasicStrategies(e.name),xt.registerBlockBasicStrategies(_.name),xt.registerBlockBasicStrategies(Y.name),xt.registerBlockBasicStrategies(ct.name),xt.registerBlockBasicStrategies(lt.name),tt.registerElementToBlockStrategy(new Ut),tt.registerElementToBlockStrategy(new class extends zt{canHandle(t,e){const n=t[e];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(t,e){const n=t[0].querySelector("img");return this.createRTEImageBlock(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),tt.registerElementToBlockStrategy(new class extends zt{canHandle(t,e){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===t[e].tagName?1:0}handle(t,e){const n=t[0],s=n.querySelector("img");if(U(s))return ct.from({id:z(),type:"image",nodes:[{id:z(),type:"image",url:s.src,annotations:Dt.generate(ot,n,e)}],annotations:Dt.generate(ct,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),tt.registerElementToBlockStrategy(new class extends zt{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),tt.registerElementToBlockStrategy(new class extends Mt{canHandle(t,e){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(t[e]))?1:0}handle(t,n){const s=this.generateChildNodes(Array.from(t[0].childNodes),{},n);return 0===s.length?null:e.from({id:z(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:Dt.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),tt.registerElementToBlockStrategy(new Ft),tt.registerElementToBlockStrategy(new class extends Ft{canHandle(t,e){return"VEGA-CODE-BLOCK"===t[e].tagName&&0==!!t[e].querySelector("vega-code-block")||this.isCodeBlockContainer(t[e])?1:0}handle(t){const e=this.isCodeBlockContainer(t[0])?t[0].querySelector("vega-code-block"):t[0],n=e.querySelector("code");if(n)return super.handle([n]);if(e.hasAttribute("data-content")){const t=document.createElement("code");return t.textContent=e.dataset.content,t.dataset.language=e.dataset.language,super.handle([t])}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isCodeBlockContainer(t){return"PRE"===t.tagName&&t.classList.contains("code-block-container")&&1===t.querySelectorAll("vega-code-block").length}}),tt.registerElementToBlockStrategy(new class extends Mt{canHandle(t,e){if(!["UL","OL"].includes(t[e].parentElement.nodeName)&&t.some((t=>"LI"===t.nodeName))){let n=0;for(let s=e;s<t.length&&"LI"===t[s].nodeName;s++)n++;return n}return"LI"===t[e].tagName?1:0}handle(t,e){const n=t[0];return["UL","OL"].includes(n.parentElement.nodeName)?Y.from(this.generateListItemBlockDTO(n,e),e):this.generateWithListBlock(t,e)}appendChildBlocks(t,e){t.nestList=e.filter((t=>["bullet-list","number-list"].includes(t.type)))}shouldProceedToElementChildren(){return!0}generateWithListBlock(t,e){return _.from({id:z(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:z(),type:"list-item",annotations:Dt.generate(Y,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),Dt.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),tt.registerElementToBlockStrategy(new class extends Mt{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,i=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),o=U(s)&&["UL","OL"].includes(s.nodeName);return r&&!i&&o?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return Y.from({id:z(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),tt.registerElementToBlockStrategy(new class extends Mt{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:_.from({id:z(),type:"number-list",blocks:[],annotations:Dt.generate(_,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof Y)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),tt.registerElementToBlockStrategy(new class extends Mt{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:_.from({id:z(),type:"bullet-list",blocks:[],annotations:Dt.generate(_,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof Y)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),tt.registerElementToBlockStrategy(new Pt),tt.registerElementToNodeStrategy(new class extends $t{canHandle(t,e){const n=t[e];return!K(n)||"BR"!==n.nodeName&&0!==n.childNodes.length?0:1}handle(t,e,s){const r=!(!e||!1!==e.autoMatchFormat),i=Object.assign({},s),o=t[0],a=Dt.generate(n,o,Object.assign({parentAnnotations:r?{inlineHtml:i.inlineHtml,link:i.link,code:i.code}:s},e));if("BR"===o.nodeName)return this.generateTextNode("\n",a);if(0===o.childNodes.length){const t=r?X(Object.assign(Object.assign({},n.supportsHtmlTag(o.nodeName.toLowerCase())?a:{}),{inlineHtml:a.inlineHtml,plainText:U(a.inlineHtml)})):a;return Object.assign({},this.generateTextNode("",t))}}}),tt.registerElementToNodeStrategy(new class extends $t{canHandle(t,e){return t[e].nodeType===Node.TEXT_NODE?1:0}handle(t,e,s){const r=Object.assign({},s),i=!(!e||!1!==e.autoMatchFormat),o=t[0],a=o.parentNode.nodeName.toLowerCase(),c=i&&!n.supportsHtmlTag(a),l=this.generateTextNode(String(o.textContent),i?X(Object.assign(Object.assign({},"span"===a?r:{link:r.link,code:"code"===a?r.code:void 0}),{inlineHtml:r.inlineHtml,plainText:c||void 0})):r);return Object.assign({},l)}});class Gt{constructor(t){t.forEach((t=>{t.parent=this})),this.children=t}static fromJSON(t,e={autoMatchFormat:!0}){const n=t.map((t=>{const n=R.getRTEBlockClass(t.type);if(n)return n.from(t,e);throw new Error(`[Vega] Unknown block type: ${t.type}`)}));return new Gt(n)}static createEmptyContent(){return Gt.fromJSON([{id:z(),type:"paragraph",nodes:[{id:z(),type:"text",text:""}]}])}static fromHtml(t,e={autoMatchFormat:!0,skipCustomAnnotations:!1}){const n=t.replace(/>\s+<\/?/g,(t=>t.endsWith("</")?t:"><")).replace(/(>)[\n\t]+(?=[a-zA-Z0-9_\W])/g,"$1").replace(/([a-zA-Z0-9_\W])[\n\t]+(?=<)/g,"$1"),s=(new DOMParser).parseFromString(n,"text/html").body,r=et.process(Array.from(s.childNodes),e).filter(U).map((t=>t.toDto(e))).filter(U);return new Gt(r)}clone(t=!1){return new Gt(t?this.children.map((t=>t.clone())):[...this.children])}toJSON(){return this.children.map((t=>t.toJSON()))}toHtml(t){return this.children.map((e=>e.toHtml(t))).join("")}apply(t){r.executeTheStrategy(t,this)}toListItem(t){t.children.map((t=>t.apply(new w)));const e=new Y(z());return e.apply(new s(t.children)),e.annotationMap=t.annotationMap,e}createList(t){return new _(z(),t)}findNodeById(t){return this.findNodeInBlocksById(t,this.children)}findNodeInBlocksById(t,e){for(const n of e){if("children"in n)for(const e of n.children)if(e.id===t)return e;if(n instanceof Y&&n.nestList)for(const e of n.nestList){const n=this.findNodeInBlocksById(t,e.children);if(n)return n}if(n instanceof _&&n.children){const e=this.findNodeInBlocksById(t,n.children);if(e)return e}}return null}}r.register(i.DELETE_CHILDREN,Gt.name,new M),r.register(i.APPEND_CHILDREN,Gt.name,new nt),r.register(i.INSERT_CHILDREN_BEFORE,Gt.name,new st),r.register(i.INSERT_CHILDREN_AFTER,Gt.name,new rt),r.register(i.TRANSFORM_TO_CODE_BLOCK,Gt.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,s=new O(z(),this.getCodeContent(n),"plainText");e.apply(new p(n[0],s)),t.newCodeBlock=s,this.removeSelectBlocks(n,e)}getCodeContent(t){return t.filter((t=>"image"!==t.type&&"list-item"!==t.type)).map((t=>t.children.map((t=>t.text)).join(""))).join("\n")}removeSelectBlocks(t,e){for(let n=0;n<t.length;n++)e.apply(new h(t[n]))}}),r.register(i.UPDATE_CURSOR_POSITION,Gt.name,new class extends t{handleAction(t,e){const{offset:n,nextFocusNode:s}=t,r=E.getDOMByEntity(e);r&&$.notify(G.getSubject(r,V),{node:s,offset:n})}});export{et as E,it as I,ut as M,ct as R,Gt as V,Y as a,_ as b,ot as c,at as d}
1
+ import{A as t,R as e,a as n,b as s,c as r,M as i,B as o,d as a,e as c,f as l,g as u,I as d,h,S as w,i as p,j as m,k as g,l as f,C as b,m as x,n as T,o as O,s as E,N as A,p as y,q as k,r as N,t as C,u as j,v as B,w as H,x as I,H as S,y as v,z as R,D as L,U as D,E as M,F as P,G as F}from"./p-34fdbe7a.js";import{g as z}from"./p-a4670e23.js";import{i as U}from"./p-b1faebe0.js";import{C as $}from"./p-2d0d575f.js";import{d as G}from"./p-0664ca9c.js";import{a as V}from"./p-0e954b9b.js";import{d as J}from"./p-02841589.js";import{r as W,i as K}from"./p-575235c8.js";import{c as X}from"./p-bf19682d.js";class Y extends e{constructor(t,e,n){super(t,"list-item",n),this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new Y(t.id,void 0,e);s.children=t.nodes.map((t=>n.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const e=_.from(t);return e.parent=s,e})));const{annotations:r}=t;return r&&Object.entries(r).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);U(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(){return[`<li${super.generateAttributeString()}>`,this.children.map((t=>t.toHtml())).join(""),"</li>"].join("")}cloneWithNodes(t){const e=new Y(z());return e.children=[],e.apply(new s(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new Y(z())}clone(){var t;const e=new Y(this.id);return e.children=this.children.map((t=>{const n=t.clone();return n.parent=e,n})),e.annotationMap=super.cloneAnnotations(),e.nestList=null===(t=this.nestList)||void 0===t?void 0:t.map((t=>{const n=t.clone();return n.parent=e,n})),e.parent=this.parent,e}}r.register(i.LINE_BREAK_SINGLE_BLOCK,Y.name,new o),r.register(i.LINE_BREAK_MULTIPLE_BLOCKS,Y.name,new a),r.register(i.DELETE_NEST_LIST,Y.name,new class extends t{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),r.register(i.SPLIT_BLOCK_WITH_NODE,Y.name,new c),r.register(i.REPLACE_CHILD_NODES,Y.name,new l),r.register(i.REPLACE_NEST_LIST,Y.name,new class extends t{handleAction(t,e){t.newList.forEach((t=>{t.parent=e})),e.nestList=t.newList}}),r.register(i.MERGE_TWO_BLOCKS_NODES,Y.name,new u),r.register(i.INSERT_IMAGE_TO_BLOCK,Y.name,new class extends t{handleAction(t,e){e.parent.apply(t)}});class Z extends m{constructor(){super(...arguments),this.type=g.LIST}renderStyle(t){return(null==t?void 0:t.standalone)?{paddingLeft:"8px",marginLeft:"16px"}:null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new Z}toJSON(){}}class _ extends f{constructor(t,e,n){super(t),this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&this.annotationMap.set(g.LIST,new Z)}static from(t,e={autoMatchFormat:!0}){const n=new _(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);U(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=Y.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return T.from(e);case"customClass":return x.from(e);case"customStyle":return b.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(){const t=this.getBlockTag();return[`<${t}${super.generateAttributeString()}>`,this.children.map((t=>t.toHtml())).join(""),`</${t}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(){const t=new _(this.id,this.type);return t.children=this.children.map((e=>{const n=e.clone();return n.parent=t,n})),t.annotationMap=super.cloneAnnotations(),t.parent=this.parent,t}getBlockTag(){return"number-list"===this.type?"ol":"ul"}}r.register(i.TRANSFORM_LIST_BLOCK,_.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,r=e.parent.createList(t.listType);if(n.every((t=>t.parent===e)))r.apply(new s(e.children)),e.parent.apply(new d(e,r)),e.parent.apply(new h(e)),n.forEach((t=>t.children.map((t=>t.apply(new w)))));else{const n=t.selectedBlocks.map((t=>e.parent.toListItem(t)));r.apply(new s(n)),e.parent.apply(new d(e,r)),t.selectedBlocks.forEach((t=>{t.parent.apply(new h(t))})),0===e.children.length&&e.parent.apply(new h(e))}}}),r.register(i.TRANSFORM_PARAGRAPH_BLOCK,_.name,new class extends t{handleAction(t,e){let n=!1,r=!1;const i=t.selectedBlocks,o=i.map((t=>(t.children.map((t=>t.apply(new w))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new p(e,...o));else if(r)e.parent.apply(new d(e,...o));else{const t=e.children.indexOf(i[0]),n=e.children.indexOf(i[i.length-1]),r=e.parent.createList(e.type);r.apply(new s(e.children.slice(0,t)));const a=e.parent.createList(e.type);a.apply(new s(e.children.slice(n+1))),e.parent.apply(new p(e,r,...o,a)),e.parent.apply(new h(e))}i.map((t=>{e.apply(new h(t))})),0===e.children.length&&e.parent.apply(new h(e))}toParagraph(t){const n=new e(z(),"paragraph");return n.apply(new s(t.children)),n.annotationMap=t.annotationMap,n}}),r.register(i.INSERT_IMAGE_TO_BLOCK,_.name,new class extends t{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new d(e,t.imageBlockToBeInserted):t)}});class Q{}class q{constructor(t,e){this.childrenOutput=[],this.currentStrategy=t,this.currentElements=e}setChildrenOutput(t){this.childrenOutput=t}toDto(t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const e=this.currentStrategy.handle(this.currentElements,t);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto(t))).filter(U)),e}}const tt=new class{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(t){this.hasDuplicateStrategy(t,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(t)}registerElementToNodeStrategy(t){this.hasDuplicateStrategy(t,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(t)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(t,e){return e.includes(t)}},et=new class{process(t,e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),s=[];for(let r=0;r<t.length;r++){if(this.isInvalidElement(t[r]))continue;let i=0;for(const o of n)if(i=o.canHandle(t,r,e),i>0){const n=t.slice(r,r+i),a=new q(o,n);1===i&&o.shouldProceedToElementChildren()&&a.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(a),r+=i-1;break}if(0===i&&r<t.length){const n=Array.from(t[r].childNodes),i=this.process(Array.from(n),e);i.length>0&&s.push(...i)}}return s}isInvalidElement(t){return t.nodeType===Node.COMMENT_NODE||["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return tt.getElementToBlockStrategies()}};class nt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class st extends t{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[...t.childrenToBeInserted,t.referChildren])}replaceElementWithElements(t,e,n){t.children&&(n.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?n:t)))}}class rt extends st{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class it extends A{constructor(t,e){super(),this.type=y.IMAGE,this.size=t,this.alt=e}static from(t,e){return[y.IMAGE,new it(t,e)]}toJSON(){return U(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new it(this.size,this.alt)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e={verticalAlign:"bottom"};switch(this.size){case"sm":return Object.assign(Object.assign({},e),{width:"25%"});case"md":return Object.assign(Object.assign({},e),{width:"50%"});case"lg":return Object.assign(Object.assign({},e),{width:"100%"})}}}class ot extends k{constructor(t,e,n,s){super(t,s),this.type=N.IMAGE,this.url=e,this.parent=n}static from(t,e,n={autoMatchFormat:!0}){const s=new ot(t.id,t.url,e),r=!!n.autoMatchFormat,i=Object.assign({},t.annotations),{size:o}=i,a=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(i,["size"]),c=Object.assign(Object.assign({},a),{size:null!=o?o:r?"md":void 0});return s.annotationMap=new Map(Object.keys(c).map((t=>"size"===t||"alt"===t?it.from(c.size,c.alt):this.createAnnotationEntity(t,c[t]))).filter(U)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof it||t instanceof C)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return""==t.alt&&delete t.alt,Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}clone(){return new ot(this.id,this.url,this.parent,super.cloneAnnotations())}toHtml(){const t=this.getAnnotationByType(y.IMAGE);return`<img${super.generateAttributeString(...[t&&t.alt?`alt="${t.alt}"`:null,`src="${this.url}"`,t&&t.size?`data-size="${t.size}"`:null].filter(U))}>`}doAnnotationActionApply(t){const e=r.get(j.name,ot.name);e&&e.execute(t,this)}doModifyActionApply(t){r.executeTheStrategy(t,this)}}r.register(i.UPDATE_IMAGE_NODE_URL,ot.name,new class extends t{handleAction(t,e){e.url=t.url}}),r.register(j.name,ot.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}});class at extends H{constructor(t,e){super(),this.type=i.INSERT_NEW_PARAGRAPH,this.startContainerNode=t,this.startOffset=e}}class ct extends f{constructor(t){super(t),this.type="image",this.children=[]}static from(t,e={autoMatchFormat:!0}){const n=new ct(t.id),{annotations:s}=t;return n.children=t.nodes.map((t=>ot.from(t,n,e))),s&&super.convertAnnotationsToMap(n.annotationMap,s),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map((t=>t.toJSON()))})}toHtml(){const t=super.generateAttributeString(),e=this.children.map((t=>t.toHtml())).join("");return super.shouldRenderAsInternalWrapper()?e:[`<div${t}>`,e,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.url.length>0))}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new ct(z())}clone(){const t=new ct(this.id);return t.children=this.children.map((e=>{const n=e.clone();return n.parent=t,n})),t.annotationMap=super.cloneAnnotations(),t.parent=this.parent,t}}r.register(i.MERGE_TWO_BLOCKS_NODES,ct.name,new u),r.register(i.REPLACE_CHILD_NODES,ct.name,new l),r.register(i.SPLIT_BLOCK_WITH_NODE,ct.name,new class extends t{handleAction(t,e){t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode,e)}splitImageNodes(t,e,n){const s=n.children.indexOf(t);if(s>-1){const t=n.children.slice(0,s+e),r=n.children.slice(s+e);n.apply(new B(t));const i=this.cloneWithNodes(r,n);return n.parent.apply(new d(n,i)),i}}cloneWithNodes(t,e){const n=e.createNewImageBlock();return n.children=[],n.apply(new s(t)),n}}),r.register(i.LINE_BREAK_SINGLE_BLOCK,ct.name,new class extends t{handleAction(t,e){const n=new at(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(i.LINE_BREAK_MULTIPLE_BLOCKS,ct.name,new class extends t{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,r){const i=e.from({id:z(),type:"paragraph",nodes:[{id:z(),type:"text",text:"\n"}]});r.parent.apply(new d(r,i));const o=this.concatBlocksNodes(t.slice(1));return(0===o.length||o[0]&&""===o[0].text)&&o.push(new n(z(),"\n",i)),i.apply(new s(o)),i.children[0]}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new h(t)))})),e}}),r.register(i.INSERT_IMAGE_TO_BLOCK,ct.name,new class extends t{handleAction(t,e){const n=t.splitPointNode,r=t.startOffsetOfNode,i=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(i.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new d(e,i)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new p(e,i)):(e.apply(new I(n,r)),e.parent.apply(new d(e,i)))}}),r.register(S.name,ct.name,new v);class lt extends f{constructor(t,e){super(t),this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new lt(t.id,t.htmlTag),{annotations:s}=t;return s&&super.convertAnnotationsToMap(n.annotationMap,s),n.children=t.children.map((t=>{const s=R.getRTEBlockClass(t.type);if(s){const r=s.from(t,e);return r.parent=n,r}})).filter(U),n}clone(){const t=new lt(this.id,this.htmlTag);return t.children=this.children.map((t=>t.clone())),t.annotationMap=super.cloneAnnotations(),t}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(){const t=this.htmlTag;return[`<${t}${super.generateAttributeString()}>`,this.children.map((t=>t.toHtml())).join(""),`</${t}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}class ut extends H{constructor(t){super(),this.type=i.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class dt extends L{handleAction(t,e){const{startContainerNode:n}=t;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(t,e):this.deleteDecoratorNodeContent(t,e);const s=e.parent;s&&e.isListItemBlock()&&0===s.children.length&&s.parent.apply(new h(s))}deleteTextNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;if(0!==s&&!n.isEmpty()){const r=n.text.slice(0,s-1)+n.text.slice(s);if(n.apply(new D(r)),r)return void(t.previousNode=n);{const s=this.getPreviousNode(n);return s&&s.parent===e&&"\n"===s.text||1===e.children.length?void(t.previousNode=n):(e.apply(new h(n)),void(t.previousNode=s))}}{let s=this.getPreviousNode(n),r=null;if(e.children.length&&s&&s.parent!==e)n.isEmpty()&&e.apply(new h(n)),e.type===s.parent.type&&s.parent.apply(new ut(e));else if(this.isContentFirstNode(n)&&n.isEmpty()&&(r=this.getNextNode(n)),n.isEmpty()&&e.apply(new h(n)),s&&s.isTextNode()&&s.isEmpty()){const t=s;s=this.getPreviousNode(s),t.parent.apply(new h(t)),s||(r=n)}0===e.children.length&&e.parent.apply(new h(e)),s?t.previousNode=s:r&&(t.nextNode=r)}}deleteDecoratorNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;let r=this.getPreviousNode(n),i=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(i=this.getNextNode(n)),1===t.children.length?t.parent.apply(new h(t)):t.apply(new h(n))}else{const e=r;e&&!e.isContentEditable()&&(r=this.getPreviousNode(e),e.parent.apply(new h(e)),r||(t.nextNode=n))}r?t.previousNode=r:i&&(t.nextNode=i)}}class ht extends t{handleAction(t,e){const{startContainerNode:n}=t;t.newBlock=this.breakSingleBlock(n,t.startOffset,e)}breakSingleBlock(t,e,n){const s=this.getNewParagraph(t);if(s){if(this.isCaretPositionAtBlockEnd(n,t,e))n.parent.apply(new d(n,s));else{if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new I(t,e);return n.apply(s),s.newBlock}n.parent.apply(new p(n,s))}return s}}getNewParagraph(t){const e=this.createNewParagraph("");if(e){let n=e.children[0];return t.isTextNode()&&t.isContentEditable()&&(e.children=[],n=t.cloneWithText(""),n.annotationMap.delete(y.LINK),e.apply(new s([n]))),e}}}class wt extends H{constructor(t,e){super(),this.type=i.UPDATE_CURSOR_POSITION,this.nextFocusNode=t,this.offset=e}}class pt extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,i=this.createNewParagraph(n);if(i){const t=i.children[0];e.apply(0!==s?new d(r,t):new p(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new wt(t))}}class mt extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),i=this.copyInlineStyleToNewNode(t);if(r.apply(new s([i])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new I(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new p(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],i=1===n.children.length&&n.children[0].isEmpty();if(n===r&&i){const r=n.parent.parent;if("list-item"!==r.type){const i=e.from({id:z(),type:"paragraph",nodes:[]});return i.apply(new s(t.children)),r.apply(new d(n.parent,i)),n.parent.apply(new h(n)),i}r.parent.apply(new d(r,t)),n.parent.apply(new h(n))}else n.parent.apply(new d(n,t));return t}copyInlineStyleToNewNode(t){const e=t.cloneWithText("");return e.annotationMap.delete(y.LINK),e}}class gt extends H{constructor(t){super(),this.type=i.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class ft extends M{handleAction(t,e){super.handleAction(t,e);const n=e.parent;0===e.children.length&&n&&n.apply("list-item"===n.type?new gt(e):new h(e))}}const bt=new class{registerBlockBasicStrategies(t){r.register(i.DELETE_CHILDREN,t,t===_.name?new ft:new M),r.register(i.APPEND_CHILDREN,t,new nt),r.register(i.INSERT_CHILDREN_BEFORE,t,new st),r.register(i.INSERT_CHILDREN_AFTER,t,new rt),r.register(i.DELETE_BLOCK_CONTENT,t,new dt),r.register(i.INSERT_NEW_PARAGRAPH,t,t===Y.name?new mt:new ht),r.register(i.INSERT_TEXT_TO_DECORATOR_NODE,t,new pt)}};class xt{}class Tt extends xt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isBold(t)||e.bold?{bold:!0}:{}}isBold(t){return"STRONG"===t.nodeName||"B"===t.nodeName||"bold"===t.style.fontWeight||"700"===t.style.fontWeight||t.classList.contains("v-rte--bold")}}class Ot extends xt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getAttributes(t);return Object.keys(e).length>0?{customAttribute:e}:{}}getAttributes(t){return t.getAttributeNames().filter((t=>"style"!==t&&"class"!==t&&this.isValidAttr(t))).reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{})}isValidAttr(t){return/^[a-zA-Z_][\w-]*$/.test(t)}}class Et extends xt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getCustomClass(t);return e.length>0?{customClass:e}:{}}getCustomClass(t){return t.classList.toString().split(" ").filter((t=>!t.includes("v-rte")&&""!==t))}}class At extends xt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.generateCustomStyleAnnotations(t);return Object.keys(e).length>0?{customStyle:e}:{}}generateCustomStyleAnnotations(t){const e=t.getAttribute("style");return e?e.split(";").filter(Boolean).filter((t=>" "!==t)).map((t=>{const e=t.replace(/(['"])(.*?)\1/g,"$2").split(":");return{[J(e[0].trim())]:e[1].trim().replace(";","")}})).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{}):{}}}class yt extends xt{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getIndent(t);return e?{indent:e}:{}}getIndent(t){const e=t.style;let n;if(e.marginLeft)n=e.marginLeft;else{if(!e.margin)return null;{const t=e.margin.split(" ");switch(t.length){case 4:n=t[3];break;case 2:case 3:n=t[1];break;default:n=t[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}}class kt extends xt{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.name)}handle(t){const e=this.getTextAlign(t);return e?{textAlign:e}:{}}getTextAlign(t){const e=t.classList;if(e.contains("v-rte--horizontal-alignment-left"))return"left";if(e.contains("v-rte--horizontal-alignment-center"))return"center";if(e.contains("v-rte--horizontal-alignment-right"))return"right";if(e.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(t.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class Nt extends xt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isCode(t)||e.code?{code:!0}:{}}isCode(t){return t.classList.contains("v-rte--code")||"CODE"===t.nodeName||"PRE"===t.nodeName||"monospace"===t.style.fontFamily||"Roboto Mono"===t.style.fontFamily.replace(/["']/g,"")}}class Ct extends xt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){const n=this.getColor(t)||e.textColor;return n?{textColor:n}:{}}getColor(t){var e;const n=null===(e=W(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=P.filter((t=>t.key!==F.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of P)if(t.style.color.includes(e.key))return e.key;return null}}class jt extends xt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||"italic"===t.style.fontStyle||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class Bt extends xt{constructor(){super(...arguments),this.handlers=[new Ot,new Et,new At]}canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return e.link?{link:e.link}:"A"===t.tagName?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:z()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class Ht extends xt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes("line-through")||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class It extends xt{canHandle(t){return"RTETextNode"===t.name}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes("underline")||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class St extends xt{canHandle(t,e){return!!e.autoMatchFormat&&"RTETextBlock"===t.name}handle(t){const e=this.getTextStyle(t);return e?{textStyle:e}:{}}getTextStyle(t){const e=this.getElementTypeByDataType(t);if(e)return e;const n=this.getElementTypeByNodeName(t);if(n)return n;const s=this.getElementTypeByFontSize(t);if(s)return s;return this.getElementTypeByClassName(t)||null}getElementTypeByDataType(t){return t.nodeType!==Node.TEXT_NODE&&t.hasAttribute("data-type")?t.getAttribute("data-type"):null}getElementTypeByFontSize(t){var e;switch(null===(e=t.style)||void 0===e?void 0:e.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(t){switch(t.nodeName){case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(t){if(t.className){const e=/\bv-rte--text-style-(title|subtitle|heading-1|heading-2|heading-3|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class vt extends xt{canHandle(t){return"RTEImageNode"===t.name}handle(t){const e=this.getImageSize(t);return e?{size:e}:{}}getImageSize(t){return t.getAttribute("data-size")?t.getAttribute("data-size"):null}}class Rt extends xt{canHandle(t){return"RTEImageNode"===t.name}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}class Lt extends xt{constructor(){super(...arguments),this.customAttributeHandler=new Ot,this.customStyleAnnotationHandler=new At,this.customClassAnnotationHandler=new Et}canHandle(t,e){return"RTETextNode"===t.name&&!1===e.autoMatchFormat}handle(t,e){if(Lt.canHandleTags.includes(t.nodeName)){const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));if(n)return{inlineHtml:n}}return{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||1===t.childNodes.length&&t.childNodes[0].nodeType!==Node.TEXT_NODE){const e={htmlTag:t.nodeName.toLowerCase(),customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass};if(s){let n=s;for(;n.child&&t.parentNode&&n.child.htmlTag===t.parentNode.nodeName.toLowerCase();)n=n.child;n.child=e}else s=e}return s?Object.assign({},s):null}}Lt.canHandleTags=["A","ABBR","AUDIO","B","BDI","BDO","CITE","CODE","DEL","DFN","EMBED","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR","VIDEO"];const Dt=new class{constructor(){this.handlers=[new kt,new yt,new Tt,new jt,new It,new Ht,new Ct,new Bt,new Nt,new vt,new Rt,new Ot,new Et,new At,new Bt,new St,new Lt]}generate(t,e,n={autoMatchFormat:!0}){const s="A"===e.tagName;return this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof Bt)).filter((r=>e.nodeType!==Node.TEXT_NODE&&r.canHandle(t,{skipCustomAnnotations:n.skipCustomAnnotations||s,autoMatchFormat:n.autoMatchFormat}))).reduce(((t,s)=>{const r=s.handle(e,n.parentAnnotations);return Object.assign(Object.assign({},t),r)}),{})}};class Mt extends Q{constructor(){super(...arguments),this.annotationHandler=new St}generateChildNodes(t,e,s){const r=[],i=!(!s||!1!==s.autoMatchFormat),o=Object.assign({},e);return t.forEach((t=>{const a=tt.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let c=null;if(a&&(c=a.handle([t],s,o)),c)r.push(c);else if(K(t)&&t.childNodes.length>0){const a=Dt.generate(n,t,Object.assign({parentAnnotations:i?{inlineHtml:o.inlineHtml,link:o.link,code:o.code}:e},s));r.push(...this.generateChildNodes(Array.from(t.childNodes),a,s))}})),r}matchTextBlockType(t){var e;return null!==(e=this.annotationHandler.handle(t).textStyle)&&void 0!==e?e:"paragraph"}}class Pt extends Mt{canHandle(t,e,n){const s=t[e];return!n.autoMatchFormat&&("DIV"!==s.nodeName||s.childNodes.length>0&&"IMG"!==s.childNodes[0].nodeName)&&Pt.canHandleTags.includes(t[e].nodeName)?1:0}handle(t,e){return lt.from(this.generateHtmlBlock(t[0],e),e)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}generateHtmlBlock(t,e){return{id:z(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:Dt.generate(lt,t,e),children:[]}}}Pt.canHandleTags=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BUTTON","CAPTION","COL","COLGROUP","DIV","DD","DETAILS","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","HEADER","HR","HX","INPUT","LEGEND","MAIN","NAV","PRE","SECTION","SUMMARY","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR"];class Ft extends Mt{canHandle(t,e){return"PRE"!==t[e].tagName&&"CODE"!==t[e].tagName||!t[e].hasAttribute("data-language")?0:1}handle(t){const e=t[0];if(e){const t=e.textContent,n=e.dataset.language;return O.from({id:z(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class zt extends Mt{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return ct.from({id:z(),type:"image",nodes:[{id:z(),type:"image",url:t.src,annotations:Dt.generate(ot,t,e)}],annotations:Object.assign(Object.assign({},Dt.generate(ct,t.parentElement,e)),{internalWrapper:n})},e)}}class Ut extends Mt{canHandle(t,e){let n=0;for(let s=e;s<t.length;s++){const e=t[s];if(e.nodeType!==Node.TEXT_NODE&&(!Ut.canHandleTags.includes(e.nodeName)||""===e.textContent&&e.querySelector("IMG")))break;n++}return n}handle(t,s){const r=t[0].parentElement,i=s&&s.autoMatchFormat,o=this.generateChildNodes(t,i?Dt.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),a=i?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),c=!i&&!a;return e.from(Object.assign({id:z(),type:a||"paragraph",nodes:o},c?{annotations:{internalWrapper:c}}:{annotations:Dt.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}}Ut.canHandleTags=[...Lt.canHandleTags,"CODE","A","VEGA-RICH-TEXT-LINK-EDITOR","BR"];class $t extends Q{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:z(),type:"text",text:t,annotations:e}}}R.registerRTEDTOClass("paragraph",e),R.registerRTEDTOClass("title",e),R.registerRTEDTOClass("subtitle",e),R.registerRTEDTOClass("heading-1",e),R.registerRTEDTOClass("heading-2",e),R.registerRTEDTOClass("heading-3",e),R.registerRTEDTOClass("heading-4",e),R.registerRTEDTOClass("heading-5",e),R.registerRTEDTOClass("heading-6",e),R.registerRTEDTOClass("heading-6",e),R.registerRTEDTOClass("list-item",Y),R.registerRTEDTOClass("bullet-list",_),R.registerRTEDTOClass("number-list",_),R.registerRTEDTOClass("image",ct),R.registerRTEDTOClass("code-block",O),R.registerRTEDTOClass("html-block",lt),R.registerRTEDTOClass("text",n),R.registerRTEDTOClass("image",ot),bt.registerBlockBasicStrategies(e.name),bt.registerBlockBasicStrategies(_.name),bt.registerBlockBasicStrategies(Y.name),bt.registerBlockBasicStrategies(ct.name),bt.registerBlockBasicStrategies(lt.name),tt.registerElementToBlockStrategy(new Ut),tt.registerElementToBlockStrategy(new class extends zt{canHandle(t,e){const n=t[e];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(t,e){const n=t[0].querySelector("img");return this.createRTEImageBlock(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),tt.registerElementToBlockStrategy(new class extends zt{canHandle(t,e){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===t[e].tagName?1:0}handle(t,e){const n=t[0],s=n.querySelector("img");if(U(s))return ct.from({id:z(),type:"image",nodes:[{id:z(),type:"image",url:s.src,annotations:Dt.generate(ot,n,e)}],annotations:Dt.generate(ct,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),tt.registerElementToBlockStrategy(new class extends zt{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),tt.registerElementToBlockStrategy(new class extends Mt{canHandle(t,e){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(t[e]))?1:0}handle(t,n){const s=this.generateChildNodes(Array.from(t[0].childNodes),{},n);return 0===s.length?null:e.from({id:z(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:Dt.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),tt.registerElementToBlockStrategy(new Ft),tt.registerElementToBlockStrategy(new class extends Ft{canHandle(t,e){return"VEGA-CODE-BLOCK"===t[e].tagName&&0==!!t[e].querySelector("vega-code-block")||this.isCodeBlockContainer(t[e])?1:0}handle(t){const e=this.isCodeBlockContainer(t[0])?t[0].querySelector("vega-code-block"):t[0],n=e.querySelector("code");if(n)return super.handle([n]);if(e.hasAttribute("data-content")){const t=document.createElement("code");return t.textContent=e.dataset.content,t.dataset.language=e.dataset.language,super.handle([t])}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isCodeBlockContainer(t){return"PRE"===t.tagName&&t.classList.contains("code-block-container")&&1===t.querySelectorAll("vega-code-block").length}}),tt.registerElementToBlockStrategy(new class extends Mt{canHandle(t,e){if(!["UL","OL"].includes(t[e].parentElement.nodeName)&&t.some((t=>"LI"===t.nodeName))){let n=0;for(let s=e;s<t.length&&"LI"===t[s].nodeName;s++)n++;return n}return"LI"===t[e].tagName?1:0}handle(t,e){const n=t[0];return["UL","OL"].includes(n.parentElement.nodeName)?Y.from(this.generateListItemBlockDTO(n,e),e):this.generateWithListBlock(t,e)}appendChildBlocks(t,e){t.nestList=e.filter((t=>["bullet-list","number-list"].includes(t.type)))}shouldProceedToElementChildren(){return!0}generateWithListBlock(t,e){return _.from({id:z(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:z(),type:"list-item",annotations:Dt.generate(Y,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),Dt.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),tt.registerElementToBlockStrategy(new class extends Mt{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,i=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),o=U(s)&&["UL","OL"].includes(s.nodeName);return r&&!i&&o?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return Y.from({id:z(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),tt.registerElementToBlockStrategy(new class extends Mt{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:_.from({id:z(),type:"number-list",blocks:[],annotations:Dt.generate(_,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof Y)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),tt.registerElementToBlockStrategy(new class extends Mt{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:_.from({id:z(),type:"bullet-list",blocks:[],annotations:Dt.generate(_,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof Y)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),tt.registerElementToBlockStrategy(new Pt),tt.registerElementToNodeStrategy(new class extends $t{canHandle(t,e){const n=t[e];return!K(n)||"BR"!==n.nodeName&&0!==n.childNodes.length?0:1}handle(t,e,s){const r=!(!e||!1!==e.autoMatchFormat),i=Object.assign({},s),o=t[0],a=Dt.generate(n,o,Object.assign({parentAnnotations:r?{inlineHtml:i.inlineHtml,link:i.link,code:i.code}:s},e));if("BR"===o.nodeName)return this.generateTextNode("\n",a);if(0===o.childNodes.length){const t=r?X(Object.assign(Object.assign({},n.supportsHtmlTag(o.nodeName.toLowerCase())?a:{}),{inlineHtml:a.inlineHtml,plainText:U(a.inlineHtml)})):a;return Object.assign({},this.generateTextNode("",t))}}}),tt.registerElementToNodeStrategy(new class extends $t{canHandle(t,e){return t[e].nodeType===Node.TEXT_NODE?1:0}handle(t,e,s){const r=Object.assign({},s),i=!(!e||!1!==e.autoMatchFormat),o=t[0],a=o.parentNode.nodeName.toLowerCase(),c=i&&!n.supportsHtmlTag(a),l=this.generateTextNode(String(o.textContent),i?X(Object.assign(Object.assign({},"span"===a?r:{link:r.link,code:"code"===a?r.code:void 0}),{inlineHtml:r.inlineHtml,plainText:c||void 0})):r);return Object.assign({},l)}});class Gt{constructor(t){t.forEach((t=>{t.parent=this})),this.children=t}static fromJSON(t,e={autoMatchFormat:!0}){const n=t.map((t=>{const n=R.getRTEBlockClass(t.type);if(n)return n.from(t,e);throw new Error(`[Vega] Unknown block type: ${t.type}`)}));return new Gt(n)}static createEmptyContent(){return Gt.fromJSON([{id:z(),type:"paragraph",nodes:[{id:z(),type:"text",text:""}]}])}static fromHtml(t,e={autoMatchFormat:!0,skipCustomAnnotations:!1}){const n=t.replace(/>\s+<\/?/g,(t=>t.endsWith("</")?t:"><")).replace(/(>)[\n\t]+(?=[a-zA-Z0-9_\W])/g,"$1").replace(/([a-zA-Z0-9_\W])[\n\t]+(?=<)/g,"$1"),s=(new DOMParser).parseFromString(n,"text/html").body,r=et.process(Array.from(s.childNodes),e).filter(U).map((t=>t.toDto(e))).filter(U);return new Gt(r)}clone(t=!1){return new Gt(t?this.children.map((t=>t.clone())):[...this.children])}toJSON(){return this.children.map((t=>t.toJSON()))}toHtml(t){return this.children.map((e=>e.toHtml(t))).join("")}apply(t){r.executeTheStrategy(t,this)}toListItem(t){t.children.map((t=>t.apply(new w)));const e=new Y(z());return e.apply(new s(t.children)),e.annotationMap=t.annotationMap,e}createList(t){return new _(z(),t)}findNodeById(t){return this.findNodeInBlocksById(t,this.children)}findNodeInBlocksById(t,e){for(const n of e){if("children"in n)for(const e of n.children)if(e.id===t)return e;if(n instanceof Y&&n.nestList)for(const e of n.nestList){const n=this.findNodeInBlocksById(t,e.children);if(n)return n}if(n instanceof _&&n.children){const e=this.findNodeInBlocksById(t,n.children);if(e)return e}}return null}}r.register(i.DELETE_CHILDREN,Gt.name,new M),r.register(i.APPEND_CHILDREN,Gt.name,new nt),r.register(i.INSERT_CHILDREN_BEFORE,Gt.name,new st),r.register(i.INSERT_CHILDREN_AFTER,Gt.name,new rt),r.register(i.TRANSFORM_TO_CODE_BLOCK,Gt.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,s=new O(z(),this.getCodeContent(n),"plainText");e.apply(new p(n[0],s)),t.newCodeBlock=s,this.removeSelectBlocks(n,e)}getCodeContent(t){return t.filter((t=>"image"!==t.type&&"list-item"!==t.type)).map((t=>t.children.map((t=>t.text)).join(""))).join("\n")}removeSelectBlocks(t,e){for(let n=0;n<t.length;n++)e.apply(new h(t[n]))}}),r.register(i.UPDATE_CURSOR_POSITION,Gt.name,new class extends t{handleAction(t,e){const{offset:n,nextFocusNode:s}=t,r=E.getDOMByEntity(e);r&&$.notify(G.getSubject(r,V),{node:s,offset:n})}});export{et as E,it as I,ut as M,ct as R,Gt as V,Y as a,_ as b,ot as c,at as d}