@globalpayments/vega 2.42.0 → 2.44.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 (284) hide show
  1. package/dist/cjs/{app-globals-77b1f80b.js → app-globals-c23133a1.js} +5 -5
  2. package/dist/cjs/{child-nodes-event-prevent-slimmer-7f59159e.js → child-nodes-event-prevent-slimmer-4982065c.js} +1 -1
  3. package/dist/cjs/{content-state-45707be4.js → content-state-5659cad7.js} +2 -14
  4. package/dist/cjs/{design-token-d8362603.js → design-token-02d1846e.js} +1 -1
  5. package/dist/cjs/{element-appender-slimmer-ad1e5774.js → element-appender-slimmer-040db7e3.js} +154 -34
  6. package/dist/cjs/{form-field-controller-slimmer-928d263f.js → form-field-controller-slimmer-2d4a4f40.js} +2 -2
  7. package/dist/cjs/{image-annotation-action-0df6f005.js → image-annotation-action-64f0e28c.js} +1 -1
  8. package/dist/cjs/{index-84ce6b33.js → index-cea30b8b.js} +1 -1
  9. package/dist/cjs/index.cjs.js +8 -8
  10. package/dist/cjs/loader.cjs.js +7 -7
  11. package/dist/cjs/{public-rules-7994300f.js → public-rules-a23c74a9.js} +3 -3
  12. package/dist/cjs/{responsive-format-facade-9439e9ae.js → responsive-format-facade-22eb285c.js} +3 -3
  13. package/dist/cjs/{rich-text-editor-required-rule-11d07c7d.js → rich-text-editor-required-rule-cdc2e15e.js} +1 -1
  14. package/dist/cjs/{string-input-formatter-slimmer-017370ec.js → string-input-formatter-slimmer-90bdfcf6.js} +6 -3
  15. package/dist/cjs/{style-formatter-65652117.js → style-formatter-0536214a.js} +1 -1
  16. package/dist/cjs/{sub-state-notify-slimmer-b9e39b9d.js → sub-state-notify-slimmer-88e2f4aa.js} +1 -1
  17. package/dist/cjs/{sub-state-observer-slimmer-c6665cec.js → sub-state-observer-slimmer-8ed18a5a.js} +1 -1
  18. package/dist/cjs/{translation-2c8a32bb.js → translation-648b7910.js} +27 -0
  19. package/dist/cjs/{translation-slimmer-593b92fe.js → translation-slimmer-8eeb1c99.js} +1 -1
  20. package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
  21. package/dist/cjs/vega-app-header-button.cjs.entry.js +7 -7
  22. package/dist/cjs/vega-banner.cjs.entry.js +1 -1
  23. package/dist/cjs/vega-box.cjs.entry.js +7 -7
  24. package/dist/cjs/vega-breadcrumb.cjs.entry.js +2 -2
  25. package/dist/cjs/vega-button-circle.cjs.entry.js +7 -7
  26. package/dist/cjs/vega-button-group_2.cjs.entry.js +5 -5
  27. package/dist/cjs/vega-button-link.cjs.entry.js +2 -2
  28. package/dist/cjs/vega-button.cjs.entry.js +6 -6
  29. package/dist/cjs/vega-calendar_3.cjs.entry.js +7 -7
  30. package/dist/cjs/vega-card.cjs.entry.js +6 -6
  31. package/dist/cjs/vega-carousel.cjs.entry.js +5 -5
  32. package/dist/cjs/vega-checkbox_2.cjs.entry.js +5 -5
  33. package/dist/cjs/vega-chip.cjs.entry.js +7 -7
  34. package/dist/cjs/vega-color-picker.cjs.entry.js +3 -3
  35. package/dist/cjs/vega-combo-box.cjs.entry.js +5 -5
  36. package/dist/cjs/vega-date-picker_2.cjs.entry.js +11 -11
  37. package/dist/cjs/vega-dialog_2.cjs.entry.js +83 -8
  38. package/dist/cjs/vega-divider.cjs.entry.js +6 -6
  39. package/dist/cjs/vega-dropdown_5.cjs.entry.js +10 -10
  40. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  41. package/dist/cjs/vega-file-uploader.cjs.entry.js +4 -4
  42. package/dist/cjs/vega-flex.cjs.entry.js +7 -7
  43. package/dist/cjs/vega-font.cjs.entry.js +6 -6
  44. package/dist/cjs/vega-form.cjs.entry.js +5 -5
  45. package/dist/cjs/vega-grid.cjs.entry.js +6 -6
  46. package/dist/cjs/vega-icon.cjs.entry.js +6 -6
  47. package/dist/cjs/vega-image-uploader.cjs.entry.js +8 -8
  48. package/dist/cjs/vega-input-credit-card.cjs.entry.js +17 -13
  49. package/dist/cjs/vega-input-numeric.cjs.entry.js +6 -6
  50. package/dist/cjs/vega-input-phone-number.cjs.entry.js +5 -5
  51. package/dist/cjs/vega-input-range.cjs.entry.js +6 -6
  52. package/dist/cjs/vega-input-select.cjs.entry.js +8 -8
  53. package/dist/cjs/vega-input.cjs.entry.js +6 -6
  54. package/dist/cjs/{vega-internal-event-id-4ba74761.js → vega-internal-event-id-a0ca9af9.js} +4 -0
  55. package/dist/cjs/vega-left-nav_5.cjs.entry.js +17 -10
  56. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +5 -5
  57. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +3 -3
  58. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +18 -10
  59. package/dist/cjs/vega-pagination.cjs.entry.js +7 -7
  60. package/dist/cjs/vega-popover_2.cjs.entry.js +6 -6
  61. package/dist/cjs/vega-radio_2.cjs.entry.js +5 -5
  62. package/dist/cjs/vega-rich-text-content.cjs.entry.js +5 -5
  63. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +10 -10
  64. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +9 -9
  65. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +7 -7
  66. package/dist/cjs/vega-sidenav_3.cjs.entry.js +7 -7
  67. package/dist/cjs/vega-signature-capture.cjs.entry.js +8 -8
  68. package/dist/cjs/vega-stepper.cjs.entry.js +5 -5
  69. package/dist/cjs/vega-tab-group_2.cjs.entry.js +2 -2
  70. package/dist/cjs/vega-table_8.cjs.entry.js +9 -9
  71. package/dist/cjs/vega-textarea.cjs.entry.js +5 -5
  72. package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
  73. package/dist/cjs/vega-toggle-switch.cjs.entry.js +3 -3
  74. package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -6
  75. package/dist/cjs/vega.cjs.js +7 -7
  76. package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +15 -10
  77. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +62 -1
  78. package/dist/collection/components/vega-modal/vega-modal.js +28 -0
  79. package/dist/collection/components/vega-nav/slimmers/renderers/vega-nav-list-renderer.js +1 -1
  80. package/dist/collection/components/vega-nav/vega-left-nav-group/slimmers/renderers/vega-left-nav-group-renderer.js +4 -1
  81. package/dist/collection/components/vega-nav/vega-left-nav-group/vega-left-nav-group.js +25 -0
  82. package/dist/collection/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-renderer.js +16 -7
  83. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +1 -2
  84. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +0 -11
  85. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-block.test.js +4 -4
  86. package/dist/collection/components/vega-rich-text-editor/test/e2e-utils.js +177 -0
  87. package/dist/collection/components/vega-rich-text-editor/test/fixture.js +257 -0
  88. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +2 -0
  89. package/dist/collection/helpers/slimmers/element-appender/element-appender-hierarchy-tree-manager.js +108 -0
  90. package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +19 -3
  91. package/dist/collection/helpers/slimmers/element-appender/test/element-appender-slimmer.test.js +232 -0
  92. package/dist/collection/helpers/slimmers/string-input-formatter-slimmer.js +5 -2
  93. package/dist/collection/helpers/translation/internal-translation-controller.js +25 -0
  94. package/dist/collection/helpers/translation/locales/en.js +2 -0
  95. package/dist/collection/helpers/translation/tests/internal-translation-controller.test.js +14 -0
  96. package/dist/collection/helpers/ui/element-appender.js +2 -2
  97. package/dist/collection/helpers/validator/test/rules/rich-text-editor-required-rule.test.js +4 -4
  98. package/dist/esm/{app-globals-0aeb2171.js → app-globals-e6203355.js} +5 -5
  99. package/dist/esm/{child-nodes-event-prevent-slimmer-2f5824ee.js → child-nodes-event-prevent-slimmer-aab1c019.js} +1 -1
  100. package/dist/esm/{content-state-2de41bc0.js → content-state-7e9f3421.js} +2 -14
  101. package/dist/esm/{design-token-b195686e.js → design-token-e1b56333.js} +1 -1
  102. package/dist/esm/{element-appender-slimmer-f425d203.js → element-appender-slimmer-9d5d4108.js} +155 -35
  103. package/dist/esm/{form-field-controller-slimmer-d18d01da.js → form-field-controller-slimmer-16f7a11b.js} +2 -2
  104. package/dist/esm/{image-annotation-action-a0dd92ed.js → image-annotation-action-1e675348.js} +1 -1
  105. package/dist/esm/{index-4153fe96.js → index-707fec53.js} +1 -1
  106. package/dist/esm/index.js +8 -8
  107. package/dist/esm/loader.js +7 -7
  108. package/dist/esm/{public-rules-31433f1e.js → public-rules-596db5ba.js} +3 -3
  109. package/dist/esm/{responsive-format-facade-cf37ffd2.js → responsive-format-facade-6e639588.js} +3 -3
  110. package/dist/esm/{rich-text-editor-required-rule-c0f5a754.js → rich-text-editor-required-rule-ef25c4da.js} +1 -1
  111. package/dist/esm/{string-input-formatter-slimmer-99bed828.js → string-input-formatter-slimmer-452c439c.js} +6 -3
  112. package/dist/esm/{style-formatter-c5aec4a3.js → style-formatter-f454626b.js} +1 -1
  113. package/dist/esm/{sub-state-notify-slimmer-e3b2bff5.js → sub-state-notify-slimmer-c7169226.js} +1 -1
  114. package/dist/esm/{sub-state-observer-slimmer-ada3467b.js → sub-state-observer-slimmer-1d3336d6.js} +1 -1
  115. package/dist/esm/{translation-a18bc15e.js → translation-fd7a290a.js} +27 -0
  116. package/dist/esm/{translation-slimmer-a8c20249.js → translation-slimmer-7c37f252.js} +1 -1
  117. package/dist/esm/vega-accordion.entry.js +6 -6
  118. package/dist/esm/vega-app-header-button.entry.js +7 -7
  119. package/dist/esm/vega-banner.entry.js +1 -1
  120. package/dist/esm/vega-box.entry.js +7 -7
  121. package/dist/esm/vega-breadcrumb.entry.js +2 -2
  122. package/dist/esm/vega-button-circle.entry.js +7 -7
  123. package/dist/esm/vega-button-group_2.entry.js +5 -5
  124. package/dist/esm/vega-button-link.entry.js +2 -2
  125. package/dist/esm/vega-button.entry.js +6 -6
  126. package/dist/esm/vega-calendar_3.entry.js +7 -7
  127. package/dist/esm/vega-card.entry.js +6 -6
  128. package/dist/esm/vega-carousel.entry.js +5 -5
  129. package/dist/esm/vega-checkbox_2.entry.js +5 -5
  130. package/dist/esm/vega-chip.entry.js +7 -7
  131. package/dist/esm/vega-color-picker.entry.js +3 -3
  132. package/dist/esm/vega-combo-box.entry.js +5 -5
  133. package/dist/esm/vega-date-picker_2.entry.js +11 -11
  134. package/dist/esm/vega-dialog_2.entry.js +83 -8
  135. package/dist/esm/vega-divider.entry.js +6 -6
  136. package/dist/esm/vega-dropdown_5.entry.js +10 -10
  137. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  138. package/dist/esm/vega-file-uploader.entry.js +4 -4
  139. package/dist/esm/vega-flex.entry.js +7 -7
  140. package/dist/esm/vega-font.entry.js +6 -6
  141. package/dist/esm/vega-form.entry.js +5 -5
  142. package/dist/esm/vega-grid.entry.js +6 -6
  143. package/dist/esm/vega-icon.entry.js +6 -6
  144. package/dist/esm/vega-image-uploader.entry.js +8 -8
  145. package/dist/esm/vega-input-credit-card.entry.js +17 -13
  146. package/dist/esm/vega-input-numeric.entry.js +6 -6
  147. package/dist/esm/vega-input-phone-number.entry.js +5 -5
  148. package/dist/esm/vega-input-range.entry.js +6 -6
  149. package/dist/esm/vega-input-select.entry.js +8 -8
  150. package/dist/esm/vega-input.entry.js +6 -6
  151. package/dist/esm/{vega-internal-event-id-7809368b.js → vega-internal-event-id-d7113cf7.js} +3 -1
  152. package/dist/esm/vega-left-nav_5.entry.js +17 -10
  153. package/dist/esm/vega-loader-wrapper_2.entry.js +5 -5
  154. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
  155. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +18 -10
  156. package/dist/esm/vega-pagination.entry.js +7 -7
  157. package/dist/esm/vega-popover_2.entry.js +6 -6
  158. package/dist/esm/vega-radio_2.entry.js +5 -5
  159. package/dist/esm/vega-rich-text-content.entry.js +5 -5
  160. package/dist/esm/vega-rich-text-editor_4.entry.js +10 -10
  161. package/dist/esm/vega-selection-chip_2.entry.js +9 -9
  162. package/dist/esm/vega-selection-tile_2.entry.js +7 -7
  163. package/dist/esm/vega-sidenav_3.entry.js +7 -7
  164. package/dist/esm/vega-signature-capture.entry.js +8 -8
  165. package/dist/esm/vega-stepper.entry.js +5 -5
  166. package/dist/esm/vega-tab-group_2.entry.js +2 -2
  167. package/dist/esm/vega-table_8.entry.js +9 -9
  168. package/dist/esm/vega-textarea.entry.js +5 -5
  169. package/dist/esm/vega-time-picker_2.entry.js +9 -9
  170. package/dist/esm/vega-toggle-switch.entry.js +3 -3
  171. package/dist/esm/vega-tooltip_2.entry.js +7 -6
  172. package/dist/esm/vega.js +7 -7
  173. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +25 -0
  174. package/dist/types/components/vega-modal/vega-modal.d.ts +10 -0
  175. package/dist/types/components/vega-nav/interface.d.ts +1 -0
  176. package/dist/types/components/vega-nav/vega-left-nav-group/slimmers/renderers/vega-left-nav-group-renderer.d.ts +1 -0
  177. package/dist/types/components/vega-nav/vega-left-nav-group/vega-left-nav-group.d.ts +4 -0
  178. package/dist/types/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-renderer.d.ts +2 -0
  179. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +0 -4
  180. package/dist/types/components/vega-rich-text-editor/test/e2e-utils.d.ts +67 -0
  181. package/dist/types/components/vega-rich-text-editor/test/fixture.d.ts +19 -0
  182. package/dist/types/components.d.ts +10 -0
  183. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +2 -0
  184. package/dist/types/helpers/slimmers/element-appender/element-appender-hierarchy-tree-manager.d.ts +48 -0
  185. package/dist/types/helpers/slimmers/element-appender/element-appender-slimmer.d.ts +2 -0
  186. package/dist/types/helpers/translation/interface.d.ts +7 -0
  187. package/dist/types/helpers/translation/internal-translation-controller.d.ts +10 -1
  188. package/dist/vega/index.esm.js +1 -1
  189. package/dist/vega/p-01d4c679.js +1 -0
  190. package/dist/vega/p-02603c02.js +1 -0
  191. package/dist/vega/{p-0b6adb26.entry.js → p-05b7d047.entry.js} +1 -1
  192. package/dist/vega/p-09279679.entry.js +1 -0
  193. package/dist/vega/{p-30840b1d.entry.js → p-0a30fcaf.entry.js} +1 -1
  194. package/dist/vega/p-0c57091c.entry.js +1 -0
  195. package/dist/vega/{p-18520b0b.entry.js → p-0cb40df0.entry.js} +1 -1
  196. package/dist/vega/{p-9ae0b8bf.entry.js → p-0eedb5a8.entry.js} +1 -1
  197. package/dist/vega/p-11ccc1a9.entry.js +1 -0
  198. package/dist/vega/{p-b129beb6.js → p-12a10bdf.js} +1 -1
  199. package/dist/vega/p-16194709.entry.js +1 -0
  200. package/dist/vega/{p-de2e3383.js → p-179887da.js} +1 -1
  201. package/dist/vega/{p-a607c168.js → p-179c59ff.js} +1 -1
  202. package/dist/vega/{p-2d4e7947.entry.js → p-184f3b15.entry.js} +1 -1
  203. package/dist/vega/{p-8d6b1d3c.entry.js → p-1917b593.entry.js} +2 -2
  204. package/dist/vega/p-19f33816.js +1 -0
  205. package/dist/vega/{p-28244d46.entry.js → p-1d8f86f9.entry.js} +1 -1
  206. package/dist/vega/{p-08c829c6.entry.js → p-21b34b8b.entry.js} +1 -1
  207. package/dist/vega/p-27192960.js +1 -0
  208. package/dist/vega/{p-b5dac03a.entry.js → p-2796fa10.entry.js} +1 -1
  209. package/dist/vega/{p-4230112f.entry.js → p-2aba65ab.entry.js} +1 -1
  210. package/dist/vega/{p-11e1a374.entry.js → p-3291b8f9.entry.js} +1 -1
  211. package/dist/vega/{p-cdaa4c9d.entry.js → p-359e08ea.entry.js} +1 -1
  212. package/dist/vega/{p-d40e55f5.entry.js → p-391d6370.entry.js} +1 -1
  213. package/dist/vega/{p-c6cceae7.entry.js → p-3c236410.entry.js} +1 -1
  214. package/dist/vega/p-40c77aa8.entry.js +1 -0
  215. package/dist/vega/{p-a8f8b1e0.entry.js → p-4a47bc03.entry.js} +1 -1
  216. package/dist/vega/{p-c6c3c0c2.entry.js → p-4e9df296.entry.js} +1 -1
  217. package/dist/vega/{p-9ac32d6b.entry.js → p-4f3cce8d.entry.js} +1 -1
  218. package/dist/vega/{p-c0e8c86f.entry.js → p-54be441e.entry.js} +1 -1
  219. package/dist/vega/{p-28bf1b10.entry.js → p-5558ab9c.entry.js} +1 -1
  220. package/dist/vega/{p-d0c06937.entry.js → p-5dbf9c42.entry.js} +1 -1
  221. package/dist/vega/p-5f377954.js +1 -1
  222. package/dist/vega/{p-4047a36f.js → p-5f5bfd9c.js} +1 -1
  223. package/dist/vega/{p-d009cdaf.entry.js → p-6465cb2d.entry.js} +1 -1
  224. package/dist/vega/p-66c5fa14.js +1 -0
  225. package/dist/vega/{p-b440309d.entry.js → p-758e6e80.entry.js} +1 -1
  226. package/dist/vega/{p-0692350d.entry.js → p-759137be.entry.js} +1 -1
  227. package/dist/vega/p-7644a589.entry.js +1 -0
  228. package/dist/vega/{p-66cd4404.entry.js → p-765469bf.entry.js} +1 -1
  229. package/dist/vega/{p-2383031a.js → p-7f9e7ca2.js} +1 -1
  230. package/dist/vega/{p-a85855b0.entry.js → p-8de75077.entry.js} +1 -1
  231. package/dist/vega/{p-de7db3c6.entry.js → p-8fe6ded4.entry.js} +1 -1
  232. package/dist/vega/{p-0fbb350f.entry.js → p-944fb238.entry.js} +1 -1
  233. package/dist/vega/{p-c2f8e6eb.js → p-99289273.js} +1 -1
  234. package/dist/vega/{p-ec4b5c1c.entry.js → p-a22c9906.entry.js} +1 -1
  235. package/dist/vega/p-a34d2aab.entry.js +1 -0
  236. package/dist/vega/{p-45eba113.entry.js → p-a37f9db6.entry.js} +1 -1
  237. package/dist/vega/p-a53359f4.entry.js +1 -0
  238. package/dist/vega/p-a7abd309.entry.js +1 -0
  239. package/dist/vega/{p-b6143b84.js → p-ad86f6da.js} +1 -1
  240. package/dist/vega/{p-715e2775.entry.js → p-b1bc88d7.entry.js} +1 -1
  241. package/dist/vega/p-c66b55f8.js +1 -0
  242. package/dist/vega/{p-332d2c1a.entry.js → p-c838c746.entry.js} +1 -1
  243. package/dist/vega/{p-ac01f362.entry.js → p-c8f159d9.entry.js} +1 -1
  244. package/dist/vega/{p-5ea5c14b.entry.js → p-ca6ef342.entry.js} +1 -1
  245. package/dist/vega/{p-5c30b476.js → p-cd53bde4.js} +1 -1
  246. package/dist/vega/p-cda9bca2.js +1 -0
  247. package/dist/vega/{p-c52dfbaf.entry.js → p-cdc7d8cf.entry.js} +1 -1
  248. package/dist/vega/{p-90ae575e.js → p-d2e11032.js} +1 -1
  249. package/dist/vega/{p-237dbeef.entry.js → p-d3aa2ea7.entry.js} +1 -1
  250. package/dist/vega/{p-653c77ec.entry.js → p-dd63dbae.entry.js} +1 -1
  251. package/dist/vega/p-e06361df.js +1 -0
  252. package/dist/vega/p-e437c58a.entry.js +1 -0
  253. package/dist/vega/{p-c6be6b2d.entry.js → p-eaa6417d.entry.js} +1 -1
  254. package/dist/vega/{p-dc7b70e9.entry.js → p-eae914b0.entry.js} +1 -1
  255. package/dist/vega/{p-df272c95.entry.js → p-ed569397.entry.js} +1 -1
  256. package/dist/vega/{p-bbbc0126.js → p-f0e9c75e.js} +1 -1
  257. package/dist/vega/{p-7a63a63c.entry.js → p-f4fd6f84.entry.js} +1 -1
  258. package/dist/vega/{p-ba5f6a53.entry.js → p-f8f056db.entry.js} +1 -1
  259. package/dist/vega/{p-24431cf0.entry.js → p-fb48539c.entry.js} +1 -1
  260. package/dist/vega/p-ffca3a50.entry.js +1 -0
  261. package/dist/vega/vega.esm.js +1 -1
  262. package/package.json +1 -1
  263. package/dist/vega/p-0eed617a.js +0 -1
  264. package/dist/vega/p-139f735b.entry.js +0 -1
  265. package/dist/vega/p-166e7211.entry.js +0 -1
  266. package/dist/vega/p-2ade4dd9.js +0 -1
  267. package/dist/vega/p-378feb27.entry.js +0 -1
  268. package/dist/vega/p-40ef693f.entry.js +0 -1
  269. package/dist/vega/p-49604637.entry.js +0 -1
  270. package/dist/vega/p-497c8b0f.entry.js +0 -1
  271. package/dist/vega/p-8876b776.js +0 -1
  272. package/dist/vega/p-9060b003.js +0 -1
  273. package/dist/vega/p-9aa54f7e.entry.js +0 -1
  274. package/dist/vega/p-a49d0f17.entry.js +0 -1
  275. package/dist/vega/p-a66b60c4.js +0 -1
  276. package/dist/vega/p-a685c7da.entry.js +0 -1
  277. package/dist/vega/p-a907df7a.entry.js +0 -1
  278. package/dist/vega/p-ab75d371.js +0 -1
  279. package/dist/vega/p-c3cb20ef.js +0 -1
  280. package/dist/vega/p-d920b18c.js +0 -1
  281. package/dist/vega/p-fa4552a1.entry.js +0 -1
  282. /package/dist/cjs/{feature-flag-controller-ccf4a113.js → feature-flag-controller-075fa683.js} +0 -0
  283. /package/dist/esm/{feature-flag-controller-723f1ff5.js → feature-flag-controller-690eac1d.js} +0 -0
  284. /package/dist/vega/{p-03b8af98.js → p-1e940ce8.js} +0 -0
