intl-tel-input 26.9.2 → 27.0.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 (253) hide show
  1. package/angular/README.md +1 -1
  2. package/angular/dist/IntlTelInput.d.ts +97 -0
  3. package/angular/dist/IntlTelInput.js +4812 -0
  4. package/angular/dist/IntlTelInputWithUtils.d.ts +3 -0
  5. package/angular/{build → dist}/IntlTelInputWithUtils.js +2342 -2096
  6. package/{build → dist}/css/demo.css +1 -1
  7. package/dist/css/intlTelInput-no-assets.css +1 -0
  8. package/dist/css/intlTelInput-no-assets.min.css +1 -0
  9. package/dist/css/intlTelInput.css +1 -0
  10. package/dist/css/intlTelInput.min.css +1 -0
  11. package/dist/img/flags.png +0 -0
  12. package/dist/img/flags.webp +0 -0
  13. package/dist/img/flags@2x.png +0 -0
  14. package/dist/img/flags@2x.webp +0 -0
  15. package/dist/js/data.d.ts +1616 -0
  16. package/{build → dist}/js/data.js +5 -17
  17. package/dist/js/data.min.js +7 -0
  18. package/dist/js/data.mjs +1708 -0
  19. package/{build/js/i18n/ar/index.js → dist/js/i18n/ar.js} +1 -0
  20. package/{build/js/i18n/bg/index.js → dist/js/i18n/bg.js} +1 -0
  21. package/{build/js/i18n/bn/index.js → dist/js/i18n/bn.js} +1 -0
  22. package/{build/js/i18n/bs/index.js → dist/js/i18n/bs.js} +1 -0
  23. package/{build/js/i18n/ca/index.js → dist/js/i18n/ca.js} +1 -0
  24. package/{build/js/i18n/cs/index.js → dist/js/i18n/cs.js} +1 -0
  25. package/{build/js/i18n/da/index.js → dist/js/i18n/da.js} +1 -0
  26. package/{build/js/i18n/de/index.js → dist/js/i18n/de.js} +1 -0
  27. package/{build/js/i18n/el/index.js → dist/js/i18n/el.js} +1 -0
  28. package/{build/js/i18n/en/index.js → dist/js/i18n/en.js} +3 -2
  29. package/{build/js/i18n/es/index.js → dist/js/i18n/es.js} +1 -0
  30. package/{build/js/i18n/et/index.js → dist/js/i18n/et.js} +1 -0
  31. package/{build/js/i18n/fa/index.js → dist/js/i18n/fa.js} +1 -0
  32. package/{build/js/i18n/fi/index.js → dist/js/i18n/fi.js} +1 -0
  33. package/{build/js/i18n/fr/index.js → dist/js/i18n/fr.js} +1 -0
  34. package/{build/js/i18n/hi/index.js → dist/js/i18n/hi.js} +1 -0
  35. package/{build/js/i18n/hr/index.js → dist/js/i18n/hr.js} +1 -0
  36. package/{build/js/i18n/hu/index.js → dist/js/i18n/hu.js} +1 -0
  37. package/{build/js/i18n/id/index.js → dist/js/i18n/id.js} +1 -0
  38. package/{build → dist}/js/i18n/index.js +1 -0
  39. package/{build/js/i18n/it/index.js → dist/js/i18n/it.js} +1 -0
  40. package/{build/js/i18n/ja/index.js → dist/js/i18n/ja.js} +1 -0
  41. package/{build/js/i18n/kn/index.js → dist/js/i18n/kn.js} +1 -0
  42. package/{build/js/i18n/ko/index.js → dist/js/i18n/ko.js} +1 -0
  43. package/{build/js/i18n/lt/index.js → dist/js/i18n/lt.js} +1 -0
  44. package/{build/js/i18n/mr/index.js → dist/js/i18n/mr.js} +1 -0
  45. package/{build/js/i18n/nl/index.js → dist/js/i18n/nl.js} +1 -0
  46. package/{build/js/i18n/no/index.js → dist/js/i18n/no.js} +1 -0
  47. package/{build/js/i18n/pl/index.js → dist/js/i18n/pl.js} +1 -0
  48. package/{build/js/i18n/pt/index.js → dist/js/i18n/pt.js} +1 -0
  49. package/{build/js/i18n/ro/index.js → dist/js/i18n/ro.js} +1 -0
  50. package/{build/js/i18n/ru/index.js → dist/js/i18n/ru.js} +1 -0
  51. package/{build/js/i18n/sk/index.js → dist/js/i18n/sk.js} +1 -0
  52. package/{build/js/i18n/sl/index.js → dist/js/i18n/sl.js} +1 -0
  53. package/{build/js/i18n/sq/index.js → dist/js/i18n/sq.js} +1 -0
  54. package/{build/js/i18n/sr/index.js → dist/js/i18n/sr.js} +1 -0
  55. package/{build/js/i18n/sv/index.js → dist/js/i18n/sv.js} +1 -0
  56. package/{build/js/i18n/te/index.js → dist/js/i18n/te.js} +1 -0
  57. package/{build/js/i18n/th/index.js → dist/js/i18n/th.js} +1 -0
  58. package/{build/js/i18n/tr/index.js → dist/js/i18n/tr.js} +1 -0
  59. package/dist/js/i18n/types.js +1 -0
  60. package/{build/js/i18n/uk/index.js → dist/js/i18n/uk.js} +1 -0
  61. package/{build/js/i18n/ur/index.js → dist/js/i18n/ur.js} +1 -0
  62. package/{build/js/i18n/uz/index.js → dist/js/i18n/uz.js} +1 -0
  63. package/{build/js/i18n/vi/index.js → dist/js/i18n/vi.js} +1 -0
  64. package/{build/js/i18n/zh-hk/index.js → dist/js/i18n/zh-hk.js} +1 -0
  65. package/{build/js/i18n/zh/index.js → dist/js/i18n/zh.js} +1 -0
  66. package/dist/js/i18n.d.ts +1697 -0
  67. package/dist/js/intlTelInput.d.ts +1773 -0
  68. package/{build → dist}/js/intlTelInput.js +228 -215
  69. package/dist/js/intlTelInput.min.js +25 -0
  70. package/{react/build/IntlTelInput.cjs → dist/js/intlTelInput.mjs} +230 -340
  71. package/{build → dist}/js/intlTelInputWithUtils.js +531 -498
  72. package/dist/js/intlTelInputWithUtils.min.js +25 -0
  73. package/{react/build/IntlTelInputWithUtils.cjs → dist/js/intlTelInputWithUtils.mjs} +530 -621
  74. package/{build → dist}/js/utils.js +46 -47
  75. package/package.json +122 -122
  76. package/react/README.md +1 -1
  77. package/react/dist/IntlTelInput.d.ts +20 -0
  78. package/react/{build → dist}/IntlTelInput.js +274 -255
  79. package/react/dist/IntlTelInputWithUtils.d.ts +4 -0
  80. package/react/{build → dist}/IntlTelInputWithUtils.js +580 -542
  81. package/svelte/README.md +1 -1
  82. package/svelte/src/IntlTelInput.svelte +199 -0
  83. package/svelte/src/IntlTelInputWithUtils.svelte +15 -0
  84. package/svelte/src/shims.d.ts +4 -0
  85. package/vue/README.md +1 -1
  86. package/vue/dist/IntlTelInput-D7r449B2.js +2577 -0
  87. package/vue/dist/IntlTelInput.js +5 -0
  88. package/vue/dist/IntlTelInputWithUtils.js +49385 -0
  89. package/vue/dist/src/IntlTelInput.vue.d.ts +35 -0
  90. package/vue/dist/src/index.d.ts +4 -0
  91. package/vue/dist/src/indexWithUtils.d.ts +3 -0
  92. package/angular/build/IntlTelInput.js +0 -4501
  93. package/angular/build/types/intl-tel-input/angular.d.ts +0 -65
  94. package/angular/build/types/intl-tel-input/angularWithUtils.d.ts +0 -65
  95. package/angular/build/types/intl-tel-input/data.d.ts +0 -20
  96. package/angular/build/types/intl-tel-input/i18n/ar/index.d.ts +0 -3
  97. package/angular/build/types/intl-tel-input/i18n/bg/index.d.ts +0 -3
  98. package/angular/build/types/intl-tel-input/i18n/bn/index.d.ts +0 -3
  99. package/angular/build/types/intl-tel-input/i18n/bs/index.d.ts +0 -3
  100. package/angular/build/types/intl-tel-input/i18n/ca/index.d.ts +0 -3
  101. package/angular/build/types/intl-tel-input/i18n/cs/index.d.ts +0 -3
  102. package/angular/build/types/intl-tel-input/i18n/da/index.d.ts +0 -3
  103. package/angular/build/types/intl-tel-input/i18n/de/index.d.ts +0 -3
  104. package/angular/build/types/intl-tel-input/i18n/el/index.d.ts +0 -3
  105. package/angular/build/types/intl-tel-input/i18n/en/index.d.ts +0 -3
  106. package/angular/build/types/intl-tel-input/i18n/es/index.d.ts +0 -3
  107. package/angular/build/types/intl-tel-input/i18n/et/index.d.ts +0 -3
  108. package/angular/build/types/intl-tel-input/i18n/fa/index.d.ts +0 -3
  109. package/angular/build/types/intl-tel-input/i18n/fi/index.d.ts +0 -3
  110. package/angular/build/types/intl-tel-input/i18n/fr/index.d.ts +0 -3
  111. package/angular/build/types/intl-tel-input/i18n/hi/index.d.ts +0 -3
  112. package/angular/build/types/intl-tel-input/i18n/hr/index.d.ts +0 -3
  113. package/angular/build/types/intl-tel-input/i18n/hu/index.d.ts +0 -3
  114. package/angular/build/types/intl-tel-input/i18n/id/index.d.ts +0 -3
  115. package/angular/build/types/intl-tel-input/i18n/index.d.ts +0 -45
  116. package/angular/build/types/intl-tel-input/i18n/it/index.d.ts +0 -3
  117. package/angular/build/types/intl-tel-input/i18n/ja/index.d.ts +0 -3
  118. package/angular/build/types/intl-tel-input/i18n/kn/index.d.ts +0 -3
  119. package/angular/build/types/intl-tel-input/i18n/ko/index.d.ts +0 -3
  120. package/angular/build/types/intl-tel-input/i18n/lt/index.d.ts +0 -3
  121. package/angular/build/types/intl-tel-input/i18n/mr/index.d.ts +0 -3
  122. package/angular/build/types/intl-tel-input/i18n/nl/index.d.ts +0 -3
  123. package/angular/build/types/intl-tel-input/i18n/no/index.d.ts +0 -3
  124. package/angular/build/types/intl-tel-input/i18n/pl/index.d.ts +0 -3
  125. package/angular/build/types/intl-tel-input/i18n/pt/index.d.ts +0 -3
  126. package/angular/build/types/intl-tel-input/i18n/ro/index.d.ts +0 -3
  127. package/angular/build/types/intl-tel-input/i18n/ru/index.d.ts +0 -3
  128. package/angular/build/types/intl-tel-input/i18n/sk/index.d.ts +0 -3
  129. package/angular/build/types/intl-tel-input/i18n/sl/index.d.ts +0 -3
  130. package/angular/build/types/intl-tel-input/i18n/sq/index.d.ts +0 -3
  131. package/angular/build/types/intl-tel-input/i18n/sr/index.d.ts +0 -3
  132. package/angular/build/types/intl-tel-input/i18n/sv/index.d.ts +0 -3
  133. package/angular/build/types/intl-tel-input/i18n/te/index.d.ts +0 -3
  134. package/angular/build/types/intl-tel-input/i18n/th/index.d.ts +0 -3
  135. package/angular/build/types/intl-tel-input/i18n/tr/index.d.ts +0 -3
  136. package/angular/build/types/intl-tel-input/i18n/types.d.ts +0 -10
  137. package/angular/build/types/intl-tel-input/i18n/uk/index.d.ts +0 -3
  138. package/angular/build/types/intl-tel-input/i18n/ur/index.d.ts +0 -3
  139. package/angular/build/types/intl-tel-input/i18n/uz/index.d.ts +0 -3
  140. package/angular/build/types/intl-tel-input/i18n/vi/index.d.ts +0 -3
  141. package/angular/build/types/intl-tel-input/i18n/zh/index.d.ts +0 -3
  142. package/angular/build/types/intl-tel-input/i18n/zh-hk/index.d.ts +0 -3
  143. package/angular/build/types/intl-tel-input/intlTelInputWithUtils.d.ts +0 -2
  144. package/angular/build/types/intl-tel-input/utils.d.ts +0 -2
  145. package/angular/build/types/intl-tel-input.d.ts +0 -46
  146. package/angular/build/types/modules/constants.d.ts +0 -94
  147. package/angular/build/types/modules/core/countrySearch.d.ts +0 -17
  148. package/angular/build/types/modules/core/icons.d.ts +0 -11
  149. package/angular/build/types/modules/core/numerals.d.ts +0 -7
  150. package/angular/build/types/modules/core/options.d.ts +0 -8
  151. package/angular/build/types/modules/core/ui.d.ts +0 -30
  152. package/angular/build/types/modules/data/country-data.d.ts +0 -12
  153. package/angular/build/types/modules/data/intl-regionless.d.ts +0 -2
  154. package/angular/build/types/modules/data/nanp-regionless.d.ts +0 -2
  155. package/angular/build/types/modules/format/caret.d.ts +0 -1
  156. package/angular/build/types/modules/format/formatting.d.ts +0 -3
  157. package/angular/build/types/modules/types/events.d.ts +0 -10
  158. package/angular/build/types/modules/types/forEachInstanceArgsMap.d.ts +0 -6
  159. package/angular/build/types/modules/types/public-api.d.ts +0 -65
  160. package/angular/build/types/modules/utils/dom.d.ts +0 -6
  161. package/angular/build/types/modules/utils/isAndroid.d.ts +0 -1
  162. package/angular/build/types/modules/utils/string.d.ts +0 -2
  163. package/build/css/intlTelInput-no-assets.css +0 -1323
  164. package/build/css/intlTelInput-no-assets.min.css +0 -1
  165. package/build/css/intlTelInput.css +0 -1327
  166. package/build/css/intlTelInput.min.css +0 -1
  167. package/build/img/flags.png +0 -0
  168. package/build/img/flags.webp +0 -0
  169. package/build/img/flags@2x.png +0 -0
  170. package/build/img/flags@2x.webp +0 -0
  171. package/build/js/data.min.js +0 -20
  172. package/build/js/i18n/types.js +0 -0
  173. package/build/js/intlTelInput.d.ts +0 -671
  174. package/build/js/intlTelInput.min.js +0 -38
  175. package/build/js/intlTelInputWithUtils.min.js +0 -38
  176. package/index.js +0 -1
  177. package/react/build/IntlTelInput.d.ts +0 -721
  178. package/svelte/build/IntlTelInput.mjs +0 -5294
  179. package/svelte/build/IntlTelInputWithUtils.mjs +0 -11381
  180. package/vue/build/IntlTelInput.vue.d.ts +0 -34
  181. package/vue/build/IntlTelInputWithUtils.vue.d.ts +0 -34
  182. package/vue/build/exports/IntlTelInput.d.ts +0 -3
  183. package/vue/build/exports/IntlTelInput.mjs +0 -86
  184. package/vue/build/exports/IntlTelInputWithUtils.d.ts +0 -3
  185. package/vue/build/exports/IntlTelInputWithUtils.mjs +0 -6173
  186. package/vue/build/intl-tel-input/data.d.ts +0 -20
  187. package/vue/build/intl-tel-input/i18n/ar/index.d.ts +0 -3
  188. package/vue/build/intl-tel-input/i18n/bg/index.d.ts +0 -3
  189. package/vue/build/intl-tel-input/i18n/bn/index.d.ts +0 -3
  190. package/vue/build/intl-tel-input/i18n/bs/index.d.ts +0 -3
  191. package/vue/build/intl-tel-input/i18n/ca/index.d.ts +0 -3
  192. package/vue/build/intl-tel-input/i18n/cs/index.d.ts +0 -3
  193. package/vue/build/intl-tel-input/i18n/da/index.d.ts +0 -3
  194. package/vue/build/intl-tel-input/i18n/de/index.d.ts +0 -3
  195. package/vue/build/intl-tel-input/i18n/el/index.d.ts +0 -3
  196. package/vue/build/intl-tel-input/i18n/en/index.d.ts +0 -3
  197. package/vue/build/intl-tel-input/i18n/es/index.d.ts +0 -3
  198. package/vue/build/intl-tel-input/i18n/et/index.d.ts +0 -3
  199. package/vue/build/intl-tel-input/i18n/fa/index.d.ts +0 -3
  200. package/vue/build/intl-tel-input/i18n/fi/index.d.ts +0 -3
  201. package/vue/build/intl-tel-input/i18n/fr/index.d.ts +0 -3
  202. package/vue/build/intl-tel-input/i18n/hi/index.d.ts +0 -3
  203. package/vue/build/intl-tel-input/i18n/hr/index.d.ts +0 -3
  204. package/vue/build/intl-tel-input/i18n/hu/index.d.ts +0 -3
  205. package/vue/build/intl-tel-input/i18n/id/index.d.ts +0 -3
  206. package/vue/build/intl-tel-input/i18n/index.d.ts +0 -45
  207. package/vue/build/intl-tel-input/i18n/it/index.d.ts +0 -3
  208. package/vue/build/intl-tel-input/i18n/ja/index.d.ts +0 -3
  209. package/vue/build/intl-tel-input/i18n/kn/index.d.ts +0 -3
  210. package/vue/build/intl-tel-input/i18n/ko/index.d.ts +0 -3
  211. package/vue/build/intl-tel-input/i18n/lt/index.d.ts +0 -3
  212. package/vue/build/intl-tel-input/i18n/mr/index.d.ts +0 -3
  213. package/vue/build/intl-tel-input/i18n/nl/index.d.ts +0 -3
  214. package/vue/build/intl-tel-input/i18n/no/index.d.ts +0 -3
  215. package/vue/build/intl-tel-input/i18n/pl/index.d.ts +0 -3
  216. package/vue/build/intl-tel-input/i18n/pt/index.d.ts +0 -3
  217. package/vue/build/intl-tel-input/i18n/ro/index.d.ts +0 -3
  218. package/vue/build/intl-tel-input/i18n/ru/index.d.ts +0 -3
  219. package/vue/build/intl-tel-input/i18n/sk/index.d.ts +0 -3
  220. package/vue/build/intl-tel-input/i18n/sl/index.d.ts +0 -3
  221. package/vue/build/intl-tel-input/i18n/sq/index.d.ts +0 -3
  222. package/vue/build/intl-tel-input/i18n/sr/index.d.ts +0 -3
  223. package/vue/build/intl-tel-input/i18n/sv/index.d.ts +0 -3
  224. package/vue/build/intl-tel-input/i18n/te/index.d.ts +0 -3
  225. package/vue/build/intl-tel-input/i18n/th/index.d.ts +0 -3
  226. package/vue/build/intl-tel-input/i18n/tr/index.d.ts +0 -3
  227. package/vue/build/intl-tel-input/i18n/types.d.ts +0 -10
  228. package/vue/build/intl-tel-input/i18n/uk/index.d.ts +0 -3
  229. package/vue/build/intl-tel-input/i18n/ur/index.d.ts +0 -3
  230. package/vue/build/intl-tel-input/i18n/uz/index.d.ts +0 -3
  231. package/vue/build/intl-tel-input/i18n/vi/index.d.ts +0 -3
  232. package/vue/build/intl-tel-input/i18n/zh/index.d.ts +0 -3
  233. package/vue/build/intl-tel-input/i18n/zh-hk/index.d.ts +0 -3
  234. package/vue/build/intl-tel-input/intlTelInputWithUtils.d.ts +0 -2
  235. package/vue/build/intl-tel-input-MeSkUgHd.mjs +0 -3438
  236. package/vue/build/intl-tel-input.d.ts +0 -46
  237. package/vue/build/modules/constants.d.ts +0 -94
  238. package/vue/build/modules/core/countrySearch.d.ts +0 -17
  239. package/vue/build/modules/core/icons.d.ts +0 -11
  240. package/vue/build/modules/core/numerals.d.ts +0 -7
  241. package/vue/build/modules/core/options.d.ts +0 -8
  242. package/vue/build/modules/core/ui.d.ts +0 -30
  243. package/vue/build/modules/data/country-data.d.ts +0 -12
  244. package/vue/build/modules/data/intl-regionless.d.ts +0 -2
  245. package/vue/build/modules/data/nanp-regionless.d.ts +0 -2
  246. package/vue/build/modules/format/caret.d.ts +0 -1
  247. package/vue/build/modules/format/formatting.d.ts +0 -3
  248. package/vue/build/modules/types/events.d.ts +0 -10
  249. package/vue/build/modules/types/forEachInstanceArgsMap.d.ts +0 -6
  250. package/vue/build/modules/types/public-api.d.ts +0 -65
  251. package/vue/build/modules/utils/dom.d.ts +0 -6
  252. package/vue/build/modules/utils/isAndroid.d.ts +0 -1
  253. package/vue/build/modules/utils/string.d.ts +0 -2
