q2-tecton-elements 1.60.3 → 1.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/dist/bundle-report.json +16580 -15448
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/q2-action-group_2.cjs.entry.js +1 -1
  4. package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
  5. package/dist/cjs/q2-badge.cjs.entry.js +82 -0
  6. package/dist/cjs/q2-badge.cjs.entry.js.map +1 -0
  7. package/dist/cjs/q2-badge.entry.cjs.js.map +1 -0
  8. package/dist/cjs/q2-btn.q2-loading.entry.cjs.js.map +1 -0
  9. package/dist/cjs/q2-btn_2.cjs.entry.js +432 -0
  10. package/dist/cjs/q2-btn_2.cjs.entry.js.map +1 -0
  11. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
  13. package/dist/cjs/q2-data-table.entry.cjs.js.map +1 -1
  14. package/dist/cjs/q2-file-picker.cjs.entry.js +15 -3
  15. package/dist/cjs/q2-file-picker.cjs.entry.js.map +1 -1
  16. package/dist/cjs/q2-file-picker.entry.cjs.js.map +1 -1
  17. package/dist/cjs/q2-grid-area.cjs.entry.js +2 -2
  18. package/dist/cjs/q2-grid-area.cjs.entry.js.map +1 -1
  19. package/dist/cjs/q2-grid-area.entry.cjs.js.map +1 -1
  20. package/dist/cjs/q2-icon.cjs.entry.js +715 -0
  21. package/dist/cjs/q2-icon.cjs.entry.js.map +1 -0
  22. package/dist/cjs/q2-icon.entry.cjs.js.map +1 -0
  23. package/dist/cjs/q2-input.cjs.entry.js +3556 -0
  24. package/dist/cjs/q2-input.cjs.entry.js.map +1 -0
  25. package/dist/cjs/q2-input.entry.cjs.js.map +1 -0
  26. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
  28. package/dist/cjs/q2-legend.entry.cjs.js.map +1 -1
  29. package/dist/cjs/q2-link.q2-list.entry.cjs.js.map +1 -1
  30. package/dist/cjs/q2-link_2.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-link_2.cjs.entry.js.map +1 -1
  32. package/dist/cjs/q2-meter.cjs.entry.js +109 -0
  33. package/dist/cjs/q2-meter.cjs.entry.js.map +1 -0
  34. package/dist/cjs/q2-meter.entry.cjs.js.map +1 -0
  35. package/dist/cjs/q2-modal.cjs.entry.js +2 -2
  36. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-pagination.cjs.entry.js +23 -10
  38. package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
  39. package/dist/cjs/q2-pagination.entry.cjs.js.map +1 -1
  40. package/dist/cjs/q2-pill.cjs.entry.js +36 -12
  41. package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
  42. package/dist/cjs/q2-pill.entry.cjs.js.map +1 -1
  43. package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  45. package/dist/cjs/q2-select.cjs.entry.js +6 -3
  46. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  47. package/dist/cjs/q2-select.entry.cjs.js.map +1 -1
  48. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
  49. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  50. package/dist/cjs/q2-tab-container.cjs.entry.js +280 -0
  51. package/dist/cjs/q2-tab-container.cjs.entry.js.map +1 -0
  52. package/dist/cjs/q2-tab-container.entry.cjs.js.map +1 -0
  53. package/dist/cjs/q2-tab-pane.cjs.entry.js +34 -0
  54. package/dist/cjs/q2-tab-pane.cjs.entry.js.map +1 -0
  55. package/dist/cjs/q2-tab-pane.entry.cjs.js.map +1 -0
  56. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  57. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  58. package/dist/cjs/{sanitize-html-string-BtI99lfg.js → sanitize-html-string-DPqrzfM9.js} +61 -27
  59. package/dist/cjs/sanitize-html-string-DPqrzfM9.js.map +1 -0
  60. package/dist/cjs/sprites-DZZE7UFT.js +22 -0
  61. package/dist/cjs/sprites-DZZE7UFT.js.map +1 -0
  62. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  63. package/dist/collection/collection-manifest.json +1 -0
  64. package/dist/collection/components/q2-data-table/q2-data-table.css +23 -2
  65. package/dist/collection/components/q2-file-picker/q2-file-picker.css +5 -0
  66. package/dist/collection/components/q2-file-picker/q2-file-picker.js +33 -2
  67. package/dist/collection/components/q2-file-picker/q2-file-picker.js.map +1 -1
  68. package/dist/collection/components/q2-grid-area/q2-grid-area.js +15 -15
  69. package/dist/collection/components/q2-grid-area/q2-grid-area.js.map +1 -1
  70. package/dist/collection/components/q2-icon/assets/brand.symbol.svg +1 -1
  71. package/dist/collection/components/q2-icon/assets/standard.symbol.svg +1 -1
  72. package/dist/collection/components/q2-legend/q2-legend.css +7 -7
  73. package/dist/collection/components/q2-link/q2-link.css +3 -3
  74. package/dist/collection/components/q2-meter/q2-meter.css +230 -0
  75. package/dist/collection/components/q2-meter/q2-meter.js +384 -0
  76. package/dist/collection/components/q2-meter/q2-meter.js.map +1 -0
  77. package/dist/collection/components/q2-modal/q2-modal.js +1 -1
  78. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  79. package/dist/collection/components/q2-pagination/q2-pagination.js +29 -15
  80. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  81. package/dist/collection/components/q2-pill/q2-pill.css +10 -4
  82. package/dist/collection/components/q2-pill/q2-pill.js +35 -11
  83. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  84. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  85. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  86. package/dist/collection/components/q2-section/q2-section.js +2 -2
  87. package/dist/collection/components/q2-select/q2-select.js +6 -3
  88. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  89. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  90. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  91. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  92. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  93. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  94. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  95. package/dist/components/index.js +2 -0
  96. package/dist/components/index.js.map +1 -1
  97. package/dist/components/q2-data-table.js +1 -1
  98. package/dist/components/q2-data-table.js.map +1 -1
  99. package/dist/components/q2-file-picker.js +16 -3
  100. package/dist/components/q2-file-picker.js.map +1 -1
  101. package/dist/components/q2-grid-area.js +8 -8
  102. package/dist/components/q2-grid-area.js.map +1 -1
  103. package/dist/components/q2-legend2.js +1 -1
  104. package/dist/components/q2-legend2.js.map +1 -1
  105. package/dist/components/q2-link2.js +1 -1
  106. package/dist/components/q2-link2.js.map +1 -1
  107. package/dist/components/q2-meter.d.ts +11 -0
  108. package/dist/components/q2-meter.js +145 -0
  109. package/dist/components/q2-meter.js.map +1 -0
  110. package/dist/components/q2-modal.js +1 -1
  111. package/dist/components/q2-optgroup2.js +1 -1
  112. package/dist/components/q2-pagination.js +24 -11
  113. package/dist/components/q2-pagination.js.map +1 -1
  114. package/dist/components/q2-pill.js +36 -12
  115. package/dist/components/q2-pill.js.map +1 -1
  116. package/dist/components/q2-relative-time.js +1 -1
  117. package/dist/components/q2-resize-observer2.js +1 -1
  118. package/dist/components/q2-section.js +2 -2
  119. package/dist/components/q2-select2.js +6 -3
  120. package/dist/components/q2-select2.js.map +1 -1
  121. package/dist/components/q2-stepper-vertical.js +1 -1
  122. package/dist/components/q2-stepper.js +1 -1
  123. package/dist/components/q2-tab-container.js +1 -1
  124. package/dist/components/q2-tab-pane.js +1 -1
  125. package/dist/components/q2-tag.js +1 -1
  126. package/dist/components/q2-tooltip.js +1 -127
  127. package/dist/components/q2-tooltip.js.map +1 -1
  128. package/dist/components/q2-tooltip2.js +132 -0
  129. package/dist/components/q2-tooltip2.js.map +1 -0
  130. package/dist/components/sanitize-html-string.js +59 -25
  131. package/dist/components/sanitize-html-string.js.map +1 -1
  132. package/dist/components/tecton-tab-pane.js +2 -2
  133. package/dist/esm/{index-xCuy-dFb.js → index-LNnzUeDP.js} +3 -3
  134. package/dist/esm/{index-xCuy-dFb.js.map → index-LNnzUeDP.js.map} +1 -1
  135. package/dist/esm/loader.js +1 -1
  136. package/dist/esm/q2-action-group_2.entry.js +2 -2
  137. package/dist/esm/q2-action-sheet.entry.js +2 -2
  138. package/dist/esm/q2-badge.entry.js +80 -0
  139. package/dist/esm/q2-badge.entry.js.map +1 -0
  140. package/dist/esm/q2-btn.q2-loading.entry.js.map +1 -0
  141. package/dist/esm/q2-btn_2.entry.js +429 -0
  142. package/dist/esm/q2-btn_2.entry.js.map +1 -0
  143. package/dist/esm/q2-calendar.entry.js +1 -1
  144. package/dist/esm/q2-card.entry.js +1 -1
  145. package/dist/esm/q2-carousel-pane.entry.js +1 -1
  146. package/dist/esm/q2-carousel.entry.js +1 -1
  147. package/dist/esm/q2-chart-area.entry.js +1 -1
  148. package/dist/esm/q2-chart-bar.entry.js +1 -1
  149. package/dist/esm/q2-chart-donut.entry.js +1 -1
  150. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  151. package/dist/esm/q2-checkbox.entry.js +1 -1
  152. package/dist/esm/q2-context.entry.js +1 -1
  153. package/dist/esm/q2-data-table.entry.js +2 -2
  154. package/dist/esm/q2-data-table.entry.js.map +1 -1
  155. package/dist/esm/q2-detail.entry.js +1 -1
  156. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  157. package/dist/esm/q2-dropdown.entry.js +1 -1
  158. package/dist/esm/q2-editable-field.entry.js +1 -1
  159. package/dist/esm/q2-file-picker.entry.js +16 -4
  160. package/dist/esm/q2-file-picker.entry.js.map +1 -1
  161. package/dist/esm/q2-grid-area.entry.js +2 -2
  162. package/dist/esm/q2-grid-area.entry.js.map +1 -1
  163. package/dist/esm/q2-icon.entry.js +713 -0
  164. package/dist/esm/q2-icon.entry.js.map +1 -0
  165. package/dist/esm/q2-input.entry.js +3554 -0
  166. package/dist/esm/q2-input.entry.js.map +1 -0
  167. package/dist/esm/q2-item.entry.js +1 -1
  168. package/dist/esm/q2-legend.entry.js +1 -1
  169. package/dist/esm/q2-legend.entry.js.map +1 -1
  170. package/dist/esm/q2-link.q2-list.entry.js.map +1 -1
  171. package/dist/esm/q2-link_2.entry.js +2 -2
  172. package/dist/esm/q2-link_2.entry.js.map +1 -1
  173. package/dist/esm/q2-loc.entry.js +1 -1
  174. package/dist/esm/q2-message.entry.js +1 -1
  175. package/dist/esm/q2-meter.entry.js +107 -0
  176. package/dist/esm/q2-meter.entry.js.map +1 -0
  177. package/dist/esm/q2-modal.entry.js +3 -3
  178. package/dist/esm/q2-month-picker.entry.js +1 -1
  179. package/dist/esm/q2-optgroup.entry.js +2 -2
  180. package/dist/esm/q2-option-list_2.entry.js +1 -1
  181. package/dist/esm/q2-option.entry.js +1 -1
  182. package/dist/esm/q2-pagination.entry.js +24 -11
  183. package/dist/esm/q2-pagination.entry.js.map +1 -1
  184. package/dist/esm/q2-pill.entry.js +37 -13
  185. package/dist/esm/q2-pill.entry.js.map +1 -1
  186. package/dist/esm/q2-radio-group.entry.js +1 -1
  187. package/dist/esm/q2-radio.entry.js +1 -1
  188. package/dist/esm/q2-relative-time.entry.js +2 -2
  189. package/dist/esm/q2-section.entry.js +3 -3
  190. package/dist/esm/q2-select.entry.js +7 -4
  191. package/dist/esm/q2-select.entry.js.map +1 -1
  192. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  193. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  194. package/dist/esm/q2-stepper.entry.js +2 -2
  195. package/dist/esm/q2-tab-container.entry.js +278 -0
  196. package/dist/esm/q2-tab-container.entry.js.map +1 -0
  197. package/dist/esm/q2-tab-pane.entry.js +32 -0
  198. package/dist/esm/q2-tab-pane.entry.js.map +1 -0
  199. package/dist/esm/q2-tag.entry.js +2 -2
  200. package/dist/esm/q2-tecton-elements.js +1 -1
  201. package/dist/esm/q2-textarea.entry.js +1 -1
  202. package/dist/esm/q2-tooltip.entry.js +1 -1
  203. package/dist/esm/{sanitize-html-string-DL0kgllh.js → sanitize-html-string-DOVERJq5.js} +61 -27
  204. package/dist/esm/sanitize-html-string-DOVERJq5.js.map +1 -0
  205. package/dist/esm/sprites-jG2RmiwF.js +20 -0
  206. package/dist/esm/sprites-jG2RmiwF.js.map +1 -0
  207. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  208. package/dist/q2-tecton-elements/assets/brand.symbol.svg +1 -1
  209. package/dist/q2-tecton-elements/assets/standard.symbol.svg +1 -1
  210. package/dist/q2-tecton-elements/{index-xCuy-dFb.js → index-LNnzUeDP.js} +3 -3
  211. package/dist/q2-tecton-elements/{index-xCuy-dFb.js.map → index-LNnzUeDP.js.map} +1 -1
  212. package/dist/q2-tecton-elements/q2-action-group_2.entry.js +2 -2
  213. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +2 -2
  214. package/dist/q2-tecton-elements/q2-badge.entry.esm.js.map +1 -0
  215. package/dist/q2-tecton-elements/q2-badge.entry.js +84 -0
  216. package/dist/q2-tecton-elements/q2-badge.entry.js.map +1 -0
  217. package/dist/q2-tecton-elements/q2-btn.q2-loading.entry.esm.js.map +1 -0
  218. package/dist/q2-tecton-elements/q2-btn_2.entry.js +453 -0
  219. package/dist/q2-tecton-elements/q2-btn_2.entry.js.map +1 -0
  220. package/dist/q2-tecton-elements/q2-calendar.entry.js +1 -1
  221. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  222. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +1 -1
  223. package/dist/q2-tecton-elements/q2-carousel.entry.js +5 -5
  224. package/dist/q2-tecton-elements/q2-chart-area.entry.js +1 -1
  225. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +1 -1
  226. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +9 -9
  227. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
  228. package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
  229. package/dist/q2-tecton-elements/q2-context.entry.js +1 -1
  230. package/dist/q2-tecton-elements/q2-data-table.entry.esm.js.map +1 -1
  231. package/dist/q2-tecton-elements/q2-data-table.entry.js +109 -109
  232. package/dist/q2-tecton-elements/q2-data-table.entry.js.map +1 -1
  233. package/dist/q2-tecton-elements/q2-detail.entry.js +1 -1
  234. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +4 -4
  235. package/dist/q2-tecton-elements/q2-dropdown.entry.js +1 -1
  236. package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
  237. package/dist/q2-tecton-elements/q2-file-picker.entry.esm.js.map +1 -1
  238. package/dist/q2-tecton-elements/q2-file-picker.entry.js +112 -93
  239. package/dist/q2-tecton-elements/q2-file-picker.entry.js.map +1 -1
  240. package/dist/q2-tecton-elements/q2-grid-area.entry.esm.js.map +1 -1
  241. package/dist/q2-tecton-elements/q2-grid-area.entry.js +3 -3
  242. package/dist/q2-tecton-elements/q2-grid-area.entry.js.map +1 -1
  243. package/dist/q2-tecton-elements/q2-icon.entry.esm.js.map +1 -0
  244. package/dist/q2-tecton-elements/q2-icon.entry.js +870 -0
  245. package/dist/q2-tecton-elements/q2-icon.entry.js.map +1 -0
  246. package/dist/q2-tecton-elements/q2-input.entry.esm.js.map +1 -0
  247. package/dist/q2-tecton-elements/q2-input.entry.js +3883 -0
  248. package/dist/q2-tecton-elements/q2-input.entry.js.map +1 -0
  249. package/dist/q2-tecton-elements/q2-item.entry.js +1 -1
  250. package/dist/q2-tecton-elements/q2-legend.entry.esm.js.map +1 -1
  251. package/dist/q2-tecton-elements/q2-legend.entry.js +1 -1
  252. package/dist/q2-tecton-elements/q2-legend.entry.js.map +1 -1
  253. package/dist/q2-tecton-elements/q2-link.q2-list.entry.esm.js.map +1 -1
  254. package/dist/q2-tecton-elements/q2-link_2.entry.js +2 -2
  255. package/dist/q2-tecton-elements/q2-link_2.entry.js.map +1 -1
  256. package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
  257. package/dist/q2-tecton-elements/q2-message.entry.js +1 -1
  258. package/dist/q2-tecton-elements/q2-meter.entry.esm.js.map +1 -0
  259. package/dist/q2-tecton-elements/q2-meter.entry.js +176 -0
  260. package/dist/q2-tecton-elements/q2-meter.entry.js.map +1 -0
  261. package/dist/q2-tecton-elements/q2-modal.entry.js +24 -24
  262. package/dist/q2-tecton-elements/q2-month-picker.entry.js +1 -1
  263. package/dist/q2-tecton-elements/q2-optgroup.entry.js +5 -5
  264. package/dist/q2-tecton-elements/q2-option-list_2.entry.js +15 -15
  265. package/dist/q2-tecton-elements/q2-option.entry.js +1 -1
  266. package/dist/q2-tecton-elements/q2-pagination.entry.esm.js.map +1 -1
  267. package/dist/q2-tecton-elements/q2-pagination.entry.js +43 -33
  268. package/dist/q2-tecton-elements/q2-pagination.entry.js.map +1 -1
  269. package/dist/q2-tecton-elements/q2-pill.entry.esm.js.map +1 -1
  270. package/dist/q2-tecton-elements/q2-pill.entry.js +57 -36
  271. package/dist/q2-tecton-elements/q2-pill.entry.js.map +1 -1
  272. package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
  273. package/dist/q2-tecton-elements/q2-radio.entry.js +4 -4
  274. package/dist/q2-tecton-elements/q2-relative-time.entry.js +2 -2
  275. package/dist/q2-tecton-elements/q2-section.entry.js +21 -21
  276. package/dist/q2-tecton-elements/q2-select.entry.esm.js.map +1 -1
  277. package/dist/q2-tecton-elements/q2-select.entry.js +7 -4
  278. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  279. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
  280. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +19 -19
  281. package/dist/q2-tecton-elements/q2-stepper.entry.js +13 -13
  282. package/dist/q2-tecton-elements/q2-tab-container.entry.esm.js.map +1 -0
  283. package/dist/q2-tecton-elements/q2-tab-container.entry.js +348 -0
  284. package/dist/q2-tecton-elements/q2-tab-container.entry.js.map +1 -0
  285. package/dist/q2-tecton-elements/q2-tab-pane.entry.esm.js.map +1 -0
  286. package/dist/q2-tecton-elements/q2-tab-pane.entry.js +44 -0
  287. package/dist/q2-tecton-elements/q2-tab-pane.entry.js.map +1 -0
  288. package/dist/q2-tecton-elements/q2-tag.entry.js +57 -57
  289. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  290. package/dist/q2-tecton-elements/q2-textarea.entry.js +1 -1
  291. package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
  292. package/dist/q2-tecton-elements/{sanitize-html-string-DL0kgllh.js → sanitize-html-string-DOVERJq5.js} +314 -282
  293. package/dist/q2-tecton-elements/sanitize-html-string-DOVERJq5.js.map +1 -0
  294. package/dist/q2-tecton-elements/sprites-jG2RmiwF.js +18 -0
  295. package/dist/q2-tecton-elements/sprites-jG2RmiwF.js.map +1 -0
  296. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
  297. package/dist/types/components/q2-file-picker/q2-file-picker.d.ts +5 -0
  298. package/dist/types/components/q2-grid-area/q2-grid-area.d.ts +6 -6
  299. package/dist/types/components/q2-meter/q2-meter.d.ts +70 -0
  300. package/dist/types/components/q2-pagination/q2-pagination.d.ts +2 -1
  301. package/dist/types/components/q2-pill/q2-pill.d.ts +8 -1
  302. package/dist/types/components.d.ts +147 -4
  303. package/package.json +3 -3
  304. package/dist/cjs/q2-badge.q2-btn.q2-icon.q2-input.q2-loading.q2-tab-container.q2-tab-pane.entry.cjs.js.map +0 -1
  305. package/dist/cjs/q2-badge_7.cjs.entry.js +0 -5074
  306. package/dist/cjs/q2-badge_7.cjs.entry.js.map +0 -1
  307. package/dist/cjs/sanitize-html-string-BtI99lfg.js.map +0 -1
  308. package/dist/esm/q2-badge.q2-btn.q2-icon.q2-input.q2-loading.q2-tab-container.q2-tab-pane.entry.js.map +0 -1
  309. package/dist/esm/q2-badge_7.entry.js +0 -5066
  310. package/dist/esm/q2-badge_7.entry.js.map +0 -1
  311. package/dist/esm/sanitize-html-string-DL0kgllh.js.map +0 -1
  312. package/dist/q2-tecton-elements/q2-badge.q2-btn.q2-icon.q2-input.q2-loading.q2-tab-container.q2-tab-pane.entry.esm.js.map +0 -1
  313. package/dist/q2-tecton-elements/q2-badge_7.entry.js +0 -5659
  314. package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +0 -1
  315. package/dist/q2-tecton-elements/sanitize-html-string-DL0kgllh.js.map +0 -1
