intl-tel-input 25.11.3 → 25.12.1

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 (55) hide show
  1. package/README.md +8 -8
  2. package/angular/README.md +6 -6
  3. package/angular/build/IntlTelInput.js +1 -1
  4. package/angular/build/IntlTelInputWithUtils.js +1 -1
  5. package/angular/build/types/intl-tel-input/i18n/index.d.ts +4 -0
  6. package/angular/build/types/intl-tel-input/i18n/lt/countries.d.ts +3 -0
  7. package/angular/build/types/intl-tel-input/i18n/lt/index.d.ts +6 -0
  8. package/angular/build/types/intl-tel-input/i18n/lt/interface.d.ts +3 -0
  9. package/angular/build/types/intl-tel-input/i18n/sl/countries.d.ts +3 -0
  10. package/angular/build/types/intl-tel-input/i18n/sl/index.d.ts +6 -0
  11. package/angular/build/types/intl-tel-input/i18n/sl/interface.d.ts +3 -0
  12. package/angular/build/types/intl-tel-input/i18n/sq/countries.d.ts +3 -0
  13. package/angular/build/types/intl-tel-input/i18n/sq/index.d.ts +6 -0
  14. package/angular/build/types/intl-tel-input/i18n/sq/interface.d.ts +3 -0
  15. package/angular/build/types/intl-tel-input/i18n/sr/countries.d.ts +3 -0
  16. package/angular/build/types/intl-tel-input/i18n/sr/index.d.ts +6 -0
  17. package/angular/build/types/intl-tel-input/i18n/sr/interface.d.ts +3 -0
  18. package/build/js/data.js +1 -1
  19. package/build/js/data.min.js +1 -1
  20. package/build/js/i18n/ar/interface.js +12 -2
  21. package/build/js/i18n/bs/interface.js +9 -2
  22. package/build/js/i18n/cs/interface.js +9 -2
  23. package/build/js/i18n/hr/interface.js +9 -2
  24. package/build/js/i18n/index.js +4 -0
  25. package/build/js/i18n/lt/countries.js +245 -0
  26. package/build/js/i18n/lt/index.js +5 -0
  27. package/build/js/i18n/lt/interface.js +26 -0
  28. package/build/js/i18n/ro/interface.js +7 -2
  29. package/build/js/i18n/ru/interface.js +9 -2
  30. package/build/js/i18n/sk/interface.js +9 -2
  31. package/build/js/i18n/sl/countries.js +245 -0
  32. package/build/js/i18n/sl/index.js +5 -0
  33. package/build/js/i18n/sl/interface.js +25 -0
  34. package/build/js/i18n/sq/countries.js +245 -0
  35. package/build/js/i18n/sq/index.js +5 -0
  36. package/build/js/i18n/sq/interface.js +14 -0
  37. package/build/js/i18n/sr/countries.js +245 -0
  38. package/build/js/i18n/sr/index.js +5 -0
  39. package/build/js/i18n/sr/interface.js +21 -0
  40. package/build/js/i18n/uk/interface.js +9 -2
  41. package/build/js/intlTelInput.d.ts +76 -0
  42. package/build/js/intlTelInput.js +2 -2
  43. package/build/js/intlTelInput.min.js +2 -2
  44. package/build/js/intlTelInputWithUtils.js +2 -2
  45. package/build/js/intlTelInputWithUtils.min.js +2 -2
  46. package/package.json +1 -1
  47. package/react/README.md +1 -1
  48. package/react/build/IntlTelInput.cjs +1 -1
  49. package/react/build/IntlTelInput.d.ts +76 -0
  50. package/react/build/IntlTelInput.js +1 -1
  51. package/react/build/IntlTelInputWithUtils.cjs +1 -1
  52. package/react/build/IntlTelInputWithUtils.js +1 -1
  53. package/vue/README.md +1 -1
  54. package/vue/build/IntlTelInput.mjs +1 -1
  55. package/vue/build/IntlTelInputWithUtils.mjs +1 -1
