intl-tel-input 25.10.10 → 25.10.12

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.
@@ -1,32 +1,45 @@
1
- import { mergeModels as S, useModel as E, ref as L, onMounted as M, watch as B, onUnmounted as R, withDirectives as F, createElementBlock as z, openBlock as V, mergeProps as O, vModelText as $ } from "vue";
2
- const U = [
1
+ import { mergeModels as A, useModel as T, ref as N, onMounted as M, watch as B, onUnmounted as F, withDirectives as R, createElementBlock as z, openBlock as V, mergeProps as $, vModelText as U } from "vue";
2
+ const j = [
3
3
  [
4
4
  "af",
5
5
  // Afghanistan
6
- "93"
6
+ "93",
7
+ 0,
8
+ null,
9
+ "0"
7
10
  ],
8
11
  [
9
12
  "ax",
10
13
  // Åland Islands
11
14
  "358",
12
- 1
15
+ 1,
16
+ ["18", "4"],
17
+ // (4 is a mobile range shared with FI)
18
+ "0"
13
19
  ],
14
20
  [
15
21
  "al",
16
22
  // Albania
17
- "355"
23
+ "355",
24
+ 0,
25
+ null,
26
+ "0"
18
27
  ],
19
28
  [
20
29
  "dz",
21
30
  // Algeria
22
- "213"
31
+ "213",
32
+ 0,
33
+ null,
34
+ "0"
23
35
  ],
24
36
  [
25
37
  "as",
26
38
  // American Samoa
27
39
  "1",
28
40
  5,
29
- ["684"]
41
+ ["684"],
42
+ "1"
30
43
  ],
31
44
  [
32
45
  "ad",
@@ -43,24 +56,32 @@ const U = [
43
56
  // Anguilla
44
57
  "1",
45
58
  6,
46
- ["264"]
59
+ ["264"],
60
+ "1"
47
61
  ],
48
62
  [
49
63
  "ag",
50
64
  // Antigua and Barbuda
51
65
  "1",
52
66
  7,
53
- ["268"]
67
+ ["268"],
68
+ "1"
54
69
  ],
55
70
  [
56
71
  "ar",
57
72
  // Argentina
58
- "54"
73
+ "54",
74
+ 0,
75
+ null,
76
+ "0"
59
77
  ],
60
78
  [
61
79
  "am",
62
80
  // Armenia
63
- "374"
81
+ "374",
82
+ 0,
83
+ null,
84
+ "0"
64
85
  ],
65
86
  [
66
87
  "aw",
@@ -77,25 +98,33 @@ const U = [
77
98
  // Australia
78
99
  "61",
79
100
  0,
80
- null,
101
+ ["4"],
102
+ // (mobile range shared with CX and CC)
81
103
  "0"
82
104
  ],
83
105
  [
84
106
  "at",
85
107
  // Austria
86
- "43"
108
+ "43",
109
+ 0,
110
+ null,
111
+ "0"
87
112
  ],
88
113
  [
89
114
  "az",
90
115
  // Azerbaijan
91
- "994"
116
+ "994",
117
+ 0,
118
+ null,
119
+ "0"
92
120
  ],
93
121
  [
94
122
  "bs",
95
123
  // Bahamas
96
124
  "1",
97
125
  8,
98
- ["242"]
126
+ ["242"],
127
+ "1"
99
128
  ],
100
129
  [
101
130
  "bh",
@@ -105,24 +134,34 @@ const U = [
105
134
  [
106
135
  "bd",
107
136
  // Bangladesh
108
- "880"
137
+ "880",
138
+ 0,
139
+ null,
140
+ "0"
109
141
  ],
110
142
  [
111
143
  "bb",
112
144
  // Barbados
113
145
  "1",
114
146
  9,
115
- ["246"]
147
+ ["246"],
148
+ "1"
116
149
  ],
117
150
  [
118
151
  "by",
119
152
  // Belarus
120
- "375"
153
+ "375",
154
+ 0,
155
+ null,
156
+ "8"
121
157
  ],
122
158
  [
123
159
  "be",
124
160
  // Belgium
125
- "32"
161
+ "32",
162
+ 0,
163
+ null,
164
+ "0"
126
165
  ],
127
166
  [
128
167
  "bz",
@@ -139,7 +178,8 @@ const U = [
139
178
  // Bermuda
140
179
  "1",
141
180
  10,
142
- ["441"]
181
+ ["441"],
182
+ "1"
143
183
  ],
144
184
  [
145
185
  "bt",
@@ -149,12 +189,18 @@ const U = [
149
189
  [
150
190
  "bo",
151
191
  // Bolivia
152
- "591"
192
+ "591",
193
+ 0,
194
+ null,
195
+ "0"
153
196
  ],
154
197
  [
155
198
  "ba",
156
199
  // Bosnia and Herzegovina
157
- "387"
200
+ "387",
201
+ 0,
202
+ null,
203
+ "0"
158
204
  ],
159
205
  [
160
206
  "bw",
@@ -164,7 +210,10 @@ const U = [
164
210
  [
165
211
  "br",
166
212
  // Brazil
167
- "55"
213
+ "55",
214
+ 0,
215
+ null,
216
+ "0"
168
217
  ],
169
218
  [
170
219
  "io",
@@ -176,7 +225,8 @@ const U = [
176
225
  // British Virgin Islands
177
226
  "1",
178
227
  11,
179
- ["284"]
228
+ ["284"],
229
+ "1"
180
230
  ],
181
231
  [
182
232
  "bn",
@@ -186,7 +236,10 @@ const U = [
186
236
  [
187
237
  "bg",
188
238
  // Bulgaria
189
- "359"
239
+ "359",
240
+ 0,
241
+ null,
242
+ "0"
190
243
  ],
191
244
  [
192
245
  "bf",
@@ -201,7 +254,10 @@ const U = [
201
254
  [
202
255
  "kh",
203
256
  // Cambodia
204
- "855"
257
+ "855",
258
+ 0,
259
+ null,
260
+ "0"
205
261
  ],
206
262
  [
207
263
  "cm",
@@ -213,7 +269,8 @@ const U = [
213
269
  // Canada
214
270
  "1",
215
271
  1,
216
- ["204", "226", "236", "249", "250", "263", "289", "306", "343", "354", "365", "367", "368", "382", "387", "403", "416", "418", "428", "431", "437", "438", "450", "584", "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"]
272
+ ["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"],
273
+ "1"
217
274
  ],
218
275
  [
219
276
  "cv",
@@ -232,7 +289,8 @@ const U = [
232
289
  // Cayman Islands
233
290
  "1",
234
291
  12,
235
- ["345"]
292
+ ["345"],
293
+ "1"
236
294
  ],
237
295
  [
238
296
  "cf",
@@ -252,14 +310,18 @@ const U = [
252
310
  [
253
311
  "cn",
254
312
  // China
255
- "86"
313
+ "86",
314
+ 0,
315
+ null,
316
+ "0"
256
317
  ],
257
318
  [
258
319
  "cx",
259
320
  // Christmas Island
260
321
  "61",
261
322
  2,
262
- ["89164"],
323
+ ["4", "89164"],
324
+ // (4 is a mobile range shared with AU and CC)
263
325
  "0"
264
326
  ],
265
327
  [
@@ -267,13 +329,17 @@ const U = [
267
329
  // Cocos (Keeling) Islands
268
330
  "61",
269
331
  1,
270
- ["89162"],
332
+ ["4", "89162"],
333
+ // (4 is a mobile range shared with AU and CX)
271
334
  "0"
272
335
  ],
273
336
  [
274
337
  "co",
275
338
  // Colombia
276
- "57"
339
+ "57",
340
+ 0,
341
+ null,
342
+ "0"
277
343
  ],
278
344
  [
279
345
  "km",
@@ -288,7 +354,10 @@ const U = [
288
354
  [
289
355
  "cd",
290
356
  // Congo (Kinshasa)
291
- "243"
357
+ "243",
358
+ 0,
359
+ null,
360
+ "0"
292
361
  ],
293
362
  [
294
363
  "ck",
@@ -308,12 +377,18 @@ const U = [
308
377
  [
309
378
  "hr",
310
379
  // Croatia
311
- "385"
380
+ "385",
381
+ 0,
382
+ null,
383
+ "0"
312
384
  ],
313
385
  [
314
386
  "cu",
315
387
  // Cuba
316
- "53"
388
+ "53",
389
+ 0,
390
+ null,
391
+ "0"
317
392
  ],
318
393
  [
319
394
  "cw",
@@ -346,24 +421,32 @@ const U = [
346
421
  // Dominica
347
422
  "1",
348
423
  13,
349
- ["767"]
424
+ ["767"],
425
+ "1"
350
426
  ],
351
427
  [
352
428
  "do",
353
429
  // Dominican Republic
354
430
  "1",
355
431
  2,
356
- ["809", "829", "849"]
432
+ ["809", "829", "849"],
433
+ "1"
357
434
  ],
358
435
  [
359
436
  "ec",
360
437
  // Ecuador
361
- "593"
438
+ "593",
439
+ 0,
440
+ null,
441
+ "0"
362
442
  ],
363
443
  [
364
444
  "eg",
365
445
  // Egypt
366
- "20"
446
+ "20",
447
+ 0,
448
+ null,
449
+ "0"
367
450
  ],
368
451
  [
369
452
  "sv",
@@ -378,7 +461,10 @@ const U = [
378
461
  [
379
462
  "er",
380
463
  // Eritrea
381
- "291"
464
+ "291",
465
+ 0,
466
+ null,
467
+ "0"
382
468
  ],
383
469
  [
384
470
  "ee",
@@ -393,7 +479,10 @@ const U = [
393
479
  [
394
480
  "et",
395
481
  // Ethiopia
396
- "251"
482
+ "251",
483
+ 0,
484
+ null,
485
+ "0"
397
486
  ],
398
487
  [
399
488
  "fk",
@@ -414,17 +503,26 @@ const U = [
414
503
  "fi",
415
504
  // Finland
416
505
  "358",
417
- 0
506
+ 0,
507
+ ["4"],
508
+ // (mobile range shared with AX)
509
+ "0"
418
510
  ],
419
511
  [
420
512
  "fr",
421
513
  // France
422
- "33"
514
+ "33",
515
+ 0,
516
+ null,
517
+ "0"
423
518
  ],
424
519
  [
425
520
  "gf",
426
521
  // French Guiana
427
- "594"
522
+ "594",
523
+ 0,
524
+ null,
525
+ "0"
428
526
  ],
429
527
  [
430
528
  "pf",
@@ -444,17 +542,26 @@ const U = [
444
542
  [
445
543
  "ge",
446
544
  // Georgia
447
- "995"
545
+ "995",
546
+ 0,
547
+ null,
548
+ "0"
448
549
  ],
449
550
  [
450
551
  "de",
451
552
  // Germany
452
- "49"
553
+ "49",
554
+ 0,
555
+ null,
556
+ "0"
453
557
  ],
454
558
  [
455
559
  "gh",
456
560
  // Ghana
457
- "233"
561
+ "233",
562
+ 0,
563
+ null,
564
+ "0"
458
565
  ],
459
566
  [
460
567
  "gi",
@@ -476,20 +583,24 @@ const U = [
476
583
  // Grenada
477
584
  "1",
478
585
  14,
479
- ["473"]
586
+ ["473"],
587
+ "1"
480
588
  ],
481
589
  [
482
590
  "gp",
483
591
  // Guadeloupe
484
592
  "590",
485
- 0
593
+ 0,
594
+ null,
595
+ "0"
486
596
  ],
487
597
  [
488
598
  "gu",
489
599
  // Guam
490
600
  "1",
491
601
  15,
492
- ["671"]
602
+ ["671"],
603
+ "1"
493
604
  ],
494
605
  [
495
606
  "gt",
@@ -537,7 +648,10 @@ const U = [
537
648
  [
538
649
  "hu",
539
650
  // Hungary
540
- "36"
651
+ "36",
652
+ 0,
653
+ null,
654
+ "06"
541
655
  ],
542
656
  [
543
657
  "is",
@@ -547,58 +661,82 @@ const U = [
547
661
  [
548
662
  "in",
549
663
  // India
550
- "91"
664
+ "91",
665
+ 0,
666
+ null,
667
+ "0"
551
668
  ],
552
669
  [
553
670
  "id",
554
671
  // Indonesia
555
- "62"
672
+ "62",
673
+ 0,
674
+ null,
675
+ "0"
556
676
  ],
557
677
  [
558
678
  "ir",
559
679
  // Iran
560
- "98"
680
+ "98",
681
+ 0,
682
+ null,
683
+ "0"
561
684
  ],
562
685
  [
563
686
  "iq",
564
687
  // Iraq
565
- "964"
688
+ "964",
689
+ 0,
690
+ null,
691
+ "0"
566
692
  ],
567
693
  [
568
694
  "ie",
569
695
  // Ireland
570
- "353"
696
+ "353",
697
+ 0,
698
+ null,
699
+ "0"
571
700
  ],
572
701
  [
573
702
  "im",
574
703
  // Isle of Man
575
704
  "44",
576
705
  2,
577
- ["1624", "74576", "7524", "7924", "7624"],
706
+ ["1624", "74576", "7524", "7624", "7924"],
578
707
  "0"
579
708
  ],
580
709
  [
581
710
  "il",
582
711
  // Israel
583
- "972"
712
+ "972",
713
+ 0,
714
+ null,
715
+ "0"
584
716
  ],
585
717
  [
586
718
  "it",
587
719
  // Italy
588
720
  "39",
589
- 0
721
+ 0,
722
+ ["3"]
723
+ // (mobile range shared with VA)
590
724
  ],
591
725
  [
592
726
  "jm",
593
727
  // Jamaica
594
728
  "1",
595
729
  4,
596
- ["876", "658"]
730
+ ["658", "876"],
731
+ "1"
597
732
  ],
598
733
  [
599
734
  "jp",
600
735
  // Japan
601
- "81"
736
+ "81",
737
+ 0,
738
+ null,
739
+ "0"
602
740
  ],
603
741
  [
604
742
  "je",
@@ -611,7 +749,10 @@ const U = [
611
749
  [
612
750
  "jo",
613
751
  // Jordan
614
- "962"
752
+ "962",
753
+ 0,
754
+ null,
755
+ "0"
615
756
  ],
616
757
  [
617
758
  "kz",
@@ -619,22 +760,32 @@ const U = [
619
760
  "7",
620
761
  1,
621
762
  ["33", "7"],
763
+ // (33 is shared with RU)
622
764
  "8"
623
765
  ],
624
766
  [
625
767
  "ke",
626
768
  // Kenya
627
- "254"
769
+ "254",
770
+ 0,
771
+ null,
772
+ "0"
628
773
  ],
629
774
  [
630
775
  "ki",
631
776
  // Kiribati
632
- "686"
777
+ "686",
778
+ 0,
779
+ null,
780
+ "0"
633
781
  ],
634
782
  [
635
783
  "xk",
636
784
  // Kosovo
637
- "383"
785
+ "383",
786
+ 0,
787
+ null,
788
+ "0"
638
789
  ],
639
790
  [
640
791
  "kw",
@@ -644,12 +795,18 @@ const U = [
644
795
  [
645
796
  "kg",
646
797
  // Kyrgyzstan
647
- "996"
798
+ "996",
799
+ 0,
800
+ null,
801
+ "0"
648
802
  ],
649
803
  [
650
804
  "la",
651
805
  // Laos
652
- "856"
806
+ "856",
807
+ 0,
808
+ null,
809
+ "0"
653
810
  ],
654
811
  [
655
812
  "lv",
@@ -659,7 +816,10 @@ const U = [
659
816
  [
660
817
  "lb",
661
818
  // Lebanon
662
- "961"
819
+ "961",
820
+ 0,
821
+ null,
822
+ "0"
663
823
  ],
664
824
  [
665
825
  "ls",
@@ -669,22 +829,34 @@ const U = [
669
829
  [
670
830
  "lr",
671
831
  // Liberia
672
- "231"
832
+ "231",
833
+ 0,
834
+ null,
835
+ "0"
673
836
  ],
674
837
  [
675
838
  "ly",
676
839
  // Libya
677
- "218"
840
+ "218",
841
+ 0,
842
+ null,
843
+ "0"
678
844
  ],
679
845
  [
680
846
  "li",
681
847
  // Liechtenstein
682
- "423"
848
+ "423",
849
+ 0,
850
+ null,
851
+ "0"
683
852
  ],
684
853
  [
685
854
  "lt",
686
855
  // Lithuania
687
- "370"
856
+ "370",
857
+ 0,
858
+ null,
859
+ "0"
688
860
  ],
689
861
  [
690
862
  "lu",
@@ -699,17 +871,26 @@ const U = [
699
871
  [
700
872
  "mg",
701
873
  // Madagascar
702
- "261"
874
+ "261",
875
+ 0,
876
+ null,
877
+ "0"
703
878
  ],
704
879
  [
705
880
  "mw",
706
881
  // Malawi
707
- "265"
882
+ "265",
883
+ 0,
884
+ null,
885
+ "0"
708
886
  ],
709
887
  [
710
888
  "my",
711
889
  // Malaysia
712
- "60"
890
+ "60",
891
+ 0,
892
+ null,
893
+ "0"
713
894
  ],
714
895
  [
715
896
  "mv",
@@ -729,12 +910,18 @@ const U = [
729
910
  [
730
911
  "mh",
731
912
  // Marshall Islands
732
- "692"
913
+ "692",
914
+ 0,
915
+ null,
916
+ "1"
733
917
  ],
734
918
  [
735
919
  "mq",
736
920
  // Martinique
737
- "596"
921
+ "596",
922
+ 0,
923
+ null,
924
+ "0"
738
925
  ],
739
926
  [
740
927
  "mr",
@@ -767,36 +954,50 @@ const U = [
767
954
  [
768
955
  "md",
769
956
  // Moldova
770
- "373"
957
+ "373",
958
+ 0,
959
+ null,
960
+ "0"
771
961
  ],
772
962
  [
773
963
  "mc",
774
964
  // Monaco
775
- "377"
965
+ "377",
966
+ 0,
967
+ null,
968
+ "0"
776
969
  ],
777
970
  [
778
971
  "mn",
779
972
  // Mongolia
780
- "976"
973
+ "976",
974
+ 0,
975
+ null,
976
+ "0"
781
977
  ],
782
978
  [
783
979
  "me",
784
980
  // Montenegro
785
- "382"
981
+ "382",
982
+ 0,
983
+ null,
984
+ "0"
786
985
  ],
787
986
  [
788
987
  "ms",
789
988
  // Montserrat
790
989
  "1",
791
990
  16,
792
- ["664"]
991
+ ["664"],
992
+ "1"
793
993
  ],
794
994
  [
795
995
  "ma",
796
996
  // Morocco
797
997
  "212",
798
998
  0,
799
- null,
999
+ ["6", "7"],
1000
+ // (mobile ranges shared with EH)
800
1001
  "0"
801
1002
  ],
802
1003
  [
@@ -807,12 +1008,18 @@ const U = [
807
1008
  [
808
1009
  "mm",
809
1010
  // Myanmar (Burma)
810
- "95"
1011
+ "95",
1012
+ 0,
1013
+ null,
1014
+ "0"
811
1015
  ],
812
1016
  [
813
1017
  "na",
814
1018
  // Namibia
815
- "264"
1019
+ "264",
1020
+ 0,
1021
+ null,
1022
+ "0"
816
1023
  ],
817
1024
  [
818
1025
  "nr",
@@ -822,12 +1029,18 @@ const U = [
822
1029
  [
823
1030
  "np",
824
1031
  // Nepal
825
- "977"
1032
+ "977",
1033
+ 0,
1034
+ null,
1035
+ "0"
826
1036
  ],
827
1037
  [
828
1038
  "nl",
829
1039
  // Netherlands
830
- "31"
1040
+ "31",
1041
+ 0,
1042
+ null,
1043
+ "0"
831
1044
  ],
832
1045
  [
833
1046
  "nc",
@@ -837,7 +1050,10 @@ const U = [
837
1050
  [
838
1051
  "nz",
839
1052
  // New Zealand
840
- "64"
1053
+ "64",
1054
+ 0,
1055
+ null,
1056
+ "0"
841
1057
  ],
842
1058
  [
843
1059
  "ni",
@@ -852,7 +1068,10 @@ const U = [
852
1068
  [
853
1069
  "ng",
854
1070
  // Nigeria
855
- "234"
1071
+ "234",
1072
+ 0,
1073
+ null,
1074
+ "0"
856
1075
  ],
857
1076
  [
858
1077
  "nu",
@@ -867,25 +1086,34 @@ const U = [
867
1086
  [
868
1087
  "kp",
869
1088
  // North Korea
870
- "850"
1089
+ "850",
1090
+ 0,
1091
+ null,
1092
+ "0"
871
1093
  ],
872
1094
  [
873
1095
  "mk",
874
1096
  // North Macedonia
875
- "389"
1097
+ "389",
1098
+ 0,
1099
+ null,
1100
+ "0"
876
1101
  ],
877
1102
  [
878
1103
  "mp",
879
1104
  // Northern Mariana Islands
880
1105
  "1",
881
1106
  17,
882
- ["670"]
1107
+ ["670"],
1108
+ "1"
883
1109
  ],
884
1110
  [
885
1111
  "no",
886
1112
  // Norway
887
1113
  "47",
888
- 0
1114
+ 0,
1115
+ ["4", "9"]
1116
+ // (mobile ranges shared with SJ)
889
1117
  ],
890
1118
  [
891
1119
  "om",
@@ -895,7 +1123,10 @@ const U = [
895
1123
  [
896
1124
  "pk",
897
1125
  // Pakistan
898
- "92"
1126
+ "92",
1127
+ 0,
1128
+ null,
1129
+ "0"
899
1130
  ],
900
1131
  [
901
1132
  "pw",
@@ -905,7 +1136,10 @@ const U = [
905
1136
  [
906
1137
  "ps",
907
1138
  // Palestinian Territories
908
- "970"
1139
+ "970",
1140
+ 0,
1141
+ null,
1142
+ "0"
909
1143
  ],
910
1144
  [
911
1145
  "pa",
@@ -920,17 +1154,26 @@ const U = [
920
1154
  [
921
1155
  "py",
922
1156
  // Paraguay
923
- "595"
1157
+ "595",
1158
+ 0,
1159
+ null,
1160
+ "0"
924
1161
  ],
925
1162
  [
926
1163
  "pe",
927
1164
  // Peru
928
- "51"
1165
+ "51",
1166
+ 0,
1167
+ null,
1168
+ "0"
929
1169
  ],
930
1170
  [
931
1171
  "ph",
932
1172
  // Philippines
933
- "63"
1173
+ "63",
1174
+ 0,
1175
+ null,
1176
+ "0"
934
1177
  ],
935
1178
  [
936
1179
  "pl",
@@ -947,7 +1190,8 @@ const U = [
947
1190
  // Puerto Rico
948
1191
  "1",
949
1192
  3,
950
- ["787", "939"]
1193
+ ["787", "939"],
1194
+ "1"
951
1195
  ],
952
1196
  [
953
1197
  "qa",
@@ -965,20 +1209,27 @@ const U = [
965
1209
  [
966
1210
  "ro",
967
1211
  // Romania
968
- "40"
1212
+ "40",
1213
+ 0,
1214
+ null,
1215
+ "0"
969
1216
  ],
970
1217
  [
971
1218
  "ru",
972
1219
  // Russia
973
1220
  "7",
974
1221
  0,
975
- null,
1222
+ ["33"],
1223
+ // (shared with KZ)
976
1224
  "8"
977
1225
  ],
978
1226
  [
979
1227
  "rw",
980
1228
  // Rwanda
981
- "250"
1229
+ "250",
1230
+ 0,
1231
+ null,
1232
+ "0"
982
1233
  ],
983
1234
  [
984
1235
  "ws",
@@ -998,7 +1249,10 @@ const U = [
998
1249
  [
999
1250
  "sa",
1000
1251
  // Saudi Arabia
1001
- "966"
1252
+ "966",
1253
+ 0,
1254
+ null,
1255
+ "0"
1002
1256
  ],
1003
1257
  [
1004
1258
  "sn",
@@ -1008,7 +1262,10 @@ const U = [
1008
1262
  [
1009
1263
  "rs",
1010
1264
  // Serbia
1011
- "381"
1265
+ "381",
1266
+ 0,
1267
+ null,
1268
+ "0"
1012
1269
  ],
1013
1270
  [
1014
1271
  "sc",
@@ -1018,7 +1275,10 @@ const U = [
1018
1275
  [
1019
1276
  "sl",
1020
1277
  // Sierra Leone
1021
- "232"
1278
+ "232",
1279
+ 0,
1280
+ null,
1281
+ "0"
1022
1282
  ],
1023
1283
  [
1024
1284
  "sg",
@@ -1030,17 +1290,24 @@ const U = [
1030
1290
  // Sint Maarten
1031
1291
  "1",
1032
1292
  21,
1033
- ["721"]
1293
+ ["721"],
1294
+ "1"
1034
1295
  ],
1035
1296
  [
1036
1297
  "sk",
1037
1298
  // Slovakia
1038
- "421"
1299
+ "421",
1300
+ 0,
1301
+ null,
1302
+ "0"
1039
1303
  ],
1040
1304
  [
1041
1305
  "si",
1042
1306
  // Slovenia
1043
- "386"
1307
+ "386",
1308
+ 0,
1309
+ null,
1310
+ "0"
1044
1311
  ],
1045
1312
  [
1046
1313
  "sb",
@@ -1050,22 +1317,34 @@ const U = [
1050
1317
  [
1051
1318
  "so",
1052
1319
  // Somalia
1053
- "252"
1320
+ "252",
1321
+ 0,
1322
+ null,
1323
+ "0"
1054
1324
  ],
1055
1325
  [
1056
1326
  "za",
1057
1327
  // South Africa
1058
- "27"
1328
+ "27",
1329
+ 0,
1330
+ null,
1331
+ "0"
1059
1332
  ],
1060
1333
  [
1061
1334
  "kr",
1062
1335
  // South Korea
1063
- "82"
1336
+ "82",
1337
+ 0,
1338
+ null,
1339
+ "0"
1064
1340
  ],
1065
1341
  [
1066
1342
  "ss",
1067
1343
  // South Sudan
1068
- "211"
1344
+ "211",
1345
+ 0,
1346
+ null,
1347
+ "0"
1069
1348
  ],
1070
1349
  [
1071
1350
  "es",
@@ -1075,13 +1354,18 @@ const U = [
1075
1354
  [
1076
1355
  "lk",
1077
1356
  // Sri Lanka
1078
- "94"
1357
+ "94",
1358
+ 0,
1359
+ null,
1360
+ "0"
1079
1361
  ],
1080
1362
  [
1081
1363
  "bl",
1082
1364
  // St. Barthélemy
1083
1365
  "590",
1084
- 1
1366
+ 1,
1367
+ null,
1368
+ "0"
1085
1369
  ],
1086
1370
  [
1087
1371
  "sh",
@@ -1093,37 +1377,48 @@ const U = [
1093
1377
  // St. Kitts & Nevis
1094
1378
  "1",
1095
1379
  18,
1096
- ["869"]
1380
+ ["869"],
1381
+ "1"
1097
1382
  ],
1098
1383
  [
1099
1384
  "lc",
1100
1385
  // St. Lucia
1101
1386
  "1",
1102
1387
  19,
1103
- ["758"]
1388
+ ["758"],
1389
+ "1"
1104
1390
  ],
1105
1391
  [
1106
1392
  "mf",
1107
1393
  // St. Martin
1108
1394
  "590",
1109
- 2
1395
+ 2,
1396
+ null,
1397
+ "0"
1110
1398
  ],
1111
1399
  [
1112
1400
  "pm",
1113
1401
  // St. Pierre & Miquelon
1114
- "508"
1402
+ "508",
1403
+ 0,
1404
+ null,
1405
+ "0"
1115
1406
  ],
1116
1407
  [
1117
1408
  "vc",
1118
1409
  // St. Vincent & Grenadines
1119
1410
  "1",
1120
1411
  20,
1121
- ["784"]
1412
+ ["784"],
1413
+ "1"
1122
1414
  ],
1123
1415
  [
1124
1416
  "sd",
1125
1417
  // Sudan
1126
- "249"
1418
+ "249",
1419
+ 0,
1420
+ null,
1421
+ "0"
1127
1422
  ],
1128
1423
  [
1129
1424
  "sr",
@@ -1135,27 +1430,40 @@ const U = [
1135
1430
  // Svalbard & Jan Mayen
1136
1431
  "47",
1137
1432
  1,
1138
- ["79"]
1433
+ ["4", "79", "9"]
1434
+ // (4 and 9 are mobile ranges shared with NO)
1139
1435
  ],
1140
1436
  [
1141
1437
  "se",
1142
1438
  // Sweden
1143
- "46"
1439
+ "46",
1440
+ 0,
1441
+ null,
1442
+ "0"
1144
1443
  ],
1145
1444
  [
1146
1445
  "ch",
1147
1446
  // Switzerland
1148
- "41"
1447
+ "41",
1448
+ 0,
1449
+ null,
1450
+ "0"
1149
1451
  ],
1150
1452
  [
1151
1453
  "sy",
1152
1454
  // Syria
1153
- "963"
1455
+ "963",
1456
+ 0,
1457
+ null,
1458
+ "0"
1154
1459
  ],
1155
1460
  [
1156
1461
  "tw",
1157
1462
  // Taiwan
1158
- "886"
1463
+ "886",
1464
+ 0,
1465
+ null,
1466
+ "0"
1159
1467
  ],
1160
1468
  [
1161
1469
  "tj",
@@ -1165,12 +1473,18 @@ const U = [
1165
1473
  [
1166
1474
  "tz",
1167
1475
  // Tanzania
1168
- "255"
1476
+ "255",
1477
+ 0,
1478
+ null,
1479
+ "0"
1169
1480
  ],
1170
1481
  [
1171
1482
  "th",
1172
1483
  // Thailand
1173
- "66"
1484
+ "66",
1485
+ 0,
1486
+ null,
1487
+ "0"
1174
1488
  ],
1175
1489
  [
1176
1490
  "tl",
@@ -1197,7 +1511,8 @@ const U = [
1197
1511
  // Trinidad & Tobago
1198
1512
  "1",
1199
1513
  22,
1200
- ["868"]
1514
+ ["868"],
1515
+ "1"
1201
1516
  ],
1202
1517
  [
1203
1518
  "tn",
@@ -1207,19 +1522,26 @@ const U = [
1207
1522
  [
1208
1523
  "tr",
1209
1524
  // Turkey
1210
- "90"
1525
+ "90",
1526
+ 0,
1527
+ null,
1528
+ "0"
1211
1529
  ],
1212
1530
  [
1213
1531
  "tm",
1214
1532
  // Turkmenistan
1215
- "993"
1533
+ "993",
1534
+ 0,
1535
+ null,
1536
+ "8"
1216
1537
  ],
1217
1538
  [
1218
1539
  "tc",
1219
1540
  // Turks & Caicos Islands
1220
1541
  "1",
1221
1542
  23,
1222
- ["649"]
1543
+ ["649"],
1544
+ "1"
1223
1545
  ],
1224
1546
  [
1225
1547
  "tv",
@@ -1231,22 +1553,32 @@ const U = [
1231
1553
  // U.S. Virgin Islands
1232
1554
  "1",
1233
1555
  24,
1234
- ["340"]
1556
+ ["340"],
1557
+ "1"
1235
1558
  ],
1236
1559
  [
1237
1560
  "ug",
1238
1561
  // Uganda
1239
- "256"
1562
+ "256",
1563
+ 0,
1564
+ null,
1565
+ "0"
1240
1566
  ],
1241
1567
  [
1242
1568
  "ua",
1243
1569
  // Ukraine
1244
- "380"
1570
+ "380",
1571
+ 0,
1572
+ null,
1573
+ "0"
1245
1574
  ],
1246
1575
  [
1247
1576
  "ae",
1248
1577
  // United Arab Emirates
1249
- "971"
1578
+ "971",
1579
+ 0,
1580
+ null,
1581
+ "0"
1250
1582
  ],
1251
1583
  [
1252
1584
  "gb",
@@ -1260,12 +1592,17 @@ const U = [
1260
1592
  "us",
1261
1593
  // United States
1262
1594
  "1",
1263
- 0
1595
+ 0,
1596
+ null,
1597
+ "1"
1264
1598
  ],
1265
1599
  [
1266
1600
  "uy",
1267
1601
  // Uruguay
1268
- "598"
1602
+ "598",
1603
+ 0,
1604
+ null,
1605
+ "0"
1269
1606
  ],
1270
1607
  [
1271
1608
  "uz",
@@ -1282,17 +1619,24 @@ const U = [
1282
1619
  // Vatican City
1283
1620
  "39",
1284
1621
  1,
1285
- ["06698"]
1622
+ ["06698", "3"]
1623
+ // (3 is a mobile range shared with IT)
1286
1624
  ],
1287
1625
  [
1288
1626
  "ve",
1289
1627
  // Venezuela
1290
- "58"
1628
+ "58",
1629
+ 0,
1630
+ null,
1631
+ "0"
1291
1632
  ],
1292
1633
  [
1293
1634
  "vn",
1294
1635
  // Vietnam
1295
- "84"
1636
+ "84",
1637
+ 0,
1638
+ null,
1639
+ "0"
1296
1640
  ],
1297
1641
  [
1298
1642
  "wf",
@@ -1304,26 +1648,36 @@ const U = [
1304
1648
  // Western Sahara
1305
1649
  "212",
1306
1650
  1,
1307
- ["5288", "5289"],
1651
+ ["5288", "5289", "6", "7"],
1652
+ // (6 and 7 are mobile ranges shared with MA)
1308
1653
  "0"
1309
1654
  ],
1310
1655
  [
1311
1656
  "ye",
1312
1657
  // Yemen
1313
- "967"
1658
+ "967",
1659
+ 0,
1660
+ null,
1661
+ "0"
1314
1662
  ],
1315
1663
  [
1316
1664
  "zm",
1317
1665
  // Zambia
1318
- "260"
1666
+ "260",
1667
+ 0,
1668
+ null,
1669
+ "0"
1319
1670
  ],
1320
1671
  [
1321
1672
  "zw",
1322
1673
  // Zimbabwe
1323
- "263"
1674
+ "263",
1675
+ 0,
1676
+ null,
1677
+ "0"
1324
1678
  ]
1325
1679
  ], _ = [];
1326
- for (const r of U)
1680
+ for (const r of j)
1327
1681
  _.push({
1328
1682
  name: "",
1329
1683
  // populated in the plugin
@@ -1335,7 +1689,7 @@ for (const r of U)
1335
1689
  // populated by the plugin
1336
1690
  nationalPrefix: r[4] || null
1337
1691
  });
1338
- const j = {
1692
+ const O = {
1339
1693
  ad: "Andorra",
1340
1694
  ae: "United Arab Emirates",
1341
1695
  af: "Afghanistan",
@@ -1590,13 +1944,13 @@ const j = {
1590
1944
  // additional countries (not supported by country-list library)
1591
1945
  ac: "Ascension Island",
1592
1946
  xk: "Kosovo"
1593
- }, k = { ...j, ...H }, N = (r) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(r).matches, K = () => {
1947
+ }, P = { ...O, ...H }, D = (r) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(r).matches, K = () => {
1594
1948
  if (typeof navigator < "u" && typeof window < "u") {
1595
- const r = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), t = N("(max-width: 500px)"), e = N("(max-height: 600px)"), i = N("(pointer: coarse)");
1596
- return r || t || i && e;
1949
+ const r = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), e = D("(max-width: 500px)"), t = D("(max-height: 600px)"), i = D("(pointer: coarse)");
1950
+ return r || e || i && t;
1597
1951
  }
1598
1952
  return !1;
1599
- }, P = {
1953
+ }, x = {
1600
1954
  // Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
1601
1955
  allowPhonewords: !1,
1602
1956
  //* Whether or not to allow the dropdown.
@@ -1649,99 +2003,105 @@ const j = {
1649
2003
  validationNumberTypes: ["MOBILE"]
1650
2004
  };
1651
2005
  function W(r) {
1652
- r.useFullscreenPopup && (r.fixDropdownWidth = !1), r.onlyCountries.length === 1 && (r.initialCountry = r.onlyCountries[0]), r.separateDialCode && (r.nationalMode = !1), r.allowDropdown && !r.showFlags && !r.separateDialCode && (r.nationalMode = !1), r.useFullscreenPopup && !r.dropdownContainer && (r.dropdownContainer = document.body), r.i18n = { ...k, ...r.i18n };
2006
+ r.useFullscreenPopup && (r.fixDropdownWidth = !1), r.onlyCountries.length === 1 && (r.initialCountry = r.onlyCountries[0]), r.separateDialCode && (r.nationalMode = !1), r.allowDropdown && !r.showFlags && !r.separateDialCode && (r.nationalMode = !1), r.useFullscreenPopup && !r.dropdownContainer && (r.dropdownContainer = document.body), r.i18n = { ...P, ...r.i18n };
1653
2007
  }
1654
- const I = (r) => r.replace(/\D/g, ""), x = (r = "") => r.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), m = (r, t, e) => {
2008
+ const I = (r) => r.replace(/\D/g, ""), E = (r = "") => r.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), m = (r, e, t) => {
1655
2009
  const i = document.createElement(r);
1656
- return t && Object.entries(t).forEach(([s, n]) => i.setAttribute(s, n)), e && e.appendChild(i), i;
2010
+ return e && Object.entries(e).forEach(([n, s]) => i.setAttribute(n, s)), t && t.appendChild(i), i;
1657
2011
  };
1658
2012
  function G(r) {
1659
- const { onlyCountries: t, excludeCountries: e } = r;
1660
- if (t.length) {
1661
- const i = t.map((s) => s.toLowerCase());
1662
- return _.filter((s) => i.includes(s.iso2));
1663
- } else if (e.length) {
1664
- const i = e.map((s) => s.toLowerCase());
1665
- return _.filter((s) => !i.includes(s.iso2));
2013
+ const { onlyCountries: e, excludeCountries: t } = r;
2014
+ if (e.length) {
2015
+ const i = e.map((n) => n.toLowerCase());
2016
+ return _.filter((n) => i.includes(n.iso2));
2017
+ } else if (t.length) {
2018
+ const i = t.map((n) => n.toLowerCase());
2019
+ return _.filter((n) => !i.includes(n.iso2));
1666
2020
  }
1667
2021
  return _;
1668
2022
  }
1669
- function q(r, t) {
1670
- for (const e of r) {
1671
- const i = e.iso2.toLowerCase();
1672
- t.i18n[i] && (e.name = t.i18n[i]);
2023
+ function q(r, e) {
2024
+ for (const t of r) {
2025
+ const i = t.iso2.toLowerCase();
2026
+ e.i18n[i] && (t.name = e.i18n[i]);
1673
2027
  }
1674
2028
  }
1675
- function Y(r, t) {
1676
- const e = /* @__PURE__ */ new Set();
2029
+ function Y(r, e) {
2030
+ const t = /* @__PURE__ */ new Set();
1677
2031
  let i = 0;
1678
- const s = {}, n = (o, a, d) => {
2032
+ const n = {}, s = (o, a, d) => {
1679
2033
  if (!o || !a)
1680
2034
  return;
1681
- a.length > i && (i = a.length), s.hasOwnProperty(a) || (s[a] = []);
1682
- const l = s[a];
2035
+ a.length > i && (i = a.length), n.hasOwnProperty(a) || (n[a] = []);
2036
+ const l = n[a];
1683
2037
  if (l.includes(o))
1684
2038
  return;
1685
2039
  const h = d !== void 0 ? d : l.length;
1686
2040
  l[h] = o;
1687
2041
  };
1688
- for (const o of r)
1689
- e.has(o.dialCode) || e.add(o.dialCode), n(o.iso2, o.dialCode, o.priority);
1690
- (t.onlyCountries.length || t.excludeCountries.length) && e.forEach((o) => {
1691
- s[o] = s[o].filter(Boolean);
2042
+ for (const o of r) {
2043
+ t.has(o.dialCode) || t.add(o.dialCode);
2044
+ for (let a = 1; a < o.dialCode.length; a++) {
2045
+ const d = o.dialCode.substring(0, a);
2046
+ s(o.iso2, d);
2047
+ }
2048
+ s(o.iso2, o.dialCode, o.priority);
2049
+ }
2050
+ (e.onlyCountries.length || e.excludeCountries.length) && t.forEach((o) => {
2051
+ n[o] = n[o].filter(Boolean);
1692
2052
  });
1693
2053
  for (const o of r)
1694
2054
  if (o.areaCodes) {
1695
- const a = s[o.dialCode][0];
2055
+ const a = n[o.dialCode][0];
1696
2056
  for (const d of o.areaCodes) {
1697
2057
  for (let l = 1; l < d.length; l++) {
1698
2058
  const h = d.substring(0, l), p = o.dialCode + h;
1699
- n(a, p), n(o.iso2, p);
2059
+ s(a, p), s(o.iso2, p);
1700
2060
  }
1701
- n(o.iso2, o.dialCode + d);
2061
+ s(o.iso2, o.dialCode + d);
1702
2062
  }
1703
2063
  }
1704
- return { dialCodes: e, dialCodeMaxLen: i, dialCodeToIso2Map: s };
2064
+ return { dialCodes: t, dialCodeMaxLen: i, dialCodeToIso2Map: n };
1705
2065
  }
1706
- function J(r, t) {
1707
- t.countryOrder && (t.countryOrder = t.countryOrder.map((e) => e.toLowerCase())), r.sort((e, i) => {
1708
- const { countryOrder: s } = t;
1709
- if (s) {
1710
- const n = s.indexOf(e.iso2), o = s.indexOf(i.iso2), a = n > -1, d = o > -1;
2066
+ function J(r, e) {
2067
+ e.countryOrder && (e.countryOrder = e.countryOrder.map((t) => t.toLowerCase())), r.sort((t, i) => {
2068
+ const { countryOrder: n } = e;
2069
+ if (n) {
2070
+ const s = n.indexOf(t.iso2), o = n.indexOf(i.iso2), a = s > -1, d = o > -1;
1711
2071
  if (a || d)
1712
- return a && d ? n - o : a ? -1 : 1;
2072
+ return a && d ? s - o : a ? -1 : 1;
1713
2073
  }
1714
- return e.name.localeCompare(i.name);
2074
+ return t.name.localeCompare(i.name);
1715
2075
  });
1716
2076
  }
1717
2077
  function Z(r) {
1718
- for (const t of r)
1719
- t.normalisedName = x(t.name), t.initials = t.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((e) => e[0]).join("").toLowerCase(), t.dialCodePlus = `+${t.dialCode}`;
2078
+ for (const e of r)
2079
+ e.normalisedName = E(e.name), e.initials = e.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((t) => t[0]).join("").toLowerCase(), e.dialCodePlus = `+${e.dialCode}`;
1720
2080
  }
1721
- function Q(r, t, e, i) {
1722
- let s = r;
1723
- if (e && t) {
1724
- t = `+${i.dialCode}`;
1725
- const n = s[t.length] === " " || s[t.length] === "-" ? t.length + 1 : t.length;
1726
- s = s.substring(n);
1727
- }
1728
- return s;
2081
+ function Q(r, e, t, i) {
2082
+ let n = r;
2083
+ if (t && e) {
2084
+ e = `+${i.dialCode}`;
2085
+ const s = n[e.length] === " " || n[e.length] === "-" ? e.length + 1 : e.length;
2086
+ n = n.substring(s);
2087
+ }
2088
+ return n;
1729
2089
  }
1730
- function X(r, t, e, i, s) {
1731
- const n = e ? e.formatNumberAsYouType(r, i.iso2) : r, { dialCode: o } = i;
1732
- return s && t.charAt(0) !== "+" && n.includes(`+${o}`) ? (n.split(`+${o}`)[1] || "").trim() : n;
2090
+ function X(r, e, t, i, n) {
2091
+ const s = t ? t.formatNumberAsYouType(r, i.iso2) : r, { dialCode: o } = i;
2092
+ return n && e.charAt(0) !== "+" && s.includes(`+${o}`) ? (s.split(`+${o}`)[1] || "").trim() : s;
1733
2093
  }
1734
- function tt(r, t, e, i) {
1735
- if (e === 0 && !i)
2094
+ function tt(r, e, t, i) {
2095
+ if (t === 0 && !i)
1736
2096
  return 0;
1737
- let s = 0;
1738
- for (let n = 0; n < t.length; n++) {
1739
- if (/[+0-9]/.test(t[n]) && s++, s === r && !i)
1740
- return n + 1;
1741
- if (i && s === r + 1)
1742
- return n;
1743
- }
1744
- return t.length;
2097
+ let n = 0;
2098
+ for (let s = 0; s < e.length; s++) {
2099
+ if (/[+0-9]/.test(e[s]) && n++, n === r && !i)
2100
+ return s + 1;
2101
+ if (i && n === r + 1)
2102
+ return s;
2103
+ }
2104
+ return e.length;
1745
2105
  }
1746
2106
  const et = [
1747
2107
  "800",
@@ -1761,44 +2121,42 @@ const et = [
1761
2121
  "887",
1762
2122
  "888",
1763
2123
  "889"
1764
- ], A = (r) => {
1765
- const t = I(r);
1766
- if (t.charAt(0) === "1") {
1767
- const e = t.substring(1, 4);
1768
- return et.includes(e);
2124
+ ], k = (r) => {
2125
+ const e = I(r);
2126
+ if (e.charAt(0) === "1") {
2127
+ const t = e.substring(1, 4);
2128
+ return et.includes(t);
1769
2129
  }
1770
2130
  return !1;
1771
2131
  };
1772
2132
  for (const r of _)
1773
- r.name = k[r.iso2];
2133
+ r.name = P[r.iso2];
1774
2134
  let it = 0;
1775
- const st = new Set(_.map((r) => r.iso2)), D = (r) => st.has(r), w = (r, ...t) => {
1776
- const { instances: e } = u;
1777
- Object.values(e).forEach((i) => i[r](...t));
2135
+ const nt = new Set(_.map((r) => r.iso2)), S = (r) => nt.has(r), v = (r, ...e) => {
2136
+ const { instances: t } = u;
2137
+ Object.values(t).forEach((i) => i[r](...e));
1778
2138
  };
1779
- class v {
2139
+ class L {
1780
2140
  /**
1781
2141
  * Build a space-delimited class string from an object map of className -> truthy/falsey.
1782
2142
  * Only keys with truthy values are included.
1783
2143
  */
1784
- static _buildClassNames(t) {
1785
- return Object.keys(t).filter((e) => !!t[e]).join(" ");
2144
+ static _buildClassNames(e) {
2145
+ return Object.keys(e).filter((t) => !!e[t]).join(" ");
1786
2146
  }
1787
- constructor(t, e = {}) {
1788
- this.id = it++, this.telInput = t, this.highlightedItem = null, this.options = Object.assign({}, P, e), this.hadInitialPlaceholder = !!t.getAttribute("placeholder");
2147
+ constructor(e, t = {}) {
2148
+ this.id = it++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, x, t), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1789
2149
  }
1790
2150
  _detectEnvironmentAndLayout() {
1791
- this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]"), this.telInput.dir = "ltr";
1792
- const t = this.options.allowDropdown || this.options.separateDialCode;
1793
- this.showSelectedCountryOnLeft = this.isRTL ? !t : t, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft);
2151
+ this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]"), this.options.separateDialCode && (this.originalPaddingLeft = this.telInput.style.paddingLeft);
1794
2152
  }
1795
2153
  _createInitPromises() {
1796
- const t = new Promise((i, s) => {
1797
- this.resolveAutoCountryPromise = i, this.rejectAutoCountryPromise = s;
1798
- }), e = new Promise((i, s) => {
1799
- this.resolveUtilsScriptPromise = i, this.rejectUtilsScriptPromise = s;
2154
+ const e = new Promise((i, n) => {
2155
+ this.resolveAutoCountryPromise = i, this.rejectAutoCountryPromise = n;
2156
+ }), t = new Promise((i, n) => {
2157
+ this.resolveUtilsScriptPromise = i, this.rejectUtilsScriptPromise = n;
1800
2158
  });
1801
- this.promise = Promise.all([t, e]);
2159
+ this.promise = Promise.all([e, t]);
1802
2160
  }
1803
2161
  //* Can't be private as it's called from intlTelInput convenience wrapper.
1804
2162
  _init() {
@@ -1810,14 +2168,14 @@ class v {
1810
2168
  //* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.
1811
2169
  _processCountryData() {
1812
2170
  this.countries = G(this.options);
1813
- const t = Y(this.countries, this.options);
1814
- this.dialCodes = t.dialCodes, this.dialCodeMaxLen = t.dialCodeMaxLen, this.dialCodeToIso2Map = t.dialCodeToIso2Map, q(this.countries, this.options), J(this.countries, this.options), this.countryByIso2 = new Map(this.countries.map((e) => [e.iso2, e])), Z(this.countries);
2171
+ const e = Y(this.countries, this.options);
2172
+ this.dialCodes = e.dialCodes, this.dialCodeMaxLen = e.dialCodeMaxLen, this.dialCodeToIso2Map = e.dialCodeToIso2Map, q(this.countries, this.options), J(this.countries, this.options), this.countryByIso2 = new Map(this.countries.map((t) => [t.iso2, t])), Z(this.countries);
1815
2173
  }
1816
2174
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
1817
2175
  _generateMarkup() {
1818
2176
  this._prepareTelInput();
1819
- const t = this._createWrapperAndInsert();
1820
- this._maybeBuildCountryContainer(t), t.appendChild(this.telInput), this._maybeUpdateInputPaddingAndReveal(), this._maybeBuildHiddenInputs(t);
2177
+ const e = this._createWrapperAndInsert();
2178
+ this._maybeBuildCountryContainer(e), e.appendChild(this.telInput), this._maybeUpdateInputPaddingAndReveal(), this._maybeBuildHiddenInputs(e);
1821
2179
  }
1822
2180
  _prepareTelInput() {
1823
2181
  this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
@@ -1825,32 +2183,32 @@ class v {
1825
2183
  _createWrapperAndInsert() {
1826
2184
  var a;
1827
2185
  const {
1828
- allowDropdown: t,
1829
- showFlags: e,
2186
+ allowDropdown: e,
2187
+ showFlags: t,
1830
2188
  containerClass: i,
1831
- useFullscreenPopup: s
1832
- } = this.options, n = v._buildClassNames({
2189
+ useFullscreenPopup: n
2190
+ } = this.options, s = L._buildClassNames({
1833
2191
  iti: !0,
1834
- "iti--allow-dropdown": t,
1835
- "iti--show-flags": e,
1836
- "iti--inline-dropdown": !s,
2192
+ "iti--allow-dropdown": e,
2193
+ "iti--show-flags": t,
2194
+ "iti--inline-dropdown": !n,
1837
2195
  [i]: !!i
1838
- }), o = m("div", { class: n });
1839
- return (a = this.telInput.parentNode) == null || a.insertBefore(o, this.telInput), o;
2196
+ }), o = m("div", { class: s });
2197
+ return this.isRTL && o.setAttribute("dir", "ltr"), (a = this.telInput.parentNode) == null || a.insertBefore(o, this.telInput), o;
1840
2198
  }
1841
- _maybeBuildCountryContainer(t) {
2199
+ _maybeBuildCountryContainer(e) {
1842
2200
  const {
1843
- allowDropdown: e,
2201
+ allowDropdown: t,
1844
2202
  separateDialCode: i,
1845
- showFlags: s
2203
+ showFlags: n
1846
2204
  } = this.options;
1847
- if (e || s || i) {
2205
+ if (t || n || i) {
1848
2206
  this.countryContainer = m(
1849
2207
  "div",
1850
2208
  // visibly hidden until we measure it's width to set the input padding correctly
1851
2209
  { class: "iti__country-container iti__v-hide" },
1852
- t
1853
- ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = m(
2210
+ e
2211
+ ), t ? (this.selectedCountry = m(
1854
2212
  "button",
1855
2213
  {
1856
2214
  type: "button",
@@ -1866,7 +2224,7 @@ class v {
1866
2224
  { class: "iti__selected-country" },
1867
2225
  this.countryContainer
1868
2226
  );
1869
- const n = m(
2227
+ const s = m(
1870
2228
  "div",
1871
2229
  { class: "iti__selected-country-primary" },
1872
2230
  this.selectedCountry
@@ -1874,47 +2232,47 @@ class v {
1874
2232
  this.selectedCountryInner = m(
1875
2233
  "div",
1876
2234
  { class: "iti__flag" },
1877
- n
1878
- ), e && (this.dropdownArrow = m(
2235
+ s
2236
+ ), t && (this.dropdownArrow = m(
1879
2237
  "div",
1880
2238
  { class: "iti__arrow", "aria-hidden": "true" },
1881
- n
2239
+ s
1882
2240
  )), i && (this.selectedDialCode = m(
1883
2241
  "div",
1884
- { class: "iti__selected-dial-code", dir: "ltr" },
2242
+ { class: "iti__selected-dial-code" },
1885
2243
  this.selectedCountry
1886
- )), e && this._buildDropdownContent();
2244
+ )), t && this._buildDropdownContent();
1887
2245
  }
1888
2246
  }
1889
2247
  _buildDropdownContent() {
1890
2248
  const {
1891
- fixDropdownWidth: t,
1892
- useFullscreenPopup: e,
2249
+ fixDropdownWidth: e,
2250
+ useFullscreenPopup: t,
1893
2251
  countrySearch: i,
1894
- i18n: s,
1895
- dropdownContainer: n,
2252
+ i18n: n,
2253
+ dropdownContainer: s,
1896
2254
  containerClass: o
1897
- } = this.options, a = t ? "" : "iti--flexible-dropdown-width";
2255
+ } = this.options, a = e ? "" : "iti--flexible-dropdown-width";
1898
2256
  if (this.dropdownContent = m("div", {
1899
2257
  id: `iti-${this.id}__dropdown-content`,
1900
2258
  class: `iti__dropdown-content iti__hide ${a}`,
1901
2259
  role: "dialog",
1902
2260
  "aria-modal": "true"
1903
- }), i && this._buildSearchUI(), this.countryList = m(
2261
+ }), this.isRTL && this.dropdownContent.setAttribute("dir", "rtl"), i && this._buildSearchUI(), this.countryList = m(
1904
2262
  "ul",
1905
2263
  {
1906
2264
  class: "iti__country-list",
1907
2265
  id: `iti-${this.id}__country-listbox`,
1908
2266
  role: "listbox",
1909
- "aria-label": s.countryListAriaLabel
2267
+ "aria-label": n.countryListAriaLabel
1910
2268
  },
1911
2269
  this.dropdownContent
1912
- ), this._appendListItems(), i && this._updateSearchResultsA11yText(), n) {
1913
- const d = v._buildClassNames({
2270
+ ), this._appendListItems(), i && this._updateSearchResultsA11yText(), s) {
2271
+ const d = L._buildClassNames({
1914
2272
  iti: !0,
1915
2273
  "iti--container": !0,
1916
- "iti--fullscreen-popup": e,
1917
- "iti--inline-dropdown": !e,
2274
+ "iti--fullscreen-popup": t,
2275
+ "iti--inline-dropdown": !t,
1918
2276
  [o]: !!o
1919
2277
  });
1920
2278
  this.dropdown = m("div", { class: d }), this.dropdown.appendChild(this.dropdownContent);
@@ -1922,7 +2280,7 @@ class v {
1922
2280
  this.countryContainer.appendChild(this.dropdownContent);
1923
2281
  }
1924
2282
  _buildSearchUI() {
1925
- const { i18n: t } = this.options, e = m(
2283
+ const { i18n: e } = this.options, t = m(
1926
2284
  "div",
1927
2285
  { class: "iti__search-input-wrapper" },
1928
2286
  this.dropdownContent
@@ -1933,7 +2291,7 @@ class v {
1933
2291
  class: "iti__search-icon",
1934
2292
  "aria-hidden": "true"
1935
2293
  },
1936
- e
2294
+ t
1937
2295
  ), this.searchIcon.innerHTML = `
1938
2296
  <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" aria-hidden="true">
1939
2297
  <circle cx="11" cy="11" r="7" />
@@ -1945,25 +2303,25 @@ class v {
1945
2303
  // Chrome says inputs need either a name or an id
1946
2304
  type: "search",
1947
2305
  class: "iti__search-input",
1948
- placeholder: t.searchPlaceholder,
2306
+ placeholder: e.searchPlaceholder,
1949
2307
  // role=combobox + aria-autocomplete=list + aria-activedescendant allows maintaining focus on the search input while allowing users to navigate search results with up/down keyboard keys
1950
2308
  role: "combobox",
1951
2309
  "aria-expanded": "true",
1952
- "aria-label": t.searchPlaceholder,
2310
+ "aria-label": e.searchPlaceholder,
1953
2311
  "aria-controls": `iti-${this.id}__country-listbox`,
1954
2312
  "aria-autocomplete": "list",
1955
2313
  autocomplete: "off"
1956
2314
  },
1957
- e
2315
+ t
1958
2316
  ), this.searchClearButton = m(
1959
2317
  "button",
1960
2318
  {
1961
2319
  type: "button",
1962
2320
  class: "iti__search-clear iti__hide",
1963
- "aria-label": t.clearSearchAriaLabel,
2321
+ "aria-label": e.clearSearchAriaLabel,
1964
2322
  tabindex: "-1"
1965
2323
  },
1966
- e
2324
+ t
1967
2325
  );
1968
2326
  const i = `iti-${this.id}-clear-mask`;
1969
2327
  this.searchClearButton.innerHTML = `
@@ -1985,65 +2343,65 @@ class v {
1985
2343
  // all a11y messaging happens in this.searchResultsA11yText
1986
2344
  },
1987
2345
  this.dropdownContent
1988
- ), this.searchNoResults.textContent = t.zeroSearchResults;
2346
+ ), this.searchNoResults.textContent = e.zeroSearchResults;
1989
2347
  }
1990
2348
  _maybeUpdateInputPaddingAndReveal() {
1991
2349
  this.countryContainer && (this._updateInputPadding(), this.countryContainer.classList.remove("iti__v-hide"));
1992
2350
  }
1993
- _maybeBuildHiddenInputs(t) {
1994
- var i, s;
1995
- const { hiddenInput: e } = this.options;
1996
- if (e) {
1997
- const n = this.telInput.getAttribute("name") || "", o = e(n);
2351
+ _maybeBuildHiddenInputs(e) {
2352
+ var i, n;
2353
+ const { hiddenInput: t } = this.options;
2354
+ if (t) {
2355
+ const s = this.telInput.getAttribute("name") || "", o = t(s);
1998
2356
  if (o.phone) {
1999
2357
  const a = (i = this.telInput.form) == null ? void 0 : i.querySelector(`input[name="${o.phone}"]`);
2000
2358
  a ? this.hiddenInput = a : (this.hiddenInput = m("input", {
2001
2359
  type: "hidden",
2002
2360
  name: o.phone
2003
- }), t.appendChild(this.hiddenInput));
2361
+ }), e.appendChild(this.hiddenInput));
2004
2362
  }
2005
2363
  if (o.country) {
2006
- const a = (s = this.telInput.form) == null ? void 0 : s.querySelector(`input[name="${o.country}"]`);
2364
+ const a = (n = this.telInput.form) == null ? void 0 : n.querySelector(`input[name="${o.country}"]`);
2007
2365
  a ? this.hiddenInputCountry = a : (this.hiddenInputCountry = m("input", {
2008
2366
  type: "hidden",
2009
2367
  name: o.country
2010
- }), t.appendChild(this.hiddenInputCountry));
2368
+ }), e.appendChild(this.hiddenInputCountry));
2011
2369
  }
2012
2370
  }
2013
2371
  }
2014
2372
  //* For each country: add a country list item <li> to the countryList <ul> container.
2015
2373
  _appendListItems() {
2016
- for (let t = 0; t < this.countries.length; t++) {
2017
- const e = this.countries[t], i = t === 0 ? "iti__highlight" : "", s = m(
2374
+ for (let e = 0; e < this.countries.length; e++) {
2375
+ const t = this.countries[e], i = e === 0 ? "iti__highlight" : "", n = m(
2018
2376
  "li",
2019
2377
  {
2020
- id: `iti-${this.id}__item-${e.iso2}`,
2378
+ id: `iti-${this.id}__item-${t.iso2}`,
2021
2379
  class: `iti__country ${i}`,
2022
2380
  tabindex: "-1",
2023
2381
  role: "option",
2024
- "data-dial-code": e.dialCode,
2025
- "data-country-code": e.iso2,
2382
+ "data-dial-code": t.dialCode,
2383
+ "data-country-code": t.iso2,
2026
2384
  "aria-selected": "false"
2027
2385
  },
2028
2386
  this.countryList
2029
2387
  );
2030
- e.nodeById[this.id] = s;
2031
- let n = "";
2032
- this.options.showFlags && (n += `<div class='iti__flag iti__${e.iso2}'></div>`), n += `<span class='iti__country-name'>${e.name}</span>`, n += `<span class='iti__dial-code' dir='ltr'>+${e.dialCode}</span>`, s.insertAdjacentHTML("beforeend", n);
2388
+ t.nodeById[this.id] = n;
2389
+ let s = "";
2390
+ this.options.showFlags && (s += `<div class='iti__flag iti__${t.iso2}'></div>`), s += `<span class='iti__country-name'>${t.name}</span>`, s += `<span class='iti__dial-code' dir='ltr'>+${t.dialCode}</span>`, n.insertAdjacentHTML("beforeend", s);
2033
2391
  }
2034
2392
  }
2035
2393
  //* Set the initial state of the input value and the selected country by:
2036
2394
  //* 1. Extracting a dial code from the given number
2037
2395
  //* 2. Using explicit initialCountry
2038
- _setInitialState(t = !1) {
2039
- const e = this.telInput.getAttribute("value"), i = this.telInput.value, n = e && e.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? e : i, o = this._getDialCode(n), a = A(n), { initialCountry: d, geoIpLookup: l } = this.options, h = d === "auto" && l;
2396
+ _setInitialState(e = !1) {
2397
+ const t = this.telInput.getAttribute("value"), i = this.telInput.value, s = t && t.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? t : i, o = this._getDialCode(s), a = k(s), { initialCountry: d, geoIpLookup: l } = this.options, h = d === "auto" && l;
2040
2398
  if (o && !a)
2041
- this._updateCountryFromNumber(n);
2042
- else if (!h || t) {
2399
+ this._updateCountryFromNumber(s);
2400
+ else if (!h || e) {
2043
2401
  const p = d ? d.toLowerCase() : "";
2044
- D(p) ? this._setCountry(p) : o && a ? this._setCountry("us") : this._setCountry("");
2402
+ S(p) ? this._setCountry(p) : o && a ? this._setCountry("us") : this._setCountry("");
2045
2403
  }
2046
- n && this._updateValFromNumber(n);
2404
+ s && this._updateValFromNumber(s);
2047
2405
  }
2048
2406
  //* Initialise the main event listeners: input keyup, and click selected country.
2049
2407
  _initListeners() {
@@ -2051,24 +2409,24 @@ class v {
2051
2409
  }
2052
2410
  //* Update hidden input on form submit.
2053
2411
  _initHiddenInputListener() {
2054
- var t;
2412
+ var e;
2055
2413
  this._handleHiddenInputSubmit = () => {
2056
2414
  this.hiddenInput && (this.hiddenInput.value = this.getNumber()), this.hiddenInputCountry && (this.hiddenInputCountry.value = this.getSelectedCountryData().iso2 || "");
2057
- }, (t = this.telInput.form) == null || t.addEventListener(
2415
+ }, (e = this.telInput.form) == null || e.addEventListener(
2058
2416
  "submit",
2059
2417
  this._handleHiddenInputSubmit
2060
2418
  );
2061
2419
  }
2062
2420
  //* initialise the dropdown listeners.
2063
2421
  _initDropdownListeners() {
2064
- this._handleLabelClick = (e) => {
2065
- this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : e.preventDefault();
2422
+ this._handleLabelClick = (t) => {
2423
+ this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : t.preventDefault();
2066
2424
  };
2067
- const t = this.telInput.closest("label");
2068
- t && t.addEventListener("click", this._handleLabelClick), this._handleClickSelectedCountry = () => {
2425
+ const e = this.telInput.closest("label");
2426
+ e && e.addEventListener("click", this._handleLabelClick), this._handleClickSelectedCountry = () => {
2069
2427
  this.dropdownContent.classList.contains("iti__hide") && !this.telInput.disabled && !this.telInput.readOnly && this._openDropdown();
2070
- }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = (e) => {
2071
- this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes(e.key) && (e.preventDefault(), e.stopPropagation(), this._openDropdown()), e.key === "Tab" && this._closeDropdown();
2428
+ }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = (t) => {
2429
+ this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes(t.key) && (t.preventDefault(), t.stopPropagation(), this._openDropdown()), t.key === "Tab" && this._closeDropdown();
2072
2430
  }, this.countryContainer.addEventListener(
2073
2431
  "keydown",
2074
2432
  this._handleCountryContainerKeydown
@@ -2076,24 +2434,24 @@ class v {
2076
2434
  }
2077
2435
  //* Init many requests: utils script / geo ip lookup.
2078
2436
  _initRequests() {
2079
- let { loadUtils: t, initialCountry: e, geoIpLookup: i } = this.options;
2080
- t && !u.utils ? (this._doAttachUtils = () => {
2081
- var n;
2082
- (n = u.attachUtils(t)) == null || n.catch(() => {
2437
+ let { loadUtils: e, initialCountry: t, geoIpLookup: i } = this.options;
2438
+ e && !u.utils ? (this._doAttachUtils = () => {
2439
+ var s;
2440
+ (s = u.attachUtils(e)) == null || s.catch(() => {
2083
2441
  });
2084
2442
  }, u.documentReady() ? this._doAttachUtils() : (this._handlePageLoad = () => {
2085
2443
  this._doAttachUtils();
2086
- }, window.addEventListener("load", this._handlePageLoad))) : this.resolveUtilsScriptPromise(), e === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
2444
+ }, window.addEventListener("load", this._handlePageLoad))) : this.resolveUtilsScriptPromise(), t === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
2087
2445
  }
2088
2446
  //* Perform the geo ip lookup.
2089
2447
  _loadAutoCountry() {
2090
2448
  u.autoCountry ? this.handleAutoCountry() : u.startedLoadingAutoCountry || (u.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
2091
- (t = "") => {
2092
- const e = t.toLowerCase();
2093
- D(e) ? (u.autoCountry = e, setTimeout(() => w("handleAutoCountry"))) : (this._setInitialState(!0), w("rejectAutoCountryPromise"));
2449
+ (e = "") => {
2450
+ const t = e.toLowerCase();
2451
+ S(t) ? (u.autoCountry = t, setTimeout(() => v("handleAutoCountry"))) : (this._setInitialState(!0), v("rejectAutoCountryPromise"));
2094
2452
  },
2095
2453
  () => {
2096
- this._setInitialState(!0), w("rejectAutoCountryPromise");
2454
+ this._setInitialState(!0), v("rejectAutoCountryPromise");
2097
2455
  }
2098
2456
  ));
2099
2457
  }
@@ -2105,83 +2463,83 @@ class v {
2105
2463
  this._bindInputListener(), this._maybeBindKeydownListener(), this._maybeBindPasteListener();
2106
2464
  }
2107
2465
  _bindInputListener() {
2108
- const { strictMode: t, formatAsYouType: e, separateDialCode: i, allowDropdown: s, countrySearch: n } = this.options;
2466
+ const { strictMode: e, formatAsYouType: t, separateDialCode: i, allowDropdown: n, countrySearch: s } = this.options;
2109
2467
  let o = !1;
2110
2468
  new RegExp("\\p{L}", "u").test(this.telInput.value) && (o = !0), this._handleInputEvent = (a) => {
2111
- if (this.isAndroid && (a == null ? void 0 : a.data) === "+" && i && s && n) {
2112
- const p = this.telInput.selectionStart || 0, f = this.telInput.value.substring(0, p - 1), c = this.telInput.value.substring(p);
2113
- this.telInput.value = f + c, this._openDropdownWithPlus();
2469
+ if (this.isAndroid && (a == null ? void 0 : a.data) === "+" && i && n && s) {
2470
+ const p = this.telInput.selectionStart || 0, g = this.telInput.value.substring(0, p - 1), c = this.telInput.value.substring(p);
2471
+ this.telInput.value = g + c, this._openDropdownWithPlus();
2114
2472
  return;
2115
2473
  }
2116
2474
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
2117
2475
  const d = (a == null ? void 0 : a.data) && /[^+0-9]/.test(a.data), l = (a == null ? void 0 : a.inputType) === "insertFromPaste" && this.telInput.value;
2118
- d || l && !t ? o = !0 : /[^+0-9]/.test(this.telInput.value) || (o = !1);
2476
+ d || l && !e ? o = !0 : /[^+0-9]/.test(this.telInput.value) || (o = !1);
2119
2477
  const h = (a == null ? void 0 : a.detail) && a.detail.isSetNumber;
2120
- if (e && !o && !h) {
2121
- const p = this.telInput.selectionStart || 0, c = this.telInput.value.substring(0, p).replace(/[^+0-9]/g, "").length, C = (a == null ? void 0 : a.inputType) === "deleteContentForward", y = this._getFullNumber(), g = X(
2122
- y,
2478
+ if (t && !o && !h) {
2479
+ const p = this.telInput.selectionStart || 0, c = this.telInput.value.substring(0, p).replace(/[^+0-9]/g, "").length, f = (a == null ? void 0 : a.inputType) === "deleteContentForward", C = this._getFullNumber(), y = X(
2480
+ C,
2123
2481
  this.telInput.value,
2124
2482
  u.utils,
2125
2483
  this.selectedCountryData,
2126
2484
  this.options.separateDialCode
2127
- ), b = tt(c, g, p, C);
2128
- this.telInput.value = g, this.telInput.setSelectionRange(b, b);
2485
+ ), b = tt(c, y, p, f);
2486
+ this.telInput.value = y, this.telInput.setSelectionRange(b, b);
2129
2487
  }
2130
2488
  }, this.telInput.addEventListener("input", this._handleInputEvent);
2131
2489
  }
2132
2490
  _maybeBindKeydownListener() {
2133
- const { strictMode: t, separateDialCode: e, allowDropdown: i, countrySearch: s } = this.options;
2134
- (t || e) && (this._handleKeydownEvent = (n) => {
2135
- if (n.key && n.key.length === 1 && !n.altKey && !n.ctrlKey && !n.metaKey) {
2136
- if (e && i && s && n.key === "+") {
2137
- n.preventDefault(), this._openDropdownWithPlus();
2491
+ const { strictMode: e, separateDialCode: t, allowDropdown: i, countrySearch: n } = this.options;
2492
+ (e || t) && (this._handleKeydownEvent = (s) => {
2493
+ if (s.key && s.key.length === 1 && !s.altKey && !s.ctrlKey && !s.metaKey) {
2494
+ if (t && i && n && s.key === "+") {
2495
+ s.preventDefault(), this._openDropdownWithPlus();
2138
2496
  return;
2139
2497
  }
2140
- if (t) {
2141
- const o = this.telInput.value, d = !(o.charAt(0) === "+") && this.telInput.selectionStart === 0 && n.key === "+", l = /^[0-9]$/.test(n.key), h = e ? l : d || l, p = o.slice(0, this.telInput.selectionStart) + n.key + o.slice(this.telInput.selectionEnd), f = this._getFullNumber(p), c = u.utils.getCoreNumber(f, this.selectedCountryData.iso2), C = this.maxCoreNumberLength && c.length > this.maxCoreNumberLength, g = this._getNewCountryFromNumber(f) !== null;
2142
- (!h || C && !g && !d) && n.preventDefault();
2498
+ if (e) {
2499
+ const o = this.telInput.value, d = !(o.charAt(0) === "+") && this.telInput.selectionStart === 0 && s.key === "+", l = /^[0-9]$/.test(s.key), h = t ? l : d || l, p = o.slice(0, this.telInput.selectionStart) + s.key + o.slice(this.telInput.selectionEnd), g = this._getFullNumber(p), c = u.utils.getCoreNumber(g, this.selectedCountryData.iso2), f = this.maxCoreNumberLength && c.length > this.maxCoreNumberLength, y = this._getNewCountryFromNumber(g) !== null;
2500
+ (!h || f && !y && !d) && s.preventDefault();
2143
2501
  }
2144
2502
  }
2145
2503
  }, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
2146
2504
  }
2147
2505
  _maybeBindPasteListener() {
2148
- this.options.strictMode && (this._handlePasteEvent = (t) => {
2149
- t.preventDefault();
2150
- const e = this.telInput, i = e.selectionStart, s = e.selectionEnd, n = e.value.slice(0, i), o = e.value.slice(s), a = this.selectedCountryData.iso2, d = t.clipboardData.getData("text"), l = i === 0 && s > 0, h = !e.value.startsWith("+") || l, p = d.replace(/[^0-9+]/g, ""), f = p.startsWith("+"), c = p.replace(/\+/g, ""), C = f && h ? `+${c}` : c;
2151
- let y = n + C + o, g = u.utils.getCoreNumber(y, a);
2152
- for (; g.length === 0 && y.length > 0; )
2153
- y = y.slice(0, -1), g = u.utils.getCoreNumber(y, a);
2154
- if (!g)
2506
+ this.options.strictMode && (this._handlePasteEvent = (e) => {
2507
+ e.preventDefault();
2508
+ const t = this.telInput, i = t.selectionStart, n = t.selectionEnd, s = t.value.slice(0, i), o = t.value.slice(n), a = this.selectedCountryData.iso2, d = e.clipboardData.getData("text"), l = i === 0 && n > 0, h = !t.value.startsWith("+") || l, p = d.replace(/[^0-9+]/g, ""), g = p.startsWith("+"), c = p.replace(/\+/g, ""), f = g && h ? `+${c}` : c;
2509
+ let C = s + f + o, y = u.utils.getCoreNumber(C, a);
2510
+ for (; y.length === 0 && C.length > 0; )
2511
+ C = C.slice(0, -1), y = u.utils.getCoreNumber(C, a);
2512
+ if (!y)
2155
2513
  return;
2156
- if (this.maxCoreNumberLength && g.length > this.maxCoreNumberLength)
2157
- if (e.selectionEnd === e.value.length) {
2158
- const T = g.length - this.maxCoreNumberLength;
2159
- y = y.slice(0, y.length - T);
2514
+ if (this.maxCoreNumberLength && y.length > this.maxCoreNumberLength)
2515
+ if (t.selectionEnd === t.value.length) {
2516
+ const w = y.length - this.maxCoreNumberLength;
2517
+ C = C.slice(0, C.length - w);
2160
2518
  } else
2161
2519
  return;
2162
- e.value = y;
2163
- const b = i + C.length;
2164
- e.setSelectionRange(b, b), e.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
2520
+ t.value = C;
2521
+ const b = i + f.length;
2522
+ t.setSelectionRange(b, b), t.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
2165
2523
  }, this.telInput.addEventListener("paste", this._handlePasteEvent));
2166
2524
  }
2167
2525
  //* Adhere to the input's maxlength attr.
2168
- _cap(t) {
2169
- const e = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
2170
- return e && t.length > e ? t.substring(0, e) : t;
2526
+ _cap(e) {
2527
+ const t = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
2528
+ return t && e.length > t ? e.substring(0, t) : e;
2171
2529
  }
2172
2530
  //* Trigger a custom event on the input.
2173
- _trigger(t, e = {}) {
2174
- const i = new CustomEvent(t, {
2531
+ _trigger(e, t = {}) {
2532
+ const i = new CustomEvent(e, {
2175
2533
  bubbles: !0,
2176
2534
  cancelable: !0,
2177
- detail: e
2535
+ detail: t
2178
2536
  });
2179
2537
  this.telInput.dispatchEvent(i);
2180
2538
  }
2181
2539
  //* Open the dropdown.
2182
2540
  _openDropdown() {
2183
- const { fixDropdownWidth: t, countrySearch: e } = this.options;
2184
- if (t && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), e) {
2541
+ const { fixDropdownWidth: e, countrySearch: t } = this.options;
2542
+ if (e && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), t) {
2185
2543
  const i = this.countryList.firstElementChild;
2186
2544
  i && (this._highlightListItem(i, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2187
2545
  }
@@ -2190,23 +2548,23 @@ class v {
2190
2548
  //* Set the dropdown position
2191
2549
  _setDropdownPosition() {
2192
2550
  if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.dropdown), !this.options.useFullscreenPopup) {
2193
- const t = this.telInput.getBoundingClientRect(), e = this.telInput.offsetHeight;
2194
- this.options.dropdownContainer && (this.dropdown.style.top = `${t.top + e}px`, this.dropdown.style.left = `${t.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll));
2551
+ const e = this.telInput.getBoundingClientRect(), t = this.telInput.offsetHeight;
2552
+ this.options.dropdownContainer && (this.dropdown.style.top = `${e.top + t}px`, this.dropdown.style.left = `${e.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll));
2195
2553
  }
2196
2554
  }
2197
2555
  //* We only bind dropdown listeners when the dropdown is open.
2198
2556
  _bindDropdownListeners() {
2199
2557
  this._handleMouseoverCountryList = (i) => {
2200
- var n;
2201
- const s = (n = i.target) == null ? void 0 : n.closest(".iti__country");
2202
- s && this._highlightListItem(s, !1);
2558
+ var s;
2559
+ const n = (s = i.target) == null ? void 0 : s.closest(".iti__country");
2560
+ n && this._highlightListItem(n, !1);
2203
2561
  }, this.countryList.addEventListener(
2204
2562
  "mouseover",
2205
2563
  this._handleMouseoverCountryList
2206
2564
  ), this._handleClickCountryList = (i) => {
2207
- var n;
2208
- const s = (n = i.target) == null ? void 0 : n.closest(".iti__country");
2209
- s && this._selectListItem(s);
2565
+ var s;
2566
+ const n = (s = i.target) == null ? void 0 : s.closest(".iti__country");
2567
+ n && this._selectListItem(n);
2210
2568
  }, this.countryList.addEventListener("click", this._handleClickCountryList), this._handleClickOffToClose = (i) => {
2211
2569
  !!i.target.closest(`#iti-${this.id}__dropdown-content`) || this._closeDropdown();
2212
2570
  }, setTimeout(() => {
@@ -2215,20 +2573,20 @@ class v {
2215
2573
  this._handleClickOffToClose
2216
2574
  );
2217
2575
  }, 0);
2218
- let t = "", e = null;
2576
+ let e = "", t = null;
2219
2577
  if (this._handleKeydownOnDropdown = (i) => {
2220
- ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(i.key) && (i.preventDefault(), i.stopPropagation(), i.key === "ArrowUp" || i.key === "ArrowDown" ? this._handleUpDownKey(i.key) : i.key === "Enter" ? this._handleEnterKey() : i.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(i.key) && (i.stopPropagation(), e && clearTimeout(e), t += i.key.toLowerCase(), this._searchForCountry(t), e = setTimeout(() => {
2221
- t = "";
2578
+ ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(i.key) && (i.preventDefault(), i.stopPropagation(), i.key === "ArrowUp" || i.key === "ArrowDown" ? this._handleUpDownKey(i.key) : i.key === "Enter" ? this._handleEnterKey() : i.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(i.key) && (i.stopPropagation(), t && clearTimeout(t), e += i.key.toLowerCase(), this._searchForCountry(e), t = setTimeout(() => {
2579
+ e = "";
2222
2580
  }, 1e3));
2223
2581
  }, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) {
2224
2582
  const i = () => {
2225
- const n = this.searchInput.value.trim();
2226
- this._filterCountries(n), this.searchInput.value ? this.searchClearButton.classList.remove("iti__hide") : this.searchClearButton.classList.add("iti__hide");
2583
+ const s = this.searchInput.value.trim();
2584
+ this._filterCountries(s), this.searchInput.value ? this.searchClearButton.classList.remove("iti__hide") : this.searchClearButton.classList.add("iti__hide");
2227
2585
  };
2228
- let s = null;
2586
+ let n = null;
2229
2587
  this._handleSearchChange = () => {
2230
- s && clearTimeout(s), s = setTimeout(() => {
2231
- i(), s = null;
2588
+ n && clearTimeout(n), n = setTimeout(() => {
2589
+ i(), n = null;
2232
2590
  }, 100);
2233
2591
  }, this.searchInput.addEventListener("input", this._handleSearchChange), this._handleSearchClear = () => {
2234
2592
  this.searchInput.value = "", this.searchInput.focus(), i();
@@ -2236,34 +2594,34 @@ class v {
2236
2594
  }
2237
2595
  }
2238
2596
  //* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
2239
- _searchForCountry(t) {
2240
- for (const e of this.countries)
2241
- if (e.name.substring(0, t.length).toLowerCase() === t) {
2242
- const s = e.nodeById[this.id];
2243
- this._highlightListItem(s, !1), this._scrollTo(s);
2597
+ _searchForCountry(e) {
2598
+ for (const t of this.countries)
2599
+ if (t.name.substring(0, e.length).toLowerCase() === e) {
2600
+ const n = t.nodeById[this.id];
2601
+ this._highlightListItem(n, !1), this._scrollTo(n);
2244
2602
  break;
2245
2603
  }
2246
2604
  }
2247
2605
  //* Country search enabled: Filter the countries according to the search query.
2248
- _filterCountries(t) {
2606
+ _filterCountries(e) {
2249
2607
  this.countryList.innerHTML = "";
2250
- let e;
2251
- t === "" ? e = this.countries : e = this._getMatchedCountries(t);
2608
+ let t;
2609
+ e === "" ? t = this.countries : t = this._getMatchedCountries(e);
2252
2610
  let i = !0;
2253
- for (const s of e) {
2254
- const n = s.nodeById[this.id];
2255
- n && (this.countryList.appendChild(n), i && (this._highlightListItem(n, !1), i = !1));
2611
+ for (const n of t) {
2612
+ const s = n.nodeById[this.id];
2613
+ s && (this.countryList.appendChild(s), i && (this._highlightListItem(s, !1), i = !1));
2256
2614
  }
2257
2615
  i ? (this._highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove("iti__hide")) : this.searchNoResults && this.searchNoResults.classList.add("iti__hide"), this.countryList.scrollTop = 0, this._updateSearchResultsA11yText();
2258
2616
  }
2259
- _getMatchedCountries(t) {
2260
- const e = x(t), i = [], s = [], n = [], o = [], a = [], d = [];
2617
+ _getMatchedCountries(e) {
2618
+ const t = E(e), i = [], n = [], s = [], o = [], a = [], d = [];
2261
2619
  for (const l of this.countries)
2262
- l.iso2 === e ? i.push(l) : l.normalisedName.startsWith(e) ? s.push(l) : l.normalisedName.includes(e) ? n.push(l) : e === l.dialCode || e === l.dialCodePlus ? o.push(l) : l.dialCodePlus.includes(e) ? a.push(l) : l.initials.includes(e) && d.push(l);
2620
+ l.iso2 === t ? i.push(l) : l.normalisedName.startsWith(t) ? n.push(l) : l.normalisedName.includes(t) ? s.push(l) : t === l.dialCode || t === l.dialCodePlus ? o.push(l) : l.dialCodePlus.includes(t) ? a.push(l) : l.initials.includes(t) && d.push(l);
2263
2621
  return [
2264
2622
  ...i.sort((l, h) => l.priority - h.priority),
2265
- ...s.sort((l, h) => l.priority - h.priority),
2266
2623
  ...n.sort((l, h) => l.priority - h.priority),
2624
+ ...s.sort((l, h) => l.priority - h.priority),
2267
2625
  ...o.sort((l, h) => l.priority - h.priority),
2268
2626
  ...a.sort((l, h) => l.priority - h.priority),
2269
2627
  ...d.sort((l, h) => l.priority - h.priority)
@@ -2271,15 +2629,15 @@ class v {
2271
2629
  }
2272
2630
  //* Update search results text (for a11y).
2273
2631
  _updateSearchResultsA11yText() {
2274
- const { i18n: t } = this.options, e = this.countryList.childElementCount;
2632
+ const { i18n: e } = this.options, t = this.countryList.childElementCount;
2275
2633
  let i;
2276
- e === 0 ? i = t.zeroSearchResults : t.searchResultsText ? i = t.searchResultsText(e) : e === 1 ? i = t.oneSearchResult : i = t.multipleSearchResults.replace("${count}", e.toString()), this.searchResultsA11yText.textContent = i;
2634
+ t === 0 ? i = e.zeroSearchResults : e.searchResultsText ? i = e.searchResultsText(t) : t === 1 ? i = e.oneSearchResult : i = e.multipleSearchResults.replace("${count}", t.toString()), this.searchResultsA11yText.textContent = i;
2277
2635
  }
2278
2636
  //* Highlight the next/prev item in the list (and ensure it is visible).
2279
- _handleUpDownKey(t) {
2280
- var i, s;
2281
- let e = t === "ArrowUp" ? (i = this.highlightedItem) == null ? void 0 : i.previousElementSibling : (s = this.highlightedItem) == null ? void 0 : s.nextElementSibling;
2282
- !e && this.countryList.childElementCount > 1 && (e = t === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), e && (this._scrollTo(e), this._highlightListItem(e, !1));
2637
+ _handleUpDownKey(e) {
2638
+ var i, n;
2639
+ let t = e === "ArrowUp" ? (i = this.highlightedItem) == null ? void 0 : i.previousElementSibling : (n = this.highlightedItem) == null ? void 0 : n.nextElementSibling;
2640
+ !t && this.countryList.childElementCount > 1 && (t = e === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), t && (this._scrollTo(t), this._highlightListItem(t, !1));
2283
2641
  }
2284
2642
  //* Select the currently highlighted item.
2285
2643
  _handleEnterKey() {
@@ -2287,111 +2645,119 @@ class v {
2287
2645
  }
2288
2646
  //* Update the input's value to the given val (format first if possible)
2289
2647
  //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
2290
- _updateValFromNumber(t) {
2291
- let e = t;
2648
+ _updateValFromNumber(e) {
2649
+ let t = e;
2292
2650
  if (this.options.formatOnDisplay && u.utils && this.selectedCountryData) {
2293
- const i = this.options.nationalMode || e.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: s, INTERNATIONAL: n } = u.utils.numberFormat, o = i ? s : n;
2294
- e = u.utils.formatNumber(
2295
- e,
2651
+ const i = this.options.nationalMode || t.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: n, INTERNATIONAL: s } = u.utils.numberFormat, o = i ? n : s;
2652
+ t = u.utils.formatNumber(
2653
+ t,
2296
2654
  this.selectedCountryData.iso2,
2297
2655
  o
2298
2656
  );
2299
2657
  }
2300
- e = this._beforeSetNumber(e), this.telInput.value = e;
2658
+ t = this._beforeSetNumber(t), this.telInput.value = t;
2301
2659
  }
2302
2660
  //* Check if need to select a new country based on the given number
2303
2661
  //* Note: called from _setInitialState, keyup handler, setNumber.
2304
- _updateCountryFromNumber(t) {
2305
- const e = this._getNewCountryFromNumber(t);
2306
- return e !== null ? this._setCountry(e) : !1;
2307
- }
2308
- _ensureHasDialCode(t) {
2309
- const { dialCode: e, nationalPrefix: i } = this.selectedCountryData;
2310
- if (t.charAt(0) === "+" || !e)
2311
- return t;
2312
- const o = i && t.charAt(0) === i && !this.options.separateDialCode ? t.substring(1) : t;
2313
- return `+${e}${o}`;
2662
+ _updateCountryFromNumber(e) {
2663
+ const t = this._getNewCountryFromNumber(e);
2664
+ return t !== null ? this._setCountry(t) : !1;
2665
+ }
2666
+ // if there is a selected country, and the number doesn't start with a dial code, then add it
2667
+ _ensureHasDialCode(e) {
2668
+ const { dialCode: t, nationalPrefix: i } = this.selectedCountryData;
2669
+ if (e.charAt(0) === "+" || !t)
2670
+ return e;
2671
+ const o = i && e.charAt(0) === i && !this.options.separateDialCode ? e.substring(1) : e;
2672
+ return `+${t}${o}`;
2314
2673
  }
2315
2674
  // Get the country ISO2 code from the given number
2316
2675
  // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
2317
2676
  // NOTE: consider refactoring this to be more clear
2318
- _getNewCountryFromNumber(t) {
2319
- const e = t.indexOf("+");
2320
- let i = e ? t.substring(e) : t;
2321
- const s = this.selectedCountryData.iso2, n = this.selectedCountryData.dialCode;
2677
+ _getNewCountryFromNumber(e) {
2678
+ const t = e.indexOf("+");
2679
+ let i = t ? e.substring(t) : e;
2680
+ const n = this.selectedCountryData.iso2, s = this.selectedCountryData.dialCode;
2322
2681
  i = this._ensureHasDialCode(i);
2323
2682
  const o = this._getDialCode(i, !0), a = I(i);
2324
2683
  if (o) {
2325
2684
  const d = I(o), l = this.dialCodeToIso2Map[d];
2326
2685
  if (l.length === 1)
2327
- return l[0] === s ? null : l[0];
2328
- if (!s && this.defaultCountry && l.includes(this.defaultCountry))
2686
+ return l[0] === n ? null : l[0];
2687
+ if (!n && this.defaultCountry && l.includes(this.defaultCountry))
2329
2688
  return this.defaultCountry;
2330
- if (n === "1" && A(a))
2689
+ if (s === "1" && k(a))
2331
2690
  return null;
2332
- const p = this.selectedCountryData.areaCodes && a.length > d.length;
2333
- if (!(s && l.includes(s) && !p))
2691
+ const { areaCodes: p, priority: g } = this.selectedCountryData;
2692
+ if (p) {
2693
+ const b = p.map((w) => `${s}${w}`);
2694
+ for (const w of b)
2695
+ if (a.startsWith(w))
2696
+ return null;
2697
+ }
2698
+ const f = p && !(g === 0) && a.length > d.length, C = n && l.includes(n) && !f, y = n === l[0];
2699
+ if (!C && !y)
2334
2700
  return l[0];
2335
2701
  } else {
2336
2702
  if (i.charAt(0) === "+" && a.length)
2337
2703
  return "";
2338
- if ((!i || i === "+") && !s)
2704
+ if ((!i || i === "+") && !n)
2339
2705
  return this.defaultCountry;
2340
2706
  }
2341
2707
  return null;
2342
2708
  }
2343
2709
  //* Remove highlighting from other list items and highlight the given item.
2344
- _highlightListItem(t, e) {
2710
+ _highlightListItem(e, t) {
2345
2711
  const i = this.highlightedItem;
2346
- if (i && (i.classList.remove("iti__highlight"), i.setAttribute("aria-selected", "false")), this.highlightedItem = t, this.highlightedItem && (this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true"), this.options.countrySearch)) {
2347
- const s = this.highlightedItem.getAttribute("id") || "";
2348
- this.searchInput.setAttribute("aria-activedescendant", s);
2712
+ if (i && (i.classList.remove("iti__highlight"), i.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem && (this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true"), this.options.countrySearch)) {
2713
+ const n = this.highlightedItem.getAttribute("id") || "";
2714
+ this.searchInput.setAttribute("aria-activedescendant", n);
2349
2715
  }
2350
- e && this.highlightedItem.focus();
2716
+ t && this.highlightedItem.focus();
2351
2717
  }
2352
2718
  //* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
2353
2719
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
2354
- _setCountry(t) {
2355
- const { separateDialCode: e, showFlags: i, i18n: s } = this.options, n = this.selectedCountryData.iso2 || "";
2356
- if (this.selectedCountryData = t ? this.countryByIso2.get(t) : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
2357
- const o = t && i ? `iti__flag iti__${t}` : "iti__flag iti__globe";
2720
+ _setCountry(e) {
2721
+ const { separateDialCode: t, showFlags: i, i18n: n } = this.options, s = this.selectedCountryData.iso2 || "";
2722
+ if (this.selectedCountryData = e ? this.countryByIso2.get(e) : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
2723
+ const o = e && i ? `iti__flag iti__${e}` : "iti__flag iti__globe";
2358
2724
  let a, d;
2359
- if (t) {
2725
+ if (e) {
2360
2726
  const { name: l, dialCode: h } = this.selectedCountryData;
2361
- d = l, a = s.selectedCountryAriaLabel.replace("${countryName}", l).replace("${dialCode}", `+${h}`);
2727
+ d = l, a = n.selectedCountryAriaLabel.replace("${countryName}", l).replace("${dialCode}", `+${h}`);
2362
2728
  } else
2363
- d = s.noCountrySelected, a = s.noCountrySelected;
2729
+ d = n.noCountrySelected, a = n.noCountrySelected;
2364
2730
  this.selectedCountryInner.className = o, this.selectedCountry.setAttribute("title", d), this.selectedCountry.setAttribute("aria-label", a);
2365
2731
  }
2366
- if (e) {
2732
+ if (t) {
2367
2733
  const o = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2368
2734
  this.selectedDialCode.innerHTML = o, this._updateInputPadding();
2369
2735
  }
2370
- return this._updatePlaceholder(), this._updateMaxLength(), n !== t;
2736
+ return this._updatePlaceholder(), this._updateMaxLength(), s !== e;
2371
2737
  }
2372
2738
  //* Update the input padding to make space for the selected country/dial code.
2373
2739
  _updateInputPadding() {
2374
2740
  if (this.selectedCountry) {
2375
- const t = this.options.separateDialCode ? 78 : 42, i = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth() || t) + 6;
2376
- this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${i}px` : this.telInput.style.paddingRight = `${i}px`;
2741
+ const e = this.options.separateDialCode ? 78 : 42, i = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth() || e) + 6;
2742
+ this.telInput.style.paddingLeft = `${i}px`;
2377
2743
  }
2378
2744
  }
2379
2745
  //* Update the maximum valid number length for the currently selected country.
2380
2746
  _updateMaxLength() {
2381
- const { strictMode: t, placeholderNumberType: e, validationNumberTypes: i } = this.options, { iso2: s } = this.selectedCountryData;
2382
- if (t && u.utils)
2383
- if (s) {
2384
- const n = u.utils.numberType[e];
2747
+ const { strictMode: e, placeholderNumberType: t, validationNumberTypes: i } = this.options, { iso2: n } = this.selectedCountryData;
2748
+ if (e && u.utils)
2749
+ if (n) {
2750
+ const s = u.utils.numberType[t];
2385
2751
  let o = u.utils.getExampleNumber(
2386
- s,
2387
- !1,
2388
2752
  n,
2753
+ !1,
2754
+ s,
2389
2755
  !0
2390
2756
  ), a = o;
2391
- for (; u.utils.isPossibleNumber(o, s, i); )
2757
+ for (; u.utils.isPossibleNumber(o, n, i); )
2392
2758
  a = o, o += "0";
2393
- const d = u.utils.getCoreNumber(a, s);
2394
- this.maxCoreNumberLength = d.length, s === "by" && (this.maxCoreNumberLength = d.length + 1);
2759
+ const d = u.utils.getCoreNumber(a, n);
2760
+ this.maxCoreNumberLength = d.length, n === "by" && (this.maxCoreNumberLength = d.length + 1);
2395
2761
  } else
2396
2762
  this.maxCoreNumberLength = null;
2397
2763
  }
@@ -2401,47 +2767,47 @@ class v {
2401
2767
  //* and then to inject a deep clone of the selectedCountry element.
2402
2768
  _getHiddenSelectedCountryWidth() {
2403
2769
  if (this.telInput.parentNode) {
2404
- let t;
2770
+ let e;
2405
2771
  try {
2406
- t = window.top.document.body;
2772
+ e = window.top.document.body;
2407
2773
  } catch {
2408
- t = document.body;
2774
+ e = document.body;
2409
2775
  }
2410
- const e = this.telInput.parentNode.cloneNode(!1);
2411
- e.style.visibility = "hidden", t.appendChild(e);
2776
+ const t = this.telInput.parentNode.cloneNode(!1);
2777
+ t.style.visibility = "hidden", e.appendChild(t);
2412
2778
  const i = this.countryContainer.cloneNode();
2413
- e.appendChild(i);
2414
- const s = this.selectedCountry.cloneNode(!0);
2415
- i.appendChild(s);
2416
- const n = s.offsetWidth;
2417
- return t.removeChild(e), n;
2779
+ t.appendChild(i);
2780
+ const n = this.selectedCountry.cloneNode(!0);
2781
+ i.appendChild(n);
2782
+ const s = n.offsetWidth;
2783
+ return e.removeChild(t), s;
2418
2784
  }
2419
2785
  return 0;
2420
2786
  }
2421
2787
  //* Update the input placeholder to an example number from the currently selected country.
2422
2788
  _updatePlaceholder() {
2423
2789
  const {
2424
- autoPlaceholder: t,
2425
- placeholderNumberType: e,
2790
+ autoPlaceholder: e,
2791
+ placeholderNumberType: t,
2426
2792
  nationalMode: i,
2427
- customPlaceholder: s
2428
- } = this.options, n = t === "aggressive" || !this.hadInitialPlaceholder && t === "polite";
2429
- if (u.utils && n) {
2430
- const o = u.utils.numberType[e];
2793
+ customPlaceholder: n
2794
+ } = this.options, s = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
2795
+ if (u.utils && s) {
2796
+ const o = u.utils.numberType[t];
2431
2797
  let a = this.selectedCountryData.iso2 ? u.utils.getExampleNumber(
2432
2798
  this.selectedCountryData.iso2,
2433
2799
  i,
2434
2800
  o
2435
2801
  ) : "";
2436
- a = this._beforeSetNumber(a), typeof s == "function" && (a = s(a, this.selectedCountryData)), this.telInput.setAttribute("placeholder", a);
2802
+ a = this._beforeSetNumber(a), typeof n == "function" && (a = n(a, this.selectedCountryData)), this.telInput.setAttribute("placeholder", a);
2437
2803
  }
2438
2804
  }
2439
2805
  //* Called when the user selects a list item from the dropdown.
2440
- _selectListItem(t) {
2441
- const e = t.getAttribute("data-country-code"), i = this._setCountry(e);
2806
+ _selectListItem(e) {
2807
+ const t = e.getAttribute("data-country-code"), i = this._setCountry(t);
2442
2808
  this._closeDropdown();
2443
- const s = t.getAttribute("data-dial-code");
2444
- this._updateDialCode(s), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this.telInput.focus(), i && this._triggerCountryChange();
2809
+ const n = e.getAttribute("data-dial-code");
2810
+ this._updateDialCode(n), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this.telInput.focus(), i && this._triggerCountryChange();
2445
2811
  }
2446
2812
  //* Close the dropdown and unbind any listeners.
2447
2813
  _closeDropdown() {
@@ -2454,41 +2820,43 @@ class v {
2454
2820
  ), this.countryList.removeEventListener("click", this._handleClickCountryList), this.options.dropdownContainer && (this.options.useFullscreenPopup || window.removeEventListener("scroll", this._handleWindowScroll), this.dropdown.parentNode && this.dropdown.parentNode.removeChild(this.dropdown)), this._trigger("close:countrydropdown");
2455
2821
  }
2456
2822
  //* Check if an element is visible within it's container, else scroll until it is.
2457
- _scrollTo(t) {
2458
- const e = this.countryList, i = document.documentElement.scrollTop, s = e.offsetHeight, n = e.getBoundingClientRect().top + i, o = n + s, a = t.offsetHeight, d = t.getBoundingClientRect().top + i, l = d + a, h = d - n + e.scrollTop;
2459
- if (d < n)
2460
- e.scrollTop = h;
2823
+ _scrollTo(e) {
2824
+ const t = this.countryList, i = document.documentElement.scrollTop, n = t.offsetHeight, s = t.getBoundingClientRect().top + i, o = s + n, a = e.offsetHeight, d = e.getBoundingClientRect().top + i, l = d + a, h = d - s + t.scrollTop;
2825
+ if (d < s)
2826
+ t.scrollTop = h;
2461
2827
  else if (l > o) {
2462
- const p = s - a;
2463
- e.scrollTop = h - p;
2828
+ const p = n - a;
2829
+ t.scrollTop = h - p;
2464
2830
  }
2465
2831
  }
2466
2832
  //* Replace any existing dial code with the new one
2467
2833
  //* Note: called from _selectListItem and setCountry
2468
- _updateDialCode(t) {
2469
- const e = this.telInput.value, i = `+${t}`;
2470
- let s;
2471
- if (e.charAt(0) === "+") {
2472
- const n = this._getDialCode(e);
2473
- n ? s = e.replace(n, i) : s = i, this.telInput.value = s;
2834
+ _updateDialCode(e) {
2835
+ const t = this.telInput.value, i = `+${e}`;
2836
+ let n;
2837
+ if (t.charAt(0) === "+") {
2838
+ const s = this._getDialCode(t);
2839
+ s ? n = t.replace(s, i) : n = i, this.telInput.value = n;
2474
2840
  }
2475
2841
  }
2476
2842
  //* Try and extract a valid international dial code from a full telephone number.
2477
2843
  //* Note: returns the raw string inc plus character and any whitespace/dots etc.
2478
- _getDialCode(t, e) {
2844
+ _getDialCode(e, t) {
2479
2845
  let i = "";
2480
- if (t.charAt(0) === "+") {
2481
- let s = "";
2482
- for (let n = 0; n < t.length; n++) {
2483
- const o = t.charAt(n);
2846
+ if (e.charAt(0) === "+") {
2847
+ let n = "";
2848
+ for (let s = 0; s < e.length; s++) {
2849
+ const o = e.charAt(s);
2484
2850
  if (/[0-9]/.test(o)) {
2485
- if (s += o, e)
2486
- this.dialCodeToIso2Map[s] && (i = t.substring(0, n + 1));
2487
- else if (this.dialCodes.has(s)) {
2488
- i = t.substring(0, n + 1);
2851
+ if (n += o, !!!this.dialCodeToIso2Map[n])
2852
+ break;
2853
+ if (t)
2854
+ i = e.substring(0, s + 1);
2855
+ else if (this.dialCodes.has(n)) {
2856
+ i = e.substring(0, s + 1);
2489
2857
  break;
2490
2858
  }
2491
- if (s.length === this.dialCodeMaxLen)
2859
+ if (n.length === this.dialCodeMaxLen)
2492
2860
  break;
2493
2861
  }
2494
2862
  }
@@ -2496,17 +2864,17 @@ class v {
2496
2864
  return i;
2497
2865
  }
2498
2866
  //* Get the input val, adding the dial code if separateDialCode is enabled.
2499
- _getFullNumber(t) {
2500
- const e = t || this.telInput.value.trim(), { dialCode: i } = this.selectedCountryData;
2501
- let s;
2502
- const n = I(e);
2503
- return this.options.separateDialCode && e.charAt(0) !== "+" && i && n ? s = `+${i}` : s = "", s + e;
2867
+ _getFullNumber(e) {
2868
+ const t = e || this.telInput.value.trim(), { dialCode: i } = this.selectedCountryData;
2869
+ let n;
2870
+ const s = I(t);
2871
+ return this.options.separateDialCode && t.charAt(0) !== "+" && i && s ? n = `+${i}` : n = "", n + t;
2504
2872
  }
2505
2873
  //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
2506
- _beforeSetNumber(t) {
2507
- const e = this._getDialCode(t), i = Q(
2508
- t,
2874
+ _beforeSetNumber(e) {
2875
+ const t = this._getDialCode(e), i = Q(
2509
2876
  e,
2877
+ t,
2510
2878
  this.options.separateDialCode,
2511
2879
  this.selectedCountryData
2512
2880
  );
@@ -2532,10 +2900,10 @@ class v {
2532
2900
  //********************
2533
2901
  //* Remove plugin.
2534
2902
  destroy() {
2535
- var n, o;
2903
+ var s, o;
2536
2904
  this.telInput.iti = void 0;
2537
- const { allowDropdown: t, separateDialCode: e } = this.options;
2538
- if (t) {
2905
+ const { allowDropdown: e, separateDialCode: t } = this.options;
2906
+ if (e) {
2539
2907
  this._closeDropdown(), this.selectedCountry.removeEventListener(
2540
2908
  "click",
2541
2909
  this._handleClickSelectedCountry
@@ -2547,9 +2915,9 @@ class v {
2547
2915
  a && a.removeEventListener("click", this._handleLabelClick);
2548
2916
  }
2549
2917
  const { form: i } = this.telInput;
2550
- this._handleHiddenInputSubmit && i && i.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this._handlePasteEvent && this.telInput.removeEventListener("paste", this._handlePasteEvent), this._handlePageLoad && window.removeEventListener("load", this._handlePageLoad), this.telInput.removeAttribute("data-intl-tel-input-id"), e && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2551
- const s = this.telInput.parentNode;
2552
- (n = s == null ? void 0 : s.parentNode) == null || n.insertBefore(this.telInput, s), (o = s == null ? void 0 : s.parentNode) == null || o.removeChild(s), delete u.instances[this.id];
2918
+ this._handleHiddenInputSubmit && i && i.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this._handlePasteEvent && this.telInput.removeEventListener("paste", this._handlePasteEvent), this._handlePageLoad && window.removeEventListener("load", this._handlePageLoad), this.telInput.removeAttribute("data-intl-tel-input-id"), t && (this.telInput.style.paddingLeft = this.originalPaddingLeft);
2919
+ const n = this.telInput.parentNode;
2920
+ (s = n == null ? void 0 : n.parentNode) == null || s.insertBefore(this.telInput, n), (o = n == null ? void 0 : n.parentNode) == null || o.removeChild(n), delete u.instances[this.id];
2553
2921
  }
2554
2922
  //* Get the extension from the current number.
2555
2923
  getExtension() {
@@ -2559,13 +2927,13 @@ class v {
2559
2927
  ) : "";
2560
2928
  }
2561
2929
  //* Format the number to the given format.
2562
- getNumber(t) {
2930
+ getNumber(e) {
2563
2931
  if (u.utils) {
2564
- const { iso2: e } = this.selectedCountryData;
2932
+ const { iso2: t } = this.selectedCountryData;
2565
2933
  return u.utils.formatNumber(
2566
2934
  this._getFullNumber(),
2567
- e,
2568
- t
2935
+ t,
2936
+ e
2569
2937
  );
2570
2938
  }
2571
2939
  return "";
@@ -2584,104 +2952,112 @@ class v {
2584
2952
  //* Get the validation error.
2585
2953
  getValidationError() {
2586
2954
  if (u.utils) {
2587
- const { iso2: t } = this.selectedCountryData;
2588
- return u.utils.getValidationError(this._getFullNumber(), t);
2955
+ const { iso2: e } = this.selectedCountryData;
2956
+ return u.utils.getValidationError(this._getFullNumber(), e);
2589
2957
  }
2590
2958
  return -99;
2591
2959
  }
2592
- //* Validate the input val (with precise=false)
2960
+ //* Validate the input val using number length only
2593
2961
  isValidNumber() {
2962
+ const { dialCode: e, iso2: t } = this.selectedCountryData;
2963
+ if (e === "44" && u.utils) {
2964
+ const i = this._getFullNumber(), n = u.utils.getCoreNumber(i, t);
2965
+ if (n[0] === "7" && n.length !== 10)
2966
+ return !1;
2967
+ }
2594
2968
  return this._validateNumber(!1);
2595
2969
  }
2596
- //* Validate the input val (with precise=true)
2970
+ //* Validate the input val with precise validation
2597
2971
  isValidNumberPrecise() {
2598
2972
  return this._validateNumber(!0);
2599
2973
  }
2600
- _utilsIsPossibleNumber(t) {
2601
- return u.utils ? u.utils.isPossibleNumber(t, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2974
+ _utilsIsPossibleNumber(e) {
2975
+ return u.utils ? u.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2602
2976
  }
2603
2977
  //* Shared internal validation logic to handle alpha character extension rules.
2604
- _validateNumber(t) {
2978
+ _validateNumber(e) {
2979
+ if (!u.utils)
2980
+ return null;
2605
2981
  if (!this.selectedCountryData.iso2)
2606
2982
  return !1;
2607
- const e = (o) => t ? this._utilsIsValidNumber(o) : this._utilsIsPossibleNumber(o), i = this._getFullNumber(), s = i.search(new RegExp("\\p{L}", "u"));
2608
- if (s > -1 && !this.options.allowPhonewords) {
2609
- const o = i.substring(0, s), a = e(o), d = e(i);
2983
+ const t = (o) => e ? this._utilsIsValidNumber(o) : this._utilsIsPossibleNumber(o), i = this._getFullNumber(), n = i.search(new RegExp("\\p{L}", "u"));
2984
+ if (n > -1 && !this.options.allowPhonewords) {
2985
+ const o = i.substring(0, n), a = t(o), d = t(i);
2610
2986
  return a && d;
2611
2987
  }
2612
- return e(i);
2988
+ return t(i);
2613
2989
  }
2614
- _utilsIsValidNumber(t) {
2615
- return u.utils ? u.utils.isValidNumber(t, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2990
+ _utilsIsValidNumber(e) {
2991
+ return u.utils ? u.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2616
2992
  }
2617
2993
  //* Update the selected country, and update the input val accordingly.
2618
- setCountry(t) {
2619
- const e = t == null ? void 0 : t.toLowerCase();
2620
- if (!D(e))
2621
- throw new Error(`Invalid country code: '${e}'`);
2994
+ setCountry(e) {
2995
+ const t = e == null ? void 0 : e.toLowerCase();
2996
+ if (!S(t))
2997
+ throw new Error(`Invalid country code: '${t}'`);
2622
2998
  const i = this.selectedCountryData.iso2;
2623
- (t && e !== i || !t && i) && (this._setCountry(e), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this._triggerCountryChange());
2999
+ (e && t !== i || !e && i) && (this._setCountry(t), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this._triggerCountryChange());
2624
3000
  }
2625
3001
  //* Set the input value and update the country.
2626
- setNumber(t) {
2627
- const e = this._updateCountryFromNumber(t);
2628
- this._updateValFromNumber(t), e && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
3002
+ setNumber(e) {
3003
+ const t = this._updateCountryFromNumber(e);
3004
+ this._updateValFromNumber(e), t && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
2629
3005
  }
2630
3006
  //* Set the placeholder number typ
2631
- setPlaceholderNumberType(t) {
2632
- this.options.placeholderNumberType = t, this._updatePlaceholder();
3007
+ setPlaceholderNumberType(e) {
3008
+ this.options.placeholderNumberType = e, this._updatePlaceholder();
2633
3009
  }
2634
- setDisabled(t) {
2635
- this.telInput.disabled = t, t ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
3010
+ setDisabled(e) {
3011
+ this.telInput.disabled = e, e ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2636
3012
  }
2637
3013
  }
2638
- const nt = (r) => {
3014
+ const st = (r) => {
2639
3015
  if (!u.utils && !u.startedLoadingUtilsScript) {
2640
- let t;
3016
+ let e;
2641
3017
  if (typeof r == "function")
2642
3018
  try {
2643
- t = Promise.resolve(r());
2644
- } catch (e) {
2645
- return Promise.reject(e);
3019
+ e = Promise.resolve(r());
3020
+ } catch (t) {
3021
+ return Promise.reject(t);
2646
3022
  }
2647
3023
  else
2648
3024
  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}`));
2649
- return u.startedLoadingUtilsScript = !0, t.then((e) => {
2650
- const i = e == null ? void 0 : e.default;
3025
+ return u.startedLoadingUtilsScript = !0, e.then((t) => {
3026
+ const i = t == null ? void 0 : t.default;
2651
3027
  if (!i || typeof i != "object")
2652
3028
  throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
2653
- return u.utils = i, w("handleUtils"), !0;
2654
- }).catch((e) => {
2655
- throw w("rejectUtilsScriptPromise", e), e;
3029
+ return u.utils = i, v("handleUtils"), !0;
3030
+ }).catch((t) => {
3031
+ throw v("rejectUtilsScriptPromise", t), t;
2656
3032
  });
2657
3033
  }
2658
3034
  return null;
2659
3035
  }, u = Object.assign(
2660
- (r, t) => {
2661
- const e = new v(r, t);
2662
- return e._init(), r.setAttribute("data-intl-tel-input-id", e.id.toString()), u.instances[e.id] = e, r.iti = e, e;
3036
+ (r, e) => {
3037
+ const t = new L(r, e);
3038
+ return t._init(), r.setAttribute("data-intl-tel-input-id", t.id.toString()), u.instances[t.id] = t, r.iti = t, t;
2663
3039
  },
2664
3040
  {
2665
- defaults: P,
3041
+ defaults: x,
2666
3042
  //* Using a static var like this allows us to mock it in the tests.
2667
3043
  documentReady: () => document.readyState === "complete",
2668
3044
  //* Get the country data object.
2669
3045
  getCountryData: () => _,
2670
3046
  //* A getter for the plugin instance.
2671
3047
  getInstance: (r) => {
2672
- const t = r.getAttribute("data-intl-tel-input-id");
2673
- return t ? u.instances[t] : null;
3048
+ const e = r.getAttribute("data-intl-tel-input-id");
3049
+ return e ? u.instances[e] : null;
2674
3050
  },
2675
3051
  //* A map from instance ID to instance object.
2676
3052
  instances: {},
2677
- attachUtils: nt,
3053
+ attachUtils: st,
2678
3054
  startedLoadingUtilsScript: !1,
2679
3055
  startedLoadingAutoCountry: !1,
2680
- version: "25.10.10"
3056
+ version: "25.10.12"
2681
3057
  }
2682
3058
  ), at = {
2683
3059
  __name: "IntlTelInput",
2684
- props: /* @__PURE__ */ S({
3060
+ props: /* @__PURE__ */ A({
2685
3061
  disabled: {
2686
3062
  type: Boolean,
2687
3063
  default: !1
@@ -2705,47 +3081,47 @@ const nt = (r) => {
2705
3081
  },
2706
3082
  modelModifiers: {}
2707
3083
  }),
2708
- emits: /* @__PURE__ */ S([
3084
+ emits: /* @__PURE__ */ A([
2709
3085
  "changeNumber",
2710
3086
  "changeCountry",
2711
3087
  "changeValidity",
2712
3088
  "changeErrorCode"
2713
3089
  ], ["update:modelValue"]),
2714
- setup(r, { expose: t, emit: e }) {
2715
- const i = E(r, "modelValue"), s = r, n = e, o = L(), a = L(), d = L(!1), l = () => a.value ? s.options.strictMode ? a.value.isValidNumberPrecise() : a.value.isValidNumber() : null, h = () => {
3090
+ setup(r, { expose: e, emit: t }) {
3091
+ const i = T(r, "modelValue"), n = r, s = t, o = N(), a = N(), d = N(!1), l = () => a.value ? n.options.strictMode ? a.value.isValidNumberPrecise() : a.value.isValidNumber() : null, h = () => {
2716
3092
  let c = l();
2717
- d.value !== c && (d.value = c, n("changeValidity", !!c), n(
3093
+ d.value !== c && (d.value = c, s("changeValidity", !!c), s(
2718
3094
  "changeErrorCode",
2719
3095
  c ? null : a.value.getValidationError()
2720
3096
  ));
2721
3097
  }, p = () => {
2722
3098
  var c;
2723
- n("changeNumber", ((c = a.value) == null ? void 0 : c.getNumber()) ?? ""), h();
2724
- }, f = () => {
3099
+ s("changeNumber", ((c = a.value) == null ? void 0 : c.getNumber()) ?? ""), h();
3100
+ }, g = () => {
2725
3101
  var c;
2726
- n("changeCountry", ((c = a.value) == null ? void 0 : c.getSelectedCountryData().iso2) ?? ""), p(), h();
3102
+ s("changeCountry", ((c = a.value) == null ? void 0 : c.getSelectedCountryData().iso2) ?? ""), p(), h();
2727
3103
  };
2728
3104
  return M(() => {
2729
- o.value && (a.value = u(o.value, s.options), s.value && a.value.setNumber(s.value), s.disabled && a.value.setDisabled(s.disabled), d.value = l());
3105
+ o.value && (a.value = u(o.value, n.options), n.value && a.value.setNumber(n.value), n.disabled && a.value.setDisabled(n.disabled), d.value = l());
2730
3106
  }), B(
2731
- () => s.disabled,
3107
+ () => n.disabled,
2732
3108
  (c) => {
2733
- var C;
2734
- return (C = a.value) == null ? void 0 : C.setDisabled(c);
3109
+ var f;
3110
+ return (f = a.value) == null ? void 0 : f.setDisabled(c);
2735
3111
  }
2736
- ), R(() => {
3112
+ ), F(() => {
2737
3113
  var c;
2738
3114
  return (c = a.value) == null ? void 0 : c.destroy();
2739
- }), t({ instance: a, input: o }), (c, C) => F((V(), z("input", O({
3115
+ }), e({ instance: a, input: o }), (c, f) => R((V(), z("input", $({
2740
3116
  ref_key: "input",
2741
3117
  ref: o,
2742
- "onUpdate:modelValue": C[0] || (C[0] = (y) => i.value = y),
3118
+ "onUpdate:modelValue": f[0] || (f[0] = (C) => i.value = C),
2743
3119
  type: "tel",
2744
- onCountrychange: f,
3120
+ onCountrychange: g,
2745
3121
  onInput: p
2746
3122
  }, r.inputProps), null, 16)), [
2747
3123
  [
2748
- $,
3124
+ U,
2749
3125
  i.value,
2750
3126
  void 0,
2751
3127
  { lazy: !0 }