@@ -0,0 +1,2577 @@
1
+ import { computed as e, createElementBlock as t, defineComponent as n, getCurrentInstance as r, mergeProps as i, onMounted as a, onUnmounted as o, openBlock as s, ref as c, shallowRef as l, watch as u } from "vue";
2
+ //#region dist/js/intlTelInput.mjs
3
+ var d = [
4
+ [
5
+ "af",
6
+ "93",
7
+ 0,
8
+ null,
9
+ "0"
10
+ ],
11
+ [
12
+ "ax",
13
+ "358",
14
+ 1,
15
+ ["18", "4"],
16
+ "0"
17
+ ],
18
+ [
19
+ "al",
20
+ "355",
21
+ 0,
22
+ null,
23
+ "0"
24
+ ],
25
+ [
26
+ "dz",
27
+ "213",
28
+ 0,
29
+ null,
30
+ "0"
31
+ ],
32
+ [
33
+ "as",
34
+ "1",
35
+ 5,
36
+ ["684"],
37
+ "1"
38
+ ],
39
+ ["ad", "376"],
40
+ ["ao", "244"],
41
+ [
42
+ "ai",
43
+ "1",
44
+ 6,
45
+ ["264"],
46
+ "1"
47
+ ],
48
+ [
49
+ "ag",
50
+ "1",
51
+ 7,
52
+ ["268"],
53
+ "1"
54
+ ],
55
+ [
56
+ "ar",
57
+ "54",
58
+ 0,
59
+ null,
60
+ "0"
61
+ ],
62
+ [
63
+ "am",
64
+ "374",
65
+ 0,
66
+ null,
67
+ "0"
68
+ ],
69
+ ["aw", "297"],
70
+ ["ac", "247"],
71
+ [
72
+ "au",
73
+ "61",
74
+ 0,
75
+ ["4"],
76
+ "0"
77
+ ],
78
+ [
79
+ "at",
80
+ "43",
81
+ 0,
82
+ null,
83
+ "0"
84
+ ],
85
+ [
86
+ "az",
87
+ "994",
88
+ 0,
89
+ null,
90
+ "0"
91
+ ],
92
+ [
93
+ "bs",
94
+ "1",
95
+ 8,
96
+ ["242"],
97
+ "1"
98
+ ],
99
+ ["bh", "973"],
100
+ [
101
+ "bd",
102
+ "880",
103
+ 0,
104
+ null,
105
+ "0"
106
+ ],
107
+ [
108
+ "bb",
109
+ "1",
110
+ 9,
111
+ ["246"],
112
+ "1"
113
+ ],
114
+ [
115
+ "by",
116
+ "375",
117
+ 0,
118
+ null,
119
+ "8"
120
+ ],
121
+ [
122
+ "be",
123
+ "32",
124
+ 0,
125
+ null,
126
+ "0"
127
+ ],
128
+ ["bz", "501"],
129
+ ["bj", "229"],
130
+ [
131
+ "bm",
132
+ "1",
133
+ 10,
134
+ ["441"],
135
+ "1"
136
+ ],
137
+ ["bt", "975"],
138
+ [
139
+ "bo",
140
+ "591",
141
+ 0,
142
+ null,
143
+ "0"
144
+ ],
145
+ [
146
+ "ba",
147
+ "387",
148
+ 0,
149
+ null,
150
+ "0"
151
+ ],
152
+ ["bw", "267"],
153
+ [
154
+ "br",
155
+ "55",
156
+ 0,
157
+ null,
158
+ "0"
159
+ ],
160
+ ["io", "246"],
161
+ [
162
+ "vg",
163
+ "1",
164
+ 11,
165
+ ["284"],
166
+ "1"
167
+ ],
168
+ ["bn", "673"],
169
+ [
170
+ "bg",
171
+ "359",
172
+ 0,
173
+ null,
174
+ "0"
175
+ ],
176
+ ["bf", "226"],
177
+ ["bi", "257"],
178
+ [
179
+ "kh",
180
+ "855",
181
+ 0,
182
+ null,
183
+ "0"
184
+ ],
185
+ ["cm", "237"],
186
+ [
187
+ "ca",
188
+ "1",
189
+ 1,
190
+ /* @__PURE__ */ "204.226.236.249.250.257.263.289.306.343.354.365.367.368.382.403.416.418.428.431.437.438.450.468.474.506.514.519.548.579.581.584.587.604.613.639.647.672.683.705.709.742.753.778.780.782.807.819.825.867.873.879.902.905.942".split("."),
191
+ "1"
192
+ ],
193
+ ["cv", "238"],
194
+ [
195
+ "bq",
196
+ "599",
197
+ 1,
198
+ [
199
+ "3",
200
+ "4",
201
+ "7"
202
+ ]
203
+ ],
204
+ [
205
+ "ky",
206
+ "1",
207
+ 12,
208
+ ["345"],
209
+ "1"
210
+ ],
211
+ ["cf", "236"],
212
+ ["td", "235"],
213
+ ["cl", "56"],
214
+ [
215
+ "cn",
216
+ "86",
217
+ 0,
218
+ null,
219
+ "0"
220
+ ],
221
+ [
222
+ "cx",
223
+ "61",
224
+ 2,
225
+ ["4", "89164"],
226
+ "0"
227
+ ],
228
+ [
229
+ "cc",
230
+ "61",
231
+ 1,
232
+ ["4", "89162"],
233
+ "0"
234
+ ],
235
+ [
236
+ "co",
237
+ "57",
238
+ 0,
239
+ null,
240
+ "0"
241
+ ],
242
+ ["km", "269"],
243
+ ["cg", "242"],
244
+ [
245
+ "cd",
246
+ "243",
247
+ 0,
248
+ null,
249
+ "0"
250
+ ],
251
+ ["ck", "682"],
252
+ ["cr", "506"],
253
+ ["ci", "225"],
254
+ [
255
+ "hr",
256
+ "385",
257
+ 0,
258
+ null,
259
+ "0"
260
+ ],
261
+ [
262
+ "cu",
263
+ "53",
264
+ 0,
265
+ null,
266
+ "0"
267
+ ],
268
+ [
269
+ "cw",
270
+ "599",
271
+ 0
272
+ ],
273
+ ["cy", "357"],
274
+ ["cz", "420"],
275
+ ["dk", "45"],
276
+ ["dj", "253"],
277
+ [
278
+ "dm",
279
+ "1",
280
+ 13,
281
+ ["767"],
282
+ "1"
283
+ ],
284
+ [
285
+ "do",
286
+ "1",
287
+ 2,
288
+ [
289
+ "809",
290
+ "829",
291
+ "849"
292
+ ],
293
+ "1"
294
+ ],
295
+ [
296
+ "ec",
297
+ "593",
298
+ 0,
299
+ null,
300
+ "0"
301
+ ],
302
+ [
303
+ "eg",
304
+ "20",
305
+ 0,
306
+ null,
307
+ "0"
308
+ ],
309
+ ["sv", "503"],
310
+ ["gq", "240"],
311
+ [
312
+ "er",
313
+ "291",
314
+ 0,
315
+ null,
316
+ "0"
317
+ ],
318
+ ["ee", "372"],
319
+ ["sz", "268"],
320
+ [
321
+ "et",
322
+ "251",
323
+ 0,
324
+ null,
325
+ "0"
326
+ ],
327
+ ["fk", "500"],
328
+ ["fo", "298"],
329
+ ["fj", "679"],
330
+ [
331
+ "fi",
332
+ "358",
333
+ 0,
334
+ ["4"],
335
+ "0"
336
+ ],
337
+ [
338
+ "fr",
339
+ "33",
340
+ 0,
341
+ null,
342
+ "0"
343
+ ],
344
+ [
345
+ "gf",
346
+ "594",
347
+ 0,
348
+ null,
349
+ "0"
350
+ ],
351
+ ["pf", "689"],
352
+ ["ga", "241"],
353
+ ["gm", "220"],
354
+ [
355
+ "ge",
356
+ "995",
357
+ 0,
358
+ null,
359
+ "0"
360
+ ],
361
+ [
362
+ "de",
363
+ "49",
364
+ 0,
365
+ null,
366
+ "0"
367
+ ],
368
+ [
369
+ "gh",
370
+ "233",
371
+ 0,
372
+ null,
373
+ "0"
374
+ ],
375
+ ["gi", "350"],
376
+ ["gr", "30"],
377
+ ["gl", "299"],
378
+ [
379
+ "gd",
380
+ "1",
381
+ 14,
382
+ ["473"],
383
+ "1"
384
+ ],
385
+ [
386
+ "gp",
387
+ "590",
388
+ 0,
389
+ null,
390
+ "0"
391
+ ],
392
+ [
393
+ "gu",
394
+ "1",
395
+ 15,
396
+ ["671"],
397
+ "1"
398
+ ],
399
+ ["gt", "502"],
400
+ [
401
+ "gg",
402
+ "44",
403
+ 1,
404
+ [
405
+ "1481",
406
+ "7781",
407
+ "7839",
408
+ "7911"
409
+ ],
410
+ "0"
411
+ ],
412
+ ["gn", "224"],
413
+ ["gw", "245"],
414
+ ["gy", "592"],
415
+ ["ht", "509"],
416
+ ["hn", "504"],
417
+ ["hk", "852"],
418
+ [
419
+ "hu",
420
+ "36",
421
+ 0,
422
+ null,
423
+ "06"
424
+ ],
425
+ ["is", "354"],
426
+ [
427
+ "in",
428
+ "91",
429
+ 0,
430
+ null,
431
+ "0"
432
+ ],
433
+ [
434
+ "id",
435
+ "62",
436
+ 0,
437
+ null,
438
+ "0"
439
+ ],
440
+ [
441
+ "ir",
442
+ "98",
443
+ 0,
444
+ null,
445
+ "0"
446
+ ],
447
+ [
448
+ "iq",
449
+ "964",
450
+ 0,
451
+ null,
452
+ "0"
453
+ ],
454
+ [
455
+ "ie",
456
+ "353",
457
+ 0,
458
+ null,
459
+ "0"
460
+ ],
461
+ [
462
+ "im",
463
+ "44",
464
+ 2,
465
+ [
466
+ "1624",
467
+ "74576",
468
+ "7524",
469
+ "7624",
470
+ "7924"
471
+ ],
472
+ "0"
473
+ ],
474
+ [
475
+ "il",
476
+ "972",
477
+ 0,
478
+ null,
479
+ "0"
480
+ ],
481
+ [
482
+ "it",
483
+ "39",
484
+ 0,
485
+ ["3"]
486
+ ],
487
+ [
488
+ "jm",
489
+ "1",
490
+ 4,
491
+ ["658", "876"],
492
+ "1"
493
+ ],
494
+ [
495
+ "jp",
496
+ "81",
497
+ 0,
498
+ null,
499
+ "0"
500
+ ],
501
+ [
502
+ "je",
503
+ "44",
504
+ 3,
505
+ [
506
+ "1534",
507
+ "7509",
508
+ "7700",
509
+ "7797",
510
+ "7829",
511
+ "7937"
512
+ ],
513
+ "0"
514
+ ],
515
+ [
516
+ "jo",
517
+ "962",
518
+ 0,
519
+ null,
520
+ "0"
521
+ ],
522
+ [
523
+ "kz",
524
+ "7",
525
+ 1,
526
+ ["33", "7"],
527
+ "8"
528
+ ],
529
+ [
530
+ "ke",
531
+ "254",
532
+ 0,
533
+ null,
534
+ "0"
535
+ ],
536
+ [
537
+ "ki",
538
+ "686",
539
+ 0,
540
+ null,
541
+ "0"
542
+ ],
543
+ [
544
+ "xk",
545
+ "383",
546
+ 0,
547
+ null,
548
+ "0"
549
+ ],
550
+ ["kw", "965"],
551
+ [
552
+ "kg",
553
+ "996",
554
+ 0,
555
+ null,
556
+ "0"
557
+ ],
558
+ [
559
+ "la",
560
+ "856",
561
+ 0,
562
+ null,
563
+ "0"
564
+ ],
565
+ ["lv", "371"],
566
+ [
567
+ "lb",
568
+ "961",
569
+ 0,
570
+ null,
571
+ "0"
572
+ ],
573
+ ["ls", "266"],
574
+ [
575
+ "lr",
576
+ "231",
577
+ 0,
578
+ null,
579
+ "0"
580
+ ],
581
+ [
582
+ "ly",
583
+ "218",
584
+ 0,
585
+ null,
586
+ "0"
587
+ ],
588
+ [
589
+ "li",
590
+ "423",
591
+ 0,
592
+ null,
593
+ "0"
594
+ ],
595
+ [
596
+ "lt",
597
+ "370",
598
+ 0,
599
+ null,
600
+ "0"
601
+ ],
602
+ ["lu", "352"],
603
+ ["mo", "853"],
604
+ [
605
+ "mg",
606
+ "261",
607
+ 0,
608
+ null,
609
+ "0"
610
+ ],
611
+ [
612
+ "mw",
613
+ "265",
614
+ 0,
615
+ null,
616
+ "0"
617
+ ],
618
+ [
619
+ "my",
620
+ "60",
621
+ 0,
622
+ null,
623
+ "0"
624
+ ],
625
+ ["mv", "960"],
626
+ ["ml", "223"],
627
+ ["mt", "356"],
628
+ [
629
+ "mh",
630
+ "692",
631
+ 0,
632
+ null,
633
+ "1"
634
+ ],
635
+ [
636
+ "mq",
637
+ "596",
638
+ 0,
639
+ null,
640
+ "0"
641
+ ],
642
+ ["mr", "222"],
643
+ ["mu", "230"],
644
+ [
645
+ "yt",
646
+ "262",
647
+ 1,
648
+ ["269", "639"],
649
+ "0"
650
+ ],
651
+ ["mx", "52"],
652
+ ["fm", "691"],
653
+ [
654
+ "md",
655
+ "373",
656
+ 0,
657
+ null,
658
+ "0"
659
+ ],
660
+ [
661
+ "mc",
662
+ "377",
663
+ 0,
664
+ null,
665
+ "0"
666
+ ],
667
+ [
668
+ "mn",
669
+ "976",
670
+ 0,
671
+ null,
672
+ "0"
673
+ ],
674
+ [
675
+ "me",
676
+ "382",
677
+ 0,
678
+ null,
679
+ "0"
680
+ ],
681
+ [
682
+ "ms",
683
+ "1",
684
+ 16,
685
+ ["664"],
686
+ "1"
687
+ ],
688
+ [
689
+ "ma",
690
+ "212",
691
+ 0,
692
+ ["6", "7"],
693
+ "0"
694
+ ],
695
+ ["mz", "258"],
696
+ [
697
+ "mm",
698
+ "95",
699
+ 0,
700
+ null,
701
+ "0"
702
+ ],
703
+ [
704
+ "na",
705
+ "264",
706
+ 0,
707
+ null,
708
+ "0"
709
+ ],
710
+ ["nr", "674"],
711
+ [
712
+ "np",
713
+ "977",
714
+ 0,
715
+ null,
716
+ "0"
717
+ ],
718
+ [
719
+ "nl",
720
+ "31",
721
+ 0,
722
+ null,
723
+ "0"
724
+ ],
725
+ ["nc", "687"],
726
+ [
727
+ "nz",
728
+ "64",
729
+ 0,
730
+ null,
731
+ "0"
732
+ ],
733
+ ["ni", "505"],
734
+ ["ne", "227"],
735
+ [
736
+ "ng",
737
+ "234",
738
+ 0,
739
+ null,
740
+ "0"
741
+ ],
742
+ ["nu", "683"],
743
+ ["nf", "672"],
744
+ [
745
+ "kp",
746
+ "850",
747
+ 0,
748
+ null,
749
+ "0"
750
+ ],
751
+ [
752
+ "mk",
753
+ "389",
754
+ 0,
755
+ null,
756
+ "0"
757
+ ],
758
+ [
759
+ "mp",
760
+ "1",
761
+ 17,
762
+ ["670"],
763
+ "1"
764
+ ],
765
+ [
766
+ "no",
767
+ "47",
768
+ 0,
769
+ ["4", "9"]
770
+ ],
771
+ ["om", "968"],
772
+ [
773
+ "pk",
774
+ "92",
775
+ 0,
776
+ null,
777
+ "0"
778
+ ],
779
+ ["pw", "680"],
780
+ [
781
+ "ps",
782
+ "970",
783
+ 0,
784
+ null,
785
+ "0"
786
+ ],
787
+ ["pa", "507"],
788
+ ["pg", "675"],
789
+ [
790
+ "py",
791
+ "595",
792
+ 0,
793
+ null,
794
+ "0"
795
+ ],
796
+ [
797
+ "pe",
798
+ "51",
799
+ 0,
800
+ null,
801
+ "0"
802
+ ],
803
+ [
804
+ "ph",
805
+ "63",
806
+ 0,
807
+ null,
808
+ "0"
809
+ ],
810
+ ["pl", "48"],
811
+ ["pt", "351"],
812
+ [
813
+ "pr",
814
+ "1",
815
+ 3,
816
+ ["787", "939"],
817
+ "1"
818
+ ],
819
+ ["qa", "974"],
820
+ [
821
+ "re",
822
+ "262",
823
+ 0,
824
+ null,
825
+ "0"
826
+ ],
827
+ [
828
+ "ro",
829
+ "40",
830
+ 0,
831
+ null,
832
+ "0"
833
+ ],
834
+ [
835
+ "ru",
836
+ "7",
837
+ 0,
838
+ ["33"],
839
+ "8"
840
+ ],
841
+ [
842
+ "rw",
843
+ "250",
844
+ 0,
845
+ null,
846
+ "0"
847
+ ],
848
+ ["ws", "685"],
849
+ ["sm", "378"],
850
+ ["st", "239"],
851
+ [
852
+ "sa",
853
+ "966",
854
+ 0,
855
+ null,
856
+ "0"
857
+ ],
858
+ ["sn", "221"],
859
+ [
860
+ "rs",
861
+ "381",
862
+ 0,
863
+ null,
864
+ "0"
865
+ ],
866
+ ["sc", "248"],
867
+ [
868
+ "sl",
869
+ "232",
870
+ 0,
871
+ null,
872
+ "0"
873
+ ],
874
+ ["sg", "65"],
875
+ [
876
+ "sx",
877
+ "1",
878
+ 21,
879
+ ["721"],
880
+ "1"
881
+ ],
882
+ [
883
+ "sk",
884
+ "421",
885
+ 0,
886
+ null,
887
+ "0"
888
+ ],
889
+ [
890
+ "si",
891
+ "386",
892
+ 0,
893
+ null,
894
+ "0"
895
+ ],
896
+ ["sb", "677"],
897
+ [
898
+ "so",
899
+ "252",
900
+ 0,
901
+ null,
902
+ "0"
903
+ ],
904
+ [
905
+ "za",
906
+ "27",
907
+ 0,
908
+ null,
909
+ "0"
910
+ ],
911
+ [
912
+ "kr",
913
+ "82",
914
+ 0,
915
+ null,
916
+ "0"
917
+ ],
918
+ [
919
+ "ss",
920
+ "211",
921
+ 0,
922
+ null,
923
+ "0"
924
+ ],
925
+ ["es", "34"],
926
+ [
927
+ "lk",
928
+ "94",
929
+ 0,
930
+ null,
931
+ "0"
932
+ ],
933
+ [
934
+ "bl",
935
+ "590",
936
+ 1,
937
+ null,
938
+ "0"
939
+ ],
940
+ ["sh", "290"],
941
+ [
942
+ "kn",
943
+ "1",
944
+ 18,
945
+ ["869"],
946
+ "1"
947
+ ],
948
+ [
949
+ "lc",
950
+ "1",
951
+ 19,
952
+ ["758"],
953
+ "1"
954
+ ],
955
+ [
956
+ "mf",
957
+ "590",
958
+ 2,
959
+ null,
960
+ "0"
961
+ ],
962
+ [
963
+ "pm",
964
+ "508",
965
+ 0,
966
+ null,
967
+ "0"
968
+ ],
969
+ [
970
+ "vc",
971
+ "1",
972
+ 20,
973
+ ["784"],
974
+ "1"
975
+ ],
976
+ [
977
+ "sd",
978
+ "249",
979
+ 0,
980
+ null,
981
+ "0"
982
+ ],
983
+ ["sr", "597"],
984
+ [
985
+ "sj",
986
+ "47",
987
+ 1,
988
+ [
989
+ "4",
990
+ "79",
991
+ "9"
992
+ ]
993
+ ],
994
+ [
995
+ "se",
996
+ "46",
997
+ 0,
998
+ null,
999
+ "0"
1000
+ ],
1001
+ [
1002
+ "ch",
1003
+ "41",
1004
+ 0,
1005
+ null,
1006
+ "0"
1007
+ ],
1008
+ [
1009
+ "sy",
1010
+ "963",
1011
+ 0,
1012
+ null,
1013
+ "0"
1014
+ ],
1015
+ [
1016
+ "tw",
1017
+ "886",
1018
+ 0,
1019
+ null,
1020
+ "0"
1021
+ ],
1022
+ ["tj", "992"],
1023
+ [
1024
+ "tz",
1025
+ "255",
1026
+ 0,
1027
+ null,
1028
+ "0"
1029
+ ],
1030
+ [
1031
+ "th",
1032
+ "66",
1033
+ 0,
1034
+ null,
1035
+ "0"
1036
+ ],
1037
+ ["tl", "670"],
1038
+ ["tg", "228"],
1039
+ ["tk", "690"],
1040
+ ["to", "676"],
1041
+ [
1042
+ "tt",
1043
+ "1",
1044
+ 22,
1045
+ ["868"],
1046
+ "1"
1047
+ ],
1048
+ ["tn", "216"],
1049
+ [
1050
+ "tr",
1051
+ "90",
1052
+ 0,
1053
+ null,
1054
+ "0"
1055
+ ],
1056
+ [
1057
+ "tm",
1058
+ "993",
1059
+ 0,
1060
+ null,
1061
+ "8"
1062
+ ],
1063
+ [
1064
+ "tc",
1065
+ "1",
1066
+ 23,
1067
+ ["649"],
1068
+ "1"
1069
+ ],
1070
+ ["tv", "688"],
1071
+ [
1072
+ "vi",
1073
+ "1",
1074
+ 24,
1075
+ ["340"],
1076
+ "1"
1077
+ ],
1078
+ [
1079
+ "ug",
1080
+ "256",
1081
+ 0,
1082
+ null,
1083
+ "0"
1084
+ ],
1085
+ [
1086
+ "ua",
1087
+ "380",
1088
+ 0,
1089
+ null,
1090
+ "0"
1091
+ ],
1092
+ [
1093
+ "ae",
1094
+ "971",
1095
+ 0,
1096
+ null,
1097
+ "0"
1098
+ ],
1099
+ [
1100
+ "gb",
1101
+ "44",
1102
+ 0,
1103
+ null,
1104
+ "0"
1105
+ ],
1106
+ [
1107
+ "us",
1108
+ "1",
1109
+ 0,
1110
+ null,
1111
+ "1"
1112
+ ],
1113
+ [
1114
+ "uy",
1115
+ "598",
1116
+ 0,
1117
+ null,
1118
+ "0"
1119
+ ],
1120
+ ["uz", "998"],
1121
+ ["vu", "678"],
1122
+ [
1123
+ "va",
1124
+ "39",
1125
+ 1,
1126
+ ["06698", "3"]
1127
+ ],
1128
+ [
1129
+ "ve",
1130
+ "58",
1131
+ 0,
1132
+ null,
1133
+ "0"
1134
+ ],
1135
+ [
1136
+ "vn",
1137
+ "84",
1138
+ 0,
1139
+ null,
1140
+ "0"
1141
+ ],
1142
+ ["wf", "681"],
1143
+ [
1144
+ "eh",
1145
+ "212",
1146
+ 1,
1147
+ [
1148
+ "5288",
1149
+ "5289",
1150
+ "6",
1151
+ "7"
1152
+ ],
1153
+ "0"
1154
+ ],
1155
+ [
1156
+ "ye",
1157
+ "967",
1158
+ 0,
1159
+ null,
1160
+ "0"
1161
+ ],
1162
+ [
1163
+ "zm",
1164
+ "260",
1165
+ 0,
1166
+ null,
1167
+ "0"
1168
+ ],
1169
+ [
1170
+ "zw",
1171
+ "263",
1172
+ 0,
1173
+ null,
1174
+ "0"
1175
+ ]
1176
+ ], f = [];
1177
+ for (let e of d) f.push({
1178
+ name: "",
1179
+ iso2: e[0],
1180
+ dialCode: e[1],
1181
+ priority: e[2] || 0,
1182
+ areaCodes: e[3] || null,
1183
+ nodeById: {},
1184
+ nationalPrefix: e[4] || null,
1185
+ normalisedName: "",
1186
+ initials: "",
1187
+ dialCodePlus: ""
1188
+ });
1189
+ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1190
+ OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
1191
+ CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown",
1192
+ COUNTRY_CHANGE: "countrychange",
1193
+ INPUT: "input"
1194
+ }, _ = {
1195
+ HIDE: "iti__hide",
1196
+ V_HIDE: "iti__v-hide",
1197
+ ARROW_UP: "iti__arrow--up",
1198
+ GLOBE: "iti__globe",
1199
+ FLAG: "iti__flag",
1200
+ LOADING: "iti__loading",
1201
+ COUNTRY_ITEM: "iti__country",
1202
+ HIGHLIGHT: "iti__highlight"
1203
+ }, v = {
1204
+ ARROW_UP: "ArrowUp",
1205
+ ARROW_DOWN: "ArrowDown",
1206
+ SPACE: " ",
1207
+ ENTER: "Enter",
1208
+ ESC: "Escape",
1209
+ TAB: "Tab"
1210
+ }, y = {
1211
+ PASTE: "insertFromPaste",
1212
+ DELETE_FWD: "deleteContentForward"
1213
+ }, b = {
1214
+ ALPHA_UNICODE: /\p{L}/u,
1215
+ NON_PLUS_NUMERIC: /[^+0-9]/,
1216
+ NON_PLUS_NUMERIC_GLOBAL: /[^+0-9]/g,
1217
+ HIDDEN_SEARCH_CHAR: /^[a-zA-ZÀ-ÿа-яА-Я ]$/
1218
+ }, x = {
1219
+ SEARCH_DEBOUNCE_MS: 100,
1220
+ HIDDEN_SEARCH_RESET_MS: 1e3,
1221
+ NEXT_TICK: 0
1222
+ }, S = {
1223
+ UNKNOWN_NUMBER_TYPE: -99,
1224
+ UNKNOWN_VALIDATION_ERROR: -99
1225
+ }, C = {
1226
+ NARROW_VIEWPORT_WIDTH: 500,
1227
+ SANE_SELECTED_WITH_DIAL_WIDTH: 78,
1228
+ SANE_SELECTED_NO_DIAL_WIDTH: 42,
1229
+ INPUT_PADDING_EXTRA_LEFT: 6,
1230
+ DROPDOWN_MARGIN: 3,
1231
+ SANE_DROPDOWN_HEIGHT: 200
1232
+ }, w = {
1233
+ PLUS: "+",
1234
+ NANP: "1"
1235
+ }, T = {
1236
+ ISO2: "gb",
1237
+ DIAL_CODE: "44",
1238
+ MOBILE_PREFIX: "7",
1239
+ MOBILE_CORE_LENGTH: 10
1240
+ }, E = {
1241
+ ISO2: "us",
1242
+ DIAL_CODE: "1"
1243
+ }, D = {
1244
+ AGGRESSIVE: "aggressive",
1245
+ POLITE: "polite",
1246
+ OFF: "off"
1247
+ }, O = { AUTO: "auto" }, k = new Set([
1248
+ "FIXED_LINE",
1249
+ "MOBILE",
1250
+ "FIXED_LINE_OR_MOBILE",
1251
+ "TOLL_FREE",
1252
+ "PREMIUM_RATE",
1253
+ "SHARED_COST",
1254
+ "VOIP",
1255
+ "PERSONAL_NUMBER",
1256
+ "PAGER",
1257
+ "UAN",
1258
+ "VOICEMAIL",
1259
+ "UNKNOWN"
1260
+ ]), A = {
1261
+ COUNTRY_CODE: "countryCode",
1262
+ DIAL_CODE: "dialCode"
1263
+ }, j = {
1264
+ EXPANDED: "aria-expanded",
1265
+ LABEL: "aria-label",
1266
+ SELECTED: "aria-selected",
1267
+ ACTIVE_DESCENDANT: "aria-activedescendant",
1268
+ HASPOPUP: "aria-haspopup",
1269
+ CONTROLS: "aria-controls",
1270
+ HIDDEN: "aria-hidden",
1271
+ AUTOCOMPLETE: "aria-autocomplete",
1272
+ MODAL: "aria-modal"
1273
+ }, M = {
1274
+ selectedCountryAriaLabel: "Change country for phone number, currently selected ${countryName} (${dialCode})",
1275
+ noCountrySelected: "Select country for phone number",
1276
+ countryListAriaLabel: "List of countries",
1277
+ searchPlaceholder: "Search",
1278
+ clearSearchAriaLabel: "Clear search",
1279
+ searchEmptyState: "No results found",
1280
+ searchSummaryAria(e) {
1281
+ return e === 0 ? "No results found" : e === 1 ? "1 result found" : `${e} results found`;
1282
+ }
1283
+ }, N = (e) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(e).matches, P = () => N(`(max-width: ${C.NARROW_VIEWPORT_WIDTH}px)`), F = {
1284
+ allowDropdown: !0,
1285
+ allowedNumberTypes: ["MOBILE", "FIXED_LINE"],
1286
+ allowNumberExtensions: !1,
1287
+ allowPhonewords: !1,
1288
+ autoPlaceholder: D.POLITE,
1289
+ containerClass: "",
1290
+ countryNameLocale: "en",
1291
+ countryOrder: null,
1292
+ countrySearch: !0,
1293
+ customPlaceholder: null,
1294
+ dropdownAlwaysOpen: !1,
1295
+ dropdownContainer: null,
1296
+ excludeCountries: null,
1297
+ fixDropdownWidth: !0,
1298
+ formatAsYouType: !0,
1299
+ formatOnDisplay: !0,
1300
+ geoIpLookup: null,
1301
+ hiddenInput: null,
1302
+ i18n: {},
1303
+ initialCountry: "",
1304
+ loadUtils: null,
1305
+ nationalMode: !0,
1306
+ onlyCountries: null,
1307
+ placeholderNumberType: "MOBILE",
1308
+ searchInputClass: "",
1309
+ separateDialCode: !1,
1310
+ showFlags: !0,
1311
+ strictMode: !1,
1312
+ useFullscreenPopup: (() => {
1313
+ if (typeof navigator < "u" && typeof window < "u") {
1314
+ let e = N("(max-height: 600px)"), t = N("(pointer: coarse)");
1315
+ return P() || t && e;
1316
+ }
1317
+ return !1;
1318
+ })()
1319
+ }, I = (e) => JSON.stringify(e), L = (e) => !!e && typeof e == "object" && !Array.isArray(e), ee = (e) => typeof e == "function", te = (e) => {
1320
+ if (!e || typeof e != "object") return !1;
1321
+ let t = e;
1322
+ return t.nodeType === 1 && typeof t.tagName == "string" && typeof t.appendChild == "function";
1323
+ }, R = new Set(Object.values(D)), z = (e) => {
1324
+ console.warn(`[intl-tel-input] ${e}`);
1325
+ }, B = (e, t, n) => {
1326
+ z(`Option '${e}' must be ${t}; got ${I(n)}. Ignoring.`);
1327
+ }, ne = (e, t) => Object.prototype.hasOwnProperty.call(e, t), V = (e, t) => {
1328
+ let n = "an array of ISO2 country code strings";
1329
+ if (!Array.isArray(t)) return B(e, n, t), !1;
1330
+ let r = [];
1331
+ for (let i of t) {
1332
+ if (typeof i != "string") return B(e, n, t), !1;
1333
+ m(i.toLowerCase()) ? r.push(i) : z(`Invalid country code in '${e}': '${i}'. Skipping.`);
1334
+ }
1335
+ return r;
1336
+ }, re = (e) => {
1337
+ if (e === void 0) return {};
1338
+ if (!L(e)) return z(`The second argument must be an options object; got ${I(e)}. Using defaults.`), {};
1339
+ let t = {};
1340
+ for (let [n, r] of Object.entries(e)) {
1341
+ if (!ne(F, n)) {
1342
+ z(`Unknown option '${n}'. Ignoring.`);
1343
+ continue;
1344
+ }
1345
+ switch (n) {
1346
+ case "allowDropdown":
1347
+ case "allowNumberExtensions":
1348
+ case "allowPhonewords":
1349
+ case "countrySearch":
1350
+ case "dropdownAlwaysOpen":
1351
+ case "fixDropdownWidth":
1352
+ case "formatAsYouType":
1353
+ case "formatOnDisplay":
1354
+ case "nationalMode":
1355
+ case "showFlags":
1356
+ case "separateDialCode":
1357
+ case "strictMode":
1358
+ case "useFullscreenPopup":
1359
+ if (typeof r != "boolean") {
1360
+ B(n, "a boolean", r);
1361
+ break;
1362
+ }
1363
+ t[n] = r;
1364
+ break;
1365
+ case "autoPlaceholder":
1366
+ if (typeof r != "string" || !R.has(r)) {
1367
+ B("autoPlaceholder", `one of ${Array.from(R).join(", ")}`, r);
1368
+ break;
1369
+ }
1370
+ t[n] = r;
1371
+ break;
1372
+ case "containerClass":
1373
+ case "searchInputClass":
1374
+ case "countryNameLocale":
1375
+ if (typeof r != "string") {
1376
+ B(n, "a string", r);
1377
+ break;
1378
+ }
1379
+ t[n] = r;
1380
+ break;
1381
+ case "countryOrder":
1382
+ if (r === null) t[n] = r;
1383
+ else {
1384
+ let e = V(n, r);
1385
+ e !== !1 && (t[n] = e);
1386
+ }
1387
+ break;
1388
+ case "customPlaceholder":
1389
+ case "geoIpLookup":
1390
+ case "hiddenInput":
1391
+ case "loadUtils":
1392
+ if (r !== null && !ee(r)) {
1393
+ B(n, "a function or null", r);
1394
+ break;
1395
+ }
1396
+ t[n] = r;
1397
+ break;
1398
+ case "dropdownContainer":
1399
+ if (r !== null && !te(r)) {
1400
+ B("dropdownContainer", "an HTMLElement or null", r);
1401
+ break;
1402
+ }
1403
+ t[n] = r;
1404
+ break;
1405
+ case "excludeCountries":
1406
+ case "onlyCountries":
1407
+ if (r === null) t[n] = r;
1408
+ else {
1409
+ let e = V(n, r);
1410
+ e !== !1 && (t[n] = e);
1411
+ }
1412
+ break;
1413
+ case "i18n":
1414
+ if (r && !L(r)) {
1415
+ B("i18n", "an object", r);
1416
+ break;
1417
+ }
1418
+ t[n] = r;
1419
+ break;
1420
+ case "initialCountry": {
1421
+ if (typeof r != "string") {
1422
+ B("initialCountry", "a string", r);
1423
+ break;
1424
+ }
1425
+ let e = r.toLowerCase();
1426
+ if (e && e !== O.AUTO && !m(e)) {
1427
+ B("initialCountry", "a valid ISO2 country code or 'auto'", r);
1428
+ break;
1429
+ }
1430
+ t[n] = r;
1431
+ break;
1432
+ }
1433
+ case "placeholderNumberType":
1434
+ if (typeof r != "string" || !k.has(r)) {
1435
+ B("placeholderNumberType", `one of ${Array.from(k).join(", ")}`, r);
1436
+ break;
1437
+ }
1438
+ t[n] = r;
1439
+ break;
1440
+ case "allowedNumberTypes":
1441
+ if (r !== null) {
1442
+ if (!Array.isArray(r)) {
1443
+ B("allowedNumberTypes", "an array of number types or null", r);
1444
+ break;
1445
+ }
1446
+ let e = !0;
1447
+ for (let t of r) if (typeof t != "string" || !k.has(t)) {
1448
+ B("allowedNumberTypes", `an array of valid number types (${Array.from(k).join(", ")})`, t), e = !1;
1449
+ break;
1450
+ }
1451
+ e && (t[n] = r);
1452
+ } else t[n] = null;
1453
+ break;
1454
+ }
1455
+ }
1456
+ return t;
1457
+ }, ie = (e) => {
1458
+ e.initialCountry &&= e.initialCountry.toLowerCase(), e.onlyCountries?.length && (e.onlyCountries = e.onlyCountries.map((e) => e.toLowerCase())), e.excludeCountries?.length && (e.excludeCountries = e.excludeCountries.map((e) => e.toLowerCase())), e.countryOrder &&= e.countryOrder.map((e) => e.toLowerCase());
1459
+ }, ae = (e) => {
1460
+ e.dropdownAlwaysOpen && (e.useFullscreenPopup = !1, e.allowDropdown = !0), e.useFullscreenPopup ? e.fixDropdownWidth = !1 : P() && (e.fixDropdownWidth = !0), e.onlyCountries?.length === 1 && (e.initialCountry = e.onlyCountries[0]), e.separateDialCode && (e.nationalMode = !1), e.allowDropdown && !e.showFlags && !e.separateDialCode && (e.nationalMode = !1), e.useFullscreenPopup && !e.dropdownContainer && (e.dropdownContainer = document.body), e.i18n = {
1461
+ ...M,
1462
+ ...e.i18n
1463
+ };
1464
+ }, H = (e) => e.replace(/\D/g, ""), U = (e = "") => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), oe = () => typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, se = (e, t) => {
1465
+ let n = U(t), r = [], i = [], a = [], o = [], s = [], c = [];
1466
+ for (let t of e) t.iso2 === n ? r.push(t) : t.normalisedName.startsWith(n) ? i.push(t) : t.normalisedName.includes(n) ? a.push(t) : n === t.dialCode || n === t.dialCodePlus ? o.push(t) : t.dialCodePlus.includes(n) ? s.push(t) : t.initials.includes(n) && c.push(t);
1467
+ let l = (e, t) => e.priority - t.priority;
1468
+ return [
1469
+ ...r,
1470
+ ...i,
1471
+ ...a,
1472
+ ...o.sort(l),
1473
+ ...s.sort(l),
1474
+ ...c
1475
+ ];
1476
+ }, ce = (e, t) => {
1477
+ let n = U(t);
1478
+ for (let t of e) if (t.normalisedName.startsWith(n)) return t;
1479
+ return null;
1480
+ }, W = (e) => Object.keys(e).filter((t) => !!e[t]).join(" "), G = (e, t, n) => {
1481
+ let r = document.createElement(e);
1482
+ return t && Object.entries(t).forEach(([e, t]) => r.setAttribute(e, t)), n && n.appendChild(r), r;
1483
+ }, le = () => `
1484
+ <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${j.HIDDEN}="true">
1485
+ <circle cx="11" cy="11" r="7" />
1486
+ <line x1="21" y1="21" x2="16.65" y2="16.65" />
1487
+ </svg>`, ue = (e) => {
1488
+ let t = `iti-${e}-clear-mask`;
1489
+ return `
1490
+ <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${j.HIDDEN}="true" focusable="false">
1491
+ <mask id="${t}" maskUnits="userSpaceOnUse">
1492
+ <rect width="16" height="16" fill="white" />
1493
+ <path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />
1494
+ </mask>
1495
+ <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />
1496
+ </svg>`;
1497
+ }, de = () => `
1498
+ <svg class="iti__country-check-svg" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" focusable="false" ${j.HIDDEN}="true">
1499
+ <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
1500
+ </svg>`, K = () => "\n <svg width=\"256\" height=\"256\" viewBox=\"0 0 512 512\" class=\"iti__globe-svg\">\n <path d=\"M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39\"/>\n <path d=\"m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40\"/>\n </svg>", q = class e {
1501
+ #e;
1502
+ #t;
1503
+ #n;
1504
+ #r = "";
1505
+ #i;
1506
+ #a = null;
1507
+ #o;
1508
+ #s;
1509
+ #c;
1510
+ #l;
1511
+ #u;
1512
+ #d;
1513
+ #f;
1514
+ #p;
1515
+ #m = null;
1516
+ telInput;
1517
+ countryContainer;
1518
+ selectedCountry;
1519
+ selectedCountryInner;
1520
+ searchInput;
1521
+ searchClearButton;
1522
+ countryList;
1523
+ hiddenInputPhone;
1524
+ hiddenInputCountry;
1525
+ highlightedItem = null;
1526
+ hadInitialPlaceholder;
1527
+ constructor(e, t, n) {
1528
+ e.dataset.intlTelInputId = n.toString(), this.telInput = e, this.#e = t, this.#t = n, this.hadInitialPlaceholder = !!e.getAttribute("placeholder"), this.#n = !!this.telInput.closest("[dir=rtl]"), this.#e.separateDialCode && (this.#r = this.telInput.style.paddingLeft);
1529
+ }
1530
+ static validateInput(e) {
1531
+ let t = e?.tagName;
1532
+ if (!(e && typeof e == "object" && t === "INPUT" && typeof e.setAttribute == "function")) {
1533
+ let t = Object.prototype.toString.call(e);
1534
+ throw TypeError(`The first argument must be an HTMLInputElement, not ${t}`);
1535
+ }
1536
+ }
1537
+ generateMarkup(e) {
1538
+ this.#i = e, this.telInput.classList.add("iti__tel-input"), this.telInput.hasAttribute("type") || this.telInput.setAttribute("type", "tel"), this.telInput.hasAttribute("autocomplete") || this.telInput.setAttribute("autocomplete", "tel"), this.telInput.hasAttribute("inputmode") || this.telInput.setAttribute("inputmode", "tel");
1539
+ let t = this.#h();
1540
+ this.#g(t), t.appendChild(this.telInput), this.#b(), this.#x(t);
1541
+ }
1542
+ #h() {
1543
+ let { allowDropdown: e, showFlags: t, containerClass: n, useFullscreenPopup: r } = this.#e, i = G("div", { class: W({
1544
+ iti: !0,
1545
+ "iti--allow-dropdown": e,
1546
+ "iti--show-flags": t,
1547
+ "iti--inline-dropdown": !r,
1548
+ [n]: !!n
1549
+ }) });
1550
+ return this.#n && i.setAttribute("dir", "ltr"), this.telInput.before(i), i;
1551
+ }
1552
+ #g(e) {
1553
+ let { allowDropdown: t, separateDialCode: n, showFlags: r } = this.#e;
1554
+ if (t || r || n) {
1555
+ this.countryContainer = G("div", { class: `iti__country-container ${_.V_HIDE}` }, e), t ? (this.selectedCountry = G("button", {
1556
+ type: "button",
1557
+ class: "iti__selected-country",
1558
+ [j.EXPANDED]: "false",
1559
+ [j.LABEL]: this.#e.i18n.noCountrySelected,
1560
+ [j.HASPOPUP]: "dialog",
1561
+ [j.CONTROLS]: `iti-${this.#t}__dropdown-content`
1562
+ }, this.countryContainer), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = G("div", { class: "iti__selected-country" }, this.countryContainer);
1563
+ let r = G("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
1564
+ this.selectedCountryInner = G("div", { class: _.FLAG }, r), t && (this.#c = G("div", {
1565
+ class: "iti__arrow",
1566
+ [j.HIDDEN]: "true"
1567
+ }, r)), n && (this.#s = G("div", { class: "iti__selected-dial-code" }, this.selectedCountry)), t && this.#v();
1568
+ }
1569
+ }
1570
+ #_() {
1571
+ let { fixDropdownWidth: e } = this.#e;
1572
+ if (e && !this.#l.style.width) {
1573
+ let e = this.telInput.offsetWidth;
1574
+ e > 0 && (this.#l.style.width = `${e}px`);
1575
+ }
1576
+ }
1577
+ #v() {
1578
+ let { fixDropdownWidth: e, useFullscreenPopup: t, countrySearch: n, i18n: r, dropdownContainer: i, containerClass: a } = this.#e, o = e ? "" : "iti--flexible-dropdown-width";
1579
+ this.#l = G("div", {
1580
+ id: `iti-${this.#t}__dropdown-content`,
1581
+ class: `iti__dropdown-content ${_.HIDE} ${o}`,
1582
+ role: "dialog",
1583
+ [j.MODAL]: "true"
1584
+ }), this.#n && this.#l.setAttribute("dir", "rtl"), n && this.#y(), this.countryList = G("ul", {
1585
+ class: "iti__country-list",
1586
+ id: `iti-${this.#t}__country-listbox`,
1587
+ role: "listbox",
1588
+ [j.LABEL]: r.countryListAriaLabel
1589
+ }, this.#l), this.#S(), n && this.#D(), t || (this.#_(), this.#o = this.#E(), n && (this.#l.style.height = `${this.#o}px`)), i ? (this.#p = G("div", { class: W({
1590
+ iti: !0,
1591
+ "iti--container": !0,
1592
+ "iti--fullscreen-popup": t,
1593
+ "iti--inline-dropdown": !t,
1594
+ [a]: !!a
1595
+ }) }), this.#p.appendChild(this.#l)) : this.countryContainer.appendChild(this.#l);
1596
+ }
1597
+ #y() {
1598
+ let { i18n: e, searchInputClass: t } = this.#e, n = G("div", { class: "iti__search-input-wrapper" }, this.#l);
1599
+ this.#u = G("span", {
1600
+ class: "iti__search-icon",
1601
+ [j.HIDDEN]: "true"
1602
+ }, n), this.#u.innerHTML = le(), this.searchInput = G("input", {
1603
+ id: `iti-${this.#t}__search-input`,
1604
+ type: "search",
1605
+ class: `iti__search-input ${t}`,
1606
+ placeholder: e.searchPlaceholder,
1607
+ role: "combobox",
1608
+ [j.EXPANDED]: "true",
1609
+ [j.LABEL]: e.searchPlaceholder,
1610
+ [j.CONTROLS]: `iti-${this.#t}__country-listbox`,
1611
+ [j.AUTOCOMPLETE]: "list",
1612
+ autocomplete: "off"
1613
+ }, n), this.searchClearButton = G("button", {
1614
+ type: "button",
1615
+ class: `iti__search-clear ${_.HIDE}`,
1616
+ [j.LABEL]: e.clearSearchAriaLabel,
1617
+ tabindex: "-1"
1618
+ }, n), this.searchClearButton.innerHTML = ue(this.#t), this.#f = G("span", { class: "iti__a11y-text" }, this.#l), this.#d = G("div", {
1619
+ class: `iti__no-results ${_.HIDE}`,
1620
+ [j.HIDDEN]: "true"
1621
+ }, this.#l), this.#d.textContent = e.searchEmptyState ?? null;
1622
+ }
1623
+ #b() {
1624
+ this.countryContainer && (this.#C(), this.countryContainer.classList.remove(_.V_HIDE));
1625
+ }
1626
+ #x(e) {
1627
+ let { hiddenInput: t } = this.#e;
1628
+ if (t) {
1629
+ let n = t(this.telInput.getAttribute("name") || "");
1630
+ if (n.phone) {
1631
+ let t = this.telInput.form?.querySelector(`input[name="${n.phone}"]`);
1632
+ t ? this.hiddenInputPhone = t : (this.hiddenInputPhone = G("input", {
1633
+ type: "hidden",
1634
+ name: n.phone
1635
+ }), e.appendChild(this.hiddenInputPhone));
1636
+ }
1637
+ if (n.country) {
1638
+ let t = this.telInput.form?.querySelector(`input[name="${n.country}"]`);
1639
+ t ? this.hiddenInputCountry = t : (this.hiddenInputCountry = G("input", {
1640
+ type: "hidden",
1641
+ name: n.country
1642
+ }), e.appendChild(this.hiddenInputCountry));
1643
+ }
1644
+ }
1645
+ }
1646
+ #S() {
1647
+ let e = document.createDocumentFragment();
1648
+ for (let t = 0; t < this.#i.length; t++) {
1649
+ let n = this.#i[t], r = W({ [_.COUNTRY_ITEM]: !0 }), i = G("li", {
1650
+ id: `iti-${this.#t}__item-${n.iso2}`,
1651
+ class: r,
1652
+ tabindex: "-1",
1653
+ role: "option",
1654
+ [j.SELECTED]: "false"
1655
+ });
1656
+ i.dataset.dialCode = n.dialCode, i.dataset.countryCode = n.iso2, n.nodeById[this.#t] = i, this.#e.showFlags && G("div", { class: `${_.FLAG} iti__${n.iso2}` }, i);
1657
+ let a = G("span", { class: "iti__country-name" }, i);
1658
+ a.textContent = `${n.name} `;
1659
+ let o = G("span", { class: "iti__dial-code" }, a);
1660
+ this.#n && o.setAttribute("dir", "ltr"), o.textContent = `(+${n.dialCode})`, e.appendChild(i);
1661
+ }
1662
+ this.countryList.appendChild(e);
1663
+ }
1664
+ #C() {
1665
+ if (this.selectedCountry) {
1666
+ let e = this.#e.separateDialCode ? C.SANE_SELECTED_WITH_DIAL_WIDTH : C.SANE_SELECTED_NO_DIAL_WIDTH, t = (this.selectedCountry.offsetWidth || this.#T() || e) + C.INPUT_PADDING_EXTRA_LEFT;
1667
+ this.telInput.style.paddingLeft = `${t}px`;
1668
+ }
1669
+ }
1670
+ static #w() {
1671
+ let e;
1672
+ try {
1673
+ e = window.top.document.body;
1674
+ } catch {
1675
+ e = document.body;
1676
+ }
1677
+ return e;
1678
+ }
1679
+ #T() {
1680
+ if (this.telInput.parentNode) {
1681
+ let t = e.#w(), n = this.telInput.parentNode.cloneNode(!1);
1682
+ n.style.visibility = "hidden", t.appendChild(n);
1683
+ let r = this.countryContainer.cloneNode();
1684
+ n.appendChild(r);
1685
+ let i = this.selectedCountry.cloneNode(!0);
1686
+ r.appendChild(i);
1687
+ let a = i.offsetWidth;
1688
+ return t.removeChild(n), a;
1689
+ }
1690
+ return 0;
1691
+ }
1692
+ #E() {
1693
+ let t = e.#w();
1694
+ this.#l.classList.remove(_.HIDE);
1695
+ let n = G("div", { class: "iti iti--inline-dropdown" });
1696
+ n.appendChild(this.#l), n.style.visibility = "hidden", t.appendChild(n);
1697
+ let r = this.#l.offsetHeight;
1698
+ return t.removeChild(n), n.style.visibility = "", this.#l.classList.add(_.HIDE), r > 0 ? r : C.SANE_DROPDOWN_HEIGHT;
1699
+ }
1700
+ #D() {
1701
+ let { i18n: e } = this.#e, t = this.countryList.childElementCount;
1702
+ this.#f.textContent = e.searchSummaryAria(t);
1703
+ }
1704
+ filterCountriesByQuery(e) {
1705
+ let t;
1706
+ t = e === "" ? this.#i : se(this.#i, e), this.#A(t);
1707
+ }
1708
+ #O() {
1709
+ let e = this.searchInput.value.trim();
1710
+ this.filterCountriesByQuery(e), this.searchInput.value ? this.searchClearButton.classList.remove(_.HIDE) : this.searchClearButton.classList.add(_.HIDE);
1711
+ }
1712
+ handleSearchChange() {
1713
+ this.#a && clearTimeout(this.#a), this.#a = setTimeout(() => {
1714
+ this.#O(), this.#a = null;
1715
+ }, x.SEARCH_DEBOUNCE_MS);
1716
+ }
1717
+ handleSearchClear() {
1718
+ this.searchInput.value = "", this.searchInput.focus(), this.#O();
1719
+ }
1720
+ scrollCountryListToItem(e) {
1721
+ let t = this.countryList, n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = r.top - n.top + t.scrollTop;
1722
+ r.top < n.top ? t.scrollTop = i : r.bottom > n.bottom && (t.scrollTop = i - n.height + r.height);
1723
+ }
1724
+ highlightListItem(e, t) {
1725
+ let n = this.highlightedItem;
1726
+ if (n && n.classList.remove(_.HIGHLIGHT), this.highlightedItem = e, this.highlightedItem) {
1727
+ if (this.highlightedItem.classList.add(_.HIGHLIGHT), this.#e.countrySearch) {
1728
+ let e = this.highlightedItem.getAttribute("id") || "";
1729
+ this.searchInput.setAttribute(j.ACTIVE_DESCENDANT, e);
1730
+ }
1731
+ t && this.highlightedItem.focus();
1732
+ }
1733
+ }
1734
+ handleUpDownKey(e) {
1735
+ let t = e === v.ARROW_UP ? this.highlightedItem?.previousElementSibling : this.highlightedItem?.nextElementSibling;
1736
+ !t && this.countryList.childElementCount > 1 && (t = e === v.ARROW_UP ? this.countryList.lastElementChild : this.countryList.firstElementChild), t && (this.scrollCountryListToItem(t), this.highlightListItem(t, !1));
1737
+ }
1738
+ #k(e) {
1739
+ if (this.#m && this.#m.dataset.countryCode !== e && (this.#m.setAttribute(j.SELECTED, "false"), this.#m.querySelector(".iti__country-check")?.remove(), this.#m = null), e && !this.#m) {
1740
+ let t = this.countryList.querySelector(`[data-country-code="${e}"]`);
1741
+ if (t) {
1742
+ t.setAttribute(j.SELECTED, "true");
1743
+ let e = G("span", {
1744
+ class: "iti__country-check",
1745
+ [j.HIDDEN]: "true"
1746
+ }, t);
1747
+ e.innerHTML = de(), this.#m = t;
1748
+ }
1749
+ }
1750
+ }
1751
+ #A(e) {
1752
+ this.countryList.replaceChildren();
1753
+ let t = !0;
1754
+ for (let n of e) {
1755
+ let e = n.nodeById[this.#t];
1756
+ e && (this.countryList.appendChild(e), t &&= (this.highlightListItem(e, !1), !1));
1757
+ }
1758
+ t ? (this.highlightListItem(null, !1), this.#d && this.#d.classList.remove(_.HIDE)) : this.#d && this.#d.classList.add(_.HIDE), this.countryList.scrollTop = 0, this.#D();
1759
+ }
1760
+ destroy() {
1761
+ this.telInput.iti = void 0, delete this.telInput.dataset.intlTelInputId, this.#e.separateDialCode && (this.telInput.style.paddingLeft = this.#r);
1762
+ let e = this.telInput.parentNode;
1763
+ e.before(this.telInput), e.remove();
1764
+ for (let e of this.#i) delete e.nodeById[this.#t];
1765
+ }
1766
+ openDropdown() {
1767
+ let { countrySearch: e, dropdownAlwaysOpen: t, dropdownContainer: n } = this.#e;
1768
+ if (this.#_(), n) this.#M();
1769
+ else {
1770
+ let e = this.#j(), t = this.telInput.offsetHeight + C.DROPDOWN_MARGIN;
1771
+ e ? this.#l.style.top = `${t}px` : this.#l.style.bottom = `${t}px`;
1772
+ }
1773
+ if (this.#l.classList.remove(_.HIDE), this.selectedCountry.setAttribute(j.EXPANDED, "true"), e) {
1774
+ let e = this.#m ?? this.countryList.firstElementChild;
1775
+ e && (this.highlightListItem(e, !1), this.scrollCountryListToItem(e)), t || this.searchInput.focus();
1776
+ }
1777
+ this.#c.classList.add(_.ARROW_UP);
1778
+ }
1779
+ closeDropdown() {
1780
+ let { countrySearch: e, dropdownContainer: t } = this.#e;
1781
+ this.#l.classList.add(_.HIDE), this.selectedCountry.setAttribute(j.EXPANDED, "false"), e && (this.searchInput.removeAttribute(j.ACTIVE_DESCENDANT), this.searchInput.value = "", this.#O(), this.highlightedItem &&= (this.highlightedItem.classList.remove(_.HIGHLIGHT), null)), this.#c.classList.remove(_.ARROW_UP), t ? (this.#p.remove(), this.#p.style.top = "", this.#p.style.bottom = "", this.#p.style.paddingLeft = "", this.#p.style.paddingRight = "") : (this.#l.style.top = "", this.#l.style.bottom = "");
1782
+ }
1783
+ #j() {
1784
+ if (this.#e.dropdownAlwaysOpen) return !0;
1785
+ let e = this.telInput.getBoundingClientRect(), t = e.top, n = window.innerHeight - e.bottom;
1786
+ return n >= this.#o || n >= t;
1787
+ }
1788
+ #M() {
1789
+ let { dropdownContainer: e, useFullscreenPopup: t } = this.#e;
1790
+ if (t) {
1791
+ if (window.innerWidth >= C.NARROW_VIEWPORT_WIDTH) {
1792
+ let e = this.telInput.getBoundingClientRect();
1793
+ this.#p.style.paddingLeft = `${e.left}px`, this.#p.style.paddingRight = `${window.innerWidth - e.right}px`;
1794
+ }
1795
+ } else {
1796
+ let e = this.telInput.getBoundingClientRect();
1797
+ this.#p.style.left = `${e.left}px`, this.#j() ? this.#p.style.top = `${e.bottom + C.DROPDOWN_MARGIN}px` : (this.#p.style.top = "unset", this.#p.style.bottom = `${window.innerHeight - e.top + C.DROPDOWN_MARGIN}px`);
1798
+ }
1799
+ e.appendChild(this.#p);
1800
+ }
1801
+ isDropdownClosed() {
1802
+ return this.#l.classList.contains(_.HIDE);
1803
+ }
1804
+ setCountry(e) {
1805
+ let { allowDropdown: t, showFlags: n, separateDialCode: r, i18n: i } = this.#e, a = e?.name, o = e?.dialCode, s = e?.iso2 ?? "";
1806
+ if (t && this.#k(s), this.selectedCountry) {
1807
+ let e = s && n ? `${_.FLAG} iti__${s}` : `${_.FLAG} ${_.GLOBE}`, t, r, c;
1808
+ s ? (r = a, t = i.selectedCountryAriaLabel.replace("${countryName}", a).replace("${dialCode}", `+${o}`), c = n ? "" : K()) : (r = i.noCountrySelected, t = i.noCountrySelected, c = K()), this.selectedCountryInner.className = e, this.selectedCountry.setAttribute("title", r), this.selectedCountry.setAttribute(j.LABEL, t), this.selectedCountryInner.innerHTML = c;
1809
+ }
1810
+ if (r) {
1811
+ let e = o ? `+${o}` : "";
1812
+ this.#s.textContent = e, this.#C();
1813
+ }
1814
+ }
1815
+ }, fe = (e) => {
1816
+ let { onlyCountries: t, excludeCountries: n } = e;
1817
+ return t?.length ? h.filter((e) => t.includes(e.iso2)) : n?.length ? h.filter((e) => !n.includes(e.iso2)) : h;
1818
+ }, pe = (e, t) => {
1819
+ let { countryNameLocale: n, i18n: r } = t, i;
1820
+ try {
1821
+ i = typeof Intl < "u" && typeof Intl.DisplayNames == "function" ? new Intl.DisplayNames(n, { type: "region" }) : null;
1822
+ } catch (e) {
1823
+ console.error(e), i = null;
1824
+ }
1825
+ for (let t of e) t.name = r[t.iso2] || i?.of(t.iso2.toUpperCase()) || "";
1826
+ }, me = (e) => {
1827
+ let t = /* @__PURE__ */ new Set(), n = 0, r = {}, i = (e, t) => {
1828
+ if (!e || !t) return;
1829
+ t.length > n && (n = t.length), r.hasOwnProperty(t) || (r[t] = []);
1830
+ let i = r[t];
1831
+ i.includes(e) || i.push(e);
1832
+ }, a = [...e].sort((e, t) => e.priority - t.priority);
1833
+ for (let e of a) {
1834
+ t.has(e.dialCode) || t.add(e.dialCode);
1835
+ for (let t = 1; t < e.dialCode.length; t++) {
1836
+ let n = e.dialCode.substring(0, t);
1837
+ i(e.iso2, n);
1838
+ }
1839
+ if (i(e.iso2, e.dialCode), e.areaCodes) {
1840
+ let t = r[e.dialCode][0];
1841
+ for (let n of e.areaCodes) {
1842
+ for (let r = 1; r < n.length; r++) {
1843
+ let a = n.substring(0, r), o = e.dialCode + a;
1844
+ i(t, o), i(e.iso2, o);
1845
+ }
1846
+ i(e.iso2, e.dialCode + n);
1847
+ }
1848
+ }
1849
+ }
1850
+ return {
1851
+ dialCodes: t,
1852
+ dialCodeMaxLen: n,
1853
+ dialCodeToIso2Map: r
1854
+ };
1855
+ }, he = (e, t) => {
1856
+ let { countryOrder: n } = t;
1857
+ e.sort((e, t) => {
1858
+ if (n) {
1859
+ let r = n.indexOf(e.iso2), i = n.indexOf(t.iso2), a = r > -1, o = i > -1;
1860
+ if (a || o) return a && o ? r - i : a ? -1 : 1;
1861
+ }
1862
+ return e.name.localeCompare(t.name);
1863
+ });
1864
+ }, ge = (e) => {
1865
+ for (let t of e) t.normalisedName = U(t.name), t.initials = t.normalisedName.split(/[^a-z]/).map((e) => e[0]).join(""), t.dialCodePlus = `+${t.dialCode}`;
1866
+ }, _e = /* @__PURE__ */ new Set([
1867
+ "800",
1868
+ "808",
1869
+ "870",
1870
+ "881",
1871
+ "882",
1872
+ "883",
1873
+ "888",
1874
+ "979"
1875
+ ]), J = (e) => {
1876
+ let t = H(e).slice(0, 3);
1877
+ return e.startsWith("+") && _e.has(t);
1878
+ }, Y = (e, t, n, r) => {
1879
+ let i = e;
1880
+ if (n && t) {
1881
+ let e = `+${r.dialCode}`, t = i[e.length] === " " || i[e.length] === "-" ? e.length + 1 : e.length;
1882
+ i = i.substring(t);
1883
+ }
1884
+ return i;
1885
+ }, ve = (e, t, n, r, i) => {
1886
+ let a = n ? n.formatNumberAsYouType(e, r?.iso2) : e, o = r?.dialCode;
1887
+ return i && t.charAt(0) !== "+" && a.includes(`+${o}`) ? (a.split(`+${o}`)[1] || "").trim() : a;
1888
+ }, ye = (e, t, n, r) => {
1889
+ if (n === 0 && !r) return 0;
1890
+ let i = 0;
1891
+ for (let n = 0; n < t.length; n++) {
1892
+ if (/[+0-9]/.test(t[n]) && i++, i === e && !r) return n + 1;
1893
+ if (r && i === e + 1) return n;
1894
+ }
1895
+ return t.length;
1896
+ }, be = /* @__PURE__ */ new Set([
1897
+ "800",
1898
+ "822",
1899
+ "833",
1900
+ "844",
1901
+ "855",
1902
+ "866",
1903
+ "877",
1904
+ "880",
1905
+ "881",
1906
+ "882",
1907
+ "883",
1908
+ "884",
1909
+ "885",
1910
+ "886",
1911
+ "887",
1912
+ "888",
1913
+ "889"
1914
+ ]), xe = (e) => {
1915
+ let t = H(e);
1916
+ if (t.startsWith(w.NANP) && t.length >= 4) {
1917
+ let e = t.substring(1, 4);
1918
+ return be.has(e);
1919
+ }
1920
+ return !1;
1921
+ }, Se = class {
1922
+ #e;
1923
+ constructor(e) {
1924
+ e && this.#t(e);
1925
+ }
1926
+ #t(e) {
1927
+ /[\u0660-\u0669]/.test(e) ? this.#e = "arabic-indic" : /[\u06F0-\u06F9]/.test(e) ? this.#e = "persian" : this.#e = "ascii";
1928
+ }
1929
+ denormalise(e) {
1930
+ if (!this.#e || this.#e === "ascii") return e;
1931
+ let t = this.#e === "arabic-indic" ? 1632 : 1776;
1932
+ return e.replace(/[0-9]/g, (e) => String.fromCharCode(t + Number(e)));
1933
+ }
1934
+ normalise(e) {
1935
+ if (!e) return "";
1936
+ if (this.#t(e), this.#e === "ascii") return e;
1937
+ let t = this.#e === "arabic-indic" ? 1632 : 1776, n = this.#e === "arabic-indic" ? /[\u0660-\u0669]/g : /[\u06F0-\u06F9]/g;
1938
+ return e.replace(n, (e) => String.fromCharCode(48 + (e.charCodeAt(0) - t)));
1939
+ }
1940
+ isAscii() {
1941
+ return !this.#e || this.#e === "ascii";
1942
+ }
1943
+ }, Ce = 0, X = (e) => {
1944
+ if (!Q.utils) throw Error(`intlTelInput.utils is required for ${e}(). See: https://intl-tel-input.com/docs/utils`);
1945
+ }, we = () => {
1946
+ let e, t;
1947
+ return {
1948
+ promise: new Promise((n, r) => {
1949
+ e = n, t = r;
1950
+ }),
1951
+ resolve: e,
1952
+ reject: t
1953
+ };
1954
+ }, Z = class e {
1955
+ id;
1956
+ promise;
1957
+ #e;
1958
+ #t;
1959
+ #n;
1960
+ #r;
1961
+ #i;
1962
+ #a;
1963
+ #o;
1964
+ #s;
1965
+ #c = null;
1966
+ #l = null;
1967
+ #u;
1968
+ #d = !1;
1969
+ #f;
1970
+ #p = null;
1971
+ #m;
1972
+ #h;
1973
+ #g;
1974
+ constructor(e, t = {}) {
1975
+ this.id = Ce++, q.validateInput(e);
1976
+ let n = re(t);
1977
+ this.#t = {
1978
+ ...F,
1979
+ ...n
1980
+ }, ie(this.#t), ae(this.#t), this.#e = new q(e, this.#t, this.id), this.#n = oe(), this.#m = new Se(e.value), this.promise = this.#y(this.#t), this.#r = fe(this.#t);
1981
+ let { dialCodes: r, dialCodeMaxLen: i, dialCodeToIso2Map: a } = me(this.#r);
1982
+ this.#o = r, this.#i = i, this.#a = a, this.#s = new Map(this.#r.map((e) => [e.iso2, e])), this.#b();
1983
+ }
1984
+ #_() {
1985
+ let e = this.#e.telInput.value.trim();
1986
+ return this.#m.normalise(e);
1987
+ }
1988
+ #v(e) {
1989
+ this.#e.telInput.value = this.#m.denormalise(e);
1990
+ }
1991
+ #y(e) {
1992
+ let { initialCountry: t, geoIpLookup: n, loadUtils: r } = e, i = t === O.AUTO && !!n, a = !!r && !Q.utils;
1993
+ return i && (this.#h = we()), a && (this.#g = we()), Promise.all([this.#h?.promise, this.#g?.promise]).then(() => {});
1994
+ }
1995
+ #b() {
1996
+ this.#f = new AbortController(), this.#x(), this.#e.generateMarkup(this.#r), this.#S(), this.#C(), this.#E(), this.#t.dropdownAlwaysOpen && this.#F();
1997
+ }
1998
+ #x() {
1999
+ pe(this.#r, this.#t), he(this.#r, this.#t), ge(this.#r);
2000
+ }
2001
+ #S(e = !1) {
2002
+ let t = this.#e.telInput.getAttribute("value"), n = this.#m.normalise(t ?? ""), r = this.#_(), i = n && n.startsWith("+") && (!r || !r.startsWith("+")) ? n : r, a = this.#ee(i), o = xe(i), { initialCountry: s, geoIpLookup: c } = this.#t, l = s === O.AUTO && c && !e, u = m(s);
2003
+ a ? o ? u ? this.#J(s) : l || this.#J(E.ISO2) : this.#G(i) : u ? this.#J(s) : l || this.#J(""), i && this.#W(i);
2004
+ }
2005
+ #C() {
2006
+ this.#k(), this.#t.allowDropdown && this.#T(), (this.#e.hiddenInputPhone || this.#e.hiddenInputCountry) && this.#e.telInput.form && this.#w();
2007
+ }
2008
+ #w() {
2009
+ this.#e.telInput.form?.addEventListener("submit", () => {
2010
+ this.#e.hiddenInputPhone && (this.#e.hiddenInputPhone.value = this.getNumber()), this.#e.hiddenInputCountry && (this.#e.hiddenInputCountry.value = this.#c?.iso2 || "");
2011
+ }, { signal: this.#f.signal });
2012
+ }
2013
+ #T() {
2014
+ let e = this.#f.signal, t = (e) => {
2015
+ this.#e.isDropdownClosed() ? this.#e.telInput.focus() : e.preventDefault();
2016
+ }, n = this.#e.telInput.closest("label");
2017
+ n && n.addEventListener("click", t, { signal: e }), this.#e.selectedCountry.addEventListener("click", () => {
2018
+ this.#e.isDropdownClosed() && !this.#e.telInput.disabled && !this.#e.telInput.readOnly && this.#F();
2019
+ }, { signal: e }), this.#e.countryContainer.addEventListener("keydown", (e) => {
2020
+ let t = [
2021
+ v.ARROW_UP,
2022
+ v.ARROW_DOWN,
2023
+ v.SPACE,
2024
+ v.ENTER
2025
+ ];
2026
+ this.#e.isDropdownClosed() && t.includes(e.key) && (e.preventDefault(), e.stopPropagation(), this.#F()), e.key === v.TAB && this.#Q();
2027
+ }, { signal: e });
2028
+ }
2029
+ #E() {
2030
+ let { loadUtils: e, initialCountry: t, geoIpLookup: n } = this.#t;
2031
+ if (e && !Q.utils) {
2032
+ let t = () => {
2033
+ Q.attachUtils(e)?.catch(() => {});
2034
+ };
2035
+ Q.documentReady() ? t() : window.addEventListener("load", t, { signal: this.#f.signal });
2036
+ } else this.#g?.resolve();
2037
+ t === O.AUTO && n && (this.#c ? this.#h?.resolve() : this.#D());
2038
+ }
2039
+ #D() {
2040
+ Q.autoCountry ? this.#ae() : (this.#e.selectedCountryInner.classList.add(_.LOADING), Q.startedLoadingAutoCountry || (Q.startedLoadingAutoCountry = !0, typeof this.#t.geoIpLookup == "function" && this.#t.geoIpLookup((t = "") => {
2041
+ this.#e.selectedCountryInner.classList.remove(_.LOADING);
2042
+ let n = t.toLowerCase();
2043
+ m(n) ? (Q.autoCountry = n, setTimeout(() => e.forEachInstance("handleAutoCountry"))) : e.forEachInstance("handleAutoCountryFailure");
2044
+ }, () => {
2045
+ this.#e.selectedCountryInner.classList.remove(_.LOADING), e.forEachInstance("handleAutoCountryFailure");
2046
+ })));
2047
+ }
2048
+ #O() {
2049
+ this.#F(), this.#e.searchInput.value = "+", this.#e.filterCountriesByQuery("");
2050
+ }
2051
+ #k() {
2052
+ this.#A(), this.#j(), this.#M();
2053
+ }
2054
+ #A() {
2055
+ let { strictMode: e, formatAsYouType: t, separateDialCode: n, allowDropdown: r, countrySearch: i } = this.#t, a = !1;
2056
+ b.ALPHA_UNICODE.test(this.#_()) && (a = !0), this.#e.telInput.addEventListener("input", (o) => {
2057
+ let s = this.#_();
2058
+ if (this.#n && o?.data === "+" && n && r && i) {
2059
+ let e = this.#e.telInput.selectionStart || 0, t = s.substring(0, e - 1), n = s.substring(e);
2060
+ this.#v(t + n), this.#O();
2061
+ return;
2062
+ }
2063
+ this.#G(s) && this.#ie();
2064
+ let c = o?.data && b.NON_PLUS_NUMERIC.test(o.data), l = o?.inputType === y.PASTE && s;
2065
+ c || l && !e ? a = !0 : b.NON_PLUS_NUMERIC.test(s) || (a = !1);
2066
+ let u = o?.detail && o.detail.isSetNumber, d = this.#m.isAscii();
2067
+ if (t && !a && !u && d) {
2068
+ let e = this.#e.telInput.selectionStart || 0, t = s.substring(0, e).replace(b.NON_PLUS_NUMERIC_GLOBAL, "").length, r = o?.inputType === y.DELETE_FWD, i = ve(this.#te(), s, Q.utils, this.#c, n), a = ye(t, i, e, r);
2069
+ this.#v(i), this.#e.telInput.setSelectionRange(a, a);
2070
+ }
2071
+ if (n && s.startsWith("+") && this.#c?.dialCode) {
2072
+ let e = Y(s, !0, n, this.#c);
2073
+ this.#v(e);
2074
+ }
2075
+ }, { signal: this.#f.signal });
2076
+ }
2077
+ #j() {
2078
+ let { strictMode: e, separateDialCode: t, allowDropdown: n, countrySearch: r } = this.#t;
2079
+ (e || t) && this.#e.telInput.addEventListener("keydown", (i) => {
2080
+ if (i.key && i.key.length === 1 && !i.altKey && !i.ctrlKey && !i.metaKey) {
2081
+ if (t && n && r && i.key === "+") {
2082
+ i.preventDefault(), this.#O();
2083
+ return;
2084
+ }
2085
+ if (e) {
2086
+ let e = this.#_(), n = !e.startsWith("+") && this.#e.telInput.selectionStart === 0 && i.key === "+", r = this.#m.normalise(i.key), a = /^[0-9]$/.test(r), o = t ? a : n || a, s = this.#e.telInput, c = s.selectionStart, l = s.selectionEnd, u = e.slice(0, c ?? void 0), d = e.slice(l ?? void 0), f = u + i.key + d, p = this.#te(f), m = !1;
2087
+ Q.utils && this.#l && (m = Q.utils.getCoreNumber(p, this.#c?.iso2).length > this.#l);
2088
+ let h = this.#q(p) !== null;
2089
+ (!o || m && !h && !n) && i.preventDefault();
2090
+ }
2091
+ }
2092
+ }, { signal: this.#f.signal });
2093
+ }
2094
+ #M() {
2095
+ this.#t.strictMode && this.#e.telInput.addEventListener("paste", (e) => {
2096
+ e.preventDefault();
2097
+ let t = this.#e.telInput, n = t.selectionStart, r = t.selectionEnd, i = this.#_(), a = i.slice(0, n ?? void 0), o = i.slice(r ?? void 0), s = this.#c?.iso2, c = e.clipboardData.getData("text"), l = this.#m.normalise(c), u = n === 0 && r > 0, d = !i.startsWith("+") || u, f = l.replace(b.NON_PLUS_NUMERIC_GLOBAL, ""), p = f.startsWith("+"), m = f.replace(/\+/g, ""), h = p && d ? `+${m}` : m, g = a + h + o;
2098
+ if (g.length > 5 && Q.utils) {
2099
+ let e = Q.utils.getCoreNumber(g, s);
2100
+ for (; e.length === 0 && g.length > 0;) g = g.slice(0, -1), e = Q.utils.getCoreNumber(g, s);
2101
+ if (!e) return;
2102
+ if (this.#l && e.length > this.#l) if (t.selectionEnd === i.length) {
2103
+ let t = e.length - this.#l;
2104
+ g = g.slice(0, g.length - t);
2105
+ } else return;
2106
+ }
2107
+ this.#v(g);
2108
+ let _ = n + h.length;
2109
+ t.setSelectionRange(_, _), t.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
2110
+ }, { signal: this.#f.signal });
2111
+ }
2112
+ #N(e) {
2113
+ let t = Number(this.#e.telInput.getAttribute("maxlength"));
2114
+ return t && e.length > t ? e.substring(0, t) : e;
2115
+ }
2116
+ #P(e, t = {}) {
2117
+ let n = new CustomEvent(e, {
2118
+ bubbles: !0,
2119
+ cancelable: !0,
2120
+ detail: t
2121
+ });
2122
+ this.#e.telInput.dispatchEvent(n);
2123
+ }
2124
+ #F() {
2125
+ let { dropdownContainer: e, useFullscreenPopup: t } = this.#t;
2126
+ this.#p = new AbortController(), this.#e.openDropdown(), !t && e && window.addEventListener("scroll", () => this.#Q(), { signal: this.#p.signal }), this.#I(), this.#P(g.OPEN_COUNTRY_DROPDOWN);
2127
+ }
2128
+ #I() {
2129
+ let e = this.#p.signal;
2130
+ this.#L(e), this.#R(e), this.#t.dropdownAlwaysOpen || this.#z(e), this.#B(e), this.#t.countrySearch && this.#V(e);
2131
+ }
2132
+ #L(e) {
2133
+ this.#e.countryList.addEventListener("mouseover", (e) => {
2134
+ let t = e.target?.closest(`.${_.COUNTRY_ITEM}`);
2135
+ t && this.#e.highlightListItem(t, !1);
2136
+ }, { signal: e });
2137
+ }
2138
+ #R(e) {
2139
+ this.#e.countryList.addEventListener("click", (e) => {
2140
+ let t = e.target?.closest(`.${_.COUNTRY_ITEM}`);
2141
+ t && this.#Z(t);
2142
+ }, { signal: e });
2143
+ }
2144
+ #z(e) {
2145
+ let t = (e) => {
2146
+ e.target.closest(`#iti-${this.id}__dropdown-content`) || this.#Q();
2147
+ };
2148
+ setTimeout(() => {
2149
+ document.documentElement.addEventListener("click", t, { signal: e });
2150
+ }, 0);
2151
+ }
2152
+ #B(e) {
2153
+ let t = "", n = null;
2154
+ document.addEventListener("keydown", (e) => {
2155
+ [
2156
+ v.ARROW_UP,
2157
+ v.ARROW_DOWN,
2158
+ v.ENTER,
2159
+ v.ESC
2160
+ ].includes(e.key) && (e.preventDefault(), e.stopPropagation(), e.key === v.ARROW_UP || e.key === v.ARROW_DOWN ? this.#e.handleUpDownKey(e.key) : e.key === v.ENTER && !e.isComposing ? this.#U() : e.key === v.ESC && (this.#Q(), this.#e.selectedCountry.focus())), !this.#t.countrySearch && b.HIDDEN_SEARCH_CHAR.test(e.key) && (e.stopPropagation(), n && clearTimeout(n), t += e.key.toLowerCase(), this.#H(t), n = setTimeout(() => {
2161
+ t = "";
2162
+ }, x.HIDDEN_SEARCH_RESET_MS));
2163
+ }, { signal: e });
2164
+ }
2165
+ #V(e) {
2166
+ this.#e.searchInput.addEventListener("input", () => this.#e.handleSearchChange(), { signal: e }), this.#e.searchClearButton.addEventListener("click", () => this.#e.handleSearchClear(), { signal: e });
2167
+ }
2168
+ #H(e) {
2169
+ let t = ce(this.#r, e);
2170
+ if (t) {
2171
+ let e = t.nodeById[this.id];
2172
+ this.#e.highlightListItem(e, !1), this.#e.scrollCountryListToItem(e);
2173
+ }
2174
+ }
2175
+ #U() {
2176
+ this.#e.highlightedItem && this.#Z(this.#e.highlightedItem);
2177
+ }
2178
+ #W(e) {
2179
+ let { formatOnDisplay: t, nationalMode: n, separateDialCode: r } = this.#t, i = e;
2180
+ if (t && Q.utils && this.#c) {
2181
+ let t = J(e), a = n && !t || !i.startsWith("+") && !r, { NATIONAL: o, INTERNATIONAL: s } = Q.utils.numberFormat, c = a ? o : s;
2182
+ i = Q.utils.formatNumber(i, this.#c?.iso2, c);
2183
+ }
2184
+ i = this.#ne(i), this.#v(i);
2185
+ }
2186
+ #G(e) {
2187
+ let t = this.#q(e);
2188
+ return t === null ? !1 : this.#J(t);
2189
+ }
2190
+ #K(e) {
2191
+ let t = this.#c?.dialCode, n = this.#c?.nationalPrefix;
2192
+ return e.startsWith("+") || !t ? e : `+${t}${n && e.startsWith(n) && !this.#t.separateDialCode ? e.substring(1) : e}`;
2193
+ }
2194
+ #q(e) {
2195
+ let t = e.indexOf("+"), n = t ? e.substring(t) : e, r = this.#c?.iso2, i = this.#c?.dialCode;
2196
+ n = this.#K(n);
2197
+ let a = this.#ee(n, !0), o = H(n);
2198
+ if (a) {
2199
+ let e = H(a), t = this.#a[e];
2200
+ if (t.length === 1) return t[0] === r ? null : t[0];
2201
+ if (!r && this.#u && t.includes(this.#u)) return this.#u;
2202
+ if (i === w.NANP && xe(o)) return null;
2203
+ let n = this.#c?.areaCodes, s = this.#c?.priority;
2204
+ if (n) {
2205
+ let e = n.map((e) => `${i}${e}`);
2206
+ for (let t of e) if (o.startsWith(t)) return null;
2207
+ }
2208
+ let c = n && s !== 0 && o.length > e.length, l = r && t.includes(r) && !c, u = r === t[0];
2209
+ if (!l && !u) return t[0];
2210
+ } else if (n.startsWith("+") && o.length) {
2211
+ let e = this.#c?.dialCode || "";
2212
+ return e && e.startsWith(o) ? null : "";
2213
+ } else if ((!n || n === "+") && !r && this.#u) return this.#u;
2214
+ return null;
2215
+ }
2216
+ #J(e) {
2217
+ let t = this.#c?.iso2 || "";
2218
+ return this.#c = e ? this.#s.get(e) : null, this.#c && (this.#u = this.#c.iso2), this.#e.setCountry(this.#c), this.#X(), this.#Y(), t !== e;
2219
+ }
2220
+ #Y() {
2221
+ let { strictMode: e, placeholderNumberType: t, allowedNumberTypes: n } = this.#t, r = this.#c?.iso2;
2222
+ if (e && Q.utils) if (r) {
2223
+ let e = Q.utils.numberType[t], i = Q.utils.getExampleNumber(r, !1, e, !0), a = i;
2224
+ for (; Q.utils.isPossibleNumber(i, r, n);) a = i, i += "0";
2225
+ let o = Q.utils.getCoreNumber(a, r);
2226
+ this.#l = o.length, r === "by" && (this.#l = o.length + 1);
2227
+ } else this.#l = null;
2228
+ }
2229
+ #X() {
2230
+ let { autoPlaceholder: e, placeholderNumberType: t, nationalMode: n, customPlaceholder: r } = this.#t, i = e === D.AGGRESSIVE || !this.#e.hadInitialPlaceholder && e === D.POLITE;
2231
+ if (Q.utils && i) {
2232
+ let e = Q.utils.numberType[t], i = this.#c ? Q.utils.getExampleNumber(this.#c.iso2, n, e) : "";
2233
+ i = this.#ne(i), typeof r == "function" && (i = r(i, this.#c)), this.#e.telInput.setAttribute("placeholder", i);
2234
+ }
2235
+ }
2236
+ #Z(e) {
2237
+ let t = e.dataset[A.COUNTRY_CODE], n = this.#J(t);
2238
+ this.#Q();
2239
+ let r = e.dataset[A.DIAL_CODE];
2240
+ if (this.#$(r), this.#t.formatOnDisplay) {
2241
+ let e = this.#_();
2242
+ this.#W(e);
2243
+ }
2244
+ this.#e.telInput.focus(), n && this.#ie();
2245
+ }
2246
+ #Q(e) {
2247
+ this.#e.isDropdownClosed() || this.#t.dropdownAlwaysOpen && !e || (this.#e.closeDropdown(), this.#p.abort(), this.#p = null, this.#P(g.CLOSE_COUNTRY_DROPDOWN));
2248
+ }
2249
+ #$(e) {
2250
+ let t = this.#_(), n = `+${e}`, r;
2251
+ if (t.startsWith("+")) {
2252
+ let e = this.#ee(t);
2253
+ r = e ? t.replace(e, n) : n, this.#v(r);
2254
+ }
2255
+ }
2256
+ #ee(e, t) {
2257
+ let n = "";
2258
+ if (e.startsWith("+")) {
2259
+ let r = "", i = !1;
2260
+ for (let a = 0; a < e.length; a++) {
2261
+ let o = e.charAt(a);
2262
+ if (/[0-9]/.test(o)) {
2263
+ if (r += o, !this.#a[r]) break;
2264
+ if (this.#o.has(r)) {
2265
+ if (n = e.substring(0, a + 1), i = !0, !t) break;
2266
+ } else t && i && (n = e.substring(0, a + 1));
2267
+ if (r.length === this.#i) break;
2268
+ }
2269
+ }
2270
+ }
2271
+ return n;
2272
+ }
2273
+ #te(e) {
2274
+ let t = e ? this.#m.normalise(e) : this.#_(), n = this.#c?.dialCode, r, i = H(t);
2275
+ return r = this.#t.separateDialCode && !t.startsWith("+") && n && i ? `+${n}` : "", r + t;
2276
+ }
2277
+ #ne(e) {
2278
+ let t = Y(e, !!this.#ee(e), this.#t.separateDialCode, this.#c);
2279
+ return this.#N(t);
2280
+ }
2281
+ #re() {
2282
+ let e = this.#c;
2283
+ if (!e) return null;
2284
+ let { iso2: t, dialCode: n, name: r } = e;
2285
+ return {
2286
+ iso2: t,
2287
+ dialCode: n,
2288
+ name: r
2289
+ };
2290
+ }
2291
+ #ie() {
2292
+ let e = this.#re();
2293
+ this.#P(g.COUNTRY_CHANGE, e);
2294
+ }
2295
+ #ae() {
2296
+ if (this.#d) {
2297
+ this.#h?.resolve();
2298
+ return;
2299
+ }
2300
+ this.#t.initialCountry === O.AUTO && Q.autoCountry && (this.#u = Q.autoCountry, this.#c || this.#e.selectedCountryInner.classList.contains(_.GLOBE) || this.setCountry(this.#u), this.#h?.resolve());
2301
+ }
2302
+ #oe() {
2303
+ if (this.#d) {
2304
+ this.#h?.reject();
2305
+ return;
2306
+ }
2307
+ this.#S(!0), this.#h?.reject();
2308
+ }
2309
+ #se() {
2310
+ if (this.#d) {
2311
+ this.#g?.resolve();
2312
+ return;
2313
+ }
2314
+ if (Q.utils) {
2315
+ let e = this.#_();
2316
+ e && this.#W(e), this.#c && (this.#X(), this.#Y());
2317
+ }
2318
+ this.#g?.resolve();
2319
+ }
2320
+ #ce(e) {
2321
+ if (this.#d) {
2322
+ this.#g?.reject(e);
2323
+ return;
2324
+ }
2325
+ this.#g?.reject(e);
2326
+ }
2327
+ destroy() {
2328
+ this.#d || (this.#d = !0, this.#t.allowDropdown && this.#Q(!0), this.#f.abort(), this.#e.destroy(), Q.instances.delete(String(this.id)));
2329
+ }
2330
+ isActive() {
2331
+ return !this.#d;
2332
+ }
2333
+ getExtension() {
2334
+ return this.#d ? "" : (X("getExtension"), Q.utils.getExtension(this.#te(), this.#c?.iso2));
2335
+ }
2336
+ getNumber(e) {
2337
+ if (this.#d) return "";
2338
+ X("getNumber");
2339
+ let t = this.#c?.iso2, n = this.#te(), r = Q.utils.formatNumber(n, t, e);
2340
+ return this.#m.denormalise(r);
2341
+ }
2342
+ getNumberType() {
2343
+ return this.#d ? S.UNKNOWN_NUMBER_TYPE : (X("getNumberType"), Q.utils.getNumberType(this.#te(), this.#c?.iso2));
2344
+ }
2345
+ getSelectedCountryData() {
2346
+ return this.#re();
2347
+ }
2348
+ getValidationError() {
2349
+ if (this.#d) return S.UNKNOWN_VALIDATION_ERROR;
2350
+ X("getValidationError");
2351
+ let e = this.#c?.iso2;
2352
+ return Q.utils.getValidationError(this.#te(), e);
2353
+ }
2354
+ isValidNumber() {
2355
+ if (this.#d) return null;
2356
+ X("isValidNumber");
2357
+ let e = this.#c?.dialCode, t = this.#c?.iso2, n = this.#te(), r = Q.utils.getCoreNumber(n, t);
2358
+ if (r) {
2359
+ if (e === T.DIAL_CODE && r[0] === T.MOBILE_PREFIX && r.length !== T.MOBILE_CORE_LENGTH) return !1;
2360
+ if (!b.ALPHA_UNICODE.test(n) && e) {
2361
+ let t = H(n.startsWith("+") ? n.slice(1 + e.length) : n).length;
2362
+ if (r.length > t) return !1;
2363
+ }
2364
+ }
2365
+ return this.#ue(!1);
2366
+ }
2367
+ isValidNumberPrecise() {
2368
+ return this.#d ? null : (X("isValidNumberPrecise"), this.#ue(!0));
2369
+ }
2370
+ #le(e) {
2371
+ return Q.utils ? Q.utils.isPossibleNumber(e, this.#c?.iso2, this.#t.allowedNumberTypes) : null;
2372
+ }
2373
+ #ue(e) {
2374
+ let { allowNumberExtensions: t, allowPhonewords: n } = this.#t, r = (t) => e ? this.#de(t) : this.#le(t), i = this.#te();
2375
+ if (!this.#c && !J(i) || !r(i)) return !1;
2376
+ if (i.search(b.ALPHA_UNICODE) > -1) {
2377
+ let e = this.#c?.iso2;
2378
+ return Q.utils.getExtension(i, e) ? t : n;
2379
+ }
2380
+ return !0;
2381
+ }
2382
+ #de(e) {
2383
+ return Q.utils ? Q.utils.isValidNumber(e, this.#c?.iso2, this.#t.allowedNumberTypes) : null;
2384
+ }
2385
+ setCountry(e) {
2386
+ if (this.#d) return;
2387
+ let t = e?.toLowerCase();
2388
+ if (!m(t)) throw Error(`Invalid country code: '${t}'`);
2389
+ let n = this.#c?.iso2;
2390
+ if (e && t !== n || !e && n) {
2391
+ if (this.#J(t), this.#$(this.#c?.dialCode || ""), this.#t.formatOnDisplay) {
2392
+ let e = this.#_();
2393
+ this.#W(e);
2394
+ }
2395
+ this.#ie();
2396
+ }
2397
+ }
2398
+ setNumber(e) {
2399
+ if (this.#d) return;
2400
+ let t = this.#m.normalise(e), n = this.#G(t);
2401
+ this.#W(t), n && this.#ie(), this.#P(g.INPUT, { isSetNumber: !0 });
2402
+ }
2403
+ setPlaceholderNumberType(e) {
2404
+ this.#d || (this.#t.placeholderNumberType = e, this.#X());
2405
+ }
2406
+ setDisabled(e) {
2407
+ this.#d || (this.#e.telInput.disabled = e, this.#e.selectedCountry && (e ? this.#e.selectedCountry.setAttribute("disabled", "true") : this.#e.selectedCountry.removeAttribute("disabled")));
2408
+ }
2409
+ setReadonly(e) {
2410
+ this.#e.telInput && (this.#e.telInput.readOnly = e, this.#e.selectedCountry && (e ? this.#e.selectedCountry.setAttribute("disabled", "true") : this.#e.selectedCountry.removeAttribute("disabled")));
2411
+ }
2412
+ static forEachInstance(t, ...n) {
2413
+ let r = [...Q.instances.values()], i = n[0];
2414
+ r.forEach((n) => {
2415
+ if (n instanceof e) switch (t) {
2416
+ case "handleUtils":
2417
+ n.#se();
2418
+ break;
2419
+ case "handleUtilsFailure":
2420
+ n.#ce(i);
2421
+ break;
2422
+ case "handleAutoCountry":
2423
+ n.#ae();
2424
+ break;
2425
+ case "handleAutoCountryFailure":
2426
+ n.#oe();
2427
+ break;
2428
+ }
2429
+ });
2430
+ }
2431
+ }, Q = Object.assign((e, t) => {
2432
+ let n = new Z(e, t);
2433
+ return Q.instances.set(String(n.id), n), e.iti = n, n;
2434
+ }, {
2435
+ defaults: F,
2436
+ documentReady: () => document.readyState === "complete",
2437
+ getCountryData: () => h,
2438
+ getInstance: (e) => {
2439
+ let t = e.dataset.intlTelInputId;
2440
+ return t ? Q.instances.get(t) ?? null : null;
2441
+ },
2442
+ instances: /* @__PURE__ */ new Map(),
2443
+ attachUtils: (e) => {
2444
+ if (!Q.utils && !Q.startedLoadingUtilsScript) {
2445
+ let t;
2446
+ if (typeof e == "function") try {
2447
+ t = Promise.resolve(e());
2448
+ } catch (e) {
2449
+ return Promise.reject(e);
2450
+ }
2451
+ else return Promise.reject(/* @__PURE__ */ TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof e}`));
2452
+ return Q.startedLoadingUtilsScript = !0, t.then((e) => {
2453
+ let t = e?.default;
2454
+ if (!t || typeof t != "object") throw TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
2455
+ return Q.utils = t, Z.forEachInstance("handleUtils"), !0;
2456
+ }).catch((e) => {
2457
+ throw Z.forEachInstance("handleUtilsFailure", e), e;
2458
+ });
2459
+ }
2460
+ return null;
2461
+ },
2462
+ startedLoadingUtilsScript: !1,
2463
+ startedLoadingAutoCountry: !1,
2464
+ version: "27.0.0"
2465
+ }), $ = Q, Te = /* @__PURE__ */ n({
2466
+ inheritAttrs: !1,
2467
+ __name: "IntlTelInput",
2468
+ props: {
2469
+ usePreciseValidation: {
2470
+ type: Boolean,
2471
+ default: !1
2472
+ },
2473
+ disabled: {
2474
+ type: Boolean,
2475
+ default: !1
2476
+ },
2477
+ readonly: {
2478
+ type: Boolean,
2479
+ default: !1
2480
+ },
2481
+ inputProps: { default: () => ({}) },
2482
+ initialValue: {},
2483
+ modelValue: {},
2484
+ allowDropdown: { type: Boolean },
2485
+ allowedNumberTypes: {},
2486
+ allowNumberExtensions: { type: Boolean },
2487
+ allowPhonewords: { type: Boolean },
2488
+ autoPlaceholder: {},
2489
+ containerClass: {},
2490
+ countryNameLocale: {},
2491
+ countryOrder: {},
2492
+ countrySearch: { type: Boolean },
2493
+ customPlaceholder: {},
2494
+ dropdownAlwaysOpen: { type: Boolean },
2495
+ dropdownContainer: {},
2496
+ excludeCountries: {},
2497
+ fixDropdownWidth: { type: Boolean },
2498
+ formatAsYouType: { type: Boolean },
2499
+ formatOnDisplay: { type: Boolean },
2500
+ geoIpLookup: {},
2501
+ hiddenInput: {},
2502
+ i18n: {},
2503
+ initialCountry: {},
2504
+ loadUtils: {},
2505
+ nationalMode: { type: Boolean },
2506
+ onlyCountries: {},
2507
+ placeholderNumberType: {},
2508
+ searchInputClass: {},
2509
+ separateDialCode: { type: Boolean },
2510
+ showFlags: { type: Boolean },
2511
+ strictMode: { type: Boolean },
2512
+ useFullscreenPopup: { type: Boolean }
2513
+ },
2514
+ emits: [
2515
+ "changeNumber",
2516
+ "changeCountry",
2517
+ "changeValidity",
2518
+ "changeErrorCode",
2519
+ "update:modelValue"
2520
+ ],
2521
+ setup(n, { expose: d, emit: f }) {
2522
+ let p = n, m = f, h = (e) => {
2523
+ console.warn(`intl-tel-input: ignoring inputProps.${e} - see docs for more info.`);
2524
+ }, g = new Set([
2525
+ "type",
2526
+ "value",
2527
+ "disabled",
2528
+ "readonly",
2529
+ "onInput",
2530
+ "oninput"
2531
+ ]), _ = e(() => {
2532
+ let e = p.inputProps ?? {}, t = {};
2533
+ for (let [n, r] of Object.entries(e)) g.has(n) ? h(n) : t[n] = r;
2534
+ return t;
2535
+ }), v = e(() => p.modelValue ?? p.initialValue ?? ""), y = r(), b = (e, t) => Object.prototype.hasOwnProperty.call(e, t), x = Object.keys($.defaults), S = e(() => {
2536
+ let e = y?.vnode.props ?? {}, t = {};
2537
+ return x.forEach((n) => {
2538
+ if (!b(e, n)) return;
2539
+ let r = p[n];
2540
+ r !== void 0 && (t[n] = r);
2541
+ }), t;
2542
+ }), C = c(null), w = l(null), T = c(), E = c(), D = c(), O = c(), k = () => (p.usePreciseValidation ? w.value.isValidNumberPrecise() : w.value.isValidNumber()) ?? !1, A = () => {
2543
+ let e = k(), t = e ? null : w.value.getValidationError();
2544
+ e !== D.value && (D.value = e, m("changeValidity", e)), t !== O.value && (O.value = t, m("changeErrorCode", t));
2545
+ }, j = () => {
2546
+ if (!w.value?.isActive()) return;
2547
+ let e = w.value.getNumber() ?? "";
2548
+ e !== T.value && (T.value = e, m("changeNumber", e), m("update:modelValue", e)), A();
2549
+ }, M = () => {
2550
+ if (!w.value?.isActive()) return;
2551
+ let e = w.value.getSelectedCountryData()?.iso2 ?? "";
2552
+ e !== E.value && (E.value = e, m("changeCountry", e)), j();
2553
+ };
2554
+ return a(() => {
2555
+ C.value && (w.value = $(C.value, S.value), p.disabled && w.value.setDisabled(p.disabled), p.readonly && w.value.setReadonly(p.readonly), E.value = w.value.getSelectedCountryData()?.iso2 ?? "", w.value.promise.then(() => {
2556
+ w.value?.isActive() && (v.value && w.value.setNumber(v.value), T.value = w.value.getNumber() ?? "", D.value = k(), O.value = D.value ? null : w.value.getValidationError(), M());
2557
+ }));
2558
+ }), u(() => p.disabled, (e) => w.value?.setDisabled(e)), u(() => p.readonly, (e) => w.value?.setReadonly(e)), u(() => v.value, (e) => {
2559
+ w.value && w.value.promise.then(() => {
2560
+ if (!w.value?.isActive()) return;
2561
+ let t = e ?? "", n = w.value.getNumber() ?? "";
2562
+ document.activeElement === C.value || n === t || (w.value.setNumber(t), A());
2563
+ });
2564
+ }, { flush: "post" }), o(() => w.value?.destroy()), d({
2565
+ instance: w,
2566
+ input: C
2567
+ }), (e, n) => (s(), t("input", i(_.value, {
2568
+ ref_key: "input",
2569
+ ref: C,
2570
+ type: "tel",
2571
+ onCountrychange: M,
2572
+ onInput: j
2573
+ }), null, 16));
2574
+ }
2575
+ });
2576
+ //#endregion
2577
+ export { $ as n, Te as t };