@@ -0,0 +1,3554 @@
1
+ import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-CGkHOjh1.js';
2
+ import { c as createGuid, j as isMobile, s as setMessageHeight, e as handleAriaLabel, o as overrideFocus, a as isEventFromElement, v as getAriaValueFromProp, h as hasSlotContent, l as loc, n as nextPaint, r as renderLabel, g as renderMessages } from './index-LNnzUeDP.js';
3
+
4
+ function formatNumber(val = '', options = {
5
+ prefix: '',
6
+ suffix: '',
7
+ decimals: 0,
8
+ decimalSeparator: '.',
9
+ thousandsSeparator: '',
10
+ allowDecimal: false,
11
+ allowNegative: true,
12
+ }, explicit = false) {
13
+ const isNegative = val[0] === '-';
14
+ let value = val;
15
+ const allowDecimal = !!options.allowDecimal && !!options.decimals;
16
+ if (explicit) {
17
+ const parsedValue = value.replace(/[^\d.]/g, '');
18
+ value = (parsedValue && Number(parsedValue).toFixed(allowDecimal ? options.decimals : 0)) || '';
19
+ }
20
+ value = value.replace(/[^\d]/g, '');
21
+ let { integerString, decimalString } = splitValue(value, allowDecimal, options.decimals);
22
+ // define decimalString
23
+ let decimalSeparator = options.decimalSeparator;
24
+ if (!allowDecimal) {
25
+ decimalSeparator = '';
26
+ decimalString = '';
27
+ }
28
+ // define negative
29
+ const negativeSymbol = options.allowNegative && isNegative ? '-' : '';
30
+ value = `${negativeSymbol}${integerString}${decimalSeparator}${decimalString}`;
31
+ // format integerString
32
+ integerString = integerString.replace(/\B(?=(\d{3})+(?!\d))/g, options.thousandsSeparator);
33
+ const formattedValue = negativeSymbol || integerString ? `${negativeSymbol}${integerString}${decimalSeparator}${decimalString}` : '';
34
+ const fullyFormattedValue = negativeSymbol || integerString
35
+ ? `${negativeSymbol}${options.prefix}${integerString}${decimalSeparator}${decimalString}${options.suffix}`
36
+ : '';
37
+ let formattingCharacterCount = formattedValue.length - value.length;
38
+ if (decimalSeparator) {
39
+ formattingCharacterCount = formattingCharacterCount + options.decimalSeparator.length;
40
+ }
41
+ const prefix = options.prefix || options.suffix;
42
+ const maxlength = Number.MAX_SAFE_INTEGER.toString().length + formattingCharacterCount + decimalString.length;
43
+ const unformattedValue = `${integerString.replace(/[^0-9]/g, '')}${decimalString}`.replace(/^0+/, '');
44
+ return {
45
+ value,
46
+ formattedValue,
47
+ fullyFormattedValue,
48
+ prefix,
49
+ suffix: '',
50
+ formattingCharacterCount,
51
+ maxlength,
52
+ unformattedValue,
53
+ };
54
+ }
55
+ function splitValue(value, allowDecimal = false, decimals) {
56
+ if (!allowDecimal) {
57
+ return {
58
+ integerString: value,
59
+ decimalString: '',
60
+ };
61
+ }
62
+ const splitIndex = value.length - decimals;
63
+ let integerString = value.substring(0, splitIndex).padStart(1, '0');
64
+ if (integerString.length > 1 && integerString[0] === '0') {
65
+ integerString = integerString.substring(1);
66
+ }
67
+ const decimalString = value.substring(splitIndex).padStart(decimals, '0');
68
+ return {
69
+ integerString,
70
+ decimalString,
71
+ };
72
+ }
73
+
74
+ function formatValue(value = '', mask = '', options) {
75
+ const prefix = (options && options.prefix) || '';
76
+ const suffix = (options && options.suffix) || '';
77
+ if (!value || !mask) {
78
+ const fullyFormattedValue = `${prefix}${value}${suffix}`;
79
+ return {
80
+ value,
81
+ formattedValue: value,
82
+ fullyFormattedValue,
83
+ prefix: prefix.trim() || suffix.trim(),
84
+ formattingCharacterCount: 0,
85
+ unformattedValue: value,
86
+ };
87
+ }
88
+ const { unformattedValue, formattedValue, formattingCharacterCount } = generateMask(value, mask);
89
+ const fullyFormattedValue = `${prefix}${formattedValue}${suffix}`;
90
+ const maxlength = mask.length;
91
+ const minFormattedLength = getMinimumFormattedLength(mask, prefix, suffix);
92
+ return {
93
+ value: unformattedValue,
94
+ formattedValue,
95
+ fullyFormattedValue,
96
+ prefix: prefix.trim() || suffix.trim(),
97
+ formattingCharacterCount,
98
+ maxlength,
99
+ minFormattedLength,
100
+ unformattedValue,
101
+ };
102
+ }
103
+ const optionalValidatingChars = ['?'];
104
+ function isOptionalValidatingChar(character) {
105
+ return optionalValidatingChars.includes(character);
106
+ }
107
+ const knownValidatingChars = ['#', '@', '*', ...optionalValidatingChars];
108
+ function isKnownValidatingChar(character) {
109
+ return knownValidatingChars.includes(character);
110
+ }
111
+ function getStaticFormattingChars(mask) {
112
+ const knownChars = knownValidatingChars.join('|');
113
+ const formattingChars = mask.replace(new RegExp(`[${knownChars}]`, 'g'), '').split('');
114
+ return new Set(formattingChars);
115
+ }
116
+ function isStaticFormattingChar(character, formattingChars) {
117
+ return formattingChars.has(character);
118
+ }
119
+ function getValidatedChar(char, matcher) {
120
+ switch (matcher) {
121
+ case '#':
122
+ char = char.replace(/[^\d]/g, '');
123
+ break;
124
+ case '@':
125
+ char = char.toUpperCase().replace(/[^A-Z]+/g, ''); // allows only upper case
126
+ break;
127
+ case '*':
128
+ char = char.toUpperCase().replace(/[^\dA-Z]+/g, '');
129
+ break;
130
+ case '?':
131
+ char = char.replace(/[^\d]/g, '');
132
+ break;
133
+ default:
134
+ return char;
135
+ }
136
+ return char;
137
+ }
138
+ function generateMask(value, mask) {
139
+ const maskArray = mask.split('');
140
+ const formattingChars = getStaticFormattingChars(mask);
141
+ let currentValueIndex = 0;
142
+ let formattingCharacterCount = 0;
143
+ let unformattedValue = '';
144
+ const formattedValue = maskArray.reduce((acc, character) => {
145
+ if (currentValueIndex >= value.length) {
146
+ return acc;
147
+ }
148
+ if (isOptionalValidatingChar(character) && isStaticFormattingChar(value[currentValueIndex], formattingChars)) {
149
+ return acc;
150
+ }
151
+ if (isKnownValidatingChar(character)) {
152
+ // Step value index if formatting character pushed out of place by user input
153
+ currentValueIndex = getNextNonFormattingCharIndex(value, currentValueIndex, formattingChars);
154
+ if (currentValueIndex >= value.length) {
155
+ return acc;
156
+ }
157
+ const validChar = getValidatedChar(value[currentValueIndex], character);
158
+ acc += validChar;
159
+ unformattedValue += validChar;
160
+ currentValueIndex++;
161
+ }
162
+ else {
163
+ // Static formatting characters added directly to formatted string
164
+ acc += character;
165
+ formattingCharacterCount++;
166
+ if (character === value[currentValueIndex]) {
167
+ // Continue to walk value if next value at this index matches formatting character
168
+ currentValueIndex++;
169
+ }
170
+ }
171
+ return acc;
172
+ }, '');
173
+ return {
174
+ unformattedValue,
175
+ formattedValue,
176
+ formattingCharacterCount,
177
+ };
178
+ }
179
+ function getNextNonFormattingCharIndex(value, currentValueIndex, formattingChars) {
180
+ if (isStaticFormattingChar(value[currentValueIndex], formattingChars)) {
181
+ currentValueIndex++;
182
+ return getNextNonFormattingCharIndex(value, currentValueIndex, formattingChars);
183
+ }
184
+ return currentValueIndex;
185
+ }
186
+ function getMinimumFormattedLength(mask, prefix, suffix) {
187
+ return (mask.replace(new RegExp(`[${optionalValidatingChars.join('|')}]`, 'g'), '').length +
188
+ prefix.length +
189
+ suffix.length);
190
+ }
191
+
192
+ // decimal data source: http://www.iso.org/iso/home/standards/currency_codes.htm 09/Nov/2016
193
+ const currencyFormats = {
194
+ AED: {
195
+ prefix: '',
196
+ suffix: 'د.إ',
197
+ decimals: 2,
198
+ decimalSeparator: '.',
199
+ thousandsSeparator: ',',
200
+ }, // '9,999.99د.إ'
201
+ AFN: {
202
+ prefix: '¤',
203
+ suffix: '',
204
+ decimals: 2,
205
+ decimalSeparator: '.',
206
+ thousandsSeparator: ',',
207
+ }, // '¤9,999.99'
208
+ ALL: {
209
+ prefix: 'L',
210
+ suffix: '',
211
+ decimals: 2,
212
+ decimalSeparator: '.',
213
+ thousandsSeparator: ',',
214
+ }, // 'L9,999.99'
215
+ AMD: {
216
+ prefix: 'դր.',
217
+ suffix: '',
218
+ decimals: 2,
219
+ decimalSeparator: '.',
220
+ thousandsSeparator: ',',
221
+ }, // 'դր.9,999.99'
222
+ ANG: {
223
+ prefix: 'ƒ',
224
+ suffix: '',
225
+ decimals: 2,
226
+ decimalSeparator: '.',
227
+ thousandsSeparator: ',',
228
+ }, // 'ƒ9,999.99'
229
+ AOA: {
230
+ prefix: 'Kz',
231
+ suffix: '',
232
+ decimals: 2,
233
+ decimalSeparator: '.',
234
+ thousandsSeparator: ',',
235
+ }, // 'Kz9,999.99'
236
+ ARS: {
237
+ prefix: '$',
238
+ suffix: '',
239
+ decimals: 2,
240
+ decimalSeparator: '.',
241
+ thousandsSeparator: ',',
242
+ }, // '$9,999.99'
243
+ AUD: {
244
+ prefix: '$',
245
+ suffix: '',
246
+ decimals: 2,
247
+ decimalSeparator: '.',
248
+ thousandsSeparator: ',',
249
+ }, // '$9,999.99'
250
+ AWG: {
251
+ prefix: 'ƒ',
252
+ suffix: '',
253
+ decimals: 2,
254
+ decimalSeparator: '.',
255
+ thousandsSeparator: ',',
256
+ }, // 'ƒ9,999.99'
257
+ AZN: {
258
+ prefix: '¤',
259
+ suffix: '',
260
+ decimals: 2,
261
+ decimalSeparator: '.',
262
+ thousandsSeparator: ',',
263
+ }, // '¤9,999.99'
264
+ BAM: {
265
+ prefix: 'КМ',
266
+ suffix: '',
267
+ decimals: 2,
268
+ decimalSeparator: '.',
269
+ thousandsSeparator: ',',
270
+ }, // 'КМ9,999.99'
271
+ BBD: {
272
+ prefix: '$',
273
+ suffix: '',
274
+ decimals: 2,
275
+ decimalSeparator: '.',
276
+ thousandsSeparator: ',',
277
+ }, // '$9,999.99'
278
+ BDT: {
279
+ prefix: '৳',
280
+ suffix: '',
281
+ decimals: 2,
282
+ decimalSeparator: '.',
283
+ thousandsSeparator: ',',
284
+ }, // '৳9,999.99'
285
+ BGN: {
286
+ prefix: '৳',
287
+ suffix: '',
288
+ decimals: 2,
289
+ decimalSeparator: '.',
290
+ thousandsSeparator: ',',
291
+ }, // '৳9,999.99'
292
+ BHD: {
293
+ prefix: '',
294
+ suffix: 'ب.د',
295
+ decimals: 3,
296
+ decimalSeparator: '.',
297
+ thousandsSeparator: ',',
298
+ }, // '9,999.999ب.د'
299
+ BIF: {
300
+ prefix: 'Fr',
301
+ suffix: '',
302
+ decimals: 0,
303
+ decimalSeparator: '.',
304
+ thousandsSeparator: ',',
305
+ }, // 'Fr9,999'
306
+ BMD: {
307
+ prefix: '$',
308
+ suffix: '',
309
+ decimals: 2,
310
+ decimalSeparator: '.',
311
+ thousandsSeparator: ',',
312
+ }, // '$9,999.99'
313
+ BND: {
314
+ prefix: '$',
315
+ suffix: '',
316
+ decimals: 2,
317
+ decimalSeparator: '.',
318
+ thousandsSeparator: ',',
319
+ }, // '$9,999.99'
320
+ BOB: {
321
+ prefix: 'Bs.',
322
+ suffix: '',
323
+ decimals: 2,
324
+ decimalSeparator: '.',
325
+ thousandsSeparator: ',',
326
+ }, // 'Bs.9,999.99'
327
+ BRL: {
328
+ prefix: 'R$',
329
+ suffix: '',
330
+ decimals: 2,
331
+ decimalSeparator: '.',
332
+ thousandsSeparator: ',',
333
+ }, // 'R$9,999.99'
334
+ BSD: {
335
+ prefix: '$',
336
+ suffix: '',
337
+ decimals: 2,
338
+ decimalSeparator: '.',
339
+ thousandsSeparator: ',',
340
+ }, // '$9,999.99'
341
+ BTN: {
342
+ prefix: '¤',
343
+ suffix: '',
344
+ decimals: 2,
345
+ decimalSeparator: '.',
346
+ thousandsSeparator: ',',
347
+ }, // '¤9,999.99'
348
+ BWP: {
349
+ prefix: 'P',
350
+ suffix: '',
351
+ decimals: 2,
352
+ decimalSeparator: '.',
353
+ thousandsSeparator: ',',
354
+ }, // 'P9,999.99'
355
+ BYN: {
356
+ prefix: 'Br',
357
+ suffix: '',
358
+ decimals: 0,
359
+ decimalSeparator: '.',
360
+ thousandsSeparator: ',',
361
+ }, // 'Br9,999'
362
+ BZD: {
363
+ prefix: '$',
364
+ suffix: '',
365
+ decimals: 2,
366
+ decimalSeparator: '.',
367
+ thousandsSeparator: ',',
368
+ }, // '$9,999.99'
369
+ CAD: {
370
+ prefix: '$',
371
+ suffix: '',
372
+ decimals: 2,
373
+ decimalSeparator: '.',
374
+ thousandsSeparator: ',',
375
+ }, // '$9,999.99'
376
+ CDF: {
377
+ prefix: 'Fr',
378
+ suffix: '',
379
+ decimals: 2,
380
+ decimalSeparator: '.',
381
+ thousandsSeparator: ',',
382
+ }, // 'Fr9,999.99'
383
+ CHF: {
384
+ prefix: 'Fr',
385
+ suffix: '',
386
+ decimals: 2,
387
+ decimalSeparator: '.',
388
+ thousandsSeparator: ',',
389
+ }, // 'Fr9,999.99'
390
+ CLF: {
391
+ prefix: 'Fr',
392
+ suffix: '',
393
+ decimals: 4,
394
+ decimalSeparator: '.',
395
+ thousandsSeparator: ',',
396
+ }, // 'Fr9.999.9999'
397
+ CLP: {
398
+ prefix: '$',
399
+ suffix: '',
400
+ decimals: 0,
401
+ decimalSeparator: '.',
402
+ thousandsSeparator: ',',
403
+ }, // '$9,999'
404
+ CNY: {
405
+ prefix: '¥',
406
+ suffix: '',
407
+ decimals: 2,
408
+ decimalSeparator: '.',
409
+ thousandsSeparator: ',',
410
+ }, // '¥9,999.99'
411
+ COP: {
412
+ prefix: '$',
413
+ suffix: '',
414
+ decimals: 2,
415
+ decimalSeparator: '.',
416
+ thousandsSeparator: ',',
417
+ }, // '$9,999.99'
418
+ CRC: {
419
+ prefix: '₡',
420
+ suffix: '',
421
+ decimals: 2,
422
+ decimalSeparator: '.',
423
+ thousandsSeparator: ',',
424
+ }, // '₡9,999.99'
425
+ CUC: {
426
+ prefix: '$',
427
+ suffix: '',
428
+ decimals: 2,
429
+ decimalSeparator: '.',
430
+ thousandsSeparator: ',',
431
+ }, // '$9,999.99'
432
+ CUP: {
433
+ prefix: '$',
434
+ suffix: '',
435
+ decimals: 2,
436
+ decimalSeparator: '.',
437
+ thousandsSeparator: ',',
438
+ }, // '$9,999.99'
439
+ CVE: {
440
+ prefix: '$',
441
+ suffix: '',
442
+ decimals: 0,
443
+ decimalSeparator: '.',
444
+ thousandsSeparator: ',',
445
+ }, // '$9,999'
446
+ CZK: {
447
+ prefix: 'Kč',
448
+ suffix: '',
449
+ decimals: 2,
450
+ decimalSeparator: '.',
451
+ thousandsSeparator: ',',
452
+ }, // 'Kč9,999.99'
453
+ DJF: {
454
+ prefix: 'Fr',
455
+ suffix: '',
456
+ decimals: 0,
457
+ decimalSeparator: '.',
458
+ thousandsSeparator: ',',
459
+ }, // 'Fr9,999'
460
+ DKK: {
461
+ prefix: 'kr',
462
+ suffix: '',
463
+ decimals: 2,
464
+ decimalSeparator: '.',
465
+ thousandsSeparator: ',',
466
+ }, // 'kr9,999.99'
467
+ DOP: {
468
+ prefix: '$',
469
+ suffix: '',
470
+ decimals: 2,
471
+ decimalSeparator: '.',
472
+ thousandsSeparator: ',',
473
+ }, // '$9,999.99'
474
+ DZD: {
475
+ prefix: '',
476
+ suffix: 'د.ج',
477
+ decimals: 2,
478
+ decimalSeparator: '.',
479
+ thousandsSeparator: ',',
480
+ }, // '9,999.99د.ج'
481
+ EEK: {
482
+ prefix: 'KR',
483
+ suffix: '',
484
+ decimals: 2,
485
+ decimalSeparator: '.',
486
+ thousandsSeparator: ',',
487
+ }, // 'KR9,999.99'
488
+ EGP: {
489
+ prefix: '£',
490
+ suffix: '',
491
+ decimals: 2,
492
+ decimalSeparator: '.',
493
+ thousandsSeparator: ',',
494
+ }, // '£9,999.99'
495
+ ERN: {
496
+ prefix: 'Nfk',
497
+ suffix: '',
498
+ decimals: 2,
499
+ decimalSeparator: '.',
500
+ thousandsSeparator: ',',
501
+ }, // 'Nfk9,999.99'
502
+ ETB: {
503
+ prefix: '¤',
504
+ suffix: '',
505
+ decimals: 2,
506
+ decimalSeparator: '.',
507
+ thousandsSeparator: ',',
508
+ }, // '¤9,999.99'
509
+ EUR: {
510
+ prefix: '€',
511
+ suffix: '',
512
+ decimals: 2,
513
+ decimalSeparator: '.',
514
+ thousandsSeparator: ',',
515
+ }, // '€9,999.99'
516
+ FJD: {
517
+ prefix: '$',
518
+ suffix: '',
519
+ decimals: 2,
520
+ decimalSeparator: '.',
521
+ thousandsSeparator: ',',
522
+ }, // '$9,999.99'
523
+ FKP: {
524
+ prefix: '£',
525
+ suffix: '',
526
+ decimals: 2,
527
+ decimalSeparator: '.',
528
+ thousandsSeparator: ',',
529
+ }, // '£9,999.99'
530
+ GBP: {
531
+ prefix: '£',
532
+ suffix: '',
533
+ decimals: 2,
534
+ decimalSeparator: '.',
535
+ thousandsSeparator: ',',
536
+ }, // '£9,999.99'
537
+ GEL: {
538
+ prefix: 'ლ',
539
+ suffix: '',
540
+ decimals: 2,
541
+ decimalSeparator: '.',
542
+ thousandsSeparator: ',',
543
+ }, // 'ლ9,999.99'
544
+ GHS: {
545
+ prefix: '¤',
546
+ suffix: '',
547
+ decimals: 2,
548
+ decimalSeparator: '.',
549
+ thousandsSeparator: ',',
550
+ }, // '¤9,999.99'
551
+ GIP: {
552
+ prefix: '£',
553
+ suffix: '',
554
+ decimals: 2,
555
+ decimalSeparator: '.',
556
+ thousandsSeparator: ',',
557
+ }, // '£9,999.99'
558
+ GMD: {
559
+ prefix: 'D',
560
+ suffix: '',
561
+ decimals: 2,
562
+ decimalSeparator: '.',
563
+ thousandsSeparator: ',',
564
+ }, // 'D9,999.99'
565
+ GNF: {
566
+ prefix: 'Fr',
567
+ suffix: '',
568
+ decimals: 0,
569
+ decimalSeparator: '.',
570
+ thousandsSeparator: ',',
571
+ }, // 'Fr9,999'
572
+ GTQ: {
573
+ prefix: 'Q',
574
+ suffix: '',
575
+ decimals: 2,
576
+ decimalSeparator: '.',
577
+ thousandsSeparator: ',',
578
+ }, // 'Q9,999.99'
579
+ GYD: {
580
+ prefix: '$',
581
+ suffix: '',
582
+ decimals: 2,
583
+ decimalSeparator: '.',
584
+ thousandsSeparator: ',',
585
+ }, // '$9,999.99'
586
+ HKD: {
587
+ prefix: '$',
588
+ suffix: '',
589
+ decimals: 2,
590
+ decimalSeparator: '.',
591
+ thousandsSeparator: ',',
592
+ }, // '$9,999.9'
593
+ HNL: {
594
+ prefix: 'L',
595
+ suffix: '',
596
+ decimals: 2,
597
+ decimalSeparator: '.',
598
+ thousandsSeparator: ',',
599
+ }, // 'L9,999.99'
600
+ HRK: {
601
+ prefix: 'kn',
602
+ suffix: '',
603
+ decimals: 2,
604
+ decimalSeparator: '.',
605
+ thousandsSeparator: ',',
606
+ }, // 'kn9,999.99'
607
+ HTG: {
608
+ prefix: 'G',
609
+ suffix: '',
610
+ decimals: 2,
611
+ decimalSeparator: '.',
612
+ thousandsSeparator: ',',
613
+ }, // 'G9,999.99'
614
+ HUF: {
615
+ prefix: 'Ft',
616
+ suffix: '',
617
+ decimals: 2,
618
+ decimalSeparator: '.',
619
+ thousandsSeparator: ',',
620
+ }, // 'Ft9,999.99'
621
+ IDR: {
622
+ prefix: 'Rs',
623
+ suffix: '',
624
+ decimals: 2,
625
+ decimalSeparator: '.',
626
+ thousandsSeparator: ',',
627
+ }, // 'Rs9,999.99'
628
+ ILS: {
629
+ prefix: '₪',
630
+ suffix: '',
631
+ decimals: 2,
632
+ decimalSeparator: '.',
633
+ thousandsSeparator: ',',
634
+ }, // '₪9,999.99'
635
+ INR: {
636
+ prefix: '₨',
637
+ suffix: '',
638
+ decimals: 2,
639
+ decimalSeparator: '.',
640
+ thousandsSeparator: ',',
641
+ }, // '₨9,999.99'
642
+ IQD: {
643
+ prefix: '',
644
+ suffix: 'ع.د',
645
+ decimals: 3,
646
+ decimalSeparator: '.',
647
+ thousandsSeparator: ',',
648
+ }, // '9,999.999ع.د'
649
+ IRR: {
650
+ prefix: '¤',
651
+ suffix: '',
652
+ decimals: 2,
653
+ decimalSeparator: '.',
654
+ thousandsSeparator: ',',
655
+ }, // '¤9,999.99'
656
+ ISK: {
657
+ prefix: 'kr',
658
+ suffix: '',
659
+ decimals: 0,
660
+ decimalSeparator: '.',
661
+ thousandsSeparator: ',',
662
+ }, // 'kr9,999'
663
+ JMD: {
664
+ prefix: '$',
665
+ suffix: '',
666
+ decimals: 2,
667
+ decimalSeparator: '.',
668
+ thousandsSeparator: ',',
669
+ }, // '$9,999.99'
670
+ JOD: {
671
+ prefix: '',
672
+ suffix: 'د.ا',
673
+ decimals: 3,
674
+ decimalSeparator: '.',
675
+ thousandsSeparator: ',',
676
+ }, // '9,999.99د.ا'
677
+ JPY: {
678
+ prefix: '¥',
679
+ suffix: '',
680
+ decimals: 0,
681
+ decimalSeparator: '.',
682
+ thousandsSeparator: ',',
683
+ }, // '¥9,999'
684
+ KES: {
685
+ prefix: 'Sh',
686
+ suffix: '',
687
+ decimals: 2,
688
+ decimalSeparator: '.',
689
+ thousandsSeparator: ',',
690
+ }, // 'Sh9,999.99'
691
+ KGS: {
692
+ prefix: '¤',
693
+ suffix: '',
694
+ decimals: 2,
695
+ decimalSeparator: '.',
696
+ thousandsSeparator: ',',
697
+ }, // '¤9,999.99'
698
+ KHR: {
699
+ prefix: '¤',
700
+ suffix: '',
701
+ decimals: 2,
702
+ decimalSeparator: '.',
703
+ thousandsSeparator: ',',
704
+ }, // '¤9,999.99'
705
+ KMF: {
706
+ prefix: 'Fr',
707
+ suffix: '',
708
+ decimals: 0,
709
+ decimalSeparator: '.',
710
+ thousandsSeparator: ',',
711
+ }, // 'Fr9,999'
712
+ KPW: {
713
+ prefix: '₩',
714
+ suffix: '',
715
+ decimals: 2,
716
+ decimalSeparator: '.',
717
+ thousandsSeparator: ',',
718
+ }, // '₩9,999.99'
719
+ KRW: {
720
+ prefix: '₩',
721
+ suffix: '',
722
+ decimals: 0,
723
+ decimalSeparator: '.',
724
+ thousandsSeparator: ',',
725
+ }, // '₩9,999.99'
726
+ KWD: {
727
+ prefix: 'د.ك',
728
+ suffix: '',
729
+ decimals: 3,
730
+ decimalSeparator: '.',
731
+ thousandsSeparator: ',',
732
+ }, // '9,999.999د.ك'
733
+ KYD: {
734
+ prefix: '$',
735
+ suffix: '',
736
+ decimals: 2,
737
+ decimalSeparator: '.',
738
+ thousandsSeparator: ',',
739
+ }, // '$9,999.99'
740
+ KZT: {
741
+ prefix: '〒',
742
+ suffix: '',
743
+ decimals: 2,
744
+ decimalSeparator: '.',
745
+ thousandsSeparator: ',',
746
+ }, // '〒9,999.99'
747
+ LAK: {
748
+ prefix: '₭',
749
+ suffix: '',
750
+ decimals: 2,
751
+ decimalSeparator: '.',
752
+ thousandsSeparator: ',',
753
+ }, // '₭9,999.99'
754
+ LBP: {
755
+ prefix: '',
756
+ suffix: 'ل.ل',
757
+ decimals: 2,
758
+ decimalSeparator: '.',
759
+ thousandsSeparator: ',',
760
+ }, // 'ل.ل9,999.99'
761
+ LKR: {
762
+ prefix: 'Rs',
763
+ suffix: '',
764
+ decimals: 2,
765
+ decimalSeparator: '.',
766
+ thousandsSeparator: ',',
767
+ }, // 'Rs9,999.99'
768
+ LRD: {
769
+ prefix: '$',
770
+ suffix: '',
771
+ decimals: 2,
772
+ decimalSeparator: '.',
773
+ thousandsSeparator: ',',
774
+ }, // '$9,999.99'
775
+ LSL: {
776
+ prefix: 'L',
777
+ suffix: '',
778
+ decimals: 2,
779
+ decimalSeparator: '.',
780
+ thousandsSeparator: ',',
781
+ }, // 'L9,999.99'
782
+ LTL: {
783
+ prefix: 'Lt',
784
+ suffix: '',
785
+ decimals: 2,
786
+ decimalSeparator: '.',
787
+ thousandsSeparator: ',',
788
+ }, // 'Lt9,999.99'
789
+ LVL: {
790
+ prefix: 'Ls',
791
+ suffix: '',
792
+ decimals: 2,
793
+ decimalSeparator: '.',
794
+ thousandsSeparator: ',',
795
+ }, // 'Ls9,999.99'
796
+ LYD: {
797
+ prefix: '',
798
+ suffix: 'ل.د',
799
+ decimals: 3,
800
+ decimalSeparator: '.',
801
+ thousandsSeparator: ',',
802
+ }, // '9,999.999ل.د'
803
+ MAD: {
804
+ prefix: '',
805
+ suffix: 'د.م.',
806
+ decimals: 2,
807
+ decimalSeparator: '.',
808
+ thousandsSeparator: ',',
809
+ }, // '9,999.99د.م.'
810
+ MDL: {
811
+ prefix: 'L',
812
+ suffix: '',
813
+ decimals: 2,
814
+ decimalSeparator: '.',
815
+ thousandsSeparator: ',',
816
+ }, // 'L9,999.99'
817
+ MGA: {
818
+ prefix: '¤',
819
+ suffix: '',
820
+ decimals: 1,
821
+ decimalSeparator: '.',
822
+ thousandsSeparator: ',',
823
+ }, // '¤9,999.9'
824
+ MKD: {
825
+ prefix: 'ден',
826
+ suffix: '',
827
+ decimals: 2,
828
+ decimalSeparator: '.',
829
+ thousandsSeparator: ',',
830
+ }, // 'ден9,999.99'
831
+ MMK: {
832
+ prefix: 'K',
833
+ suffix: '',
834
+ decimals: 2,
835
+ decimalSeparator: '.',
836
+ thousandsSeparator: ',',
837
+ }, // 'K9,999.99'
838
+ MNT: {
839
+ prefix: '₮',
840
+ suffix: '',
841
+ decimals: 2,
842
+ decimalSeparator: '.',
843
+ thousandsSeparator: ',',
844
+ }, // '₮9,999.99'
845
+ MOP: {
846
+ prefix: 'P',
847
+ suffix: '',
848
+ decimals: 2,
849
+ decimalSeparator: '.',
850
+ thousandsSeparator: ',',
851
+ }, // 'P9,999.99'
852
+ MRU: {
853
+ prefix: 'UM',
854
+ suffix: '',
855
+ decimals: 1,
856
+ decimalSeparator: '.',
857
+ thousandsSeparator: ',',
858
+ }, // 'UM9,999.9'
859
+ MUR: {
860
+ prefix: '₨',
861
+ suffix: '',
862
+ decimals: 2,
863
+ decimalSeparator: '.',
864
+ thousandsSeparator: ',',
865
+ }, // '₨9,999.99'
866
+ MVR: {
867
+ prefix: '¤',
868
+ suffix: '',
869
+ decimals: 2,
870
+ decimalSeparator: '.',
871
+ thousandsSeparator: ',',
872
+ }, // '¤9,999.99'
873
+ MWK: {
874
+ prefix: 'MK',
875
+ suffix: '',
876
+ decimals: 2,
877
+ decimalSeparator: '.',
878
+ thousandsSeparator: ',',
879
+ }, // 'MK9,999.99'
880
+ MXN: {
881
+ prefix: '$',
882
+ suffix: '',
883
+ decimals: 2,
884
+ decimalSeparator: '.',
885
+ thousandsSeparator: ',',
886
+ }, // '$9,999.99'
887
+ MYR: {
888
+ prefix: 'RM',
889
+ suffix: '',
890
+ decimals: 2,
891
+ decimalSeparator: '.',
892
+ thousandsSeparator: ',',
893
+ }, // 'RM9,999.99'
894
+ MZN: {
895
+ prefix: 'MTn',
896
+ suffix: '',
897
+ decimals: 2,
898
+ decimalSeparator: '.',
899
+ thousandsSeparator: ',',
900
+ }, // 'MTn9,999.99'
901
+ NAD: {
902
+ prefix: '$',
903
+ suffix: '',
904
+ decimals: 2,
905
+ decimalSeparator: '.',
906
+ thousandsSeparator: ',',
907
+ }, // '$9,999.99'
908
+ NGN: {
909
+ prefix: '₦',
910
+ suffix: '',
911
+ decimals: 2,
912
+ decimalSeparator: '.',
913
+ thousandsSeparator: ',',
914
+ }, // '₦9,999.99'
915
+ NIO: {
916
+ prefix: 'C$',
917
+ suffix: '',
918
+ decimals: 2,
919
+ decimalSeparator: '.',
920
+ thousandsSeparator: ',',
921
+ }, // 'C$9,999.99'
922
+ NOK: {
923
+ prefix: 'kr',
924
+ suffix: '',
925
+ decimals: 2,
926
+ decimalSeparator: '.',
927
+ thousandsSeparator: ',',
928
+ }, // 'kr9,999.99'
929
+ NPR: {
930
+ prefix: '₨',
931
+ suffix: '',
932
+ decimals: 2,
933
+ decimalSeparator: '.',
934
+ thousandsSeparator: ',',
935
+ }, // '₨9,999.99'
936
+ NZD: {
937
+ prefix: '$',
938
+ suffix: '',
939
+ decimals: 2,
940
+ decimalSeparator: '.',
941
+ thousandsSeparator: ',',
942
+ }, // '$9,999.99'
943
+ OMR: {
944
+ prefix: '',
945
+ suffix: 'ر.ع.',
946
+ decimals: 3,
947
+ decimalSeparator: '.',
948
+ thousandsSeparator: ',',
949
+ }, // '9,999.999ر.ع.'
950
+ PAB: {
951
+ prefix: 'B/.',
952
+ suffix: '',
953
+ decimals: 2,
954
+ decimalSeparator: '.',
955
+ thousandsSeparator: ',',
956
+ }, // 'B/.9,999.99'
957
+ PEN: {
958
+ prefix: 'S/.',
959
+ suffix: '',
960
+ decimals: 2,
961
+ decimalSeparator: '.',
962
+ thousandsSeparator: ',',
963
+ }, // 'S/.9,999.99'
964
+ PGK: {
965
+ prefix: 'K',
966
+ suffix: '',
967
+ decimals: 2,
968
+ decimalSeparator: '.',
969
+ thousandsSeparator: ',',
970
+ }, // 'K9,999.99'
971
+ PHP: {
972
+ prefix: 'p',
973
+ suffix: '',
974
+ decimals: 2,
975
+ decimalSeparator: '.',
976
+ thousandsSeparator: ',',
977
+ }, // 'p9,999.99'
978
+ PKR: {
979
+ prefix: '₨',
980
+ suffix: '',
981
+ decimals: 2,
982
+ decimalSeparator: '.',
983
+ thousandsSeparator: ',',
984
+ }, // '₨9,999.99'
985
+ PLN: {
986
+ prefix: 'zł',
987
+ suffix: '',
988
+ decimals: 2,
989
+ decimalSeparator: '.',
990
+ thousandsSeparator: ',',
991
+ }, // 'zł9,999.99'
992
+ PYG: {
993
+ prefix: '¤',
994
+ suffix: '',
995
+ decimals: 0,
996
+ decimalSeparator: '.',
997
+ thousandsSeparator: ',',
998
+ }, // '¤9,999'
999
+ QAR: {
1000
+ prefix: '',
1001
+ suffix: 'ر.ق',
1002
+ decimals: 2,
1003
+ decimalSeparator: '.',
1004
+ thousandsSeparator: ',',
1005
+ }, // '9,999.99ر.ق'
1006
+ RON: {
1007
+ prefix: 'L',
1008
+ suffix: '',
1009
+ decimals: 2,
1010
+ decimalSeparator: '.',
1011
+ thousandsSeparator: ',',
1012
+ }, // 'L9,999.99'
1013
+ RSD: {
1014
+ prefix: 'дин.',
1015
+ suffix: '',
1016
+ decimals: 2,
1017
+ decimalSeparator: '.',
1018
+ thousandsSeparator: ',',
1019
+ }, // 'дин.9,999.99'
1020
+ RUB: {
1021
+ prefix: 'руб.',
1022
+ suffix: '',
1023
+ decimals: 2,
1024
+ decimalSeparator: '.',
1025
+ thousandsSeparator: ',',
1026
+ }, // 'руб.9,999.99'
1027
+ RWF: {
1028
+ prefix: 'Fr',
1029
+ suffix: '',
1030
+ decimals: 0,
1031
+ decimalSeparator: '.',
1032
+ thousandsSeparator: ',',
1033
+ }, // 'Fr9,999'
1034
+ SAR: {
1035
+ prefix: '',
1036
+ suffix: 'ر.س',
1037
+ decimals: 2,
1038
+ decimalSeparator: '.',
1039
+ thousandsSeparator: ',',
1040
+ }, // '9,999.99ر.س'
1041
+ SBD: {
1042
+ prefix: '$',
1043
+ suffix: '',
1044
+ decimals: 2,
1045
+ decimalSeparator: '.',
1046
+ thousandsSeparator: ',',
1047
+ }, // '$9,999.99'
1048
+ SCR: {
1049
+ prefix: '₨',
1050
+ suffix: '',
1051
+ decimals: 2,
1052
+ decimalSeparator: '.',
1053
+ thousandsSeparator: ',',
1054
+ }, // '₨9,999.99'
1055
+ SDG: {
1056
+ prefix: '£',
1057
+ suffix: '',
1058
+ decimals: 2,
1059
+ decimalSeparator: '.',
1060
+ thousandsSeparator: ',',
1061
+ }, // '£9,999.99'
1062
+ SEK: {
1063
+ prefix: 'kr',
1064
+ suffix: '',
1065
+ decimals: 2,
1066
+ decimalSeparator: '.',
1067
+ thousandsSeparator: ',',
1068
+ }, // 'kr9,999.99'
1069
+ SGD: {
1070
+ prefix: '$',
1071
+ suffix: '',
1072
+ decimals: 2,
1073
+ decimalSeparator: '.',
1074
+ thousandsSeparator: ',',
1075
+ }, // '$9,999.99'
1076
+ SHP: {
1077
+ prefix: '£',
1078
+ suffix: '',
1079
+ decimals: 2,
1080
+ decimalSeparator: '.',
1081
+ thousandsSeparator: ',',
1082
+ }, // '£9,999.99'
1083
+ SKK: {
1084
+ prefix: 'Sk',
1085
+ suffix: '',
1086
+ decimals: 2,
1087
+ decimalSeparator: '.',
1088
+ thousandsSeparator: ',',
1089
+ }, // 'Sk9,999.99'
1090
+ SLL: {
1091
+ prefix: 'Le',
1092
+ suffix: '',
1093
+ decimals: 2,
1094
+ decimalSeparator: '.',
1095
+ thousandsSeparator: ',',
1096
+ }, // 'Le9,999.99'
1097
+ SOS: {
1098
+ prefix: 'Sh',
1099
+ suffix: '',
1100
+ decimals: 2,
1101
+ decimalSeparator: '.',
1102
+ thousandsSeparator: ',',
1103
+ }, // 'Sh9,999.99'
1104
+ SRD: {
1105
+ prefix: '$',
1106
+ suffix: '',
1107
+ decimals: 2,
1108
+ decimalSeparator: '.',
1109
+ thousandsSeparator: ',',
1110
+ }, // '$9,999.99'
1111
+ STN: {
1112
+ prefix: 'Db',
1113
+ suffix: '',
1114
+ decimals: 2,
1115
+ decimalSeparator: '.',
1116
+ thousandsSeparator: ',',
1117
+ }, // 'Db9,999.99'
1118
+ SVC: {
1119
+ prefix: '₡',
1120
+ suffix: '',
1121
+ decimals: 2,
1122
+ decimalSeparator: '.',
1123
+ thousandsSeparator: ',',
1124
+ }, // '₡9,999.99'
1125
+ SYP: {
1126
+ prefix: '£',
1127
+ suffix: '',
1128
+ decimals: 2,
1129
+ decimalSeparator: '.',
1130
+ thousandsSeparator: ',',
1131
+ }, // '£9,999.99'
1132
+ SZL: {
1133
+ prefix: 'L',
1134
+ suffix: '',
1135
+ decimals: 2,
1136
+ decimalSeparator: '.',
1137
+ thousandsSeparator: ',',
1138
+ }, // 'L9,999.99'
1139
+ THB: {
1140
+ prefix: '฿',
1141
+ suffix: '',
1142
+ decimals: 2,
1143
+ decimalSeparator: '.',
1144
+ thousandsSeparator: ',',
1145
+ }, // '฿9,999.99'
1146
+ TJS: {
1147
+ prefix: 'ЅМ',
1148
+ suffix: '',
1149
+ decimals: 2,
1150
+ decimalSeparator: '.',
1151
+ thousandsSeparator: ',',
1152
+ }, // 'ЅМ9,999.99'
1153
+ TMM: {
1154
+ prefix: 'm',
1155
+ suffix: '',
1156
+ decimals: 2,
1157
+ decimalSeparator: '.',
1158
+ thousandsSeparator: ',',
1159
+ }, // 'm9,999.99'
1160
+ TND: {
1161
+ prefix: '',
1162
+ suffix: 'د.ت',
1163
+ decimals: 3,
1164
+ decimalSeparator: '.',
1165
+ thousandsSeparator: ',',
1166
+ }, // '9,999.999د.ت'
1167
+ TOP: {
1168
+ prefix: 'T$',
1169
+ suffix: '',
1170
+ decimals: 2,
1171
+ decimalSeparator: '.',
1172
+ thousandsSeparator: ',',
1173
+ }, // 'T$9,999.99'
1174
+ TRY: {
1175
+ prefix: 'YTL',
1176
+ suffix: '',
1177
+ decimals: 2,
1178
+ decimalSeparator: '.',
1179
+ thousandsSeparator: ',',
1180
+ }, // 'YTL9,999.99'
1181
+ TTD: {
1182
+ prefix: '$',
1183
+ suffix: '',
1184
+ decimals: 2,
1185
+ decimalSeparator: '.',
1186
+ thousandsSeparator: ',',
1187
+ }, // '$9,999.99'
1188
+ TWD: {
1189
+ prefix: '$',
1190
+ suffix: '',
1191
+ decimals: 2,
1192
+ decimalSeparator: '.',
1193
+ thousandsSeparator: ',',
1194
+ }, // '$9,999.99'
1195
+ TZS: {
1196
+ prefix: 'Sh',
1197
+ suffix: '',
1198
+ decimals: 2,
1199
+ decimalSeparator: '.',
1200
+ thousandsSeparator: ',',
1201
+ }, // 'Sh9,999.99'
1202
+ UAH: {
1203
+ prefix: '¤',
1204
+ suffix: '',
1205
+ decimals: 2,
1206
+ decimalSeparator: '.',
1207
+ thousandsSeparator: ',',
1208
+ }, // '¤9,999.99'
1209
+ UGX: {
1210
+ prefix: 'Sh',
1211
+ suffix: '',
1212
+ decimals: 0,
1213
+ decimalSeparator: '.',
1214
+ thousandsSeparator: ',',
1215
+ }, // 'Sh9,999'
1216
+ USD: {
1217
+ prefix: '$',
1218
+ suffix: '',
1219
+ decimals: 2,
1220
+ decimalSeparator: '.',
1221
+ thousandsSeparator: ',',
1222
+ }, // '$9,999.99'
1223
+ UYU: {
1224
+ prefix: '$',
1225
+ suffix: '',
1226
+ decimals: 0,
1227
+ decimalSeparator: '.',
1228
+ thousandsSeparator: ',',
1229
+ }, // '$9,999'
1230
+ UZS: {
1231
+ prefix: '¤',
1232
+ suffix: '',
1233
+ decimals: 2,
1234
+ decimalSeparator: '.',
1235
+ thousandsSeparator: ',',
1236
+ }, // '¤9,999.99'
1237
+ VEF: {
1238
+ prefix: 'Bs F',
1239
+ suffix: '',
1240
+ decimals: 2,
1241
+ decimalSeparator: '.',
1242
+ thousandsSeparator: ',',
1243
+ }, // 'Bs F9,999.99'
1244
+ VND: {
1245
+ prefix: '₫',
1246
+ suffix: '',
1247
+ decimals: 0,
1248
+ decimalSeparator: '.',
1249
+ thousandsSeparator: ',',
1250
+ }, // '₫9,999'
1251
+ VUV: {
1252
+ prefix: 'Vt',
1253
+ suffix: '',
1254
+ decimals: 0,
1255
+ decimalSeparator: '.',
1256
+ thousandsSeparator: ',',
1257
+ }, // 'Vt9,999'
1258
+ WST: {
1259
+ prefix: 'T',
1260
+ suffix: '',
1261
+ decimals: 2,
1262
+ decimalSeparator: '.',
1263
+ thousandsSeparator: ',',
1264
+ }, // 'T9,999.99'
1265
+ XAF: {
1266
+ prefix: 'Fr',
1267
+ suffix: '',
1268
+ decimals: 0,
1269
+ decimalSeparator: '.',
1270
+ thousandsSeparator: ',',
1271
+ }, // 'Fr9,999'
1272
+ XCD: {
1273
+ prefix: '$',
1274
+ suffix: '',
1275
+ decimals: 2,
1276
+ decimalSeparator: '.',
1277
+ thousandsSeparator: ',',
1278
+ }, // '$9,999.99'
1279
+ XOF: {
1280
+ prefix: 'Fr',
1281
+ suffix: '',
1282
+ decimals: 0,
1283
+ decimalSeparator: '.',
1284
+ thousandsSeparator: ',',
1285
+ }, // 'Fr9,999'
1286
+ XPF: {
1287
+ prefix: 'Fr',
1288
+ suffix: '',
1289
+ decimals: 0,
1290
+ decimalSeparator: '.',
1291
+ thousandsSeparator: ',',
1292
+ }, // 'Fr9,999'
1293
+ YER: {
1294
+ prefix: '¤',
1295
+ suffix: '',
1296
+ decimals: 2,
1297
+ decimalSeparator: '.',
1298
+ thousandsSeparator: ',',
1299
+ }, // '¤9,999.99'
1300
+ ZAR: {
1301
+ prefix: 'R',
1302
+ suffix: '',
1303
+ decimals: 2,
1304
+ decimalSeparator: '.',
1305
+ thousandsSeparator: ',',
1306
+ }, // 'R9,999.99'
1307
+ ZMW: {
1308
+ prefix: 'ZK',
1309
+ suffix: '',
1310
+ decimals: 2,
1311
+ decimalSeparator: '.',
1312
+ thousandsSeparator: ',',
1313
+ }, // 'ZK9,999.99'
1314
+ ZWD: {
1315
+ prefix: '$',
1316
+ suffix: '',
1317
+ decimals: 2,
1318
+ decimalSeparator: '.',
1319
+ thousandsSeparator: ',',
1320
+ }, // '$9,999.99'
1321
+ };
1322
+ function formatCurrency(value, currencyCode = 'USD', explicit = false) {
1323
+ let processedCurrencyCode = currencyCode || '';
1324
+ let allowDecimal = true;
1325
+ if (processedCurrencyCode.includes('-integer')) {
1326
+ processedCurrencyCode = processedCurrencyCode.split('-integer')[0];
1327
+ allowDecimal = false;
1328
+ }
1329
+ const currencyFormat = currencyFormats[processedCurrencyCode];
1330
+ if (!currencyFormat) {
1331
+ return formatValue(value);
1332
+ }
1333
+ const options = Object.assign(Object.assign({}, currencyFormat), { allowDecimal: allowDecimal && currencyFormat.decimals > 0, allowNegative: false });
1334
+ return formatNumber(value, options, explicit);
1335
+ }
1336
+
1337
+ const phoneNumberFormats = {
1338
+ AF: {
1339
+ mask: '(##) #######',
1340
+ prefix: '+93 ',
1341
+ },
1342
+ AL: {
1343
+ mask: '#######',
1344
+ prefix: '+355 ',
1345
+ },
1346
+ DZ: {
1347
+ mask: '(##) ###-###',
1348
+ prefix: '+213 ',
1349
+ },
1350
+ // AS
1351
+ AD: {
1352
+ mask: '(#) #####',
1353
+ prefix: '+376 ',
1354
+ },
1355
+ AO: {
1356
+ mask: '#########',
1357
+ prefix: '+244 ',
1358
+ },
1359
+ AI: {
1360
+ mask: '(###) ###-####',
1361
+ prefix: '+1 ',
1362
+ },
1363
+ AG: {
1364
+ mask: '(###) ###-####',
1365
+ prefix: '+1 ',
1366
+ },
1367
+ AR: {
1368
+ mask: '##########',
1369
+ prefix: '+54 ',
1370
+ },
1371
+ AM: {
1372
+ mask: '########',
1373
+ prefix: '+375 ',
1374
+ },
1375
+ AQ: {
1376
+ mask: '##-####',
1377
+ prefix: '+672 ',
1378
+ },
1379
+ AW: {
1380
+ mask: '###-####',
1381
+ prefix: '+297 ',
1382
+ },
1383
+ AU: {
1384
+ mask: '(##) ####-####',
1385
+ prefix: '+61 ',
1386
+ },
1387
+ /* AT: {
1388
+ mask:'####?????????',
1389
+ prefix: ''
1390
+ }, */
1391
+ AT: {
1392
+ mask: '#############',
1393
+ prefix: '+43 ',
1394
+ },
1395
+ /* AZ: {
1396
+ mask:'########?',
1397
+ prefix: ''
1398
+ }, */
1399
+ AZ: {
1400
+ mask: '#########',
1401
+ prefix: '+994 ',
1402
+ },
1403
+ BS: {
1404
+ mask: '(###) ###-####',
1405
+ prefix: '+1 ',
1406
+ },
1407
+ BH: {
1408
+ mask: '####-####',
1409
+ prefix: '+973 ',
1410
+ },
1411
+ /* BD: {
1412
+ mask:'#######??',
1413
+ prefix: ''
1414
+ }, */
1415
+ BD: {
1416
+ mask: '#########',
1417
+ prefix: '+880 ',
1418
+ },
1419
+ BB: {
1420
+ mask: '(###) ###-####',
1421
+ prefix: '+1 ',
1422
+ },
1423
+ BY: {
1424
+ mask: '#########',
1425
+ prefix: '+375 ',
1426
+ },
1427
+ BE: {
1428
+ mask: '########??',
1429
+ prefix: '+32 ',
1430
+ },
1431
+ BZ: {
1432
+ mask: '#######',
1433
+ prefix: '+501 ',
1434
+ },
1435
+ BJ: {
1436
+ mask: '(##) ###-###',
1437
+ prefix: '+229 ',
1438
+ },
1439
+ BM: {
1440
+ mask: '(###) ###-####',
1441
+ prefix: '+1 ',
1442
+ },
1443
+ BT: {
1444
+ mask: '(#) ###-###',
1445
+ prefix: '+975 ',
1446
+ },
1447
+ BO: {
1448
+ mask: '(#) ###-####',
1449
+ prefix: '+591 ',
1450
+ },
1451
+ BA: {
1452
+ mask: '(##) ##-##-##',
1453
+ prefix: '+387 ',
1454
+ },
1455
+ /* BW: {
1456
+ mask:'#######?',
1457
+ prefix: ''
1458
+ }, */
1459
+ BW: {
1460
+ mask: '########',
1461
+ prefix: '+267 ',
1462
+ },
1463
+ BR: {
1464
+ mask: '(##) ####-####',
1465
+ prefix: '+55 ',
1466
+ },
1467
+ BN: {
1468
+ mask: '###-####',
1469
+ prefix: '+673 ',
1470
+ },
1471
+ BG: {
1472
+ mask: '#######?',
1473
+ prefix: '+359 ',
1474
+ },
1475
+ BF: {
1476
+ mask: '##-##-##-##',
1477
+ prefix: '+226 ',
1478
+ },
1479
+ BI: {
1480
+ mask: '####-####',
1481
+ prefix: '+257 ',
1482
+ },
1483
+ KH: {
1484
+ mask: '(##) ######',
1485
+ prefix: '+855 ',
1486
+ },
1487
+ CM: {
1488
+ mask: '####-####',
1489
+ prefix: '+237 ',
1490
+ },
1491
+ CA: {
1492
+ mask: '(###) ###-####',
1493
+ prefix: '+1 ',
1494
+ },
1495
+ CV: {
1496
+ mask: '###-####',
1497
+ prefix: '+238 ',
1498
+ },
1499
+ KY: {
1500
+ mask: '(###) ###-####',
1501
+ prefix: '+1 ',
1502
+ },
1503
+ CF: {
1504
+ mask: '###-###',
1505
+ prefix: '+236 ',
1506
+ },
1507
+ TD: {
1508
+ mask: '###-##-##',
1509
+ prefix: '+235 ',
1510
+ },
1511
+ /* CL: {
1512
+ mask:'########?',
1513
+ prefix: ''
1514
+ }, */
1515
+ CL: {
1516
+ mask: '#########',
1517
+ prefix: '+56 ',
1518
+ },
1519
+ /* CN: {
1520
+ mask:'########???',
1521
+ prefix: ''
1522
+ }, */
1523
+ CN: {
1524
+ mask: '###########',
1525
+ prefix: '+86 ',
1526
+ },
1527
+ /* CO: {
1528
+ mask:'########??',
1529
+ prefix: ''
1530
+ }, */
1531
+ CO: {
1532
+ mask: '##########',
1533
+ prefix: '57 ',
1534
+ },
1535
+ KM: {
1536
+ mask: '###-####',
1537
+ prefix: '+269 ',
1538
+ },
1539
+ CD: {
1540
+ mask: '###-####',
1541
+ prefix: '+243 ',
1542
+ },
1543
+ CG: {
1544
+ mask: '###-####',
1545
+ prefix: '+242 ',
1546
+ },
1547
+ // CK
1548
+ CR: {
1549
+ mask: '####-####',
1550
+ prefix: '+506 ',
1551
+ },
1552
+ CI: {
1553
+ mask: '####-####',
1554
+ prefix: '+225 ',
1555
+ },
1556
+ HR: {
1557
+ mask: '########?',
1558
+ prefix: '+385 ',
1559
+ },
1560
+ /* CU: {
1561
+ mask:'#####?ID:?????',
1562
+ prefix: ''
1563
+ }, */
1564
+ CU: {
1565
+ mask: '###########',
1566
+ prefix: '+53 ',
1567
+ },
1568
+ CY: {
1569
+ mask: '####-####',
1570
+ prefix: '+357 ',
1571
+ },
1572
+ CZ: {
1573
+ mask: '#########',
1574
+ prefix: '+420 ',
1575
+ },
1576
+ DK: {
1577
+ mask: '####-####',
1578
+ prefix: '+45 ',
1579
+ },
1580
+ DJ: {
1581
+ mask: '##-##-##-##',
1582
+ prefix: '+253 ',
1583
+ },
1584
+ DM: {
1585
+ mask: '(###) ###-####',
1586
+ prefix: '+1 ',
1587
+ },
1588
+ DO: {
1589
+ mask: '(###) ###-####',
1590
+ prefix: '+1 ',
1591
+ },
1592
+ TL: {
1593
+ mask: '###-####',
1594
+ prefix: '+670 ',
1595
+ },
1596
+ EC: {
1597
+ mask: '(##) ###-####',
1598
+ prefix: '+593 ',
1599
+ },
1600
+ /* EG: {
1601
+ mask:'########??',
1602
+ prefix: ''
1603
+ }, */
1604
+ EG: {
1605
+ mask: '##########',
1606
+ prefix: '+20 ',
1607
+ },
1608
+ SV: {
1609
+ mask: '####-####',
1610
+ prefix: '+503 ',
1611
+ },
1612
+ GQ: {
1613
+ mask: '##-####',
1614
+ prefix: '+240 ',
1615
+ },
1616
+ // ER:
1617
+ EE: {
1618
+ mask: '#######?',
1619
+ prefix: '+372 ',
1620
+ },
1621
+ ET: {
1622
+ mask: '(##) ###-####',
1623
+ prefix: '+251 ',
1624
+ },
1625
+ FK: {
1626
+ mask: '#####',
1627
+ prefix: '+500 ',
1628
+ },
1629
+ FO: {
1630
+ mask: '######',
1631
+ prefix: '+298 ',
1632
+ },
1633
+ FJ: {
1634
+ mask: '###-####',
1635
+ prefix: '+679 ',
1636
+ },
1637
+ /* FI: {
1638
+ mask:'#####???????',
1639
+ prefix: ''
1640
+ }, */
1641
+ FI: {
1642
+ mask: '############',
1643
+ prefix: '+358 ',
1644
+ },
1645
+ FR: {
1646
+ mask: '#########',
1647
+ prefix: '+33 ',
1648
+ },
1649
+ /* GF: {
1650
+ mask:'#########?',
1651
+ prefix: ''
1652
+ }, */
1653
+ GF: {
1654
+ mask: '##########',
1655
+ prefix: '+594 ',
1656
+ },
1657
+ PF: {
1658
+ mask: '######',
1659
+ prefix: '+689 ',
1660
+ },
1661
+ GA: {
1662
+ mask: '######?',
1663
+ prefix: '+241 ',
1664
+ },
1665
+ GM: {
1666
+ mask: '###-####',
1667
+ prefix: '+220 ',
1668
+ },
1669
+ GE: {
1670
+ mask: '########?',
1671
+ prefix: '+995 ',
1672
+ },
1673
+ /* DE: {
1674
+ mask:'######?????',
1675
+ prefix: ''
1676
+ }, */
1677
+ DE: {
1678
+ mask: '###########',
1679
+ prefix: '+49 ',
1680
+ },
1681
+ /* GH: {
1682
+ mask:'########?',
1683
+ prefix: ''
1684
+ }, */
1685
+ GH: {
1686
+ mask: '#########',
1687
+ prefix: '+233 ',
1688
+ },
1689
+ GI: {
1690
+ mask: '####-####',
1691
+ prefix: '+350 ',
1692
+ },
1693
+ GR: {
1694
+ mask: '##########',
1695
+ prefix: '+30 ',
1696
+ },
1697
+ GL: {
1698
+ mask: '###-###',
1699
+ prefix: '+299 ',
1700
+ },
1701
+ GD: {
1702
+ mask: '(###) ###-####',
1703
+ prefix: '+1 ',
1704
+ },
1705
+ GP: {
1706
+ mask: '##########',
1707
+ prefix: '+590 ',
1708
+ },
1709
+ GU: {
1710
+ mask: '(###) ###-####',
1711
+ prefix: '+1 ',
1712
+ },
1713
+ GT: {
1714
+ mask: '####-####',
1715
+ prefix: '+502 ',
1716
+ },
1717
+ GN: {
1718
+ mask: '####-####',
1719
+ prefix: '+224 ',
1720
+ },
1721
+ GW: {
1722
+ mask: '###-####',
1723
+ prefix: '+245 ',
1724
+ },
1725
+ GY: {
1726
+ mask: '(###) ####',
1727
+ prefix: '+592 ',
1728
+ },
1729
+ HK: {
1730
+ mask: '####-####',
1731
+ prefix: '+852 ',
1732
+ },
1733
+ HN: {
1734
+ mask: '########',
1735
+ prefix: '+504 ',
1736
+ },
1737
+ HT: {
1738
+ mask: '####-####',
1739
+ prefix: '+509 ',
1740
+ },
1741
+ HU: {
1742
+ mask: '########??',
1743
+ prefix: '+36 ',
1744
+ },
1745
+ /* IS: {
1746
+ mask:'#######??',
1747
+ prefix: ''
1748
+ }, */
1749
+ IS: {
1750
+ mask: '#########',
1751
+ prefix: '+354 ',
1752
+ },
1753
+ IN: {
1754
+ mask: '##########',
1755
+ prefix: '+91 ',
1756
+ },
1757
+ /* ID: {
1758
+ mask:'#######???',
1759
+ prefix: ''
1760
+ }, */
1761
+ ID: {
1762
+ mask: '#######??????', // allows 7 ~ 13 digits
1763
+ prefix: '+62 ',
1764
+ },
1765
+ IR: {
1766
+ mask: '##########',
1767
+ prefix: '+98 ',
1768
+ },
1769
+ /* IQ: {
1770
+ mask:'########??',
1771
+ prefix: ''
1772
+ }, */
1773
+ IQ: {
1774
+ mask: '##########',
1775
+ prefix: '+964 ',
1776
+ },
1777
+ /* IE: {
1778
+ mask:'#######??',
1779
+ prefix: ''
1780
+ }, */
1781
+ IE: {
1782
+ mask: '#########',
1783
+ prefix: '+353 ',
1784
+ },
1785
+ /* IL: {
1786
+ mask:'########?',
1787
+ prefix: ''
1788
+ }, */
1789
+ IL: {
1790
+ mask: '#########',
1791
+ prefix: '+972 ',
1792
+ },
1793
+ /* IT: {
1794
+ mask:'######????',
1795
+ prefix: ''
1796
+ }, */
1797
+ IT: {
1798
+ mask: '##########',
1799
+ prefix: '+39 ',
1800
+ },
1801
+ JM: {
1802
+ mask: '(###) ###-####',
1803
+ prefix: '+1 ',
1804
+ },
1805
+ JP: {
1806
+ mask: '#########??',
1807
+ prefix: '+81 ',
1808
+ },
1809
+ /* JO: {
1810
+ mask:'#######??',
1811
+ prefix: ''
1812
+ }, */
1813
+ JO: {
1814
+ mask: '#########',
1815
+ prefix: '+962 ',
1816
+ },
1817
+ KZ: {
1818
+ mask: '(###) ####-###',
1819
+ prefix: '+7 ',
1820
+ },
1821
+ /* KE: {
1822
+ mask:'######????',
1823
+ prefix: ''
1824
+ }, */
1825
+ KE: {
1826
+ mask: '##########',
1827
+ prefix: '+254 ',
1828
+ },
1829
+ KI: {
1830
+ mask: '##-###',
1831
+ prefix: '+686 ',
1832
+ },
1833
+ // kp
1834
+ /* KR: {
1835
+ mask:'####??????',
1836
+ prefix: ''
1837
+ }, */
1838
+ KR: {
1839
+ mask: '##########',
1840
+ prefix: '+82 ',
1841
+ },
1842
+ KW: {
1843
+ mask: '####-####',
1844
+ prefix: '+965 ',
1845
+ },
1846
+ KG: {
1847
+ mask: '#########',
1848
+ prefix: '+996 ',
1849
+ },
1850
+ LA: {
1851
+ mask: '########?',
1852
+ prefix: '+856 ',
1853
+ },
1854
+ LV: {
1855
+ mask: '####-####',
1856
+ prefix: '+371 ',
1857
+ },
1858
+ LB: {
1859
+ mask: '#######?',
1860
+ prefix: '+961 ',
1861
+ },
1862
+ LS: {
1863
+ mask: '##-###-###',
1864
+ prefix: '+266 ',
1865
+ },
1866
+ // LR
1867
+ /* LY: {
1868
+ mask:'########?',
1869
+ prefix: ''
1870
+ }, */
1871
+ LY: {
1872
+ mask: '########?',
1873
+ prefix: '+218 ',
1874
+ },
1875
+ LI: {
1876
+ mask: '###-####',
1877
+ prefix: '+423 ',
1878
+ },
1879
+ LT: {
1880
+ mask: '########',
1881
+ prefix: '+370 ',
1882
+ },
1883
+ /* LU: {
1884
+ mask:'#####??????',
1885
+ prefix: '+352 '
1886
+ }, */
1887
+ LU: {
1888
+ mask: '###########',
1889
+ prefix: '+352 ',
1890
+ },
1891
+ MO: {
1892
+ mask: '####-####',
1893
+ prefix: '+853 ',
1894
+ },
1895
+ MK: {
1896
+ mask: '########',
1897
+ prefix: '+389 ',
1898
+ },
1899
+ MG: {
1900
+ mask: '##-##-###-##',
1901
+ prefix: '+261 ',
1902
+ },
1903
+ /* MW: {
1904
+ mask:'#######??',
1905
+ prefix: '+265 '
1906
+ }, */
1907
+ MW: {
1908
+ mask: '#########',
1909
+ prefix: '+265 ',
1910
+ },
1911
+ /* MY: {
1912
+ mask:'#######???',
1913
+ prefix: '+60 '
1914
+ }, */
1915
+ MY: {
1916
+ mask: '##########',
1917
+ prefix: '+60 ',
1918
+ },
1919
+ MV: {
1920
+ mask: '###-####',
1921
+ prefix: '+960 ',
1922
+ },
1923
+ ML: {
1924
+ mask: '####-####',
1925
+ prefix: '+223 ',
1926
+ },
1927
+ MT: {
1928
+ mask: '##-##-##-##',
1929
+ prefix: '+356 ',
1930
+ },
1931
+ MH: {
1932
+ mask: '###-####',
1933
+ prefix: '+692 ',
1934
+ },
1935
+ MQ: {
1936
+ mask: '###-######',
1937
+ prefix: '+596 ',
1938
+ },
1939
+ // MR
1940
+ MU: {
1941
+ mask: '###-####',
1942
+ prefix: '+230 ',
1943
+ },
1944
+ // YT
1945
+ MX: {
1946
+ mask: '(###) ###-####',
1947
+ prefix: '+52 ',
1948
+ },
1949
+ // FM
1950
+ MD: {
1951
+ mask: '########',
1952
+ prefix: '+373 ',
1953
+ },
1954
+ MC: {
1955
+ mask: '####-####',
1956
+ prefix: '+377 ',
1957
+ },
1958
+ /* MN: {
1959
+ mask:'######?????',
1960
+ prefix: '+976 '
1961
+ }, */
1962
+ MN: {
1963
+ mask: '###########',
1964
+ prefix: '+976 ',
1965
+ },
1966
+ MS: {
1967
+ mask: '(###) ###-####',
1968
+ prefix: '+1 ',
1969
+ },
1970
+ MA: {
1971
+ mask: '#########?', // allows 9 ~ 10 digits
1972
+ prefix: '+212 ',
1973
+ },
1974
+ /* MZ: {
1975
+ mask:'########?',
1976
+ prefix: '+258 '
1977
+ }, */
1978
+ MZ: {
1979
+ mask: '#########',
1980
+ prefix: '+258 ',
1981
+ },
1982
+ /* MM: {
1983
+ mask:'#######?',
1984
+ prefix: '+95 '
1985
+ }, */
1986
+ MM: {
1987
+ mask: '########',
1988
+ prefix: '+95 ',
1989
+ },
1990
+ /* NA: {
1991
+ mask:'######????',
1992
+ prefix: '+264 '
1993
+ }, */
1994
+ NA: {
1995
+ mask: '##########',
1996
+ prefix: '+264 ',
1997
+ },
1998
+ // NR
1999
+ /* NP: {
2000
+ mask:'########??',
2001
+ prefix: '+977 '
2002
+ }, */
2003
+ NP: {
2004
+ mask: '##########',
2005
+ prefix: '+977 ',
2006
+ },
2007
+ NL: {
2008
+ mask: '#########',
2009
+ prefix: '+31 ',
2010
+ },
2011
+ /* AN: {
2012
+ mask:'#######?',
2013
+ prefix: '+599 '
2014
+ }, */
2015
+ AN: {
2016
+ mask: '########',
2017
+ prefix: '+599 ',
2018
+ },
2019
+ NC: {
2020
+ mask: '###-###',
2021
+ prefix: '+687 ',
2022
+ },
2023
+ /* NZ: {
2024
+ mask:'########??',
2025
+ prefix: '+64 '
2026
+ }, */
2027
+ NZ: {
2028
+ mask: '##########',
2029
+ prefix: '+64 ',
2030
+ },
2031
+ NI: {
2032
+ mask: '####-####',
2033
+ prefix: '+505 ',
2034
+ },
2035
+ NE: {
2036
+ mask: '##-###-###',
2037
+ prefix: '+227 ',
2038
+ },
2039
+ /* NG: {
2040
+ mask:'########??',
2041
+ prefix: '+234 '
2042
+ }, */
2043
+ NG: {
2044
+ mask: '##########',
2045
+ prefix: '+234 ',
2046
+ },
2047
+ // NU
2048
+ MP: {
2049
+ mask: '(###) ###-####',
2050
+ prefix: '+1 ',
2051
+ },
2052
+ NO: {
2053
+ mask: '####-####',
2054
+ prefix: '+47 ',
2055
+ },
2056
+ OM: {
2057
+ mask: '####-####',
2058
+ prefix: '+968 ',
2059
+ },
2060
+ /* PK: {
2061
+ mask:'#########?',
2062
+ prefix: '+92 '
2063
+ }, */
2064
+ PK: {
2065
+ mask: '##########',
2066
+ prefix: '+92 ',
2067
+ },
2068
+ PW: {
2069
+ mask: '###-####',
2070
+ prefix: '+680 ',
2071
+ },
2072
+ /* PA: {
2073
+ mask:'#######?',
2074
+ prefix: '+507 '
2075
+ }, */
2076
+ PA: {
2077
+ mask: '########',
2078
+ prefix: '+507 ',
2079
+ },
2080
+ /* PG: {
2081
+ mask:'#######?',
2082
+ prefix: '+675 '
2083
+ }, */
2084
+ PG: {
2085
+ mask: '########',
2086
+ prefix: '+675 ',
2087
+ },
2088
+ // PY
2089
+ /* PE: {
2090
+ mask:'#######????',
2091
+ prefix: '+51 '
2092
+ }, */
2093
+ PE: {
2094
+ mask: '###########',
2095
+ prefix: '+51 ',
2096
+ },
2097
+ /* PH: {
2098
+ mask:'########??',
2099
+ prefix: '+63 '
2100
+ }, */
2101
+ PH: {
2102
+ mask: '##########',
2103
+ prefix: '+63 ',
2104
+ },
2105
+ PL: {
2106
+ mask: '#########',
2107
+ prefix: '+48 ',
2108
+ },
2109
+ PT: {
2110
+ mask: '#-####-####',
2111
+ prefix: '+351 ',
2112
+ },
2113
+ PR: {
2114
+ mask: '(###) ###-####',
2115
+ prefix: '+1 ',
2116
+ },
2117
+ QA: {
2118
+ mask: '###-####',
2119
+ prefix: '+974 ',
2120
+ },
2121
+ RE: {
2122
+ mask: '###-###-###',
2123
+ prefix: '+262 ',
2124
+ },
2125
+ RO: {
2126
+ mask: '#########',
2127
+ prefix: '+40 ',
2128
+ },
2129
+ RU: {
2130
+ mask: '##########',
2131
+ prefix: '+7 ',
2132
+ },
2133
+ RW: {
2134
+ mask: '###-###-###',
2135
+ prefix: '+250 ',
2136
+ },
2137
+ SH: {
2138
+ mask: '#-###',
2139
+ prefix: '+290 ',
2140
+ },
2141
+ // PM
2142
+ KN: {
2143
+ mask: '(###) ###-####',
2144
+ prefix: '+1 ',
2145
+ },
2146
+ LC: {
2147
+ mask: '(###) ###-####',
2148
+ prefix: '+1 ',
2149
+ },
2150
+ VC: {
2151
+ mask: '(###) ###-####',
2152
+ prefix: '+1 ',
2153
+ },
2154
+ // WS
2155
+ // SM
2156
+ ST: {
2157
+ mask: '##-####',
2158
+ prefix: '+239 ',
2159
+ },
2160
+ /* SA: {
2161
+ mask:'########?',
2162
+ prefix: '+966 '
2163
+ }, */
2164
+ SA: {
2165
+ mask: '#########',
2166
+ prefix: '+966 ',
2167
+ },
2168
+ SN: {
2169
+ mask: '##-###-####',
2170
+ prefix: '+221 ',
2171
+ },
2172
+ SC: {
2173
+ mask: '###-###',
2174
+ prefix: '+248 ',
2175
+ },
2176
+ SL: {
2177
+ mask: '(##) ###-###',
2178
+ prefix: '+232 ',
2179
+ },
2180
+ SG: {
2181
+ mask: '####-####',
2182
+ prefix: '+65 ',
2183
+ },
2184
+ SK: {
2185
+ mask: '#########',
2186
+ prefix: '+421 ',
2187
+ },
2188
+ SI: {
2189
+ mask: '########',
2190
+ prefix: '+386 ',
2191
+ },
2192
+ SB: {
2193
+ mask: '##-###',
2194
+ prefix: '+677 ',
2195
+ },
2196
+ // SO
2197
+ ZA: {
2198
+ mask: '(##) ###-####',
2199
+ prefix: '+27 ',
2200
+ },
2201
+ ES: {
2202
+ mask: '###-###-###',
2203
+ prefix: '+34 ',
2204
+ },
2205
+ LK: {
2206
+ mask: '(##) ###-####',
2207
+ prefix: '+94 ',
2208
+ },
2209
+ SD: {
2210
+ mask: '##-###-####',
2211
+ prefix: '+249 ',
2212
+ },
2213
+ SR: {
2214
+ mask: '######?',
2215
+ prefix: '+597 ',
2216
+ },
2217
+ SZ: {
2218
+ mask: '###-####',
2219
+ prefix: '+268 ',
2220
+ },
2221
+ /* SE: {
2222
+ mask:'######?????',
2223
+ prefix: '+46 '
2224
+ }, */
2225
+ SE: {
2226
+ mask: '###########',
2227
+ prefix: '+46 ',
2228
+ },
2229
+ CH: {
2230
+ mask: '(##) ###-####',
2231
+ prefix: '+41 ',
2232
+ },
2233
+ /* SY: {
2234
+ mask:'########?',
2235
+ prefix: '+963 '
2236
+ }, */
2237
+ SY: {
2238
+ mask: '#########',
2239
+ prefix: '+963 ',
2240
+ },
2241
+ TJ: {
2242
+ mask: '#########',
2243
+ prefix: '+992 ',
2244
+ },
2245
+ TZ: {
2246
+ mask: '#########',
2247
+ prefix: '+255 ',
2248
+ },
2249
+ /* TH: {
2250
+ mask:'########?',
2251
+ prefix: '+66 '
2252
+ }, */
2253
+ TH: {
2254
+ mask: '#########',
2255
+ prefix: '+66 ',
2256
+ },
2257
+ TG: {
2258
+ mask: '###-####',
2259
+ prefix: '+228 ',
2260
+ },
2261
+ // TK
2262
+ // TO
2263
+ TT: {
2264
+ mask: '(###) ###-####',
2265
+ prefix: '+1 ',
2266
+ },
2267
+ TN: {
2268
+ mask: '##-###-###',
2269
+ prefix: '+216 ',
2270
+ },
2271
+ TR: {
2272
+ mask: '(###) ###-####',
2273
+ prefix: '+90 ',
2274
+ },
2275
+ TM: {
2276
+ mask: '########',
2277
+ prefix: '+993 ',
2278
+ },
2279
+ TC: {
2280
+ mask: '(###) ###-####',
2281
+ prefix: '+1 ',
2282
+ },
2283
+ // TV
2284
+ UG: {
2285
+ mask: '#########',
2286
+ prefix: '+256 ',
2287
+ },
2288
+ UA: {
2289
+ mask: '(##) ###-####',
2290
+ prefix: '+380 ',
2291
+ },
2292
+ /* AE: {
2293
+ mask:'########?',
2294
+ prefix: '+971 '
2295
+ }, */
2296
+ AE: {
2297
+ mask: '#########',
2298
+ prefix: '+971 ',
2299
+ },
2300
+ /* GB: {
2301
+ mask:'##########???',
2302
+ prefix: '+44 '
2303
+ }, */
2304
+ GB: {
2305
+ mask: '#########????',
2306
+ prefix: '+44 ',
2307
+ },
2308
+ UY: {
2309
+ mask: '########?',
2310
+ prefix: '+598 ',
2311
+ },
2312
+ UZ: {
2313
+ mask: '(##) ###-####',
2314
+ prefix: '+998 ',
2315
+ },
2316
+ // VU
2317
+ // VA
2318
+ VE: {
2319
+ mask: '(###) ###-####',
2320
+ prefix: '+58 ',
2321
+ },
2322
+ VN: {
2323
+ mask: '#######????',
2324
+ prefix: '+84 ',
2325
+ },
2326
+ VG: {
2327
+ mask: '(###) ###-####',
2328
+ prefix: '+1 ',
2329
+ },
2330
+ VI: {
2331
+ mask: '(###) ###-####',
2332
+ prefix: '+1 ',
2333
+ },
2334
+ // WF
2335
+ /* YE: {
2336
+ mask:'#######??',
2337
+ prefix: '+967 '
2338
+ }, */
2339
+ YE: {
2340
+ mask: '#########',
2341
+ prefix: '+967 ',
2342
+ },
2343
+ // YU
2344
+ ZM: {
2345
+ mask: '#########',
2346
+ prefix: '+260 ',
2347
+ },
2348
+ /* ZW: {
2349
+ mask:'####?????',
2350
+ prefix: '+263 '
2351
+ }, */
2352
+ ZW: {
2353
+ mask: '#########',
2354
+ prefix: '+263 ',
2355
+ },
2356
+ AC: {
2357
+ mask: '####',
2358
+ prefix: '+247 ',
2359
+ },
2360
+ ME: {
2361
+ mask: '(##) ###-###?',
2362
+ prefix: '+382 ',
2363
+ },
2364
+ /* PS: {
2365
+ mask:'########?',
2366
+ prefix: '+970 '
2367
+ }, */
2368
+ PS: {
2369
+ mask: '#########',
2370
+ prefix: '+970 ',
2371
+ },
2372
+ /* RS: {
2373
+ mask:'#######??',
2374
+ prefix: '+381 '
2375
+ }, */
2376
+ RS: {
2377
+ mask: '#########',
2378
+ prefix: '+381 ',
2379
+ },
2380
+ /* TW: {
2381
+ mask:'########?',
2382
+ prefix: '+886 '
2383
+ }, */
2384
+ TW: {
2385
+ mask: '#########',
2386
+ prefix: '+886 ',
2387
+ },
2388
+ CW: {
2389
+ mask: '#-###-####',
2390
+ prefix: '+599 ',
2391
+ },
2392
+ US: {
2393
+ mask: '(###) ###-####',
2394
+ prefix: '',
2395
+ },
2396
+ };
2397
+ function formatPhoneNumber(value, isoCode = 'US') {
2398
+ const { mask, prefix } = phoneNumberFormats[isoCode] || phoneNumberFormats.US;
2399
+ const options = {
2400
+ prefix,
2401
+ };
2402
+ const val = value || '';
2403
+ // Brazil need edge case handle, mobile: (xx) xxxxx-xxxx, land phone: (xx) xxxx-xxxx
2404
+ if (isoCode === 'BR' && val.replace(/[^0-9]/g, '').length === 11) {
2405
+ return formatValue(val, '(##) #####-####', options);
2406
+ }
2407
+ else {
2408
+ return formatValue(val, mask, options);
2409
+ }
2410
+ }
2411
+
2412
+ function formatSSN(value) {
2413
+ return formatValue(value, '###-##-####');
2414
+ }
2415
+
2416
+ function formatTIN(value) {
2417
+ return formatValue(value, '##-#######');
2418
+ }
2419
+
2420
+ function formatAlphanumeric(value) {
2421
+ const val = (value || '').replace(/[^\da-zA-Z]/g, '');
2422
+ return formatValue(val);
2423
+ }
2424
+
2425
+ function formatAlpha(value, modifier) {
2426
+ let val = value || '';
2427
+ if (modifier === 'spaced') {
2428
+ val = val.replace(/[^a-zA-Z ]/g, '');
2429
+ }
2430
+ else {
2431
+ val = val.replace(/[^a-zA-Z]/g, '');
2432
+ }
2433
+ return formatValue(val);
2434
+ }
2435
+
2436
+ function getNumberFormat(formatOptions) {
2437
+ const numberFormat = {
2438
+ prefix: '',
2439
+ suffix: '',
2440
+ decimals: 0,
2441
+ decimalSeparator: '.',
2442
+ thousandsSeparator: '',
2443
+ allowDecimal: false,
2444
+ allowNegative: true,
2445
+ };
2446
+ const formatParts = formatOptions.split('-');
2447
+ // handle deprecated formats
2448
+ if (formatParts[0] === 'delimited') {
2449
+ // `delimited` - to be replaced by `integer-delimited`
2450
+ numberFormat.thousandsSeparator = ',';
2451
+ }
2452
+ else if (formatParts[0].match(/^[0-9]+dec$/)) {
2453
+ // `Ndec` - to be replaced by `Ndecimal`
2454
+ numberFormat.decimals = Number(formatParts[0].replace('dec', ''));
2455
+ numberFormat.allowDecimal = true;
2456
+ numberFormat.thousandsSeparator = ',';
2457
+ }
2458
+ else {
2459
+ // determine number type
2460
+ if (formatParts[0].includes('decimal')) {
2461
+ numberFormat.decimals = Number(formatParts[0].replace('decimal', ''));
2462
+ numberFormat.allowDecimal = true;
2463
+ }
2464
+ else if (formatParts[0] !== 'integer') {
2465
+ // Ignore any formats that don't start with Ndecimal or integer
2466
+ return;
2467
+ }
2468
+ // determine if negative numbers are allowed
2469
+ if (formatParts.includes('positive')) {
2470
+ numberFormat.allowNegative = false;
2471
+ }
2472
+ // determine if number is delimited
2473
+ if (formatParts.includes('delimited')) {
2474
+ numberFormat.thousandsSeparator = ',';
2475
+ }
2476
+ }
2477
+ return numberFormat;
2478
+ }
2479
+ function formatNumeric(value = '', modifier = '', explicit = false) {
2480
+ const numberFormat = getNumberFormat(modifier);
2481
+ if (!numberFormat) {
2482
+ const val = (value || '').replace(/[^\d.,-]/g, '');
2483
+ return formatValue(val);
2484
+ }
2485
+ return formatNumber(value, numberFormat, explicit);
2486
+ }
2487
+ function formatPercentage(value = '', modifier = '', explicit = false) {
2488
+ const numberFormat = getNumberFormat(modifier);
2489
+ if (!numberFormat) {
2490
+ const val = (value || '').replace(/[^\d.,-]/g, '');
2491
+ return formatValue(val, undefined, { suffix: '%' });
2492
+ }
2493
+ numberFormat.suffix = '%';
2494
+ return formatNumber(value, numberFormat, explicit);
2495
+ }
2496
+
2497
+ const postalCodeFormats = {
2498
+ AF: '####',
2499
+ AL: '####',
2500
+ DZ: '#####',
2501
+ AC: 'ASCN 1ZZ',
2502
+ AD: 'AD###', // pre
2503
+ AR: '####',
2504
+ 'AR+': '@####@@@',
2505
+ AI: 'AI-2640',
2506
+ AM: '####',
2507
+ AS: '#####',
2508
+ 'AS+4': '#####-####',
2509
+ AU: '####',
2510
+ AT: '####',
2511
+ AZ: 'AZ ####', // pre
2512
+ BH: '###?',
2513
+ BD: '####',
2514
+ BB: 'BB#####', // pre
2515
+ BY: '######',
2516
+ BE: '####',
2517
+ BM: '@@ **',
2518
+ BT: '#####',
2519
+ BA: '######',
2520
+ BR: '#####',
2521
+ 'BR+3': '#####-###',
2522
+ VG: 'VG####', // pre
2523
+ BN: '@@####',
2524
+ BG: '####',
2525
+ KH: '#####',
2526
+ KY: 'KY#-####', // pre
2527
+ CA: '@#@ #@#',
2528
+ CL: '###-####',
2529
+ CN: '######',
2530
+ CX: '####',
2531
+ CC: '####',
2532
+ CO: '######',
2533
+ CR: '#####',
2534
+ 'CR+4': '#####-####',
2535
+ CV: '####',
2536
+ HR: '#####',
2537
+ CU: '#####',
2538
+ CY: '####',
2539
+ CZ: '### ##',
2540
+ DK: '####',
2541
+ DO: '#####',
2542
+ EC: '######',
2543
+ SV: '####',
2544
+ EG: '#####',
2545
+ EE: '#####',
2546
+ ET: '####',
2547
+ FK: 'FIQQ 1ZZ',
2548
+ FO: '###',
2549
+ FI: '#####',
2550
+ FR: '#####',
2551
+ GF: '973##', // pre?
2552
+ PF: '987##', // pre?
2553
+ GI: 'GX11 1AA',
2554
+ GE: '####',
2555
+ DE: '#####',
2556
+ GR: '### ##',
2557
+ GL: '####',
2558
+ GP: '971##', // pre?
2559
+ GU: '#####',
2560
+ 'GU+4': '#####-####',
2561
+ GT: '#####',
2562
+ GG: 'GY#? #@@',
2563
+ GN: '###',
2564
+ GS: 'SIQQ 1ZZ',
2565
+ GW: '####',
2566
+ HT: '####',
2567
+ HN: '@@####',
2568
+ 'HN-': '#####',
2569
+ HU: '####',
2570
+ IS: '###',
2571
+ IN: '### ###',
2572
+ ID: '#####',
2573
+ IE: '*** ****',
2574
+ IR: '##########',
2575
+ IQ: '#####',
2576
+ IM: 'IM#? #@@', // pre
2577
+ IL: '#######',
2578
+ IT: '#####',
2579
+ JM: '##',
2580
+ JP: '###-####',
2581
+ JE: 'JE#? #@@', // pre
2582
+ JO: '#####',
2583
+ KZ: '######',
2584
+ KE: '#####',
2585
+ KR: '#####',
2586
+ KN: 'KN####',
2587
+ XK: '#####',
2588
+ KW: '#####',
2589
+ KG: '######',
2590
+ LA: '#####',
2591
+ LV: 'LV-####', // pre
2592
+ LB: '####? ????', // also 00000
2593
+ LS: '###',
2594
+ LR: '####',
2595
+ LI: '####',
2596
+ LT: '#####', // pre-
2597
+ LU: '####',
2598
+ MK: '####',
2599
+ MG: '###',
2600
+ MY: '#####',
2601
+ MV: '#####',
2602
+ MT: '@@@ ####',
2603
+ MH: '#####',
2604
+ 'MH+4': '#####-####',
2605
+ MU: '#####',
2606
+ MQ: '972##', // pre?
2607
+ MW: '######',
2608
+ YT: '976##', // pre?
2609
+ MX: '#####',
2610
+ FM: '#####',
2611
+ 'FM+4': '#####-####',
2612
+ MD: '####', // pre
2613
+ MC: '980##', // pre?
2614
+ MN: '#####',
2615
+ ME: '#####',
2616
+ MA: '#####',
2617
+ MZ: '####',
2618
+ MM: '#####',
2619
+ NA: '#####',
2620
+ NP: '#####',
2621
+ NC: '988##', // pre?
2622
+ NZ: '####',
2623
+ NI: '#####',
2624
+ NE: '####',
2625
+ NG: '######',
2626
+ NF: '####',
2627
+ MP: '#####',
2628
+ NO: '####',
2629
+ OM: '###',
2630
+ PK: '#####',
2631
+ PW: '#####',
2632
+ 'PW+4': '#####-####',
2633
+ PS: '###',
2634
+ PA: '####',
2635
+ PG: '###',
2636
+ PY: '####',
2637
+ PE: '#####',
2638
+ 'PE+': '####', // pre
2639
+ PH: '####',
2640
+ PL: '##-###',
2641
+ PT: '####',
2642
+ 'PT+3': '####-###',
2643
+ PR: '#####',
2644
+ 'PR+4': '#####-####',
2645
+ RE: '974##', // pre?
2646
+ PM: '975##',
2647
+ PN: 'PCRN 1ZZ',
2648
+ RO: '######',
2649
+ RU: '######',
2650
+ LC: 'LC## ###', // pre
2651
+ VC: '####', // pre
2652
+ WS: '####', // pre
2653
+ SM: '4879#', // pre?
2654
+ SA: '#####',
2655
+ 'SA+4': '#####-####',
2656
+ SN: '#####',
2657
+ RS: '#####',
2658
+ SG: '######',
2659
+ SH: '@@@@ 1ZZ',
2660
+ SK: '### ##',
2661
+ SI: '####', // pre?
2662
+ SO: '@@ #####',
2663
+ ZA: '####',
2664
+ ES: '#####',
2665
+ LK: '#####',
2666
+ SD: '#####',
2667
+ SZ: '@###',
2668
+ SE: '### ##',
2669
+ CH: '####',
2670
+ SJ: '####',
2671
+ TW: '###',
2672
+ 'TW+2': '###-##?',
2673
+ TJ: '######',
2674
+ TZ: '#####',
2675
+ TH: '#####',
2676
+ TT: '######',
2677
+ TN: '####',
2678
+ TR: '#####',
2679
+ TM: '######',
2680
+ UA: '#####',
2681
+ UY: '#####',
2682
+ VI: '#####',
2683
+ 'VI+4': '#####-####',
2684
+ UZ: '######',
2685
+ VE: '####',
2686
+ 'VE-': '####-@',
2687
+ VN: '#####?',
2688
+ YU: '#####',
2689
+ WF: '986##', // pre?
2690
+ ZM: '#####',
2691
+ US: '#####',
2692
+ 'US+4': '#####-####',
2693
+ };
2694
+ function formatPostalCode(value, modifier = 'US') {
2695
+ const mask = postalCodeFormats[modifier];
2696
+ if (!mask) {
2697
+ return formatAlphanumeric(value);
2698
+ }
2699
+ return formatValue(value, mask);
2700
+ }
2701
+
2702
+ const dateFormats = {
2703
+ 'MM/DD/YYYY': '##/##/####',
2704
+ 'M/D/YYYY': '#?/#?/####',
2705
+ 'MM/DD/YY': '##/##/##',
2706
+ 'M/D/YY': '#?/#?/##',
2707
+ 'MM/YY': '##/##',
2708
+ 'M/YY': '#?/##',
2709
+ 'DD/MM/YYYY': '##/##/####',
2710
+ 'D/M/YYYY': '#?/#?/####',
2711
+ 'DD/MM/YY': '##/##/##',
2712
+ 'D/M/YY': '#?/#?/##',
2713
+ 'MM-DD-YYYY': '##-##-####',
2714
+ 'M-D-YYYY': '#?-#?-####',
2715
+ 'MM-DD-YY': '##-##-##',
2716
+ 'M-D-YY': '#?-#?-##',
2717
+ 'MM-YY': '##-##',
2718
+ 'M-YY': '#?-##',
2719
+ 'DD-MM-YYYY': '##-##-####',
2720
+ 'D-M-YYYY': '#?-#?-####',
2721
+ 'DD-MM-YY': '##-##-##',
2722
+ 'D-M-YY': '#?-#?-##',
2723
+ };
2724
+ function formatDate(value, format = 'MM/DD/YYYY') {
2725
+ const mask = dateFormats[format === null || format === void 0 ? void 0 : format.toUpperCase()] || dateFormats['MM/DD/YYYY'];
2726
+ const formattedValueObject = formatValue(value, mask);
2727
+ return Object.assign(Object.assign({}, formattedValueObject), { value: formattedValueObject.formattedValue });
2728
+ }
2729
+
2730
+ function format(value) {
2731
+ // have a initial generic mask which then converts to specific mask
2732
+ const detectedType = formatCreditCard.detectCreditCardTypeFromValue(value);
2733
+ const formattedValueObject = creditCardFormatters[detectedType](value);
2734
+ if (value.length < 2 && detectedType === 'unknown') {
2735
+ formattedValueObject.leftIcon = 'card';
2736
+ }
2737
+ return formattedValueObject;
2738
+ }
2739
+ const unknownFormatter = function unknownFn(value) {
2740
+ const valueObject = formatValue(value, '#### #### #### ####');
2741
+ return Object.assign(Object.assign({}, valueObject), { type: 'unknown', leftIcon: 'card-unknown', leftIconMuted: value.length < 16 });
2742
+ };
2743
+ const amexFormatter = function amexFn(value) {
2744
+ const valueObject = formatValue(value, '#### ###### #####');
2745
+ return Object.assign(Object.assign({}, valueObject), { type: 'amex', leftIcon: 'card-amex-color', leftIconMuted: value.length < 15 });
2746
+ };
2747
+ const discoverFormatter = function discoverFn(value) {
2748
+ const valueObject = formatValue(value, '#### #### #### ####');
2749
+ return Object.assign(Object.assign({}, valueObject), { type: 'discover', leftIcon: 'card-discover-color', leftIconMuted: value.length < 16 });
2750
+ };
2751
+ const masterCardFormatter = function masterCardFn(value) {
2752
+ const valueObject = formatValue(value, '#### #### #### ####');
2753
+ return Object.assign(Object.assign({}, valueObject), { type: 'masterCard', leftIcon: 'card-mastercard-color', leftIconMuted: value.length < 16 });
2754
+ };
2755
+ const visaFormatter = function visaFn(value) {
2756
+ const valueObject = formatValue(value, '#### #### #### ####');
2757
+ return Object.assign(Object.assign({}, valueObject), { type: 'visa', leftIcon: 'card-visa-color', leftIconMuted: value.length < 16 });
2758
+ };
2759
+ const dinersClubInternationalFormatter = function dinersClub(value) {
2760
+ const valueObject = formatValue(value, '#### ###### ####');
2761
+ return Object.assign(Object.assign({}, valueObject), { type: 'dinersClub', leftIcon: 'card-dinersclub-color', leftIconMuted: value.length < 14 });
2762
+ };
2763
+ const creditCardFormatters = {
2764
+ discover: discoverFormatter,
2765
+ amex: amexFormatter,
2766
+ masterCard: masterCardFormatter,
2767
+ visa: visaFormatter,
2768
+ dinersClub: dinersClubInternationalFormatter,
2769
+ unknown: unknownFormatter,
2770
+ };
2771
+ /* tslint:disable:cyclomatic-complexity */
2772
+ function detectCreditCardTypeFromValue(value) {
2773
+ // use value and some algorithm from the internet to detect and return card type based on string
2774
+ // return string 'unknown' if algorithm cannot detect or returns a type that is not one of our 5 supported types
2775
+ const firstInt = parseInt(value.charAt(0));
2776
+ const secondInt = parseInt(value.charAt(1));
2777
+ switch (firstInt) {
2778
+ case 2:
2779
+ if (secondInt > 1 && secondInt < 8) {
2780
+ if (value.length >= 4) {
2781
+ const firstfour = parseInt(value.substr(0, 4));
2782
+ if (firstfour >= 2221 && firstfour < 2721) {
2783
+ return 'masterCard';
2784
+ }
2785
+ }
2786
+ else {
2787
+ return 'masterCard';
2788
+ }
2789
+ }
2790
+ break;
2791
+ case 3:
2792
+ if (secondInt === 4 || secondInt === 7) {
2793
+ return 'amex';
2794
+ }
2795
+ if (secondInt === 0) {
2796
+ if (value.length > 2) {
2797
+ const thirdInt = parseInt(value.charAt(2));
2798
+ if (thirdInt < 6 || thirdInt === 9) {
2799
+ return 'dinersClub';
2800
+ }
2801
+ }
2802
+ else {
2803
+ return 'dinersClub';
2804
+ }
2805
+ }
2806
+ if (secondInt === 6 || secondInt === 8 || secondInt === 9) {
2807
+ return 'dinersClub';
2808
+ }
2809
+ break;
2810
+ case 4:
2811
+ return 'visa';
2812
+ case 5:
2813
+ if (secondInt > 0 && secondInt < 6) {
2814
+ return 'masterCard';
2815
+ }
2816
+ break;
2817
+ case 6:
2818
+ if (secondInt === 0) {
2819
+ if (value.length > 3) {
2820
+ const firstfour = value.substr(0, 4);
2821
+ if (firstfour === '6011') {
2822
+ return 'discover';
2823
+ }
2824
+ }
2825
+ else {
2826
+ return 'discover';
2827
+ }
2828
+ }
2829
+ if (secondInt === 4) {
2830
+ if (value.length > 2) {
2831
+ const firstthree = parseInt(value.substr(0, 3));
2832
+ if (firstthree > 643) {
2833
+ return 'discover';
2834
+ }
2835
+ }
2836
+ else {
2837
+ return 'discover';
2838
+ }
2839
+ }
2840
+ if (secondInt === 5) {
2841
+ return 'discover';
2842
+ }
2843
+ if (secondInt === 2) {
2844
+ if (value.length > 5) {
2845
+ const firstsix = parseInt(value.substr(0, 6));
2846
+ if (firstsix >= 622126 && firstsix <= 622925) {
2847
+ return 'discover';
2848
+ }
2849
+ }
2850
+ else {
2851
+ return 'discover';
2852
+ }
2853
+ }
2854
+ break;
2855
+ default:
2856
+ return 'unknown';
2857
+ }
2858
+ return 'unknown';
2859
+ }
2860
+ /* tslint:enable:cyclomatic-complexity */
2861
+ const formatCreditCard = {
2862
+ detectCreditCardTypeFromValue,
2863
+ format,
2864
+ amexFormatter,
2865
+ dinersClubInternationalFormatter,
2866
+ discoverFormatter,
2867
+ masterCardFormatter,
2868
+ visaFormatter,
2869
+ unknownFormatter,
2870
+ };
2871
+
2872
+ const q2InputCss = "*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{--comp-default-input-margin:var(--tct-input-margin-top, var(--t-input-margin-top, var(--app-scale-5x, 25px))) 0 var(--tct-input-margin-bottom, var(--t-input-margin-bottom, var(--app-scale-5x, 25px)));display:block;margin:var(--tct-input-margin, var(--comp-default-input-margin));font-size:var(--tct-input-font-size, var(--t-input-font-size, var(--app-font-size, inherit)))}:host([hidden]){display:none}.field-container,.input-container{position:relative}.field-container{--comp-input-tween:var(--tct-input-tween, var(--t-input-tween, var(--tct-tween-2, var(--app-tween-2, 0.4s ease))))}.field-container.is-small .btn-clear{--tct-btn-icon-width:20px;--tct-icon-size:17px}.input-label{--comp-label-padding:var(--tct-input-label-padding, 0 var(--tct-input-label-padding-right, var(--t-input-label-padding-right, 0)) 0 var(--tct-input-label-padding-left, var(--t-input-label-padding-left, 0)));display:block;padding:var(--comp-label-padding);color:var(--tct-input-label-font-color, var(--t-input-label-font-color, inherit));font-size:var(--tct-input-label-font-size, var(--t-input-label-font-size, inherit));font-weight:var(--tct-input-label-font-weight, var(--t-input-label-font-weight, 600));text-transform:var(--tct-input-label-text-transform, var(--t-input-label-text-transform, none));letter-spacing:var(--tct-input-label-letter-spacing, var(--t-input-label-letter-spacing, inherit));transition:color var(--comp-input-tween)}.optional-tag{--comp-label-optional-margin:var(--tct-input-label-optional-margin, 0 0 0 var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px)))));margin:var(--comp-label-optional-margin);color:var(--tct-input-label-optional-font-color, var(--t-input-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));font-size:var(--tct-input-label-optional-font-size, var(--t-input-label-optional-font-size, var(--app-font-size-small, 12px)));font-weight:var(--tct-input-label-optional-font-weight, var(--t-input-label-optional-font-weight, 400));line-height:1em}.count-tag{color:var(--tct-input-count-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77))));font-size:var(--tct-input-count-font-size, var(--app-font-size-small, 12px));font-weight:var(--tct-input-count-font-weight, 400);text-align:right;width:var(--tct-input-count-width, auto)}.label-wrapper{--comp-label-margin:var(--tct-input-label-margin, var(--tct-input-label-margin-top, var(--t-input-label-margin-top, 0)) 0 var(--tct-input-label-margin-bottom, var(--t-input-label-margin-bottom, var(--tct-scale-1, var(--app-scale-1x, 5px)))));display:flex;gap:var(--tct-input-label-gap, var(--app-scale-2x, 10px));justify-content:space-between;align-items:end;margin:var(--comp-label-margin);line-height:var(--tct-input-label-line-height, var(--t-input-label-line-height, inherit))}.label-wrapper:has(label.sr){margin:0}.input-container{--comp-input-background:var(--tct-input-background, var(--tct-input-bg, var(--t-input-bg, var(--t-gray-14, #fcfcfd))));--comp-input-backdrop-filter:var(--tct-input-backdrop-filter, none);--comp-input-horizontal-gap:var(--tct-input-horizontal-gap, var(--t-input-horizontal-gap, 0));--comp-input-border-top-left-radius:var(--tct-input-border-top-left-radius, var(--t-input-border-top-left-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 4px))));--comp-input-border-top-right-radius:var(--tct-input-border-top-right-radius, var(--t-input-border-top-right-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 4px))));--comp-input-border-bottom-right-radius:var(--tct-input-border-bottom-right-radius, var(--t-input-border-bottom-right-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 4px))));--comp-input-border-bottom-left-radius:var(--tct-input-border-bottom-left-radius, var(--t-input-border-bottom-left-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 4px))));--comp-input-border-radius:var(--comp-input-border-top-left-radius) var(--comp-input-border-top-right-radius)\n var(--comp-input-border-bottom-right-radius) var(--comp-input-border-bottom-left-radius);--comp-input-border-width:var(--tct-input-border-top-width, 1px) var(--tct-input-border-right-width, 1px)\n var(--tct-input-border-bottom-width, 1px) var(--tct-input-border-left-width, 1px);--comp-input-border-color:var(--tct-input-border-color, var(--t-input-border-color, var(--t-a11y-gray-color-AA, #404040)));--comp-input-prefix-clearance:calc(3 * var(--tct-input-prefix-font-size, 14px) + var(--tct-scale-1, 5px));--comp-input-icon-clearance:34px;--comp-input-min-height:var(--tct-input-min-height, var(--t-input-min-height, 44px));--comp-input-max-height:var(--tct-input-max-height, var(--t-input-max-height));--comp-input-hover-ring-color:var(--tct-input-hover-ring-color, var(--t-input-hover-ring-color));--comp-input-hover-ring:0 0 0 2px var(--t-base), 0 0 0 4px var(--comp-input-hover-ring-color), var(--tct-input-hover-box-shadow, var(--t-input-hover-box-shadow, 0 0 transparent));background:var(--comp-input-background);backdrop-filter:var(--comp-input-backdrop-filter);display:flex;align-items:center;gap:var(--tct-input-container-gap, var(--app-scale-2x, 10px));padding-inline:var(--tct-input-container-padding-inline);border-width:var(--comp-input-border-width);border-style:solid;border-color:var(--comp-input-border-color);border-radius:var(--comp-input-border-radius);box-shadow:var(--tct-input-box-shadow, var(--t-input-box-shadow, none));transition:background var(--comp-input-tween), backdrop-filter var(--comp-input-tween), border-width var(--comp-input-tween), border-color var(--comp-input-tween), box-shadow var(--comp-input-tween)}:host([disabled]:not([disabled=false])) .input-container{cursor:not-allowed;opacity:var(--tct-input-disabled-opacity, var(--t-input-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))));backdrop-filter:var(--tct-input-disabled-backdrop-filter, var(--comp-input-backdrop-filter))}.has-error .input-container{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a));backdrop-filter:var(--tct-input-error-backdrop-filter, var(--comp-input-backdrop-filter));background:var(--tct-input-error-background, var(--comp-input-background));box-shadow:var(--tct-input-error-box-shadow, var(--comp-input-hover-ring))}.input-container:hover{border-color:var(--tct-input-hover-border-color, var(--comp-input-border-color));background:var(--tct-input-hover-background, var(--comp-input-background));backdrop-filter:var(--tct-input-hover-backdrop-filter, var(--comp-input-backdrop-filter));box-shadow:var(--tct-input-hover-box-shadow, var(--comp-input-hover-ring))}.has-error .input-container:hover{border-color:var(--tct-input-error-hover-border-color, var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a)));backdrop-filter:var(--tct-input-error-hover-backdrop-filter, var(--tct-input-error-backdrop-filter, var(--tct-input-hover-backdrop-filter, var(--comp-input-backdrop-filter))));background:var(--tct-input-error-hover-background, var(--tct-input-error-background, var(--comp-input-background)));box-shadow:var(--tct-input-error-hover-box-shadow, var(--tct-input-error-box-shadow, var(--comp-input-hover-ring)))}.has-focus .input-container{border-color:var(--tct-input-focus-border-color, var(--t-input-focus-border-color, var(--comp-input-border-color)));background:var(--tct-input-focus-background, var(--comp-input-background));backdrop-filter:var(--tct-input-focus-backdrop-filter, var(--comp-input-backdrop-filter));box-shadow:var(--tct-input-focus-box-shadow, var(--const-double-focus-ring))}.has-focus.has-error .input-container,.has-focus.has-error .input-container:hover{border-color:var(--tct-input-error-focus-border-color, var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a)));backdrop-filter:var(--tct-input-error-focus-backdrop-filter, var(--tct-input-error-backdrop-filter, var(--tct-input-focus-backdrop-filter, var(--comp-input-backdrop-filter))));background:var(--tct-input-error-focus-background, var(--tct-input-error-background, var(--comp-input-background)));box-shadow:var(--tct-input-error-focus-box-shadow, var(--tct-input-error-box-shadow, var(--const-double-focus-ring)))}.input-container:has(.input-field:is(:-webkit-autofill,:autofill)){background:var(--tct-input-autofill-background, #faffbc);color:var(--tct-input-autofill-font-color, var(--t-text, inherit))}.input-container:has(.input-field:is(:-webkit-autofill,:autofill)) .input-field{box-shadow:0 0 0 1000px var(--tct-input-autofill-background, #faffbc) inset;color:var(--tct-input-autofill-font-color, var(--t-text, inherit));-webkit-text-fill-color:var(--tct-input-autofill-font-color, var(--t-text, inherit))}.input-field{flex:1;border:0;-webkit-appearance:none;appearance:none;box-sizing:border-box;min-height:var(--comp-input-min-height);max-height:var(--comp-input-max-height);overflow-y:hidden;height:var(--tct-input-height, var(--t-input-height, 44px));width:100%;padding:var(--tct-input-padding, 0);background:transparent;color:var(--tct-input-font-color, var(--t-input-font-color, var(--t-text, inherit)));display:inline-block;text-align:var(--tct-input-align, \"start\");font-weight:var(--tct-input-font-weight, var(--t-input-font-weight, 400));letter-spacing:var(--tct-input-letter-spacing, var(--t-input-letter-spacing, inherit));}.input-field:focus{outline:none;box-shadow:none}.input-field::-webkit-outer-spin-button,.input-field::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.input-field[type=number]{-moz-appearance:textfield}.input-field::-ms-reveal,.input-field::-ms-clear{display:none}.input-field[type=search]::-webkit-search-decoration,.input-field[type=search]::-webkit-search-cancel-button,.input-field[type=search]::-webkit-search-results-button,.input-field[type=search]::-webkit-search-results-decoration{display:none}.input-field[disabled]:not([disabled=false]){cursor:not-allowed}.right-aligned .input-field{text-align:right}.input-field:is(input){flex:1}.input-field:is(button){display:inline-flex;align-items:center}.has-custom-display .input-field:is(button){height:auto;padding:0}.input-field:is(button) span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.custom-display-container{max-width:100%}.has-custom-display .custom-display-container{--comp-default-padding:var(--app-scale-2x, 10px) var(--app-scale-2x, 10px) var(--app-scale-3x, 15px);padding:var(--tct-input-padding, var(--t-input-padding, var(--comp-default-padding)));width:100%}.input-field::placeholder,.placeholder-text{color:var(--tct-input-placeholder-font-color, var(--t-input-placeholder-font-color, var(--t-textA, var(--app-gray-d1, rgba(77, 77, 77, 0.77)))))}.pseudo-input-container{min-width:0;flex:1}.input-icons-container-left,.input-icons-container-right{--tct-btn-icon-hover-background:var(--tct-input-btn-hover-background);--tct-btn-hover-background:var(--tct-input-btn-hover-background);display:flex;flex-direction:row;align-items:center;gap:var(--comp-input-horizontal-gap)}.input-icons-container-left>div:not(.vertical-separator),.input-icons-container-right>div:not(.vertical-separator){min-width:var(--tct-input-icon-container-icon-min-width, 44px);display:flex;justify-content:center;align-items:center;font-size:var(--tct-input-icon-container-font-size, inherit)}.input-icons-container-left:empty,.input-icons-container-right:empty{display:var(--tct-input-icon-container-empty-display, block)}.input-icons-container-left{padding-left:var(--comp-input-horizontal-gap)}.input-icons-container-right{padding-right:var(--comp-input-horizontal-gap);--comp-visibility-toggle-padding:0px var(--app-scale-2x, 10px)}.input-icons-container-right .btn-visibility-toggle{--tct-btn-height:var(--comp-input-min-height);--tct-btn-padding-inline:var(--tct-input-visibility-toggle-padding, var(--app-scale-2x, 10px));--tct-btn-font-weight:var(--tct-input-visibility-toggle-font-weight, 400);color:var(--tct-input-visibility-toggle-font-color, var(--t-primary, #0079c1));font-size:var(--tct-input-visibility-toggle-font-size, var(--app-font-size-small, 12px))}q2-icon{margin-top:calc(var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) / 2);margin-bottom:calc(var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) / 2);pointer-events:none;color:var(--tct-input-icon-stroke-primary, var(--t-input-icon-stroke-primary, var(--t-a11y-gray-color, var(--t-textA, var(--app-gray, #747474)))));--tct-icon-stroke-primary:var(--tct-input-icon-stroke-primary, var(--t-input-icon-stroke-primary, var(--t-a11y-gray-color, var(--t-textA, var(--app-gray, #747474)))))}.icon-left-muted{opacity:0.5}.input-prefix,.input-suffix{min-height:var(--comp-input-min-height);max-height:var(--comp-input-max-height);height:var(--tct-input-height, var(--t-input-height, 44px));font-size:var(--tct-input-prefix-font-size, var(--t-input-prefix-font-size, inherit));font-weight:var(--tct-input-prefix-font-weight, 400);color:var(--tct-input-prefix-font-color, var(--t-input-prefix-font-color, inherit));background:var(--tct-input-prefix-background, var(--tct-input-prefix-bg, var(--t-input-prefix-bg, var(--tct-input-background, var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, #f2f2f2))))))));transition:color var(--comp-input-tween), background var(--comp-input-tween)}.input-prefix{border-top-left-radius:calc(\n var(--comp-input-border-top-left-radius) - var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) - var(--tct-input-border-left-width, var(--t-input-border-left-width, 1px))\n );border-bottom-left-radius:calc(\n var(--comp-input-border-bottom-left-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-left-width, var(--t-input-border-left-width, 1px))\n );pointer-events:none;}.input-suffix{border-top-right-radius:calc(\n var(--comp-input-border-top-right-radius) - var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) - var(--tct-input-border-right-width, var(--t-input-border-right-width, 1px))\n );border-bottom-right-radius:calc(\n var(--comp-input-border-bottom-right-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-right-width, var(--t-input-border-right-width, 1px))\n )}.icon-error{color:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a));--tct-icon-stroke-primary:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a))}.messages-container{height:0px;overflow:hidden;background:var(--tct-message-background, var(--tct-message-bg, var(--t-message-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2)))))));box-shadow:var(--tct-input-message-box-shadow, var(--t-input-message-box-shadow, var(--tct-box-shadow-1, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)))));transition:height var(--tct-input-messages-tween, var(--t-input-messages-tween, var(--tct-tween-1, var(--app-tween-1, 0.2s ease))));margin-top:var(--tct-input-messages-margin-top, 2px);z-index:var(--tct-input-messages-z-index, 5);position:absolute;width:100%;color:var(--tct-input-messages-font-color, var(--t-input-messages-font-color, inherit));border-radius:var(--tct-message-border-radius, --app-border-radius-1, inherit)}.has-error label{color:var(--tct-input-error-label-font-color, var(--t-input-error-label-font-color, var(--tct-input-label-font-color, var(--t-input-label-font-color, inherit))))}.has-error:not(.has-focus) .input-prefix,.has-error:not(.has-focus) .input-suffix{color:var(--tct-input-error-prefix-font-color, var(--t-input-error-prefix-font-color, inherit));background:var(--tct-input-error-prefix-background, var(--tct-input-error-prefix-bg, var(--t-input-error-prefix-bg, var(--tct-input-background, var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2))))))))))}.icon-left{width:26px;height:26px}.vertical-separator{height:calc(var(--comp-input-min-height) - 2px);border-right-width:var(--tct-input-prefix-border-width, 1px);border-right-style:solid;border-right-color:var(--tct-input-prefix-border-color, var(--t-input-prefix-border-color, var(--tct-input-border-color, var(--t-input-border-color, var(--t-a11y-gray-color-AA, #404040)))))}";
2873
+
2874
+ const inputTypeMap = {
2875
+ text: 'text',
2876
+ tel: 'tel',
2877
+ number: 'number',
2878
+ password: 'text',
2879
+ search: 'search',
2880
+ url: 'url',
2881
+ email: 'email',
2882
+ currency: 'text',
2883
+ phone: 'tel',
2884
+ ssn: 'text',
2885
+ alphanumeric: 'text',
2886
+ alpha: 'text',
2887
+ numeric: 'text',
2888
+ percentage: 'text',
2889
+ postal: 'text',
2890
+ date: 'text',
2891
+ 'credit-card': 'text',
2892
+ };
2893
+ const Q2Input = class {
2894
+ constructor(hostRef) {
2895
+ registerInstance(this, hostRef);
2896
+ this.change = createEvent(this, "change", 7);
2897
+ this.clear = createEvent(this, "clear", 7);
2898
+ this.formatted = createEvent(this, "formatted", 7);
2899
+ this.input = createEvent(this, "input", 7);
2900
+ this.invalid = createEvent(this, "invalid", 7);
2901
+ // #region Own Properties
2902
+ this.guid = createGuid();
2903
+ this.isClickEvent = false;
2904
+ this.isMobile = isMobile();
2905
+ this.scheduledAfterRender = [];
2906
+ // #endregion
2907
+ // #region State Properties
2908
+ this.checkSlotCount = 0;
2909
+ this.isSmall = false;
2910
+ // #endregion
2911
+ // #region Public Property API
2912
+ /**
2913
+ * Sets readonly to true on the input without adding the "read only" label.
2914
+ *
2915
+ * Can be used to prevent user input while still presenting the necessary information for assistive technology.
2916
+ * @private
2917
+ */
2918
+ this._preventEntry = undefined;
2919
+ /**
2920
+ * Allows for correct semantics of q2-input element when aria-expanded.
2921
+ * @private
2922
+ * Defaults to undefined
2923
+ * Will assign role to combobox when used inside q2-select and q2-calendar.
2924
+ */
2925
+ this._role = undefined;
2926
+ /** Indicates the field cannot be focused or interacted with. */
2927
+ this.disabled = false;
2928
+ /**
2929
+ * Displays a toggle button at the end of the input field which shows or hides the actual value.
2930
+ * @info
2931
+ * Only applicable when `type` is `text`, `password`, or `ssn`.
2932
+ */
2933
+ this.showVisibilityToggle = false;
2934
+ /** Specifies the field's expected [input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types), and provides the optimal keyboard on mobile devices. */
2935
+ this.type = 'text';
2936
+ /**
2937
+ * Sets textSelectedForDeletion to true if the user has selected text for deletion
2938
+ * This is used to prevent other logic from running when text is deleted
2939
+ */
2940
+ this.handleCurrencyKeydown = (event) => {
2941
+ if (!['Backspace', 'Delete'].includes(event.key))
2942
+ return;
2943
+ const inputElement = this.inputField;
2944
+ this.textSelectedForDeletion = inputElement.selectionStart !== inputElement.selectionEnd;
2945
+ };
2946
+ this.handleValueAndCursor = () => {
2947
+ // ORDER IMPORTANT: calculate cursor position -> set value -> set cursor position
2948
+ const cursorPosition = this.calculateCursorPositionOnInput();
2949
+ // when type=number: returns only valid decimal on input event, should not update itself (e.g. typing "1." )
2950
+ if (this.type !== 'number')
2951
+ this.inputField.value = this.formattedValueObject.formattedValue;
2952
+ this.input.emit(Object.assign({ value: this.formattedValueObject.value, formattedValue: this.formattedValueObject.fullyFormattedValue, minFormattedLength: this.formattedValueObject.minFormattedLength }, (this.formattedValueObject.type && { type: this.formattedValueObject.type })));
2953
+ if (!this.formattedValueObject.value) {
2954
+ this.clear.emit();
2955
+ }
2956
+ this.setCursorPosition(cursorPosition);
2957
+ };
2958
+ this.initMutationObserver = () => {
2959
+ if (!('MutationObserver' in window))
2960
+ return;
2961
+ const observer = new MutationObserver(this.onMutationObserved);
2962
+ observer.observe(this.hostElement, { childList: true });
2963
+ this.mutationObserver = observer;
2964
+ };
2965
+ this.onClearInput = () => {
2966
+ const eventDetail = {
2967
+ value: '',
2968
+ formattedValue: '',
2969
+ minFormattedLength: this.formattedValueObject.minFormattedLength,
2970
+ };
2971
+ this.input.emit(eventDetail);
2972
+ this.change.emit(eventDetail);
2973
+ this.clear.emit();
2974
+ this.inputField.focus();
2975
+ };
2976
+ this.onInputBlur = () => {
2977
+ this.hasFocus = false;
2978
+ setMessageHeight(this);
2979
+ if (this.valueOnFocus !== this.formattedValueObject.value) {
2980
+ this.valueOnFocus = this.formattedValueObject.value;
2981
+ this.change.emit(Object.assign({ value: this.formattedValueObject.value, formattedValue: this.formattedValueObject.fullyFormattedValue, minFormattedLength: this.formattedValueObject.minFormattedLength }, (this.formattedValueObject.type && { type: this.formattedValueObject.type })));
2982
+ }
2983
+ };
2984
+ this.onInputClick = () => {
2985
+ if (this.shouldCursorStayAtEnd)
2986
+ this.placeCursorAtEnd();
2987
+ };
2988
+ this.onInputFocus = () => {
2989
+ if (this.inputField.tagName === 'INPUT') {
2990
+ this.scheduledAfterRender.push(() => {
2991
+ if (this.isClickEvent && this.shouldCursorStartAtEnd) {
2992
+ this.placeCursorAtEnd();
2993
+ }
2994
+ else {
2995
+ this.setCursorPosition(this.calculateCursorPositionOnFocus());
2996
+ }
2997
+ this.isClickEvent = false;
2998
+ });
2999
+ }
3000
+ this.hasFocus = true;
3001
+ setMessageHeight(this);
3002
+ this.valueOnFocus = this.value;
3003
+ };
3004
+ this.onInputInput = (event) => {
3005
+ event.stopPropagation();
3006
+ if (this.type === 'currency')
3007
+ this.handleCurrencyDeletion(event);
3008
+ const newFormattedValue = this.getFormattedValue(event.target.value, false);
3009
+ this.handleDataInput(newFormattedValue);
3010
+ this.validateInput();
3011
+ };
3012
+ this.onInputKeydown = (event) => {
3013
+ const keysThatMoveCursor = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'];
3014
+ const { key } = event;
3015
+ if (this.type === 'currency')
3016
+ this.handleCurrencyKeydown(event);
3017
+ if (this.shouldCursorStayAtEnd && keysThatMoveCursor.includes(key))
3018
+ event.preventDefault();
3019
+ if (key === 'Enter' && this.valueOnFocus !== this.formattedValueObject.value) {
3020
+ this.valueOnFocus = this.formattedValueObject.value;
3021
+ this.change.emit(Object.assign({ value: this.formattedValueObject.value, formattedValue: this.formattedValueObject.fullyFormattedValue, minFormattedLength: this.formattedValueObject.minFormattedLength }, (this.formattedValueObject.type && { type: this.formattedValueObject.type })));
3022
+ }
3023
+ };
3024
+ this.onInputMousedown = () => {
3025
+ this.isClickEvent = true;
3026
+ };
3027
+ this.onInputPaste = (event) => {
3028
+ if (this.type === 'currency') {
3029
+ const clipboardData = event.clipboardData.getData('text');
3030
+ const newFormattedValue = this.getFormattedValue(clipboardData, true);
3031
+ event.preventDefault();
3032
+ this.handleDataInput(newFormattedValue);
3033
+ }
3034
+ };
3035
+ this.onMutationObserved = () => {
3036
+ // Updating checkSlotCount to force re-render when slot content changes
3037
+ this.checkSlotCount = this.checkSlotCount + 1;
3038
+ };
3039
+ this.onRefocusInput = () => {
3040
+ if (this.showMessages) {
3041
+ this.inputField.focus();
3042
+ setMessageHeight(this);
3043
+ }
3044
+ };
3045
+ this.onToggleVisibility = () => {
3046
+ this.hostElement.dispatchEvent(new FocusEvent('focus'));
3047
+ this.textHidden = !this.textHidden;
3048
+ };
3049
+ this.validateInput = () => {
3050
+ var _a, _b, _c;
3051
+ this.validity = (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.validity;
3052
+ if (((_b = this.validity) === null || _b === void 0 ? void 0 : _b.valid) === false) {
3053
+ this.invalid.emit();
3054
+ }
3055
+ return !!((_c = this.validity) === null || _c === void 0 ? void 0 : _c.valid);
3056
+ };
3057
+ }
3058
+ // #endregion
3059
+ // #region Component Lifecycle Events
3060
+ disconnectedCallback() {
3061
+ var _a;
3062
+ this.manageClearableResizeObserver();
3063
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
3064
+ this.mutationObserver = null;
3065
+ }
3066
+ componentWillLoad() {
3067
+ if (isNaN(this.maxlength)) {
3068
+ this.maxlength = undefined;
3069
+ }
3070
+ this.formattedValueObject = this.getFormattedValue(this.stringValue, true);
3071
+ Object.defineProperty(this.hostElement, 'formattedValue', {
3072
+ get: () => { var _a, _b; return (_b = (_a = this.formattedValueObject) === null || _a === void 0 ? void 0 : _a.formattedValue) !== null && _b !== void 0 ? _b : ''; },
3073
+ });
3074
+ handleAriaLabel(this);
3075
+ if (this.textHidden === undefined) {
3076
+ this.textHidden = this.type === 'password';
3077
+ }
3078
+ this.manageClearableResizeObserver(this.clearable);
3079
+ }
3080
+ componentDidLoad() {
3081
+ overrideFocus(this.hostElement);
3082
+ if (!this.pseudo)
3083
+ this.inputField.value = this.formattedValueObject.formattedValue;
3084
+ if (!!this.autofocus)
3085
+ this.inputField.focus();
3086
+ this.initMutationObserver();
3087
+ }
3088
+ componentDidRender() {
3089
+ this.scheduledAfterRender.forEach(fn => fn());
3090
+ this.scheduledAfterRender = [];
3091
+ }
3092
+ // #endregion
3093
+ // #region Listeners
3094
+ onHostElementChange(event) {
3095
+ if (!(event instanceof CustomEvent)) {
3096
+ event.stopPropagation();
3097
+ return;
3098
+ }
3099
+ if (event.target === this.hostElement && !this.hostElement.onchange) {
3100
+ this.value = event.detail.value;
3101
+ }
3102
+ }
3103
+ onHostElementFocus(event) {
3104
+ if (!isEventFromElement(event, this.hostElement))
3105
+ return;
3106
+ this.inputField.focus();
3107
+ }
3108
+ // #endregion
3109
+ // #region Public Methods API
3110
+ /**
3111
+ * Emulates firing checkValidity on `<input>`, emits `invalid` event if validation failed.
3112
+ */
3113
+ async checkValidity() {
3114
+ this.inputRef.checkValidity();
3115
+ return this.validateInput();
3116
+ }
3117
+ /**
3118
+ * Emulates clicking the clear button when the input is clearable.
3119
+ *
3120
+ * @warning
3121
+ * Only applicable when the input is clearable.
3122
+ *
3123
+ * @testOnly
3124
+ */
3125
+ async clearValue() {
3126
+ if (!this.clearable)
3127
+ return;
3128
+ this.onClearInput();
3129
+ }
3130
+ /**
3131
+ * Emulates focusing the `<input>`, entering the provided value, and emitting an `input` event.
3132
+ *
3133
+ * This method leaves the focus on the `<input>` and as a result does not trigger the `change` event. If you want
3134
+ * to trigger the` change` event, move the focus to another element after calling this method.
3135
+ *
3136
+ * @testOnly
3137
+ */
3138
+ setValue(value) {
3139
+ const { inputField } = this;
3140
+ inputField.focus();
3141
+ inputField.dispatchEvent(new FocusEvent('focus'));
3142
+ inputField.value = value;
3143
+ inputField.dispatchEvent(new InputEvent('input'));
3144
+ }
3145
+ // #endregion
3146
+ // #region Watchers
3147
+ ariaLabelObserver() {
3148
+ handleAriaLabel(this);
3149
+ }
3150
+ manageClearableResizeObserver(clearable) {
3151
+ var _a;
3152
+ if ('ResizeObserver' in window === false)
3153
+ return;
3154
+ const isSmallThreshold = 190;
3155
+ if (clearable) {
3156
+ if (this.resizeObserver)
3157
+ return;
3158
+ if (typeof ResizeObserver === 'undefined')
3159
+ return;
3160
+ this.resizeObserver = new ResizeObserver(([entry]) => {
3161
+ this.isSmall = isSmallThreshold > entry.contentRect.width;
3162
+ });
3163
+ this.resizeObserver.observe(this.hostElement);
3164
+ }
3165
+ else {
3166
+ this.isSmall = false;
3167
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.unobserve(this.hostElement);
3168
+ this.resizeObserver = null;
3169
+ }
3170
+ }
3171
+ errorsObserver() {
3172
+ this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));
3173
+ }
3174
+ formatModifierObserver() {
3175
+ this.formatAndUpdateValueFromProp();
3176
+ }
3177
+ formattedValueObjectObserver() {
3178
+ this.formatted.emit(this.formattedValueObject);
3179
+ }
3180
+ hintsObserver() {
3181
+ this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));
3182
+ }
3183
+ typeObserver() {
3184
+ this.formatAndUpdateValueFromProp();
3185
+ }
3186
+ valueObserver() {
3187
+ this.formatAndUpdateValueFromProp();
3188
+ }
3189
+ // #endregion
3190
+ // #region Local Methods
3191
+ get ariaAttributes() {
3192
+ return {
3193
+ ariaActivedescendant: getAriaValueFromProp(this.ariaActivedescendant),
3194
+ ariaControls: getAriaValueFromProp(this.ariaControls),
3195
+ ariaExpanded: getAriaValueFromProp(this.ariaExpanded, ['true', 'false']),
3196
+ ariaHaspopup: getAriaValueFromProp(this.ariaHaspopup, [
3197
+ 'true',
3198
+ 'false',
3199
+ 'menu',
3200
+ 'listbox',
3201
+ 'tree',
3202
+ 'grid',
3203
+ 'dialog',
3204
+ ]),
3205
+ ariaOwns: getAriaValueFromProp(this.ariaOwns),
3206
+ };
3207
+ }
3208
+ get canSetSelection() {
3209
+ // email and number type don't support setSelectionRange
3210
+ return !['email', 'number'].includes(this.computedType);
3211
+ }
3212
+ get clearClasses() {
3213
+ var _a;
3214
+ const classes = ['btn-clear'];
3215
+ if (!this.clearable || !(((_a = this.inputField) === null || _a === void 0 ? void 0 : _a.value) || this.value)) {
3216
+ classes.push('hidden');
3217
+ }
3218
+ return classes;
3219
+ }
3220
+ get computedAutocomplete() {
3221
+ // force off for currency type
3222
+ if (this.type === 'currency')
3223
+ return 'transaction-amount';
3224
+ return this.autocomplete || 'off';
3225
+ }
3226
+ get computedClassForIconLeft() {
3227
+ let className = 'icon-left';
3228
+ if (this.formattedValueObject.leftIconMuted) {
3229
+ className += ' icon-left-muted';
3230
+ }
3231
+ return className;
3232
+ }
3233
+ get computedIconLeft() {
3234
+ if (this.formattedValueObject.prefix) {
3235
+ return;
3236
+ }
3237
+ if (this.type === 'search') {
3238
+ return 'search';
3239
+ }
3240
+ if (this.formattedValueObject.leftIcon) {
3241
+ return this.formattedValueObject.leftIcon;
3242
+ }
3243
+ return this.iconLeft;
3244
+ }
3245
+ get computedType() {
3246
+ if (['password', 'text', 'ssn'].includes(this.type) && this.textHidden) {
3247
+ return 'password';
3248
+ }
3249
+ else {
3250
+ return (this.type && inputTypeMap[this.type]) || 'text';
3251
+ }
3252
+ }
3253
+ get hasCustomDisplaySlot() {
3254
+ return hasSlotContent(this.hostElement, 'custom-display');
3255
+ }
3256
+ get hasError() {
3257
+ return Array.isArray(this.errors) && this.errors.length > 0;
3258
+ }
3259
+ get hasInputLeftSlot() {
3260
+ return hasSlotContent(this.hostElement, 'input-left');
3261
+ }
3262
+ get hasInputRightSlot() {
3263
+ return hasSlotContent(this.hostElement, 'input-right');
3264
+ }
3265
+ get inputDescribedBy() {
3266
+ return this.showMessages ? `${this.inputId}-description` : undefined;
3267
+ }
3268
+ get inputField() {
3269
+ return this.hostElement.shadowRoot.querySelector('.input-field');
3270
+ }
3271
+ get inputId() {
3272
+ return `input-guid-${this.guid}`;
3273
+ }
3274
+ get inputMode() {
3275
+ const inputModeMap = {
3276
+ currency: 'numeric',
3277
+ ssn: 'numeric',
3278
+ tin: 'numeric',
3279
+ numeric: 'decimal',
3280
+ percentage: 'decimal',
3281
+ date: 'numeric',
3282
+ 'credit-card': 'numeric',
3283
+ };
3284
+ return (this.type && inputModeMap[this.type]) || undefined;
3285
+ }
3286
+ get isMaskedType() {
3287
+ const maskedTypes = [
3288
+ 'currency',
3289
+ 'phone',
3290
+ 'ssn',
3291
+ 'tin',
3292
+ 'alphanumeric',
3293
+ 'alpha',
3294
+ 'numeric',
3295
+ 'percentage',
3296
+ 'postal',
3297
+ 'date',
3298
+ 'credit-card',
3299
+ ];
3300
+ return maskedTypes.includes(this.type);
3301
+ }
3302
+ get messages() {
3303
+ return ((this.errors && this.errors.length > 0 && this.errors) ||
3304
+ (this.hints && this.hints.length > 0 && this.hints) ||
3305
+ []);
3306
+ }
3307
+ get shouldCursorStartAtEnd() {
3308
+ return this.type === 'currency';
3309
+ }
3310
+ get shouldCursorStayAtEnd() {
3311
+ return this.isMobile && this.type === 'currency';
3312
+ }
3313
+ get showIconSeparator() {
3314
+ return this.type === 'credit-card' || !!this.formattedValueObject.prefix;
3315
+ }
3316
+ get showMessages() {
3317
+ return this.messages.length > 0 && !this.hideMessages;
3318
+ }
3319
+ get stringValue() {
3320
+ const notCoercable = Object.prototype.toString.call(this.value) === '[object Object]';
3321
+ return notCoercable ? '' : (this.value && String(this.value)) || '';
3322
+ }
3323
+ get visibilityToggleAriaLabel() {
3324
+ return `tecton.element.input.toggleAriaLabel.${this.textHidden ? 'show' : 'hide'}`;
3325
+ }
3326
+ get visibilityToggleText() {
3327
+ return loc(`tecton.element.input.toggle.${this.textHidden ? 'show' : 'hide'}`);
3328
+ }
3329
+ get wrapperClasses() {
3330
+ const classNames = ['field-container'];
3331
+ if (this.hasError)
3332
+ classNames.push('has-error');
3333
+ if (!!this.value)
3334
+ classNames.push('has-value');
3335
+ if (this.clearable && !!this.value)
3336
+ classNames.push('has-clear');
3337
+ if (this.hasFocus)
3338
+ classNames.push('has-focus');
3339
+ if (this.isSmall)
3340
+ classNames.push('is-small');
3341
+ if (this.formattedValueObject.prefix)
3342
+ classNames.push('has-prefix');
3343
+ if (this.computedIconLeft)
3344
+ classNames.push('has-icon-left');
3345
+ if (this.showIconSeparator)
3346
+ classNames.push('has-icon-separator');
3347
+ if (this.formattedValueObject.suffix)
3348
+ classNames.push('has-suffix');
3349
+ if (!this.formattedValueObject.suffix && this.iconRight)
3350
+ classNames.push('has-icon-right');
3351
+ if (this.type === 'currency')
3352
+ classNames.push('right-aligned');
3353
+ else
3354
+ classNames.push('left-aligned');
3355
+ if (this.hasCustomDisplaySlot)
3356
+ classNames.push('has-custom-display');
3357
+ return classNames.join(' ');
3358
+ }
3359
+ calculateCursorPositionOnFocus() {
3360
+ var _a, _b, _c;
3361
+ const { inputField } = this;
3362
+ const valueLength = (_b = (_a = inputField === null || inputField === void 0 ? void 0 : inputField.value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
3363
+ const startingPosition = (_c = inputField === null || inputField === void 0 ? void 0 : inputField.selectionStart) !== null && _c !== void 0 ? _c : valueLength;
3364
+ return {
3365
+ startingPosition,
3366
+ valueLength,
3367
+ previousValueLength: valueLength,
3368
+ hasSelection: window.getSelection().toString().length > 0,
3369
+ };
3370
+ }
3371
+ calculateCursorPositionOnInput() {
3372
+ const input = this.inputField;
3373
+ const formattedLength = this.formattedValueObject.formattedValue.length;
3374
+ const currentValueLength = input.value.length;
3375
+ const defaultPosition = this.type === 'currency' ? formattedLength : 0;
3376
+ return {
3377
+ startingPosition: (input && input.selectionStart) || defaultPosition,
3378
+ valueLength: formattedLength,
3379
+ previousValueLength: input && currentValueLength,
3380
+ hasSelection: false,
3381
+ };
3382
+ }
3383
+ formatAndUpdateValueFromProp() {
3384
+ this.formattedValueObject = this.getFormattedValue(this.stringValue, true);
3385
+ if (!this.pseudo) {
3386
+ const setValue = () => {
3387
+ this.inputField.value = this.formattedValueObject.formattedValue;
3388
+ };
3389
+ this.inputField ? setValue() : this.scheduledAfterRender.push(() => setValue());
3390
+ }
3391
+ }
3392
+ getFormattedValue(value, valueChangedFromProperty) {
3393
+ const formattingFunctions = {
3394
+ currency: formatCurrency,
3395
+ phone: formatPhoneNumber,
3396
+ ssn: formatSSN,
3397
+ tin: formatTIN,
3398
+ alphanumeric: formatAlphanumeric,
3399
+ alpha: formatAlpha,
3400
+ numeric: formatNumeric,
3401
+ percentage: formatPercentage,
3402
+ postal: formatPostalCode,
3403
+ date: formatDate,
3404
+ 'credit-card': formatCreditCard.format,
3405
+ };
3406
+ if (formattingFunctions[this.type]) {
3407
+ return formattingFunctions[this.type](value, this.formatModifier, valueChangedFromProperty);
3408
+ }
3409
+ return {
3410
+ value,
3411
+ formattedValue: value,
3412
+ fullyFormattedValue: value,
3413
+ formattingCharacterCount: 0,
3414
+ unformattedValue: value,
3415
+ };
3416
+ }
3417
+ handleCurrencyDeletion(event) {
3418
+ // Don't do anything if text was selected for deletion
3419
+ if (this.textSelectedForDeletion) {
3420
+ this.textSelectedForDeletion = false;
3421
+ return;
3422
+ }
3423
+ // We only care about "Backspace" and "Delete" events
3424
+ if (!['deleteContentBackward', 'deleteContentForward'].includes(event.inputType))
3425
+ return;
3426
+ const input = event.target;
3427
+ const cursorPosition = input.selectionStart;
3428
+ const { formattedValue } = this.formattedValueObject;
3429
+ if (cursorPosition === null)
3430
+ return;
3431
+ let cursorMap;
3432
+ switch (event.inputType) {
3433
+ case 'deleteContentBackward':
3434
+ const valueBeforeCursor = formattedValue.substring(0, cursorPosition + 1);
3435
+ const isPrevCharAlphaNum = /[a-zA-Z0-9]$/.test(valueBeforeCursor);
3436
+ cursorMap = {
3437
+ leftIndex: isPrevCharAlphaNum ? cursorPosition : cursorPosition - 1,
3438
+ rightIndex: isPrevCharAlphaNum ? cursorPosition + 1 : cursorPosition,
3439
+ afterCursorOffset: 0,
3440
+ newCursorOffset: 1,
3441
+ };
3442
+ break;
3443
+ case 'deleteContentForward':
3444
+ const valueAfterCursor = formattedValue.substring(cursorPosition);
3445
+ const isNextCharAlphaNum = /^[a-zA-Z0-9]/.test(valueAfterCursor);
3446
+ cursorMap = {
3447
+ leftIndex: isNextCharAlphaNum ? cursorPosition : cursorPosition + 1,
3448
+ rightIndex: isNextCharAlphaNum ? cursorPosition + 1 : cursorPosition + 2,
3449
+ afterCursorOffset: 1,
3450
+ newCursorOffset: 0,
3451
+ };
3452
+ break;
3453
+ default:
3454
+ return;
3455
+ }
3456
+ // Ensure the cursor doesn't move with a newly formatted value
3457
+ const newValue = [
3458
+ formattedValue.substring(0, cursorMap.leftIndex),
3459
+ formattedValue.substring(cursorMap.rightIndex),
3460
+ ].join('');
3461
+ const charactersAfterCursor = formattedValue.length - cursorPosition - cursorMap.afterCursorOffset;
3462
+ const newFormattedValue = this.getFormattedValue(newValue, false).formattedValue;
3463
+ const newCursorPosition = Math.max(newFormattedValue.length - charactersAfterCursor + cursorMap.newCursorOffset, 0);
3464
+ input.value = newFormattedValue;
3465
+ input.setSelectionRange(newCursorPosition, newCursorPosition);
3466
+ // This handles a runtime issue when a character is deleted from the beginning of the input
3467
+ if (newCursorPosition === 0) {
3468
+ nextPaint(() => input.setSelectionRange(newCursorPosition, newCursorPosition));
3469
+ }
3470
+ }
3471
+ handleDataInput(newFormattedValue) {
3472
+ if (this.maxlength === undefined ||
3473
+ newFormattedValue.unformattedValue.length <= this.maxlength ||
3474
+ newFormattedValue.unformattedValue.length <= this.formattedValueObject.unformattedValue.length) {
3475
+ this.formattedValueObject = newFormattedValue;
3476
+ }
3477
+ else if (this.maxlength) {
3478
+ newFormattedValue = this.getFormattedValue(newFormattedValue.unformattedValue.substring(0, this.maxlength), false);
3479
+ this.formattedValueObject = newFormattedValue;
3480
+ }
3481
+ this.handleValueAndCursor();
3482
+ }
3483
+ placeCursorAtEnd() {
3484
+ const { inputField } = this;
3485
+ inputField.selectionStart = inputField.selectionEnd = inputField.value.length;
3486
+ }
3487
+ setCursorPosition(cursorData) {
3488
+ if (this.canSetSelection && !cursorData.hasSelection) {
3489
+ const input = this.inputField;
3490
+ const { valueLength, previousValueLength, startingPosition } = cursorData;
3491
+ if (this.type === 'currency') {
3492
+ if (previousValueLength - valueLength === 1) {
3493
+ input.setSelectionRange(startingPosition - 1, startingPosition - 1);
3494
+ }
3495
+ else {
3496
+ const difference = previousValueLength - valueLength;
3497
+ input.setSelectionRange(startingPosition - difference, startingPosition - difference);
3498
+ }
3499
+ }
3500
+ if (this.type !== 'currency') {
3501
+ const difference = valueLength - previousValueLength;
3502
+ // Never allow the cursor to move in reverse
3503
+ const newPosition = startingPosition + (difference > 0 ? difference : 0);
3504
+ input.setSelectionRange(newPosition, newPosition);
3505
+ }
3506
+ }
3507
+ }
3508
+ // #endregion
3509
+ // #region Render Methods
3510
+ renderCountDOM() {
3511
+ if (!this.showCount)
3512
+ return;
3513
+ const { maxlength, formattedValueObject } = this;
3514
+ return (h("div", { class: "count-tag" }, formattedValueObject.unformattedValue.length, maxlength && `/${maxlength}`));
3515
+ }
3516
+ renderInputContainerDOM() {
3517
+ const { hasInputLeftSlot, hasInputRightSlot } = this;
3518
+ return (h("div", { class: "input-container", tabindex: -1, "test-id": "inputContainer" }, h("div", { class: "input-icons-container-left" }, this.formattedValueObject.prefix && (h("div", { class: "input-prefix" }, this.formattedValueObject.prefix)), this.computedIconLeft && (h("div", null, h("q2-icon", { type: this.computedIconLeft, class: this.computedClassForIconLeft }))), hasInputLeftSlot && h("slot", { name: "input-left" }), this.showIconSeparator && h("div", { class: "vertical-separator" }), this.hasError && this.type === 'currency' && (h("div", { "test-id": "divIconError", onClick: this.onRefocusInput }, h("q2-icon", { type: "error", class: "icon-error", "test-id": "iconError" })))), this.pseudo ? this.renderPseudoInputDOM() : this.renderStandardInputDOM(), h("div", { class: "input-icons-container-right" }, h("q2-btn", { class: this.clearClasses.join(' '), label: loc('tecton.element.input.clear', [this.label]), hideLabel: true, "test-id": "clearButton", onClick: this.onClearInput, onKeyDown: e => e.stopPropagation() }, h("q2-icon", { type: "close", class: "icon-clear" })), ['password', 'text', 'ssn', 'tin'].includes(this.type) && this.showVisibilityToggle && (h("q2-btn", { class: "btn-visibility-toggle", "test-id": "toggleVisibilityButton", onClick: this.onToggleVisibility, label: loc(this.visibilityToggleAriaLabel, { label: this.label }), "hide-label": true }, this.visibilityToggleText)), this.formattedValueObject.suffix && (h("span", { class: "input-suffix" }, this.formattedValueObject.suffix)), this.badgeValue && (h("q2-badge", { size: "large", theme: this.badgeTheme }, this.badgeValue)), this.hasError && this.type !== 'currency' && (h("div", { "test-id": "divIconError", onClick: this.onRefocusInput }, h("q2-icon", { type: "error", class: "icon-error", "test-id": "iconError" }))), this.iconRight && !this.formattedValueObject.suffix && (h("div", null, h("q2-icon", { type: this.iconRight, class: "icon-right" }))), hasInputRightSlot && h("slot", { name: "input-right" }))));
3519
+ }
3520
+ renderPseudoInputDOM() {
3521
+ const showPlaceholder = !this.value && !!this.placeholder;
3522
+ const { ariaOwns, ariaHaspopup, ariaExpanded, ariaActivedescendant } = this.ariaAttributes;
3523
+ return (h("div", { class: "pseudo-input-container" }, h("button", { class: "input-field", type: "button", id: this.inputId, "aria-describedby": this.inputDescribedBy, "aria-invalid": `${this.hasError}`, "aria-owns": ariaOwns, "aria-haspopup": ariaHaspopup, "aria-expanded": ariaExpanded, "aria-activedescendant": ariaActivedescendant, role: (this.role && `${this.role}`) || 'textbox', disabled: !!this.disabled, "test-id": "q2InputInnerClearButton", onFocus: this.onInputFocus, onBlur: this.onInputBlur }, h("div", { class: "custom-display-container" }, h("slot", { name: "custom-display" }, h("span", { class: showPlaceholder ? 'placeholder-text' : '' }, showPlaceholder ? loc(this.placeholder) : loc(this.value)))))));
3524
+ }
3525
+ renderStandardInputDOM() {
3526
+ const { hasCustomDisplaySlot } = this;
3527
+ const inputClasses = ['input-field'];
3528
+ const { ariaOwns, ariaHaspopup, ariaActivedescendant } = this.ariaAttributes;
3529
+ if (hasCustomDisplaySlot)
3530
+ inputClasses.push('sr');
3531
+ return (h(Fragment, null, hasCustomDisplaySlot && (h("div", { class: "custom-display-container" }, h("slot", { name: "custom-display" }))), h("input", { ref: el => (this.inputRef = el), class: inputClasses.join(' '), id: this.inputId, type: this.computedType, size: this.formattedValueObject.prefix ? 10 : undefined, maxlength: ['date', 'currency'].includes(this.type) ? undefined : this.maxlength || undefined, max: this.max, min: this.min, step: this.step, "aria-current": this.current || undefined, "aria-describedby": this.inputDescribedBy, "aria-required": `${!this.optional}`, "aria-invalid": `${this.hasError}`, "aria-owns": ariaOwns, "aria-haspopup": ariaHaspopup, "aria-activedescendant": ariaActivedescendant, autocomplete: this.computedAutocomplete, autocapitalize: this.autocapitalize, autocorrect: this.autocorrect === 'on' ? 'on' : 'off', autofocus: this.autofocus, placeholder: (this.placeholder && loc(this.placeholder)) || undefined, "test-id": "inputField", readonly: this.readonly || this._preventEntry, disabled: !!this.disabled, onFocus: this.onInputFocus, onBlur: this.onInputBlur, onClick: this.onInputClick, onKeyDown: this.onInputKeydown, onMouseDown: this.onInputMousedown, onInput: this.onInputInput, onPaste: this.onInputPaste, inputmode: this.inputMode, pattern: this.pattern || undefined })));
3532
+ }
3533
+ render() {
3534
+ const { ariaControls, ariaExpanded } = this.ariaAttributes;
3535
+ return (h(Host, { key: 'ac1668b4b57fe26794243fdac33d3cb9ba74d7c7', role: this._role, "aria-controls": ariaControls, "aria-expanded": ariaExpanded }, h("div", { key: 'aaa97e165fdda3dfb95326bcdc635e8ad56a791a', class: this.wrapperClasses }, h("div", { key: '7c8fe4e94bc2e0b22465b794aaa773ebb53ec83f', class: "label-wrapper" }, renderLabel(this), this.renderCountDOM()), this.renderInputContainerDOM(), renderMessages(this))));
3536
+ }
3537
+ get hostElement() { return getElement(this); }
3538
+ static get watchers() { return {
3539
+ "ariaLabel": ["ariaLabelObserver"],
3540
+ "clearable": ["manageClearableResizeObserver"],
3541
+ "errors": ["errorsObserver"],
3542
+ "formatModifier": ["formatModifierObserver"],
3543
+ "formattedValueObject": ["formattedValueObjectObserver"],
3544
+ "hints": ["hintsObserver"],
3545
+ "type": ["typeObserver"],
3546
+ "value": ["valueObserver"]
3547
+ }; }
3548
+ };
3549
+ Q2Input.style = q2InputCss;
3550
+
3551
+ export { Q2Input as q2_input };
3552
+ //# sourceMappingURL=q2-input.entry.js.map
3553
+
3554
+ //# sourceMappingURL=q2-input.entry.js.map