@heartlandone/vega 2.68.0 → 2.69.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 (269) hide show
  1. package/dist/cjs/{app-globals-f7106a22.js → app-globals-2dfd2b65.js} +3 -3
  2. package/dist/cjs/{design-token-e14a4e66.js → design-token-bab85370.js} +1 -1
  3. package/dist/cjs/{element-appender-slimmer-7ee27ab3.js → element-appender-slimmer-2b4eccdc.js} +2 -2
  4. package/dist/cjs/{form-field-controller-slimmer-2a091912.js → form-field-controller-slimmer-f865d397.js} +1 -1
  5. package/dist/cjs/{function-extension-f0e845f2.js → function-extension-7c4f55ab.js} +9 -6
  6. package/dist/cjs/index-58ea899e.js +2 -2
  7. package/dist/cjs/index.cjs.js +5 -5
  8. package/dist/cjs/{language-extension-d0103d1a.js → language-extension-9f771818.js} +1 -1
  9. package/dist/cjs/loader.cjs.js +5 -5
  10. package/dist/cjs/{responsive-format-facade-347db035.js → responsive-format-facade-d673f4bd.js} +2 -2
  11. package/dist/cjs/{style-formatter-0a09f0dd.js → style-formatter-72a8b6ac.js} +1 -1
  12. package/dist/cjs/{translation-f5adcb9f.js → translation-5f9f9c0c.js} +2 -0
  13. package/dist/cjs/{translation-slimmer-4b6239d1.js → translation-slimmer-f0ebe710.js} +1 -1
  14. package/dist/cjs/vega-accordion.cjs.entry.js +4 -4
  15. package/dist/cjs/vega-app-header-button.cjs.entry.js +4 -4
  16. package/dist/cjs/vega-box.cjs.entry.js +5 -5
  17. package/dist/cjs/vega-button-circle.cjs.entry.js +4 -4
  18. package/dist/cjs/vega-button.cjs.entry.js +3 -3
  19. package/dist/cjs/vega-calendar_4.cjs.entry.js +9 -7
  20. package/dist/cjs/vega-card.cjs.entry.js +4 -4
  21. package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
  22. package/dist/cjs/vega-checkbox_2.cjs.entry.js +2 -2
  23. package/dist/cjs/vega-chip.cjs.entry.js +4 -4
  24. package/dist/cjs/vega-code-block.cjs.entry.js +2 -2
  25. package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
  26. package/dist/cjs/vega-combo-box.cjs.entry.js +2 -2
  27. package/dist/cjs/vega-date-picker_2.cjs.entry.js +6 -6
  28. package/dist/cjs/vega-dialog_2.cjs.entry.js +4 -4
  29. package/dist/cjs/vega-divider.cjs.entry.js +4 -4
  30. package/dist/cjs/vega-dropdown_5.cjs.entry.js +15 -6
  31. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  32. package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
  33. package/dist/cjs/vega-flag-icon.cjs.entry.js +4 -4
  34. package/dist/cjs/vega-flex.cjs.entry.js +5 -5
  35. package/dist/cjs/vega-font.cjs.entry.js +4 -4
  36. package/dist/cjs/vega-form.cjs.entry.js +2 -2
  37. package/dist/cjs/vega-grid.cjs.entry.js +4 -4
  38. package/dist/cjs/vega-icon.cjs.entry.js +4 -4
  39. package/dist/cjs/vega-image-uploader.cjs.entry.js +5 -5
  40. package/dist/cjs/vega-input-credit-card.cjs.entry.js +2 -2
  41. package/dist/cjs/vega-input-numeric.cjs.entry.js +2 -2
  42. package/dist/cjs/vega-input-passcode.cjs.entry.js +2 -2
  43. package/dist/cjs/vega-input-phone-number.cjs.entry.js +3 -3
  44. package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
  45. package/dist/cjs/vega-input-select.cjs.entry.js +139 -13
  46. package/dist/cjs/vega-input.cjs.entry.js +89 -29
  47. package/dist/cjs/vega-left-nav_5.cjs.entry.js +4 -4
  48. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  49. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
  50. package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
  51. package/dist/cjs/vega-popover_2.cjs.entry.js +5 -5
  52. package/dist/cjs/vega-radio_2.cjs.entry.js +2 -2
  53. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +3 -3
  54. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +4 -4
  55. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +2 -2
  56. package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
  57. package/dist/cjs/vega-signature-capture.cjs.entry.js +8 -6
  58. package/dist/cjs/vega-stepper.cjs.entry.js +2 -2
  59. package/dist/cjs/vega-tab-group_2.cjs.entry.js +1 -1
  60. package/dist/cjs/{vega-table_8.cjs.entry.js → vega-table_11.cjs.entry.js} +745 -318
  61. package/dist/cjs/vega-textarea.cjs.entry.js +3 -3
  62. package/dist/cjs/vega-time-picker_2.cjs.entry.js +6 -6
  63. package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
  64. package/dist/cjs/vega-tooltip_2.cjs.entry.js +4 -4
  65. package/dist/cjs/vega.cjs.js +5 -5
  66. package/dist/collection/collection-manifest.json +6 -0
  67. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/timed-event/layout/day-view-timed-event-layout-column.js +3 -1
  68. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/timed-event/vega-calendar-day-event-layout-renderer.js +4 -4
  69. package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-selected-controller.js +4 -1
  70. package/dist/collection/components/vega-dropdown/vega-dropdown.js +27 -0
  71. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-password-eye-renderer.js +41 -0
  72. package/dist/collection/components/vega-input/vega-input.css +13 -0
  73. package/dist/collection/components/vega-input/vega-input.js +21 -3
  74. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.js +4 -0
  75. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-value-controller.js +18 -4
  76. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +17 -3
  77. package/dist/collection/components/vega-input-select/vega-input-select.js +14 -1
  78. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.js +9 -6
  79. package/dist/collection/components/vega-signature-capture/slimmers/written-mode/controllers/written-mode-svg-controller.js +1 -0
  80. package/dist/collection/components/vega-signature-capture/slimmers/written-mode/renderers/written-mode-renderer.js +1 -0
  81. package/dist/collection/components/vega-tab-group/vega-tab-group.js +2 -2
  82. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-children-controller.js +25 -1
  83. package/dist/collection/components/vega-table/vega-table-foot/slimmers/controllers/vega-table-foot-state-controller.js +67 -0
  84. package/dist/collection/components/vega-table/vega-table-foot/vega-table-foot.css +34 -0
  85. package/dist/collection/components/vega-table/vega-table-foot/vega-table-foot.js +65 -0
  86. package/dist/collection/components/vega-table/vega-table-foot-cell/slimmers/controllers/vega-table-foot-cell-state-controller.js +43 -0
  87. package/dist/collection/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.js +32 -0
  88. package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.css +116 -0
  89. package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.js +130 -0
  90. package/dist/collection/components/vega-table/vega-table-foot-row/slimmers/controllers/vega-table-foot-row-state-controller.js +77 -0
  91. package/dist/collection/components/vega-table/vega-table-foot-row/slimmers/renderers/vega-table-foot-row-renderer.js +41 -0
  92. package/dist/collection/components/vega-table/vega-table-foot-row/vega-table-foot-row.css +52 -0
  93. package/dist/collection/components/vega-table/vega-table-foot-row/vega-table-foot-row.js +71 -0
  94. package/dist/collection/components/vega-table/vega-table.css +10 -0
  95. package/dist/collection/components/vega-table/vega-table.js +1 -1
  96. package/dist/collection/components/vega-textarea/vega-textarea.js +2 -2
  97. package/dist/collection/global/icons/eye-slash.js +3 -0
  98. package/dist/collection/global/icons/eye.js +3 -0
  99. package/dist/collection/helpers/translation/locales/en.js +2 -0
  100. package/dist/collection/helpers/translation/tests/internal-translation-controller.test.js +2 -0
  101. package/dist/collection/helpers/validator/rules/input-select-value-in-source-rule.js +85 -0
  102. package/dist/collection/helpers/validator/test/rules/input-select-value-in-source-rule.test.js +99 -0
  103. package/dist/esm/{app-globals-2f689986.js → app-globals-92d24d99.js} +3 -3
  104. package/dist/esm/{design-token-e9e6b011.js → design-token-64e09c2a.js} +1 -1
  105. package/dist/esm/{element-appender-slimmer-8dbc8387.js → element-appender-slimmer-5c85b48f.js} +2 -2
  106. package/dist/esm/{form-field-controller-slimmer-b23d9ff3.js → form-field-controller-slimmer-bf071b75.js} +1 -1
  107. package/dist/esm/{function-extension-eb1d062f.js → function-extension-7ce27a8e.js} +9 -6
  108. package/dist/esm/index-090d31ca.js +2 -2
  109. package/dist/esm/index.js +5 -5
  110. package/dist/esm/{language-extension-3331131f.js → language-extension-44413556.js} +1 -1
  111. package/dist/esm/loader.js +5 -5
  112. package/dist/esm/{responsive-format-facade-b0712993.js → responsive-format-facade-f88850c5.js} +2 -2
  113. package/dist/esm/{style-formatter-a20a1ef4.js → style-formatter-7dd2c026.js} +1 -1
  114. package/dist/esm/{translation-f10b1e19.js → translation-96e5debd.js} +2 -0
  115. package/dist/esm/{translation-slimmer-984c9ce6.js → translation-slimmer-c936cb1b.js} +1 -1
  116. package/dist/esm/vega-accordion.entry.js +4 -4
  117. package/dist/esm/vega-app-header-button.entry.js +4 -4
  118. package/dist/esm/vega-box.entry.js +5 -5
  119. package/dist/esm/vega-button-circle.entry.js +4 -4
  120. package/dist/esm/vega-button.entry.js +3 -3
  121. package/dist/esm/vega-calendar_4.entry.js +9 -7
  122. package/dist/esm/vega-card.entry.js +4 -4
  123. package/dist/esm/vega-carousel.entry.js +3 -3
  124. package/dist/esm/vega-checkbox_2.entry.js +2 -2
  125. package/dist/esm/vega-chip.entry.js +4 -4
  126. package/dist/esm/vega-code-block.entry.js +2 -2
  127. package/dist/esm/vega-color-picker.entry.js +2 -2
  128. package/dist/esm/vega-combo-box.entry.js +2 -2
  129. package/dist/esm/vega-date-picker_2.entry.js +6 -6
  130. package/dist/esm/vega-dialog_2.entry.js +4 -4
  131. package/dist/esm/vega-divider.entry.js +4 -4
  132. package/dist/esm/vega-dropdown_5.entry.js +15 -6
  133. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  134. package/dist/esm/vega-file-uploader.entry.js +3 -3
  135. package/dist/esm/vega-flag-icon.entry.js +4 -4
  136. package/dist/esm/vega-flex.entry.js +5 -5
  137. package/dist/esm/vega-font.entry.js +4 -4
  138. package/dist/esm/vega-form.entry.js +2 -2
  139. package/dist/esm/vega-grid.entry.js +4 -4
  140. package/dist/esm/vega-icon.entry.js +4 -4
  141. package/dist/esm/vega-image-uploader.entry.js +5 -5
  142. package/dist/esm/vega-input-credit-card.entry.js +2 -2
  143. package/dist/esm/vega-input-numeric.entry.js +2 -2
  144. package/dist/esm/vega-input-passcode.entry.js +2 -2
  145. package/dist/esm/vega-input-phone-number.entry.js +3 -3
  146. package/dist/esm/vega-input-range.entry.js +3 -3
  147. package/dist/esm/vega-input-select.entry.js +139 -13
  148. package/dist/esm/vega-input.entry.js +90 -30
  149. package/dist/esm/vega-left-nav_5.entry.js +4 -4
  150. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  151. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
  152. package/dist/esm/vega-pagination.entry.js +4 -4
  153. package/dist/esm/vega-popover_2.entry.js +5 -5
  154. package/dist/esm/vega-radio_2.entry.js +2 -2
  155. package/dist/esm/vega-rich-text-editor_4.entry.js +3 -3
  156. package/dist/esm/vega-selection-chip_2.entry.js +4 -4
  157. package/dist/esm/vega-selection-tile_2.entry.js +2 -2
  158. package/dist/esm/vega-sidenav_3.entry.js +3 -3
  159. package/dist/esm/vega-signature-capture.entry.js +8 -6
  160. package/dist/esm/vega-stepper.entry.js +2 -2
  161. package/dist/esm/vega-tab-group_2.entry.js +1 -1
  162. package/dist/esm/{vega-table_8.entry.js → vega-table_11.entry.js} +743 -319
  163. package/dist/esm/vega-textarea.entry.js +3 -3
  164. package/dist/esm/vega-time-picker_2.entry.js +6 -6
  165. package/dist/esm/vega-toggle-switch.entry.js +2 -2
  166. package/dist/esm/vega-tooltip_2.entry.js +4 -4
  167. package/dist/esm/vega.js +5 -5
  168. package/dist/sri/vega-sri-manifest.json +216 -216
  169. package/dist/types/components/vega-calendar/slimmers/day-view/renderers/timed-event/vega-calendar-day-event-layout-renderer.d.ts +1 -1
  170. package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-selected-controller.d.ts +1 -0
  171. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +6 -0
  172. package/dist/types/components/vega-input/slimmers/renderers/vega-input-password-eye-renderer.d.ts +9 -0
  173. package/dist/types/components/vega-input/vega-input.d.ts +4 -0
  174. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.d.ts +1 -0
  175. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-value-controller.d.ts +1 -0
  176. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +1 -0
  177. package/dist/types/components/vega-input-select/types.d.ts +1 -0
  178. package/dist/types/components/vega-input-select/vega-input-select.d.ts +1 -0
  179. package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +1 -1
  180. package/dist/types/components/vega-table/interface.d.ts +4 -0
  181. package/dist/types/components/vega-table/slimmers/controllers/vega-table-children-controller.d.ts +9 -1
  182. package/dist/types/components/vega-table/vega-table-foot/slimmers/controllers/vega-table-foot-state-controller.d.ts +22 -0
  183. package/dist/types/components/vega-table/vega-table-foot/types.d.ts +4 -0
  184. package/dist/types/components/vega-table/vega-table-foot/vega-table-foot.d.ts +23 -0
  185. package/dist/types/components/vega-table/vega-table-foot-cell/slimmers/controllers/vega-table-foot-cell-state-controller.d.ts +10 -0
  186. package/dist/types/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.d.ts +8 -0
  187. package/dist/types/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.d.ts +45 -0
  188. package/dist/types/components/vega-table/vega-table-foot-row/slimmers/controllers/vega-table-foot-row-state-controller.d.ts +20 -0
  189. package/dist/types/components/vega-table/vega-table-foot-row/slimmers/renderers/vega-table-foot-row-renderer.d.ts +11 -0
  190. package/dist/types/components/vega-table/vega-table-foot-row/types.d.ts +4 -0
  191. package/dist/types/components/vega-table/vega-table-foot-row/vega-table-foot-row.d.ts +41 -0
  192. package/dist/types/components/vega-textarea/vega-textarea.d.ts +1 -1
  193. package/dist/types/components.d.ts +83 -4
  194. package/dist/types/global/icons/eye-slash.d.ts +3 -0
  195. package/dist/types/global/icons/eye.d.ts +3 -0
  196. package/dist/types/helpers/translation/interface.d.ts +2 -0
  197. package/dist/types/helpers/validator/rules/input-select-value-in-source-rule.d.ts +60 -0
  198. package/dist/types/helpers/validator/test/rules/input-select-value-in-source-rule.test.d.ts +1 -0
  199. package/dist/vega/index.esm.js +1 -1
  200. package/dist/vega/{p-bb0f2b5f.entry.js → p-001a56b3.entry.js} +1 -1
  201. package/dist/vega/{p-b78670c9.entry.js → p-04134522.entry.js} +1 -1
  202. package/dist/vega/{p-2c945862.entry.js → p-05d64537.entry.js} +1 -1
  203. package/dist/vega/{p-7dde3be9.entry.js → p-0cefecb6.entry.js} +1 -1
  204. package/dist/vega/{p-018d70a5.js → p-0fe9cff6.js} +1 -1
  205. package/dist/vega/{p-a6fb5a40.entry.js → p-1d5f57ec.entry.js} +1 -1
  206. package/dist/vega/{p-9fb6fbcc.js → p-1f26de89.js} +1 -1
  207. package/dist/vega/{p-76b1dae4.entry.js → p-235bf01b.entry.js} +1 -1
  208. package/dist/vega/{p-85407fb9.js → p-2c8e5ecb.js} +1 -1
  209. package/dist/vega/{p-e0979451.entry.js → p-2e6ce1e9.entry.js} +1 -1
  210. package/dist/vega/p-304275ae.entry.js +1 -0
  211. package/dist/vega/p-35cd469a.entry.js +1 -0
  212. package/dist/vega/p-366825fa.entry.js +1 -0
  213. package/dist/vega/{p-19256107.entry.js → p-3c865f86.entry.js} +1 -1
  214. package/dist/vega/{p-16d68187.js → p-3d13b234.js} +1 -1
  215. package/dist/vega/{p-56636a58.entry.js → p-3e040167.entry.js} +1 -1
  216. package/dist/vega/{p-3b800f1b.entry.js → p-45dd1adf.entry.js} +1 -1
  217. package/dist/vega/{p-b8558278.entry.js → p-4fe4d946.entry.js} +1 -1
  218. package/dist/vega/{p-238afe1b.entry.js → p-52efaadb.entry.js} +1 -1
  219. package/dist/vega/p-54776c23.entry.js +1 -0
  220. package/dist/vega/{p-99bf5993.entry.js → p-560d29f8.entry.js} +1 -1
  221. package/dist/vega/{p-48bc03fa.entry.js → p-58769a72.entry.js} +1 -1
  222. package/dist/vega/{p-de02f404.entry.js → p-5972c101.entry.js} +1 -1
  223. package/dist/vega/p-5f377954.js +1 -1
  224. package/dist/vega/p-6078bbac.entry.js +1 -0
  225. package/dist/vega/{p-6609d87e.entry.js → p-652626b6.entry.js} +1 -1
  226. package/dist/vega/{p-787caad3.entry.js → p-67db4cea.entry.js} +1 -1
  227. package/dist/vega/{p-b5060e84.entry.js → p-69335c91.entry.js} +1 -1
  228. package/dist/vega/{p-0a55f984.entry.js → p-71e36fae.entry.js} +1 -1
  229. package/dist/vega/{p-d5ff8b7f.js → p-75f981ce.js} +1 -1
  230. package/dist/vega/{p-c26332ae.entry.js → p-796d840c.entry.js} +1 -1
  231. package/dist/vega/{p-8dba59a6.entry.js → p-7a590741.entry.js} +1 -1
  232. package/dist/vega/{p-ad5393f0.entry.js → p-7b42da4f.entry.js} +1 -1
  233. package/dist/vega/{p-69d27eaf.entry.js → p-7cd09051.entry.js} +1 -1
  234. package/dist/vega/{p-83a50ac2.entry.js → p-85935dd4.entry.js} +1 -1
  235. package/dist/vega/{p-0849f85e.js → p-895560eb.js} +1 -1
  236. package/dist/vega/{p-56f77466.entry.js → p-91d71ae9.entry.js} +1 -1
  237. package/dist/vega/{p-d3905af1.entry.js → p-97e2b6c8.entry.js} +1 -1
  238. package/dist/vega/{p-626246b4.entry.js → p-997308b1.entry.js} +1 -1
  239. package/dist/vega/{p-22fe8c61.entry.js → p-9a507d97.entry.js} +1 -1
  240. package/dist/vega/{p-1dcb1fcd.entry.js → p-a31e6ff6.entry.js} +1 -1
  241. package/dist/vega/{p-24419ebe.entry.js → p-a5ec6ca4.entry.js} +1 -1
  242. package/dist/vega/{p-00376f71.entry.js → p-bcdd3495.entry.js} +1 -1
  243. package/dist/vega/{p-f0fb3fdd.entry.js → p-c4b9fbc8.entry.js} +1 -1
  244. package/dist/vega/{p-de8c5fae.entry.js → p-c73aeafc.entry.js} +1 -1
  245. package/dist/vega/{p-f3399ef1.entry.js → p-cdac385a.entry.js} +1 -1
  246. package/dist/vega/{p-94e167b8.entry.js → p-cebd6896.entry.js} +1 -1
  247. package/dist/vega/{p-1922303e.entry.js → p-d6934517.entry.js} +1 -1
  248. package/dist/vega/p-d70e178a.js +1 -0
  249. package/dist/vega/{p-1dd7f8b2.entry.js → p-dbcd70cc.entry.js} +1 -1
  250. package/dist/vega/{p-2478f65e.js → p-dda5a984.js} +1 -1
  251. package/dist/vega/{p-bd0e55a2.entry.js → p-dde03224.entry.js} +1 -1
  252. package/dist/vega/{p-a2506cb5.entry.js → p-df58f29b.entry.js} +1 -1
  253. package/dist/vega/{p-30a8d9d6.entry.js → p-e2ab52cd.entry.js} +1 -1
  254. package/dist/vega/{p-7747c163.js → p-e9c323a4.js} +1 -1
  255. package/dist/vega/{p-d67200e8.entry.js → p-ea96635b.entry.js} +1 -1
  256. package/dist/vega/{p-2e32fbe6.entry.js → p-ed111a57.entry.js} +1 -1
  257. package/dist/vega/p-f69f84a7.js +1 -0
  258. package/dist/vega/{p-c54148fb.entry.js → p-f6d84ffc.entry.js} +1 -1
  259. package/dist/vega/p-fd43d473.entry.js +1 -0
  260. package/dist/vega/vega.esm.js +1 -1
  261. package/package.json +1 -1
  262. package/dist/vega/p-113d305b.entry.js +0 -1
  263. package/dist/vega/p-16358fec.entry.js +0 -1
  264. package/dist/vega/p-240d9d35.entry.js +0 -1
  265. package/dist/vega/p-39482a1a.js +0 -1
  266. package/dist/vega/p-437f865f.js +0 -1
  267. package/dist/vega/p-634499cb.entry.js +0 -1
  268. package/dist/vega/p-705dad87.entry.js +0 -1
  269. package/dist/vega/p-8233d814.entry.js +0 -1