@@ -1 +1 @@
1
- import{h as t}from"./p-1c298d5a.js";import{c as e,V as o}from"./p-6e1ab235.js";import{D as s}from"./p-59c9de55.js";import{a as r,L as i,M as n,f as c}from"./p-c8408c13.js";import{V as l}from"./p-b54328c6.js";import{T as h,l as a,k as u,m as p,g as d,i as v,A as f,j as m}from"./p-9060b003.js";var b=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class w extends o{constructor({icon:e,tooltip:o}){super(),this.renderBtn=({showArrowIcon:e,iconColor:o}={})=>{var i;return t("vega-tooltip",{text:this.tooltip.text,placement:["bottom","top"]},t("vega-rich-text-editor-toolbar-button",Object.assign({showArrowIcon:e,icon:this.icon,iconColor:o,ref:t=>{s.addUniqueObserverToNode(t,r,(()=>{this.handleClick()}))},selected:this.isSelected(),disabled:this.isDisabled()},this.preventLostFocus()),null===(i=this.renderSlotContent)||void 0===i?void 0:i.call(this)))},this.handleClick=()=>{"function"==typeof this.onClick&&(this.selectionController.getSelectedNodes().length?this.onClick():this.focusController.focusOnLastTextNode().then((()=>{this.onClick()})))},this.icon=e,this.tooltip=o}setIcon(t){this.icon=t}render(){return"function"==typeof this.renderBtnWrapper?this.renderBtnWrapper(this.renderBtn):this.renderBtn()}isDisabled(){return this.disabled}preventLostFocus(){return{onMouseDown:t=>t.preventDefault()}}}b([e()],w.prototype,"selectionController",void 0),b([e()],w.prototype,"focusController",void 0),b([e()],w.prototype,"disabled",void 0);class C extends h{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new a(this.textColor)}}var g=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class x extends w{constructor(){super({icon:"text",tooltip:{text:"Text Color"}}),this.popoverShow=!1,u.registerCustomDarkModeColor(x.formatDarkModeColor())}static formatDarkModeColor(){return p.reduce(((t,e)=>(e.dark&&(t[`rich-text-editor-${e.key}`]=e.dark),t)),{})}renderSlotContent(){return t("div",{class:{"toolbar-btn-color-preview-box":!0,disabled:this.isDisabled()},style:{backgroundColor:this.getCurrentColor()}})}handlePopoverShowChange(){this.popoverShow=!0}handlePopoverHideChange(){this.popoverShow=!1}renderBtnWrapper(e){return t("vega-popover",{placement:"bottom",alignment:"center",ref:t=>{this.popoverRef=t,s.addUniqueObserverToNode(t,i,this.handlePopoverShowChange.bind(this)),s.addUniqueObserverToNode(t,n,this.handlePopoverHideChange.bind(this))}},t("div",{slot:"popover-content"},e({showArrowIcon:!1})),t("div",Object.assign({slot:"popover",style:{userSelect:"none"}},super.preventLostFocus()),this.renderPopoverContent()))}renderPopoverContent(){return t("vega-color-picker",{isInline:!0,colors:p.map((t=>t[this.isInDarkMode?"dark":"light"])),ref:t=>{s.addUniqueObserverToNode(t,c,this.handleChange.bind(this))},value:this.getCurrentColor()})}async handleChange(t){this.popoverShow&&(this.selectionController.getSelectedNodes().length||await this.focusController.focusOnLastTextNode(),this.selectionController.getSelectedNodes().filter((t=>t instanceof d)).forEach((e=>e.apply(new C(this.matchColor(t.detail).key))))),this.popoverRef.hide()}matchColor(t){return p.find((e=>e[this.isInDarkMode?"dark":"light"]===t))}getCurrentColor(){let t=p[0];const e=this.selectionController.getSelectedNodes();return e.length>1&&(t=this.isSelectedSameColor(e)?this.getTextColor(e[0]):null),1===e.length&&(t=this.getTextColor(e[0])),t?t[this.isInDarkMode?"dark":"light"]:null}isSelected(){return!1}isSelectedSameColor(t){return t.every((e=>this.getTextColor(e).key===this.getTextColor(t[0]).key))}getTextColor(t){var e;return(null===(e=t.getAnnotationByType("TEXT_COLOR"))||void 0===e?void 0:e.textColor)||p[0]}isDisabled(){const t=this.selectionController.getSelectedNodes();return super.isDisabled()||t.some((t=>{var e;return(null===(e=t.getAnnotationByType(v.CODE))||void 0===e?void 0:e.code)||t.getAnnotationByType(v.LINK)||t.getAnnotationByType(v.IMAGE)}))}}l.register({text:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M64 96v32c0 17.7-14.3 32-32 32s-32-14.3-32-32V80C0 53.5 21.5 32 48 32H224 400c26.5 0 48 21.5 48 48v48c0 17.7-14.3 32-32 32s-32-14.3-32-32V96H256l0 320h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H144c-17.7 0-32-14.3-32-32s14.3-32 32-32h48l0-320H64z"/></svg>'}}),g([e()],x.prototype,"host",void 0),g([e()],x.prototype,"isInDarkMode",void 0),g([e()],x.prototype,"selectionController",void 0),g([e()],x.prototype,"focusController",void 0);const j=new class{constructor(){this.textNodeElements=new Map}register(t,e){this.textNodeElements.set(t,e)}getTextNodeElements(){return this.textNodeElements}};class y extends f{constructor(t,e){super(),this.isFlushable=!0,this.size=t,this.alt=e}toAnnotation(){return new m(this.size,this.alt)}}export{y as I,j as T,x as a,w as b}
1
+ import{h as t}from"./p-1c298d5a.js";import{c as e,V as o}from"./p-6e1ab235.js";import{D as s}from"./p-59c9de55.js";import{a as r,L as i,M as n,f as c}from"./p-c8408c13.js";import{V as l}from"./p-b54328c6.js";import{T as h,l as a,k as u,m as p,g as d,i as v,A as f,j as m}from"./p-01d4c679.js";var b=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class w extends o{constructor({icon:e,tooltip:o}){super(),this.renderBtn=({showArrowIcon:e,iconColor:o}={})=>{var i;return t("vega-tooltip",{text:this.tooltip.text,placement:["bottom","top"]},t("vega-rich-text-editor-toolbar-button",Object.assign({showArrowIcon:e,icon:this.icon,iconColor:o,ref:t=>{s.addUniqueObserverToNode(t,r,(()=>{this.handleClick()}))},selected:this.isSelected(),disabled:this.isDisabled()},this.preventLostFocus()),null===(i=this.renderSlotContent)||void 0===i?void 0:i.call(this)))},this.handleClick=()=>{"function"==typeof this.onClick&&(this.selectionController.getSelectedNodes().length?this.onClick():this.focusController.focusOnLastTextNode().then((()=>{this.onClick()})))},this.icon=e,this.tooltip=o}setIcon(t){this.icon=t}render(){return"function"==typeof this.renderBtnWrapper?this.renderBtnWrapper(this.renderBtn):this.renderBtn()}isDisabled(){return this.disabled}preventLostFocus(){return{onMouseDown:t=>t.preventDefault()}}}b([e()],w.prototype,"selectionController",void 0),b([e()],w.prototype,"focusController",void 0),b([e()],w.prototype,"disabled",void 0);class C extends h{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new a(this.textColor)}}var g=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class x extends w{constructor(){super({icon:"text",tooltip:{text:"Text Color"}}),this.popoverShow=!1,u.registerCustomDarkModeColor(x.formatDarkModeColor())}static formatDarkModeColor(){return p.reduce(((t,e)=>(e.dark&&(t[`rich-text-editor-${e.key}`]=e.dark),t)),{})}renderSlotContent(){return t("div",{class:{"toolbar-btn-color-preview-box":!0,disabled:this.isDisabled()},style:{backgroundColor:this.getCurrentColor()}})}handlePopoverShowChange(){this.popoverShow=!0}handlePopoverHideChange(){this.popoverShow=!1}renderBtnWrapper(e){return t("vega-popover",{placement:"bottom",alignment:"center",ref:t=>{this.popoverRef=t,s.addUniqueObserverToNode(t,i,this.handlePopoverShowChange.bind(this)),s.addUniqueObserverToNode(t,n,this.handlePopoverHideChange.bind(this))}},t("div",{slot:"popover-content"},e({showArrowIcon:!1})),t("div",Object.assign({slot:"popover",style:{userSelect:"none"}},super.preventLostFocus()),this.renderPopoverContent()))}renderPopoverContent(){return t("vega-color-picker",{isInline:!0,colors:p.map((t=>t[this.isInDarkMode?"dark":"light"])),ref:t=>{s.addUniqueObserverToNode(t,c,this.handleChange.bind(this))},value:this.getCurrentColor()})}async handleChange(t){this.popoverShow&&(this.selectionController.getSelectedNodes().length||await this.focusController.focusOnLastTextNode(),this.selectionController.getSelectedNodes().filter((t=>t instanceof d)).forEach((e=>e.apply(new C(this.matchColor(t.detail).key))))),this.popoverRef.hide()}matchColor(t){return p.find((e=>e[this.isInDarkMode?"dark":"light"]===t))}getCurrentColor(){let t=p[0];const e=this.selectionController.getSelectedNodes();return e.length>1&&(t=this.isSelectedSameColor(e)?this.getTextColor(e[0]):null),1===e.length&&(t=this.getTextColor(e[0])),t?t[this.isInDarkMode?"dark":"light"]:null}isSelected(){return!1}isSelectedSameColor(t){return t.every((e=>this.getTextColor(e).key===this.getTextColor(t[0]).key))}getTextColor(t){var e;return(null===(e=t.getAnnotationByType("TEXT_COLOR"))||void 0===e?void 0:e.textColor)||p[0]}isDisabled(){const t=this.selectionController.getSelectedNodes();return super.isDisabled()||t.some((t=>{var e;return(null===(e=t.getAnnotationByType(v.CODE))||void 0===e?void 0:e.code)||t.getAnnotationByType(v.LINK)||t.getAnnotationByType(v.IMAGE)}))}}l.register({text:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M64 96v32c0 17.7-14.3 32-32 32s-32-14.3-32-32V80C0 53.5 21.5 32 48 32H224 400c26.5 0 48 21.5 48 48v48c0 17.7-14.3 32-32 32s-32-14.3-32-32V96H256l0 320h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H144c-17.7 0-32-14.3-32-32s14.3-32 32-32h48l0-320H64z"/></svg>'}}),g([e()],x.prototype,"host",void 0),g([e()],x.prototype,"isInDarkMode",void 0),g([e()],x.prototype,"selectionController",void 0),g([e()],x.prototype,"focusController",void 0);const j=new class{constructor(){this.textNodeElements=new Map}register(t,e){this.textNodeElements.set(t,e)}getTextNodeElements(){return this.textNodeElements}};class y extends f{constructor(t,e){super(),this.isFlushable=!0,this.size=t,this.alt=e}toAnnotation(){return new m(this.size,this.alt)}}export{y as I,j as T,x as a,w as b}
@@ -1 +1 @@
1
- import{h as e,r as t,c as i,H as s,g as o}from"./p-1c298d5a.js";import{s as r}from"./p-9b797118.js";import{c as n,V as a,M as l,I as c}from"./p-6e1ab235.js";import{V as h,I as d}from"./p-4387d550.js";import{c as p}from"./p-86194314.js";import{c as f}from"./p-c8f914d2.js";import{O as v,d as b,f as g}from"./p-c8408c13.js";import{C as x}from"./p-2d0d575f.js";import{j as m,C as u,R as w,b as y}from"./p-a247e073.js";import{S as j}from"./p-8876b776.js";import{c as k}from"./p-0eed617a.js";import{f as R}from"./p-bf953152.js";import{C}from"./p-de2e3383.js";import{C as z}from"./p-a02f52b7.js";import{c as S}from"./p-ab75d371.js";import{F as I}from"./p-5c30b476.js";import{R as O}from"./p-280cbcdb.js";import"./p-6a334573.js";import"./p-59c9de55.js";import"./p-619fdde5.js";import"./p-5f377954.js";import"./p-03b8af98.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-d920b18c.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-987fbbd0.js";import"./p-b5f5a5e0.js";import"./p-3647d61d.js";import"./p-262ec334.js";var T=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class V extends a{getSelectorContainerRef(){return this.selectorContainerRef}render(){return e("vega-flex",{"align-items":"start","justify-content":"start",gap:"size-16",class:{"selection-tile":!0,disabled:this.disabled,checked:this.checked,error:this.showError},"aria-label":this.titleText||"No label defined",tabIndex:this.disabled?-1:0,onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:p()},e("div",{class:"vega-flex-grow"},this.renderContent()),this.renderSelect())}renderContent(){return this.hasContentSlot()?e("slot",{name:"content"}):e("vega-flex",{gap:"size-12"},e("vega-flex",{class:"vega-flex-shrink-0"},this.renderPrefixIcon()),e("div",{class:"vega-flex-grow"},this.renderText()))}renderPrefixIcon(){return this.hasPrefixSlot()?e("slot",{name:"prefix"}):this.prefixIcon?e("vega-icon",{icon:this.prefixIcon,size:"size-16",color:this.disabled?"text-secondary":"text-primary",class:"selection-tile-icon"}):void 0}renderText(){return e("vega-flex",{class:"vega-flex-grow",direction:"col","align-items":"start","justify-content":"start"},e("div",{class:"selection-tile-title"},this.titleText),this.note&&e("div",{class:"selection-tile-note"},this.note))}renderSelect(){return e("vega-flex",{"align-items":"start",class:"vega-flex-shrink-0 selection-tile-select",ref:e=>this.selectorContainerRef=e},"checkbox"===this.selectType?this.renderCheckbox():this.renderRadio())}renderCheckbox(){return e("vega-checkbox",{size:"small",disabled:this.disabled,checked:this.checked})}renderRadio(){return e("vega-radio",{size:"small",disabled:this.disabled,checked:this.checked})}hasPrefixSlot(){return null!==this.host.querySelector("[slot=prefix]")}hasContentSlot(){return null!==this.host.querySelector("[slot=content]")}}T([n()],V.prototype,"host",void 0),T([n()],V.prototype,"prefixIcon",void 0),T([n()],V.prototype,"titleText",void 0),T([n()],V.prototype,"note",void 0),T([n()],V.prototype,"selectType",void 0),T([n()],V.prototype,"disabled",void 0),T([n()],V.prototype,"checked",void 0),T([n()],V.prototype,"showError",void 0),T([n()],V.prototype,"checkedController",void 0);var E=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends a{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.checked=e,this.changeEventEmitter.emit(t),x.notify(m,{host:this.host,detail:{checked:e,value:this.value}})}}E([n()],N.prototype,"host",void 0),E([n({writable:!0})],N.prototype,"checked",void 0),E([n()],N.prototype,"changeEventEmitter",void 0),E([n()],N.prototype,"value",void 0);var A=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class F extends j{constructor(){super({parent:"vega-selection-tile-group",subStates:[{subStateName:"selectType",parentStateName:"selectType"},{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}A([n()],F.prototype,"host",void 0),A([n({writable:!0})],F.prototype,"selectType",void 0),A([n({writable:!0})],F.prototype,"disabled",void 0),A([n()],F.prototype,"checked",void 0),A([n()],F.prototype,"value",void 0),A([n()],F.prototype,"checkedController",void 0);var q=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class G extends a{connectedCallback(){this.selectionTileGroup=R(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new v(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),x.register(b.getSubject(this.selectionTileGroup||this.host,k),this.fieldErrorObserver)}disconnectedCallback(){x.unregister(b.getSubject(this.selectionTileGroup,k),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}q([n({writable:!0})],G.prototype,"showError",void 0),q([n()],G.prototype,"host",void 0),q([l("connectedCallback")],G.prototype,"connectedCallback",null),q([l("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var _=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const D=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new V,this.checkedController=new N,this.stateController=new F,this.showErrorController=new G,this.changeEventEmitter=f(D,g),this.checkboxEventPrevent=new C([g],(()=>this.renderer.getSelectorContainerRef())),this.checkboxValueChangeObserver=new z(u,(e=>this.checkedController.onCheck(e.detail))),this.radioValueChangeObserver=new z(w,(e=>{e.detail&&this.checkedController.onCheck(e.detail)})),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.showError=!1,this.titleText="",this.disabled=!1,this.selectType="radio"}render(){return r(e(s,null,this.renderer.render()),this.host)}get host(){return o(this)}};_([d()],D.prototype,"globalSlimmers",void 0),_([c()],D.prototype,"renderer",void 0),_([c()],D.prototype,"checkedController",void 0),_([c()],D.prototype,"stateController",void 0),_([c()],D.prototype,"showErrorController",void 0),_([c()],D.prototype,"changeEventEmitter",void 0),_([c()],D.prototype,"checkboxEventPrevent",void 0),_([c()],D.prototype,"checkboxValueChangeObserver",void 0),_([c()],D.prototype,"radioValueChangeObserver",void 0),_([c()],D.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),D.style=':host{display:block}:host .selection-tile{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));cursor:pointer;margin:1px}:host .selection-tile:not(.disabled):hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled):focus-visible{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .selection-tile:not(.disabled).checked:hover{border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1))}:host .selection-tile:not(.disabled).checked:focus-visible{border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1))}:host .selection-tile:not(.disabled).error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled).error:focus-visible{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .selection-tile.disabled{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));pointer-events:none}:host .selection-tile.disabled .selection-tile-title,:host .selection-tile.disabled .selection-tile-note{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .selection-tile .selection-tile-title{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 .selection-tile .selection-tile-title{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 .selection-tile .selection-tile-title{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 .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .selection-tile .selection-tile-note{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 .selection-tile .selection-tile-note{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 .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .selection-tile .selection-tile-icon{margin-top:4px;margin-bottom:4px}:host .selection-tile .selection-tile-select{height:24px}:host .selection-tile .selection-tile-select vega-checkbox,:host .selection-tile .selection-tile-select vega-radio{margin-top:4px}';var P=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class L extends a{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return this.label&&e("div",{class:"vega-label"},e("label",{"aria-label":this.label},this.label,this.renderRequire()))}renderRequire(){return this.required&&e("span",{class:"vega-require"},"*")}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("vega-flex",{direction:"horizontal"===this.layout?"row":"col",gap:"size-12"},e("slot",{onSlotchange:()=>this.itemsController.syncTileArrayAndValue()})))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([n()],L.prototype,"host",void 0),P([n()],L.prototype,"label",void 0),P([n()],L.prototype,"required",void 0),P([n()],L.prototype,"hint",void 0),P([n()],L.prototype,"layout",void 0),P([n()],L.prototype,"selectType",void 0),P([n()],L.prototype,"itemsController",void 0);var M=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class H extends a{watchValue(){this.changeEventEmitter.emit(this.value),x.notify(y,{host:this.host,detail:this.value})}onSelectionTilesChanged(){"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems()}onSelectionTileChecked(e){"checkbox"===this.selectType?this.setValueFromCheckbox(e):this.setValueFromRadio(e)}setValueFromCheckbox(e){e.checked&&!this.value.includes(e.value)?this.value=[...this.value,e.value]:!e.checked&&this.value.includes(e.value)&&(this.value=[...this.value.filter((t=>t!==e.value))])}setValueFromRadio(e){e.checked&&(this.value=e.value)}setValueFromCheckboxItems(){0===this.value.length&&(this.value=this.itemsController.getSelectionTileArray().filter((e=>e.checked)).map((e=>e.value)))}setValueFromRadioItems(){if(!this.value){const e=this.itemsController.getSelectionTileArray().find((e=>e.checked));e&&(this.value=e.value)}}}M([n()],H.prototype,"host",void 0),M([n({writable:!0})],H.prototype,"value",void 0),M([n()],H.prototype,"selectType",void 0),M([n()],H.prototype,"changeEventEmitter",void 0),M([n()],H.prototype,"itemsController",void 0),M([l("watchValue")],H.prototype,"watchValue",null);var U=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class K extends a{constructor(){super(...arguments),this.selectionTileArray=[]}initSelectionTileArray(){this.syncTileArrayAndValue()}getSelectionTileArray(){return this.selectionTileArray}syncTileArrayAndValue(){this.selectionTileArray=Array.from(this.host.querySelectorAll("vega-selection-tile")),this.valueController.onSelectionTilesChanged()}touchableAreaGetter(){const e="checkbox"===this.selectType?"vega-checkbox":"vega-radio";return this.selectionTileArray.map((t=>t.shadowRoot.querySelector(e).shadowRoot.querySelector("input")))}}U([n()],K.prototype,"host",void 0),U([n()],K.prototype,"selectType",void 0),U([n()],K.prototype,"valueController",void 0),U([l("componentWillLoad")],K.prototype,"initSelectionTileArray",null);var W=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const B=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.itemsController=new K,this.valueController=new H,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new O:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.touchableAreaGetter(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.changeEventEmitter=f(B,g),this.checkboxEventPrevent=new C([g],(()=>this.renderer.getGroupContainerRef())),this.selectionTileChangeObserver=new z(m,(e=>this.valueController.onSelectionTileChecked(e.detail))),this.selectTypeNotifySlimmer=S(B,"selectType","watchSelectType"),this.disabledNotifySlimmer=S(B,"disabled","watchDisabled"),this.valueNotifySlimmer=S(B,"value","watchValue"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.layout="vertical",this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return r(e(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};W([d()],B.prototype,"globalSlimmers",void 0),W([c()],B.prototype,"renderer",void 0),W([c()],B.prototype,"itemsController",void 0),W([c()],B.prototype,"valueController",void 0),W([c()],B.prototype,"formFieldController",void 0),W([c()],B.prototype,"changeEventEmitter",void 0),W([c()],B.prototype,"checkboxEventPrevent",void 0),W([c()],B.prototype,"selectionTileChangeObserver",void 0),W([c()],B.prototype,"selectTypeNotifySlimmer",void 0),W([c()],B.prototype,"disabledNotifySlimmer",void 0),W([c()],B.prototype,"valueNotifySlimmer",void 0),W([c()],B.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),B.style=':host{display:block;text-align:left;line-height:normal}:host .vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;margin-bottom:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-label{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){:host .vega-label{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){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-label label{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host .vega-label .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:12px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{D as vega_selection_tile,B as vega_selection_tile_group}
1
+ import{h as e,r as t,c as i,H as s,g as o}from"./p-1c298d5a.js";import{s as r}from"./p-9b797118.js";import{c as n,V as a,M as l,I as c}from"./p-6e1ab235.js";import{V as h,I as d}from"./p-4387d550.js";import{c as p}from"./p-86194314.js";import{c as f}from"./p-c8f914d2.js";import{O as v,d as b,f as g}from"./p-c8408c13.js";import{C as x}from"./p-2d0d575f.js";import{j as m,C as u,R as w,b as y}from"./p-a247e073.js";import{S as j}from"./p-27192960.js";import{c as k}from"./p-e06361df.js";import{f as R}from"./p-bf953152.js";import{C}from"./p-179887da.js";import{C as z}from"./p-a02f52b7.js";import{c as S}from"./p-c66b55f8.js";import{F as I}from"./p-cd53bde4.js";import{R as O}from"./p-280cbcdb.js";import"./p-6a334573.js";import"./p-59c9de55.js";import"./p-619fdde5.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-02603c02.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-987fbbd0.js";import"./p-b5f5a5e0.js";import"./p-3647d61d.js";import"./p-262ec334.js";var T=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class V extends a{getSelectorContainerRef(){return this.selectorContainerRef}render(){return e("vega-flex",{"align-items":"start","justify-content":"start",gap:"size-16",class:{"selection-tile":!0,disabled:this.disabled,checked:this.checked,error:this.showError},"aria-label":this.titleText||"No label defined",tabIndex:this.disabled?-1:0,onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:p()},e("div",{class:"vega-flex-grow"},this.renderContent()),this.renderSelect())}renderContent(){return this.hasContentSlot()?e("slot",{name:"content"}):e("vega-flex",{gap:"size-12"},e("vega-flex",{class:"vega-flex-shrink-0"},this.renderPrefixIcon()),e("div",{class:"vega-flex-grow"},this.renderText()))}renderPrefixIcon(){return this.hasPrefixSlot()?e("slot",{name:"prefix"}):this.prefixIcon?e("vega-icon",{icon:this.prefixIcon,size:"size-16",color:this.disabled?"text-secondary":"text-primary",class:"selection-tile-icon"}):void 0}renderText(){return e("vega-flex",{class:"vega-flex-grow",direction:"col","align-items":"start","justify-content":"start"},e("div",{class:"selection-tile-title"},this.titleText),this.note&&e("div",{class:"selection-tile-note"},this.note))}renderSelect(){return e("vega-flex",{"align-items":"start",class:"vega-flex-shrink-0 selection-tile-select",ref:e=>this.selectorContainerRef=e},"checkbox"===this.selectType?this.renderCheckbox():this.renderRadio())}renderCheckbox(){return e("vega-checkbox",{size:"small",disabled:this.disabled,checked:this.checked})}renderRadio(){return e("vega-radio",{size:"small",disabled:this.disabled,checked:this.checked})}hasPrefixSlot(){return null!==this.host.querySelector("[slot=prefix]")}hasContentSlot(){return null!==this.host.querySelector("[slot=content]")}}T([n()],V.prototype,"host",void 0),T([n()],V.prototype,"prefixIcon",void 0),T([n()],V.prototype,"titleText",void 0),T([n()],V.prototype,"note",void 0),T([n()],V.prototype,"selectType",void 0),T([n()],V.prototype,"disabled",void 0),T([n()],V.prototype,"checked",void 0),T([n()],V.prototype,"showError",void 0),T([n()],V.prototype,"checkedController",void 0);var E=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends a{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.checked=e,this.changeEventEmitter.emit(t),x.notify(m,{host:this.host,detail:{checked:e,value:this.value}})}}E([n()],N.prototype,"host",void 0),E([n({writable:!0})],N.prototype,"checked",void 0),E([n()],N.prototype,"changeEventEmitter",void 0),E([n()],N.prototype,"value",void 0);var A=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class F extends j{constructor(){super({parent:"vega-selection-tile-group",subStates:[{subStateName:"selectType",parentStateName:"selectType"},{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}A([n()],F.prototype,"host",void 0),A([n({writable:!0})],F.prototype,"selectType",void 0),A([n({writable:!0})],F.prototype,"disabled",void 0),A([n()],F.prototype,"checked",void 0),A([n()],F.prototype,"value",void 0),A([n()],F.prototype,"checkedController",void 0);var q=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class G extends a{connectedCallback(){this.selectionTileGroup=R(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new v(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),x.register(b.getSubject(this.selectionTileGroup||this.host,k),this.fieldErrorObserver)}disconnectedCallback(){x.unregister(b.getSubject(this.selectionTileGroup,k),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}q([n({writable:!0})],G.prototype,"showError",void 0),q([n()],G.prototype,"host",void 0),q([l("connectedCallback")],G.prototype,"connectedCallback",null),q([l("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var _=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const D=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new V,this.checkedController=new N,this.stateController=new F,this.showErrorController=new G,this.changeEventEmitter=f(D,g),this.checkboxEventPrevent=new C([g],(()=>this.renderer.getSelectorContainerRef())),this.checkboxValueChangeObserver=new z(u,(e=>this.checkedController.onCheck(e.detail))),this.radioValueChangeObserver=new z(w,(e=>{e.detail&&this.checkedController.onCheck(e.detail)})),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.showError=!1,this.titleText="",this.disabled=!1,this.selectType="radio"}render(){return r(e(s,null,this.renderer.render()),this.host)}get host(){return o(this)}};_([d()],D.prototype,"globalSlimmers",void 0),_([c()],D.prototype,"renderer",void 0),_([c()],D.prototype,"checkedController",void 0),_([c()],D.prototype,"stateController",void 0),_([c()],D.prototype,"showErrorController",void 0),_([c()],D.prototype,"changeEventEmitter",void 0),_([c()],D.prototype,"checkboxEventPrevent",void 0),_([c()],D.prototype,"checkboxValueChangeObserver",void 0),_([c()],D.prototype,"radioValueChangeObserver",void 0),_([c()],D.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),D.style=':host{display:block}:host .selection-tile{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));cursor:pointer;margin:1px}:host .selection-tile:not(.disabled):hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled):focus-visible{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .selection-tile:not(.disabled).checked:hover{border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1))}:host .selection-tile:not(.disabled).checked:focus-visible{border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .selection-tile:not(.disabled).error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1))}:host .selection-tile:not(.disabled).error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1))}:host .selection-tile:not(.disabled).error:focus-visible{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .selection-tile.disabled{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));pointer-events:none}:host .selection-tile.disabled .selection-tile-title,:host .selection-tile.disabled .selection-tile-note{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .selection-tile .selection-tile-title{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 .selection-tile .selection-tile-title{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 .selection-tile .selection-tile-title{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 .selection-tile .selection-tile-title{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .selection-tile .selection-tile-note{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 .selection-tile .selection-tile-note{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 .selection-tile .selection-tile-note{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .selection-tile .selection-tile-icon{margin-top:4px;margin-bottom:4px}:host .selection-tile .selection-tile-select{height:24px}:host .selection-tile .selection-tile-select vega-checkbox,:host .selection-tile .selection-tile-select vega-radio{margin-top:4px}';var P=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class L extends a{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return this.label&&e("div",{class:"vega-label"},e("label",{"aria-label":this.label},this.label,this.renderRequire()))}renderRequire(){return this.required&&e("span",{class:"vega-require"},"*")}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("vega-flex",{direction:"horizontal"===this.layout?"row":"col",gap:"size-12"},e("slot",{onSlotchange:()=>this.itemsController.syncTileArrayAndValue()})))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([n()],L.prototype,"host",void 0),P([n()],L.prototype,"label",void 0),P([n()],L.prototype,"required",void 0),P([n()],L.prototype,"hint",void 0),P([n()],L.prototype,"layout",void 0),P([n()],L.prototype,"selectType",void 0),P([n()],L.prototype,"itemsController",void 0);var M=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class H extends a{watchValue(){this.changeEventEmitter.emit(this.value),x.notify(y,{host:this.host,detail:this.value})}onSelectionTilesChanged(){"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems()}onSelectionTileChecked(e){"checkbox"===this.selectType?this.setValueFromCheckbox(e):this.setValueFromRadio(e)}setValueFromCheckbox(e){e.checked&&!this.value.includes(e.value)?this.value=[...this.value,e.value]:!e.checked&&this.value.includes(e.value)&&(this.value=[...this.value.filter((t=>t!==e.value))])}setValueFromRadio(e){e.checked&&(this.value=e.value)}setValueFromCheckboxItems(){0===this.value.length&&(this.value=this.itemsController.getSelectionTileArray().filter((e=>e.checked)).map((e=>e.value)))}setValueFromRadioItems(){if(!this.value){const e=this.itemsController.getSelectionTileArray().find((e=>e.checked));e&&(this.value=e.value)}}}M([n()],H.prototype,"host",void 0),M([n({writable:!0})],H.prototype,"value",void 0),M([n()],H.prototype,"selectType",void 0),M([n()],H.prototype,"changeEventEmitter",void 0),M([n()],H.prototype,"itemsController",void 0),M([l("watchValue")],H.prototype,"watchValue",null);var U=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class K extends a{constructor(){super(...arguments),this.selectionTileArray=[]}initSelectionTileArray(){this.syncTileArrayAndValue()}getSelectionTileArray(){return this.selectionTileArray}syncTileArrayAndValue(){this.selectionTileArray=Array.from(this.host.querySelectorAll("vega-selection-tile")),this.valueController.onSelectionTilesChanged()}touchableAreaGetter(){const e="checkbox"===this.selectType?"vega-checkbox":"vega-radio";return this.selectionTileArray.map((t=>t.shadowRoot.querySelector(e).shadowRoot.querySelector("input")))}}U([n()],K.prototype,"host",void 0),U([n()],K.prototype,"selectType",void 0),U([n()],K.prototype,"valueController",void 0),U([l("componentWillLoad")],K.prototype,"initSelectionTileArray",null);var W=function(e,t,i,s){var o,r=arguments.length,n=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(r<3?o(n):r>3?o(t,i,n):o(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const B=class{constructor(e){t(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.itemsController=new K,this.valueController=new H,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new O:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.touchableAreaGetter(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.changeEventEmitter=f(B,g),this.checkboxEventPrevent=new C([g],(()=>this.renderer.getGroupContainerRef())),this.selectionTileChangeObserver=new z(m,(e=>this.valueController.onSelectionTileChecked(e.detail))),this.selectTypeNotifySlimmer=S(B,"selectType","watchSelectType"),this.disabledNotifySlimmer=S(B,"disabled","watchDisabled"),this.valueNotifySlimmer=S(B,"value","watchValue"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.layout="vertical",this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return r(e(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};W([d()],B.prototype,"globalSlimmers",void 0),W([c()],B.prototype,"renderer",void 0),W([c()],B.prototype,"itemsController",void 0),W([c()],B.prototype,"valueController",void 0),W([c()],B.prototype,"formFieldController",void 0),W([c()],B.prototype,"changeEventEmitter",void 0),W([c()],B.prototype,"checkboxEventPrevent",void 0),W([c()],B.prototype,"selectionTileChangeObserver",void 0),W([c()],B.prototype,"selectTypeNotifySlimmer",void 0),W([c()],B.prototype,"disabledNotifySlimmer",void 0),W([c()],B.prototype,"valueNotifySlimmer",void 0),W([c()],B.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),B.style=':host{display:block;text-align:left;line-height:normal}:host .vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;margin-bottom:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-label{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){:host .vega-label{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){:host .vega-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host .vega-label label{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host .vega-label .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:12px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{D as vega_selection_tile,B as vega_selection_tile_group}
@@ -0,0 +1 @@
1
+ import{V as t}from"./p-6e1ab235.js";import{c as s}from"./p-6a334573.js";import{C as a}from"./p-2d0d575f.js";import{O as o,d as e}from"./p-c8408c13.js";import{i,h as m}from"./p-e06361df.js";class p extends t{constructor({propName:t}){super(),this.isAcceptableObserverPayload=t=>t.host===this.host&&t.stateName===this.propName,this.propName=t}connectedCallback(){this.subStateObserver=new o(this.isAcceptableObserverPayload.bind(this),(t=>{t.callback(this.propValue)})),a.register(e.getSubject(this.host,i),this.subStateObserver)}disconnectedCallback(){a.unregister(e.getSubject(this.host,i),this.subStateObserver)}subStateNotify(){a.notify(e.getSubject(this.host,m),{host:this.host,stateName:this.propName,value:this.propValue})}}function c(t,a,o){const e=[{mapFrom:"connectedCallback",mapTo:"connectedCallback"},{mapFrom:"disconnectedCallback",mapTo:"disconnectedCallback"}];return o&&e.push({mapFrom:o,mapTo:"subStateNotify"}),s(t,p,[{mapFrom:"host",mapTo:"host"},{mapFrom:a,mapTo:"propValue"}],e,[{propName:a}])}export{c}
@@ -1 +1 @@
1
- import{h as e,F as t,H as i,r as o,c as a,g as r}from"./p-1c298d5a.js";import{R as n}from"./p-280cbcdb.js";import{g as s,s as d}from"./p-9b797118.js";import{N as p,O as c}from"./p-b1f65b13.js";import{c as l,M as h,V as b,I as f}from"./p-6e1ab235.js";import{V as m,I as v}from"./p-4387d550.js";import{F as g}from"./p-5c30b476.js";import{C as x}from"./p-de2e3383.js";import{c as u}from"./p-c8f914d2.js";import{k as w,n as y,b as j,c as R,f as I,l as C}from"./p-c8408c13.js";import{b as k}from"./p-a247e073.js";import{C as O}from"./p-2d0d575f.js";import{c as D}from"./p-86194314.js";import{D as S}from"./p-59c9de55.js";import{e as z}from"./p-0eed617a.js";import{K as E}from"./p-80c86d79.js";import{f as A}from"./p-bf953152.js";import{M as V}from"./p-987fbbd0.js";import{T as L}from"./p-b5f5a5e0.js";import"./p-abd7aeaa.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-d920b18c.js";import"./p-c0291e2e.js";import"./p-3647d61d.js";import"./p-262ec334.js";import"./p-619fdde5.js";import"./p-5f377954.js";import"./p-03b8af98.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-2e65e175.js";const T=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!1===e.autoValidation}];var F=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends b{constructor(){super(...arguments),this.onItemClick=async()=>{this.valueController.setValue(await this.dropdownRef.getSelection()),await this.clearInput()},this.onDropdownHide=async()=>{await this.clearInput()},this.onDropdownCreate=async e=>{this.createEventEmit.emit(e),await this.clearInput()},this.onInputChange=async e=>{const t=e.target.value;(this.useDefaultFilter||this.vegaDropdownProps.dynamicOption)&&(await this.dropdownRef.show(),await this.dropdownRef.search(t)),!this.isTemplateMode&&this.useDefaultFilter||this.searchEventEmit.emit(t)}}connectedCallback(){this.isTemplateMode=null!==this.host.querySelector("[slot=items]")}getDropdownRef(){return this.dropdownRef}getSearchInputRef(){return this.searchInputRef}focusInput(){this.searchInputRef.focus()}async hide(){await this.dropdownRef.hide()}async show(){await this.dropdownRef.show()}replaceItemsSlot(e){e&&this.itemsSlotRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(e))}renderDropdown(){return e("vega-dropdown",Object.assign({trigger:this.disabled?"none":"click",source:this.source,selectType:"multiple",selectedSourceKey:this.value,matchTargetWidth:!0,useDefaultFilter:this.useDefaultFilter},this.vegaDropdownProps,{ref:e=>{this.dropdownRef=e,S.addUniqueObserverToNode(e,w,(async e=>{await this.onDropdownCreate(e.detail)})),S.addUniqueObserverToNode(e,y,(async()=>{await this.onDropdownHide()})),S.addUniqueObserverToNode(e,j,(async()=>{await this.onItemClick()})),S.addUniqueObserverToNode(e,z,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.key===e.itemKey)))).map((e=>({key:e.itemKey,label:e.label})));this.sourceController.setSource([...this.source,...t])}))}}),this.renderContainer(),this.renderItemsSlot())}renderContainer(){return e("div",{class:{"vega-combo-box-container":!0,[`vega-combo-box-size-${this.size}`]:!0}},this.renderSelectedContainer(),this.renderInputContainer())}renderItemsSlot(){return this.isTemplateMode&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}renderSelectedContainer(){const i=this.value.map((e=>this.source.find((t=>t.key===e)))).filter((e=>e));return e(t,null,i.map((e=>this.renderSelectedChip(e))))}renderSelectedChip(t){return e("vega-chip",{key:t.key,text:t.label,variant:"outlined",showCloseIcon:!this.disabled,size:"small",ref:e=>{S.addUniqueObserverToNode(e,R,(async()=>{await this.onChipClose(t.key)}))}})}renderInputContainer(){return e("div",{class:"vega-combo-box-input-container"},e("input",{onInput:this.onInputChange,"aria-label":this.label||"No label defined",placeholder:0===this.value.length?this.placeholder:"",ref:e=>this.searchInputRef=e,onKeyDown:D(),disabled:this.disabled}))}async onChipClose(e){this.valueController.setValue([...this.value.filter((t=>t!==e))]),await this.dropdownRef.hide()}async clearInput(){this.searchInputRef.value="",await this.dropdownRef.search("")}}F([l()],N.prototype,"host",void 0),F([l()],N.prototype,"value",void 0),F([l()],N.prototype,"source",void 0),F([l()],N.prototype,"disabled",void 0),F([l()],N.prototype,"size",void 0),F([l()],N.prototype,"vegaDropdownProps",void 0),F([l()],N.prototype,"label",void 0),F([l()],N.prototype,"placeholder",void 0),F([l()],N.prototype,"useDefaultFilter",void 0),F([l()],N.prototype,"createEventEmit",void 0),F([l()],N.prototype,"searchEventEmit",void 0),F([l()],N.prototype,"valueController",void 0),F([l()],N.prototype,"sourceController",void 0),F([h("connectedCallback")],N.prototype,"connectedCallback",null);class _ extends b{setValue(e){this.value=e}}!function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);r>3&&n&&Object.defineProperty(t,i,n)}([l({writable:!0})],_.prototype,"value",void 0);var K=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class G extends b{constructor(){super(...arguments),this.onLabelClick=()=>{this.dropdownRenderer.focusInput()}}render(){return e(i,{class:{"vega-combo-box-disabled":this.disabled}},this.renderLabel(),this.dropdownRenderer.renderDropdown(),this.renderHint())}renderLabel(){return e("vega-field-label",{onClick:this.onLabelClick,"is-field-required":this.required,disabled:this.disabled,label:this.label})}renderHint(){return e("div",{class:"vega-combo-box-hint"},this.hint)}}K([l()],G.prototype,"required",void 0),K([l()],G.prototype,"hint",void 0),K([l()],G.prototype,"disabled",void 0),K([l()],G.prototype,"dropdownRenderer",void 0),K([l()],G.prototype,"label",void 0);var H=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class M extends E{constructor(){super((e=>[{keyCode:"Backspace",activeElementInScope:[e.dropdownRenderer.getSearchInputRef()],eventName:"keydown",callback:e.deleteLastSelectedItem},{keyCode:"ArrowLeft",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowLeft")},{keyCode:"ArrowRight",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowRight")}])),this.deleteLastSelectedItem=()=>{""===this.dropdownRenderer.getSearchInputRef().value&&(this.value.pop(),this.valueController.setValue([...this.value]))}}controlDirectionByKeyboard(e){const t=s();if(t&&t.classList.contains("vega-chip-close-icon")){const i=A(t,"vega-chip");"ArrowLeft"===e&&this.focusItemByKeyboard(i.previousSibling),"ArrowRight"===e&&this.focusItemByKeyboard(i.nextSibling)}else"ArrowLeft"===e&&0===this.dropdownRenderer.getSearchInputRef().selectionStart&&this.focusItemByKeyboard(this.host.shadowRoot.querySelector("vega-chip:last-of-type"))}focusItemByKeyboard(e){e&&(e.classList.contains("vega-combo-box-input-container")?e.querySelector("input").focus():e.shadowRoot.querySelector(".vega-chip-close-icon").focus())}}H([l()],M.prototype,"host",void 0),H([l()],M.prototype,"value",void 0),H([l()],M.prototype,"dropdownRenderer",void 0),H([l()],M.prototype,"valueController",void 0);var P=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class U extends b{constructor(){super(...arguments),this.mutationObserver=new V({mutationFilter:L("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){this.dropdownRenderer.replaceItemsSlot(this.host.querySelector("[slot=items]"))}}P([f()],U.prototype,"mutationObserver",void 0),P([l()],U.prototype,"host",void 0),P([l()],U.prototype,"dropdownRenderer",void 0),P([h("componentDidLoad")],U.prototype,"componentDidLoad",null);class q extends b{setSource(e){this.source=e}}!function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);r>3&&n&&Object.defineProperty(t,i,n)}([l({writable:!0})],q.prototype,"source",void 0);var B=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const W=class{constructor(e){o(this,e),this.vegaChange=a(this,"vegaChange",7),this.change=a(this,"change",7),this.vegaCreate=a(this,"vegaCreate",7),this.create=a(this,"create",7),this.vegaSearch=a(this,"vegaSearch",7),this.search=a(this,"search",7),this.globalSlimmers={},this.itemsSlotController=new U,this.keyboardController=new M,this.valueController=new _,this.sourceController=new q,this.renderer=new G,this.dropdownRenderer=new N,this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new n:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.dropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.dropdownRenderer.getSearchInputRef()]}),this.changeEventEmit=u(W,I),this.createEventEmit=u(W,w),this.searchEventEmit=u(W,C),this.dropdownEventPrevent=new x([w,C],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopImmediatePropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(T),this.label="",this.required=!1,this.source=[],this.value=[],this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="",this.hint="",this.size="medium",this.vegaDropdownProps={},this.useDefaultFilter=!0}watchSource(){this.source=p(this.source,c)?this.source:[]}watchValue(){this.changeEventEmit.emit(this.value),O.notify(k,{host:this.host,detail:this.value})}watchValidationRules(){}async close(){this.disabled||await this.dropdownRenderer.hide()}async open(){this.disabled||await this.dropdownRenderer.show()}render(){return d(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"]}}};B([v()],W.prototype,"globalSlimmers",void 0),B([f()],W.prototype,"itemsSlotController",void 0),B([f()],W.prototype,"keyboardController",void 0),B([f()],W.prototype,"valueController",void 0),B([f()],W.prototype,"sourceController",void 0),B([f()],W.prototype,"renderer",void 0),B([f()],W.prototype,"dropdownRenderer",void 0),B([f()],W.prototype,"formFieldController",void 0),B([f()],W.prototype,"changeEventEmit",void 0),B([f()],W.prototype,"createEventEmit",void 0),B([f()],W.prototype,"searchEventEmit",void 0),B([f()],W.prototype,"dropdownEventPrevent",void 0),B([f()],W.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),W.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}.vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border-radius:8px;gap:8px;display:block;display:flex;flex-wrap:wrap;align-items:center;cursor:pointer}.vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}.vega-combo-box-container .vega-combo-box-input-container{width:-webkit-min-content;width:-moz-min-content;width:min-content;flex-grow:1}.vega-combo-box-container input{border-style:none;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));width:100%}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-combo-box-container input:focus{outline:2px solid transparent;outline-offset:2px}.vega-combo-box-size-medium{padding-left:12px;padding-right:12px;padding-top:11px;padding-bottom:11px}.vega-combo-box-size-small{padding-left:12px;padding-right:12px;padding-top:7px;padding-bottom:7px}.vega-combo-box-container:focus{outline:none}vega-field-label{margin-bottom:8px}.error .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.error .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.error .vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25))}:host(.vega-combo-box-disabled) .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-combo-box-disabled) .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-combo-box-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-combo-box-container input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-combo-box-hint{padding-left:8px;padding-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error:not(.vega-hidden)+.vega-combo-box-hint{padding-top:4px}vega-dropdown{display:block}';export{W as vega_combo_box}
1
+ import{h as e,F as t,H as i,r as o,c as a,g as r}from"./p-1c298d5a.js";import{R as n}from"./p-280cbcdb.js";import{g as s,s as d}from"./p-9b797118.js";import{N as p,O as c}from"./p-b1f65b13.js";import{c as l,M as h,V as b,I as f}from"./p-6e1ab235.js";import{V as m,I as v}from"./p-4387d550.js";import{F as g}from"./p-cd53bde4.js";import{C as x}from"./p-179887da.js";import{c as u}from"./p-c8f914d2.js";import{k as w,n as y,b as j,c as R,f as I,l as C}from"./p-c8408c13.js";import{b as k}from"./p-a247e073.js";import{C as O}from"./p-2d0d575f.js";import{c as D}from"./p-86194314.js";import{D as S}from"./p-59c9de55.js";import{e as z}from"./p-e06361df.js";import{K as E}from"./p-80c86d79.js";import{f as A}from"./p-bf953152.js";import{M as V}from"./p-987fbbd0.js";import{T as L}from"./p-b5f5a5e0.js";import"./p-abd7aeaa.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-02603c02.js";import"./p-c0291e2e.js";import"./p-3647d61d.js";import"./p-262ec334.js";import"./p-619fdde5.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-2e65e175.js";const T=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!1===e.autoValidation}];var F=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends b{constructor(){super(...arguments),this.onItemClick=async()=>{this.valueController.setValue(await this.dropdownRef.getSelection()),await this.clearInput()},this.onDropdownHide=async()=>{await this.clearInput()},this.onDropdownCreate=async e=>{this.createEventEmit.emit(e),await this.clearInput()},this.onInputChange=async e=>{const t=e.target.value;(this.useDefaultFilter||this.vegaDropdownProps.dynamicOption)&&(await this.dropdownRef.show(),await this.dropdownRef.search(t)),!this.isTemplateMode&&this.useDefaultFilter||this.searchEventEmit.emit(t)}}connectedCallback(){this.isTemplateMode=null!==this.host.querySelector("[slot=items]")}getDropdownRef(){return this.dropdownRef}getSearchInputRef(){return this.searchInputRef}focusInput(){this.searchInputRef.focus()}async hide(){await this.dropdownRef.hide()}async show(){await this.dropdownRef.show()}replaceItemsSlot(e){e&&this.itemsSlotRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(e))}renderDropdown(){return e("vega-dropdown",Object.assign({trigger:this.disabled?"none":"click",source:this.source,selectType:"multiple",selectedSourceKey:this.value,matchTargetWidth:!0,useDefaultFilter:this.useDefaultFilter},this.vegaDropdownProps,{ref:e=>{this.dropdownRef=e,S.addUniqueObserverToNode(e,w,(async e=>{await this.onDropdownCreate(e.detail)})),S.addUniqueObserverToNode(e,y,(async()=>{await this.onDropdownHide()})),S.addUniqueObserverToNode(e,j,(async()=>{await this.onItemClick()})),S.addUniqueObserverToNode(e,z,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.key===e.itemKey)))).map((e=>({key:e.itemKey,label:e.label})));this.sourceController.setSource([...this.source,...t])}))}}),this.renderContainer(),this.renderItemsSlot())}renderContainer(){return e("div",{class:{"vega-combo-box-container":!0,[`vega-combo-box-size-${this.size}`]:!0}},this.renderSelectedContainer(),this.renderInputContainer())}renderItemsSlot(){return this.isTemplateMode&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}renderSelectedContainer(){const i=this.value.map((e=>this.source.find((t=>t.key===e)))).filter((e=>e));return e(t,null,i.map((e=>this.renderSelectedChip(e))))}renderSelectedChip(t){return e("vega-chip",{key:t.key,text:t.label,variant:"outlined",showCloseIcon:!this.disabled,size:"small",ref:e=>{S.addUniqueObserverToNode(e,R,(async()=>{await this.onChipClose(t.key)}))}})}renderInputContainer(){return e("div",{class:"vega-combo-box-input-container"},e("input",{onInput:this.onInputChange,"aria-label":this.label||"No label defined",placeholder:0===this.value.length?this.placeholder:"",ref:e=>this.searchInputRef=e,onKeyDown:D(),disabled:this.disabled}))}async onChipClose(e){this.valueController.setValue([...this.value.filter((t=>t!==e))]),await this.dropdownRef.hide()}async clearInput(){this.searchInputRef.value="",await this.dropdownRef.search("")}}F([l()],N.prototype,"host",void 0),F([l()],N.prototype,"value",void 0),F([l()],N.prototype,"source",void 0),F([l()],N.prototype,"disabled",void 0),F([l()],N.prototype,"size",void 0),F([l()],N.prototype,"vegaDropdownProps",void 0),F([l()],N.prototype,"label",void 0),F([l()],N.prototype,"placeholder",void 0),F([l()],N.prototype,"useDefaultFilter",void 0),F([l()],N.prototype,"createEventEmit",void 0),F([l()],N.prototype,"searchEventEmit",void 0),F([l()],N.prototype,"valueController",void 0),F([l()],N.prototype,"sourceController",void 0),F([h("connectedCallback")],N.prototype,"connectedCallback",null);class _ extends b{setValue(e){this.value=e}}!function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);r>3&&n&&Object.defineProperty(t,i,n)}([l({writable:!0})],_.prototype,"value",void 0);var K=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class G extends b{constructor(){super(...arguments),this.onLabelClick=()=>{this.dropdownRenderer.focusInput()}}render(){return e(i,{class:{"vega-combo-box-disabled":this.disabled}},this.renderLabel(),this.dropdownRenderer.renderDropdown(),this.renderHint())}renderLabel(){return e("vega-field-label",{onClick:this.onLabelClick,"is-field-required":this.required,disabled:this.disabled,label:this.label})}renderHint(){return e("div",{class:"vega-combo-box-hint"},this.hint)}}K([l()],G.prototype,"required",void 0),K([l()],G.prototype,"hint",void 0),K([l()],G.prototype,"disabled",void 0),K([l()],G.prototype,"dropdownRenderer",void 0),K([l()],G.prototype,"label",void 0);var H=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class M extends E{constructor(){super((e=>[{keyCode:"Backspace",activeElementInScope:[e.dropdownRenderer.getSearchInputRef()],eventName:"keydown",callback:e.deleteLastSelectedItem},{keyCode:"ArrowLeft",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowLeft")},{keyCode:"ArrowRight",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowRight")}])),this.deleteLastSelectedItem=()=>{""===this.dropdownRenderer.getSearchInputRef().value&&(this.value.pop(),this.valueController.setValue([...this.value]))}}controlDirectionByKeyboard(e){const t=s();if(t&&t.classList.contains("vega-chip-close-icon")){const i=A(t,"vega-chip");"ArrowLeft"===e&&this.focusItemByKeyboard(i.previousSibling),"ArrowRight"===e&&this.focusItemByKeyboard(i.nextSibling)}else"ArrowLeft"===e&&0===this.dropdownRenderer.getSearchInputRef().selectionStart&&this.focusItemByKeyboard(this.host.shadowRoot.querySelector("vega-chip:last-of-type"))}focusItemByKeyboard(e){e&&(e.classList.contains("vega-combo-box-input-container")?e.querySelector("input").focus():e.shadowRoot.querySelector(".vega-chip-close-icon").focus())}}H([l()],M.prototype,"host",void 0),H([l()],M.prototype,"value",void 0),H([l()],M.prototype,"dropdownRenderer",void 0),H([l()],M.prototype,"valueController",void 0);var P=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class U extends b{constructor(){super(...arguments),this.mutationObserver=new V({mutationFilter:L("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){this.dropdownRenderer.replaceItemsSlot(this.host.querySelector("[slot=items]"))}}P([f()],U.prototype,"mutationObserver",void 0),P([l()],U.prototype,"host",void 0),P([l()],U.prototype,"dropdownRenderer",void 0),P([h("componentDidLoad")],U.prototype,"componentDidLoad",null);class q extends b{setSource(e){this.source=e}}!function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);r>3&&n&&Object.defineProperty(t,i,n)}([l({writable:!0})],q.prototype,"source",void 0);var B=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const W=class{constructor(e){o(this,e),this.vegaChange=a(this,"vegaChange",7),this.change=a(this,"change",7),this.vegaCreate=a(this,"vegaCreate",7),this.create=a(this,"create",7),this.vegaSearch=a(this,"vegaSearch",7),this.search=a(this,"search",7),this.globalSlimmers={},this.itemsSlotController=new U,this.keyboardController=new M,this.valueController=new _,this.sourceController=new q,this.renderer=new G,this.dropdownRenderer=new N,this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new n:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.dropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.dropdownRenderer.getSearchInputRef()]}),this.changeEventEmit=u(W,I),this.createEventEmit=u(W,w),this.searchEventEmit=u(W,C),this.dropdownEventPrevent=new x([w,C],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopImmediatePropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(T),this.label="",this.required=!1,this.source=[],this.value=[],this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="",this.hint="",this.size="medium",this.vegaDropdownProps={},this.useDefaultFilter=!0}watchSource(){this.source=p(this.source,c)?this.source:[]}watchValue(){this.changeEventEmit.emit(this.value),O.notify(k,{host:this.host,detail:this.value})}watchValidationRules(){}async close(){this.disabled||await this.dropdownRenderer.hide()}async open(){this.disabled||await this.dropdownRenderer.show()}render(){return d(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"]}}};B([v()],W.prototype,"globalSlimmers",void 0),B([f()],W.prototype,"itemsSlotController",void 0),B([f()],W.prototype,"keyboardController",void 0),B([f()],W.prototype,"valueController",void 0),B([f()],W.prototype,"sourceController",void 0),B([f()],W.prototype,"renderer",void 0),B([f()],W.prototype,"dropdownRenderer",void 0),B([f()],W.prototype,"formFieldController",void 0),B([f()],W.prototype,"changeEventEmit",void 0),B([f()],W.prototype,"createEventEmit",void 0),B([f()],W.prototype,"searchEventEmit",void 0),B([f()],W.prototype,"dropdownEventPrevent",void 0),B([f()],W.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),W.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}.vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border-radius:8px;gap:8px;display:block;display:flex;flex-wrap:wrap;align-items:center;cursor:pointer}.vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}.vega-combo-box-container .vega-combo-box-input-container{width:-webkit-min-content;width:-moz-min-content;width:min-content;flex-grow:1}.vega-combo-box-container input{border-style:none;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));width:100%}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-combo-box-container input:focus{outline:2px solid transparent;outline-offset:2px}.vega-combo-box-size-medium{padding-left:12px;padding-right:12px;padding-top:11px;padding-bottom:11px}.vega-combo-box-size-small{padding-left:12px;padding-right:12px;padding-top:7px;padding-bottom:7px}.vega-combo-box-container:focus{outline:none}vega-field-label{margin-bottom:8px}.error .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.error .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.error .vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25))}:host(.vega-combo-box-disabled) .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-combo-box-disabled) .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-combo-box-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-combo-box-container input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-combo-box-hint{padding-left:8px;padding-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error:not(.vega-hidden)+.vega-combo-box-hint{padding-top:4px}vega-dropdown{display:block}';export{W as vega_combo_box}
@@ -1 +1 @@
1
- import{h as e,F as i,r as t,c as r,H as n,g as a}from"./p-1c298d5a.js";import{s as o}from"./p-9b797118.js";import{c as s,V as p,M as l,I as d}from"./p-6e1ab235.js";import{V as u,I as h}from"./p-4387d550.js";import{c}from"./p-c8f914d2.js";import{f as g}from"./p-c8408c13.js";import{F as v}from"./p-5c30b476.js";import{i as f}from"./p-3647d61d.js";import{C as b}from"./p-2d0d575f.js";import{b as m}from"./p-a247e073.js";import{g as x,D as w}from"./p-bf953152.js";import{D as y}from"./p-59c9de55.js";import{C as j}from"./p-de2e3383.js";import{I as R}from"./p-f396c69a.js";import{I}from"./p-abd7aeaa.js";import{c as C}from"./p-86194314.js";import{T as V}from"./p-b129beb6.js";import"./p-6a334573.js";import"./p-619fdde5.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-0eed617a.js";import"./p-d920b18c.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-987fbbd0.js";import"./p-b5f5a5e0.js";import"./p-262ec334.js";import"./p-5f377954.js";import"./p-03b8af98.js";import"./p-7a40e033.js";import"./p-112455b1.js";var N=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class k extends p{getInputRangeContainerRef(){return this.inputRangeContainerRef}render(){return e(i,null,e("vega-flex",{class:"vega-input-range-container",direction:"horizontal"!==this.stack?"col":"row",alignItems:"horizontal"!==this.stack?"start":"center",gap:"size-8",ref:e=>this.inputRangeContainerRef=e},e("vega-field-label",{onClick:this.inputRangeInputRenderer.focusFirstInput,isFieldRequired:this.required,disabled:this.disabled,label:this.label}),this.inputRangeInputRenderer.render()),this.renderHintDom())}renderHintDom(){if(this.hint)return e("label",{class:"vega-input-range-hint"},e("vega-font",{variant:"font-footnote1-short",color:"text-secondary"},this.hint))}}N([s()],k.prototype,"required",void 0),N([s()],k.prototype,"disabled",void 0),N([s()],k.prototype,"label",void 0),N([s()],k.prototype,"hint",void 0),N([s()],k.prototype,"stack",void 0),N([s()],k.prototype,"inputRangeInputRenderer",void 0);var z=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class O extends p{emitEventAndNotifyAfterValueChange(e,i){f(e,i)||(this.changeEventEmitter.emit(e),b.notify(m,{host:this.host,detail:e}))}updateValueByRangeIndex(e,i){let t=this.value;t=0===i?[e,Array.isArray(this.value)&&!isNaN(Number(this.value[1]))?this.value[1]:""]:[Array.isArray(this.value)&&!isNaN(Number(this.value[0]))?this.value[0]:"",e],f(t,this.value)||this.setValue(t)}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){return Array.isArray(e)&&2===e.length}}z([s({writable:!0})],O.prototype,"value",void 0),z([s()],O.prototype,"host",void 0),z([s()],O.prototype,"changeEventEmitter",void 0),z([l("watchValue")],O.prototype,"emitEventAndNotifyAfterValueChange",null);var A=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class E extends p{constructor(){super(...arguments),this.isMobileDevice=x()===w.MOBILE,this.focusFirstInput=()=>{this.minFieldInputRef.doFocus()},this.inputValueChange=e=>{this.valueController.updateValueByRangeIndex(e.detail,"0"===e.host.dataset.index?0:1)}}getInputRefByIndex(e){return[this.minFieldInputRef,this.maxFieldInputRef][e]}render(){return e("vega-box",{class:{"vega-input-range-input-container":!0,"input-range-disabled":this.disabled,"input-range-mobile":this.isMobileDevice,"input-range-with-clear-icon":this.showClearIcon&&!this.disabled},corners:"rounded-8",backgroundColor:this.disabled?"bg-secondary":"bg-primary"},e("vega-flex",{"align-items":"center",direction:this.isMobileDevice?"col":"row"},e("vega-input",Object.assign({prefixIcon:this.prefixIcon},this.getInputPropsByRangeIndex(0),{ref:e=>{y.addUniqueObserverToNode(e,g,this.inputValueChange),this.minFieldInputRef=e}})),e("span",{class:"vega-input-range-divider"}),e("vega-input",Object.assign({class:{"with-left-padding-in-mobile":!!this.prefixIcon&&this.isMobileDevice}},this.getInputPropsByRangeIndex(1),{ref:e=>{y.addUniqueObserverToNode(e,g,this.inputValueChange),this.maxFieldInputRef=e}}))),this.clearIconRenderer.render())}getInputPropsByRangeIndex(e){return{type:"number","data-index":e,placeholder:this.getPlaceholderByIndex(e),showClearIcon:!1,disabled:this.disabled,size:this.size,min:this.min,max:this.max,value:this.getDefaultValueByIndex(e)}}getPlaceholderByIndex(e){return this.translationSlimmer.t((this.placeholder||E.defaultPlaceholder)[e])}getDefaultValueByIndex(e){return(this.value||["",""])[e]}}E.defaultPlaceholder=["Minimum","Maximum"],A([s()],E.prototype,"value",void 0),A([s()],E.prototype,"prefixIcon",void 0),A([s()],E.prototype,"disabled",void 0),A([s()],E.prototype,"min",void 0),A([s()],E.prototype,"max",void 0),A([s()],E.prototype,"size",void 0),A([s()],E.prototype,"placeholder",void 0),A([s()],E.prototype,"showClearIcon",void 0),A([s()],E.prototype,"valueController",void 0),A([s()],E.prototype,"clearIconRenderer",void 0),A([s()],E.prototype,"translationSlimmer",void 0);class F extends I{constructor(e){super(),this.invalidResult=e=>({isValid:!1,message:e}),this.validResult=()=>({isValid:!0,message:""}),this.minValue=0===e.minValue||e.minValue?Number(e.minValue):null,this.maxValue=0===e.maxValue||e.maxValue?Number(e.maxValue):null}canEvaluate(e,i){return i?this.isAcceptedInputType(e)&&!i.disabled&&i.visible:this.isAcceptedInputType(e)}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Unexpected type of input: ${typeof e}: ${e}`);const i=Number(e[0]),t=Number(e[1]);return null!==this.minValue&&(""!==e[0]&&i<this.minValue||""!==e[1]&&t<this.minValue)?this.invalidResult({key:"The minimum input value is {0}",args:[this.minValue]}):null!==this.maxValue&&(""!==e[0]&&i>this.maxValue||""!==e[1]&&t>this.maxValue)?this.invalidResult({key:"The maximum input value is {0}",args:[this.maxValue]}):""!==e[0]&&""!==e[1]&&i>t?this.invalidResult("The end value should be greater than the start value"):this.validResult()}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return Array.isArray(e)&&2===e.length&&e.every((e=>"number"==typeof Number(e)))}}var M=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class S extends p{constructor(){super(...arguments),this.clearInputRangeValue=()=>{this.valueController.setValue(["",""]),this.inputRangeInputRenderer.focusFirstInput()}}render(){return e("div",{class:{"vega-input-range-clear-icon":!0,invisible:!this.shouldShowClearIcon()},"aria-label":"clear input range",role:"button",tabindex:"-1",onClick:this.clearInputRangeValue,onKeyDown:C()},e("vega-icon",{icon:"close"}))}shouldShowClearIcon(){return this.showClearIcon&&!this.disabled&&Array.isArray(this.value)&&this.value.some((e=>!!e))}}M([s()],S.prototype,"showClearIcon",void 0),M([s()],S.prototype,"value",void 0),M([s()],S.prototype,"disabled",void 0),M([s()],S.prototype,"inputRangeInputRenderer",void 0),M([s()],S.prototype,"valueController",void 0);var B=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};const D=class{constructor(e){t(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.globalSlimmers={},this.translationSlimmer=new V,this.formFieldController=new v({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new R:null},{propertyName:"min",ruleFactory:(e,i)=>new F({minValue:e,maxValue:i}),dependence:"max"},{propertyName:"max",ruleFactory:(e,i)=>new F({minValue:i,maxValue:e}),dependence:"min"}],validationRulesName:"validationRules",defaultValue:["",""],attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputRangeRenderer.getInputRangeContainerRef(),touchableAreaGetter:()=>[this.inputRangeInputRenderer.getInputRefByIndex(0),this.inputRangeInputRenderer.getInputRefByIndex(1)]}),this.inputRangeInputRenderer=new E,this.clearIconRenderer=new S,this.inputRangeRenderer=new k,this.valueController=new O,this.inputChangeEventPrevent=new j([g],(()=>this.inputRangeRenderer.getInputRangeContainerRef())),this.changeEventEmitter=c(D,g),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.label="",this.value=["",""],this.showClearIcon=!0,this.min=null,this.max=null,this.required=!1,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.placeholder=["Minimum","Maximum"],this.disabled=!1,this.hint="",this.stack="vertical"}watchValue(e,i){}watchValidationRules(){}render(){return o(e(n,{class:{disabled:this.disabled}},this.inputRangeRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};B([h()],D.prototype,"globalSlimmers",void 0),B([d()],D.prototype,"translationSlimmer",void 0),B([d()],D.prototype,"formFieldController",void 0),B([d()],D.prototype,"inputRangeInputRenderer",void 0),B([d()],D.prototype,"clearIconRenderer",void 0),B([d()],D.prototype,"inputRangeRenderer",void 0),B([d()],D.prototype,"valueController",void 0),B([d()],D.prototype,"inputChangeEventPrevent",void 0),B([d()],D.prototype,"changeEventEmitter",void 0),B([d()],D.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),D.style=':host{display:inline-block;width:100%}.vega-input-range-input-container{position:relative;width:100%;flex:1 1 0%;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));box-sizing:border-box;min-width:50%}.vega-input-range-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-range-input-container .vega-input-range-divider{display:inline-block;width:0px;height:24px;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1));border-style:solid;border-right-width:1px;border-left-width:0px;flex-shrink:0}.vega-input-range-input-container:focus-within .vega-input-range-divider{opacity:0}.vega-input-range-input-container .vega-input-range-clear-icon{position:absolute;width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));top:50%;right:16px;transform:translateY(-50%);z-index:2}.vega-input-range-input-container .vega-input-range-clear-icon.invisible{visibility:hidden}.vega-input-range-input-container vega-input::part(input-container){border-width:0px}.vega-input-range-input-container vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1));position:relative;box-shadow:0 0 0;margin:-1px;z-index:1}.vega-input-range-input-container.input-range-with-clear-icon vega-input:last-child::part(input){padding-right:24px}.vega-input-range-input-container.input-range-disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-range-input-container.input-range-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-range-input-container.input-range-disabled .vega-input-range-divider{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1))}.vega-input-range-input-container.input-range-mobile .vega-input-range-divider{width:100%;height:0px;border-right-width:0px;border-left-width:0px;border-top-width:0px;border-bottom-width:1px}.vega-input-range-input-container.input-range-mobile:focus-within .vega-input-range-divider{opacity:1}.vega-input-range-input-container.input-range-mobile .with-left-padding-in-mobile::part(input){padding-left:26px}.vega-input-range-input-container.input-range-mobile .vega-input-range-clear-icon{top:25%}.vega-input-range-input-container.input-range-mobile.input-range-with-clear-icon vega-input:first-child::part(input){padding-right:24px}.vega-input-range-input-container.input-range-mobile.input-range-with-clear-icon vega-input:last-child::part(input){padding-right:2px}.vega-input-range-container.error .vega-input-range-input-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-range-container.error .vega-input-range-input-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-input-range-container.error vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.vega-input-range-hint{display:inline-block;padding-top:12px;padding-right:8px;padding-left:8px}.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}';export{D as vega_input_range}
1
+ import{h as e,F as i,r as t,c as r,H as n,g as a}from"./p-1c298d5a.js";import{s as o}from"./p-9b797118.js";import{c as s,V as p,M as l,I as d}from"./p-6e1ab235.js";import{V as u,I as h}from"./p-4387d550.js";import{c}from"./p-c8f914d2.js";import{f as g}from"./p-c8408c13.js";import{F as v}from"./p-cd53bde4.js";import{i as f}from"./p-3647d61d.js";import{C as b}from"./p-2d0d575f.js";import{b as m}from"./p-a247e073.js";import{g as x,D as w}from"./p-bf953152.js";import{D as y}from"./p-59c9de55.js";import{C as j}from"./p-179887da.js";import{I as R}from"./p-f396c69a.js";import{I}from"./p-abd7aeaa.js";import{c as C}from"./p-86194314.js";import{T as V}from"./p-12a10bdf.js";import"./p-6a334573.js";import"./p-619fdde5.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-e06361df.js";import"./p-02603c02.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-987fbbd0.js";import"./p-b5f5a5e0.js";import"./p-262ec334.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";var N=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class k extends p{getInputRangeContainerRef(){return this.inputRangeContainerRef}render(){return e(i,null,e("vega-flex",{class:"vega-input-range-container",direction:"horizontal"!==this.stack?"col":"row",alignItems:"horizontal"!==this.stack?"start":"center",gap:"size-8",ref:e=>this.inputRangeContainerRef=e},e("vega-field-label",{onClick:this.inputRangeInputRenderer.focusFirstInput,isFieldRequired:this.required,disabled:this.disabled,label:this.label}),this.inputRangeInputRenderer.render()),this.renderHintDom())}renderHintDom(){if(this.hint)return e("label",{class:"vega-input-range-hint"},e("vega-font",{variant:"font-footnote1-short",color:"text-secondary"},this.hint))}}N([s()],k.prototype,"required",void 0),N([s()],k.prototype,"disabled",void 0),N([s()],k.prototype,"label",void 0),N([s()],k.prototype,"hint",void 0),N([s()],k.prototype,"stack",void 0),N([s()],k.prototype,"inputRangeInputRenderer",void 0);var z=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class O extends p{emitEventAndNotifyAfterValueChange(e,i){f(e,i)||(this.changeEventEmitter.emit(e),b.notify(m,{host:this.host,detail:e}))}updateValueByRangeIndex(e,i){let t=this.value;t=0===i?[e,Array.isArray(this.value)&&!isNaN(Number(this.value[1]))?this.value[1]:""]:[Array.isArray(this.value)&&!isNaN(Number(this.value[0]))?this.value[0]:"",e],f(t,this.value)||this.setValue(t)}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){return Array.isArray(e)&&2===e.length}}z([s({writable:!0})],O.prototype,"value",void 0),z([s()],O.prototype,"host",void 0),z([s()],O.prototype,"changeEventEmitter",void 0),z([l("watchValue")],O.prototype,"emitEventAndNotifyAfterValueChange",null);var A=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class E extends p{constructor(){super(...arguments),this.isMobileDevice=x()===w.MOBILE,this.focusFirstInput=()=>{this.minFieldInputRef.doFocus()},this.inputValueChange=e=>{this.valueController.updateValueByRangeIndex(e.detail,"0"===e.host.dataset.index?0:1)}}getInputRefByIndex(e){return[this.minFieldInputRef,this.maxFieldInputRef][e]}render(){return e("vega-box",{class:{"vega-input-range-input-container":!0,"input-range-disabled":this.disabled,"input-range-mobile":this.isMobileDevice,"input-range-with-clear-icon":this.showClearIcon&&!this.disabled},corners:"rounded-8",backgroundColor:this.disabled?"bg-secondary":"bg-primary"},e("vega-flex",{"align-items":"center",direction:this.isMobileDevice?"col":"row"},e("vega-input",Object.assign({prefixIcon:this.prefixIcon},this.getInputPropsByRangeIndex(0),{ref:e=>{y.addUniqueObserverToNode(e,g,this.inputValueChange),this.minFieldInputRef=e}})),e("span",{class:"vega-input-range-divider"}),e("vega-input",Object.assign({class:{"with-left-padding-in-mobile":!!this.prefixIcon&&this.isMobileDevice}},this.getInputPropsByRangeIndex(1),{ref:e=>{y.addUniqueObserverToNode(e,g,this.inputValueChange),this.maxFieldInputRef=e}}))),this.clearIconRenderer.render())}getInputPropsByRangeIndex(e){return{type:"number","data-index":e,placeholder:this.getPlaceholderByIndex(e),showClearIcon:!1,disabled:this.disabled,size:this.size,min:this.min,max:this.max,value:this.getDefaultValueByIndex(e)}}getPlaceholderByIndex(e){return this.translationSlimmer.t((this.placeholder||E.defaultPlaceholder)[e])}getDefaultValueByIndex(e){return(this.value||["",""])[e]}}E.defaultPlaceholder=["Minimum","Maximum"],A([s()],E.prototype,"value",void 0),A([s()],E.prototype,"prefixIcon",void 0),A([s()],E.prototype,"disabled",void 0),A([s()],E.prototype,"min",void 0),A([s()],E.prototype,"max",void 0),A([s()],E.prototype,"size",void 0),A([s()],E.prototype,"placeholder",void 0),A([s()],E.prototype,"showClearIcon",void 0),A([s()],E.prototype,"valueController",void 0),A([s()],E.prototype,"clearIconRenderer",void 0),A([s()],E.prototype,"translationSlimmer",void 0);class F extends I{constructor(e){super(),this.invalidResult=e=>({isValid:!1,message:e}),this.validResult=()=>({isValid:!0,message:""}),this.minValue=0===e.minValue||e.minValue?Number(e.minValue):null,this.maxValue=0===e.maxValue||e.maxValue?Number(e.maxValue):null}canEvaluate(e,i){return i?this.isAcceptedInputType(e)&&!i.disabled&&i.visible:this.isAcceptedInputType(e)}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Unexpected type of input: ${typeof e}: ${e}`);const i=Number(e[0]),t=Number(e[1]);return null!==this.minValue&&(""!==e[0]&&i<this.minValue||""!==e[1]&&t<this.minValue)?this.invalidResult({key:"The minimum input value is {0}",args:[this.minValue]}):null!==this.maxValue&&(""!==e[0]&&i>this.maxValue||""!==e[1]&&t>this.maxValue)?this.invalidResult({key:"The maximum input value is {0}",args:[this.maxValue]}):""!==e[0]&&""!==e[1]&&i>t?this.invalidResult("The end value should be greater than the start value"):this.validResult()}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return Array.isArray(e)&&2===e.length&&e.every((e=>"number"==typeof Number(e)))}}var M=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class S extends p{constructor(){super(...arguments),this.clearInputRangeValue=()=>{this.valueController.setValue(["",""]),this.inputRangeInputRenderer.focusFirstInput()}}render(){return e("div",{class:{"vega-input-range-clear-icon":!0,invisible:!this.shouldShowClearIcon()},"aria-label":"clear input range",role:"button",tabindex:"-1",onClick:this.clearInputRangeValue,onKeyDown:C()},e("vega-icon",{icon:"close"}))}shouldShowClearIcon(){return this.showClearIcon&&!this.disabled&&Array.isArray(this.value)&&this.value.some((e=>!!e))}}M([s()],S.prototype,"showClearIcon",void 0),M([s()],S.prototype,"value",void 0),M([s()],S.prototype,"disabled",void 0),M([s()],S.prototype,"inputRangeInputRenderer",void 0),M([s()],S.prototype,"valueController",void 0);var B=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};const D=class{constructor(e){t(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.globalSlimmers={},this.translationSlimmer=new V,this.formFieldController=new v({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new R:null},{propertyName:"min",ruleFactory:(e,i)=>new F({minValue:e,maxValue:i}),dependence:"max"},{propertyName:"max",ruleFactory:(e,i)=>new F({minValue:i,maxValue:e}),dependence:"min"}],validationRulesName:"validationRules",defaultValue:["",""],attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputRangeRenderer.getInputRangeContainerRef(),touchableAreaGetter:()=>[this.inputRangeInputRenderer.getInputRefByIndex(0),this.inputRangeInputRenderer.getInputRefByIndex(1)]}),this.inputRangeInputRenderer=new E,this.clearIconRenderer=new S,this.inputRangeRenderer=new k,this.valueController=new O,this.inputChangeEventPrevent=new j([g],(()=>this.inputRangeRenderer.getInputRangeContainerRef())),this.changeEventEmitter=c(D,g),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.label="",this.value=["",""],this.showClearIcon=!0,this.min=null,this.max=null,this.required=!1,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.placeholder=["Minimum","Maximum"],this.disabled=!1,this.hint="",this.stack="vertical"}watchValue(e,i){}watchValidationRules(){}render(){return o(e(n,{class:{disabled:this.disabled}},this.inputRangeRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};B([h()],D.prototype,"globalSlimmers",void 0),B([d()],D.prototype,"translationSlimmer",void 0),B([d()],D.prototype,"formFieldController",void 0),B([d()],D.prototype,"inputRangeInputRenderer",void 0),B([d()],D.prototype,"clearIconRenderer",void 0),B([d()],D.prototype,"inputRangeRenderer",void 0),B([d()],D.prototype,"valueController",void 0),B([d()],D.prototype,"inputChangeEventPrevent",void 0),B([d()],D.prototype,"changeEventEmitter",void 0),B([d()],D.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),D.style=':host{display:inline-block;width:100%}.vega-input-range-input-container{position:relative;width:100%;flex:1 1 0%;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));box-sizing:border-box;min-width:50%}.vega-input-range-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-range-input-container .vega-input-range-divider{display:inline-block;width:0px;height:24px;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1));border-style:solid;border-right-width:1px;border-left-width:0px;flex-shrink:0}.vega-input-range-input-container:focus-within .vega-input-range-divider{opacity:0}.vega-input-range-input-container .vega-input-range-clear-icon{position:absolute;width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));top:50%;right:16px;transform:translateY(-50%);z-index:2}.vega-input-range-input-container .vega-input-range-clear-icon.invisible{visibility:hidden}.vega-input-range-input-container vega-input::part(input-container){border-width:0px}.vega-input-range-input-container vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1));position:relative;box-shadow:0 0 0;margin:-1px;z-index:1}.vega-input-range-input-container.input-range-with-clear-icon vega-input:last-child::part(input){padding-right:24px}.vega-input-range-input-container.input-range-disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-range-input-container.input-range-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-range-input-container.input-range-disabled .vega-input-range-divider{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1))}.vega-input-range-input-container.input-range-mobile .vega-input-range-divider{width:100%;height:0px;border-right-width:0px;border-left-width:0px;border-top-width:0px;border-bottom-width:1px}.vega-input-range-input-container.input-range-mobile:focus-within .vega-input-range-divider{opacity:1}.vega-input-range-input-container.input-range-mobile .with-left-padding-in-mobile::part(input){padding-left:26px}.vega-input-range-input-container.input-range-mobile .vega-input-range-clear-icon{top:25%}.vega-input-range-input-container.input-range-mobile.input-range-with-clear-icon vega-input:first-child::part(input){padding-right:24px}.vega-input-range-input-container.input-range-mobile.input-range-with-clear-icon vega-input:last-child::part(input){padding-right:2px}.vega-input-range-container.error .vega-input-range-input-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-range-container.error .vega-input-range-input-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-input-range-container.error vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.vega-input-range-hint{display:inline-block;padding-top:12px;padding-right:8px;padding-left:8px}.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}';export{D as vega_input_range}
@@ -1 +1 @@
1
- import{h as e,r as i,c as t,F as a,H as s,g as n}from"./p-1c298d5a.js";import{e as o}from"./p-3647d61d.js";import{s as r}from"./p-9b797118.js";import{a as d}from"./p-37b05e0b.js";import{c as l,V as p,M as h,I as c}from"./p-6e1ab235.js";import{V as v,I as g}from"./p-4387d550.js";import{I as b}from"./p-f1e0e7d4.js";import{g as f,P as m}from"./p-c0291e2e.js";import{c as x}from"./p-86194314.js";import{V as u}from"./p-b54328c6.js";import{V as w}from"./p-cc63e827.js";import{c as k}from"./p-ab75d371.js";import{e as y}from"./p-ecfa7534.js";import{R as S}from"./p-90ae575e.js";import{D as j}from"./p-59c9de55.js";import{q as C}from"./p-0eed617a.js";import{c as O}from"./p-c8f914d2.js";import{G as z,O as R,a as B,d as I}from"./p-c8408c13.js";import{C as L}from"./p-2d0d575f.js";import{k as D}from"./p-a247e073.js";import{S as V}from"./p-8876b776.js";import{f as H}from"./p-bf953152.js";import{i as M}from"./p-619fdde5.js";import"./p-262ec334.js";import"./p-6a334573.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b1f65b13.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-0c667d6a.js";import"./p-5f377954.js";import"./p-03b8af98.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-9060b003.js";import"./p-0fd6c35b.js";import"./p-d920b18c.js";class N extends p{constructor(){super(...arguments),this.backdropRef=null}updateBackdropAvailability(e){"open"===this.openState&&(null==e?void 0:e.showBackdrop)?this.append():(this.removeZIndex("base"),this.remove())}setZIndex(e){b.setZIndex(this.backdropRef,e)}removeZIndex(e){b.removeZIndex(this.backdropRef,e)}append(){let e=document.querySelector(`vega-backdrop.${N.backdropClassName}`);e||(e=document.createElement("vega-backdrop"),e.classList.add(N.backdropClassName),document.querySelector("body").append(e)),e.visible=this.getBackdropVisibleByBreakpoint(),this.backdropRef=e}remove(){this.backdropRef&&this.backdropRef.remove()}getBackdropVisibleByBreakpoint(){const e=f();return"S"===e||"M"===e}}N.backdropClassName="vega-sidenav-backdrop",function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l()],N.prototype,"openState",void 0);class $ extends p{constructor(){super(...arguments),this.collapseButtonRef=null,this.handleClickSidebarIcon=async()=>{await this.host.toggle()}}updateHandlerIconAvailability(e){this.collapseButtonRef&&(e?this.collapseButtonRef.classList.remove("disable-collapse"):this.collapseButtonRef.classList.add("disable-collapse"))}render(){const i=this.getButtonMaskImage();return e("i",{role:"button",onClick:this.handleClickSidebarIcon,onKeyDown:x(),class:"vega-handler-icon",tabIndex:0,"aria-label":"Handle Sidebar Icon",ref:e=>this.collapseButtonRef=e},e("style",null,i),e("vega-icon",{size:"size-16",icon:u.getIconKey("sidenav-chevron-right")}))}getButtonMaskImage(){const e=w.getIcon(u.getIconKey("sidenav-toggle-button-bg")).icon,i=`url(data:image/svg+xml,${globalThis.encodeURIComponent(e)})`;return`.vega-handler-icon{-webkit-mask-image:${i};mask-image:${i}}`}}u.register({"sidenav-chevron-right":{icon:'<svg width="26" height="43" viewBox="0 0 26 43" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.7444 22.3536L10.6711 28.4268C10.3782 28.7197 9.90333 28.7197 9.61045 28.4268L8.90211 27.7184C8.6097 27.426 8.60914 26.9521 8.90086 26.659L13.714 21.8232L8.90086 16.9874C8.60914 16.6943 8.6097 16.2204 8.90211 15.928L9.61045 15.2197C9.90336 14.9268 10.3782 14.9268 10.6711 15.2197L16.7443 21.2929C17.0372 21.5858 17.0372 22.0606 16.7444 22.3536Z" fill="currentColor"/></svg>',autoSize:!0},"sidenav-toggle-button-bg":{icon:'<svg width="26" height="43" viewBox="0 0 26 43" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 12C0 9.79086 1.79086 8 4 8H8V0L12.4853 4.48528C14.7357 6.73572 17.788 8 20.9706 8H22C24.2091 8 26 9.79086 26 12V31C26 33.2091 24.2091 35 22 35H20.9706C17.788 35 14.7357 36.2643 12.4853 38.5147L8 43V35H4C1.79086 35 0 33.2091 0 31V12Z" fill="currentColor"/></svg>'}}),function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l()],$.prototype,"host",void 0);var E=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};class U extends m{constructor(){super({callback:()=>{this.responsiveBehavior=this.getSidenavResponsiveBehavior(),this.backdropController.updateBackdropAvailability(this.responsiveBehavior),this.updateOverflowAvailability(),this.updateStatusOpenByDefault(!0),this.collapseButtonRenderer.updateHandlerIconAvailability(this.canCollapseSidenav())}})}toggleSidenav(){if(this.canCollapseSidenav())switch(this.openState){case"open":this.setSideNavOpenStatus("clickClose");break;case"close":this.setSideNavOpenStatus("clickOpen");break;case"hoverOpen":this.setSideNavOpenStatus("hoverClose")}}setSidenavRef(e){this.sidebar=e}setSideNavOpenStatus(e){let i=!1;switch(e){case"clickOpen":"close"===this.openState&&(this.openState="open",this.host.classList.add("open"),this.sidebar.classList.add("open"),i=!0);break;case"clickClose":"hoverOpen"!==this.openState&&"open"!==this.openState||(this.openState="close",this.host.classList.remove("open"),this.sidebar.classList.remove("open"),i=!0);break;case"hoverOpen":"close"===this.openState&&(this.openState="hoverOpen",this.host.classList.add("open"),this.sidebar.classList.add("open"),i=!0);break;case"hoverClose":"hoverOpen"===this.openState&&(this.openState="close",this.host.classList.remove("open"),this.sidebar.classList.remove("open"),i=!0)}i&&(this.backdropController.updateBackdropAvailability(this.responsiveBehavior),this.updateOverflowAvailability(),this.updateZIndex(),this.stateUpdateEmitter.emit(this.openState))}initOpenStatus(){this.responsiveBehavior=this.getSidenavResponsiveBehavior(),this.updateStatusOpenByDefault()}updateOpenStatus(){this.updateStatusOpenByDefault(),this.collapseButtonRenderer.updateHandlerIconAvailability(this.canCollapseSidenav())}registerSidenavLinkClickObserver(){j.addUniqueObserverToNode(this.host,C,(e=>{this.responsiveBehavior.showSideBarOnClickLink||e.detail||this.setSideNavOpenStatus("clickClose")}))}unregisterSidenavLinkClickObserver(){j.removeUniqueObserverFromNode(this.host,C)}getSidenavResponsiveBehavior(){return this.isLargeScreen()?{showSideBar:!0,showBackdrop:!1,canBeScrolled:!0,showSideBarOnClickLink:!0}:{showSideBar:!1,showBackdrop:!0,canBeScrolled:!1,showSideBarOnClickLink:!1}}updateZIndex(){["hoverOpen","open"].includes(this.openState)?(this.backdropController.setZIndex("base"),b.setZIndex(this.sidebar,"base")):y((()=>{this.backdropController.removeZIndex("base"),b.removeZIndex(this.sidebar,"base")}),this.sidebar,300)}canCollapseSidenav(){return"disableCollapse"!==this.getCurrentOpenByDefault()||!this.isLargeScreen()}updateOverflowAvailability(){var e;document.querySelector("body").style.overflow=(null===(e=this.responsiveBehavior)||void 0===e?void 0:e.canBeScrolled)||"open"!==this.openState?null:"hidden"}updateStatusOpenByDefault(e=!1){const i=this.getCurrentOpenByDefault(),t=this.canCollapseSidenav();e?t||this.setSideNavOpenStatus("clickOpen"):"open"!=i&&t?("close"==i||"disableCollapse"==i&&t)&&this.setSideNavOpenStatus("clickClose"):this.setSideNavOpenStatus("clickOpen")}isLargeScreen(){const e=f();return"L"==e||"XL"==e}getCurrentOpenByDefault(e=this.openByDefault){return S.formatCustom(e)}}E([l({writable:!0})],U.prototype,"openState",void 0),E([l()],U.prototype,"openByDefault",void 0),E([l()],U.prototype,"host",void 0),E([l()],U.prototype,"stateUpdateEmitter",void 0),E([l()],U.prototype,"backdropController",void 0),E([l()],U.prototype,"collapseButtonRenderer",void 0),E([h("componentDidLoad")],U.prototype,"initOpenStatus",null),E([h("watchOpenByDefaultChange")],U.prototype,"updateOpenStatus",null),E([h("connectedCallback")],U.prototype,"registerSidenavLinkClickObserver",null),E([h("disconnectedCallback")],U.prototype,"unregisterSidenavLinkClickObserver",null);var _=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const A=class{constructor(s){i(this,s),this.vegaStateUpdate=t(this,"vegaStateUpdate",7),this.stateUpdate=t(this,"stateUpdate",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.openStateNotifySlimmer=k(A,"openState","watchOpenState"),this.backdropController=new N,this.collapseButtonRenderer=new $,this.openStatusController=new U,this.stateUpdateEmitter=O(A,z),this.openState="close",this.footnote="",this.headerConfig={},this.openByDefault="close",this.attachMouseEventToContent=()=>{this.content.addEventListener("mouseenter",(e=>{e.stopPropagation(),this.openStatusController.setSideNavOpenStatus("hoverOpen")})),this.content.addEventListener("mouseleave",(e=>{e.stopPropagation(),this.openStatusController.setSideNavOpenStatus("hoverClose")}))},this.renderSideBarListBySource=()=>{var i;return e(a,null,null===(i=this.source)||void 0===i?void 0:i.map(((i,t)=>(null==i?void 0:i.children)?e("vega-sidenav-group",{key:t,icon:i.icon||"globe",label:i.name},i.children.map(((i,a)=>e("vega-sidenav-link",{key:`${t}_${a}`,url:i.url,selected:i.selected},i.name)))):e("vega-sidenav-link",{key:t,icon:i.icon||"globe",url:i.url,selected:i.selected},i.name))))}}watchOpenState(){}watchSourceChange(e,i){e&&this.validSource(),(null==i?void 0:i.length)||this.host.querySelectorAll("vega-sidenav-link, vega-sidenav-group").forEach((e=>e.remove()))}watchOpenByDefaultChange(){}componentWillLoad(){this.source&&this.validSource()}componentDidLoad(){this.attachMouseEventToContent()}collapseSidenavByBackDropClick(e){e.target.classList.contains(N.backdropClassName)&&this.openStatusController.setSideNavOpenStatus("clickClose")}async toggle(){this.openStatusController.toggleSidenav()}render(){return r(e(s,null,e("div",{class:"vega-sidebar",ref:e=>this.openStatusController.setSidenavRef(e)},e("div",{class:"vega-sidebar-content-container",ref:e=>this.content=e},e(a,null,!d(this.headerConfig)&&this.renderSideBarHeader(),this.renderSideBarList(),this.renderSideBarFooter())),this.collapseButtonRenderer.render())),this.host)}validSource(){if(o(this.source).filter((e=>e.selected)).length>1)throw new Error("There should be only one item selected at the same time.")}renderSideBarList(){var i;return e(a,null,d(this.headerConfig)?e("div",{class:"header-placeholder"}):null,e("slot",{name:"before-list-slot"}),e("div",{class:"vega-nav-list"},(null===(i=this.source)||void 0===i?void 0:i.length)?this.renderSideBarListBySource():e("slot",null)))}renderSideBarHeader(){const{collapseLogo:i,expandLogo:t,headline:a}=this.headerConfig;return e("div",{class:"vega-sidebar-header"},e("div",{class:"vega-sidebar-header-collapse-container"},i&&e("img",{src:i,alt:"collapse logo"})),e("div",{class:"vega-sidebar-header-expand-container"},t&&e("img",{src:t,alt:"expand logo"}),a&&e("div",{class:"vega-sidebar-headline"},a)))}renderSideBarFooter(){return this.footnote&&e("div",{class:"vega-nav-footer"},e("div",{class:"vega-nav-footnote"},this.footnote))}get host(){return n(this)}static get watchers(){return{openState:["watchOpenState"],source:["watchSourceChange"],openByDefault:["watchOpenByDefaultChange"]}}};_([g()],A.prototype,"globalSlimmers",void 0),_([c()],A.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_([c()],A.prototype,"openStateNotifySlimmer",void 0),_([c()],A.prototype,"backdropController",void 0),_([c()],A.prototype,"collapseButtonRenderer",void 0),_([c()],A.prototype,"openStatusController",void 0),_([c()],A.prototype,"stateUpdateEmitter",void 0),A.style=':host{height:100%;width:0px;min-height:100vh;display:flex;align-items:stretch;text-align:left;top:0px;right:0px;bottom:0px;left:0px}:host .vega-sidebar{background-color:rgba(var(--v-bg-sidebar, 18, 18, 39, 1));transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;box-sizing:border-box;position:relative;padding-left:0px;padding-right:0px;display:flex;align-items:stretch;width:0px;transition-duration:300ms}:host .vega-sidebar .header-placeholder{margin-top:24px}:host .vega-sidebar .vega-sidebar-content-container{width:100%;overflow:hidden;display:flex;flex-direction:column}:host .vega-sidebar .vega-sidebar-content-container>.vega-nav-list{padding-left:8px;padding-right:8px}:host .vega-sidebar .vega-nav-list{padding:0px;margin:0px;flex:1 1 0%;list-style-type:none}:host .vega-sidebar .vega-nav-list::-webkit-scrollbar{background-color:rgba(var(--v-bg-sidebar, 18, 18, 39, 1));width:4px}:host .vega-sidebar .vega-nav-list::-webkit-scrollbar-thumb{background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1));border-radius:9999px}:host .vega-sidebar .vega-sidebar-header{position:relative}:host .vega-sidebar .vega-sidebar-header>div{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-duration:300ms}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container{display:flex;justify-content:center;align-items:center;flex-shrink:0;height:56px;position:absolute;pointer-events:none;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));display:none;padding-top:24px;padding-left:12px;padding-right:12px;padding-bottom:32px;top:0;left:0;opacity:1}@media (min-width: 1024px){:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container{display:flex}}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container image{max-width:100%;max-height:48px}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container{color:rgba(var(--v-text-white, 252, 252, 252, 1));overflow:hidden;box-sizing:border-box;padding-left:24px;padding-right:24px;padding-top:24px;padding-bottom:32px;width:100%;opacity:0}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container>vega-icon{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1))}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container img{max-height:80px;max-width:100%}:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{overflow-wrap:break-word;font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;margin-top:8px;opacity:0;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;max-height:25px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-sidebar .vega-handler-icon{cursor:pointer;position:absolute;background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));right:-18px;-webkit-mask-size:cover;mask-size:cover;width:26px;height:43px;top:24px}@media (min-width: 320px){:host .vega-sidebar .vega-handler-icon{display:none}}@media (min-width: 1024px){:host .vega-sidebar .vega-handler-icon{display:block}}:host .vega-sidebar .vega-handler-icon vega-icon{cursor:pointer;position:absolute;display:block;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));left:0px;top:0px;width:100%;height:100%;transform-origin:center}:host .vega-sidebar .vega-nav-footer{padding-top:16px;padding-bottom:16px;padding-left:24px;padding-right:24px}:host .vega-sidebar .vega-nav-footer .vega-nav-footnote{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;opacity:0;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-sidebar .vega-nav-footer .vega-nav-footnote{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-sidebar .vega-nav-footer .vega-nav-footnote{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-sidebar .vega-nav-footer .vega-nav-footnote{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media (min-width: 1024px){:host{width:72px}:host .vega-sidebar{width:72px}}:host(.open){width:auto}:host(.open) .vega-sidebar{top:0px;right:0px;bottom:0px;left:0px;position:fixed;width:300px}@media (min-width: 768px){:host(.open) .vega-sidebar{width:240px}}@media (min-width: 1024px){:host(.open) .vega-sidebar{position:relative}}:host(.open) .vega-sidebar .vega-nav-list{overflow-y:auto;overflow-x:hidden}@media (min-width: 320px){:host(.open) .vega-sidebar .vega-handler-icon{display:block}}:host(.open) .vega-sidebar .vega-handler-icon vega-icon{transform:rotate(180deg)}@media (min-width: 320px){:host(.open) .vega-sidebar .vega-handler-icon.disable-collapse{display:block}}@media (min-width: 1024px){:host(.open) .vega-sidebar .vega-handler-icon.disable-collapse{display:none}}:host(.open) .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{opacity:1;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-delay:100ms}:host(.open) .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container{opacity:1}:host(.open) .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container{opacity:0}:host(.open) .vega-sidebar .vega-nav-footer .vega-nav-footnote{opacity:1;transition-delay:100ms}';class Z extends V{constructor(){super({parent:"vega-sidenav",subStates:[{subStateName:"openState",parentStateName:"openState"}]})}}!function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l({writable:!0})],Z.prototype,"openState",void 0);const K=e=>e instanceof HTMLElement&&"VEGA-SIDENAV-LINK"===e.tagName;var T=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const W=class{constructor(e){i(this,e),this.subStateObserverSlimmer=new Z,this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.openState="close",this.label="",this.handleClick=e=>{const i=e.currentTarget;i&&"$1"===i.dataset.root&&(e.preventDefault(),i.closest(".vega-li-main").classList.toggle("open"))}}disconnectedCallback(){L.unregister(D,this.observer)}componentWillLoad(){this.observer=new R(K,this.observerListener.bind(this)),L.register(D,this.observer)}render(){return r(e(s,null,e("div",{class:{"vega-li-main":!0,"sidenav-open":"close"!==this.openState},ref:e=>this.groupContainer=e},e("a",{href:`#${this.label}`,role:"button",tabIndex:0,onKeyDown:x(),"data-root":"$1",onClick:this.handleClick,"aria-label":this.label||"No label defined"},e("div",{class:"vega-links-icon"},e("div",{class:"prefix-icon"},e("vega-icon",{icon:this.icon,size:"size-24"}))),e("span",{class:"vega-links-name"},this.label),e("div",{class:"suffix-icons"},e("vega-icon",{icon:"chevron-down",size:"size-12"}),e("vega-icon",{icon:"chevron-up",size:"size-12"}))),e("div",{class:"vega-nav-list vega-nav-list-sub"},e("slot",null)))),this.host)}observerListener(e){this.host.contains(e)?(this.groupContainer.querySelector("a").classList.add("sub-selected"),this.groupContainer.classList.add("open")):(this.groupContainer.querySelector("a").classList.remove("sub-selected"),this.groupContainer.classList.remove("open"))}get host(){return n(this)}};T([c()],W.prototype,"subStateObserverSlimmer",void 0),T([g()],W.prototype,"globalSlimmers",void 0),T([c()],W.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),W.style=':host{display:block;margin-top:4px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;width:100%;box-sizing:border-box}:host a{display:flex;align-items:center;width:100%;height:100%;position:relative;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;overflow:hidden;color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1));cursor:pointer;text-decoration:none;border-radius:8px;box-sizing:border-box;outline:2px solid transparent;outline-offset:2px}:host .vega-nav-list{padding:0px;margin:0px;flex:1 1 0%;list-style-type:none}:host .vega-li-main.sidenav-open .vega-nav-list{overflow-y:auto;overflow-x:hidden}:host .vega-nav-list::-webkit-scrollbar{background-color:rgba(var(--v-bg-sidebar, 18, 18, 39, 1));width:4px}:host .vega-nav-list::-webkit-scrollbar-thumb{background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1));border-radius:9999px}:host a.sub-selected{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1))}:host .vega-li-main.sidenav-open a:focus{border-color:rgba(var(--v-border-color-sidebar-item-focus, 19, 98, 226, 1))}:host .vega-li-main.sidenav-open a:not(.selected):hover{background-color:rgba(var(--v-bg-sidebar-item-hover, 252, 252, 252, 1));color:rgba(var(--v-text-sidebar-link-hover, 18, 18, 39, 1))}:host .vega-links-icon{padding:8px;box-sizing:border-box}:host a .vega-links-icon>div{display:flex;justify-content:center;align-items:center;flex-shrink:0;border-radius:8px;height:100%;width:100%}:host .vega-links-icon .prefix-icon{width:40px;height:40px}:host .vega-nav-list-sub .vega-links-icon{height:auto;width:auto}:host a .vega-links-name{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;opacity:0;pointer-events:none;overflow:hidden;font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px;flex:1 1 0%;padding-top:8px;padding-bottom:8px;transition-duration:300ms}@media screen and (min-width: 768px) and (max-width: 1023px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host .vega-li-main.sidenav-open a .vega-links-name{opacity:1;pointer-events:auto;overflow-wrap:break-word}:host .suffix-icons{padding-right:16px;padding-left:8px;width:12px}:host .suffix-icons vega-icon{pointer-events:auto;transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;opacity:0;position:absolute;right:16px;top:50%;transform:translateY(-50%)}:host .vega-li-main.sidenav-open .suffix-icons vega-icon,:host .vega-li-main.sidenav-open.open>a>.suffix-icons vega-icon:first-of-type{opacity:0}:host .vega-li-main.sidenav-open .suffix-icons vega-icon:first-of-type,:host .vega-li-main.sidenav-open.open>a>.suffix-icons vega-icon:last-of-type{opacity:1}:host .vega-nav-list-sub{display:none}:host .vega-li-main.sidenav-open.open>.vega-nav-list-sub{display:block}:host ::slotted(vega-sidenav-group){padding-left:48px}:host ::slotted(vega-sidenav-link){padding-left:48px}@media (min-width: 768px){:host{width:224px}}';class F extends V{constructor(){super({parent:"vega-sidenav",subStates:[{subStateName:"openState",parentStateName:"openState"}]})}}!function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l({writable:!0})],F.prototype,"openState",void 0);var G=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const P=class{constructor(e){i(this,e),this.vegaClick=t(this,"vegaClick",7),this.click=t(this,"click",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.subStateObserverSlimmer=new F,this.clickEventEmitter=O(P,B),this.openState="close",this.selected=!1,this.showSideBarOnClickLink=!1,this.handleClick=e=>{this.selected||(this.selected=!0),this.clickEventEmitter.emit(),this.notifyParentSidenavClick(),"native"===M.getSemantics(this.host).namespace&&e.stopPropagation()}}disconnectedCallback(){L.unregister(D,this.observer)}componentWillLoad(){H(this.host,"vega-sidenav-group")&&this.host.classList.add("has-group-parent"),this.observer=new R(K,this.observerListener.bind(this)),L.register(D,this.observer)}componentDidRender(){this.selected&&L.notify(D,this.host)}render(){return r(e(s,{class:{"sidenav-open":"close"!==this.openState}},e("a",{href:this.url||"javascript:void(0);",onClick:this.handleClick,class:{selected:!0===this.selected}},this.icon?e("div",{class:"vega-links-icon"},e("div",{class:"prefix-icon"},e("vega-icon",{icon:this.icon,size:"size-24"}))):null,e("span",{class:"vega-links-name"},e("slot",null)))),this.host)}observerListener(e){e!==this.host&&(this.selected=!1)}notifyParentSidenavClick(){const e=H(this.host,"vega-sidenav");e&&L.notify(I.getSubject(e,C),{host:this.host,detail:this.showSideBarOnClickLink})}get host(){return n(this)}};G([g()],P.prototype,"globalSlimmers",void 0),G([c()],P.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),G([c()],P.prototype,"subStateObserverSlimmer",void 0),G([c()],P.prototype,"clickEventEmitter",void 0),P.style=':host{display:block;margin-top:4px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;width:100%;box-sizing:border-box}:host a{display:flex;align-items:center;width:100%;height:100%;position:relative;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;overflow:hidden;color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1));cursor:pointer;text-decoration:none;border-radius:8px;box-sizing:border-box;outline:2px solid transparent;outline-offset:2px}:host a.selected{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1));background:transparent}:host .vega-links-icon{padding:8px;box-sizing:border-box}:host a.selected .vega-links-icon{border-radius:8px;background-color:rgba(var(--v-bg-sidebar-item-selected, 19, 98, 226, 0.4))}:host a .vega-links-icon>div{display:flex;justify-content:center;align-items:center;flex-shrink:0;border-radius:8px;height:100%;width:100%}:host a.selected .vega-links-icon>div{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host .vega-links-icon .prefix-icon{width:40px;height:40px}:host a .vega-links-name{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;opacity:0;pointer-events:none;overflow:hidden;font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px;flex:1 1 0%;padding-top:8px;padding-bottom:8px;transition-duration:300ms}@media screen and (min-width: 768px) and (max-width: 1023px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host(.has-group-parent:not([icon])) .vega-links-name{padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}:host(.sidenav-open) a:focus{border-color:rgba(var(--v-border-color-sidebar-item-focus, 19, 98, 226, 1))}:host(.sidenav-open) a:not(.selected):hover{background-color:rgba(var(--v-bg-sidebar-item-hover, 252, 252, 252, 1));color:rgba(var(--v-text-sidebar-link-hover, 18, 18, 39, 1))}:host(.sidenav-open) a.selected{background-color:rgba(var(--v-bg-sidebar-item-selected, 19, 98, 226, 0.4))}:host(.sidenav-open) a.selected .vega-links-icon{background:transparent}:host(.sidenav-open) a .vega-links-name{opacity:1;pointer-events:auto;overflow-wrap:break-word}@media (min-width: 768px){:host{width:224px}}';export{A as vega_sidenav,W as vega_sidenav_group,P as vega_sidenav_link}
1
+ import{h as e,r as i,c as t,F as a,H as s,g as n}from"./p-1c298d5a.js";import{e as o}from"./p-3647d61d.js";import{s as r}from"./p-9b797118.js";import{a as d}from"./p-37b05e0b.js";import{c as l,V as p,M as h,I as c}from"./p-6e1ab235.js";import{V as v,I as g}from"./p-4387d550.js";import{I as b}from"./p-f1e0e7d4.js";import{g as f,P as m}from"./p-c0291e2e.js";import{c as x}from"./p-86194314.js";import{V as u}from"./p-b54328c6.js";import{V as w}from"./p-cc63e827.js";import{c as k}from"./p-c66b55f8.js";import{e as y}from"./p-ecfa7534.js";import{R as S}from"./p-d2e11032.js";import{D as j}from"./p-59c9de55.js";import{s as C}from"./p-e06361df.js";import{c as O}from"./p-c8f914d2.js";import{G as z,O as R,a as B,d as I}from"./p-c8408c13.js";import{C as L}from"./p-2d0d575f.js";import{k as D}from"./p-a247e073.js";import{S as V}from"./p-27192960.js";import{f as H}from"./p-bf953152.js";import{i as M}from"./p-619fdde5.js";import"./p-262ec334.js";import"./p-6a334573.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b1f65b13.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-0c667d6a.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-01d4c679.js";import"./p-0fd6c35b.js";import"./p-02603c02.js";class N extends p{constructor(){super(...arguments),this.backdropRef=null}updateBackdropAvailability(e){"open"===this.openState&&(null==e?void 0:e.showBackdrop)?this.append():(this.removeZIndex("base"),this.remove())}setZIndex(e){b.setZIndex(this.backdropRef,e)}removeZIndex(e){b.removeZIndex(this.backdropRef,e)}append(){let e=document.querySelector(`vega-backdrop.${N.backdropClassName}`);e||(e=document.createElement("vega-backdrop"),e.classList.add(N.backdropClassName),document.querySelector("body").append(e)),e.visible=this.getBackdropVisibleByBreakpoint(),this.backdropRef=e}remove(){this.backdropRef&&this.backdropRef.remove()}getBackdropVisibleByBreakpoint(){const e=f();return"S"===e||"M"===e}}N.backdropClassName="vega-sidenav-backdrop",function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l()],N.prototype,"openState",void 0);class $ extends p{constructor(){super(...arguments),this.collapseButtonRef=null,this.handleClickSidebarIcon=async()=>{await this.host.toggle()}}updateHandlerIconAvailability(e){this.collapseButtonRef&&(e?this.collapseButtonRef.classList.remove("disable-collapse"):this.collapseButtonRef.classList.add("disable-collapse"))}render(){const i=this.getButtonMaskImage();return e("i",{role:"button",onClick:this.handleClickSidebarIcon,onKeyDown:x(),class:"vega-handler-icon",tabIndex:0,"aria-label":"Handle Sidebar Icon",ref:e=>this.collapseButtonRef=e},e("style",null,i),e("vega-icon",{size:"size-16",icon:u.getIconKey("sidenav-chevron-right")}))}getButtonMaskImage(){const e=w.getIcon(u.getIconKey("sidenav-toggle-button-bg")).icon,i=`url(data:image/svg+xml,${globalThis.encodeURIComponent(e)})`;return`.vega-handler-icon{-webkit-mask-image:${i};mask-image:${i}}`}}u.register({"sidenav-chevron-right":{icon:'<svg width="26" height="43" viewBox="0 0 26 43" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.7444 22.3536L10.6711 28.4268C10.3782 28.7197 9.90333 28.7197 9.61045 28.4268L8.90211 27.7184C8.6097 27.426 8.60914 26.9521 8.90086 26.659L13.714 21.8232L8.90086 16.9874C8.60914 16.6943 8.6097 16.2204 8.90211 15.928L9.61045 15.2197C9.90336 14.9268 10.3782 14.9268 10.6711 15.2197L16.7443 21.2929C17.0372 21.5858 17.0372 22.0606 16.7444 22.3536Z" fill="currentColor"/></svg>',autoSize:!0},"sidenav-toggle-button-bg":{icon:'<svg width="26" height="43" viewBox="0 0 26 43" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 12C0 9.79086 1.79086 8 4 8H8V0L12.4853 4.48528C14.7357 6.73572 17.788 8 20.9706 8H22C24.2091 8 26 9.79086 26 12V31C26 33.2091 24.2091 35 22 35H20.9706C17.788 35 14.7357 36.2643 12.4853 38.5147L8 43V35H4C1.79086 35 0 33.2091 0 31V12Z" fill="currentColor"/></svg>'}}),function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l()],$.prototype,"host",void 0);var E=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};class U extends m{constructor(){super({callback:()=>{this.responsiveBehavior=this.getSidenavResponsiveBehavior(),this.backdropController.updateBackdropAvailability(this.responsiveBehavior),this.updateOverflowAvailability(),this.updateStatusOpenByDefault(!0),this.collapseButtonRenderer.updateHandlerIconAvailability(this.canCollapseSidenav())}})}toggleSidenav(){if(this.canCollapseSidenav())switch(this.openState){case"open":this.setSideNavOpenStatus("clickClose");break;case"close":this.setSideNavOpenStatus("clickOpen");break;case"hoverOpen":this.setSideNavOpenStatus("hoverClose")}}setSidenavRef(e){this.sidebar=e}setSideNavOpenStatus(e){let i=!1;switch(e){case"clickOpen":"close"===this.openState&&(this.openState="open",this.host.classList.add("open"),this.sidebar.classList.add("open"),i=!0);break;case"clickClose":"hoverOpen"!==this.openState&&"open"!==this.openState||(this.openState="close",this.host.classList.remove("open"),this.sidebar.classList.remove("open"),i=!0);break;case"hoverOpen":"close"===this.openState&&(this.openState="hoverOpen",this.host.classList.add("open"),this.sidebar.classList.add("open"),i=!0);break;case"hoverClose":"hoverOpen"===this.openState&&(this.openState="close",this.host.classList.remove("open"),this.sidebar.classList.remove("open"),i=!0)}i&&(this.backdropController.updateBackdropAvailability(this.responsiveBehavior),this.updateOverflowAvailability(),this.updateZIndex(),this.stateUpdateEmitter.emit(this.openState))}initOpenStatus(){this.responsiveBehavior=this.getSidenavResponsiveBehavior(),this.updateStatusOpenByDefault()}updateOpenStatus(){this.updateStatusOpenByDefault(),this.collapseButtonRenderer.updateHandlerIconAvailability(this.canCollapseSidenav())}registerSidenavLinkClickObserver(){j.addUniqueObserverToNode(this.host,C,(e=>{this.responsiveBehavior.showSideBarOnClickLink||e.detail||this.setSideNavOpenStatus("clickClose")}))}unregisterSidenavLinkClickObserver(){j.removeUniqueObserverFromNode(this.host,C)}getSidenavResponsiveBehavior(){return this.isLargeScreen()?{showSideBar:!0,showBackdrop:!1,canBeScrolled:!0,showSideBarOnClickLink:!0}:{showSideBar:!1,showBackdrop:!0,canBeScrolled:!1,showSideBarOnClickLink:!1}}updateZIndex(){["hoverOpen","open"].includes(this.openState)?(this.backdropController.setZIndex("base"),b.setZIndex(this.sidebar,"base")):y((()=>{this.backdropController.removeZIndex("base"),b.removeZIndex(this.sidebar,"base")}),this.sidebar,300)}canCollapseSidenav(){return"disableCollapse"!==this.getCurrentOpenByDefault()||!this.isLargeScreen()}updateOverflowAvailability(){var e;document.querySelector("body").style.overflow=(null===(e=this.responsiveBehavior)||void 0===e?void 0:e.canBeScrolled)||"open"!==this.openState?null:"hidden"}updateStatusOpenByDefault(e=!1){const i=this.getCurrentOpenByDefault(),t=this.canCollapseSidenav();e?t||this.setSideNavOpenStatus("clickOpen"):"open"!=i&&t?("close"==i||"disableCollapse"==i&&t)&&this.setSideNavOpenStatus("clickClose"):this.setSideNavOpenStatus("clickOpen")}isLargeScreen(){const e=f();return"L"==e||"XL"==e}getCurrentOpenByDefault(e=this.openByDefault){return S.formatCustom(e)}}E([l({writable:!0})],U.prototype,"openState",void 0),E([l()],U.prototype,"openByDefault",void 0),E([l()],U.prototype,"host",void 0),E([l()],U.prototype,"stateUpdateEmitter",void 0),E([l()],U.prototype,"backdropController",void 0),E([l()],U.prototype,"collapseButtonRenderer",void 0),E([h("componentDidLoad")],U.prototype,"initOpenStatus",null),E([h("watchOpenByDefaultChange")],U.prototype,"updateOpenStatus",null),E([h("connectedCallback")],U.prototype,"registerSidenavLinkClickObserver",null),E([h("disconnectedCallback")],U.prototype,"unregisterSidenavLinkClickObserver",null);var _=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const A=class{constructor(s){i(this,s),this.vegaStateUpdate=t(this,"vegaStateUpdate",7),this.stateUpdate=t(this,"stateUpdate",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.openStateNotifySlimmer=k(A,"openState","watchOpenState"),this.backdropController=new N,this.collapseButtonRenderer=new $,this.openStatusController=new U,this.stateUpdateEmitter=O(A,z),this.openState="close",this.footnote="",this.headerConfig={},this.openByDefault="close",this.attachMouseEventToContent=()=>{this.content.addEventListener("mouseenter",(e=>{e.stopPropagation(),this.openStatusController.setSideNavOpenStatus("hoverOpen")})),this.content.addEventListener("mouseleave",(e=>{e.stopPropagation(),this.openStatusController.setSideNavOpenStatus("hoverClose")}))},this.renderSideBarListBySource=()=>{var i;return e(a,null,null===(i=this.source)||void 0===i?void 0:i.map(((i,t)=>(null==i?void 0:i.children)?e("vega-sidenav-group",{key:t,icon:i.icon||"globe",label:i.name},i.children.map(((i,a)=>e("vega-sidenav-link",{key:`${t}_${a}`,url:i.url,selected:i.selected},i.name)))):e("vega-sidenav-link",{key:t,icon:i.icon||"globe",url:i.url,selected:i.selected},i.name))))}}watchOpenState(){}watchSourceChange(e,i){e&&this.validSource(),(null==i?void 0:i.length)||this.host.querySelectorAll("vega-sidenav-link, vega-sidenav-group").forEach((e=>e.remove()))}watchOpenByDefaultChange(){}componentWillLoad(){this.source&&this.validSource()}componentDidLoad(){this.attachMouseEventToContent()}collapseSidenavByBackDropClick(e){e.target.classList.contains(N.backdropClassName)&&this.openStatusController.setSideNavOpenStatus("clickClose")}async toggle(){this.openStatusController.toggleSidenav()}render(){return r(e(s,null,e("div",{class:"vega-sidebar",ref:e=>this.openStatusController.setSidenavRef(e)},e("div",{class:"vega-sidebar-content-container",ref:e=>this.content=e},e(a,null,!d(this.headerConfig)&&this.renderSideBarHeader(),this.renderSideBarList(),this.renderSideBarFooter())),this.collapseButtonRenderer.render())),this.host)}validSource(){if(o(this.source).filter((e=>e.selected)).length>1)throw new Error("There should be only one item selected at the same time.")}renderSideBarList(){var i;return e(a,null,d(this.headerConfig)?e("div",{class:"header-placeholder"}):null,e("slot",{name:"before-list-slot"}),e("div",{class:"vega-nav-list"},(null===(i=this.source)||void 0===i?void 0:i.length)?this.renderSideBarListBySource():e("slot",null)))}renderSideBarHeader(){const{collapseLogo:i,expandLogo:t,headline:a}=this.headerConfig;return e("div",{class:"vega-sidebar-header"},e("div",{class:"vega-sidebar-header-collapse-container"},i&&e("img",{src:i,alt:"collapse logo"})),e("div",{class:"vega-sidebar-header-expand-container"},t&&e("img",{src:t,alt:"expand logo"}),a&&e("div",{class:"vega-sidebar-headline"},a)))}renderSideBarFooter(){return this.footnote&&e("div",{class:"vega-nav-footer"},e("div",{class:"vega-nav-footnote"},this.footnote))}get host(){return n(this)}static get watchers(){return{openState:["watchOpenState"],source:["watchSourceChange"],openByDefault:["watchOpenByDefaultChange"]}}};_([g()],A.prototype,"globalSlimmers",void 0),_([c()],A.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_([c()],A.prototype,"openStateNotifySlimmer",void 0),_([c()],A.prototype,"backdropController",void 0),_([c()],A.prototype,"collapseButtonRenderer",void 0),_([c()],A.prototype,"openStatusController",void 0),_([c()],A.prototype,"stateUpdateEmitter",void 0),A.style=':host{height:100%;width:0px;min-height:100vh;display:flex;align-items:stretch;text-align:left;top:0px;right:0px;bottom:0px;left:0px}:host .vega-sidebar{background-color:rgba(var(--v-bg-sidebar, 18, 18, 39, 1));transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;box-sizing:border-box;position:relative;padding-left:0px;padding-right:0px;display:flex;align-items:stretch;width:0px;transition-duration:300ms}:host .vega-sidebar .header-placeholder{margin-top:24px}:host .vega-sidebar .vega-sidebar-content-container{width:100%;overflow:hidden;display:flex;flex-direction:column}:host .vega-sidebar .vega-sidebar-content-container>.vega-nav-list{padding-left:8px;padding-right:8px}:host .vega-sidebar .vega-nav-list{padding:0px;margin:0px;flex:1 1 0%;list-style-type:none}:host .vega-sidebar .vega-nav-list::-webkit-scrollbar{background-color:rgba(var(--v-bg-sidebar, 18, 18, 39, 1));width:4px}:host .vega-sidebar .vega-nav-list::-webkit-scrollbar-thumb{background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1));border-radius:9999px}:host .vega-sidebar .vega-sidebar-header{position:relative}:host .vega-sidebar .vega-sidebar-header>div{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-duration:300ms}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container{display:flex;justify-content:center;align-items:center;flex-shrink:0;height:56px;position:absolute;pointer-events:none;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));display:none;padding-top:24px;padding-left:12px;padding-right:12px;padding-bottom:32px;top:0;left:0;opacity:1}@media (min-width: 1024px){:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container{display:flex}}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container image{max-width:100%;max-height:48px}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container{color:rgba(var(--v-text-white, 252, 252, 252, 1));overflow:hidden;box-sizing:border-box;padding-left:24px;padding-right:24px;padding-top:24px;padding-bottom:32px;width:100%;opacity:0}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container>vega-icon{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1))}:host .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container img{max-height:80px;max-width:100%}:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{overflow-wrap:break-word;font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px;margin-top:8px;opacity:0;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;max-height:25px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:25px;letter-spacing:0px}}:host .vega-sidebar .vega-handler-icon{cursor:pointer;position:absolute;background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));right:-18px;-webkit-mask-size:cover;mask-size:cover;width:26px;height:43px;top:24px}@media (min-width: 320px){:host .vega-sidebar .vega-handler-icon{display:none}}@media (min-width: 1024px){:host .vega-sidebar .vega-handler-icon{display:block}}:host .vega-sidebar .vega-handler-icon vega-icon{cursor:pointer;position:absolute;display:block;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));left:0px;top:0px;width:100%;height:100%;transform-origin:center}:host .vega-sidebar .vega-nav-footer{padding-top:16px;padding-bottom:16px;padding-left:24px;padding-right:24px}:host .vega-sidebar .vega-nav-footer .vega-nav-footnote{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;opacity:0;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-sidebar .vega-nav-footer .vega-nav-footnote{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-sidebar .vega-nav-footer .vega-nav-footnote{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-sidebar .vega-nav-footer .vega-nav-footnote{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media (min-width: 1024px){:host{width:72px}:host .vega-sidebar{width:72px}}:host(.open){width:auto}:host(.open) .vega-sidebar{top:0px;right:0px;bottom:0px;left:0px;position:fixed;width:300px}@media (min-width: 768px){:host(.open) .vega-sidebar{width:240px}}@media (min-width: 1024px){:host(.open) .vega-sidebar{position:relative}}:host(.open) .vega-sidebar .vega-nav-list{overflow-y:auto;overflow-x:hidden}@media (min-width: 320px){:host(.open) .vega-sidebar .vega-handler-icon{display:block}}:host(.open) .vega-sidebar .vega-handler-icon vega-icon{transform:rotate(180deg)}@media (min-width: 320px){:host(.open) .vega-sidebar .vega-handler-icon.disable-collapse{display:block}}@media (min-width: 1024px){:host(.open) .vega-sidebar .vega-handler-icon.disable-collapse{display:none}}:host(.open) .vega-sidebar .vega-sidebar-header .vega-sidebar-headline{opacity:1;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-delay:100ms}:host(.open) .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-expand-container{opacity:1}:host(.open) .vega-sidebar .vega-sidebar-header>div.vega-sidebar-header-collapse-container{opacity:0}:host(.open) .vega-sidebar .vega-nav-footer .vega-nav-footnote{opacity:1;transition-delay:100ms}';class Z extends V{constructor(){super({parent:"vega-sidenav",subStates:[{subStateName:"openState",parentStateName:"openState"}]})}}!function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l({writable:!0})],Z.prototype,"openState",void 0);const K=e=>e instanceof HTMLElement&&"VEGA-SIDENAV-LINK"===e.tagName;var T=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const W=class{constructor(e){i(this,e),this.subStateObserverSlimmer=new Z,this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.openState="close",this.label="",this.handleClick=e=>{const i=e.currentTarget;i&&"$1"===i.dataset.root&&(e.preventDefault(),i.closest(".vega-li-main").classList.toggle("open"))}}disconnectedCallback(){L.unregister(D,this.observer)}componentWillLoad(){this.observer=new R(K,this.observerListener.bind(this)),L.register(D,this.observer)}render(){return r(e(s,null,e("div",{class:{"vega-li-main":!0,"sidenav-open":"close"!==this.openState},ref:e=>this.groupContainer=e},e("a",{href:`#${this.label}`,role:"button",tabIndex:0,onKeyDown:x(),"data-root":"$1",onClick:this.handleClick,"aria-label":this.label||"No label defined"},e("div",{class:"vega-links-icon"},e("div",{class:"prefix-icon"},e("vega-icon",{icon:this.icon,size:"size-24"}))),e("span",{class:"vega-links-name"},this.label),e("div",{class:"suffix-icons"},e("vega-icon",{icon:"chevron-down",size:"size-12"}),e("vega-icon",{icon:"chevron-up",size:"size-12"}))),e("div",{class:"vega-nav-list vega-nav-list-sub"},e("slot",null)))),this.host)}observerListener(e){this.host.contains(e)?(this.groupContainer.querySelector("a").classList.add("sub-selected"),this.groupContainer.classList.add("open")):(this.groupContainer.querySelector("a").classList.remove("sub-selected"),this.groupContainer.classList.remove("open"))}get host(){return n(this)}};T([c()],W.prototype,"subStateObserverSlimmer",void 0),T([g()],W.prototype,"globalSlimmers",void 0),T([c()],W.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),W.style=':host{display:block;margin-top:4px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;width:100%;box-sizing:border-box}:host a{display:flex;align-items:center;width:100%;height:100%;position:relative;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;overflow:hidden;color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1));cursor:pointer;text-decoration:none;border-radius:8px;box-sizing:border-box;outline:2px solid transparent;outline-offset:2px}:host .vega-nav-list{padding:0px;margin:0px;flex:1 1 0%;list-style-type:none}:host .vega-li-main.sidenav-open .vega-nav-list{overflow-y:auto;overflow-x:hidden}:host .vega-nav-list::-webkit-scrollbar{background-color:rgba(var(--v-bg-sidebar, 18, 18, 39, 1));width:4px}:host .vega-nav-list::-webkit-scrollbar-thumb{background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1));border-radius:9999px}:host a.sub-selected{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1))}:host .vega-li-main.sidenav-open a:focus{border-color:rgba(var(--v-border-color-sidebar-item-focus, 19, 98, 226, 1))}:host .vega-li-main.sidenav-open a:not(.selected):hover{background-color:rgba(var(--v-bg-sidebar-item-hover, 252, 252, 252, 1));color:rgba(var(--v-text-sidebar-link-hover, 18, 18, 39, 1))}:host .vega-links-icon{padding:8px;box-sizing:border-box}:host a .vega-links-icon>div{display:flex;justify-content:center;align-items:center;flex-shrink:0;border-radius:8px;height:100%;width:100%}:host .vega-links-icon .prefix-icon{width:40px;height:40px}:host .vega-nav-list-sub .vega-links-icon{height:auto;width:auto}:host a .vega-links-name{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;opacity:0;pointer-events:none;overflow:hidden;font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px;flex:1 1 0%;padding-top:8px;padding-bottom:8px;transition-duration:300ms}@media screen and (min-width: 768px) and (max-width: 1023px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host .vega-li-main.sidenav-open a .vega-links-name{opacity:1;pointer-events:auto;overflow-wrap:break-word}:host .suffix-icons{padding-right:16px;padding-left:8px;width:12px}:host .suffix-icons vega-icon{pointer-events:auto;transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;opacity:0;position:absolute;right:16px;top:50%;transform:translateY(-50%)}:host .vega-li-main.sidenav-open .suffix-icons vega-icon,:host .vega-li-main.sidenav-open.open>a>.suffix-icons vega-icon:first-of-type{opacity:0}:host .vega-li-main.sidenav-open .suffix-icons vega-icon:first-of-type,:host .vega-li-main.sidenav-open.open>a>.suffix-icons vega-icon:last-of-type{opacity:1}:host .vega-nav-list-sub{display:none}:host .vega-li-main.sidenav-open.open>.vega-nav-list-sub{display:block}:host ::slotted(vega-sidenav-group){padding-left:48px}:host ::slotted(vega-sidenav-link){padding-left:48px}@media (min-width: 768px){:host{width:224px}}';class F extends V{constructor(){super({parent:"vega-sidenav",subStates:[{subStateName:"openState",parentStateName:"openState"}]})}}!function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);n>3&&o&&Object.defineProperty(i,t,o)}([l({writable:!0})],F.prototype,"openState",void 0);var G=function(e,i,t,a){var s,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(i,t,o):s(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const P=class{constructor(e){i(this,e),this.vegaClick=t(this,"vegaClick",7),this.click=t(this,"click",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.subStateObserverSlimmer=new F,this.clickEventEmitter=O(P,B),this.openState="close",this.selected=!1,this.showSideBarOnClickLink=!1,this.handleClick=e=>{this.selected||(this.selected=!0),this.clickEventEmitter.emit(),this.notifyParentSidenavClick(),"native"===M.getSemantics(this.host).namespace&&e.stopPropagation()}}disconnectedCallback(){L.unregister(D,this.observer)}componentWillLoad(){H(this.host,"vega-sidenav-group")&&this.host.classList.add("has-group-parent"),this.observer=new R(K,this.observerListener.bind(this)),L.register(D,this.observer)}componentDidRender(){this.selected&&L.notify(D,this.host)}render(){return r(e(s,{class:{"sidenav-open":"close"!==this.openState}},e("a",{href:this.url||"javascript:void(0);",onClick:this.handleClick,class:{selected:!0===this.selected}},this.icon?e("div",{class:"vega-links-icon"},e("div",{class:"prefix-icon"},e("vega-icon",{icon:this.icon,size:"size-24"}))):null,e("span",{class:"vega-links-name"},e("slot",null)))),this.host)}observerListener(e){e!==this.host&&(this.selected=!1)}notifyParentSidenavClick(){const e=H(this.host,"vega-sidenav");e&&L.notify(I.getSubject(e,C),{host:this.host,detail:this.showSideBarOnClickLink})}get host(){return n(this)}};G([g()],P.prototype,"globalSlimmers",void 0),G([c()],P.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),G([c()],P.prototype,"subStateObserverSlimmer",void 0),G([c()],P.prototype,"clickEventEmitter",void 0),P.style=':host{display:block;margin-top:4px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;width:100%;box-sizing:border-box}:host a{display:flex;align-items:center;width:100%;height:100%;position:relative;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;overflow:hidden;color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1));cursor:pointer;text-decoration:none;border-radius:8px;box-sizing:border-box;outline:2px solid transparent;outline-offset:2px}:host a.selected{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1));background:transparent}:host .vega-links-icon{padding:8px;box-sizing:border-box}:host a.selected .vega-links-icon{border-radius:8px;background-color:rgba(var(--v-bg-sidebar-item-selected, 19, 98, 226, 0.4))}:host a .vega-links-icon>div{display:flex;justify-content:center;align-items:center;flex-shrink:0;border-radius:8px;height:100%;width:100%}:host a.selected .vega-links-icon>div{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host .vega-links-icon .prefix-icon{width:40px;height:40px}:host a .vega-links-name{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;opacity:0;pointer-events:none;overflow:hidden;font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px;flex:1 1 0%;padding-top:8px;padding-bottom:8px;transition-duration:300ms}@media screen and (min-width: 768px) and (max-width: 1023px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host a .vega-links-name{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host(.has-group-parent:not([icon])) .vega-links-name{padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}:host(.sidenav-open) a:focus{border-color:rgba(var(--v-border-color-sidebar-item-focus, 19, 98, 226, 1))}:host(.sidenav-open) a:not(.selected):hover{background-color:rgba(var(--v-bg-sidebar-item-hover, 252, 252, 252, 1));color:rgba(var(--v-text-sidebar-link-hover, 18, 18, 39, 1))}:host(.sidenav-open) a.selected{background-color:rgba(var(--v-bg-sidebar-item-selected, 19, 98, 226, 0.4))}:host(.sidenav-open) a.selected .vega-links-icon{background:transparent}:host(.sidenav-open) a .vega-links-name{opacity:1;pointer-events:auto;overflow-wrap:break-word}@media (min-width: 768px){:host{width:224px}}';export{A as vega_sidenav,W as vega_sidenav_group,P as vega_sidenav_link}
@@ -1 +1 @@
1
- import{V as t,I as s,c as e,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-0bb29d98.js";import{C as n}from"./p-2d0d575f.js";import{d as o,O as a}from"./p-c8408c13.js";import{U as h,c as l,d as c,b as d,e as u,F as f,f as m,g as p}from"./p-a247e073.js";import{f as v,c as b}from"./p-bf953152.js";import{i as g,g as R}from"./p-37b05e0b.js";import{c as w}from"./p-6a334573.js";import{c as y,d as j}from"./p-0eed617a.js";import{V as O}from"./p-d920b18c.js";import{P as E}from"./p-c0291e2e.js";import{I as F}from"./p-abd7aeaa.js";import{D as V}from"./p-59c9de55.js";import{M as I}from"./p-987fbbd0.js";import{A as C}from"./p-b5f5a5e0.js";import{i as A}from"./p-3647d61d.js";class k{constructor(t){this.rule=t}getStatus(t,s,e){return{canEvaluate:this.rule.canEvaluate(t,s,e),isAsync:g(this.rule.evaluate)}}shouldShowError(t,s){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,s):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class S{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,s,e){return!!this.handlers.find((i=>{const r=i.getStatus(t,s,e);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new k(t))):[]}async process(t,s,e,i,r){const n=this.preProcess();let o;for(const i of this.handlers){if(n!==this.processId)break;const r=i.getStatus(t,s,e);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(s,e);o=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(n,i,o,r),o?{isValid:!1,message:o.message}:{isValid:!0,message:""}}preProcess(){const t=R();return this.processId=t,t}postProcess(t,s,e,i){this.processId===t&&i(s,e)}}class T{run(t){const s=t.nextElementSibling;return s&&s.querySelector(".vega-error")?s.querySelector(".vega-error"):null}}class M{run(t){let s=t.nextElementSibling;return s&&!s.classList.contains("vega-error")&&(s=document.createElement("label"),s.classList.add("vega-error"),s.setAttribute("part","field-error-message"),t.after(s)),s}}class D{run(t){let s=t.nextElementSibling;return s||(s=document.createElement("label"),s.classList.add("vega-error"),s.setAttribute("part","field-error-message"),t.after(s)),s}}class L extends t{getTranslatedMessage(t){return"string"==typeof t?O.t(t):O.t(t.key,...t.args||[])}}var U=function(t,s,e,i){var r,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(s,e,o):r(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class B extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new L,this.fieldErrorUiControllerStrategies=[new T,new M,new D],this.initTranslationObserver()}applyInputInvalidUI(t){this.errorMessage=t;const s=this.getInputElementContainer();if(t&&s){const e=this.getErrorContainer(s);e.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),e.classList.remove("vega-hidden"),s.classList.add("error"),n.notify(o.getSubject(this.host,y),{host:this.host,showError:!0})}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),n.notify(o.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const s of this.fieldErrorUiControllerStrategies){const e=s.run(t);if(e)return e}}initTranslationObserver(){const t=new a(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const s=this.getErrorContainer(t);s&&(s.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage))}}));n.register(h,t)}isAcceptableTranslationObserver(){return!0}}U([s()],B.prototype,"formFieldMessageTranslatorSlimmer",void 0),U([e()],B.prototype,"host",void 0),U([e()],B.prototype,"options",void 0);var H=function(t,s,e,i){var r,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(s,e,o):r(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class x{constructor(t,s,e,i){var r,o;this.formFieldMessageTranslatorSlimmer=new L,this.fieldErrorUIController=new B,this.resizeObserverSlimmer=w(x,E,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const s=this.isVisible,e=t[0].contentRect.height>0;this.isVisible=e,this.isAutoValidationEnabled()&&v(this.host,"vega-form")&&s!==e&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new S,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,s)=>{let e=!0;return s?("rule"===t?s.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(s.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(s.message):this.fieldErrorUIController.resetInputInvalidUI(),e=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(e),n.notify(l,{host:this.host,detail:e}),e},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=s,this.defaultValue=e,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(o=(r=this.host).componentOnReady)||void 0===o||o.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((s=>this.overrideDefaultRuleByAdditionalRule(s,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){n.notify(c,{host:this.host}),this.unregisterFormResetObserver(),n.unregister(d,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,s="rule"){const e=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,e,t)&&n.notify(l,{host:this.host,detail:null});const{isValid:r,message:o}=await this.formFieldValidationRuleHandlerChain.process(i,e,t,s,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(o)}}invokeListeners(t){this.listeners.forEach((s=>s.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const s=this.isTouched;this.isTouched=t,this.isAutoValidationEnabled()&&this.valid(s===t?[]:["touched"])}updateIsModified(t){const s=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(s===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return v(this.host,"vega-form")===t.host}unregisterFormResetObserver(){n.unregister(u,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new a(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),n.register(d,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var s,e;if(this.shouldVisitElement(this.host,null===(s=t.option)||void 0===s?void 0:s.skipDisabled,null===(e=t.option)||void 0===e?void 0:e.skipInvisible)){const s=t.defaultValueMap,e=this.host.dataset.vegaForm,i=null==s[e]?this.getDefaultValue():s[e];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new a(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),n.register(u,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,s,e){return!(!t.dataset.vegaForm||s&&t.disabled||e&&!b(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{this.canSubmitFormByEvent(t)&&n.notify(f,{host:this.host})}))}canSubmitFormByEvent(t){const s="Enter"===t.key||13===t.keyCode,e=s&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return e&&t.preventDefault(),e;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return s}}overrideDefaultRuleByAdditionalRule(t,s){if(t&&s){const e=s.findIndex((s=>s instanceof F&&s instanceof t.constructor&&s.overrideDefault));if(e>-1)return s.splice(e,1)[0]}return t}}H([s()],x.prototype,"formFieldMessageTranslatorSlimmer",void 0),H([s()],x.prototype,"fieldErrorUIController",void 0),H([s()],x.prototype,"resizeObserverSlimmer",void 0);var P=function(t,s,e,i){var r,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(s,e,o):r(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class G extends t{constructor(){super(...arguments),this.fieldErrorUIController=new B,this.handleFieldErrorMessageUpdate=t=>{const{message:s}=t;s?this.fieldErrorUIController.applyInputInvalidUI(s):this.fieldErrorUIController.resetInputInvalidUI()}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new a(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),n.register(m,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){n.unregister(m,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:s}=t,e=this.host.parentElement;return!(!e||e!==s)}}P([e()],G.prototype,"host",void 0),P([e()],G.prototype,"options",void 0),P([s()],G.prototype,"fieldErrorUIController",void 0),P([i("setInjectFormFieldHelper")],G.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),P([i("disconnectedCallback")],G.prototype,"handleUnregisterObserver",null);var z=function(t,s,e,i){var r,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(s,e,o):r(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class W extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const s=await this.validator.validate(t.message);if(s){const{isValid:e,message:i}=s;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:e,message:i})}}}}registerValidInvocationObserver(){V.addUniqueObserverToNode(this.host,j,this.handleValidInvocation)}handleUnregisterObserver(){V.removeUniqueObserverFromNode(this.host,j)}}z([e()],W.prototype,"host",void 0),z([e()],W.prototype,"validator",void 0),z([i("setInjectFormFieldHelper")],W.prototype,"registerValidInvocationObserver",null),z([i("disconnectedCallback")],W.prototype,"handleUnregisterObserver",null);var K=function(t,s,e,i){var r,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(s,e,o):r(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class X extends t{constructor(t){super(),this.fieldErrorSlimmer=new G,this.formFieldValidInvokeSlimmer=new W,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}static isValidFormField(t){return t&&Boolean(t.getAttribute("data-vega-form"))}watchValidationRulesByFormControllerSlimmer(t,s){A(t,s)||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(X.isValidFormField(this.host)){const{defaultValue:t}=this.options,s=new x(this.getPropertyRules(),this.host,t,this.options);s.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,n.notify(p,{host:this.host,detail:t}))}}),this.validator=s,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:s}=this.options;return t.map((t=>{const e=t.dependence&&"string"==typeof t.dependence?[s(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>s(t))):[null];return t.ruleFactory(s(t.propertyName),...e)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new I({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:C(),callback:this.mutationObserverCallBack})}}K([e()],X.prototype,"host",void 0),K([e({writable:!0})],X.prototype,"validationRules",void 0),K([e()],X.prototype,"disabled",void 0),K([e()],X.prototype,"autoValidation",void 0),K([e({writable:!0})],X.prototype,"isValid",void 0),K([s()],X.prototype,"fieldErrorSlimmer",void 0),K([s()],X.prototype,"formFieldValidInvokeSlimmer",void 0),K([s()],X.prototype,"mutationObserverSlimmer",void 0),K([i("connectedCallback")],X.prototype,"connectedCallback",null),K([i("disconnectedCallback")],X.prototype,"disconnectedCallback",null),K([i("componentDidLoad")],X.prototype,"componentDidLoad",null),K([i("watchValidationRules")],X.prototype,"watchValidationRulesByFormControllerSlimmer",null),K([i("componentWillLoad")],X.prototype,"setInjectFormFieldHelper",null);export{X as F}
1
+ import{V as t,I as s,c as e,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-0bb29d98.js";import{C as n}from"./p-2d0d575f.js";import{d as o,O as a}from"./p-c8408c13.js";import{U as h,c as l,d as c,b as d,e as u,F as f,f as m,g as p}from"./p-a247e073.js";import{f as v,c as b}from"./p-bf953152.js";import{i as g,g as R}from"./p-37b05e0b.js";import{c as w}from"./p-6a334573.js";import{c as y,d as j}from"./p-e06361df.js";import{V as O}from"./p-02603c02.js";import{P as E}from"./p-c0291e2e.js";import{I as F}from"./p-abd7aeaa.js";import{D as V}from"./p-59c9de55.js";import{M as I}from"./p-987fbbd0.js";import{A as C}from"./p-b5f5a5e0.js";import{i as A}from"./p-3647d61d.js";class k{constructor(t){this.rule=t}getStatus(t,s,e){return{canEvaluate:this.rule.canEvaluate(t,s,e),isAsync:g(this.rule.evaluate)}}shouldShowError(t,s){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,s):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class S{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,s,e){return!!this.handlers.find((i=>{const r=i.getStatus(t,s,e);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new k(t))):[]}async process(t,s,e,i,r){const n=this.preProcess();let o;for(const i of this.handlers){if(n!==this.processId)break;const r=i.getStatus(t,s,e);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(s,e);o=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(n,i,o,r),o?{isValid:!1,message:o.message}:{isValid:!0,message:""}}preProcess(){const t=R();return this.processId=t,t}postProcess(t,s,e,i){this.processId===t&&i(s,e)}}class T{run(t){const s=t.nextElementSibling;return s&&s.querySelector(".vega-error")?s.querySelector(".vega-error"):null}}class M{run(t){let s=t.nextElementSibling;return s&&!s.classList.contains("vega-error")&&(s=document.createElement("label"),s.classList.add("vega-error"),s.setAttribute("part","field-error-message"),t.after(s)),s}}class D{run(t){let s=t.nextElementSibling;return s||(s=document.createElement("label"),s.classList.add("vega-error"),s.setAttribute("part","field-error-message"),t.after(s)),s}}class L extends t{getTranslatedMessage(t){return"string"==typeof t?O.t(t):O.t(t.key,...t.args||[])}}var U=function(t,s,e,i){var r,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(s,e,o):r(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class B extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new L,this.fieldErrorUiControllerStrategies=[new T,new M,new D],this.initTranslationObserver()}applyInputInvalidUI(t){this.errorMessage=t;const s=this.getInputElementContainer();if(t&&s){const e=this.getErrorContainer(s);e.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),e.classList.remove("vega-hidden"),s.classList.add("error"),n.notify(o.getSubject(this.host,y),{host:this.host,showError:!0})}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),n.notify(o.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const s of this.fieldErrorUiControllerStrategies){const e=s.run(t);if(e)return e}}initTranslationObserver(){const t=new a(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const s=this.getErrorContainer(t);s&&(s.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage))}}));n.register(h,t)}isAcceptableTranslationObserver(){return!0}}U([s()],B.prototype,"formFieldMessageTranslatorSlimmer",void 0),U([e()],B.prototype,"host",void 0),U([e()],B.prototype,"options",void 0);var H=function(t,s,e,i){var r,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(s,e,o):r(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class x{constructor(t,s,e,i){var r,o;this.formFieldMessageTranslatorSlimmer=new L,this.fieldErrorUIController=new B,this.resizeObserverSlimmer=w(x,E,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const s=this.isVisible,e=t[0].contentRect.height>0;this.isVisible=e,this.isAutoValidationEnabled()&&v(this.host,"vega-form")&&s!==e&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new S,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,s)=>{let e=!0;return s?("rule"===t?s.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(s.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(s.message):this.fieldErrorUIController.resetInputInvalidUI(),e=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(e),n.notify(l,{host:this.host,detail:e}),e},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=s,this.defaultValue=e,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(o=(r=this.host).componentOnReady)||void 0===o||o.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((s=>this.overrideDefaultRuleByAdditionalRule(s,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){n.notify(c,{host:this.host}),this.unregisterFormResetObserver(),n.unregister(d,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,s="rule"){const e=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,e,t)&&n.notify(l,{host:this.host,detail:null});const{isValid:r,message:o}=await this.formFieldValidationRuleHandlerChain.process(i,e,t,s,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(o)}}invokeListeners(t){this.listeners.forEach((s=>s.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const s=this.isTouched;this.isTouched=t,this.isAutoValidationEnabled()&&this.valid(s===t?[]:["touched"])}updateIsModified(t){const s=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(s===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return v(this.host,"vega-form")===t.host}unregisterFormResetObserver(){n.unregister(u,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new a(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),n.register(d,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var s,e;if(this.shouldVisitElement(this.host,null===(s=t.option)||void 0===s?void 0:s.skipDisabled,null===(e=t.option)||void 0===e?void 0:e.skipInvisible)){const s=t.defaultValueMap,e=this.host.dataset.vegaForm,i=null==s[e]?this.getDefaultValue():s[e];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new a(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),n.register(u,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,s,e){return!(!t.dataset.vegaForm||s&&t.disabled||e&&!b(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{this.canSubmitFormByEvent(t)&&n.notify(f,{host:this.host})}))}canSubmitFormByEvent(t){const s="Enter"===t.key||13===t.keyCode,e=s&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return e&&t.preventDefault(),e;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return s}}overrideDefaultRuleByAdditionalRule(t,s){if(t&&s){const e=s.findIndex((s=>s instanceof F&&s instanceof t.constructor&&s.overrideDefault));if(e>-1)return s.splice(e,1)[0]}return t}}H([s()],x.prototype,"formFieldMessageTranslatorSlimmer",void 0),H([s()],x.prototype,"fieldErrorUIController",void 0),H([s()],x.prototype,"resizeObserverSlimmer",void 0);var P=function(t,s,e,i){var r,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(s,e,o):r(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class G extends t{constructor(){super(...arguments),this.fieldErrorUIController=new B,this.handleFieldErrorMessageUpdate=t=>{const{message:s}=t;s?this.fieldErrorUIController.applyInputInvalidUI(s):this.fieldErrorUIController.resetInputInvalidUI()}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new a(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),n.register(m,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){n.unregister(m,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:s}=t,e=this.host.parentElement;return!(!e||e!==s)}}P([e()],G.prototype,"host",void 0),P([e()],G.prototype,"options",void 0),P([s()],G.prototype,"fieldErrorUIController",void 0),P([i("setInjectFormFieldHelper")],G.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),P([i("disconnectedCallback")],G.prototype,"handleUnregisterObserver",null);var z=function(t,s,e,i){var r,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(s,e,o):r(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class W extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const s=await this.validator.validate(t.message);if(s){const{isValid:e,message:i}=s;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:e,message:i})}}}}registerValidInvocationObserver(){V.addUniqueObserverToNode(this.host,j,this.handleValidInvocation)}handleUnregisterObserver(){V.removeUniqueObserverFromNode(this.host,j)}}z([e()],W.prototype,"host",void 0),z([e()],W.prototype,"validator",void 0),z([i("setInjectFormFieldHelper")],W.prototype,"registerValidInvocationObserver",null),z([i("disconnectedCallback")],W.prototype,"handleUnregisterObserver",null);var K=function(t,s,e,i){var r,n=arguments.length,o=n<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(s,e,o):r(s,e))||o);return n>3&&o&&Object.defineProperty(s,e,o),o};class X extends t{constructor(t){super(),this.fieldErrorSlimmer=new G,this.formFieldValidInvokeSlimmer=new W,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}static isValidFormField(t){return t&&Boolean(t.getAttribute("data-vega-form"))}watchValidationRulesByFormControllerSlimmer(t,s){A(t,s)||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(X.isValidFormField(this.host)){const{defaultValue:t}=this.options,s=new x(this.getPropertyRules(),this.host,t,this.options);s.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,n.notify(p,{host:this.host,detail:t}))}}),this.validator=s,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:s}=this.options;return t.map((t=>{const e=t.dependence&&"string"==typeof t.dependence?[s(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>s(t))):[null];return t.ruleFactory(s(t.propertyName),...e)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new I({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:C(),callback:this.mutationObserverCallBack})}}K([e()],X.prototype,"host",void 0),K([e({writable:!0})],X.prototype,"validationRules",void 0),K([e()],X.prototype,"disabled",void 0),K([e()],X.prototype,"autoValidation",void 0),K([e({writable:!0})],X.prototype,"isValid",void 0),K([s()],X.prototype,"fieldErrorSlimmer",void 0),K([s()],X.prototype,"formFieldValidInvokeSlimmer",void 0),K([s()],X.prototype,"mutationObserverSlimmer",void 0),K([i("connectedCallback")],X.prototype,"connectedCallback",null),K([i("disconnectedCallback")],X.prototype,"disconnectedCallback",null),K([i("componentDidLoad")],X.prototype,"componentDidLoad",null),K([i("watchValidationRules")],X.prototype,"watchValidationRulesByFormControllerSlimmer",null),K([i("componentWillLoad")],X.prototype,"setInjectFormFieldHelper",null);export{X as F}
@@ -0,0 +1 @@
1
+ import{i as o}from"./p-b1f65b13.js";import{R as f}from"./p-d2e11032.js";function i(i,r,e,s){return o(i)?{flex:`${f.formatCustom(i)}`}:{flexGrow:o(r)?`${f.formatCustom(r)}`:void 0,flexShrink:o(e)?`${f.formatCustom(e)}`:void 0,flexBasis:o(s)?`${f.formatCustom(s)}`:void 0}}export{i as f}