@@ -0,0 +1,245 @@
1
+ const countryTranslations = {
2
+ ad: "Андора",
3
+ ae: "Уједињени Арапски Емирати",
4
+ af: "Авганистан",
5
+ ag: "Антигва и Барбуда",
6
+ ai: "Ангвила",
7
+ al: "Албанија",
8
+ am: "Јерменија",
9
+ ao: "Ангола",
10
+ ar: "Аргентина",
11
+ as: "Америчка Самоа",
12
+ at: "Аустрија",
13
+ au: "Аустралија",
14
+ aw: "Аруба",
15
+ ax: "Оландска Острва",
16
+ az: "Азербејџан",
17
+ ba: "Босна и Херцеговина",
18
+ bb: "Барбадос",
19
+ bd: "Бангладеш",
20
+ be: "Белгија",
21
+ bf: "Буркина Фасо",
22
+ bg: "Бугарска",
23
+ bh: "Бахреин",
24
+ bi: "Бурунди",
25
+ bj: "Бенин",
26
+ bl: "Свети Бартоломеј",
27
+ bm: "Бермуда",
28
+ bn: "Брунеј",
29
+ bo: "Боливија",
30
+ bq: "Карипска Холандија",
31
+ br: "Бразил",
32
+ bs: "Бахами",
33
+ bt: "Бутан",
34
+ bw: "Боцвана",
35
+ by: "Белорусија",
36
+ bz: "Белизе",
37
+ ca: "Канада",
38
+ cc: "Кокосова (Килингова) Острва",
39
+ cd: "Конго - Киншаса",
40
+ cf: "Централноафричка Република",
41
+ cg: "Конго - Бразавил",
42
+ ch: "Швајцарска",
43
+ ci: "Обала Слоноваче (Кот д’Ивоар)",
44
+ ck: "Кукова Острва",
45
+ cl: "Чиле",
46
+ cm: "Камерун",
47
+ cn: "Кина",
48
+ co: "Колумбија",
49
+ cr: "Костарика",
50
+ cu: "Куба",
51
+ cv: "Зеленортска Острва",
52
+ cw: "Курасао",
53
+ cx: "Божићно Острво",
54
+ cy: "Кипар",
55
+ cz: "Чешка",
56
+ de: "Немачка",
57
+ dj: "Џибути",
58
+ dk: "Данска",
59
+ dm: "Доминика",
60
+ do: "Доминиканска Република",
61
+ dz: "Алжир",
62
+ ec: "Еквадор",
63
+ ee: "Естонија",
64
+ eg: "Египат",
65
+ eh: "Западна Сахара",
66
+ er: "Еритреја",
67
+ es: "Шпанија",
68
+ et: "Етиопија",
69
+ fi: "Финска",
70
+ fj: "Фиџи",
71
+ fk: "Фокландска Острва",
72
+ fm: "Микронезија",
73
+ fo: "Фарска Острва",
74
+ fr: "Француска",
75
+ ga: "Габон",
76
+ gb: "Уједињено Краљевство",
77
+ gd: "Гренада",
78
+ ge: "Грузија",
79
+ gf: "Француска Гвајана",
80
+ gg: "Гернзи",
81
+ gh: "Гана",
82
+ gi: "Гибралтар",
83
+ gl: "Гренланд",
84
+ gm: "Гамбија",
85
+ gn: "Гвинеја",
86
+ gp: "Гваделуп",
87
+ gq: "Екваторијална Гвинеја",
88
+ gr: "Грчка",
89
+ gt: "Гватемала",
90
+ gu: "Гуам",
91
+ gw: "Гвинеја-Бисао",
92
+ gy: "Гвајана",
93
+ hk: "САР Хонгконг (Кина)",
94
+ hn: "Хондурас",
95
+ hr: "Хрватска",
96
+ ht: "Хаити",
97
+ hu: "Мађарска",
98
+ id: "Индонезија",
99
+ ie: "Ирска",
100
+ il: "Израел",
101
+ im: "Острво Ман",
102
+ in: "Индија",
103
+ io: "Британска територија Индијског океана",
104
+ iq: "Ирак",
105
+ ir: "Иран",
106
+ is: "Исланд",
107
+ it: "Италија",
108
+ je: "Џерзи",
109
+ jm: "Јамајка",
110
+ jo: "Јордан",
111
+ jp: "Јапан",
112
+ ke: "Кенија",
113
+ kg: "Киргистан",
114
+ kh: "Камбоџа",
115
+ ki: "Кирибати",
116
+ km: "Коморска Острва",
117
+ kn: "Сент Китс и Невис",
118
+ kp: "Северна Кореја",
119
+ kr: "Јужна Кореја",
120
+ kw: "Кувајт",
121
+ ky: "Кајманска Острва",
122
+ kz: "Казахстан",
123
+ la: "Лаос",
124
+ lb: "Либан",
125
+ lc: "Света Луција",
126
+ li: "Лихтенштајн",
127
+ lk: "Шри Ланка",
128
+ lr: "Либерија",
129
+ ls: "Лесото",
130
+ lt: "Литванија",
131
+ lu: "Луксембург",
132
+ lv: "Летонија",
133
+ ly: "Либија",
134
+ ma: "Мароко",
135
+ mc: "Монако",
136
+ md: "Молдавија",
137
+ me: "Црна Гора",
138
+ mf: "Свети Мартин (Француска)",
139
+ mg: "Мадагаскар",
140
+ mh: "Маршалска Острва",
141
+ mk: "Северна Македонија",
142
+ ml: "Мали",
143
+ mm: "Мијанмар (Бурма)",
144
+ mn: "Монголија",
145
+ mo: "САР Макао (Кина)",
146
+ mp: "Северна Маријанска Острва",
147
+ mq: "Мартиник",
148
+ mr: "Мауританија",
149
+ ms: "Монсерат",
150
+ mt: "Малта",
151
+ mu: "Маурицијус",
152
+ mv: "Малдиви",
153
+ mw: "Малави",
154
+ mx: "Мексико",
155
+ my: "Малезија",
156
+ mz: "Мозамбик",
157
+ na: "Намибија",
158
+ nc: "Нова Каледонија",
159
+ ne: "Нигер",
160
+ nf: "Острво Норфок",
161
+ ng: "Нигерија",
162
+ ni: "Никарагва",
163
+ nl: "Холандија",
164
+ no: "Норвешка",
165
+ np: "Непал",
166
+ nr: "Науру",
167
+ nu: "Ниуе",
168
+ nz: "Нови Зеланд",
169
+ om: "Оман",
170
+ pa: "Панама",
171
+ pe: "Перу",
172
+ pf: "Француска Полинезија",
173
+ pg: "Папуа Нова Гвинеја",
174
+ ph: "Филипини",
175
+ pk: "Пакистан",
176
+ pl: "Пољска",
177
+ pm: "Сен Пјер и Микелон",
178
+ pr: "Порторико",
179
+ ps: "Палестинске територије",
180
+ pt: "Португалија",
181
+ pw: "Палау",
182
+ py: "Парагвај",
183
+ qa: "Катар",
184
+ re: "Реинион",
185
+ ro: "Румунија",
186
+ rs: "Србија",
187
+ ru: "Русија",
188
+ rw: "Руанда",
189
+ sa: "Саудијска Арабија",
190
+ sb: "Соломонска Острва",
191
+ sc: "Сејшели",
192
+ sd: "Судан",
193
+ se: "Шведска",
194
+ sg: "Сингапур",
195
+ sh: "Света Јелена",
196
+ si: "Словенија",
197
+ sj: "Свалбард и Јан Мајен",
198
+ sk: "Словачка",
199
+ sl: "Сијера Леоне",
200
+ sm: "Сан Марино",
201
+ sn: "Сенегал",
202
+ so: "Сомалија",
203
+ sr: "Суринам",
204
+ ss: "Јужни Судан",
205
+ st: "Сао Томе и Принципе",
206
+ sv: "Салвадор",
207
+ sx: "Свети Мартин (Холандија)",
208
+ sy: "Сирија",
209
+ sz: "Свазиленд",
210
+ tc: "Острва Туркс и Каикос",
211
+ td: "Чад",
212
+ tg: "Того",
213
+ th: "Тајланд",
214
+ tj: "Таџикистан",
215
+ tk: "Токелау",
216
+ tl: "Тимор-Лесте (Источни Тимор)",
217
+ tm: "Туркменистан",
218
+ tn: "Тунис",
219
+ to: "Тонга",
220
+ tr: "Турска",
221
+ tt: "Тринидад и Тобаго",
222
+ tv: "Тувалу",
223
+ tw: "Тајван",
224
+ tz: "Танзанија",
225
+ ua: "Украјина",
226
+ ug: "Уганда",
227
+ us: "Сједињене Државе",
228
+ uy: "Уругвај",
229
+ uz: "Узбекистан",
230
+ va: "Ватикан",
231
+ vc: "Сент Винсент и Гренадини",
232
+ ve: "Венецуела",
233
+ vg: "Британска Девичанска Острва",
234
+ vi: "Америчка Девичанска Острва",
235
+ vn: "Вијетнам",
236
+ vu: "Вануату",
237
+ wf: "Валис и Футуна",
238
+ ws: "Самоа",
239
+ ye: "Јемен",
240
+ yt: "Мајот",
241
+ za: "Јужноафричка Република",
242
+ zm: "Замбија",
243
+ zw: "Зимбабве"
244
+ };
245
+ export default countryTranslations;
@@ -0,0 +1,5 @@
1
+ import countryTranslations from "./countries.js";
2
+ import interfaceTranslations from "./interface.js";
3
+ export { countryTranslations, interfaceTranslations };
4
+ const allTranslations = { ...countryTranslations, ...interfaceTranslations };
5
+ export default allTranslations;
@@ -0,0 +1,21 @@
1
+ const interfaceTranslations = {
2
+ selectedCountryAriaLabel: "Промени земљу, изабрано ${countryName} (${dialCode})",
3
+ noCountrySelected: "Изабери земљу",
4
+ countryListAriaLabel: "Листа земаља",
5
+ searchPlaceholder: "Претрага",
6
+ clearSearchAriaLabel: "Обриши претрагу",
7
+ zeroSearchResults: "Нема резултата",
8
+ searchResultsText(count) {
9
+ const mod10 = count % 10;
10
+ const mod100 = count % 100;
11
+ if (mod10 === 1 && mod100 !== 11) {
12
+ return `Пронађен ${count} резултат`;
13
+ }
14
+ const isFew = mod10 >= 2 && mod10 <= 4 && !(mod100 >= 12 && mod100 <= 14);
15
+ return `${isFew ? "Пронађена" : "Пронађено"} ${count} резултата`;
16
+ },
17
+ // additional countries (not supported by country-list library)
18
+ ac: "Острво Асенсион",
19
+ xk: "Косово"
20
+ };
21
+ export default interfaceTranslations;
@@ -4,8 +4,15 @@ const interfaceTranslations = {
4
4
  countryListAriaLabel: "Список країн",
5
5
  searchPlaceholder: "Шукати",
6
6
  zeroSearchResults: "Результатів не знайдено",
7
- oneSearchResult: "Знайдено 1 результат",
8
- multipleSearchResults: "Знайдено ${count} результатів",
7
+ searchResultsText(count) {
8
+ const mod10 = count % 10;
9
+ const mod100 = count % 100;
10
+ if (mod10 === 1 && mod100 !== 11) {
11
+ return `Знайдено ${count} результат`;
12
+ }
13
+ const isFew = mod10 >= 2 && mod10 <= 4 && !(mod100 >= 12 && mod100 <= 14);
14
+ return `Знайдено ${count} ${isFew ? "результати" : "результатів"}`;
15
+ },
9
16
  // additional countries (not supported by country-list library)
10
17
  ac: "Острів Вознесіння",
11
18
  xk: "Косово"
@@ -823,6 +823,24 @@ declare module "intl-tel-input/i18n/ko" {
823
823
  const allTranslations: I18n;
824
824
  export default allTranslations;
825
825
  }
826
+ declare module "intl-tel-input/i18n/lt/countries" {
827
+ import { I18n } from "intl-tel-input/i18n/types";
828
+ const countryTranslations: I18n;
829
+ export default countryTranslations;
830
+ }
831
+ declare module "intl-tel-input/i18n/lt/interface" {
832
+ import { I18n } from "intl-tel-input/i18n/types";
833
+ const interfaceTranslations: I18n;
834
+ export default interfaceTranslations;
835
+ }
836
+ declare module "intl-tel-input/i18n/lt" {
837
+ import { I18n } from "intl-tel-input/i18n/types";
838
+ import countryTranslations from "intl-tel-input/i18n/lt/countries";
839
+ import interfaceTranslations from "intl-tel-input/i18n/lt/interface";
840
+ export { countryTranslations, interfaceTranslations };
841
+ const allTranslations: I18n;
842
+ export default allTranslations;
843
+ }
826
844
  declare module "intl-tel-input/i18n/mr/countries" {
827
845
  import { I18n } from "intl-tel-input/i18n/types";
828
846
  const countryTranslations: I18n;
@@ -967,6 +985,60 @@ declare module "intl-tel-input/i18n/sk" {
967
985
  const allTranslations: I18n;
968
986
  export default allTranslations;
969
987
  }
988
+ declare module "intl-tel-input/i18n/sl/countries" {
989
+ import { I18n } from "intl-tel-input/i18n/types";
990
+ const countryTranslations: I18n;
991
+ export default countryTranslations;
992
+ }
993
+ declare module "intl-tel-input/i18n/sl/interface" {
994
+ import { I18n } from "intl-tel-input/i18n/types";
995
+ const interfaceTranslations: I18n;
996
+ export default interfaceTranslations;
997
+ }
998
+ declare module "intl-tel-input/i18n/sl" {
999
+ import { I18n } from "intl-tel-input/i18n/types";
1000
+ import countryTranslations from "intl-tel-input/i18n/sl/countries";
1001
+ import interfaceTranslations from "intl-tel-input/i18n/sl/interface";
1002
+ export { countryTranslations, interfaceTranslations };
1003
+ const allTranslations: I18n;
1004
+ export default allTranslations;
1005
+ }
1006
+ declare module "intl-tel-input/i18n/sq/countries" {
1007
+ import { I18n } from "intl-tel-input/i18n/types";
1008
+ const countryTranslations: I18n;
1009
+ export default countryTranslations;
1010
+ }
1011
+ declare module "intl-tel-input/i18n/sq/interface" {
1012
+ import { I18n } from "intl-tel-input/i18n/types";
1013
+ const interfaceTranslations: I18n;
1014
+ export default interfaceTranslations;
1015
+ }
1016
+ declare module "intl-tel-input/i18n/sq" {
1017
+ import { I18n } from "intl-tel-input/i18n/types";
1018
+ import countryTranslations from "intl-tel-input/i18n/sq/countries";
1019
+ import interfaceTranslations from "intl-tel-input/i18n/sq/interface";
1020
+ export { countryTranslations, interfaceTranslations };
1021
+ const allTranslations: I18n;
1022
+ export default allTranslations;
1023
+ }
1024
+ declare module "intl-tel-input/i18n/sr/countries" {
1025
+ import { I18n } from "intl-tel-input/i18n/types";
1026
+ const countryTranslations: I18n;
1027
+ export default countryTranslations;
1028
+ }
1029
+ declare module "intl-tel-input/i18n/sr/interface" {
1030
+ import { I18n } from "intl-tel-input/i18n/types";
1031
+ const interfaceTranslations: I18n;
1032
+ export default interfaceTranslations;
1033
+ }
1034
+ declare module "intl-tel-input/i18n/sr" {
1035
+ import { I18n } from "intl-tel-input/i18n/types";
1036
+ import countryTranslations from "intl-tel-input/i18n/sr/countries";
1037
+ import interfaceTranslations from "intl-tel-input/i18n/sr/interface";
1038
+ export { countryTranslations, interfaceTranslations };
1039
+ const allTranslations: I18n;
1040
+ export default allTranslations;
1041
+ }
970
1042
  declare module "intl-tel-input/i18n/sv/countries" {
971
1043
  import { I18n } from "intl-tel-input/i18n/types";
972
1044
  const countryTranslations: I18n;
@@ -1152,6 +1224,7 @@ declare module "intl-tel-input/i18n" {
1152
1224
  export { default as it, countryTranslations as itCountryTranslations, interfaceTranslations as itInterfaceTranslations } from "intl-tel-input/i18n/it";
1153
1225
  export { default as ja, countryTranslations as jaCountryTranslations, interfaceTranslations as jaInterfaceTranslations } from "intl-tel-input/i18n/ja";
1154
1226
  export { default as ko, countryTranslations as koCountryTranslations, interfaceTranslations as koInterfaceTranslations } from "intl-tel-input/i18n/ko";
1227
+ export { default as lt, countryTranslations as ltCountryTranslations, interfaceTranslations as ltInterfaceTranslations } from "intl-tel-input/i18n/lt";
1155
1228
  export { default as mr, countryTranslations as mrCountryTranslations, interfaceTranslations as mrInterfaceTranslations } from "intl-tel-input/i18n/mr";
1156
1229
  export { default as nl, countryTranslations as nlCountryTranslations, interfaceTranslations as nlInterfaceTranslations } from "intl-tel-input/i18n/nl";
1157
1230
  export { default as no, countryTranslations as noCountryTranslations, interfaceTranslations as noInterfaceTranslations } from "intl-tel-input/i18n/no";
@@ -1160,6 +1233,9 @@ declare module "intl-tel-input/i18n" {
1160
1233
  export { default as ro, countryTranslations as roCountryTranslations, interfaceTranslations as roInterfaceTranslations } from "intl-tel-input/i18n/ro";
1161
1234
  export { default as ru, countryTranslations as ruCountryTranslations, interfaceTranslations as ruInterfaceTranslations } from "intl-tel-input/i18n/ru";
1162
1235
  export { default as sk, countryTranslations as skCountryTranslations, interfaceTranslations as skInterfaceTranslations } from "intl-tel-input/i18n/sk";
1236
+ export { default as sl, countryTranslations as slCountryTranslations, interfaceTranslations as slInterfaceTranslations } from "intl-tel-input/i18n/sl";
1237
+ export { default as sq, countryTranslations as sqCountryTranslations, interfaceTranslations as sqInterfaceTranslations } from "intl-tel-input/i18n/sq";
1238
+ export { default as sr, countryTranslations as srCountryTranslations, interfaceTranslations as srInterfaceTranslations } from "intl-tel-input/i18n/sr";
1163
1239
  export { default as sv, countryTranslations as svCountryTranslations, interfaceTranslations as svInterfaceTranslations } from "intl-tel-input/i18n/sv";
1164
1240
  export { default as te, countryTranslations as teCountryTranslations, interfaceTranslations as teInterfaceTranslations } from "intl-tel-input/i18n/te";
1165
1241
  export { default as th, countryTranslations as thCountryTranslations, interfaceTranslations as thInterfaceTranslations } from "intl-tel-input/i18n/th";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.11.3
2
+ * International Telephone Input v25.12.1
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -4037,7 +4037,7 @@ var factoryOutput = (() => {
4037
4037
  attachUtils,
4038
4038
  startedLoadingUtilsScript: false,
4039
4039
  startedLoadingAutoCountry: false,
4040
- version: "25.11.3"
4040
+ version: "25.12.1"
4041
4041
  }
4042
4042
  );
4043
4043
  var intl_tel_input_default = intlTelInput;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.11.3
2
+ * International Telephone Input v25.12.1
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -24,7 +24,7 @@ var factoryOutput=(()=>{var U=Object.defineProperty;var ht=Object.getOwnProperty
24
24
  <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" />
25
25
  </mask>
26
26
  <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />
27
- </svg>`};var T=class{constructor(t,e,i){this.highlightedItem=null;t.dataset.intlTelInputId=i.toString(),this.telInput=t,this.options=e,this.id=i,this.a=!!t.getAttribute("placeholder"),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.o=this.telInput.style.paddingLeft)}generateMarkup(t){this.countries=t,this._at();let e=this._au();this._av(e),e.appendChild(this.telInput),this._ay(),this._az(e)}_at(){this.telInput.classList.add("iti__tel-input"),!this.telInput.hasAttribute("autocomplete")&&!this.telInput.form?.hasAttribute("autocomplete")&&this.telInput.setAttribute("autocomplete","off")}_au(){let{allowDropdown:t,showFlags:e,containerClass:i,useFullscreenPopup:n}=this.options,s=H({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":e,"iti--inline-dropdown":!n,[i]:!!i}),o=C("div",{class:s});return this.isRTL&&o.setAttribute("dir","ltr"),this.telInput.before(o),o}_av(t){let{allowDropdown:e,separateDialCode:i,showFlags:n}=this.options;if(e||n||i){this.countryContainer=C("div",{class:`iti__country-container ${h.V_HIDE}`},t),e?(this.selectedCountry=C("button",{type:"button",class:"iti__selected-country",[p.EXPANDED]:"false",[p.LABEL]:this.options.i18n.noCountrySelected,[p.HASPOPUP]:"dialog",[p.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=C("div",{class:"iti__selected-country"},this.countryContainer);let s=C("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=C("div",{class:h.FLAG},s),e&&(this.dropdownArrow=C("div",{class:"iti__arrow",[p.HIDDEN]:"true"},s)),i&&(this.selectedDialCode=C("div",{class:"iti__selected-dial-code"},this.selectedCountry)),e&&this._aw()}}_aw(){let{fixDropdownWidth:t,useFullscreenPopup:e,countrySearch:i,i18n:n,dropdownContainer:s,containerClass:o}=this.options,a=t?"":"iti--flexible-dropdown-width";if(this.dropdownContent=C("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${h.HIDE} ${a}`,role:"dialog",[p.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),i&&this._ax(),this.countryList=C("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[p.LABEL]:n.countryListAriaLabel},this.dropdownContent),this._ba(),i&&this.updateSearchResultsA11yText(),s){let u=H({iti:!0,"iti--container":!0,"iti--fullscreen-popup":e,"iti--inline-dropdown":!e,[o]:!!o});this.dropdown=C("div",{class:u}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_ax(){let{i18n:t}=this.options,e=C("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=C("span",{class:"iti__search-icon",[p.HIDDEN]:"true"},e),this.searchIcon.innerHTML=et(),this.searchInput=C("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:t.searchPlaceholder,role:"combobox",[p.EXPANDED]:"true",[p.LABEL]:t.searchPlaceholder,[p.CONTROLS]:`iti-${this.id}__country-listbox`,[p.AUTOCOMPLETE]:"list",autocomplete:"off"},e),this.k=C("button",{type:"button",class:`iti__search-clear ${h.HIDE}`,[p.LABEL]:t.clearSearchAriaLabel,tabindex:"-1"},e),this.k.innerHTML=it(this.id),this.l=C("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=C("div",{class:`iti__no-results ${h.HIDE}`,[p.HIDDEN]:"true"},this.dropdownContent),this.searchNoResults.textContent=t.zeroSearchResults}_ay(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(h.V_HIDE))}_az(t){let{hiddenInput:e}=this.options;if(e){let i=this.telInput.getAttribute("name")||"",n=e(i);if(n.phone){let s=this.telInput.form?.querySelector(`input[name="${n.phone}"]`);s?this.hiddenInput=s:(this.hiddenInput=C("input",{type:"hidden",name:n.phone}),t.appendChild(this.hiddenInput))}if(n.country){let s=this.telInput.form?.querySelector(`input[name="${n.country}"]`);s?this.m=s:(this.m=C("input",{type:"hidden",name:n.country}),t.appendChild(this.m))}}}_ba(){let t=document.createDocumentFragment();for(let e=0;e<this.countries.length;e++){let i=this.countries[e],n=H({[h.COUNTRY_ITEM]:!0,[h.HIGHLIGHT]:e===0}),s=C("li",{id:`iti-${this.id}__item-${i.iso2}`,class:n,tabindex:"-1",role:"option",[p.SELECTED]:"false"});s.dataset.dialCode=i.dialCode,s.dataset.countryCode=i.iso2,i.nodeById[this.id]=s,this.options.showFlags&&C("div",{class:`${h.FLAG} iti__${i.iso2}`},s);let o=C("span",{class:"iti__country-name"},s);o.textContent=i.name;let a=C("span",{class:"iti__dial-code"},s);this.isRTL&&a.setAttribute("dir","ltr"),a.textContent=`+${i.dialCode}`,t.appendChild(s)}this.countryList.appendChild(t)}updateInputPadding(){if(this.selectedCountry){let t=this.options.separateDialCode?P.SANE_SELECTED_WITH_DIAL_WIDTH:P.SANE_SELECTED_NO_DIAL_WIDTH,i=(this.selectedCountry.offsetWidth||this._bb()||t)+P.INPUT_PADDING_EXTRA_LEFT;this.telInput.style.paddingLeft=`${i}px`}}_bb(){if(this.telInput.parentNode){let t;try{t=window.top.document.body}catch{t=document.body}let e=this.telInput.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);let i=this.countryContainer.cloneNode();e.appendChild(i);let n=this.selectedCountry.cloneNode(!0);i.appendChild(n);let s=n.offsetWidth;return t.removeChild(e),s}return 0}updateSearchResultsA11yText(){let{i18n:t}=this.options,e=this.countryList.childElementCount,i;e===0?i=t.zeroSearchResults:t.searchResultsText?i=t.searchResultsText(e):e===1?i=t.oneSearchResult:i=t.multipleSearchResults.replace("${count}",e.toString()),this.l.textContent=i}scrollTo(t){let e=this.countryList,i=document.documentElement.scrollTop,n=e.offsetHeight,s=e.getBoundingClientRect().top+i,o=s+n,a=t.offsetHeight,u=t.getBoundingClientRect().top+i,d=u+a,c=u-s+e.scrollTop;if(u<s)e.scrollTop=c;else if(d>o){let m=n-a;e.scrollTop=c-m}}highlightListItem(t,e){let i=this.highlightedItem;if(i&&(i.classList.remove(h.HIGHLIGHT),i.setAttribute(p.SELECTED,"false")),this.highlightedItem=t,this.highlightedItem&&(this.highlightedItem.classList.add(h.HIGHLIGHT),this.highlightedItem.setAttribute(p.SELECTED,"true"),this.options.countrySearch)){let n=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(p.ACTIVE_DESCENDANT,n)}e&&this.highlightedItem.focus()}filterCountries(t){this.countryList.innerHTML="";let e=!0;for(let i of t){let n=i.nodeById[this.id];n&&(this.countryList.appendChild(n),e&&(this.highlightListItem(n,!1),e=!1))}e?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(h.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(h.HIDE),this.countryList.scrollTop=0,this.updateSearchResultsA11yText()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.options.separateDialCode&&(this.telInput.style.paddingLeft=this.o);let t=this.telInput.parentNode;t.before(this.telInput),t.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.selectedDialCode=null,this.dropdownArrow=null,this.dropdownContent=null,this.searchInput=null,this.searchIcon=null,this.k=null,this.searchNoResults=null,this.l=null,this.countryList=null,this.dropdown=null,this.hiddenInput=null,this.m=null,this.highlightedItem=null;for(let e of this.countries)delete e.nodeById[this.id];this.countries=null}};var nt=r=>{let{onlyCountries:t,excludeCountries:e}=r;if(t.length){let i=t.map(n=>n.toLowerCase());return L.filter(n=>i.includes(n.iso2))}else if(e.length){let i=e.map(n=>n.toLowerCase());return L.filter(n=>!i.includes(n.iso2))}return L},st=(r,t)=>{for(let e of r){let i=e.iso2.toLowerCase();t.i18n[i]&&(e.name=t.i18n[i])}},ot=(r,t)=>{let e=new Set,i=0,n={},s=(o,a,u)=>{if(!o||!a)return;a.length>i&&(i=a.length),n.hasOwnProperty(a)||(n[a]=[]);let d=n[a];if(d.includes(o))return;let c=u!==void 0?u:d.length;d[c]=o};for(let o of r){e.has(o.dialCode)||e.add(o.dialCode);for(let a=1;a<o.dialCode.length;a++){let u=o.dialCode.substring(0,a);s(o.iso2,u)}s(o.iso2,o.dialCode,o.priority)}(t.onlyCountries.length||t.excludeCountries.length)&&e.forEach(o=>{n[o]=n[o].filter(Boolean)});for(let o of r)if(o.areaCodes){let a=n[o.dialCode][0];for(let u of o.areaCodes){for(let d=1;d<u.length;d++){let c=u.substring(0,d),m=o.dialCode+c;s(a,m),s(o.iso2,m)}s(o.iso2,o.dialCode+u)}}return{dialCodes:e,dialCodeMaxLen:i,dialCodeToIso2Map:n}},rt=(r,t)=>{t.countryOrder&&(t.countryOrder=t.countryOrder.map(e=>e.toLowerCase())),r.sort((e,i)=>{let{countryOrder:n}=t;if(n){let s=n.indexOf(e.iso2),o=n.indexOf(i.iso2),a=s>-1,u=o>-1;if(a||u)return a&&u?s-o:a?-1:1}return e.name.localeCompare(i.name)})},at=r=>{for(let t of r)t.normalisedName=R(t.name),t.initials=t.normalisedName.split(/[^a-z]/).map(e=>e[0]).join(""),t.dialCodePlus=`+${t.dialCode}`};var lt=(r,t,e,i)=>{let n=r;if(e&&t){t=`+${i.dialCode}`;let s=n[t.length]===" "||n[t.length]==="-"?t.length+1:t.length;n=n.substring(s)}return n},ut=(r,t,e,i,n)=>{let s=e?e.formatNumberAsYouType(r,i.iso2):r,{dialCode:o}=i;return n&&t.charAt(0)!=="+"&&s.includes(`+${o}`)?(s.split(`+${o}`)[1]||"").trim():s};var dt=(r,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let s=0;s<t.length;s++){if(/[+0-9]/.test(t[s])&&n++,n===r&&!i)return s+1;if(i&&n===r+1)return s}return t.length};var _t=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],z=r=>{let t=D(r);if(t.startsWith(M.NANP)&&t.length>=4){let e=t.substring(1,4);return _t.includes(e)}return!1};for(let r of L)r.name=B[r.iso2];var Lt=0,Nt=new Set(L.map(r=>r.iso2)),V=r=>Nt.has(r),k=class r{constructor(t,e={}){this.id=Lt++,this.options={...K,...e},Q(this.options,B),this.ui=new T(t,this.options,this.id),this.i=r._b(),this.promise=this._c(),this.countries=nt(this.options);let{dialCodes:i,dialCodeMaxLen:n,dialCodeToIso2Map:s}=ot(this.countries,this.options);this.dialCodes=i,this.dialCodeMaxLen=n,this.dialCodeToIso2Map=s,this.j=new Map(this.countries.map(o=>[o.iso2,o])),this._init()}static _b(){return typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1}_c(){let t=new Promise((i,n)=>{this.b=i,this.c=n}),e=new Promise((i,n)=>{this.d=i,this.e=n});return Promise.all([t,e])}_init(){this.selectedCountryData={},this.g=new AbortController,this._a(),this.ui.generateMarkup(this.countries),this._d(),this._e(),this._h()}_a(){st(this.countries,this.options),rt(this.countries,this.options),at(this.countries)}_d(t=!1){let e=this.ui.telInput.getAttribute("value"),i=this.ui.telInput.value,s=e&&e.startsWith("+")&&(!i||!i.startsWith("+"))?e:i,o=this._ao(s),a=z(s),{initialCountry:u,geoIpLookup:d}=this.options,c=u===x.AUTO&&d;if(o&&!a)this._ai(s);else if(!c||t){let m=u?u.toLowerCase():"";V(m)?this._aj(m):o&&a?this._aj(J.ISO2):this._aj("")}s&&this._ah(s)}_e(){this._j(),this.options.allowDropdown&&this._g(),(this.ui.hiddenInput||this.ui.m)&&this.ui.telInput.form&&this._f()}_f(){let t=()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.m&&(this.ui.m.value=this.selectedCountryData.iso2||"")};this.ui.telInput.form?.addEventListener("submit",t,{signal:this.g.signal})}_g(){let t=this.g.signal,e=o=>{this.ui.dropdownContent.classList.contains(h.HIDE)?this.ui.telInput.focus():o.preventDefault()},i=this.ui.telInput.closest("label");i&&i.addEventListener("click",e,{signal:t});let n=()=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._l()};this.ui.selectedCountry.addEventListener("click",n,{signal:t});let s=o=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&[y.ARROW_UP,y.ARROW_DOWN,y.SPACE,y.ENTER].includes(o.key)&&(o.preventDefault(),o.stopPropagation(),this._l()),o.key===y.TAB&&this._am()};this.ui.countryContainer.addEventListener("keydown",s,{signal:t})}_h(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;if(t&&!l.utils){let s=()=>{l.attachUtils(t)?.catch(()=>{})};if(l.documentReady())s();else{let o=()=>{s()};window.addEventListener("load",o,{signal:this.g.signal})}}else this.d();e===x.AUTO&&i&&!this.selectedCountryData.iso2?this._i():this.b()}_i(){l.autoCountry?this.handleAutoCountry():l.startedLoadingAutoCountry||(l.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((t="")=>{let e=t.toLowerCase();V(e)?(l.autoCountry=e,setTimeout(()=>S("handleAutoCountry"))):(this._d(!0),S("rejectAutoCountryPromise"))},()=>{this._d(!0),S("rejectAutoCountryPromise")}))}_m(){this._l(),this.ui.searchInput.value="+",this._ae("")}_j(){this._p(),this._n(),this._o()}_p(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:n,countrySearch:s}=this.options,o=!1;N.ALPHA_UNICODE.test(this.ui.telInput.value)&&(o=!0);let a=u=>{if(this.i&&u?.data==="+"&&i&&n&&s){let g=this.ui.telInput.selectionStart||0,E=this.ui.telInput.value.substring(0,g-1),b=this.ui.telInput.value.substring(g);this.ui.telInput.value=E+b,this._m();return}this._ai(this.ui.telInput.value)&&this._ar();let d=u?.data&&N.NON_PLUS_NUMERIC.test(u.data),c=u?.inputType===W.PASTE&&this.ui.telInput.value;d||c&&!t?o=!0:N.NON_PLUS_NUMERIC.test(this.ui.telInput.value)||(o=!1);let m=u?.detail&&u.detail.isSetNumber;if(e&&!o&&!m){let g=this.ui.telInput.selectionStart||0,b=this.ui.telInput.value.substring(0,g).replace(N.NON_PLUS_NUMERIC_GLOBAL,"").length,_=u?.inputType===W.DELETE_FWD,f=this._ap(),I=ut(f,this.ui.telInput.value,l.utils,this.selectedCountryData,this.options.separateDialCode),v=dt(b,I,g,_);this.ui.telInput.value=I,this.ui.telInput.setSelectionRange(v,v)}};this.ui.telInput.addEventListener("input",a,{signal:this.g.signal})}_n(){let{strictMode:t,separateDialCode:e,allowDropdown:i,countrySearch:n}=this.options;if(t||e){let s=o=>{if(o.key&&o.key.length===1&&!o.altKey&&!o.ctrlKey&&!o.metaKey){if(e&&i&&n&&o.key==="+"){o.preventDefault(),this._m();return}if(t){let a=this.ui.telInput.value,d=!a.startsWith("+")&&this.ui.telInput.selectionStart===0&&o.key==="+",c=/^[0-9]$/.test(o.key),m=e?c:d||c,g=a.slice(0,this.ui.telInput.selectionStart)+o.key+a.slice(this.ui.telInput.selectionEnd),E=this._ap(g),b=l.utils.getCoreNumber(E,this.selectedCountryData.iso2),_=this.n&&b.length>this.n,I=this._s(E)!==null;(!m||_&&!I&&!d)&&o.preventDefault()}}};this.ui.telInput.addEventListener("keydown",s,{signal:this.g.signal})}}_o(){if(this.options.strictMode){let t=e=>{e.preventDefault();let i=this.ui.telInput,n=i.selectionStart,s=i.selectionEnd,o=i.value.slice(0,n),a=i.value.slice(s),u=this.selectedCountryData.iso2,d=e.clipboardData.getData("text"),c=n===0&&s>0,m=!i.value.startsWith("+")||c,g=d.replace(N.NON_PLUS_NUMERIC_GLOBAL,""),E=g.startsWith("+"),b=g.replace(/\+/g,""),_=E&&m?`+${b}`:b,f=o+_+a,I=l.utils.getCoreNumber(f,u);for(;I.length===0&&f.length>0;)f=f.slice(0,-1),I=l.utils.getCoreNumber(f,u);if(!I)return;if(this.n&&I.length>this.n)if(i.selectionEnd===i.value.length){let ct=I.length-this.n;f=f.slice(0,f.length-ct)}else return;i.value=f;let v=n+_.length;i.setSelectionRange(v,v),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",t,{signal:this.g.signal})}}_k(t){let e=Number(this.ui.telInput.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}_as(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.ui.telInput.dispatchEvent(i)}_l(){let{fixDropdownWidth:t,countrySearch:e}=this.options;if(this.h=new AbortController,t&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"true"),this._x(),e){let i=this.ui.countryList.firstElementChild;i&&(this.ui.highlightListItem(i,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._y(),this.ui.dropdownArrow.classList.add(h.ARROW_UP),this._as(w.OPEN_COUNTRY_DROPDOWN)}_x(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){let t=this.ui.telInput.getBoundingClientRect(),e=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${t.top+e}px`,this.ui.dropdown.style.left=`${t.left}px`;let i=()=>this._am();window.addEventListener("scroll",i,{signal:this.h.signal})}}}_y(){let t=this.h.signal;this._z(t),this._aa(t),this._ab(t),this._ac(t),this.options.countrySearch&&this._ad(t)}_z(t){let e=i=>{let n=i.target?.closest(`.${h.COUNTRY_ITEM}`);n&&this.ui.highlightListItem(n,!1)};this.ui.countryList.addEventListener("mouseover",e,{signal:t})}_aa(t){let e=i=>{let n=i.target?.closest(`.${h.COUNTRY_ITEM}`);n&&this._al(n)};this.ui.countryList.addEventListener("click",e,{signal:t})}_ab(t){let e=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._am()};setTimeout(()=>{document.documentElement.addEventListener("click",e,{signal:t})},0)}_ac(t){let e="",i=null,n=s=>{[y.ARROW_UP,y.ARROW_DOWN,y.ENTER,y.ESC].includes(s.key)&&(s.preventDefault(),s.stopPropagation(),s.key===y.ARROW_UP||s.key===y.ARROW_DOWN?this._af(s.key):s.key===y.ENTER?this._ag():s.key===y.ESC&&this._am()),!this.options.countrySearch&&N.HIDDEN_SEARCH_CHAR.test(s.key)&&(s.stopPropagation(),i&&clearTimeout(i),e+=s.key.toLowerCase(),this._q(e),i=setTimeout(()=>{e=""},X.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",n,{signal:t})}_ad(t){let e=()=>{let o=this.ui.searchInput.value.trim();this._ae(o),this.ui.searchInput.value?this.ui.k.classList.remove(h.HIDE):this.ui.k.classList.add(h.HIDE)},i=null,n=()=>{i&&clearTimeout(i),i=setTimeout(()=>{e(),i=null},100)};this.ui.searchInput.addEventListener("input",n,{signal:t});let s=()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),e()};this.ui.k.addEventListener("click",s,{signal:t})}_q(t){let e=tt(this.countries,t);if(e){let i=e.nodeById[this.id];this.ui.highlightListItem(i,!1),this.ui.scrollTo(i)}}_ae(t){let e;t===""?e=this.countries:e=Z(this.countries,t),this.ui.filterCountries(e)}_af(t){let e=t===y.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!e&&this.ui.countryList.childElementCount>1&&(e=t===y.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),e&&(this.ui.scrollTo(e),this.ui.highlightListItem(e,!1))}_ag(){this.ui.highlightedItem&&this._al(this.ui.highlightedItem)}_ah(t){let e=t;if(this.options.formatOnDisplay&&l.utils&&this.selectedCountryData){let i=this.options.nationalMode||!e.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:n,INTERNATIONAL:s}=l.utils.numberFormat,o=i?n:s;e=l.utils.formatNumber(e,this.selectedCountryData.iso2,o)}e=this._aq(e),this.ui.telInput.value=e}_ai(t){let e=this._s(t);return e!==null?this._aj(e):!1}_r(t){let{dialCode:e,nationalPrefix:i}=this.selectedCountryData;if(t.startsWith("+")||!e)return t;let o=i&&t.startsWith(i)&&!this.options.separateDialCode?t.substring(1):t;return`+${e}${o}`}_s(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.selectedCountryData.iso2,s=this.selectedCountryData.dialCode;i=this._r(i);let o=this._ao(i,!0),a=D(i);if(o){let u=D(o),d=this.dialCodeToIso2Map[u];if(d.length===1)return d[0]===n?null:d[0];if(!n&&this.f&&d.includes(this.f))return this.f;if(s===M.NANP&&z(a))return null;let{areaCodes:m,priority:g}=this.selectedCountryData;if(m){let I=m.map(v=>`${s}${v}`);for(let v of I)if(a.startsWith(v))return null}let b=m&&!(g===0)&&a.length>u.length,_=n&&d.includes(n)&&!b,f=n===d[0];if(!_&&!f)return d[0]}else{if(i.startsWith("+")&&a.length)return"";if((!i||i==="+")&&!n)return this.f}return null}_aj(t){let{separateDialCode:e,showFlags:i,i18n:n}=this.options,s=this.selectedCountryData.iso2||"";if(this.selectedCountryData=t?this.j.get(t):{},this.selectedCountryData.iso2&&(this.f=this.selectedCountryData.iso2),this.ui.selectedCountry){let o=t&&i?`${h.FLAG} iti__${t}`:`${h.FLAG} ${h.GLOBE}`,a,u;if(t){let{name:d,dialCode:c}=this.selectedCountryData;u=d,a=n.selectedCountryAriaLabel.replace("${countryName}",d).replace("${dialCode}",`+${c}`)}else u=n.noCountrySelected,a=n.noCountrySelected;this.ui.selectedCountryInner.className=o,this.ui.selectedCountry.setAttribute("title",u),this.ui.selectedCountry.setAttribute(p.LABEL,a)}if(e){let o=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=o,this.ui.updateInputPadding()}return this._ak(),this._t(),s!==t}_t(){let{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.options,{iso2:n}=this.selectedCountryData;if(t&&l.utils)if(n){let s=l.utils.numberType[e],o=l.utils.getExampleNumber(n,!1,s,!0),a=o;for(;l.utils.isPossibleNumber(o,n,i);)a=o,o+="0";let u=l.utils.getCoreNumber(a,n);this.n=u.length,n==="by"&&(this.n=u.length+1)}else this.n=null}_ak(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.options,s=t===A.AGGRESSIVE||!this.ui.a&&t===A.POLITE;if(l.utils&&s){let o=l.utils.numberType[e],a=this.selectedCountryData.iso2?l.utils.getExampleNumber(this.selectedCountryData.iso2,i,o):"";a=this._aq(a),typeof n=="function"&&(a=n(a,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",a)}}_al(t){let e=t.dataset[$.COUNTRY_CODE],i=this._aj(e);this._am();let n=t.dataset[$.DIAL_CODE];this._an(n),this.options.formatOnDisplay&&this._ah(this.ui.telInput.value),this.ui.telInput.focus(),i&&this._ar()}_am(){this.ui.dropdownContent.classList.contains(h.HIDE)||(this.ui.dropdownContent.classList.add(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"false"),this.ui.highlightedItem&&this.ui.highlightedItem.setAttribute(p.SELECTED,"false"),this.options.countrySearch&&this.ui.searchInput.removeAttribute(p.ACTIVE_DESCENDANT),this.ui.dropdownArrow.classList.remove(h.ARROW_UP),this.h.abort(),this.h=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._as(w.CLOSE_COUNTRY_DROPDOWN))}_an(t){let e=this.ui.telInput.value,i=`+${t}`,n;if(e.startsWith("+")){let s=this._ao(e);s?n=e.replace(s,i):n=i,this.ui.telInput.value=n}}_ao(t,e){let i="";if(t.startsWith("+")){let n="";for(let s=0;s<t.length;s++){let o=t.charAt(s);if(/[0-9]/.test(o)){if(n+=o,!!!this.dialCodeToIso2Map[n])break;if(e)i=t.substring(0,s+1);else if(this.dialCodes.has(n)){i=t.substring(0,s+1);break}if(n.length===this.dialCodeMaxLen)break}}}return i}_ap(t){let e=t||this.ui.telInput.value.trim(),{dialCode:i}=this.selectedCountryData,n,s=D(e);return this.options.separateDialCode&&!e.startsWith("+")&&i&&s?n=`+${i}`:n="",n+e}_aq(t){let e=this._ao(t),i=lt(t,e,this.options.separateDialCode,this.selectedCountryData);return this._k(i)}_ar(){this._as(w.COUNTRY_CHANGE)}handleAutoCountry(){this.options.initialCountry===x.AUTO&&l.autoCountry&&(this.f=l.autoCountry,this.selectedCountryData.iso2||this.ui.selectedCountryInner.classList.contains(h.GLOBE)||this.setCountry(this.f),this.b())}handleUtils(){l.utils&&(this.ui.telInput.value&&this._ah(this.ui.telInput.value),this.selectedCountryData.iso2&&(this._ak(),this._t())),this.d()}destroy(){this.ui.telInput&&(this.options.allowDropdown&&this._am(),this.g.abort(),this.g=null,this.ui.destroy(),l.instances instanceof Map?l.instances.delete(this.id):delete l.instances[this.id])}getExtension(){return l.utils?l.utils.getExtension(this._ap(),this.selectedCountryData.iso2):""}getNumber(t){if(l.utils){let{iso2:e}=this.selectedCountryData;return l.utils.formatNumber(this._ap(),e,t)}return""}getNumberType(){return l.utils?l.utils.getNumberType(this._ap(),this.selectedCountryData.iso2):F.UNKNOWN_NUMBER_TYPE}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(l.utils){let{iso2:t}=this.selectedCountryData;return l.utils.getValidationError(this._ap(),t)}return F.UNKNOWN_VALIDATION_ERROR}isValidNumber(){let{dialCode:t,iso2:e}=this.selectedCountryData;if(t===O.DIAL_CODE&&l.utils){let i=this._ap(),n=l.utils.getCoreNumber(i,e);if(n[0]===O.MOBILE_PREFIX&&n.length!==O.MOBILE_CORE_LENGTH)return!1}return this._v(!1)}isValidNumberPrecise(){return this._v(!0)}_u(t){return l.utils?l.utils.isPossibleNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}_v(t){if(!l.utils)return null;if(!this.selectedCountryData.iso2)return!1;let e=o=>t?this._w(o):this._u(o),i=this._ap(),n=i.search(N.ALPHA_UNICODE);if(n>-1&&!this.options.allowPhonewords){let o=i.substring(0,n),a=e(o),u=e(i);return a&&u}return e(i)}_w(t){return l.utils?l.utils.isValidNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase();if(!V(e))throw new Error(`Invalid country code: '${e}'`);let i=this.selectedCountryData.iso2;(t&&e!==i||!t&&i)&&(this._aj(e),this._an(this.selectedCountryData.dialCode),this.options.formatOnDisplay&&this._ah(this.ui.telInput.value),this._ar())}setNumber(t){let e=this._ai(t);this._ah(t),e&&this._ar(),this._as(w.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._ak()}setDisabled(t){this.ui.telInput.disabled=t,t?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},Dt=r=>{if(!l.utils&&!l.startedLoadingUtilsScript){let t;if(typeof r=="function")try{t=Promise.resolve(r())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof r}`));return l.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return l.utils=i,S("handleUtils"),!0}).catch(e=>{throw S("rejectUtilsScriptPromise",e),e})}return null},S=(r,...t)=>{Object.values(l.instances).forEach(e=>{let i=e[r];typeof i=="function"&&i.apply(e,t)})},l=Object.assign((r,t)=>{let e=new k(r,t);return l.instances[e.id]=e,r.iti=e,e},{defaults:K,documentReady:()=>document.readyState==="complete",getCountryData:()=>L,getInstance:r=>{let t=r.dataset.intlTelInputId;return t?l.instances[t]:null},instances:{},attachUtils:Dt,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.11.3"}),wt=l;return ft(At);})();
27
+ </svg>`};var T=class{constructor(t,e,i){this.highlightedItem=null;t.dataset.intlTelInputId=i.toString(),this.telInput=t,this.options=e,this.id=i,this.a=!!t.getAttribute("placeholder"),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.o=this.telInput.style.paddingLeft)}generateMarkup(t){this.countries=t,this._at();let e=this._au();this._av(e),e.appendChild(this.telInput),this._ay(),this._az(e)}_at(){this.telInput.classList.add("iti__tel-input"),!this.telInput.hasAttribute("autocomplete")&&!this.telInput.form?.hasAttribute("autocomplete")&&this.telInput.setAttribute("autocomplete","off")}_au(){let{allowDropdown:t,showFlags:e,containerClass:i,useFullscreenPopup:n}=this.options,s=H({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":e,"iti--inline-dropdown":!n,[i]:!!i}),o=C("div",{class:s});return this.isRTL&&o.setAttribute("dir","ltr"),this.telInput.before(o),o}_av(t){let{allowDropdown:e,separateDialCode:i,showFlags:n}=this.options;if(e||n||i){this.countryContainer=C("div",{class:`iti__country-container ${h.V_HIDE}`},t),e?(this.selectedCountry=C("button",{type:"button",class:"iti__selected-country",[p.EXPANDED]:"false",[p.LABEL]:this.options.i18n.noCountrySelected,[p.HASPOPUP]:"dialog",[p.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=C("div",{class:"iti__selected-country"},this.countryContainer);let s=C("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=C("div",{class:h.FLAG},s),e&&(this.dropdownArrow=C("div",{class:"iti__arrow",[p.HIDDEN]:"true"},s)),i&&(this.selectedDialCode=C("div",{class:"iti__selected-dial-code"},this.selectedCountry)),e&&this._aw()}}_aw(){let{fixDropdownWidth:t,useFullscreenPopup:e,countrySearch:i,i18n:n,dropdownContainer:s,containerClass:o}=this.options,a=t?"":"iti--flexible-dropdown-width";if(this.dropdownContent=C("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${h.HIDE} ${a}`,role:"dialog",[p.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),i&&this._ax(),this.countryList=C("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[p.LABEL]:n.countryListAriaLabel},this.dropdownContent),this._ba(),i&&this.updateSearchResultsA11yText(),s){let u=H({iti:!0,"iti--container":!0,"iti--fullscreen-popup":e,"iti--inline-dropdown":!e,[o]:!!o});this.dropdown=C("div",{class:u}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_ax(){let{i18n:t}=this.options,e=C("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=C("span",{class:"iti__search-icon",[p.HIDDEN]:"true"},e),this.searchIcon.innerHTML=et(),this.searchInput=C("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:t.searchPlaceholder,role:"combobox",[p.EXPANDED]:"true",[p.LABEL]:t.searchPlaceholder,[p.CONTROLS]:`iti-${this.id}__country-listbox`,[p.AUTOCOMPLETE]:"list",autocomplete:"off"},e),this.k=C("button",{type:"button",class:`iti__search-clear ${h.HIDE}`,[p.LABEL]:t.clearSearchAriaLabel,tabindex:"-1"},e),this.k.innerHTML=it(this.id),this.l=C("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=C("div",{class:`iti__no-results ${h.HIDE}`,[p.HIDDEN]:"true"},this.dropdownContent),this.searchNoResults.textContent=t.zeroSearchResults}_ay(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(h.V_HIDE))}_az(t){let{hiddenInput:e}=this.options;if(e){let i=this.telInput.getAttribute("name")||"",n=e(i);if(n.phone){let s=this.telInput.form?.querySelector(`input[name="${n.phone}"]`);s?this.hiddenInput=s:(this.hiddenInput=C("input",{type:"hidden",name:n.phone}),t.appendChild(this.hiddenInput))}if(n.country){let s=this.telInput.form?.querySelector(`input[name="${n.country}"]`);s?this.m=s:(this.m=C("input",{type:"hidden",name:n.country}),t.appendChild(this.m))}}}_ba(){let t=document.createDocumentFragment();for(let e=0;e<this.countries.length;e++){let i=this.countries[e],n=H({[h.COUNTRY_ITEM]:!0,[h.HIGHLIGHT]:e===0}),s=C("li",{id:`iti-${this.id}__item-${i.iso2}`,class:n,tabindex:"-1",role:"option",[p.SELECTED]:"false"});s.dataset.dialCode=i.dialCode,s.dataset.countryCode=i.iso2,i.nodeById[this.id]=s,this.options.showFlags&&C("div",{class:`${h.FLAG} iti__${i.iso2}`},s);let o=C("span",{class:"iti__country-name"},s);o.textContent=i.name;let a=C("span",{class:"iti__dial-code"},s);this.isRTL&&a.setAttribute("dir","ltr"),a.textContent=`+${i.dialCode}`,t.appendChild(s)}this.countryList.appendChild(t)}updateInputPadding(){if(this.selectedCountry){let t=this.options.separateDialCode?P.SANE_SELECTED_WITH_DIAL_WIDTH:P.SANE_SELECTED_NO_DIAL_WIDTH,i=(this.selectedCountry.offsetWidth||this._bb()||t)+P.INPUT_PADDING_EXTRA_LEFT;this.telInput.style.paddingLeft=`${i}px`}}_bb(){if(this.telInput.parentNode){let t;try{t=window.top.document.body}catch{t=document.body}let e=this.telInput.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);let i=this.countryContainer.cloneNode();e.appendChild(i);let n=this.selectedCountry.cloneNode(!0);i.appendChild(n);let s=n.offsetWidth;return t.removeChild(e),s}return 0}updateSearchResultsA11yText(){let{i18n:t}=this.options,e=this.countryList.childElementCount,i;e===0?i=t.zeroSearchResults:t.searchResultsText?i=t.searchResultsText(e):e===1?i=t.oneSearchResult:i=t.multipleSearchResults.replace("${count}",e.toString()),this.l.textContent=i}scrollTo(t){let e=this.countryList,i=document.documentElement.scrollTop,n=e.offsetHeight,s=e.getBoundingClientRect().top+i,o=s+n,a=t.offsetHeight,u=t.getBoundingClientRect().top+i,d=u+a,c=u-s+e.scrollTop;if(u<s)e.scrollTop=c;else if(d>o){let m=n-a;e.scrollTop=c-m}}highlightListItem(t,e){let i=this.highlightedItem;if(i&&(i.classList.remove(h.HIGHLIGHT),i.setAttribute(p.SELECTED,"false")),this.highlightedItem=t,this.highlightedItem&&(this.highlightedItem.classList.add(h.HIGHLIGHT),this.highlightedItem.setAttribute(p.SELECTED,"true"),this.options.countrySearch)){let n=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(p.ACTIVE_DESCENDANT,n)}e&&this.highlightedItem.focus()}filterCountries(t){this.countryList.innerHTML="";let e=!0;for(let i of t){let n=i.nodeById[this.id];n&&(this.countryList.appendChild(n),e&&(this.highlightListItem(n,!1),e=!1))}e?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(h.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(h.HIDE),this.countryList.scrollTop=0,this.updateSearchResultsA11yText()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.options.separateDialCode&&(this.telInput.style.paddingLeft=this.o);let t=this.telInput.parentNode;t.before(this.telInput),t.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.selectedDialCode=null,this.dropdownArrow=null,this.dropdownContent=null,this.searchInput=null,this.searchIcon=null,this.k=null,this.searchNoResults=null,this.l=null,this.countryList=null,this.dropdown=null,this.hiddenInput=null,this.m=null,this.highlightedItem=null;for(let e of this.countries)delete e.nodeById[this.id];this.countries=null}};var nt=r=>{let{onlyCountries:t,excludeCountries:e}=r;if(t.length){let i=t.map(n=>n.toLowerCase());return L.filter(n=>i.includes(n.iso2))}else if(e.length){let i=e.map(n=>n.toLowerCase());return L.filter(n=>!i.includes(n.iso2))}return L},st=(r,t)=>{for(let e of r){let i=e.iso2.toLowerCase();t.i18n[i]&&(e.name=t.i18n[i])}},ot=(r,t)=>{let e=new Set,i=0,n={},s=(o,a,u)=>{if(!o||!a)return;a.length>i&&(i=a.length),n.hasOwnProperty(a)||(n[a]=[]);let d=n[a];if(d.includes(o))return;let c=u!==void 0?u:d.length;d[c]=o};for(let o of r){e.has(o.dialCode)||e.add(o.dialCode);for(let a=1;a<o.dialCode.length;a++){let u=o.dialCode.substring(0,a);s(o.iso2,u)}s(o.iso2,o.dialCode,o.priority)}(t.onlyCountries.length||t.excludeCountries.length)&&e.forEach(o=>{n[o]=n[o].filter(Boolean)});for(let o of r)if(o.areaCodes){let a=n[o.dialCode][0];for(let u of o.areaCodes){for(let d=1;d<u.length;d++){let c=u.substring(0,d),m=o.dialCode+c;s(a,m),s(o.iso2,m)}s(o.iso2,o.dialCode+u)}}return{dialCodes:e,dialCodeMaxLen:i,dialCodeToIso2Map:n}},rt=(r,t)=>{t.countryOrder&&(t.countryOrder=t.countryOrder.map(e=>e.toLowerCase())),r.sort((e,i)=>{let{countryOrder:n}=t;if(n){let s=n.indexOf(e.iso2),o=n.indexOf(i.iso2),a=s>-1,u=o>-1;if(a||u)return a&&u?s-o:a?-1:1}return e.name.localeCompare(i.name)})},at=r=>{for(let t of r)t.normalisedName=R(t.name),t.initials=t.normalisedName.split(/[^a-z]/).map(e=>e[0]).join(""),t.dialCodePlus=`+${t.dialCode}`};var lt=(r,t,e,i)=>{let n=r;if(e&&t){t=`+${i.dialCode}`;let s=n[t.length]===" "||n[t.length]==="-"?t.length+1:t.length;n=n.substring(s)}return n},ut=(r,t,e,i,n)=>{let s=e?e.formatNumberAsYouType(r,i.iso2):r,{dialCode:o}=i;return n&&t.charAt(0)!=="+"&&s.includes(`+${o}`)?(s.split(`+${o}`)[1]||"").trim():s};var dt=(r,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let s=0;s<t.length;s++){if(/[+0-9]/.test(t[s])&&n++,n===r&&!i)return s+1;if(i&&n===r+1)return s}return t.length};var _t=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],z=r=>{let t=D(r);if(t.startsWith(M.NANP)&&t.length>=4){let e=t.substring(1,4);return _t.includes(e)}return!1};for(let r of L)r.name=B[r.iso2];var Lt=0,Nt=new Set(L.map(r=>r.iso2)),V=r=>Nt.has(r),k=class r{constructor(t,e={}){this.id=Lt++,this.options={...K,...e},Q(this.options,B),this.ui=new T(t,this.options,this.id),this.i=r._b(),this.promise=this._c(),this.countries=nt(this.options);let{dialCodes:i,dialCodeMaxLen:n,dialCodeToIso2Map:s}=ot(this.countries,this.options);this.dialCodes=i,this.dialCodeMaxLen=n,this.dialCodeToIso2Map=s,this.j=new Map(this.countries.map(o=>[o.iso2,o])),this._init()}static _b(){return typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1}_c(){let t=new Promise((i,n)=>{this.b=i,this.c=n}),e=new Promise((i,n)=>{this.d=i,this.e=n});return Promise.all([t,e])}_init(){this.selectedCountryData={},this.g=new AbortController,this._a(),this.ui.generateMarkup(this.countries),this._d(),this._e(),this._h()}_a(){st(this.countries,this.options),rt(this.countries,this.options),at(this.countries)}_d(t=!1){let e=this.ui.telInput.getAttribute("value"),i=this.ui.telInput.value,s=e&&e.startsWith("+")&&(!i||!i.startsWith("+"))?e:i,o=this._ao(s),a=z(s),{initialCountry:u,geoIpLookup:d}=this.options,c=u===x.AUTO&&d;if(o&&!a)this._ai(s);else if(!c||t){let m=u?u.toLowerCase():"";V(m)?this._aj(m):o&&a?this._aj(J.ISO2):this._aj("")}s&&this._ah(s)}_e(){this._j(),this.options.allowDropdown&&this._g(),(this.ui.hiddenInput||this.ui.m)&&this.ui.telInput.form&&this._f()}_f(){let t=()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.m&&(this.ui.m.value=this.selectedCountryData.iso2||"")};this.ui.telInput.form?.addEventListener("submit",t,{signal:this.g.signal})}_g(){let t=this.g.signal,e=o=>{this.ui.dropdownContent.classList.contains(h.HIDE)?this.ui.telInput.focus():o.preventDefault()},i=this.ui.telInput.closest("label");i&&i.addEventListener("click",e,{signal:t});let n=()=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._l()};this.ui.selectedCountry.addEventListener("click",n,{signal:t});let s=o=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&[y.ARROW_UP,y.ARROW_DOWN,y.SPACE,y.ENTER].includes(o.key)&&(o.preventDefault(),o.stopPropagation(),this._l()),o.key===y.TAB&&this._am()};this.ui.countryContainer.addEventListener("keydown",s,{signal:t})}_h(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;if(t&&!l.utils){let s=()=>{l.attachUtils(t)?.catch(()=>{})};if(l.documentReady())s();else{let o=()=>{s()};window.addEventListener("load",o,{signal:this.g.signal})}}else this.d();e===x.AUTO&&i&&!this.selectedCountryData.iso2?this._i():this.b()}_i(){l.autoCountry?this.handleAutoCountry():l.startedLoadingAutoCountry||(l.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((t="")=>{let e=t.toLowerCase();V(e)?(l.autoCountry=e,setTimeout(()=>S("handleAutoCountry"))):(this._d(!0),S("rejectAutoCountryPromise"))},()=>{this._d(!0),S("rejectAutoCountryPromise")}))}_m(){this._l(),this.ui.searchInput.value="+",this._ae("")}_j(){this._p(),this._n(),this._o()}_p(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:n,countrySearch:s}=this.options,o=!1;N.ALPHA_UNICODE.test(this.ui.telInput.value)&&(o=!0);let a=u=>{if(this.i&&u?.data==="+"&&i&&n&&s){let g=this.ui.telInput.selectionStart||0,E=this.ui.telInput.value.substring(0,g-1),b=this.ui.telInput.value.substring(g);this.ui.telInput.value=E+b,this._m();return}this._ai(this.ui.telInput.value)&&this._ar();let d=u?.data&&N.NON_PLUS_NUMERIC.test(u.data),c=u?.inputType===W.PASTE&&this.ui.telInput.value;d||c&&!t?o=!0:N.NON_PLUS_NUMERIC.test(this.ui.telInput.value)||(o=!1);let m=u?.detail&&u.detail.isSetNumber;if(e&&!o&&!m){let g=this.ui.telInput.selectionStart||0,b=this.ui.telInput.value.substring(0,g).replace(N.NON_PLUS_NUMERIC_GLOBAL,"").length,_=u?.inputType===W.DELETE_FWD,f=this._ap(),I=ut(f,this.ui.telInput.value,l.utils,this.selectedCountryData,this.options.separateDialCode),v=dt(b,I,g,_);this.ui.telInput.value=I,this.ui.telInput.setSelectionRange(v,v)}};this.ui.telInput.addEventListener("input",a,{signal:this.g.signal})}_n(){let{strictMode:t,separateDialCode:e,allowDropdown:i,countrySearch:n}=this.options;if(t||e){let s=o=>{if(o.key&&o.key.length===1&&!o.altKey&&!o.ctrlKey&&!o.metaKey){if(e&&i&&n&&o.key==="+"){o.preventDefault(),this._m();return}if(t){let a=this.ui.telInput.value,d=!a.startsWith("+")&&this.ui.telInput.selectionStart===0&&o.key==="+",c=/^[0-9]$/.test(o.key),m=e?c:d||c,g=a.slice(0,this.ui.telInput.selectionStart)+o.key+a.slice(this.ui.telInput.selectionEnd),E=this._ap(g),b=l.utils.getCoreNumber(E,this.selectedCountryData.iso2),_=this.n&&b.length>this.n,I=this._s(E)!==null;(!m||_&&!I&&!d)&&o.preventDefault()}}};this.ui.telInput.addEventListener("keydown",s,{signal:this.g.signal})}}_o(){if(this.options.strictMode){let t=e=>{e.preventDefault();let i=this.ui.telInput,n=i.selectionStart,s=i.selectionEnd,o=i.value.slice(0,n),a=i.value.slice(s),u=this.selectedCountryData.iso2,d=e.clipboardData.getData("text"),c=n===0&&s>0,m=!i.value.startsWith("+")||c,g=d.replace(N.NON_PLUS_NUMERIC_GLOBAL,""),E=g.startsWith("+"),b=g.replace(/\+/g,""),_=E&&m?`+${b}`:b,f=o+_+a,I=l.utils.getCoreNumber(f,u);for(;I.length===0&&f.length>0;)f=f.slice(0,-1),I=l.utils.getCoreNumber(f,u);if(!I)return;if(this.n&&I.length>this.n)if(i.selectionEnd===i.value.length){let ct=I.length-this.n;f=f.slice(0,f.length-ct)}else return;i.value=f;let v=n+_.length;i.setSelectionRange(v,v),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",t,{signal:this.g.signal})}}_k(t){let e=Number(this.ui.telInput.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}_as(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.ui.telInput.dispatchEvent(i)}_l(){let{fixDropdownWidth:t,countrySearch:e}=this.options;if(this.h=new AbortController,t&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"true"),this._x(),e){let i=this.ui.countryList.firstElementChild;i&&(this.ui.highlightListItem(i,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._y(),this.ui.dropdownArrow.classList.add(h.ARROW_UP),this._as(w.OPEN_COUNTRY_DROPDOWN)}_x(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){let t=this.ui.telInput.getBoundingClientRect(),e=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${t.top+e}px`,this.ui.dropdown.style.left=`${t.left}px`;let i=()=>this._am();window.addEventListener("scroll",i,{signal:this.h.signal})}}}_y(){let t=this.h.signal;this._z(t),this._aa(t),this._ab(t),this._ac(t),this.options.countrySearch&&this._ad(t)}_z(t){let e=i=>{let n=i.target?.closest(`.${h.COUNTRY_ITEM}`);n&&this.ui.highlightListItem(n,!1)};this.ui.countryList.addEventListener("mouseover",e,{signal:t})}_aa(t){let e=i=>{let n=i.target?.closest(`.${h.COUNTRY_ITEM}`);n&&this._al(n)};this.ui.countryList.addEventListener("click",e,{signal:t})}_ab(t){let e=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._am()};setTimeout(()=>{document.documentElement.addEventListener("click",e,{signal:t})},0)}_ac(t){let e="",i=null,n=s=>{[y.ARROW_UP,y.ARROW_DOWN,y.ENTER,y.ESC].includes(s.key)&&(s.preventDefault(),s.stopPropagation(),s.key===y.ARROW_UP||s.key===y.ARROW_DOWN?this._af(s.key):s.key===y.ENTER?this._ag():s.key===y.ESC&&this._am()),!this.options.countrySearch&&N.HIDDEN_SEARCH_CHAR.test(s.key)&&(s.stopPropagation(),i&&clearTimeout(i),e+=s.key.toLowerCase(),this._q(e),i=setTimeout(()=>{e=""},X.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",n,{signal:t})}_ad(t){let e=()=>{let o=this.ui.searchInput.value.trim();this._ae(o),this.ui.searchInput.value?this.ui.k.classList.remove(h.HIDE):this.ui.k.classList.add(h.HIDE)},i=null,n=()=>{i&&clearTimeout(i),i=setTimeout(()=>{e(),i=null},100)};this.ui.searchInput.addEventListener("input",n,{signal:t});let s=()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),e()};this.ui.k.addEventListener("click",s,{signal:t})}_q(t){let e=tt(this.countries,t);if(e){let i=e.nodeById[this.id];this.ui.highlightListItem(i,!1),this.ui.scrollTo(i)}}_ae(t){let e;t===""?e=this.countries:e=Z(this.countries,t),this.ui.filterCountries(e)}_af(t){let e=t===y.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!e&&this.ui.countryList.childElementCount>1&&(e=t===y.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),e&&(this.ui.scrollTo(e),this.ui.highlightListItem(e,!1))}_ag(){this.ui.highlightedItem&&this._al(this.ui.highlightedItem)}_ah(t){let e=t;if(this.options.formatOnDisplay&&l.utils&&this.selectedCountryData){let i=this.options.nationalMode||!e.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:n,INTERNATIONAL:s}=l.utils.numberFormat,o=i?n:s;e=l.utils.formatNumber(e,this.selectedCountryData.iso2,o)}e=this._aq(e),this.ui.telInput.value=e}_ai(t){let e=this._s(t);return e!==null?this._aj(e):!1}_r(t){let{dialCode:e,nationalPrefix:i}=this.selectedCountryData;if(t.startsWith("+")||!e)return t;let o=i&&t.startsWith(i)&&!this.options.separateDialCode?t.substring(1):t;return`+${e}${o}`}_s(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.selectedCountryData.iso2,s=this.selectedCountryData.dialCode;i=this._r(i);let o=this._ao(i,!0),a=D(i);if(o){let u=D(o),d=this.dialCodeToIso2Map[u];if(d.length===1)return d[0]===n?null:d[0];if(!n&&this.f&&d.includes(this.f))return this.f;if(s===M.NANP&&z(a))return null;let{areaCodes:m,priority:g}=this.selectedCountryData;if(m){let I=m.map(v=>`${s}${v}`);for(let v of I)if(a.startsWith(v))return null}let b=m&&!(g===0)&&a.length>u.length,_=n&&d.includes(n)&&!b,f=n===d[0];if(!_&&!f)return d[0]}else{if(i.startsWith("+")&&a.length)return"";if((!i||i==="+")&&!n)return this.f}return null}_aj(t){let{separateDialCode:e,showFlags:i,i18n:n}=this.options,s=this.selectedCountryData.iso2||"";if(this.selectedCountryData=t?this.j.get(t):{},this.selectedCountryData.iso2&&(this.f=this.selectedCountryData.iso2),this.ui.selectedCountry){let o=t&&i?`${h.FLAG} iti__${t}`:`${h.FLAG} ${h.GLOBE}`,a,u;if(t){let{name:d,dialCode:c}=this.selectedCountryData;u=d,a=n.selectedCountryAriaLabel.replace("${countryName}",d).replace("${dialCode}",`+${c}`)}else u=n.noCountrySelected,a=n.noCountrySelected;this.ui.selectedCountryInner.className=o,this.ui.selectedCountry.setAttribute("title",u),this.ui.selectedCountry.setAttribute(p.LABEL,a)}if(e){let o=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=o,this.ui.updateInputPadding()}return this._ak(),this._t(),s!==t}_t(){let{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.options,{iso2:n}=this.selectedCountryData;if(t&&l.utils)if(n){let s=l.utils.numberType[e],o=l.utils.getExampleNumber(n,!1,s,!0),a=o;for(;l.utils.isPossibleNumber(o,n,i);)a=o,o+="0";let u=l.utils.getCoreNumber(a,n);this.n=u.length,n==="by"&&(this.n=u.length+1)}else this.n=null}_ak(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.options,s=t===A.AGGRESSIVE||!this.ui.a&&t===A.POLITE;if(l.utils&&s){let o=l.utils.numberType[e],a=this.selectedCountryData.iso2?l.utils.getExampleNumber(this.selectedCountryData.iso2,i,o):"";a=this._aq(a),typeof n=="function"&&(a=n(a,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",a)}}_al(t){let e=t.dataset[$.COUNTRY_CODE],i=this._aj(e);this._am();let n=t.dataset[$.DIAL_CODE];this._an(n),this.options.formatOnDisplay&&this._ah(this.ui.telInput.value),this.ui.telInput.focus(),i&&this._ar()}_am(){this.ui.dropdownContent.classList.contains(h.HIDE)||(this.ui.dropdownContent.classList.add(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"false"),this.ui.highlightedItem&&this.ui.highlightedItem.setAttribute(p.SELECTED,"false"),this.options.countrySearch&&this.ui.searchInput.removeAttribute(p.ACTIVE_DESCENDANT),this.ui.dropdownArrow.classList.remove(h.ARROW_UP),this.h.abort(),this.h=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._as(w.CLOSE_COUNTRY_DROPDOWN))}_an(t){let e=this.ui.telInput.value,i=`+${t}`,n;if(e.startsWith("+")){let s=this._ao(e);s?n=e.replace(s,i):n=i,this.ui.telInput.value=n}}_ao(t,e){let i="";if(t.startsWith("+")){let n="";for(let s=0;s<t.length;s++){let o=t.charAt(s);if(/[0-9]/.test(o)){if(n+=o,!!!this.dialCodeToIso2Map[n])break;if(e)i=t.substring(0,s+1);else if(this.dialCodes.has(n)){i=t.substring(0,s+1);break}if(n.length===this.dialCodeMaxLen)break}}}return i}_ap(t){let e=t||this.ui.telInput.value.trim(),{dialCode:i}=this.selectedCountryData,n,s=D(e);return this.options.separateDialCode&&!e.startsWith("+")&&i&&s?n=`+${i}`:n="",n+e}_aq(t){let e=this._ao(t),i=lt(t,e,this.options.separateDialCode,this.selectedCountryData);return this._k(i)}_ar(){this._as(w.COUNTRY_CHANGE)}handleAutoCountry(){this.options.initialCountry===x.AUTO&&l.autoCountry&&(this.f=l.autoCountry,this.selectedCountryData.iso2||this.ui.selectedCountryInner.classList.contains(h.GLOBE)||this.setCountry(this.f),this.b())}handleUtils(){l.utils&&(this.ui.telInput.value&&this._ah(this.ui.telInput.value),this.selectedCountryData.iso2&&(this._ak(),this._t())),this.d()}destroy(){this.ui.telInput&&(this.options.allowDropdown&&this._am(),this.g.abort(),this.g=null,this.ui.destroy(),l.instances instanceof Map?l.instances.delete(this.id):delete l.instances[this.id])}getExtension(){return l.utils?l.utils.getExtension(this._ap(),this.selectedCountryData.iso2):""}getNumber(t){if(l.utils){let{iso2:e}=this.selectedCountryData;return l.utils.formatNumber(this._ap(),e,t)}return""}getNumberType(){return l.utils?l.utils.getNumberType(this._ap(),this.selectedCountryData.iso2):F.UNKNOWN_NUMBER_TYPE}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(l.utils){let{iso2:t}=this.selectedCountryData;return l.utils.getValidationError(this._ap(),t)}return F.UNKNOWN_VALIDATION_ERROR}isValidNumber(){let{dialCode:t,iso2:e}=this.selectedCountryData;if(t===O.DIAL_CODE&&l.utils){let i=this._ap(),n=l.utils.getCoreNumber(i,e);if(n[0]===O.MOBILE_PREFIX&&n.length!==O.MOBILE_CORE_LENGTH)return!1}return this._v(!1)}isValidNumberPrecise(){return this._v(!0)}_u(t){return l.utils?l.utils.isPossibleNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}_v(t){if(!l.utils)return null;if(!this.selectedCountryData.iso2)return!1;let e=o=>t?this._w(o):this._u(o),i=this._ap(),n=i.search(N.ALPHA_UNICODE);if(n>-1&&!this.options.allowPhonewords){let o=i.substring(0,n),a=e(o),u=e(i);return a&&u}return e(i)}_w(t){return l.utils?l.utils.isValidNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase();if(!V(e))throw new Error(`Invalid country code: '${e}'`);let i=this.selectedCountryData.iso2;(t&&e!==i||!t&&i)&&(this._aj(e),this._an(this.selectedCountryData.dialCode),this.options.formatOnDisplay&&this._ah(this.ui.telInput.value),this._ar())}setNumber(t){let e=this._ai(t);this._ah(t),e&&this._ar(),this._as(w.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._ak()}setDisabled(t){this.ui.telInput.disabled=t,t?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},Dt=r=>{if(!l.utils&&!l.startedLoadingUtilsScript){let t;if(typeof r=="function")try{t=Promise.resolve(r())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof r}`));return l.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return l.utils=i,S("handleUtils"),!0}).catch(e=>{throw S("rejectUtilsScriptPromise",e),e})}return null},S=(r,...t)=>{Object.values(l.instances).forEach(e=>{let i=e[r];typeof i=="function"&&i.apply(e,t)})},l=Object.assign((r,t)=>{let e=new k(r,t);return l.instances[e.id]=e,r.iti=e,e},{defaults:K,documentReady:()=>document.readyState==="complete",getCountryData:()=>L,getInstance:r=>{let t=r.dataset.intlTelInputId;return t?l.instances[t]:null},instances:{},attachUtils:Dt,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.12.1"}),wt=l;return ft(At);})();
28
28
 
29
29
  // UMD
30
30
  return factoryOutput.default;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.11.3
2
+ * International Telephone Input v25.12.1
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -4036,7 +4036,7 @@ var factoryOutput = (() => {
4036
4036
  attachUtils,
4037
4037
  startedLoadingUtilsScript: false,
4038
4038
  startedLoadingAutoCountry: false,
4039
- version: "25.11.3"
4039
+ version: "25.12.1"
4040
4040
  }
4041
4041
  );
4042
4042
  var intl_tel_input_default = intlTelInput;