@@ -1 +1 @@
1
- import{V as t,I as e,c as s,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-02841589.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,a as l,b as h,F as c,c as d,d as u,e as f}from"./p-a528714c.js";import{f as m,d as p}from"./p-d9671d27.js";import{i as v,g as b}from"./p-a4670e23.js";import{c as g}from"./p-6a334573.js";import{d as R,D as j}from"./p-447c7590.js";import{f as y,d as w,g as O}from"./p-308aa2e3.js";import{V as E}from"./p-39482a1a.js";import{P as V}from"./p-7d9cd9c8.js";import{I as F}from"./p-abd7aeaa.js";import{M as I}from"./p-78a57a17.js";import{A as C}from"./p-52b8f2d2.js";import{i as S}from"./p-d27ae9ff.js";import{S as A}from"./p-fde50319.js";class k{constructor(t){this.rule=t}getStatus(t,e,s){return{canEvaluate:this.rule.canEvaluate(t,e,s),isAsync:v(this.rule.evaluate)}}shouldShowError(t,e){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,e):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 T{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,e,s){return!!this.handlers.find((i=>{const r=i.getStatus(t,e,s);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new k(t))):[]}async process(t,e,s,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,e,s);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(e,s);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=b();return this.processId=t,t}postProcess(t,e,s,i){this.processId===t&&i(e,s)}}class L{run(t){const e=t.nextElementSibling;return e&&e.querySelector(".vega-error")?e.querySelector(".vega-error"):null}}class M{run(t){let e=t.nextElementSibling;return e&&!e.classList.contains("vega-error")&&(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class D{run(t){let e=t.nextElementSibling;return e||(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class B extends t{getTranslatedMessage(t){return"string"==typeof t?E.t(t):E.t(t.key,...t.args||[])}}var H=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class U extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new B,this.fieldErrorUiControllerStrategies=[new L,new M,new D],this.initTranslationObserver()}applyInputInvalidUI(t){const e=this.getInputElementContainer();if(o.notify(R.getSubject(this.host,y),{host:this.host,showError:!0}),e&&(e.classList.add("error"),t)){this.errorMessage=t;const s=this.getErrorContainer(e);s.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),s.classList.remove("vega-hidden")}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(R.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const e of this.fieldErrorUiControllerStrategies){const s=e.run(t);if(s)return s}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const e=this.getErrorContainer(t);e&&(e.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}H([e()],U.prototype,"formFieldMessageTranslatorSlimmer",void 0),H([s()],U.prototype,"host",void 0),H([s()],U.prototype,"options",void 0);var x=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class G{constructor(t,e,s,i){var r,n;this.formFieldMessageTranslatorSlimmer=new B,this.fieldErrorUIController=new U,this.resizeObserverSlimmer=g(G,V,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const e=this.isVisible,s=t[0].contentRect.height>0;this.isVisible=s,this.isAutoValidationEnabled()&&m(this.host,"vega-form")&&e!==s&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new T,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,e)=>{let s=!0;return e?("rule"===t?e.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI(),s=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(s),o.notify(l,{host:this.host,detail:s}),s},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>t&&!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=e,this.defaultValue=s,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.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((e=>this.overrideDefaultRuleByAdditionalRule(e,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,e="rule"){const s=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,s,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,s,t,e,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((e=>e.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const e=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(e===t?[]:["touched"])}updateIsModified(t){const e=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(e===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return m(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,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 n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var e,s;if(this.shouldVisitElement(this.host,null===(e=t.option)||void 0===e?void 0:e.skipDisabled,null===(s=t.option)||void 0===s?void 0:s.skipInvisible)){const e=t.defaultValueMap,s=this.host.dataset.vegaForm,i=null==e[s]?this.getDefaultValue():e[s];"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 n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,e,s){return!(!t.dataset.vegaForm||e&&t.disabled||s&&!p(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{if(this.canSubmitFormByEvent(t)){const t=m(this.host,"vega-form",{outerMost:!0});t&&o.notify(R.getSubject(t,w),{host:this.host})}}))}canSubmitFormByEvent(t){const e="Enter"===t.key||13===t.keyCode,s=e&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return s&&t.preventDefault(),s;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return e}}overrideDefaultRuleByAdditionalRule(t,e){if(t&&e){const s=e.findIndex((e=>e instanceof F&&e instanceof t.constructor&&e.overrideDefault));if(s>-1)return e.splice(s,1)[0]}return t}}x([e()],G.prototype,"formFieldMessageTranslatorSlimmer",void 0),x([e()],G.prototype,"fieldErrorUIController",void 0),x([e()],G.prototype,"resizeObserverSlimmer",void 0);var P=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class W extends t{constructor(){super(...arguments),this.fieldErrorUIController=new U,this.handleFieldErrorMessageUpdate=t=>{const{message:e,isValid:s}=t;s?this.fieldErrorUIController.resetInputInvalidUI():this.fieldErrorUIController.applyInputInvalidUI(e)}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(u,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(u,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:e}=t,s=this.host.parentElement;return s&&s===e&&"VEGA-FIELD-ERROR"===s.tagName||this.host===e}}P([s()],W.prototype,"host",void 0),P([s()],W.prototype,"options",void 0),P([e()],W.prototype,"fieldErrorUIController",void 0),P([i("setInjectFormFieldHelper")],W.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),P([i("disconnectedCallback")],W.prototype,"handleUnregisterObserver",null);var z=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class K extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const e=await this.validator.validate(t.message);if(e){const{isValid:s,message:i}=e;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:s,message:i})}}}}registerValidInvocationObserver(){j.addUniqueObserverToNode(this.host,O,this.handleValidInvocation)}handleUnregisterObserver(){j.removeUniqueObserverFromNode(this.host,O)}}z([s()],K.prototype,"host",void 0),z([s()],K.prototype,"validator",void 0),z([i("setInjectFormFieldHelper")],K.prototype,"registerValidInvocationObserver",null),z([i("disconnectedCallback")],K.prototype,"handleUnregisterObserver",null);var N=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class X extends A{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var e;null===(e=this.validator)||void 0===e||e.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}N([s()],X.prototype,"host",void 0),N([s()],X.prototype,"validator",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"componentWillLoad",null);var q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class J extends t{constructor(t){super(),this.fieldErrorSlimmer=new W,this.formFieldValidInvokeSlimmer=new K,this.formFormStateController=new X,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,e){S(t,e,!1,((t,e)=>t===e?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(J.isValidFormField(this.host)){const{defaultValue:t}=this.options,e=new G(this.getPropertyRules(),this.host,t,this.options);e.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(f,{host:this.host,detail:t}))}}),this.validator=e,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:e}=this.options;return t.map((t=>{const s=t.dependence&&"string"==typeof t.dependence?[e(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>e(t))):[null];return t.ruleFactory(e(t.propertyName),...s)})).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})}}q([s()],J.prototype,"host",void 0),q([s({writable:!0})],J.prototype,"validationRules",void 0),q([s()],J.prototype,"disabled",void 0),q([s()],J.prototype,"autoValidation",void 0),q([s({writable:!0})],J.prototype,"isValid",void 0),q([e()],J.prototype,"fieldErrorSlimmer",void 0),q([e()],J.prototype,"formFieldValidInvokeSlimmer",void 0),q([e()],J.prototype,"mutationObserverSlimmer",void 0),q([e()],J.prototype,"formFormStateController",void 0),q([i("connectedCallback")],J.prototype,"connectedCallback",null),q([i("disconnectedCallback")],J.prototype,"disconnectedCallback",null),q([i("componentDidLoad")],J.prototype,"componentDidLoad",null),q([i("watchValidationRules")],J.prototype,"watchValidationRulesByFormControllerSlimmer",null),q([i("componentWillLoad")],J.prototype,"setInjectFormFieldHelper",null);export{J as F}
1
+ import{V as t,I as e,c as s,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-02841589.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,a as l,b as h,F as c,c as d,d as u,e as f}from"./p-a528714c.js";import{f as m,d as p}from"./p-d9671d27.js";import{i as v,g as b}from"./p-a4670e23.js";import{c as g}from"./p-6a334573.js";import{d as R,D as j}from"./p-447c7590.js";import{f as y,d as w,g as O}from"./p-308aa2e3.js";import{V as E}from"./p-f69f84a7.js";import{P as V}from"./p-7d9cd9c8.js";import{I as F}from"./p-abd7aeaa.js";import{M as I}from"./p-78a57a17.js";import{A as C}from"./p-52b8f2d2.js";import{i as S}from"./p-d27ae9ff.js";import{S as A}from"./p-fde50319.js";class k{constructor(t){this.rule=t}getStatus(t,e,s){return{canEvaluate:this.rule.canEvaluate(t,e,s),isAsync:v(this.rule.evaluate)}}shouldShowError(t,e){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,e):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 T{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,e,s){return!!this.handlers.find((i=>{const r=i.getStatus(t,e,s);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new k(t))):[]}async process(t,e,s,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,e,s);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(e,s);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=b();return this.processId=t,t}postProcess(t,e,s,i){this.processId===t&&i(e,s)}}class L{run(t){const e=t.nextElementSibling;return e&&e.querySelector(".vega-error")?e.querySelector(".vega-error"):null}}class M{run(t){let e=t.nextElementSibling;return e&&!e.classList.contains("vega-error")&&(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class D{run(t){let e=t.nextElementSibling;return e||(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class B extends t{getTranslatedMessage(t){return"string"==typeof t?E.t(t):E.t(t.key,...t.args||[])}}var H=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class U extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new B,this.fieldErrorUiControllerStrategies=[new L,new M,new D],this.initTranslationObserver()}applyInputInvalidUI(t){const e=this.getInputElementContainer();if(o.notify(R.getSubject(this.host,y),{host:this.host,showError:!0}),e&&(e.classList.add("error"),t)){this.errorMessage=t;const s=this.getErrorContainer(e);s.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),s.classList.remove("vega-hidden")}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(R.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const e of this.fieldErrorUiControllerStrategies){const s=e.run(t);if(s)return s}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const e=this.getErrorContainer(t);e&&(e.innerHTML=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}H([e()],U.prototype,"formFieldMessageTranslatorSlimmer",void 0),H([s()],U.prototype,"host",void 0),H([s()],U.prototype,"options",void 0);var x=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class G{constructor(t,e,s,i){var r,n;this.formFieldMessageTranslatorSlimmer=new B,this.fieldErrorUIController=new U,this.resizeObserverSlimmer=g(G,V,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const e=this.isVisible,s=t[0].contentRect.height>0;this.isVisible=s,this.isAutoValidationEnabled()&&m(this.host,"vega-form")&&e!==s&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new T,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,e)=>{let s=!0;return e?("rule"===t?e.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI(),s=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(s),o.notify(l,{host:this.host,detail:s}),s},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>t&&!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=e,this.defaultValue=s,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.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((e=>this.overrideDefaultRuleByAdditionalRule(e,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,e="rule"){const s=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,s,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,s,t,e,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((e=>e.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const e=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(e===t?[]:["touched"])}updateIsModified(t){const e=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(e===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return m(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,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 n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var e,s;if(this.shouldVisitElement(this.host,null===(e=t.option)||void 0===e?void 0:e.skipDisabled,null===(s=t.option)||void 0===s?void 0:s.skipInvisible)){const e=t.defaultValueMap,s=this.host.dataset.vegaForm,i=null==e[s]?this.getDefaultValue():e[s];"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 n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,e,s){return!(!t.dataset.vegaForm||e&&t.disabled||s&&!p(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{if(this.canSubmitFormByEvent(t)){const t=m(this.host,"vega-form",{outerMost:!0});t&&o.notify(R.getSubject(t,w),{host:this.host})}}))}canSubmitFormByEvent(t){const e="Enter"===t.key||13===t.keyCode,s=e&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return s&&t.preventDefault(),s;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return e}}overrideDefaultRuleByAdditionalRule(t,e){if(t&&e){const s=e.findIndex((e=>e instanceof F&&e instanceof t.constructor&&e.overrideDefault));if(s>-1)return e.splice(s,1)[0]}return t}}x([e()],G.prototype,"formFieldMessageTranslatorSlimmer",void 0),x([e()],G.prototype,"fieldErrorUIController",void 0),x([e()],G.prototype,"resizeObserverSlimmer",void 0);var P=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class W extends t{constructor(){super(...arguments),this.fieldErrorUIController=new U,this.handleFieldErrorMessageUpdate=t=>{const{message:e,isValid:s}=t;s?this.fieldErrorUIController.resetInputInvalidUI():this.fieldErrorUIController.applyInputInvalidUI(e)}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(u,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(u,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:e}=t,s=this.host.parentElement;return s&&s===e&&"VEGA-FIELD-ERROR"===s.tagName||this.host===e}}P([s()],W.prototype,"host",void 0),P([s()],W.prototype,"options",void 0),P([e()],W.prototype,"fieldErrorUIController",void 0),P([i("setInjectFormFieldHelper")],W.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),P([i("disconnectedCallback")],W.prototype,"handleUnregisterObserver",null);var z=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class K extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const e=await this.validator.validate(t.message);if(e){const{isValid:s,message:i}=e;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:s,message:i})}}}}registerValidInvocationObserver(){j.addUniqueObserverToNode(this.host,O,this.handleValidInvocation)}handleUnregisterObserver(){j.removeUniqueObserverFromNode(this.host,O)}}z([s()],K.prototype,"host",void 0),z([s()],K.prototype,"validator",void 0),z([i("setInjectFormFieldHelper")],K.prototype,"registerValidInvocationObserver",null),z([i("disconnectedCallback")],K.prototype,"handleUnregisterObserver",null);var N=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class X extends A{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var e;null===(e=this.validator)||void 0===e||e.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}N([s()],X.prototype,"host",void 0),N([s()],X.prototype,"validator",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"componentWillLoad",null);var q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class J extends t{constructor(t){super(),this.fieldErrorSlimmer=new W,this.formFieldValidInvokeSlimmer=new K,this.formFormStateController=new X,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,e){S(t,e,!1,((t,e)=>t===e?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(J.isValidFormField(this.host)){const{defaultValue:t}=this.options,e=new G(this.getPropertyRules(),this.host,t,this.options);e.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(f,{host:this.host,detail:t}))}}),this.validator=e,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:e}=this.options;return t.map((t=>{const s=t.dependence&&"string"==typeof t.dependence?[e(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>e(t))):[null];return t.ruleFactory(e(t.propertyName),...s)})).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})}}q([s()],J.prototype,"host",void 0),q([s({writable:!0})],J.prototype,"validationRules",void 0),q([s()],J.prototype,"disabled",void 0),q([s()],J.prototype,"autoValidation",void 0),q([s({writable:!0})],J.prototype,"isValid",void 0),q([e()],J.prototype,"fieldErrorSlimmer",void 0),q([e()],J.prototype,"formFieldValidInvokeSlimmer",void 0),q([e()],J.prototype,"mutationObserverSlimmer",void 0),q([e()],J.prototype,"formFormStateController",void 0),q([i("connectedCallback")],J.prototype,"connectedCallback",null),q([i("disconnectedCallback")],J.prototype,"disconnectedCallback",null),q([i("componentDidLoad")],J.prototype,"componentDidLoad",null),q([i("watchValidationRules")],J.prototype,"watchValidationRulesByFormControllerSlimmer",null),q([i("componentWillLoad")],J.prototype,"setInjectFormFieldHelper",null);export{J as F}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as s,g as h}from"./p-6b2342e0.js";import{F as r}from"./p-e77a83e4.js";import{V as a,M as l,A as o,D as c,i as p}from"./p-b1faebe0.js";import{R as n}from"./p-280cbcdb.js";import{V as d}from"./p-9ce249a9.js";import{s as v}from"./p-519a7d55.js";import{I as m}from"./p-6e1ab235.js";import{V as u,I as f}from"./p-d849e0f5.js";import{F as g}from"./p-9fb6fbcc.js";import{F as _}from"./p-a528714c.js";import{C as A}from"./p-2d0d575f.js";import{c as E}from"./p-de97c6d9.js";import{C as M}from"./p-db57dddc.js";import{f as I,E as w,C as D,D as C}from"./p-447c7590.js";import{a as Z}from"./p-8c9ea6f4.js";import{S as R}from"./p-71f9c4d4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-abd7aeaa.js";import"./p-262ec334.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-308aa2e3.js";import"./p-39482a1a.js";import"./p-7d9cd9c8.js";import"./p-b75ee3ba.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-fde50319.js";import"./p-bccee21e.js";import"./p-5f377954.js";import"./p-867a4970.js";const j=[{type:"visa",iconName:"visa",pattern:a,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999 999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"mastercard",iconName:"mastercard",pattern:l,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"amex",iconName:"amex",pattern:o,maskConfig:{type:"custom",options:{mask:"9999 999999 99999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"discover",iconName:"discover",pattern:c,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}}],N=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!1===t.autoValidation}];class b extends R{calculateCaretPosition(t,i){if(!p(i))return null;if(this.getCreditCardMaskConfig(t)){if(t.length>this.getLengthLimit())return i-(t.length-this.getLengthLimit());const e=t.substring(0,i);return i+(this.format(e).length-e.length)}return i}format(t,i){const e=this.getCreditCardMaskConfig(t);if(e){this.setMaskConfig(e.options);const s=null==i?void 0:i.caretPosition;if(t.length>this.getLengthLimit()&&p(s)){const i=[...t],e=t.length-this.getLengthLimit();return i.splice(s-e,e),i.join("")}return this.replaceMaskWithMatchedInputSlots(t,this.getMatchedInputSlotValue(t))}return t}getCreditCardType(t){return j.filter((i=>i.pattern.test(t)))[0]}}class y extends b{constructor(){super({mask:"",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")})}getCreditCardMaskConfig(t){let i;const e=this.getCreditCardType(t);return e&&(i=e.maskConfig),i}}class V extends b{constructor(t){super({mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}),this.hideCardNumberOnBlur=t}getCreditCardMaskConfig(t){let i;return this.getCreditCardType(t)&&this.hideCardNumberOnBlur&&t.trim().includes(" ")&&(i=this.generateDynamicMask(t)),i}generateDynamicMask(t){const i={type:"custom",options:{mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")},trigger:"blur"},e=t.trim().split(" "),s=e.map(((t,i)=>(i===e.length-1?"9":"X").repeat(t.length))).join(" ");return i.options.mask=s,i}}var H=function(t,i,e,s){var h,r=arguments.length,a=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,s);else for(var l=t.length-1;l>=0;l--)(h=t[l])&&(a=(r<3?h(a):r>3?h(i,e,a):h(i,e))||a);return r>3&&a&&Object.defineProperty(i,e,a),a};const T=class{constructor(s){t(this,s),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers={},this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new n:null},{propertyName:"",ruleFactory:()=>new d}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerGetter(),touchableAreaGetter:()=>this.touchableAreaGetter()}),this.changeEventEmitter=E(T,I),this.blurEventEmitter=E(T,w),this.focusEventEmitter=E(T,D),this.inputCreditCardEventPrevent=new M([I,D,w],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new u(N),this.required=!1,this.disabled=!1,this.label="",this.hint="",this.size="default",this.placeholder="",this.hideCardNumberOnBlur=!0,this.autoValidation=!0,this.validationRules=[],this.isValid=null,this.value="",this.renderInputContainer=()=>{var t;const i=(null===(t=this.getCreditCardType(this.value))||void 0===t?void 0:t.iconName)||"regular-credit-card";return e("vega-input",{label:this.label,type:"number",prefixIcon:Z.getIconKey(i),maskConfig:this.getMaskConfig(),placeholder:this.placeholder,disabled:this.disabled,size:this.size,value:this.value,hint:this.hint,required:this.required,showClearIcon:!1,ref:t=>{this.inputRef=t,C.addUniqueObserverToNode(t,I,(t=>{this.handleVegaChange(t)})),C.addUniqueObserverToNode(t,w,(()=>{this.handleVegaBlur()})),C.addUniqueObserverToNode(t,D,(()=>{this.handleVegaFocus()}))}})},this.handleVegaChange=t=>{this.value=t.detail},this.handleVegaBlur=()=>{this.blurEventEmitter.emit()},this.handleVegaFocus=()=>{this.focusEventEmitter.emit()},this.inputContainerGetter=()=>this.inputRef.shadowRoot.querySelector(".vega-input-container"),this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValidationRules(){}watchValue(t){this.changeEventEmitter.emit(t),A.notify(_,{host:this.host,detail:t})}componentDidLoad(){r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")&&this.hideCardNumberOnBlur&&this.inputRef.value&&this.value!==this.inputRef.value&&(this.value=this.inputRef.value)}render(){return v(e(s,null,this.renderInputContainer()),this.host)}getCreditCardType(t){return j.filter((i=>i.pattern.test(t)))[0]}getMaskConfig(){return[{type:"custom",trigger:"input",strategy:()=>new y},{type:"custom",trigger:"blur",strategy:()=>new V(this.hideCardNumberOnBlur)}]}get host(){return h(this)}static get watchers(){return{validationRules:["watchValidationRules"],value:["watchValue"]}}};Z.register({visa:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#00579F" rx="2"/><path fill="#fff" d="M15.474 15.792h-1.979l1.238-7.653h1.979l-1.238 7.653ZM22.647 8.326A4.877 4.877 0 0 0 20.872 8c-1.954 0-3.33 1.042-3.339 2.532-.016 1.1.986 1.71 1.735 2.076.765.375 1.026.62 1.026.953-.008.513-.619.75-1.189.75-.79 0-1.213-.123-1.857-.408l-.26-.122-.277 1.718c.464.211 1.32.4 2.207.407 2.076 0 3.428-1.026 3.444-2.613.008-.872-.52-1.54-1.66-2.085-.693-.35-1.117-.586-1.117-.944.008-.326.359-.66 1.14-.66a3.362 3.362 0 0 1 1.474.293l.18.082.268-1.653ZM25.279 13.08l.79-2.14c-.008.016.162-.448.26-.733l.138.66s.375 1.831.457 2.214h-1.645ZM27.72 8.14h-1.53c-.472 0-.831.138-1.035.635l-2.94 7.018h2.077l.416-1.148h2.54c.057.269.237 1.148.237 1.148h1.832L27.72 8.14ZM11.842 8.139l-1.938 5.219-.212-1.059c-.358-1.221-1.482-2.548-2.736-3.208l1.775 6.693h2.093l3.11-7.645h-2.092Z"/><path fill="#FAA61A" d="M8.104 8.139H4.92l-.032.154c2.483.635 4.128 2.166 4.804 4.007L9 8.782c-.114-.489-.464-.627-.896-.643Z"/></svg>',autoSize:!0},mastercard:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#000" rx="2"/><path fill="#ED0006" fill-rule="evenodd" d="M18.25 17.157a6.75 6.75 0 0 1-4.426 1.649c-3.769 0-6.824-3.09-6.824-6.903C7 8.091 10.055 5 13.824 5a6.75 6.75 0 0 1 4.426 1.649A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#F9A000" fill-rule="evenodd" d="M18.25 17.157a6.92 6.92 0 0 0 2.398-5.254 6.92 6.92 0 0 0-2.398-5.254A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#FF5E00" fill-rule="evenodd" d="M18.25 6.65a6.92 6.92 0 0 1 2.398 5.253 6.92 6.92 0 0 1-2.398 5.254 6.92 6.92 0 0 1-2.398-5.254A6.92 6.92 0 0 1 18.25 6.65Z" clip-rule="evenodd"/></svg>',autoSize:!0},amex:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><g clip-path="url(#a)"><rect width="36" height="24" fill="#016FD0" rx="2"/><path fill="#fff" d="M6.99 18.549v-5.654h5.986l.643.838.663-.838h21.729v5.264s-.569.384-1.226.39H22.754l-.724-.891v.891h-2.373v-1.521s-.325.212-1.025.212h-.808v1.309h-3.593l-.641-.855-.651.855H6.99ZM0 8.634l1.35-3.147h2.334l.767 1.763V5.487h2.902l.456 1.274.442-1.274h13.027v.64s.685-.64 1.81-.64l4.227.015.753 1.74V5.487h2.428l.669 1v-1h2.45v5.654h-2.45l-.64-1.003v1.003h-3.569l-.359-.892h-.959l-.353.892h-2.42c-.968 0-1.587-.628-1.587-.628v.628H17.63l-.725-.892v.892H3.34l-.359-.892h-.956l-.356.892H0V8.634Z"/><path fill="#016FD0" d="M1.827 6.184.006 10.417h1.185l.336-.847H3.48l.335.847h1.211L3.207 6.184h-1.38Zm.673.985.596 1.482H1.903L2.5 7.169ZM5.151 10.416V6.183l1.685.006.98 2.73.956-2.736h1.671v4.233H9.385v-3.12l-1.122 3.12h-.928L6.21 7.296v3.12H5.15ZM11.168 10.416V6.183h3.454v.947h-2.384v.724h2.328v.891h-2.328v.752h2.384v.92h-3.454ZM15.233 6.184v4.233h1.059V8.913h.445l1.27 1.504H19.3l-1.393-1.56a1.29 1.29 0 0 0 1.161-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.059.947h1.21c.29 0 .5.227.5.446 0 .28-.273.445-.485.445h-1.225v-.891ZM20.582 10.416h-1.08V6.183h1.08v4.233ZM23.144 10.416h-.233c-1.129 0-1.814-.889-1.814-2.1 0-1.24.678-2.133 2.103-2.133h1.17v1.003h-1.213c-.578 0-.988.451-.988 1.141 0 .82.468 1.165 1.142 1.165h.279l-.446.924ZM25.448 6.184l-1.82 4.233h1.185l.336-.847h1.953l.334.847h1.211l-1.819-4.233h-1.38Zm.674.985.595 1.482h-1.192l.597-1.482ZM28.77 10.416V6.183h1.345l1.718 2.66v-2.66h1.059v4.233H31.59l-1.762-2.73v2.73H28.77ZM7.715 17.825v-4.233h3.453v.947H8.784v.724h2.329v.89H8.784v.753h2.384v.919H7.715ZM24.636 17.825v-4.233h3.454v.947h-2.384v.724h2.317v.89h-2.317v.753h2.384v.919h-3.454ZM11.303 17.825l1.681-2.09-1.721-2.143h1.333l1.025 1.324 1.029-1.324h1.281l-1.699 2.116 1.685 2.117h-1.333l-.996-1.304-.971 1.304h-1.314ZM16.041 13.592v4.233h1.086v-1.337h1.114c.943 0 1.658-.5 1.658-1.472 0-.806-.56-1.424-1.52-1.424H16.04Zm1.086.957h1.174c.304 0 .522.187.522.488 0 .282-.217.487-.526.487h-1.17v-.975ZM20.359 13.592v4.233h1.058V16.32h.446l1.269 1.504h1.293l-1.393-1.56a1.29 1.29 0 0 0 1.162-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.058.947h1.21c.29 0 .501.226.501.445 0 .281-.273.446-.486.446h-1.225v-.891ZM28.58 17.825v-.92H30.7c.313 0 .449-.169.449-.354 0-.178-.136-.358-.45-.358h-.957c-.831 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.062l-.446.952H29.94c-.341 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347H28.58ZM32.464 17.825v-.92h2.118c.313 0 .45-.169.45-.354 0-.178-.136-.358-.45-.358h-.957c-.832 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.02l-.404.952h-1.783c-.34 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347h-2.256Z"/></g><defs><clipPath id="a"><rect width="36" height="24" fill="#fff" rx="2"/></clipPath></defs></svg>',autoSize:!0},discover:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#232342" rx="2"/><path fill="#fff" fill-rule="evenodd" d="M30.686 9.61c1.086 0 1.684.484 1.684 1.398a1.307 1.307 0 0 1-1.087 1.397l1.467 1.988h-1.14l-1.25-1.935h-.109v1.935h-.924V9.61h1.359Zm-.435 2.204h.272c.597 0 .869-.269.869-.752 0-.43-.272-.699-.87-.699h-.27v1.45Zm-4.129 2.579h2.608v-.806h-1.684v-1.29h1.63v-.806h-1.63v-1.074h1.684V9.61h-2.608v4.781Zm-2.716-1.559-1.25-3.223h-.978l2.01 4.889h.49l2.01-4.89h-.978l-1.304 3.225Zm-11.029-.805c0 1.343 1.087 2.471 2.445 2.471.435 0 .815-.107 1.195-.269v-1.074c-.271.322-.652.537-1.086.537-.87 0-1.576-.645-1.576-1.504v-.108c-.054-.86.652-1.612 1.521-1.665.435 0 .87.215 1.141.537V9.879c-.326-.214-.76-.268-1.14-.268-1.413-.108-2.5 1.02-2.5 2.418Zm-1.684-.591c-.543-.215-.706-.323-.706-.591.054-.323.326-.591.652-.538.271 0 .543.162.76.376l.49-.644c-.381-.323-.87-.538-1.359-.538-.76-.053-1.412.538-1.467 1.29v.054c0 .644.272 1.02 1.141 1.289.217.054.435.161.652.269a.563.563 0 0 1 .272.483c0 .376-.326.699-.652.699h-.055c-.434 0-.814-.269-.977-.645l-.598.59c.326.592.978.914 1.63.914.869.054 1.575-.59 1.63-1.45v-.162c-.055-.644-.326-.967-1.413-1.396Zm-3.15 2.954h.923V9.611h-.924v4.781ZM3.25 9.611H4.88c1.304.054 2.336 1.128 2.282 2.418 0 .698-.326 1.343-.87 1.826-.488.376-1.086.591-1.684.538H3.25V9.61Zm1.195 3.976c.435.053.924-.108 1.25-.376.326-.323.489-.753.489-1.236 0-.43-.163-.86-.49-1.182-.325-.269-.814-.43-1.249-.376h-.271v3.17h.271Z" clip-rule="evenodd"/><path fill="#FD6020" fill-rule="evenodd" d="M18.788 9.5c-1.358 0-2.499 1.075-2.499 2.471 0 1.344 1.087 2.472 2.5 2.526 1.412.053 2.498-1.075 2.553-2.472C21.287 10.628 20.2 9.5 18.788 9.5Z" clip-rule="evenodd"/></svg>',autoSize:!0},"regular-credit-card":{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" rx="2" fill=\'rgba(var(--v-regular-credit-card-bg, 205, 209, 211, 1))\'/><g clip-path="url(#a)"><path fill="rgba(var(--v-regular-credit-card-top, 252, 252, 252, 1))" d="M11 5c-1.103 0-2 .897-2 2v1h18V7c0-1.103-.897-2-2-2H11Zm16 6H9v6c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-6Zm-14.5 4h2c.275 0 .5.225.5.5s-.225.5-.5.5h-2a.501.501 0 0 1-.5-.5c0-.275.225-.5.5-.5Zm3.5.5c0-.275.225-.5.5-.5h4c.275 0 .5.225.5.5s-.225.5-.5.5h-4a.501.501 0 0 1-.5-.5Z"/></g><defs><clipPath id="a"><path d="M9 4h18v16H9z" fill=\'rgba(var(--v-regular-credit-card-bottom, 255, 255, 255, 1))\'/></clipPath></defs></svg>',autoSize:!0}}),H([f()],T.prototype,"globalSlimmers",void 0),H([m()],T.prototype,"formFieldController",void 0),H([m()],T.prototype,"changeEventEmitter",void 0),H([m()],T.prototype,"blurEventEmitter",void 0),H([m()],T.prototype,"focusEventEmitter",void 0),H([m()],T.prototype,"inputCreditCardEventPrevent",void 0),H([m()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T.style=":host{display:inline-block;width:100%;text-align:left;line-height:normal}";export{T as vega_input_credit_card}
1
+ import{r as t,c as i,h as e,H as s,g as h}from"./p-6b2342e0.js";import{F as r}from"./p-e77a83e4.js";import{V as a,M as l,A as o,D as c,i as p}from"./p-b1faebe0.js";import{R as n}from"./p-280cbcdb.js";import{V as d}from"./p-9ce249a9.js";import{s as v}from"./p-519a7d55.js";import{I as m}from"./p-6e1ab235.js";import{V as u,I as f}from"./p-d849e0f5.js";import{F as g}from"./p-1f26de89.js";import{F as _}from"./p-a528714c.js";import{C as A}from"./p-2d0d575f.js";import{c as E}from"./p-de97c6d9.js";import{C as M}from"./p-db57dddc.js";import{f as I,E as w,C as D,D as C}from"./p-447c7590.js";import{a as Z}from"./p-8c9ea6f4.js";import{S as R}from"./p-71f9c4d4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-abd7aeaa.js";import"./p-262ec334.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-308aa2e3.js";import"./p-f69f84a7.js";import"./p-7d9cd9c8.js";import"./p-b75ee3ba.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-fde50319.js";import"./p-bccee21e.js";import"./p-5f377954.js";import"./p-867a4970.js";const j=[{type:"visa",iconName:"visa",pattern:a,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999 999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"mastercard",iconName:"mastercard",pattern:l,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"amex",iconName:"amex",pattern:o,maskConfig:{type:"custom",options:{mask:"9999 999999 99999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"discover",iconName:"discover",pattern:c,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}}],N=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!1===t.autoValidation}];class b extends R{calculateCaretPosition(t,i){if(!p(i))return null;if(this.getCreditCardMaskConfig(t)){if(t.length>this.getLengthLimit())return i-(t.length-this.getLengthLimit());const e=t.substring(0,i);return i+(this.format(e).length-e.length)}return i}format(t,i){const e=this.getCreditCardMaskConfig(t);if(e){this.setMaskConfig(e.options);const s=null==i?void 0:i.caretPosition;if(t.length>this.getLengthLimit()&&p(s)){const i=[...t],e=t.length-this.getLengthLimit();return i.splice(s-e,e),i.join("")}return this.replaceMaskWithMatchedInputSlots(t,this.getMatchedInputSlotValue(t))}return t}getCreditCardType(t){return j.filter((i=>i.pattern.test(t)))[0]}}class y extends b{constructor(){super({mask:"",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")})}getCreditCardMaskConfig(t){let i;const e=this.getCreditCardType(t);return e&&(i=e.maskConfig),i}}class V extends b{constructor(t){super({mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}),this.hideCardNumberOnBlur=t}getCreditCardMaskConfig(t){let i;return this.getCreditCardType(t)&&this.hideCardNumberOnBlur&&t.trim().includes(" ")&&(i=this.generateDynamicMask(t)),i}generateDynamicMask(t){const i={type:"custom",options:{mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")},trigger:"blur"},e=t.trim().split(" "),s=e.map(((t,i)=>(i===e.length-1?"9":"X").repeat(t.length))).join(" ");return i.options.mask=s,i}}var H=function(t,i,e,s){var h,r=arguments.length,a=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,s);else for(var l=t.length-1;l>=0;l--)(h=t[l])&&(a=(r<3?h(a):r>3?h(i,e,a):h(i,e))||a);return r>3&&a&&Object.defineProperty(i,e,a),a};const T=class{constructor(s){t(this,s),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers={},this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new n:null},{propertyName:"",ruleFactory:()=>new d}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerGetter(),touchableAreaGetter:()=>this.touchableAreaGetter()}),this.changeEventEmitter=E(T,I),this.blurEventEmitter=E(T,w),this.focusEventEmitter=E(T,D),this.inputCreditCardEventPrevent=new M([I,D,w],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new u(N),this.required=!1,this.disabled=!1,this.label="",this.hint="",this.size="default",this.placeholder="",this.hideCardNumberOnBlur=!0,this.autoValidation=!0,this.validationRules=[],this.isValid=null,this.value="",this.renderInputContainer=()=>{var t;const i=(null===(t=this.getCreditCardType(this.value))||void 0===t?void 0:t.iconName)||"regular-credit-card";return e("vega-input",{label:this.label,type:"number",prefixIcon:Z.getIconKey(i),maskConfig:this.getMaskConfig(),placeholder:this.placeholder,disabled:this.disabled,size:this.size,value:this.value,hint:this.hint,required:this.required,showClearIcon:!1,ref:t=>{this.inputRef=t,C.addUniqueObserverToNode(t,I,(t=>{this.handleVegaChange(t)})),C.addUniqueObserverToNode(t,w,(()=>{this.handleVegaBlur()})),C.addUniqueObserverToNode(t,D,(()=>{this.handleVegaFocus()}))}})},this.handleVegaChange=t=>{this.value=t.detail},this.handleVegaBlur=()=>{this.blurEventEmitter.emit()},this.handleVegaFocus=()=>{this.focusEventEmitter.emit()},this.inputContainerGetter=()=>this.inputRef.shadowRoot.querySelector(".vega-input-container"),this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValidationRules(){}watchValue(t){this.changeEventEmitter.emit(t),A.notify(_,{host:this.host,detail:t})}componentDidLoad(){r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")&&this.hideCardNumberOnBlur&&this.inputRef.value&&this.value!==this.inputRef.value&&(this.value=this.inputRef.value)}render(){return v(e(s,null,this.renderInputContainer()),this.host)}getCreditCardType(t){return j.filter((i=>i.pattern.test(t)))[0]}getMaskConfig(){return[{type:"custom",trigger:"input",strategy:()=>new y},{type:"custom",trigger:"blur",strategy:()=>new V(this.hideCardNumberOnBlur)}]}get host(){return h(this)}static get watchers(){return{validationRules:["watchValidationRules"],value:["watchValue"]}}};Z.register({visa:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#00579F" rx="2"/><path fill="#fff" d="M15.474 15.792h-1.979l1.238-7.653h1.979l-1.238 7.653ZM22.647 8.326A4.877 4.877 0 0 0 20.872 8c-1.954 0-3.33 1.042-3.339 2.532-.016 1.1.986 1.71 1.735 2.076.765.375 1.026.62 1.026.953-.008.513-.619.75-1.189.75-.79 0-1.213-.123-1.857-.408l-.26-.122-.277 1.718c.464.211 1.32.4 2.207.407 2.076 0 3.428-1.026 3.444-2.613.008-.872-.52-1.54-1.66-2.085-.693-.35-1.117-.586-1.117-.944.008-.326.359-.66 1.14-.66a3.362 3.362 0 0 1 1.474.293l.18.082.268-1.653ZM25.279 13.08l.79-2.14c-.008.016.162-.448.26-.733l.138.66s.375 1.831.457 2.214h-1.645ZM27.72 8.14h-1.53c-.472 0-.831.138-1.035.635l-2.94 7.018h2.077l.416-1.148h2.54c.057.269.237 1.148.237 1.148h1.832L27.72 8.14ZM11.842 8.139l-1.938 5.219-.212-1.059c-.358-1.221-1.482-2.548-2.736-3.208l1.775 6.693h2.093l3.11-7.645h-2.092Z"/><path fill="#FAA61A" d="M8.104 8.139H4.92l-.032.154c2.483.635 4.128 2.166 4.804 4.007L9 8.782c-.114-.489-.464-.627-.896-.643Z"/></svg>',autoSize:!0},mastercard:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#000" rx="2"/><path fill="#ED0006" fill-rule="evenodd" d="M18.25 17.157a6.75 6.75 0 0 1-4.426 1.649c-3.769 0-6.824-3.09-6.824-6.903C7 8.091 10.055 5 13.824 5a6.75 6.75 0 0 1 4.426 1.649A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#F9A000" fill-rule="evenodd" d="M18.25 17.157a6.92 6.92 0 0 0 2.398-5.254 6.92 6.92 0 0 0-2.398-5.254A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#FF5E00" fill-rule="evenodd" d="M18.25 6.65a6.92 6.92 0 0 1 2.398 5.253 6.92 6.92 0 0 1-2.398 5.254 6.92 6.92 0 0 1-2.398-5.254A6.92 6.92 0 0 1 18.25 6.65Z" clip-rule="evenodd"/></svg>',autoSize:!0},amex:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><g clip-path="url(#a)"><rect width="36" height="24" fill="#016FD0" rx="2"/><path fill="#fff" d="M6.99 18.549v-5.654h5.986l.643.838.663-.838h21.729v5.264s-.569.384-1.226.39H22.754l-.724-.891v.891h-2.373v-1.521s-.325.212-1.025.212h-.808v1.309h-3.593l-.641-.855-.651.855H6.99ZM0 8.634l1.35-3.147h2.334l.767 1.763V5.487h2.902l.456 1.274.442-1.274h13.027v.64s.685-.64 1.81-.64l4.227.015.753 1.74V5.487h2.428l.669 1v-1h2.45v5.654h-2.45l-.64-1.003v1.003h-3.569l-.359-.892h-.959l-.353.892h-2.42c-.968 0-1.587-.628-1.587-.628v.628H17.63l-.725-.892v.892H3.34l-.359-.892h-.956l-.356.892H0V8.634Z"/><path fill="#016FD0" d="M1.827 6.184.006 10.417h1.185l.336-.847H3.48l.335.847h1.211L3.207 6.184h-1.38Zm.673.985.596 1.482H1.903L2.5 7.169ZM5.151 10.416V6.183l1.685.006.98 2.73.956-2.736h1.671v4.233H9.385v-3.12l-1.122 3.12h-.928L6.21 7.296v3.12H5.15ZM11.168 10.416V6.183h3.454v.947h-2.384v.724h2.328v.891h-2.328v.752h2.384v.92h-3.454ZM15.233 6.184v4.233h1.059V8.913h.445l1.27 1.504H19.3l-1.393-1.56a1.29 1.29 0 0 0 1.161-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.059.947h1.21c.29 0 .5.227.5.446 0 .28-.273.445-.485.445h-1.225v-.891ZM20.582 10.416h-1.08V6.183h1.08v4.233ZM23.144 10.416h-.233c-1.129 0-1.814-.889-1.814-2.1 0-1.24.678-2.133 2.103-2.133h1.17v1.003h-1.213c-.578 0-.988.451-.988 1.141 0 .82.468 1.165 1.142 1.165h.279l-.446.924ZM25.448 6.184l-1.82 4.233h1.185l.336-.847h1.953l.334.847h1.211l-1.819-4.233h-1.38Zm.674.985.595 1.482h-1.192l.597-1.482ZM28.77 10.416V6.183h1.345l1.718 2.66v-2.66h1.059v4.233H31.59l-1.762-2.73v2.73H28.77ZM7.715 17.825v-4.233h3.453v.947H8.784v.724h2.329v.89H8.784v.753h2.384v.919H7.715ZM24.636 17.825v-4.233h3.454v.947h-2.384v.724h2.317v.89h-2.317v.753h2.384v.919h-3.454ZM11.303 17.825l1.681-2.09-1.721-2.143h1.333l1.025 1.324 1.029-1.324h1.281l-1.699 2.116 1.685 2.117h-1.333l-.996-1.304-.971 1.304h-1.314ZM16.041 13.592v4.233h1.086v-1.337h1.114c.943 0 1.658-.5 1.658-1.472 0-.806-.56-1.424-1.52-1.424H16.04Zm1.086.957h1.174c.304 0 .522.187.522.488 0 .282-.217.487-.526.487h-1.17v-.975ZM20.359 13.592v4.233h1.058V16.32h.446l1.269 1.504h1.293l-1.393-1.56a1.29 1.29 0 0 0 1.162-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.058.947h1.21c.29 0 .501.226.501.445 0 .281-.273.446-.486.446h-1.225v-.891ZM28.58 17.825v-.92H30.7c.313 0 .449-.169.449-.354 0-.178-.136-.358-.45-.358h-.957c-.831 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.062l-.446.952H29.94c-.341 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347H28.58ZM32.464 17.825v-.92h2.118c.313 0 .45-.169.45-.354 0-.178-.136-.358-.45-.358h-.957c-.832 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.02l-.404.952h-1.783c-.34 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347h-2.256Z"/></g><defs><clipPath id="a"><rect width="36" height="24" fill="#fff" rx="2"/></clipPath></defs></svg>',autoSize:!0},discover:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#232342" rx="2"/><path fill="#fff" fill-rule="evenodd" d="M30.686 9.61c1.086 0 1.684.484 1.684 1.398a1.307 1.307 0 0 1-1.087 1.397l1.467 1.988h-1.14l-1.25-1.935h-.109v1.935h-.924V9.61h1.359Zm-.435 2.204h.272c.597 0 .869-.269.869-.752 0-.43-.272-.699-.87-.699h-.27v1.45Zm-4.129 2.579h2.608v-.806h-1.684v-1.29h1.63v-.806h-1.63v-1.074h1.684V9.61h-2.608v4.781Zm-2.716-1.559-1.25-3.223h-.978l2.01 4.889h.49l2.01-4.89h-.978l-1.304 3.225Zm-11.029-.805c0 1.343 1.087 2.471 2.445 2.471.435 0 .815-.107 1.195-.269v-1.074c-.271.322-.652.537-1.086.537-.87 0-1.576-.645-1.576-1.504v-.108c-.054-.86.652-1.612 1.521-1.665.435 0 .87.215 1.141.537V9.879c-.326-.214-.76-.268-1.14-.268-1.413-.108-2.5 1.02-2.5 2.418Zm-1.684-.591c-.543-.215-.706-.323-.706-.591.054-.323.326-.591.652-.538.271 0 .543.162.76.376l.49-.644c-.381-.323-.87-.538-1.359-.538-.76-.053-1.412.538-1.467 1.29v.054c0 .644.272 1.02 1.141 1.289.217.054.435.161.652.269a.563.563 0 0 1 .272.483c0 .376-.326.699-.652.699h-.055c-.434 0-.814-.269-.977-.645l-.598.59c.326.592.978.914 1.63.914.869.054 1.575-.59 1.63-1.45v-.162c-.055-.644-.326-.967-1.413-1.396Zm-3.15 2.954h.923V9.611h-.924v4.781ZM3.25 9.611H4.88c1.304.054 2.336 1.128 2.282 2.418 0 .698-.326 1.343-.87 1.826-.488.376-1.086.591-1.684.538H3.25V9.61Zm1.195 3.976c.435.053.924-.108 1.25-.376.326-.323.489-.753.489-1.236 0-.43-.163-.86-.49-1.182-.325-.269-.814-.43-1.249-.376h-.271v3.17h.271Z" clip-rule="evenodd"/><path fill="#FD6020" fill-rule="evenodd" d="M18.788 9.5c-1.358 0-2.499 1.075-2.499 2.471 0 1.344 1.087 2.472 2.5 2.526 1.412.053 2.498-1.075 2.553-2.472C21.287 10.628 20.2 9.5 18.788 9.5Z" clip-rule="evenodd"/></svg>',autoSize:!0},"regular-credit-card":{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" rx="2" fill=\'rgba(var(--v-regular-credit-card-bg, 205, 209, 211, 1))\'/><g clip-path="url(#a)"><path fill="rgba(var(--v-regular-credit-card-top, 252, 252, 252, 1))" d="M11 5c-1.103 0-2 .897-2 2v1h18V7c0-1.103-.897-2-2-2H11Zm16 6H9v6c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-6Zm-14.5 4h2c.275 0 .5.225.5.5s-.225.5-.5.5h-2a.501.501 0 0 1-.5-.5c0-.275.225-.5.5-.5Zm3.5.5c0-.275.225-.5.5-.5h4c.275 0 .5.225.5.5s-.225.5-.5.5h-4a.501.501 0 0 1-.5-.5Z"/></g><defs><clipPath id="a"><path d="M9 4h18v16H9z" fill=\'rgba(var(--v-regular-credit-card-bottom, 255, 255, 255, 1))\'/></clipPath></defs></svg>',autoSize:!0}}),H([f()],T.prototype,"globalSlimmers",void 0),H([m()],T.prototype,"formFieldController",void 0),H([m()],T.prototype,"changeEventEmitter",void 0),H([m()],T.prototype,"blurEventEmitter",void 0),H([m()],T.prototype,"focusEventEmitter",void 0),H([m()],T.prototype,"inputCreditCardEventPrevent",void 0),H([m()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T.style=":host{display:inline-block;width:100%;text-align:left;line-height:normal}";export{T as vega_input_credit_card}
@@ -1 +1 @@
1
- import{v as t,w as e,o as a,x as r,h as s,y as o,z as n,E as i,G as u,H as d,I as l,J as m,K as p,p as c,L as f,B as b,N as $}from"./p-b1faebe0.js";import{L as v}from"./p-6e1ab235.js";import{g,c as h}from"./p-7d9cd9c8.js";import{i as x}from"./p-262ec334.js";import{F as T,b as w,c as j,d as y,e as k,T as O}from"./p-74168615.js";import{p as N}from"./p-0c667d6a.js";import{B as C}from"./p-ed45b3b6.js";import{s as E}from"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-018d70a5.js";import{F as R}from"./p-e77a83e4.js";import"./p-8c9ea6f4.js";import"./p-5d676a94.js";import"./p-d9671d27.js";import"./p-39482a1a.js";import"./p-d4893487.js";import"./p-54ae02db.js";import"./p-8506e8c3.js";class A{format(e){return t(e)?Object.keys(e).map((t=>this.formatToken(e[t],"default"!==t?t:void 0))).join(" "):this.formatToken(e)}}const I={top:"pt",bottom:"pb",left:"pl",right:"pr",x:"px",y:"py"},F=new class extends A{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-p-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${I[e]}-${t[e]}`)).join(" "):(v.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},S={top:"mt",bottom:"mb",left:"ml",right:"mr",x:"mx",y:"my"},D=new class extends A{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-m-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${S[e]}-${t[e]}`)).join(" "):(v.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},_={x:"gap-col",y:"gap-row"},B=new class extends A{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-gap-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${_[e]}-${t[e]}`)).join(" "):(v.warn(`The gap value ${t} is invalid, it must be a value of: `,s),"")}},G=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],H=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],L=new class extends A{formatToken(t,a){const r=e(a)?`${a}:`:"";return o(t)?`${r}v-grid-cols-${t}`:(v.warn(`The column value ${t} is invalid, it must be a value of: `,H),"")}},z=new class extends A{formatToken(t,a){const r=e(a)?`${a}:`:"";return n(t)?`${r}v-grid-rows-${t}`:(v.warn(`The row value ${t} is invalid, it must be a value of: `,G),"")}},J=new class{format(e){const a=g();return"number"!=typeof e&&"string"!=typeof e||isNaN(e)?"string"==typeof e&&x(e)?e:t(e)?(e=h(e))[a]:null:Number(e)}},K=new class{format(e){if(i(e))return e;if(t(e)){const t=g();return(e=h(e))[t]}return null}},V=new class extends A{formatToken(t,a){const r=e(a)?`${a}:`:"";return"string"==typeof t&&"false"===t||!1===t?`${r}v-hidden`:"string"==typeof t&&"true"===t||!0===t?`${r}v-block`:(v.warn(`The display value ${t} is invalid, it must be a boolean`),"")}},W=new class extends A{formatToken(t,a){const r=e(a)?`${a}:`:"";return u(t)?`${r}v-flex-${t}`:(v.warn(`The direction value ${t} is invalid, it must be a value of: `,T),"")}},M=new class extends A{formatToken(t,a){const r=e(a)?`${a}:`:"";return d(t)?`${r}v-items-${t}`:(v.warn(`The flex alignItem value ${t} is invalid, it must be a value of: `,w),"")}},P=new class extends A{formatToken(t,a){const r=e(a)?`${a}:`:"";return l(t)?`${r}v-justify-${this.mapInput(t)}`:(v.warn(`The flex justifyContent value ${t} is invalid, it must be a value of: `,j),"")}mapInput(t){switch(t){case"start":return"start";case"center":return"center";case"end":return"end";case"space-around":return"around";case"space-between":return"between";case"space-evenly":return"evenly"}}},U=new class extends A{formatToken(t,a){const r=e(a)?`${a}:`:"";return m(t)?`${r}v-flex-${t}`:(v.warn(`The flex flexWrap value ${t} is invalid, it must be a value of: `,y),"")}},q=new class{format(e){const a=g();return t(e)?(e=h(e))[a]:e}},Q=new class extends A{formatToken(t,a){const r=e(a)?`${a}:`:"";return p(t)?"none"==t?`${r}v-hidden`:`${r}v-${t}`:(v.warn(`The box display value ${t} is invalid, it must be a value of: `,k),"")}},X=new class{format(e){const a=g();return t(e)?(e=h(e),N(e[a])):N(e)}},Y={top:"t",right:"r",bottom:"b",left:"l","top-left":"tl","top-right":"tr","bottom-left":"bl","bottom-right":"br"},Z=new class extends A{formatToken(t,a){const r=e(a)?`${a}:`:"";return c(t)?`${r}v-${this.transformRoundedNoneAndFill(t)}`:f(t)?Object.keys(t).map((e=>`${r}v-rounded-${Y[e]}-${this.transformRoundedNoneAndFill(t[e]).replace("rounded-","")}`)).join(" "):(v.warn(`The border radius value ${t} is invalid, it must be a value of: `,b),"")}transformRoundedNoneAndFill(t){return t.replace("rounded-none","rounded-0").replace("rounded-full","rounded-9999")}},tt=new class extends A{formatToken(t,a){const r=e(a)?`${a}:`:"";return $(t)?`${r}v-text-${t}`:(v.warn(`The text align value ${t} is invalid, it must be a value of: `,O),"")}};class et{format(e){return t(e)?Object.keys(e).map((t=>this.generateCssText(this.formatToken(e[t],"default"!==t?t:void 0),t))).join(" "):this.generateCssText(this.formatToken(e))}generateCssText(t,e){let a="";return t&&(a=e&&"default"!==e?`@media (min-width:${C[e]}px){:host{${t}}}`:`:host{${t}}`),a}}const at={top:["padding-top"],bottom:["padding-bottom"],left:["padding-left"],right:["padding-right"],x:["padding-left","padding-right"],y:["padding-top","padding-bottom"]},rt=new class extends et{formatToken(t){return a(t)?`padding:${s[t]}px`:r(t)?Object.keys(t).map((e=>at[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(v.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},st={top:["margin-top"],bottom:["margin-bottom"],left:["margin-left"],right:["margin-right"],x:["margin-left","margin-right"],y:["margin-top","margin-bottom"]},ot=new class extends et{formatToken(t){return a(t)?`margin:${s[t]}px`:r(t)?Object.keys(t).map((e=>st[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(v.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},nt={top:["border-top-left-radius","border-top-right-radius"],right:["border-top-right-radius","border-bottom-right-radius"],bottom:["border-bottom-left-radius","border-bottom-right-radius"],left:["border-top-left-radius","border-bottom-left-radius"],"top-left":["border-top-left-radius"],"top-right":["border-top-right-radius"],"bottom-left":["border-bottom-left-radius"],"bottom-right":["border-bottom-right-radius"]},it=new class extends et{formatToken(t){return c(t)?`border-radius:${b[t]}px`:f(t)?this.getDirectionKeys(t).map((e=>nt[e].map((a=>`${a}:${b[t[e]]}px`)).join(";"))).join(";"):(v.warn(`The border radius value ${t} is invalid, it must be a value of: `,b),"")}getDirectionKeys(t){const e=Object.keys(t);return R.isEnabled("VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR")?E(e,(e=>t[e]),void 0,Object.keys(b)):e}},ut=new class{format(t,e){switch(e){case"padding":return F.format(t);case"margin":return D.format(t);case"gap":return B.format(t);case"gridColumn":return L.format(t);case"gridRow":return z.format(t);case"size":return J.format(t);case"translocation":return K.format(t);case"display":return V.format(t);case"flexDirection":return W.format(t);case"flexAlignItem":return M.format(t);case"flexJustifyContent":return P.format(t);case"flexWrap":return U.format(t);case"boxDisplay":return Q.format(t);case"widthAndHeight":return X.format(t);case"corners":return Z.format(t);case"textAlign":return tt.format(t);case"paddingStyle":return rt.format(t);case"marginStyle":return ot.format(t);case"cornersStyle":return it.format(t);default:throw new Error(`Invalid flag ${e} passed into ResponsiveFormatFacade`)}}formatCustom(t){return q.format(t)}};export{H as G,ut as R,G as a}
1
+ import{v as t,w as e,o as r,x as a,h as s,y as o,z as n,E as i,G as u,H as d,I as l,J as m,K as p,p as f,L as c,B as b,N as $}from"./p-b1faebe0.js";import{L as v}from"./p-6e1ab235.js";import{g,c as h}from"./p-7d9cd9c8.js";import{i as x}from"./p-262ec334.js";import{F as T,b as w,c as j,d as y,e as k,T as O}from"./p-74168615.js";import{p as N}from"./p-0c667d6a.js";import{B as C}from"./p-ed45b3b6.js";import{s as E}from"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-0fe9cff6.js";import{F as R}from"./p-e77a83e4.js";import"./p-8c9ea6f4.js";import"./p-5d676a94.js";import"./p-d9671d27.js";import"./p-f69f84a7.js";import"./p-d4893487.js";import"./p-54ae02db.js";import"./p-8506e8c3.js";class A{format(e){return t(e)?Object.keys(e).map((t=>this.formatToken(e[t],"default"!==t?t:void 0))).join(" "):this.formatToken(e)}}const I={top:"pt",bottom:"pb",left:"pl",right:"pr",x:"px",y:"py"},F=new class extends A{formatToken(t,o){const n=e(o)?`${o}:`:"";return r(t)?`${n}v-p-${t}`:a(t)?Object.keys(t).map((e=>`${n}v-${I[e]}-${t[e]}`)).join(" "):(v.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},S={top:"mt",bottom:"mb",left:"ml",right:"mr",x:"mx",y:"my"},D=new class extends A{formatToken(t,o){const n=e(o)?`${o}:`:"";return r(t)?`${n}v-m-${t}`:a(t)?Object.keys(t).map((e=>`${n}v-${S[e]}-${t[e]}`)).join(" "):(v.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},_={x:"gap-col",y:"gap-row"},B=new class extends A{formatToken(t,o){const n=e(o)?`${o}:`:"";return r(t)?`${n}v-gap-${t}`:a(t)?Object.keys(t).map((e=>`${n}v-${_[e]}-${t[e]}`)).join(" "):(v.warn(`The gap value ${t} is invalid, it must be a value of: `,s),"")}},G=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],H=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],L=new class extends A{formatToken(t,r){const a=e(r)?`${r}:`:"";return o(t)?`${a}v-grid-cols-${t}`:(v.warn(`The column value ${t} is invalid, it must be a value of: `,H),"")}},z=new class extends A{formatToken(t,r){const a=e(r)?`${r}:`:"";return n(t)?`${a}v-grid-rows-${t}`:(v.warn(`The row value ${t} is invalid, it must be a value of: `,G),"")}},J=new class{format(e){const r=g();return"number"!=typeof e&&"string"!=typeof e||isNaN(e)?"string"==typeof e&&x(e)?e:t(e)?(e=h(e))[r]:null:Number(e)}},K=new class{format(e){if(i(e))return e;if(t(e)){const t=g();return(e=h(e))[t]}return null}},V=new class extends A{formatToken(t,r){const a=e(r)?`${r}:`:"";return"string"==typeof t&&"false"===t||!1===t?`${a}v-hidden`:"string"==typeof t&&"true"===t||!0===t?`${a}v-block`:(v.warn(`The display value ${t} is invalid, it must be a boolean`),"")}},W=new class extends A{formatToken(t,r){const a=e(r)?`${r}:`:"";return u(t)?`${a}v-flex-${t}`:(v.warn(`The direction value ${t} is invalid, it must be a value of: `,T),"")}},M=new class extends A{formatToken(t,r){const a=e(r)?`${r}:`:"";return d(t)?`${a}v-items-${t}`:(v.warn(`The flex alignItem value ${t} is invalid, it must be a value of: `,w),"")}},P=new class extends A{formatToken(t,r){const a=e(r)?`${r}:`:"";return l(t)?`${a}v-justify-${this.mapInput(t)}`:(v.warn(`The flex justifyContent value ${t} is invalid, it must be a value of: `,j),"")}mapInput(t){switch(t){case"start":return"start";case"center":return"center";case"end":return"end";case"space-around":return"around";case"space-between":return"between";case"space-evenly":return"evenly"}}},U=new class extends A{formatToken(t,r){const a=e(r)?`${r}:`:"";return m(t)?`${a}v-flex-${t}`:(v.warn(`The flex flexWrap value ${t} is invalid, it must be a value of: `,y),"")}},q=new class{format(e){const r=g();return t(e)?(e=h(e))[r]:e}},Q=new class extends A{formatToken(t,r){const a=e(r)?`${r}:`:"";return p(t)?"none"==t?`${a}v-hidden`:`${a}v-${t}`:(v.warn(`The box display value ${t} is invalid, it must be a value of: `,k),"")}},X=new class{format(e){const r=g();return t(e)?(e=h(e),N(e[r])):N(e)}},Y={top:"t",right:"r",bottom:"b",left:"l","top-left":"tl","top-right":"tr","bottom-left":"bl","bottom-right":"br"},Z=new class extends A{formatToken(t,r){const a=e(r)?`${r}:`:"";return f(t)?`${a}v-${this.transformRoundedNoneAndFill(t)}`:c(t)?Object.keys(t).map((e=>`${a}v-rounded-${Y[e]}-${this.transformRoundedNoneAndFill(t[e]).replace("rounded-","")}`)).join(" "):(v.warn(`The border radius value ${t} is invalid, it must be a value of: `,b),"")}transformRoundedNoneAndFill(t){return t.replace("rounded-none","rounded-0").replace("rounded-full","rounded-9999")}},tt=new class extends A{formatToken(t,r){const a=e(r)?`${r}:`:"";return $(t)?`${a}v-text-${t}`:(v.warn(`The text align value ${t} is invalid, it must be a value of: `,O),"")}};class et{format(e){return t(e)?Object.keys(e).map((t=>this.generateCssText(this.formatToken(e[t],"default"!==t?t:void 0),t))).join(" "):this.generateCssText(this.formatToken(e))}generateCssText(t,e){let r="";return t&&(r=e&&"default"!==e?`@media (min-width:${C[e]}px){:host{${t}}}`:`:host{${t}}`),r}}const rt={top:["padding-top"],bottom:["padding-bottom"],left:["padding-left"],right:["padding-right"],x:["padding-left","padding-right"],y:["padding-top","padding-bottom"]},at=new class extends et{formatToken(t){return r(t)?`padding:${s[t]}px`:a(t)?Object.keys(t).map((e=>rt[e].map((r=>`${r}:${s[t[e]]}px`)).join(";"))).join(";"):(v.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},st={top:["margin-top"],bottom:["margin-bottom"],left:["margin-left"],right:["margin-right"],x:["margin-left","margin-right"],y:["margin-top","margin-bottom"]},ot=new class extends et{formatToken(t){return r(t)?`margin:${s[t]}px`:a(t)?Object.keys(t).map((e=>st[e].map((r=>`${r}:${s[t[e]]}px`)).join(";"))).join(";"):(v.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},nt={top:["border-top-left-radius","border-top-right-radius"],right:["border-top-right-radius","border-bottom-right-radius"],bottom:["border-bottom-left-radius","border-bottom-right-radius"],left:["border-top-left-radius","border-bottom-left-radius"],"top-left":["border-top-left-radius"],"top-right":["border-top-right-radius"],"bottom-left":["border-bottom-left-radius"],"bottom-right":["border-bottom-right-radius"]},it=new class extends et{formatToken(t){return f(t)?`border-radius:${b[t]}px`:c(t)?this.getDirectionKeys(t).map((e=>nt[e].map((r=>`${r}:${b[t[e]]}px`)).join(";"))).join(";"):(v.warn(`The border radius value ${t} is invalid, it must be a value of: `,b),"")}getDirectionKeys(t){const e=Object.keys(t);return R.isEnabled("VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR")?E(e,(e=>t[e]),void 0,Object.keys(b)):e}},ut=new class{format(t,e){switch(e){case"padding":return F.format(t);case"margin":return D.format(t);case"gap":return B.format(t);case"gridColumn":return L.format(t);case"gridRow":return z.format(t);case"size":return J.format(t);case"translocation":return K.format(t);case"display":return V.format(t);case"flexDirection":return W.format(t);case"flexAlignItem":return M.format(t);case"flexJustifyContent":return P.format(t);case"flexWrap":return U.format(t);case"boxDisplay":return Q.format(t);case"widthAndHeight":return X.format(t);case"corners":return Z.format(t);case"textAlign":return tt.format(t);case"paddingStyle":return at.format(t);case"marginStyle":return ot.format(t);case"cornersStyle":return it.format(t);default:throw new Error(`Invalid flag ${e} passed into ResponsiveFormatFacade`)}}formatCustom(t){return q.format(t)}};export{H as G,ut as R,G as a}
@@ -1 +1 @@
1
- import{h as t,H as e,r as i,c as s,g as r}from"./p-6b2342e0.js";import{c as n,M as o,V as a,I as h}from"./p-6e1ab235.js";import{V as p,I as l}from"./p-d849e0f5.js";import{s as d}from"./p-519a7d55.js";import{D as c,C as u,E as f,f as v,F as m,G as g}from"./p-447c7590.js";import{F as b}from"./p-a528714c.js";import{C as x}from"./p-2d0d575f.js";import{c as w}from"./p-de97c6d9.js";import{K as j}from"./p-3925c16b.js";import{C as y}from"./p-db57dddc.js";import{F as I}from"./p-9fb6fbcc.js";import{R}from"./p-280cbcdb.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-6a334573.js";import"./p-bccee21e.js";import"./p-b75ee3ba.js";import"./p-67f159c3.js";import"./p-b1faebe0.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-02841589.js";import"./p-a4670e23.js";import"./p-308aa2e3.js";import"./p-39482a1a.js";import"./p-7d9cd9c8.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-fde50319.js";var V=function(t,e,i,s){var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class C extends a{constructor(){super(...arguments),this.vegaInputRefs=[],this.focusInputPasscode=()=>{this.vegaInputRefs[0]&&this.vegaInputRefs[0].doFocus()},this.handleVegaFocus=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=null);const e=this.vegaInputValues.get(t)?t:this.valueController.getFirstEmptyIndex(),i=-1===e?this.length-1:e;this.currentIndex=i,this.vegaInputRefs[i].doFocus()},this.handleVegaBlur=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=-1)},this.handleVegaChange=t=>e=>{var i;const s=e.detail||"";if(2===s.length||1===s.length&&!this.vegaInputValues.get(t)){const e=this.generateNewInputValue(t,s);this.vegaInputValues.set(t,e),null===(i=this.vegaInputRefs[t+1])||void 0===i||i.doFocus()}},this.handleVegaPaste=()=>t=>{t.preventDefault();const e=t.detail.getData("text");this.valueController.setValuesArray(e),this.vegaInputRefs[this.value.length<this.length?this.value.length:this.length-1].doFocus()}}watchLengthAndInputType(){this.valueController.setValuesArray(this.value)}getVegaInputRefs(){return this.vegaInputRefs}getCurrentIndex(){return this.currentIndex}getInputPasscodeContainerRef(){return this.inputPasscodeContainerRef}render(){const i=Array.from({length:this.length}).map(((e,i)=>t("vega-input",{class:"small"===this.size?"small":"medium",key:i,tabIndex:0!==i?-1:null,showClearIcon:!1,disabled:this.disabled,value:this.vegaInputValues.get(i)||"",autocomplete:0===i?"one-time-code":"off",ref:t=>{this.vegaInputRefs[i]=t,c.addUniqueObserverToNode(t,u,this.handleVegaFocus(i)),c.addUniqueObserverToNode(t,f,this.handleVegaBlur(i)),c.addUniqueObserverToNode(t,v,this.handleVegaChange(i)),c.addUniqueObserverToNode(t,m,this.handleVegaPaste())},maskConfig:{type:"custom-formatter",formatter:t=>this.valueController.valueValidationFilter(t)}})));return t(e,null,this.label&&this.renderLabel(),t("vega-flex",{class:"vega-input-passcode-container",direction:"row",gap:"size-8",ref:t=>this.inputPasscodeContainerRef=t},i),this.hint&&t("vega-hint",null,this.hint))}renderLabel(){return t("vega-field-label",{onClick:this.focusInputPasscode,isFieldRequired:this.required,disabled:this.disabled,label:this.label})}generateNewInputValue(t,e){if(2===e.length){for(let i=0;i<e.length;i++)if(e[i]!==this.vegaInputValues.get(t))return e[i];return this.vegaInputValues.get(t)}return e}}V([n()],C.prototype,"host",void 0),V([n()],C.prototype,"value",void 0),V([n()],C.prototype,"label",void 0),V([n()],C.prototype,"required",void 0),V([n()],C.prototype,"length",void 0),V([n()],C.prototype,"disabled",void 0),V([n()],C.prototype,"hint",void 0),V([n()],C.prototype,"size",void 0),V([n()],C.prototype,"vegaInputValues",void 0),V([n()],C.prototype,"valueController",void 0),V([o("watchLengthAndInputType")],C.prototype,"watchLengthAndInputType",null);var A=function(t,e,i,s){var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class k extends a{componentWillLoad(){this.setValuesArray(this.value),this.value=this.vegaInputValues.join("")}watchValue(){this.setValuesArray(this.value),this.changeEventEmitter.emit(this.value),x.notify(b,{host:this.host,detail:this.value}),this.value.length===this.length&&this.completeEventEmitter.emit(this.value)}watchVegaInputValues(){for(let t=0;t<this.length;t++)this.inputPasscodeRenderer.getVegaInputRefs()[t]&&(this.inputPasscodeRenderer.getVegaInputRefs()[t].value=this.vegaInputValues.get(t)||"");this.value=this.vegaInputValues.join("")}setValuesArray(t){const e=this.valueValidationFilter(t).slice(0,this.length).split("");this.vegaInputValues.setAll(e)}valueValidationFilter(t){return t.replace("text"===this.inputType?/\s/g:/\D/g,"")}getFirstEmptyIndex(){var t;const{length:e}=this;return null!==(t=Array.from({length:e},((t,e)=>this.vegaInputValues.get(e)||"")).findIndex((t=>!t||""===t)))&&void 0!==t?t:-1}}A([n()],k.prototype,"host",void 0),A([n({writable:!0})],k.prototype,"value",void 0),A([n({writable:!0})],k.prototype,"vegaInputValues",void 0),A([n()],k.prototype,"length",void 0),A([n()],k.prototype,"inputType",void 0),A([n()],k.prototype,"inputPasscodeRenderer",void 0),A([n()],k.prototype,"changeEventEmitter",void 0),A([n()],k.prototype,"completeEventEmitter",void 0),A([o("componentWillLoad")],k.prototype,"componentWillLoad",null),A([o("watchValue")],k.prototype,"watchValue",null),A([o("watchVegaInputValues")],k.prototype,"watchVegaInputValues",null);var E=function(t,e,i,s){var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class L extends j{constructor(){super((t=>[{keyCode:"Backspace",activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.deletePasscode(e)}},{keyCode:["ArrowLeft","ArrowRight"],activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],callback:e=>{t.controlDirectionByKeyboard(e)}}])),this.deletePasscode=t=>{t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex();this.vegaInputValues.get(e)?this.vegaInputValues.withMutation((t=>{for(let i=e;i<this.length-1;i++)t[i]=t[i+1];t[this.length-1]=""})):!this.vegaInputValues.get(e)&&e>0&&(this.vegaInputValues.set(e-1,""),this.inputPasscodeRenderer.getVegaInputRefs()[e-1].doFocus())}}controlDirectionByKeyboard(t){const e=this.inputPasscodeRenderer.getCurrentIndex(),i=this.inputPasscodeRenderer.getVegaInputRefs();"ArrowLeft"===t.key&&e>0&&i[e-1].doFocus(),"ArrowRight"===t.key&&this.vegaInputValues.get(e)&&e<this.length-1&&i[e+1].doFocus()}}E([n()],L.prototype,"value",void 0),E([n()],L.prototype,"length",void 0),E([n()],L.prototype,"vegaInputValues",void 0),E([n()],L.prototype,"valueController",void 0),E([n()],L.prototype,"inputPasscodeRenderer",void 0);class z{constructor(t,e){this.length=0,this.array=[],t&&(this.array=t,this.length=t.length),e&&(this.onMutate=e)}onMutate(t){}push(...t){return this.withMutation((e=>{e.push(...t)}))}pop(){return this.withMutation((t=>{t.length>0&&t.pop()}))}set(t,e){return this.withMutation((i=>{t>=0&&(i[t]=e)}))}setAll(t){return this.withMutation((e=>{e.length=0;for(let i=0;i<t.length;i++)e[i]=t[i]}))}clear(){return this.withMutation((t=>{t.length=0}))}withMutation(t){const e=[...this.array];t(e);const i=new z(e,this.onMutate);return this.onMutate(i),i}get(t){return this.array[t]}join(t){return this.array.join(t)}toArray(){return this.array}}var F=function(t,e,i,s){var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};const O=class{constructor(t){i(this,t),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaComplete=s(this,"vegaComplete",7),this.complete=s(this,"complete",7),this.globalSlimmers={},this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new R:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputPasscodeRenderer.getInputPasscodeContainerRef(),touchableAreaGetter:()=>[...this.inputPasscodeRenderer.getVegaInputRefs()]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.keyboardController=new L,this.valueController=new k,this.inputPasscodeRenderer=new C,this.changeEventEmitter=w(O,v),this.completeEventEmitter=w(O,g),this.eventPreventSlimmer=new y([v],(()=>this.host),{useCapture:!0}),this.vegaInputValues=new z(new Array,(t=>{this.vegaInputValues=t})),this.label="",this.disabled=!1,this.size="medium",this.hint="",this.length=4,this.inputType="numeric",this.value="",this.required=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchVegaInputValues(){}watchLengthAndInputType(){}watchValue(){}watchValidationRules(){}render(){return d(this.inputPasscodeRenderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{vegaInputValues:["watchVegaInputValues"],length:["watchLengthAndInputType"],inputType:["watchLengthAndInputType"],value:["watchValue"],validationRules:["watchValidationRules"]}}};F([l()],O.prototype,"globalSlimmers",void 0),F([h()],O.prototype,"formFieldController",void 0),F([h()],O.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),F([h()],O.prototype,"keyboardController",void 0),F([h()],O.prototype,"valueController",void 0),F([h()],O.prototype,"inputPasscodeRenderer",void 0),F([h()],O.prototype,"changeEventEmitter",void 0),F([h()],O.prototype,"completeEventEmitter",void 0),F([h()],O.prototype,"eventPreventSlimmer",void 0),O.style=':host{display:inline-block}:host vega-field-label{margin-bottom:8px}:host vega-input::part(input-container){padding-left:0px;padding-right:0px}:host vega-input.small{width:38px;height:42px;box-sizing:border-box}:host vega-input.medium{width:42px;height:50px;box-sizing:border-box}:host vega-input::part(input){text-align:center}:host vega-input.small::part(input-container){padding-top:8px;padding-bottom:8px}:host vega-input.medium::part(input-container){padding-top:12px;padding-bottom:12px}:host .vega-input-passcode-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1));box-shadow:0 0 0}:host .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){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}';export{O as vega_input_passcode}
1
+ import{h as t,H as e,r as i,c as s,g as r}from"./p-6b2342e0.js";import{c as n,M as o,V as a,I as h}from"./p-6e1ab235.js";import{V as p,I as l}from"./p-d849e0f5.js";import{s as d}from"./p-519a7d55.js";import{D as c,C as u,E as f,f as v,F as m,G as g}from"./p-447c7590.js";import{F as b}from"./p-a528714c.js";import{C as x}from"./p-2d0d575f.js";import{c as w}from"./p-de97c6d9.js";import{K as j}from"./p-3925c16b.js";import{C as y}from"./p-db57dddc.js";import{F as I}from"./p-1f26de89.js";import{R}from"./p-280cbcdb.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-6a334573.js";import"./p-bccee21e.js";import"./p-b75ee3ba.js";import"./p-67f159c3.js";import"./p-b1faebe0.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-02841589.js";import"./p-a4670e23.js";import"./p-308aa2e3.js";import"./p-f69f84a7.js";import"./p-7d9cd9c8.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-fde50319.js";var V=function(t,e,i,s){var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class C extends a{constructor(){super(...arguments),this.vegaInputRefs=[],this.focusInputPasscode=()=>{this.vegaInputRefs[0]&&this.vegaInputRefs[0].doFocus()},this.handleVegaFocus=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=null);const e=this.vegaInputValues.get(t)?t:this.valueController.getFirstEmptyIndex(),i=-1===e?this.length-1:e;this.currentIndex=i,this.vegaInputRefs[i].doFocus()},this.handleVegaBlur=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=-1)},this.handleVegaChange=t=>e=>{var i;const s=e.detail||"";if(2===s.length||1===s.length&&!this.vegaInputValues.get(t)){const e=this.generateNewInputValue(t,s);this.vegaInputValues.set(t,e),null===(i=this.vegaInputRefs[t+1])||void 0===i||i.doFocus()}},this.handleVegaPaste=()=>t=>{t.preventDefault();const e=t.detail.getData("text");this.valueController.setValuesArray(e),this.vegaInputRefs[this.value.length<this.length?this.value.length:this.length-1].doFocus()}}watchLengthAndInputType(){this.valueController.setValuesArray(this.value)}getVegaInputRefs(){return this.vegaInputRefs}getCurrentIndex(){return this.currentIndex}getInputPasscodeContainerRef(){return this.inputPasscodeContainerRef}render(){const i=Array.from({length:this.length}).map(((e,i)=>t("vega-input",{class:"small"===this.size?"small":"medium",key:i,tabIndex:0!==i?-1:null,showClearIcon:!1,disabled:this.disabled,value:this.vegaInputValues.get(i)||"",autocomplete:0===i?"one-time-code":"off",ref:t=>{this.vegaInputRefs[i]=t,c.addUniqueObserverToNode(t,u,this.handleVegaFocus(i)),c.addUniqueObserverToNode(t,f,this.handleVegaBlur(i)),c.addUniqueObserverToNode(t,v,this.handleVegaChange(i)),c.addUniqueObserverToNode(t,m,this.handleVegaPaste())},maskConfig:{type:"custom-formatter",formatter:t=>this.valueController.valueValidationFilter(t)}})));return t(e,null,this.label&&this.renderLabel(),t("vega-flex",{class:"vega-input-passcode-container",direction:"row",gap:"size-8",ref:t=>this.inputPasscodeContainerRef=t},i),this.hint&&t("vega-hint",null,this.hint))}renderLabel(){return t("vega-field-label",{onClick:this.focusInputPasscode,isFieldRequired:this.required,disabled:this.disabled,label:this.label})}generateNewInputValue(t,e){if(2===e.length){for(let i=0;i<e.length;i++)if(e[i]!==this.vegaInputValues.get(t))return e[i];return this.vegaInputValues.get(t)}return e}}V([n()],C.prototype,"host",void 0),V([n()],C.prototype,"value",void 0),V([n()],C.prototype,"label",void 0),V([n()],C.prototype,"required",void 0),V([n()],C.prototype,"length",void 0),V([n()],C.prototype,"disabled",void 0),V([n()],C.prototype,"hint",void 0),V([n()],C.prototype,"size",void 0),V([n()],C.prototype,"vegaInputValues",void 0),V([n()],C.prototype,"valueController",void 0),V([o("watchLengthAndInputType")],C.prototype,"watchLengthAndInputType",null);var A=function(t,e,i,s){var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class k extends a{componentWillLoad(){this.setValuesArray(this.value),this.value=this.vegaInputValues.join("")}watchValue(){this.setValuesArray(this.value),this.changeEventEmitter.emit(this.value),x.notify(b,{host:this.host,detail:this.value}),this.value.length===this.length&&this.completeEventEmitter.emit(this.value)}watchVegaInputValues(){for(let t=0;t<this.length;t++)this.inputPasscodeRenderer.getVegaInputRefs()[t]&&(this.inputPasscodeRenderer.getVegaInputRefs()[t].value=this.vegaInputValues.get(t)||"");this.value=this.vegaInputValues.join("")}setValuesArray(t){const e=this.valueValidationFilter(t).slice(0,this.length).split("");this.vegaInputValues.setAll(e)}valueValidationFilter(t){return t.replace("text"===this.inputType?/\s/g:/\D/g,"")}getFirstEmptyIndex(){var t;const{length:e}=this;return null!==(t=Array.from({length:e},((t,e)=>this.vegaInputValues.get(e)||"")).findIndex((t=>!t||""===t)))&&void 0!==t?t:-1}}A([n()],k.prototype,"host",void 0),A([n({writable:!0})],k.prototype,"value",void 0),A([n({writable:!0})],k.prototype,"vegaInputValues",void 0),A([n()],k.prototype,"length",void 0),A([n()],k.prototype,"inputType",void 0),A([n()],k.prototype,"inputPasscodeRenderer",void 0),A([n()],k.prototype,"changeEventEmitter",void 0),A([n()],k.prototype,"completeEventEmitter",void 0),A([o("componentWillLoad")],k.prototype,"componentWillLoad",null),A([o("watchValue")],k.prototype,"watchValue",null),A([o("watchVegaInputValues")],k.prototype,"watchVegaInputValues",null);var E=function(t,e,i,s){var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};class L extends j{constructor(){super((t=>[{keyCode:"Backspace",activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.deletePasscode(e)}},{keyCode:["ArrowLeft","ArrowRight"],activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],callback:e=>{t.controlDirectionByKeyboard(e)}}])),this.deletePasscode=t=>{t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex();this.vegaInputValues.get(e)?this.vegaInputValues.withMutation((t=>{for(let i=e;i<this.length-1;i++)t[i]=t[i+1];t[this.length-1]=""})):!this.vegaInputValues.get(e)&&e>0&&(this.vegaInputValues.set(e-1,""),this.inputPasscodeRenderer.getVegaInputRefs()[e-1].doFocus())}}controlDirectionByKeyboard(t){const e=this.inputPasscodeRenderer.getCurrentIndex(),i=this.inputPasscodeRenderer.getVegaInputRefs();"ArrowLeft"===t.key&&e>0&&i[e-1].doFocus(),"ArrowRight"===t.key&&this.vegaInputValues.get(e)&&e<this.length-1&&i[e+1].doFocus()}}E([n()],L.prototype,"value",void 0),E([n()],L.prototype,"length",void 0),E([n()],L.prototype,"vegaInputValues",void 0),E([n()],L.prototype,"valueController",void 0),E([n()],L.prototype,"inputPasscodeRenderer",void 0);class z{constructor(t,e){this.length=0,this.array=[],t&&(this.array=t,this.length=t.length),e&&(this.onMutate=e)}onMutate(t){}push(...t){return this.withMutation((e=>{e.push(...t)}))}pop(){return this.withMutation((t=>{t.length>0&&t.pop()}))}set(t,e){return this.withMutation((i=>{t>=0&&(i[t]=e)}))}setAll(t){return this.withMutation((e=>{e.length=0;for(let i=0;i<t.length;i++)e[i]=t[i]}))}clear(){return this.withMutation((t=>{t.length=0}))}withMutation(t){const e=[...this.array];t(e);const i=new z(e,this.onMutate);return this.onMutate(i),i}get(t){return this.array[t]}join(t){return this.array.join(t)}toArray(){return this.array}}var F=function(t,e,i,s){var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};const O=class{constructor(t){i(this,t),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaComplete=s(this,"vegaComplete",7),this.complete=s(this,"complete",7),this.globalSlimmers={},this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new R:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputPasscodeRenderer.getInputPasscodeContainerRef(),touchableAreaGetter:()=>[...this.inputPasscodeRenderer.getVegaInputRefs()]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.keyboardController=new L,this.valueController=new k,this.inputPasscodeRenderer=new C,this.changeEventEmitter=w(O,v),this.completeEventEmitter=w(O,g),this.eventPreventSlimmer=new y([v],(()=>this.host),{useCapture:!0}),this.vegaInputValues=new z(new Array,(t=>{this.vegaInputValues=t})),this.label="",this.disabled=!1,this.size="medium",this.hint="",this.length=4,this.inputType="numeric",this.value="",this.required=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchVegaInputValues(){}watchLengthAndInputType(){}watchValue(){}watchValidationRules(){}render(){return d(this.inputPasscodeRenderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{vegaInputValues:["watchVegaInputValues"],length:["watchLengthAndInputType"],inputType:["watchLengthAndInputType"],value:["watchValue"],validationRules:["watchValidationRules"]}}};F([l()],O.prototype,"globalSlimmers",void 0),F([h()],O.prototype,"formFieldController",void 0),F([h()],O.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),F([h()],O.prototype,"keyboardController",void 0),F([h()],O.prototype,"valueController",void 0),F([h()],O.prototype,"inputPasscodeRenderer",void 0),F([h()],O.prototype,"changeEventEmitter",void 0),F([h()],O.prototype,"completeEventEmitter",void 0),F([h()],O.prototype,"eventPreventSlimmer",void 0),O.style=':host{display:inline-block}:host vega-field-label{margin-bottom:8px}:host vega-input::part(input-container){padding-left:0px;padding-right:0px}:host vega-input.small{width:38px;height:42px;box-sizing:border-box}:host vega-input.medium{width:42px;height:50px;box-sizing:border-box}:host vega-input::part(input){text-align:center}:host vega-input.small::part(input-container){padding-top:8px;padding-bottom:8px}:host vega-input.medium::part(input-container){padding-top:12px;padding-bottom:12px}:host .vega-input-passcode-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1));box-shadow:0 0 0}:host .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){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}';export{O as vega_input_passcode}
@@ -0,0 +1 @@
1
+ import{h as e,H as t,r as i,c as s,g as o}from"./p-6b2342e0.js";import{R as r}from"./p-280cbcdb.js";import{s as a}from"./p-519a7d55.js";import{P as n,g as l}from"./p-7d9cd9c8.js";import{c as p,V as d,M as h,L as c,I as v}from"./p-6e1ab235.js";import{a as f}from"./p-d9671d27.js";import{R as u}from"./p-2c8e5ecb.js";import{D as g,u as m,p as x,q as b,V as w,s as y,t as j,r as I,d as R,f as S,n as D,I as C,J as E}from"./p-447c7590.js";import{V as O,I as V}from"./p-d849e0f5.js";import{j as z,k as L,l as T}from"./p-308aa2e3.js";import{i as k}from"./p-d27ae9ff.js";import{C as A}from"./p-2d0d575f.js";import{F as P}from"./p-a528714c.js";import{c as _}from"./p-86194314.js";import{c as N}from"./p-1ec763ab.js";import{c as B}from"./p-613ddaab.js";import{a as F}from"./p-8c9ea6f4.js";import{F as U}from"./p-1f26de89.js";import{c as G}from"./p-de97c6d9.js";import{C as K}from"./p-db57dddc.js";import{Q as M,U as q}from"./p-b1faebe0.js";import{M as $}from"./p-78a57a17.js";import{T as H}from"./p-52b8f2d2.js";import{T as W}from"./p-75f981ce.js";import{r as J}from"./p-77e64f26.js";import{I as Q}from"./p-abd7aeaa.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-5f377954.js";import"./p-0fe9cff6.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-4c192985.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-54ae02db.js";import"./p-bccee21e.js";import"./p-d4893487.js";import"./p-8506e8c3.js";import"./p-02841589.js";import"./p-bf19682d.js";import"./p-a7b5f497.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-5d676a94.js";import"./p-f69f84a7.js";import"./p-fde50319.js";import"./p-d884c644.js";var X=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class Y extends d{constructor(){super(...arguments),this.renderErrorMessage=()=>e("div",{class:"vega-input-select-error-message"}),this.renderHelpMessage=()=>e("div",{class:"vega-input-select-hint"},this.hint),this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()}}render(){return e(t,{class:f([this.disabled?"vega-input-select-disabled":"",u.formatCustom(this.size)])},this.renderLabel(),this.dropdownRenderer.render(),this.renderErrorMessage(),this.hint&&this.renderHelpMessage())}renderLabel(){return this.label&&e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label,suffixButtonConfig:this.labelSuffixButtonConfig,ref:e=>{g.addUniqueObserverToNode(e,m,this.handleLabelButtonClick)}})}}X([p()],Y.prototype,"disabled",void 0),X([p()],Y.prototype,"size",void 0),X([p()],Y.prototype,"hint",void 0),X([p()],Y.prototype,"label",void 0),X([p()],Y.prototype,"required",void 0),X([p()],Y.prototype,"labelSuffixButtonConfig",void 0),X([p()],Y.prototype,"labelButtonClickEventEmitter",void 0),X([p({componentFieldName:"vegaInputSelectDropdownRenderer"})],Y.prototype,"dropdownRenderer",void 0);var Z=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class ee extends d{constructor(){super(...arguments),this.onDropdownShow=()=>{this.isDropdownShow=!0},this.onDropdownHide=()=>{this.isDropdownShow=!1}}addDropdownObserver(e){g.addUniqueObserverToNode(e,x,(e=>{this.onDropdownShow(),this.showEventEmitter.emit(e.detail)})),g.addUniqueObserverToNode(e,b,(e=>{this.onDropdownHide(),this.hideEventEmitter.emit(e.detail)})),g.addUniqueObserverToNode(e,w,(async e=>{this.vegaInputSelectValueController.setValue(await e.host.getSelection())})),g.addUniqueObserverToNode(e,y,(e=>{this.searchEventEmitter.emit(e.detail)})),g.addUniqueObserverToNode(e,j,(e=>{this.searchTriggerEventEmitter.emit(e.detail)})),g.addUniqueObserverToNode(e,z,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.id===e.itemKey)))).map((e=>({id:e.itemKey,displayName:e.label})));this.sourceController.appendSourceItems(t)})),g.addUniqueObserverToNode(e,I,(async()=>{this.vegaInputSelectValueController.setValue("multiple"===this.selectType?[]:"")}))}}Z([p({writable:!0})],ee.prototype,"isDropdownShow",void 0),Z([p()],ee.prototype,"vegaSearch",void 0),Z([p()],ee.prototype,"searchEventEmitter",void 0),Z([p()],ee.prototype,"searchTriggerEventEmitter",void 0),Z([p()],ee.prototype,"vegaInputSelectValueController",void 0),Z([p()],ee.prototype,"sourceController",void 0),Z([p()],ee.prototype,"source",void 0),Z([p()],ee.prototype,"showEventEmitter",void 0),Z([p()],ee.prototype,"hideEventEmitter",void 0),Z([p()],ee.prototype,"selectType",void 0);var te=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class ie extends d{constructor(){super(...arguments),this.handleValueChange=(e,t)=>{if("multiple"===this.selectType){let i;t=t,i=(e=e)?this.vegaDropdownProps.preserveValueIfNotInSource?e:e.filter((e=>this.sourceController.getItem(e))):[],k(i,t,!0)?k(i,e,!0)||this.setValue(i):(this.setValue(i),this.changeEventEmitter.emit(i),A.notify(P,{host:this.host,detail:i}))}else if(e!==t){const t=this.sourceController.getItem(e);this.setValue(this.vegaDropdownProps.preserveValueIfNotInSource?e:t?t.id:""),this.changeEventEmitter.emit(this.value),A.notify(P,{host:this.host,detail:this.value})}}}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"single":return null===e||"string"==typeof e;case"multiple":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return c.warn(`Invalid input select value ${e} for ${this.selectType} mode`),!1}}}te([p({writable:!0})],ie.prototype,"value",void 0),te([p()],ie.prototype,"selectType",void 0),te([p()],ie.prototype,"changeEventEmitter",void 0),te([p()],ie.prototype,"host",void 0),te([p()],ie.prototype,"sourceController",void 0),te([p()],ie.prototype,"vegaDropdownProps",void 0),te([h("watchValue")],ie.prototype,"handleValueChange",void 0);var se=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class oe extends d{constructor(){super(...arguments),this.renderContainer=()=>e("div",{role:"button",class:"vega-input-select-container",ref:e=>this.inputSelectContainer=e,tabIndex:0,"aria-disabled":`${this.disabled}`,onKeyDown:_(),onBlur:this.preventBlur,part:"select-container"},this.renderPrefixIcon(),this.renderSelectContainer(),this.renderToggleIcon()),this.renderPrefixIcon=()=>this.vegaInputSelectPrefixIconRenderer.render(),this.renderToggleIcon=()=>e("div",{class:"vega-input-select-toggle-icon",part:"toggle-icon-container"},e("vega-icon",{part:"toggle-icon",icon:F.getIconKey(this.isDropdownShow?"chevron-up":"chevron-down")})),this.renderSelectContainer=()=>e("div",{class:"vega-input-select-select-container"},e("div",{class:"vega-input-select-selected-box"},"multiple"===this.selectType?this.renderMultipleSelected():this.renderSingleSelected())),this.renderMultipleSelected=()=>{if(this.value.length>0){const t=this.selectedLabel(this.value);return e("span",{class:"vega-input-select-selected"},e("vega-text",{overflow:"ellipsis",tooltip:{placement:"bottom"},key:t},t))}return e("div",{class:"vega-input-select-placeholder"},this.translationSlimmer.t(this.placeholder))},this.renderSingleSelected=()=>{const t=this.sourceController.getItem(this.value);return t||this.vegaDropdownProps.preserveValueIfNotInSource&&this.value?e("span",{class:"vega-input-select-selected",part:"selected-box"},e("vega-text",{overflow:"ellipsis",tooltip:{placement:"bottom"},key:this.vegaDropdownProps.preserveValueIfNotInSource?this.value:t.displayName},this.vegaDropdownProps.preserveValueIfNotInSource?this.value:t.displayName)):e("div",{class:"vega-input-select-placeholder",part:"placeholder"},this.translationSlimmer.t(this.placeholder))},this.getVegaDropdownProperties=()=>Object.assign({searchable:!0,caseSensitive:!1},this.vegaDropdownProps)}watchVegaDropdownProps(){this.vegaDropdownProps&&void 0!==this.vegaDropdownProps.preserveValueIfNotInSource&&(this.dropdown.preserveValueIfNotInSource=this.vegaDropdownProps.preserveValueIfNotInSource,this.dropdown.selectedSourceKey=this.value)}show(){return this.dropdown.show()}hide(){return this.dropdown.hide()}getDropdownRef(){return this.dropdown}getInputSelectContainerRef(){return this.inputSelectContainer}getItemsSlotRef(){return this.itemsSlotRef}render(){return e("vega-dropdown",Object.assign({trigger:"click",source:this.getDropdownSource(),selectType:this.selectType,selectedSourceKey:this.value,matchTargetWidth:!0},this.getVegaDropdownProperties(),{ref:e=>{this.dropdown=e,this.vegaInputSelectDropdownController.addDropdownObserver(e)},isLazyLoading:this.isLazyLoading}),this.renderContainer(),this.renderItemsSlot())}renderItemsSlot(){return this.host.querySelector("[slot=items]")&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}preventBlur(e){e.stopImmediatePropagation()}getDropdownSource(){return this.source.map((e=>({key:e.id,label:e.displayName})))}}F.register({"chevron-up":N,"chevron-down":B}),se([p()],oe.prototype,"value",void 0),se([p()],oe.prototype,"source",void 0),se([p()],oe.prototype,"host",void 0),se([p()],oe.prototype,"selectType",void 0),se([p()],oe.prototype,"isDropdownShow",void 0),se([p()],oe.prototype,"vegaDropdownProps",void 0),se([p()],oe.prototype,"placeholder",void 0),se([p()],oe.prototype,"selectedLabel",void 0),se([p()],oe.prototype,"isLazyLoading",void 0),se([p()],oe.prototype,"vegaInputSelectDropdownController",void 0),se([p()],oe.prototype,"vegaInputSelectPrefixIconRenderer",void 0),se([p()],oe.prototype,"sourceController",void 0),se([p()],oe.prototype,"translationSlimmer",void 0),se([p()],oe.prototype,"disabled",void 0),se([h("watchVegaDropdownProps")],oe.prototype,"watchVegaDropdownProps",null);var re=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class ae extends d{constructor(){super(...arguments),this.hasMore=!0}componentDidLoad(){const e=this.getVirtualScroll();e&&g.addUniqueObserverToNode(e,L,this.onScrollToBottom.bind(this))}getVirtualScroll(){var e,t,i;return null===(i=null===(t=null===(e=this.vegaInputSelectDropdownRenderer.getDropdownRef().shadowRoot)||void 0===e?void 0:e.querySelector("vega-dropdown-content-box"))||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("vega-virtual-scroll")}async onScrollToBottom(e){if(this.sourceLazyLoadCallback&&this.hasMore){this.isLazyLoading=!0;const t=await this.sourceLazyLoadCallback(e.endIndex);this.hasMore=t.hasMore,t.items.length>0&&this.sourceController.appendSourceItems(t.items),this.isLazyLoading=!1}}}re([p()],ae.prototype,"sourceLazyLoadCallback",void 0),re([p({writable:!0})],ae.prototype,"isLazyLoading",void 0),re([p()],ae.prototype,"sourceController",void 0),re([p()],ae.prototype,"vegaInputSelectDropdownRenderer",void 0),re([h("componentDidLoad")],ae.prototype,"componentDidLoad",null);const ne=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Specifies whether the system should automatically carry out validation checks on the user's selection in real-time, ensuring that the input adheres to predefined criteria before submission or proceeding further",payloadValue:e=>!1===e.autoValidation},{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>0===e.source.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the input select",payloadValue:e=>e.source.length>0}];var le=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class pe extends d{constructor(){super(...arguments),this.handleSourceChange=()=>{this.host.dataset.source=JSON.stringify(this.source),this.source=M(this.source,q)?this.source:[]}}appendSourceItems(e){this.source=[...this.source,...e]}getItem(e){return this.source.find((t=>t.id===e))}}le([p()],pe.prototype,"host",void 0),le([p({writable:!0})],pe.prototype,"source",void 0),le([h("watchSource")],pe.prototype,"handleSourceChange",void 0);var de=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class he extends d{constructor(){super(...arguments),this.mutationObserver=new $({mutationFilter:H("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){const e=this.host.querySelector("[slot=items]"),t=this.vegaInputSelectDropdownRenderer.getItemsSlotRef();e&&t&&(t.remove(),this.vegaInputSelectDropdownRenderer.getDropdownRef().append(e))}}de([v()],he.prototype,"mutationObserver",void 0),de([p()],he.prototype,"host",void 0),de([p()],he.prototype,"vegaInputSelectDropdownRenderer",void 0),de([h("componentDidLoad")],he.prototype,"componentDidLoad",null);var ce=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};class ve extends d{connectedCallback(){this.remotePhoneNumberPrefixIconRenderSubject=R.getSubjectFromParentNodeByEventId(this.host,T)}callRemotePrefixIconRender(...e){if(this.remotePhoneNumberPrefixIconRenderSubject){const t=J.call(this.remotePhoneNumberPrefixIconRenderSubject,...e);if(t)return t}return null}render(){const t=this.callRemotePrefixIconRender(this.prefixIcon);return this.prefixIcon&&e("div",{class:"vega-input-select-prefix-icon"},t||e("vega-icon",{icon:this.prefixIcon,size:"size-16"}))}}ce([p()],ve.prototype,"host",void 0),ce([p()],ve.prototype,"prefixIcon",void 0),ce([h("connectedCallback")],ve.prototype,"connectedCallback",null);class fe extends Q{constructor(e){super(),this.inputSelectSourceGetter=e,this.invalidResult=e=>({isValid:!1,message:e}),this.validResult=()=>({isValid:!0,message:""})}canEvaluate(e,t){return t?this.isAcceptedInputType(e)&&!t.disabled&&t.visible:this.isAcceptedInputType(e)}evaluate(e){return"string"!=typeof e||this.inputSelectSourceGetter().find((t=>t.id===e))?Array.isArray(e)&&!e.every((e=>this.inputSelectSourceGetter().find((t=>t.id===e))))?this.invalidResult("There are values that do not exist in the source"):this.validResult():this.invalidResult("The value does not exist in the source")}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return("string"==typeof e||Array.isArray(e)&&e.every((e=>"string"==typeof e)))&&e.length>0}}var ue=function(e,t,i,s){var o,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const ge=class{constructor(e){i(this,e),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaSearch=s(this,"vegaSearch",7),this.search=s(this,"search",7),this.vegaSearchTrigger=s(this,"vegaSearchTrigger",7),this.searchTrigger=s(this,"searchTrigger",7),this.vegaShow=s(this,"vegaShow",7),this.vegaHide=s(this,"vegaHide",7),this.vegaLabelButtonClick=s(this,"vegaLabelButtonClick",7),this.labelButtonClick=s(this,"labelButtonClick",7),this.globalSlimmers={},this.translationSlimmer=new W,this.sourceController=new pe,this.vegaInputSelectRenderer=new Y,this.vegaInputSelectPrefixIconRenderer=new ve,this.vegaInputSelectDropdownController=new ee,this.vegaInputSelectValueController=new ie,this.vegaInputSelectDropdownRenderer=new oe,this.vegaInputSelectItemsSlotController=new he,this.formFieldControllerSlimmer=new U({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new r:null},{propertyName:"data-source",ruleFactory:()=>new fe((()=>this.source))}],validationRulesName:"validationRules",defaultValue:e=>"multiple"===e.selectType?[]:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaInputSelectDropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.vegaInputSelectDropdownRenderer.getInputSelectContainerRef()]}),this.pageResizeObserverSlimmer=new n,this.lazyLoadController=new ae,this.changeEventEmitter=G(ge,S),this.searchEventEmitter=G(ge,D),this.searchTriggerEventEmitter=G(ge,j),this.showEventEmitter=G(ge,C),this.hideEventEmitter=G(ge,E),this.labelButtonClickEventEmitter=G(ge,m),this.eventPrevent=new K([D,j,C,E],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new O(ne),this.isDropdownShow=!1,this.currentBreakpoint=l(),this.isLazyLoading=!1,this.label="",this.labelSuffixButtonConfig=null,this.required=!1,this.selectedLabel=e=>`${e.length} Selected`,this.selectType="single",this.source=[],this.value="multiple"===this.selectType?[]:"",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="Please select",this.vegaDropdownProps={},this.size="default"}watchSource(){}watchValue(e,t){}watchValidationRules(){}watchVegaDropdownProps(){}componentWillLoad(){}async doClose(){await this.vegaInputSelectDropdownRenderer.hide()}async doOpen(){await this.vegaInputSelectDropdownRenderer.show()}async doChange(e){this.vegaInputSelectValueController.setValue(e)}render(){return a(this.vegaInputSelectRenderer.render(),this.host)}get host(){return o(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"],vegaDropdownProps:["watchVegaDropdownProps"]}}};ue([V()],ge.prototype,"globalSlimmers",void 0),ue([v()],ge.prototype,"translationSlimmer",void 0),ue([v()],ge.prototype,"sourceController",void 0),ue([v()],ge.prototype,"vegaInputSelectRenderer",void 0),ue([v()],ge.prototype,"vegaInputSelectPrefixIconRenderer",void 0),ue([v()],ge.prototype,"vegaInputSelectDropdownController",void 0),ue([v()],ge.prototype,"vegaInputSelectValueController",void 0),ue([v()],ge.prototype,"vegaInputSelectDropdownRenderer",void 0),ue([v()],ge.prototype,"vegaInputSelectItemsSlotController",void 0),ue([v()],ge.prototype,"formFieldControllerSlimmer",void 0),ue([v()],ge.prototype,"pageResizeObserverSlimmer",void 0),ue([v()],ge.prototype,"lazyLoadController",void 0),ue([v()],ge.prototype,"changeEventEmitter",void 0),ue([v()],ge.prototype,"searchEventEmitter",void 0),ue([v()],ge.prototype,"searchTriggerEventEmitter",void 0),ue([v()],ge.prototype,"showEventEmitter",void 0),ue([v()],ge.prototype,"hideEventEmitter",void 0),ue([v()],ge.prototype,"labelButtonClickEventEmitter",void 0),ue([v()],ge.prototype,"eventPrevent",void 0),ue([v()],ge.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ge.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}:host(.default) .vega-input-select-container{padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px}:host(.small) .vega-input-select-container{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px}vega-field-label{margin-bottom:8px}:host .vega-input-select-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));border-radius:8px;gap:8px;display:block;display:flex;align-items:center;cursor:pointer}:host .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}:host .error .vega-input-select-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .error .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .error .vega-input-select-container:focus{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}:host(.vega-input-select-disabled) vega-dropdown{pointer-events:none}:host(.vega-input-select-disabled) .vega-input-select-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-input-select-disabled) .vega-input-select-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-input-select-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-input-select-select-container{flex-grow:1;min-width:0px}:host .vega-input-select-selected{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));display:block;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-selected{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.vega-input-select-disabled) .vega-input-select-selected{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:24px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-input-select-placeholder{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host .vega-input-select-prefix-icon{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}:host .vega-input-select-toggle-icon{width:16px;height:16px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-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-input-select-hint{padding-left:8px;padding-right:8px;padding-top:12px;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 .vega-input-select-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-input-select-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-input-select-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host vega-dropdown{display:block}';export{ge as vega_input_select}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as i,H as s,g as o}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as a,V as n,M as p,I as l}from"./p-6e1ab235.js";import{V as h,I as c}from"./p-d849e0f5.js";import{D as m,f,E as u}from"./p-447c7590.js";import{n as d,c as v,b as j}from"./p-262ec334.js";import{C as b}from"./p-db57dddc.js";import{c as w}from"./p-de97c6d9.js";import{F as x}from"./p-a528714c.js";import{C as y}from"./p-2d0d575f.js";import{K as R}from"./p-3925c16b.js";import{F as C}from"./p-1f26de89.js";import{R as g}from"./p-280cbcdb.js";import{c as I}from"./p-a0467b83.js";import{M as V,a as N}from"./p-f0ff4463.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-bccee21e.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-6a334573.js";import"./p-b75ee3ba.js";import"./p-67f159c3.js";import"./p-b1faebe0.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-02841589.js";import"./p-a4670e23.js";import"./p-308aa2e3.js";import"./p-f69f84a7.js";import"./p-7d9cd9c8.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-fde50319.js";var T=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class S extends n{constructor(){super(...arguments),this.onInputChange=t=>{this.valueController.updateValue(t.detail)},this.onInputBlur=t=>{const e=t.host.value.replace(/,/g,"");if(""!==e&&!isNaN(e)){let t=d(Number(e),this.min,this.max);this.integerOnly&&(t===this.min?t=Math.ceil(this.min):t===this.max&&(t=Math.floor(this.max))),t!==Number(e)&&this.valueController.updateValue(t.toString())}}}getInputRef(){return this.vegaInputRef.shadowRoot.querySelector("input")}getContainerRef(){return this.vegaInputRef.shadowRoot.querySelector(".vega-input-container")}render(){const e={thousandComma:this.thousandComma};return this.integerOnly&&(e.precision=0),t("vega-input",{value:this.value||"",showClearIcon:this.showClearIcon,disabled:this.disabled,label:this.label,hint:this.hint,required:this.required,type:"number",placeholder:this.placeholder,size:"small"===this.size?"small":"default",prefixIcon:this.prefixIcon,ref:t=>{this.vegaInputRef=t,m.addUniqueObserverToNode(t,f,(t=>this.onInputChange(t))),m.addUniqueObserverToNode(t,u,(t=>this.onInputBlur(t)))},maskConfig:{type:"number",options:e}})}}T([a()],S.prototype,"prefixIcon",void 0),T([a()],S.prototype,"showClearIcon",void 0),T([a()],S.prototype,"value",void 0),T([a()],S.prototype,"size",void 0),T([a()],S.prototype,"disabled",void 0),T([a()],S.prototype,"placeholder",void 0),T([a()],S.prototype,"label",void 0),T([a()],S.prototype,"hint",void 0),T([a()],S.prototype,"required",void 0),T([a()],S.prototype,"thousandComma",void 0),T([a()],S.prototype,"integerOnly",void 0),T([a()],S.prototype,"min",void 0),T([a()],S.prototype,"max",void 0),T([a()],S.prototype,"valueController",void 0);var O=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class k extends n{watchValue(){this.changeEventEmitter.emit(this.value),y.notify(x,{host:this.host,detail:this.value})}updateValue(t){this.value=t}}O([a()],k.prototype,"host",void 0),O([a({writable:!0})],k.prototype,"value",void 0),O([a()],k.prototype,"changeEventEmitter",void 0),O([p("watchValue")],k.prototype,"watchValue",null);var E=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class A extends R{constructor(){super((t=>[{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[t.host],callback:t.onArrowUpOrDown},{keyCode:["ArrowUp"],eventName:"keydown",activeElementInScope:[t.host],callback:t=>{t.preventDefault()}}])),this.onArrowUpOrDown=t=>{const e=t.shiftKey?this.majorIncrement:this.minorIncrement,i=v(this.value.replace(/,/g,""))||0,s=Math.max(j(i),j(e));"ArrowUp"===t.code?this.valueController.updateValue(`${(i+e).toFixed(s)}`):"ArrowDown"===t.code&&this.valueController.updateValue(`${(i-e).toFixed(s)}`)}}}E([a()],A.prototype,"host",void 0),E([a()],A.prototype,"value",void 0),E([a()],A.prototype,"minorIncrement",void 0),E([a()],A.prototype,"majorIncrement",void 0),E([a()],A.prototype,"valueController",void 0);var F=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const M=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.valueController=new k,this.keyboardController=new A,this.renderer=new S,this.changeEventEmitter=w(M,f),this.inputEventPrevent=new b([f],(()=>this.host),{useCapture:!0}),this.formFieldController=new C({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new g:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new V({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new N({maxValue:t}):null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getContainerRef(),touchableAreaGetter:()=>[this.renderer.getInputRef()],defaultValue:"",attributeGetter:t=>this[t]}),this.prefixTextNotifySlimmer=I(M,"prefixText","watchPrefixText"),this.suffixTextNotifySlimmer=I(M,"suffixText","watchSuffixText"),this.isCompactInputWidthNotifySlimmer=I(M,"isCompactInputWidth"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.isCompactInputWidth=!0,this.prefixText="",this.value="",this.size="medium",this.thousandComma=!1,this.integerOnly=!1,this.disabled=!1,this.minorIncrement=1,this.majorIncrement=10,this.label="",this.validationRules=[],this.isValid=null,this.autoValidation=!0,this.showClearIcon=!0,this.min=null,this.max=null}watchPrefixText(){}watchSuffixText(){}watchValue(){}watchValidationRules(){}render(){return r(t(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{prefixText:["watchPrefixText"],suffixText:["watchSuffixText"],value:["watchValue"],validationRules:["watchValidationRules"]}}};F([c()],M.prototype,"globalSlimmers",void 0),F([l()],M.prototype,"valueController",void 0),F([l()],M.prototype,"keyboardController",void 0),F([l()],M.prototype,"renderer",void 0),F([l()],M.prototype,"changeEventEmitter",void 0),F([l()],M.prototype,"inputEventPrevent",void 0),F([l()],M.prototype,"formFieldController",void 0),F([l()],M.prototype,"prefixTextNotifySlimmer",void 0),F([l()],M.prototype,"suffixTextNotifySlimmer",void 0),F([l()],M.prototype,"isCompactInputWidthNotifySlimmer",void 0),F([l()],M.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),M.style=":host{display:inline-block;width:100%}";export{M as vega_input_numeric}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as i,H as n,g as a}from"./p-6b2342e0.js";import{I as s}from"./p-abd7aeaa.js";import{M as r,a as o}from"./p-f0ff4463.js";import{M as p,a as l}from"./p-cdbbdcc2.js";import{R as h}from"./p-280cbcdb.js";import{s as c}from"./p-519a7d55.js";import{c as d}from"./p-86194314.js";import{C as u}from"./p-75b58efe.js";import{c as f,V as x,M as g,I as m}from"./p-6e1ab235.js";import{s as v}from"./p-6bd5c49b.js";import{V as b,I as w}from"./p-d849e0f5.js";import{F as y}from"./p-1f26de89.js";import{c as j}from"./p-de97c6d9.js";import{D as C,a as I,f as z,C as k,E as R,u as S,F as N}from"./p-447c7590.js";import{F as E}from"./p-a528714c.js";import{C as L}from"./p-2d0d575f.js";import{S as T}from"./p-71f9c4d4.js";import{S as F}from"./p-867a4970.js";import{i as O}from"./p-b1faebe0.js";import{S as V}from"./p-85f9a980.js";import{P as A}from"./p-7d9cd9c8.js";import{S as D}from"./p-fde50319.js";import{i as M}from"./p-d27ae9ff.js";import{d as P}from"./p-bf19682d.js";import{a as $}from"./p-8c9ea6f4.js";import"./p-262ec334.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-308aa2e3.js";import"./p-f69f84a7.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-bccee21e.js";import"./p-b75ee3ba.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-8350506e.js";import"./p-5d676a94.js";const _=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)])$/;class B extends s{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=_.test(t.toLowerCase());return{isValid:e,message:e?"":"Please enter the correct email format."}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t&&t.length>0}}class U extends x{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var a,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(s<3?a(r):s>3?a(e,i,r):a(e,i))||r);s>3&&r&&Object.defineProperty(e,i,r)}([f()],U.prototype,"disableCopyPaste",void 0);var W=function(t,e,i,n){var a,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(s<3?a(r):s>3?a(e,i,r):a(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class K extends x{render(){const e=this.hasPrefixSlot();if(this.prefixIcon||e)return t("div",{class:{"vega-input-prefix":!0,"vega-input-prefix-slot":e},part:"prefix-icon-container"},this.prefixIcon&&!e?t("vega-icon",{icon:this.prefixIcon,size:"size-16"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}W([f()],K.prototype,"host",void 0),W([f()],K.prototype,"prefixIcon",void 0);class q extends F{format(t){if(!t.length)return t;const e=Number(t.replace(/,/g,""));return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e.toLocaleString("en-US"):t}calculateCaretPosition(t,e){const i=this.format(t),n=t.substring(0,e),a=i.substring(0,e),s=(n.match(/,/g)||[]).length;return e+((a.match(/,/g)||[]).length-s)}}class G extends F{constructor(t){super(),this.maskConfig={allowNegative:!0},this.skipFormat=t=>this.maskConfig.allowNegative&&"-"===t||null!=this.maskConfig.precision&&this.maskConfig.precision>0&&t.split(".").length-1==1&&t.endsWith(".")&&!t.startsWith("."),this.maskConfig=Object.assign(Object.assign({},this.maskConfig),t),this.mask=new RegExp(this.getRegExp())}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t)&&i.pop()}return i.join("")}calculateCaretPosition(t,e){if(O(e)){const i=this.redressAbnormalNumber(t);return e-(t.length-i.length)}}inputNeedFormat(t){return!this.mask.test(t)}redressAbnormalNumber(t){let e=t.replace(/^0+(?!$)/,"");return e.startsWith(".")&&(e=`0${e}`),e}getRegExp(){const t=this.maskConfig.allowNegative?"(\\-)?":"";let e;return e=0===this.maskConfig.precision?`^${t}(0|[1-9][0-9]*)$`:this.maskConfig.precision&&this.maskConfig.precision>0?`^${t}(0|0\\.\\d{1,${this.maskConfig.precision}}|[1-9][0-9]*(\\.\\d{1,${this.maskConfig.precision}})?)$`:`^${t}(0|0\\.\\d*|[1-9][0-9]*(\\.\\d*)?)$`,e}}class H extends F{constructor(t,e=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(O(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class J extends G{constructor(t){super(t)}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t.replace(/,/g,""))&&i.pop()}return this.thousandCommaFormat(i.join(""))}calculateCaretPosition(t,e){const i=this.redressAbnormalNumber(t),n=this.format(t),a=t.substring(0,e),s=n.substring(0,e),r=(a.match(/,/g)||[]).length;return e+((s.match(/,/g)||[]).length-r)-(t.length-i.length)}thousandCommaFormat(t){if(!t.length)return t;const e=t.replace(/[^\d.-]/g,""),i=e.indexOf("."),n=e.length>1&&i>=1?e.slice(i):"",a=Number(e.split(".")[0]);return!isNaN(a)&&a<=Number.MAX_SAFE_INTEGER?a.toLocaleString("en-US")+n:e}}var Q=function(t,e,i,n){var a,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(s<3?a(r):s>3?a(e,i,r):a(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class X extends V{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRef,this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}watchValue(t,e){t!==e&&this.formatValueAfterValueChange()}setupStringFormatter(t){this.inputRef=t,this.setup()}generateMaskStrategy(t){let e=null;Array.isArray(this.maskConfig)?e=this.maskConfig.find((e=>"blur"===t?this.isBlurModeMaskConfig(e):!this.isBlurModeMaskConfig(e))):this.maskConfig&&("blur"===t&&this.isBlurModeMaskConfig(this.maskConfig)?e=this.maskConfig:"input"!==t||this.isBlurModeMaskConfig(this.maskConfig)||(e=this.maskConfig));let i=null;switch(null==e?void 0:e.type){case"phone":i=T.PHONE_MASK;break;case"taxId":i=T.TAX_ID_MASK;break;case"zipcode":i=T.ZIPCODE_MASK;break;case"thousand-comma":i=new q;break;case"number":i=this.getNumberTypeMaskStrategy(e.options);break;case"custom":i=e.strategy?e.strategy():new T(e.options);break;case"custom-formatter":i=new H(e.formatter,e.resetCaretPosition)}return"number"!==this.type||"input"!==t||e||(i=new G),i}getNumberTypeMaskStrategy(t){return t&&t.thousandComma?new J(t):new G(t)}isBlurModeMaskConfig(t){return"custom"===t.type&&"blur"===t.trigger}}Q([f()],X.prototype,"maskConfig",void 0),Q([f()],X.prototype,"disableCopyPaste",void 0),Q([f()],X.prototype,"type",void 0),Q([g("watchValue")],X.prototype,"watchValue",null);const Y=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!1===t.autoValidation},{payloadKey:"EMAIL_IS_TRUE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!0===t.email},{payloadKey:"EMAIL_IS_FALSE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!1===t.email}];var Z=function(t,e,i,n){var a,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(s<3?a(r):s>3?a(e,i,r):a(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class tt extends x{componentDidLoad(){this.setInputAutoWidth()}watchValue(){this.setInputAutoWidth()}watchSuffixText(){this.setInputAutoWidth()}setInputAutoWidth(){const t=this.host.shadowRoot.querySelector(".vega-input-container"),e=null==t?void 0:t.querySelector(".vega-input-input"),i=null==e?void 0:e.querySelector("input");if(i&&(t.classList.remove("auto-width"),i.style.removeProperty("width"),this.isCompactInputWidth&&this.suffixText)){const n=this.getActualInputWidth();e.getBoundingClientRect().width>n&&(i.style.width=`${n}px`,t.classList.add("auto-width"))}}getActualInputWidth(){const t=this.getCalculateTextWidthContainer();t.style.display="inline-block",t.textContent=`${this.value||this.placeholder||""}`;const e=t.getBoundingClientRect().width;return t.style.display="none",e}getCalculateTextWidthContainer(){if(!this.calculateTextWidthContainer){const t=document.createElement("div");t.classList.add("v-font-field-value"),t.style.visibility="hidden",t.style.display="none",this.host.shadowRoot.append(t),this.calculateTextWidthContainer=t}return this.calculateTextWidthContainer}}Z([f()],tt.prototype,"host",void 0),Z([f()],tt.prototype,"value",void 0),Z([f()],tt.prototype,"placeholder",void 0),Z([f()],tt.prototype,"isCompactInputWidth",void 0),Z([f()],tt.prototype,"suffixText",void 0),Z([g("componentDidLoad")],tt.prototype,"componentDidLoad",null),Z([g("watchValue")],tt.prototype,"watchValue",null),Z([g("watchSuffixText")],tt.prototype,"watchSuffixText",null);var et=function(t,e,i,n){var a,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(s<3?a(r):s>3?a(e,i,r):a(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class it extends D{constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"prefixText",parentStateName:"prefixText"},{subStateName:"suffixText",parentStateName:"suffixText"},{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}et([f()],it.prototype,"host",void 0),et([f({writable:!0})],it.prototype,"prefixText",void 0),et([f({writable:!0})],it.prototype,"suffixText",void 0),et([f({writable:!0})],it.prototype,"isCompactInputWidth",void 0);var nt=function(t,e,i,n){var a,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(s<3?a(r):s>3?a(e,i,r):a(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class at extends x{render(){return t("vega-button-circle",{icon:$.getIconKey(this.isPasswordDisplay?"eye":"eye-slash"),variant:"icon-only",size:"small",class:"password-eye-button",ref:t=>{this.addEyeIconObserver(t)}})}addEyeIconObserver(t){C.addUniqueObserverToNode(t,I,(()=>{this.isPasswordDisplay=!this.isPasswordDisplay}))}}$.register({eye:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>'},"eye-slash":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"/></svg>'}}),nt([f()],at.prototype,"host",void 0),nt([f({writable:!0})],at.prototype,"isPasswordDisplay",void 0),nt([f()],at.prototype,"type",void 0);var st=function(t,e,i,n){var a,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(s<3?a(r):s>3?a(e,i,r):a(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};const rt=class{constructor(n){e(this,n),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",7),this.labelButtonClick=i(this,"labelButtonClick",7),this.vegaPaste=i(this,"vegaPaste",7),this.paste=i(this,"paste",7),this.globalSlimmers={},this.formFieldController=new y({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new h:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new r({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new o({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new p({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new l({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new B:null},{propertyName:"type",ruleFactory:t=>"email"===t?new B:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.pageResizeObserverSlimmer=new A({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.copyPasteController=new U,this.compactWidthController=new tt,this.stateController=new it,this.maskConfigController=new X,this.prefixSlotRenderer=new K,this.changeEventEmitter=j(rt,z),this.focusEventEmitter=j(rt,k),this.blurEventEmitter=j(rt,R),this.labelButtonClickEventEmitter=j(rt,S),this.pasteEventEmitter=j(rt,N),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(Y),this.passwordEyeRenderer=new at,this.label="",this.labelSuffixButtonProps=null,this.labelSuffixButtonConfig=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.email=!1,this.required=!1,this.min=null,this.max=null,this.minLength=null,this.maxLength=null,this.showClearIcon=!0,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.disabled=!1,this.hint="",this.disableCopyPaste=!1,this.focusInput=()=>{this.inputRef.focus()},this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.maskConfigController.setupStringFormatter(t))},this.renderPrefixText=()=>this.prefixText&&t("div",{class:"prefix-text"},this.prefixText),this.renderSuffixText=()=>this.suffixText&&t("div",{class:"suffix-text"},this.suffixText),this.handleInputFocus=t=>{this.focusEventEmitter.emit(void 0,t)},this.handleInputBlur=t=>{this.blurEventEmitter.emit(void 0,t)},this.handleInputPaste=t=>{this.pasteEventEmitter.emit(t.clipboardData).defaultPrevented&&t.preventDefault()},this.onClickClearIcon=()=>{this.value=""},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value),this.onClearInputFocus=()=>{this.inputContainerRef.classList.add("no-focus")},this.onClearInputBlur=()=>{this.inputContainerRef.classList.remove("no-focus")},this.onInputHandler=t=>{"change"!==this.valueUpdateTrigger&&(this.value=t.target.value)},this.inputChangeHandler=t=>{"change"===this.valueUpdateTrigger&&(this.value=t.target.value)},this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()}}watchSuffixText(){}watchValue(t){this.changeEventEmitter.emit(t),this.inputRef.value!==this.value&&(this.inputRef.value=this.value),L.notify(E,{host:this.host,detail:this.value})}watchTypeChange(t,e){"number"!==t&&"number"!==e||this.maskConfigController.setupStringFormatter(this.inputRef)}watchValidationRules(){}watchMaskChange(t,e){this.areMaskConfigsEqual(t,e)||this.maskConfigController.setupStringFormatter(this.inputRef)}async doFocus(){this.focusInput()}async doBlur(){this.inputRef.blur()}render(){return v(t("slot",null)),c(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.groupDom()),this.host)}containerDom(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:this.getInputType(),autoComplete:this.autocomplete,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,"aria-label":this.label||"No label defined",minLength:this.minLength,maxLength:this.maxLength,onBlur:t=>this.handleInputBlur(t),onFocus:t=>this.handleInputFocus(t),onChange:this.inputChangeHandler,onInput:this.onInputHandler,onPaste:t=>this.handleInputPaste(t)},this.copyPasteController.getCopyPasteProps())))}getInputType(){switch(this.type){case"number":return"text";case"password":return this.isPasswordDisplay?"text":"password";default:return this.type}}groupDom(){let e="vega-input-container";return this.value&&(e+=" with-value"),e+="small"===this.size?" vega-input-size-small":" vega-input-size-default",e+=this.disabled?" vega-input-disabled":"",this.isCompactInputWidth&&(e+=" compact-input-width"),t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:e,onClick:this.focusInput,"aria-label":"input container","aria-disabled":`${this.disabled}`,role:"textbox",tabIndex:this.disabled?null:-1,onKeyDown:d()},this.prefixSlotRenderer.render(),this.renderPrefixText(),this.containerDom(),this.renderSuffixText(),"password"===this.type?this.passwordEyeRenderer.render():this.showClearIcon&&this.renderClearIcon()),this.renderHintDom())}renderLabelDom(){return t("vega-field-label",{onClick:this.focusInput,"is-field-required":this.required,disabled:this.disabled,label:this.label,suffixButtonProps:this.labelSuffixButtonProps,suffixButtonConfig:this.labelSuffixButtonConfig,ref:t=>{C.addUniqueObserverToNode(t,S,this.handleLabelButtonClick)}})}renderClearIcon(){return t("div",{class:{"vega-input-clear-icon":!0,invisible:!this.isClearIconVisible()},tabIndex:this.disabled?-1:0,"aria-label":"clear input",role:"button",onClick:this.onClickClearIcon,onKeyDown:d(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return M(i,n,!0,((t,e)=>P(t,e)?0:-1))}get host(){return a(this)}static get watchers(){return{suffixText:["watchSuffixText"],value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"]}}};st([w()],rt.prototype,"globalSlimmers",void 0),st([m()],rt.prototype,"formFieldController",void 0),st([m()],rt.prototype,"pageResizeObserverSlimmer",void 0),st([m()],rt.prototype,"copyPasteController",void 0),st([m()],rt.prototype,"compactWidthController",void 0),st([m()],rt.prototype,"stateController",void 0),st([m()],rt.prototype,"maskConfigController",void 0),st([m()],rt.prototype,"prefixSlotRenderer",void 0),st([m()],rt.prototype,"changeEventEmitter",void 0),st([m()],rt.prototype,"focusEventEmitter",void 0),st([m()],rt.prototype,"blurEventEmitter",void 0),st([m()],rt.prototype,"labelButtonClickEventEmitter",void 0),st([m()],rt.prototype,"pasteEventEmitter",void 0),st([m()],rt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),st([m()],rt.prototype,"passwordEyeRenderer",void 0),st([u()],rt.prototype,"watchMaskChange",null),rt.style=':host{cursor:text;display:block;text-align:left;line-height:normal}:host(.vega-input-inline-block){display:inline-block;width:100%}:host(.vega-input-hidden){display:none}vega-field-label{margin-bottom:8px}.vega-input-container{display:flex;align-items:center;border-radius:8px;gap:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))}.vega-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-container.vega-input-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-container.vega-input-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled input{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.vega-input-container.with-value{border-width:1px;border-style:solid;border-radius:8px}.vega-input-container:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}.vega-input-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-input-container.error:not(.no-focus):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.vega-input-container.error .vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}.vega-input-prefix{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}.vega-input-prefix.vega-input-prefix-slot{height:24px;overflow:hidden}.vega-input-input{flex:1 1 0%;position:relative}.vega-input-input input{width:100%;outline:2px solid transparent;outline-offset:2px;border-style:none;height:24px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;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));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-input 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-input-input 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-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-input input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-input-size-small{padding-top:8px;padding-right:12px;padding-bottom:8px;padding-left:12px}.vega-input-size-default{padding-top:12px;padding-right:16px;padding-bottom:12px;padding-left:16px}.vega-input-input input:disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.vega-hint{padding-top:12px;padding-right:8px;padding-left:8px}.vega-hint>label{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){.vega-hint>label{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-hint>label{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-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.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}.vega-input-clear-icon{width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-input-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border-radius:4px;padding:2px}.vega-input-clear-icon.invisible{visibility:hidden}.vega-input-clear-icon vega-icon{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=password]::-ms-reveal{display:none}.vega-input-container.compact-input-width{gap:0px}.vega-input-container.compact-input-width .vega-input-prefix{margin-right:8px}.vega-input-container.compact-input-width .prefix-text,.vega-input-container.compact-input-width .suffix-text{margin-right:2px}.vega-input-container.compact-input-width .vega-input-clear-icon{margin-left:2px}.vega-input-container.compact-input-width .vega-input-input input{padding:0px;min-width:1px}.vega-input-container.compact-input-width.auto-width .vega-input-input{flex-grow:0}.vega-input-container.compact-input-width.auto-width .suffix-text{flex-grow:1}.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0;flex-grow:0}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{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-input-container .prefix-text,.vega-input-container .suffix-text{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-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.v-font-field-value{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){.v-font-field-value{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){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-container .password-eye-button{width:16px;height:16px}.vega-input-container .password-eye-button::part(button){width:16px;height:16px;padding:0px}.vega-input-container .password-eye-button::part(button):hover{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}';export{rt as vega_input}
@@ -1 +1 @@
1
- import{r as i,c as e,h as t,H as a,g as r}from"./p-6b2342e0.js";import{f as n}from"./p-447c7590.js";import{c as s}from"./p-de97c6d9.js";import{c as o}from"./p-86194314.js";import{s as p}from"./p-519a7d55.js";import{I as d}from"./p-6e1ab235.js";import{V as l,I as h}from"./p-d849e0f5.js";import{F as c}from"./p-9fb6fbcc.js";import{T as g}from"./p-7c0b4c36.js";import{F as v}from"./p-a528714c.js";import{C as m}from"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-6a334573.js";import"./p-bccee21e.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-a4670e23.js";import"./p-308aa2e3.js";import"./p-39482a1a.js";import"./p-7d9cd9c8.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-fde50319.js";var b=function(i,e,t,a){var r,n=arguments.length,s=n<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(i,e,t,a);else for(var o=i.length-1;o>=0;o--)(r=i[o])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const f=class{constructor(t){i(this,t),this.vegaChange=e(this,"vegaChange",7),this.change=e(this,"change",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new l,this.formFieldController=new c({propertyRules:[{propertyName:"required",ruleFactory:i=>i?new g:null}],validationRulesName:"validationRules",defaultValue:!1,attributeGetter:i=>this[i],inputContainerGetter:()=>this.toggleSwitchContainer,touchableAreaGetter:()=>[this.toggleSwitchContainer]}),this.changeEventEmitter=s(f,n),this.checked=!1,this.value=!1,this.size="default",this.required=!1,this.disabled=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null,this.toggleSwitch=()=>{this.disabled||(this.checked=!this.checked)},this.updateValue=i=>{this.checked=i.currentTarget.checked,i.stopPropagation()}}watchCheckedChange(){this.value=this.checked,this.changeEventEmitter.emit(this.checked),m.notify(v,{host:this.host,detail:this.value})}watchValue(i){this.checked=!0===i}watchValidationRules(){}componentWillLoad(){this.checked||!0!==this.value?this.value=this.checked:this.checked=!0}render(){let i=this.checked?"vega-container vega-container-checked":"vega-container";return i+=this.disabled?" vega-container-disabled":"",i+="small"===this.size?" vega-container-small-size":"",p(t(a,null,t("vega-flex",{gap:"size-8",ref:i=>this.toggleSwitchContainer=i},t("div",{class:`${i} vega-flex-shrink-0 v-min-w-min`},t("input",{type:"checkbox",name:"switch",disabled:this.disabled,checked:this.checked,onChange:this.updateValue,"aria-label":this.label||"No label defined",role:"button",tabIndex:0,onKeyDown:o()}),t("span",{class:this.disabled?"v-bg-tertiary":"v-bg-primary"})),this.renderLabelDom())),this.host)}renderLabelDom(){return this.label?t("div",{class:"vega-flex-basis-0 vega-flex-grow"},t("vega-field-label",{onClick:this.toggleSwitch,disabled:this.disabled,label:this.label,isFieldRequired:this.required})):null}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"],value:["watchValue"],validationRules:["watchValidationRules"]}}};b([h()],f.prototype,"globalSlimmers",void 0),b([d()],f.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b([d()],f.prototype,"formFieldController",void 0),b([d()],f.prototype,"changeEventEmitter",void 0),f.style=':host{display:inline-block}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-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}div.vega-container{display:flex;justify-content:flex-start;align-items:center;border-radius:9999px;position:relative;box-sizing:content-box;height:24px;width:48px;padding:4px;background-color:rgba(var(--v-bg-toggle-switch, 107, 116, 125, 0.7))}div.vega-container:hover{background-color:rgba(var(--v-bg-toggle-switch-hover, 107, 116, 125, 1))}div.vega-container.vega-container-checked{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}div.vega-container.vega-container-checked:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}div.vega-container.vega-container-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}div.vega-container.vega-container-checked.vega-container-disabled{background-color:rgba(var(--v-bg-toggle-switch-selected-disabled, 153, 192, 255, 1))}div.vega-container-small-size{box-sizing:border-box;height:20px;width:32px;padding:2px}div.vega-container>span{margin-left:0px;transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}div.vega-container-checked>span{margin-left:24px}div.vega-container-checked.vega-container-small-size>span{margin-left:12px}div.vega-container>input{position:absolute;cursor:pointer;opacity:0;left:0px;top:0px;width:100%;height:100%;margin:0px;-webkit-tap-highlight-color:transparent}div.vega-container input:disabled{cursor:default}div.vega-container>span{display:inline-block;border-radius:9999px;box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));width:24px;height:24px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container-small-size{height:20px}div.vega-container-small-size>span{width:16px;height:16px}div{align-self:center}';export{f as vega_toggle_switch}
1
+ import{r as i,c as e,h as t,H as a,g as r}from"./p-6b2342e0.js";import{f as n}from"./p-447c7590.js";import{c as s}from"./p-de97c6d9.js";import{c as o}from"./p-86194314.js";import{s as p}from"./p-519a7d55.js";import{I as d}from"./p-6e1ab235.js";import{V as l,I as h}from"./p-d849e0f5.js";import{F as c}from"./p-1f26de89.js";import{T as g}from"./p-7c0b4c36.js";import{F as v}from"./p-a528714c.js";import{C as m}from"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-d9671d27.js";import"./p-6a334573.js";import"./p-bccee21e.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-a4670e23.js";import"./p-308aa2e3.js";import"./p-f69f84a7.js";import"./p-7d9cd9c8.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-fde50319.js";var f=function(i,e,t,a){var r,n=arguments.length,s=n<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(i,e,t,a);else for(var o=i.length-1;o>=0;o--)(r=i[o])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const b=class{constructor(t){i(this,t),this.vegaChange=e(this,"vegaChange",7),this.change=e(this,"change",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new l,this.formFieldController=new c({propertyRules:[{propertyName:"required",ruleFactory:i=>i?new g:null}],validationRulesName:"validationRules",defaultValue:!1,attributeGetter:i=>this[i],inputContainerGetter:()=>this.toggleSwitchContainer,touchableAreaGetter:()=>[this.toggleSwitchContainer]}),this.changeEventEmitter=s(b,n),this.checked=!1,this.value=!1,this.size="default",this.required=!1,this.disabled=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null,this.toggleSwitch=()=>{this.disabled||(this.checked=!this.checked)},this.updateValue=i=>{this.checked=i.currentTarget.checked,i.stopPropagation()}}watchCheckedChange(){this.value=this.checked,this.changeEventEmitter.emit(this.checked),m.notify(v,{host:this.host,detail:this.value})}watchValue(i){this.checked=!0===i}watchValidationRules(){}componentWillLoad(){this.checked||!0!==this.value?this.value=this.checked:this.checked=!0}render(){let i=this.checked?"vega-container vega-container-checked":"vega-container";return i+=this.disabled?" vega-container-disabled":"",i+="small"===this.size?" vega-container-small-size":"",p(t(a,null,t("vega-flex",{gap:"size-8",ref:i=>this.toggleSwitchContainer=i},t("div",{class:`${i} vega-flex-shrink-0 v-min-w-min`},t("input",{type:"checkbox",name:"switch",disabled:this.disabled,checked:this.checked,onChange:this.updateValue,"aria-label":this.label||"No label defined",role:"button",tabIndex:0,onKeyDown:o()}),t("span",{class:this.disabled?"v-bg-tertiary":"v-bg-primary"})),this.renderLabelDom())),this.host)}renderLabelDom(){return this.label?t("div",{class:"vega-flex-basis-0 vega-flex-grow"},t("vega-field-label",{onClick:this.toggleSwitch,disabled:this.disabled,label:this.label,isFieldRequired:this.required})):null}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"],value:["watchValue"],validationRules:["watchValidationRules"]}}};f([h()],b.prototype,"globalSlimmers",void 0),f([d()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),f([d()],b.prototype,"formFieldController",void 0),f([d()],b.prototype,"changeEventEmitter",void 0),b.style=':host{display:inline-block}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-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}div.vega-container{display:flex;justify-content:flex-start;align-items:center;border-radius:9999px;position:relative;box-sizing:content-box;height:24px;width:48px;padding:4px;background-color:rgba(var(--v-bg-toggle-switch, 107, 116, 125, 0.7))}div.vega-container:hover{background-color:rgba(var(--v-bg-toggle-switch-hover, 107, 116, 125, 1))}div.vega-container.vega-container-checked{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}div.vega-container.vega-container-checked:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}div.vega-container.vega-container-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}div.vega-container.vega-container-checked.vega-container-disabled{background-color:rgba(var(--v-bg-toggle-switch-selected-disabled, 153, 192, 255, 1))}div.vega-container-small-size{box-sizing:border-box;height:20px;width:32px;padding:2px}div.vega-container>span{margin-left:0px;transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}div.vega-container-checked>span{margin-left:24px}div.vega-container-checked.vega-container-small-size>span{margin-left:12px}div.vega-container>input{position:absolute;cursor:pointer;opacity:0;left:0px;top:0px;width:100%;height:100%;margin:0px;-webkit-tap-highlight-color:transparent}div.vega-container input:disabled{cursor:default}div.vega-container>span{display:inline-block;border-radius:9999px;box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));width:24px;height:24px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container-small-size{height:20px}div.vega-container-small-size>span{width:16px;height:16px}div{align-self:center}';export{b as vega_toggle_switch}