@crodriguezdominguez/ion-intl-tel-input 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +308 -0
  2. package/crodriguezdominguez-ion-intl-tel-input-2.0.0.tgz +0 -0
  3. package/esm2020/crodriguezdominguez-ion-intl-tel-input.mjs +5 -0
  4. package/esm2020/lib/data/countries.mjs +2006 -0
  5. package/esm2020/lib/ion-intl-tel-input/ion-intl-tel-code.component.mjs +72 -0
  6. package/esm2020/lib/ion-intl-tel-input/ion-intl-tel-input.component.mjs +747 -0
  7. package/esm2020/lib/ion-intl-tel-input.directive.mjs +68 -0
  8. package/esm2020/lib/ion-intl-tel-input.module.mjs +51 -0
  9. package/esm2020/lib/ion-intl-tel-input.service.mjs +20 -0
  10. package/esm2020/lib/models/country.model.mjs +2 -0
  11. package/esm2020/lib/models/ion-intl-tel-input.model.mjs +2 -0
  12. package/esm2020/lib/pipes/country-placeholder.mjs +38 -0
  13. package/esm2020/lib/util/util.mjs +10 -0
  14. package/esm2020/public-api.mjs +10 -0
  15. package/fesm2015/crodriguezdominguez-ion-intl-tel-input.mjs +2997 -0
  16. package/fesm2015/crodriguezdominguez-ion-intl-tel-input.mjs.map +1 -0
  17. package/fesm2020/crodriguezdominguez-ion-intl-tel-input.mjs +2994 -0
  18. package/fesm2020/crodriguezdominguez-ion-intl-tel-input.mjs.map +1 -0
  19. package/index.d.ts +5 -0
  20. package/lib/data/countries.d.ts +2 -0
  21. package/lib/ion-intl-tel-input/ion-intl-tel-code.component.d.ts +28 -0
  22. package/lib/ion-intl-tel-input/ion-intl-tel-input.component.d.ts +310 -0
  23. package/lib/ion-intl-tel-input.directive.d.ts +10 -0
  24. package/lib/ion-intl-tel-input.module.d.ts +13 -0
  25. package/lib/ion-intl-tel-input.service.d.ts +9 -0
  26. package/lib/models/country.model.d.ts +10 -0
  27. package/lib/models/ion-intl-tel-input.model.d.ts +6 -0
  28. package/lib/pipes/country-placeholder.d.ts +8 -0
  29. package/lib/util/util.d.ts +1 -0
  30. package/package.json +64 -0
  31. package/public-api.d.ts +6 -0
@@ -0,0 +1,2997 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, Component, Input, ViewChild, Injectable, Pipe, EventEmitter, forwardRef, HostBinding, Output, NgModule } from '@angular/core';
3
+ import * as i4 from '@angular/forms';
4
+ import { NG_VALIDATORS, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
5
+ import { PhoneNumberUtil, PhoneNumberFormat } from 'google-libphonenumber';
6
+ import { __awaiter } from 'tslib';
7
+ import * as i1 from '@ionic/angular';
8
+ import { IonicModule } from '@ionic/angular';
9
+ import * as i2 from '@angular/common';
10
+ import { CommonModule } from '@angular/common';
11
+
12
+ class IonIntlTelInputValidators {
13
+ static phone(control) {
14
+ const error = { phone: true };
15
+ let phoneNumber;
16
+ if (typeof control.value === 'string') {
17
+ try {
18
+ phoneNumber = PhoneNumberUtil.getInstance().parse(control.value, null);
19
+ if (PhoneNumberUtil.getInstance().isValidNumber(phoneNumber)) {
20
+ return null;
21
+ }
22
+ }
23
+ catch (e) {
24
+ phoneNumber = null;
25
+ }
26
+ if (!phoneNumber) {
27
+ try {
28
+ // If failed to parse, try adding a +1 and see if valid
29
+ if (control.value.length >= 10 && control.value.indexOf('+') === -1) {
30
+ const v = '+1' + control.value;
31
+ phoneNumber = PhoneNumberUtil.getInstance().parse(v, null);
32
+ if (PhoneNumberUtil.getInstance().isValidNumber(phoneNumber)) {
33
+ return null;
34
+ }
35
+ }
36
+ }
37
+ catch (e) {
38
+ return error;
39
+ }
40
+ }
41
+ }
42
+ if (!control.value) {
43
+ return null; // allow empty to be valid as the required validator can be added if needed
44
+ }
45
+ return error;
46
+ }
47
+ }
48
+ class IonIntlTelInputValidatorDirective {
49
+ validate(control) {
50
+ return IonIntlTelInputValidators.phone(control);
51
+ }
52
+ }
53
+ /** @nocollapse */ IonIntlTelInputValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
54
+ /** @nocollapse */ IonIntlTelInputValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: IonIntlTelInputValidatorDirective, selector: "[ionIntlTelInputValid]", providers: [
55
+ {
56
+ provide: NG_VALIDATORS,
57
+ useExisting: IonIntlTelInputValidatorDirective,
58
+ multi: true,
59
+ },
60
+ ], ngImport: i0 });
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputValidatorDirective, decorators: [{
62
+ type: Directive,
63
+ args: [{
64
+ // tslint:disable-next-line: directive-selector
65
+ selector: '[ionIntlTelInputValid]',
66
+ providers: [
67
+ {
68
+ provide: NG_VALIDATORS,
69
+ useExisting: IonIntlTelInputValidatorDirective,
70
+ multi: true,
71
+ },
72
+ ],
73
+ }]
74
+ }] });
75
+
76
+ const raf = (h) => {
77
+ if (typeof __zone_symbol__requestAnimationFrame === 'function') {
78
+ return __zone_symbol__requestAnimationFrame(h);
79
+ }
80
+ if (typeof requestAnimationFrame === 'function') {
81
+ return requestAnimationFrame(h);
82
+ }
83
+ return setTimeout(h);
84
+ };
85
+
86
+ class IonIntTelCodeComponent {
87
+ constructor(modalCtrl) {
88
+ this.modalCtrl = modalCtrl;
89
+ this.closeButtonText = 'Close';
90
+ this.closeButtonSlot = 'end';
91
+ }
92
+ ngOnInit() {
93
+ this.allCountries = this.countries;
94
+ }
95
+ ionViewDidEnter() {
96
+ if (this.sbar && this.shouldFocusSearchbar) {
97
+ setTimeout(() => { this.sbar.setFocus(); }, 400);
98
+ }
99
+ }
100
+ search(ev) {
101
+ let search = ev.detail.value;
102
+ this.notFound = false;
103
+ if (search === '' || search === null) {
104
+ this.countries = this.allCountries;
105
+ }
106
+ else {
107
+ search = search.toLocaleLowerCase();
108
+ this.countries = this.allCountries.filter(r => {
109
+ return (r.name && r.name.toLocaleLowerCase().indexOf(search) !== -1);
110
+ });
111
+ if (this.countries.length === 0) {
112
+ this.notFound = true;
113
+ }
114
+ }
115
+ }
116
+ itemTapped(c) {
117
+ this.modalCtrl.dismiss(c);
118
+ }
119
+ closeModal() {
120
+ this.modalCtrl.dismiss(null);
121
+ }
122
+ }
123
+ /** @nocollapse */ IonIntTelCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntTelCodeComponent, deps: [{ token: i1.ModalController }], target: i0.ɵɵFactoryTarget.Component });
124
+ /** @nocollapse */ IonIntTelCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: IonIntTelCodeComponent, selector: "ion-intl-tel-code", inputs: { country: "country", canSearch: "canSearch", closeButtonText: "closeButtonText", closeButtonSlot: "closeButtonSlot", countries: "countries", searchFailText: "searchFailText", searchPlaceholder: "searchPlaceholder", shouldFocusSearchbar: "shouldFocusSearchbar", title: "title", dialCode: "dialCode" }, viewQueries: [{ propertyName: "sbar", first: true, predicate: ["searchBar"], descendants: true }], ngImport: i0, template: "<ion-header>\n <ion-toolbar>\n <ion-title class=\"ion-text-center\">\n {{title}}\n </ion-title>\n\n <ion-buttons [slot]=\"closeButtonSlot\">\n <ion-button ion-button (click)=\"closeModal()\">{{closeButtonText}}</ion-button>\n </ion-buttons>\n\n </ion-toolbar>\n <ion-searchbar #searchBar *ngIf=\"canSearch\" placeholder=\"{{searchPlaceholder}}\" [debounce]=\"400\"\n (keyup.enter)=\"$event.target.blur()\" (ionChange)=\"search($event)\"></ion-searchbar>\n</ion-header>\n\n<ion-content>\n <ion-list>\n <ion-radio-group [value]=\"country.isoCode\">\n <ion-item style=\"white-space:normal\" *ngFor=\"let c of countries\">\n <ion-radio [value]=\"c.isoCode\" slot=\"start\" color=\"primary\" (click)=\"itemTapped(c)\"></ion-radio>\n <ion-label>{{c.name}} <span *ngIf=\"dialCode\">{{dialCode}}{{c.displayDialCode}}</span></ion-label>\n <span slot=\"end\" class=\"fi fi-{{c.flagClass}}\"></span>\n </ion-item>\n </ion-radio-group>\n <ion-item lines=\"none\" *ngIf=\"notFound\">\n <ion-text>{{searchFailText}}</ion-text>\n </ion-item>\n </ion-list>\n</ion-content>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i1.IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: i1.IonRadio, selector: "ion-radio", inputs: ["color", "disabled", "justify", "labelPlacement", "legacy", "mode", "name", "value"] }, { kind: "component", type: i1.IonRadioGroup, selector: "ion-radio-group", inputs: ["allowEmptySelection", "name", "value"] }, { kind: "component", type: i1.IonSearchbar, selector: "ion-searchbar", inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] }, { kind: "component", type: i1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "directive", type: i1.RadioValueAccessor, selector: "ion-radio" }, { kind: "directive", type: i1.SelectValueAccessor, selector: "ion-range, ion-select, ion-radio-group, ion-segment, ion-datetime" }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }] });
125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntTelCodeComponent, decorators: [{
126
+ type: Component,
127
+ args: [{ selector: 'ion-intl-tel-code', template: "<ion-header>\n <ion-toolbar>\n <ion-title class=\"ion-text-center\">\n {{title}}\n </ion-title>\n\n <ion-buttons [slot]=\"closeButtonSlot\">\n <ion-button ion-button (click)=\"closeModal()\">{{closeButtonText}}</ion-button>\n </ion-buttons>\n\n </ion-toolbar>\n <ion-searchbar #searchBar *ngIf=\"canSearch\" placeholder=\"{{searchPlaceholder}}\" [debounce]=\"400\"\n (keyup.enter)=\"$event.target.blur()\" (ionChange)=\"search($event)\"></ion-searchbar>\n</ion-header>\n\n<ion-content>\n <ion-list>\n <ion-radio-group [value]=\"country.isoCode\">\n <ion-item style=\"white-space:normal\" *ngFor=\"let c of countries\">\n <ion-radio [value]=\"c.isoCode\" slot=\"start\" color=\"primary\" (click)=\"itemTapped(c)\"></ion-radio>\n <ion-label>{{c.name}} <span *ngIf=\"dialCode\">{{dialCode}}{{c.displayDialCode}}</span></ion-label>\n <span slot=\"end\" class=\"fi fi-{{c.flagClass}}\"></span>\n </ion-item>\n </ion-radio-group>\n <ion-item lines=\"none\" *ngIf=\"notFound\">\n <ion-text>{{searchFailText}}</ion-text>\n </ion-item>\n </ion-list>\n</ion-content>\n" }]
128
+ }], ctorParameters: function () { return [{ type: i1.ModalController }]; }, propDecorators: { country: [{
129
+ type: Input
130
+ }], canSearch: [{
131
+ type: Input
132
+ }], closeButtonText: [{
133
+ type: Input
134
+ }], closeButtonSlot: [{
135
+ type: Input
136
+ }], countries: [{
137
+ type: Input
138
+ }], searchFailText: [{
139
+ type: Input
140
+ }], searchPlaceholder: [{
141
+ type: Input
142
+ }], shouldFocusSearchbar: [{
143
+ type: Input
144
+ }], title: [{
145
+ type: Input
146
+ }], dialCode: [{
147
+ type: Input
148
+ }], sbar: [{
149
+ type: ViewChild,
150
+ args: ['searchBar']
151
+ }] } });
152
+
153
+ const countries = [
154
+ {
155
+ name: 'Afghanistan',
156
+ isoCode: 'af',
157
+ dialCode: '93',
158
+ flagClass: 'af',
159
+ priority: 0,
160
+ placeholder: ''
161
+ },
162
+ {
163
+ name: 'Albania',
164
+ isoCode: 'al',
165
+ dialCode: '355',
166
+ flagClass: 'al',
167
+ priority: 0,
168
+ placeholder: ''
169
+ },
170
+ {
171
+ name: 'Algeria',
172
+ isoCode: 'dz',
173
+ dialCode: '213',
174
+ flagClass: 'dz',
175
+ priority: 0,
176
+ placeholder: ''
177
+ },
178
+ {
179
+ name: 'AmericanSamoa',
180
+ isoCode: 'as',
181
+ dialCode: '1 684',
182
+ flagClass: 'as',
183
+ priority: 0,
184
+ areaCodes: [
185
+ '684'
186
+ ],
187
+ placeholder: ''
188
+ },
189
+ {
190
+ name: 'Andorra',
191
+ isoCode: 'ad',
192
+ dialCode: '376',
193
+ flagClass: 'ad',
194
+ priority: 0,
195
+ placeholder: ''
196
+ },
197
+ {
198
+ name: 'Angola',
199
+ isoCode: 'ao',
200
+ dialCode: '244',
201
+ flagClass: 'ao',
202
+ priority: 0,
203
+ placeholder: ''
204
+ },
205
+ {
206
+ name: 'Anguilla',
207
+ isoCode: 'ai',
208
+ dialCode: '1 264',
209
+ flagClass: 'ai',
210
+ priority: 0,
211
+ areaCodes: [
212
+ '264'
213
+ ],
214
+ placeholder: ''
215
+ },
216
+ {
217
+ name: 'Antigua and Barbuda',
218
+ isoCode: 'ag',
219
+ dialCode: '1 268',
220
+ flagClass: 'ag',
221
+ priority: 0,
222
+ areaCodes: [
223
+ '268'
224
+ ],
225
+ placeholder: ''
226
+ },
227
+ {
228
+ name: 'Argentina',
229
+ isoCode: 'ar',
230
+ dialCode: '54',
231
+ flagClass: 'ar',
232
+ priority: 0,
233
+ placeholder: ''
234
+ },
235
+ {
236
+ name: 'Armenia',
237
+ isoCode: 'am',
238
+ dialCode: '374',
239
+ flagClass: 'am',
240
+ priority: 0,
241
+ placeholder: ''
242
+ },
243
+ {
244
+ name: 'Aruba',
245
+ isoCode: 'aw',
246
+ dialCode: '297',
247
+ flagClass: 'aw',
248
+ priority: 0,
249
+ placeholder: ''
250
+ },
251
+ {
252
+ name: 'Australia',
253
+ isoCode: 'au',
254
+ dialCode: '61',
255
+ flagClass: 'au',
256
+ priority: 0,
257
+ placeholder: ''
258
+ },
259
+ {
260
+ name: 'Austria',
261
+ isoCode: 'at',
262
+ dialCode: '43',
263
+ flagClass: 'at',
264
+ priority: 0,
265
+ placeholder: ''
266
+ },
267
+ {
268
+ name: 'Azerbaijan',
269
+ isoCode: 'az',
270
+ dialCode: '994',
271
+ flagClass: 'az',
272
+ priority: 0,
273
+ placeholder: ''
274
+ },
275
+ {
276
+ name: 'Bahamas',
277
+ isoCode: 'bs',
278
+ dialCode: '1 242',
279
+ flagClass: 'bs',
280
+ priority: 0,
281
+ areaCodes: [
282
+ '242'
283
+ ],
284
+ placeholder: ''
285
+ },
286
+ {
287
+ name: 'Bahrain',
288
+ isoCode: 'bh',
289
+ dialCode: '973',
290
+ flagClass: 'bh',
291
+ priority: 0,
292
+ placeholder: ''
293
+ },
294
+ {
295
+ name: 'Bangladesh',
296
+ isoCode: 'bd',
297
+ dialCode: '880',
298
+ flagClass: 'bd',
299
+ priority: 0,
300
+ placeholder: ''
301
+ },
302
+ {
303
+ name: 'Barbados',
304
+ isoCode: 'bb',
305
+ dialCode: '1 246',
306
+ flagClass: 'bb',
307
+ priority: 0,
308
+ areaCodes: [
309
+ '246'
310
+ ],
311
+ placeholder: ''
312
+ },
313
+ {
314
+ name: 'Belarus',
315
+ isoCode: 'by',
316
+ dialCode: '375',
317
+ flagClass: 'by',
318
+ priority: 0,
319
+ placeholder: ''
320
+ },
321
+ {
322
+ name: 'Belgium',
323
+ isoCode: 'be',
324
+ dialCode: '32',
325
+ flagClass: 'be',
326
+ priority: 0,
327
+ placeholder: ''
328
+ },
329
+ {
330
+ name: 'Belize',
331
+ isoCode: 'bz',
332
+ dialCode: '501',
333
+ flagClass: 'bz',
334
+ priority: 0,
335
+ placeholder: ''
336
+ },
337
+ {
338
+ name: 'Benin',
339
+ isoCode: 'bj',
340
+ dialCode: '229',
341
+ flagClass: 'bj',
342
+ priority: 0,
343
+ placeholder: ''
344
+ },
345
+ {
346
+ name: 'Bermuda',
347
+ isoCode: 'bm',
348
+ dialCode: '1 441',
349
+ flagClass: 'bm',
350
+ priority: 0,
351
+ areaCodes: [
352
+ '441'
353
+ ],
354
+ placeholder: ''
355
+ },
356
+ {
357
+ name: 'Bhutan',
358
+ isoCode: 'bt',
359
+ dialCode: '975',
360
+ flagClass: 'bt',
361
+ priority: 0,
362
+ placeholder: ''
363
+ },
364
+ {
365
+ name: 'Bolivia, Plurinational State of',
366
+ isoCode: 'bo',
367
+ dialCode: '591',
368
+ flagClass: 'bo',
369
+ priority: 0,
370
+ placeholder: ''
371
+ },
372
+ {
373
+ name: 'Bosnia and Herzegovina',
374
+ isoCode: 'ba',
375
+ dialCode: '387',
376
+ flagClass: 'ba',
377
+ priority: 0,
378
+ placeholder: ''
379
+ },
380
+ {
381
+ name: 'Botswana',
382
+ isoCode: 'bw',
383
+ dialCode: '267',
384
+ flagClass: 'bw',
385
+ priority: 0,
386
+ placeholder: ''
387
+ },
388
+ {
389
+ name: 'Brazil',
390
+ isoCode: 'br',
391
+ dialCode: '55',
392
+ flagClass: 'br',
393
+ priority: 0,
394
+ placeholder: ''
395
+ },
396
+ {
397
+ name: 'British Indian Ocean Territory',
398
+ isoCode: 'io',
399
+ dialCode: '246',
400
+ flagClass: 'io',
401
+ priority: 0,
402
+ placeholder: ''
403
+ },
404
+ {
405
+ name: 'Virgin Islands, British',
406
+ isoCode: 'vg',
407
+ dialCode: '1 284',
408
+ flagClass: 'vg',
409
+ priority: 0,
410
+ areaCodes: [
411
+ '284'
412
+ ],
413
+ placeholder: ''
414
+ },
415
+ {
416
+ name: 'Brunei Darussalam',
417
+ isoCode: 'bn',
418
+ dialCode: '673',
419
+ flagClass: 'bn',
420
+ priority: 0,
421
+ placeholder: ''
422
+ },
423
+ {
424
+ name: 'Bulgaria',
425
+ isoCode: 'bg',
426
+ dialCode: '359',
427
+ flagClass: 'bg',
428
+ priority: 0,
429
+ placeholder: ''
430
+ },
431
+ {
432
+ name: 'Burkina Faso',
433
+ isoCode: 'bf',
434
+ dialCode: '226',
435
+ flagClass: 'bf',
436
+ priority: 0,
437
+ placeholder: ''
438
+ },
439
+ {
440
+ name: 'Burundi',
441
+ isoCode: 'bi',
442
+ dialCode: '257',
443
+ flagClass: 'bi',
444
+ priority: 0,
445
+ placeholder: ''
446
+ },
447
+ {
448
+ name: 'Cambodia',
449
+ isoCode: 'kh',
450
+ dialCode: '855',
451
+ flagClass: 'kh',
452
+ priority: 0,
453
+ placeholder: ''
454
+ },
455
+ {
456
+ name: 'Cameroon',
457
+ isoCode: 'cm',
458
+ dialCode: '237',
459
+ flagClass: 'cm',
460
+ priority: 0,
461
+ placeholder: ''
462
+ },
463
+ {
464
+ name: 'Canada',
465
+ isoCode: 'ca',
466
+ dialCode: '1',
467
+ flagClass: 'ca',
468
+ priority: 0,
469
+ areaCodes: [
470
+ '204',
471
+ '226',
472
+ '236',
473
+ '249',
474
+ '250',
475
+ '289',
476
+ '306',
477
+ '343',
478
+ '365',
479
+ '387',
480
+ '403',
481
+ '416',
482
+ '418',
483
+ '431',
484
+ '437',
485
+ '438',
486
+ '450',
487
+ '506',
488
+ '514',
489
+ '519',
490
+ '548',
491
+ '579',
492
+ '581',
493
+ '587',
494
+ '604',
495
+ '613',
496
+ '639',
497
+ '647',
498
+ '672',
499
+ '705',
500
+ '709',
501
+ '742',
502
+ '778',
503
+ '780',
504
+ '782',
505
+ '807',
506
+ '819',
507
+ '825',
508
+ '867',
509
+ '873',
510
+ '902',
511
+ '905'
512
+ ],
513
+ placeholder: ''
514
+ },
515
+ {
516
+ name: 'Cape Verde',
517
+ isoCode: 'cv',
518
+ dialCode: '238',
519
+ flagClass: 'cv',
520
+ priority: 0,
521
+ placeholder: ''
522
+ },
523
+ {
524
+ name: 'Cayman Islands',
525
+ isoCode: 'ky',
526
+ dialCode: ' 345',
527
+ flagClass: 'ky',
528
+ priority: 0,
529
+ areaCodes: [
530
+ '345'
531
+ ],
532
+ placeholder: ''
533
+ },
534
+ {
535
+ name: 'Central African Republic',
536
+ isoCode: 'cf',
537
+ dialCode: '236',
538
+ flagClass: 'cf',
539
+ priority: 0,
540
+ placeholder: ''
541
+ },
542
+ {
543
+ name: 'Chad',
544
+ isoCode: 'td',
545
+ dialCode: '235',
546
+ flagClass: 'td',
547
+ priority: 0,
548
+ placeholder: ''
549
+ },
550
+ {
551
+ name: 'Chile',
552
+ isoCode: 'cl',
553
+ dialCode: '56',
554
+ flagClass: 'cl',
555
+ priority: 0,
556
+ placeholder: ''
557
+ },
558
+ {
559
+ name: 'China',
560
+ isoCode: 'cn',
561
+ dialCode: '86',
562
+ flagClass: 'cn',
563
+ priority: 0,
564
+ placeholder: ''
565
+ },
566
+ {
567
+ name: 'Christmas Island',
568
+ isoCode: 'cx',
569
+ dialCode: '61',
570
+ flagClass: 'cx',
571
+ priority: 0,
572
+ placeholder: ''
573
+ },
574
+ {
575
+ name: 'Cocos (Keeling) Islands',
576
+ isoCode: 'cc',
577
+ dialCode: '61',
578
+ flagClass: 'cc',
579
+ priority: 0,
580
+ placeholder: ''
581
+ },
582
+ {
583
+ name: 'Colombia',
584
+ isoCode: 'co',
585
+ dialCode: '57',
586
+ flagClass: 'co',
587
+ priority: 0,
588
+ placeholder: ''
589
+ },
590
+ {
591
+ name: 'Comoros',
592
+ isoCode: 'km',
593
+ dialCode: '269',
594
+ flagClass: 'km',
595
+ priority: 0,
596
+ placeholder: ''
597
+ },
598
+ {
599
+ name: 'Congo, The Democratic Republic of the Congo',
600
+ isoCode: 'cd',
601
+ dialCode: '243',
602
+ flagClass: 'cd',
603
+ priority: 0,
604
+ placeholder: ''
605
+ },
606
+ {
607
+ name: 'Congo',
608
+ isoCode: 'cg',
609
+ dialCode: '242',
610
+ flagClass: 'cg',
611
+ priority: 0,
612
+ placeholder: ''
613
+ },
614
+ {
615
+ name: 'Cook Islands',
616
+ isoCode: 'ck',
617
+ dialCode: '682',
618
+ flagClass: 'ck',
619
+ priority: 0,
620
+ placeholder: ''
621
+ },
622
+ {
623
+ name: 'Costa Rica',
624
+ isoCode: 'cr',
625
+ dialCode: '506',
626
+ flagClass: 'cr',
627
+ priority: 0,
628
+ placeholder: ''
629
+ },
630
+ {
631
+ name: 'Cote d\'Ivoire',
632
+ isoCode: 'ci',
633
+ dialCode: '225',
634
+ flagClass: 'ci',
635
+ priority: 0,
636
+ placeholder: ''
637
+ },
638
+ {
639
+ name: 'Croatia',
640
+ isoCode: 'hr',
641
+ dialCode: '385',
642
+ flagClass: 'hr',
643
+ priority: 0,
644
+ placeholder: ''
645
+ },
646
+ {
647
+ name: 'Cuba',
648
+ isoCode: 'cu',
649
+ dialCode: '53',
650
+ flagClass: 'cu',
651
+ priority: 0,
652
+ placeholder: ''
653
+ },
654
+ {
655
+ name: 'Cyprus',
656
+ isoCode: 'cy',
657
+ dialCode: '357',
658
+ flagClass: 'cy',
659
+ priority: 0,
660
+ placeholder: ''
661
+ },
662
+ {
663
+ name: 'Czech Republic',
664
+ isoCode: 'cz',
665
+ dialCode: '420',
666
+ flagClass: 'cz',
667
+ priority: 0,
668
+ placeholder: ''
669
+ },
670
+ {
671
+ name: 'Denmark',
672
+ isoCode: 'dk',
673
+ dialCode: '45',
674
+ flagClass: 'dk',
675
+ priority: 0,
676
+ placeholder: ''
677
+ },
678
+ {
679
+ name: 'Djibouti',
680
+ isoCode: 'dj',
681
+ dialCode: '253',
682
+ flagClass: 'dj',
683
+ priority: 0,
684
+ placeholder: ''
685
+ },
686
+ {
687
+ name: 'Dominica',
688
+ isoCode: 'dm',
689
+ dialCode: '1 767',
690
+ flagClass: 'dm',
691
+ priority: 0,
692
+ placeholder: ''
693
+ },
694
+ {
695
+ name: 'Dominican Republic',
696
+ isoCode: 'do',
697
+ dialCode: '1 849',
698
+ flagClass: 'do',
699
+ priority: 0,
700
+ areaCodes: [
701
+ '809',
702
+ '829',
703
+ '849'
704
+ ],
705
+ placeholder: ''
706
+ },
707
+ {
708
+ name: 'Ecuador',
709
+ isoCode: 'ec',
710
+ dialCode: '593',
711
+ flagClass: 'ec',
712
+ priority: 0,
713
+ placeholder: ''
714
+ },
715
+ {
716
+ name: 'Egypt',
717
+ isoCode: 'eg',
718
+ dialCode: '20',
719
+ flagClass: 'eg',
720
+ priority: 0,
721
+ placeholder: ''
722
+ },
723
+ {
724
+ name: 'El Salvador',
725
+ isoCode: 'sv',
726
+ dialCode: '503',
727
+ flagClass: 'sv',
728
+ priority: 0,
729
+ placeholder: ''
730
+ },
731
+ {
732
+ name: 'Equatorial Guinea',
733
+ isoCode: 'gq',
734
+ dialCode: '240',
735
+ flagClass: 'gq',
736
+ priority: 0,
737
+ placeholder: ''
738
+ },
739
+ {
740
+ name: 'Eritrea',
741
+ isoCode: 'er',
742
+ dialCode: '291',
743
+ flagClass: 'er',
744
+ priority: 0,
745
+ placeholder: ''
746
+ },
747
+ {
748
+ name: 'Estonia',
749
+ isoCode: 'ee',
750
+ dialCode: '372',
751
+ flagClass: 'ee',
752
+ priority: 0,
753
+ placeholder: ''
754
+ },
755
+ {
756
+ name: 'Ethiopia',
757
+ isoCode: 'et',
758
+ dialCode: '251',
759
+ flagClass: 'et',
760
+ priority: 0,
761
+ placeholder: ''
762
+ },
763
+ {
764
+ name: 'Falkland Islands (Malvinas)',
765
+ isoCode: 'fk',
766
+ dialCode: '500',
767
+ flagClass: 'fk',
768
+ priority: 0,
769
+ placeholder: ''
770
+ },
771
+ {
772
+ name: 'Faroe Islands',
773
+ isoCode: 'fo',
774
+ dialCode: '298',
775
+ flagClass: 'fo',
776
+ priority: 0,
777
+ placeholder: ''
778
+ },
779
+ {
780
+ name: 'Fiji',
781
+ isoCode: 'fj',
782
+ dialCode: '679',
783
+ flagClass: 'fj',
784
+ priority: 0,
785
+ placeholder: ''
786
+ },
787
+ {
788
+ name: 'Finland',
789
+ isoCode: 'fi',
790
+ dialCode: '358',
791
+ flagClass: 'fi',
792
+ priority: 0,
793
+ placeholder: ''
794
+ },
795
+ {
796
+ name: 'France',
797
+ isoCode: 'fr',
798
+ dialCode: '33',
799
+ flagClass: 'fr',
800
+ priority: 0,
801
+ placeholder: ''
802
+ },
803
+ {
804
+ name: 'French Guiana',
805
+ isoCode: 'gf',
806
+ dialCode: '594',
807
+ flagClass: 'gf',
808
+ priority: 0,
809
+ placeholder: ''
810
+ },
811
+ {
812
+ name: 'French Polynesia',
813
+ isoCode: 'pf',
814
+ dialCode: '689',
815
+ flagClass: 'pf',
816
+ priority: 0,
817
+ placeholder: ''
818
+ },
819
+ {
820
+ name: 'Gabon',
821
+ isoCode: 'ga',
822
+ dialCode: '241',
823
+ flagClass: 'ga',
824
+ priority: 0,
825
+ placeholder: ''
826
+ },
827
+ {
828
+ name: 'Gambia',
829
+ isoCode: 'gm',
830
+ dialCode: '220',
831
+ flagClass: 'gm',
832
+ priority: 0,
833
+ placeholder: ''
834
+ },
835
+ {
836
+ name: 'Georgia',
837
+ isoCode: 'ge',
838
+ dialCode: '995',
839
+ flagClass: 'ge',
840
+ priority: 0,
841
+ placeholder: ''
842
+ },
843
+ {
844
+ name: 'Germany',
845
+ isoCode: 'de',
846
+ dialCode: '49',
847
+ flagClass: 'de',
848
+ priority: 0,
849
+ placeholder: ''
850
+ },
851
+ {
852
+ name: 'Ghana',
853
+ isoCode: 'gh',
854
+ dialCode: '233',
855
+ flagClass: 'gh',
856
+ priority: 0,
857
+ placeholder: ''
858
+ },
859
+ {
860
+ name: 'Gibraltar',
861
+ isoCode: 'gi',
862
+ dialCode: '350',
863
+ flagClass: 'gi',
864
+ priority: 0,
865
+ placeholder: ''
866
+ },
867
+ {
868
+ name: 'Greece',
869
+ isoCode: 'gr',
870
+ dialCode: '30',
871
+ flagClass: 'gr',
872
+ priority: 0,
873
+ placeholder: ''
874
+ },
875
+ {
876
+ name: 'Greenland',
877
+ isoCode: 'gl',
878
+ dialCode: '299',
879
+ flagClass: 'gl',
880
+ priority: 0,
881
+ placeholder: ''
882
+ },
883
+ {
884
+ name: 'Grenada',
885
+ isoCode: 'gd',
886
+ dialCode: '1 473',
887
+ flagClass: 'gd',
888
+ priority: 0,
889
+ placeholder: ''
890
+ },
891
+ {
892
+ name: 'Guadeloupe',
893
+ isoCode: 'gp',
894
+ dialCode: '590',
895
+ flagClass: 'gp',
896
+ priority: 0,
897
+ placeholder: ''
898
+ },
899
+ {
900
+ name: 'Guam',
901
+ isoCode: 'gu',
902
+ dialCode: '1 671',
903
+ flagClass: 'gu',
904
+ priority: 0,
905
+ areaCodes: [
906
+ '671'
907
+ ],
908
+ placeholder: ''
909
+ },
910
+ {
911
+ name: 'Guatemala',
912
+ isoCode: 'gt',
913
+ dialCode: '502',
914
+ flagClass: 'gt',
915
+ priority: 0,
916
+ placeholder: ''
917
+ },
918
+ {
919
+ name: 'Guernsey',
920
+ isoCode: 'gg',
921
+ dialCode: '44',
922
+ flagClass: 'gg',
923
+ priority: 0,
924
+ areaCodes: [
925
+ '1481'
926
+ ],
927
+ placeholder: ''
928
+ },
929
+ {
930
+ name: 'Guinea',
931
+ isoCode: 'gn',
932
+ dialCode: '224',
933
+ flagClass: 'gn',
934
+ priority: 0,
935
+ placeholder: ''
936
+ },
937
+ {
938
+ name: 'Guinea-Bissau',
939
+ isoCode: 'gw',
940
+ dialCode: '245',
941
+ flagClass: 'gw',
942
+ priority: 0,
943
+ placeholder: ''
944
+ },
945
+ {
946
+ name: 'Guyana',
947
+ isoCode: 'gy',
948
+ dialCode: '595',
949
+ flagClass: 'gy',
950
+ priority: 0,
951
+ placeholder: ''
952
+ },
953
+ {
954
+ name: 'Haiti',
955
+ isoCode: 'ht',
956
+ dialCode: '509',
957
+ flagClass: 'ht',
958
+ priority: 0,
959
+ placeholder: ''
960
+ },
961
+ {
962
+ name: 'Honduras',
963
+ isoCode: 'hn',
964
+ dialCode: '504',
965
+ flagClass: 'hn',
966
+ priority: 0,
967
+ placeholder: ''
968
+ },
969
+ {
970
+ name: 'Hong Kong',
971
+ isoCode: 'hk',
972
+ dialCode: '852',
973
+ flagClass: 'hk',
974
+ priority: 0,
975
+ placeholder: ''
976
+ },
977
+ {
978
+ name: 'Hungary',
979
+ isoCode: 'hu',
980
+ dialCode: '36',
981
+ flagClass: 'hu',
982
+ priority: 0,
983
+ placeholder: ''
984
+ },
985
+ {
986
+ name: 'Iceland',
987
+ isoCode: 'is',
988
+ dialCode: '354',
989
+ flagClass: 'is',
990
+ priority: 0,
991
+ placeholder: ''
992
+ },
993
+ {
994
+ name: 'India',
995
+ isoCode: 'in',
996
+ dialCode: '91',
997
+ flagClass: 'in',
998
+ priority: 0,
999
+ placeholder: ''
1000
+ },
1001
+ {
1002
+ name: 'Indonesia',
1003
+ isoCode: 'id',
1004
+ dialCode: '62',
1005
+ flagClass: 'id',
1006
+ priority: 0,
1007
+ placeholder: ''
1008
+ },
1009
+ {
1010
+ name: 'Iran, Islamic Republic of Persian Gulf',
1011
+ isoCode: 'ir',
1012
+ dialCode: '98',
1013
+ flagClass: 'ir',
1014
+ priority: 0,
1015
+ placeholder: ''
1016
+ },
1017
+ {
1018
+ name: 'Iraq',
1019
+ isoCode: 'iq',
1020
+ dialCode: '964',
1021
+ flagClass: 'iq',
1022
+ priority: 0,
1023
+ placeholder: ''
1024
+ },
1025
+ {
1026
+ name: 'Ireland',
1027
+ isoCode: 'ie',
1028
+ dialCode: '353',
1029
+ flagClass: 'ie',
1030
+ priority: 0,
1031
+ placeholder: ''
1032
+ },
1033
+ {
1034
+ name: 'Isle of Man',
1035
+ isoCode: 'im',
1036
+ dialCode: '44',
1037
+ flagClass: 'im',
1038
+ priority: 0,
1039
+ areaCodes: [
1040
+ '1624'
1041
+ ],
1042
+ placeholder: ''
1043
+ },
1044
+ {
1045
+ name: 'Israel',
1046
+ isoCode: 'il',
1047
+ dialCode: '972',
1048
+ flagClass: 'il',
1049
+ priority: 0,
1050
+ placeholder: ''
1051
+ },
1052
+ {
1053
+ name: 'Italy',
1054
+ isoCode: 'it',
1055
+ dialCode: '39',
1056
+ flagClass: 'it',
1057
+ priority: 0,
1058
+ placeholder: ''
1059
+ },
1060
+ {
1061
+ name: 'Jamaica',
1062
+ isoCode: 'jm',
1063
+ dialCode: '1 876',
1064
+ flagClass: 'jm',
1065
+ priority: 0,
1066
+ areaCodes: [
1067
+ '876'
1068
+ ],
1069
+ placeholder: ''
1070
+ },
1071
+ {
1072
+ name: 'Japan',
1073
+ isoCode: 'jp',
1074
+ dialCode: '81',
1075
+ flagClass: 'jp',
1076
+ priority: 0,
1077
+ placeholder: ''
1078
+ },
1079
+ {
1080
+ name: 'Jersey',
1081
+ isoCode: 'je',
1082
+ dialCode: '44',
1083
+ flagClass: 'je',
1084
+ priority: 0,
1085
+ areaCodes: [
1086
+ '1534'
1087
+ ],
1088
+ placeholder: ''
1089
+ },
1090
+ {
1091
+ name: 'Jordan',
1092
+ isoCode: 'jo',
1093
+ dialCode: '962',
1094
+ flagClass: 'jo',
1095
+ priority: 0,
1096
+ placeholder: ''
1097
+ },
1098
+ {
1099
+ name: 'Kazakhstan',
1100
+ isoCode: 'kz',
1101
+ dialCode: '7 7',
1102
+ flagClass: 'kz',
1103
+ priority: 0,
1104
+ placeholder: ''
1105
+ },
1106
+ {
1107
+ name: 'Kenya',
1108
+ isoCode: 'ke',
1109
+ dialCode: '254',
1110
+ flagClass: 'ke',
1111
+ priority: 0,
1112
+ placeholder: ''
1113
+ },
1114
+ {
1115
+ name: 'Kiribati',
1116
+ isoCode: 'ki',
1117
+ dialCode: '686',
1118
+ flagClass: 'ki',
1119
+ priority: 0,
1120
+ placeholder: ''
1121
+ },
1122
+ {
1123
+ name: 'Kuwait',
1124
+ isoCode: 'kw',
1125
+ dialCode: '965',
1126
+ flagClass: 'kw',
1127
+ priority: 0,
1128
+ placeholder: ''
1129
+ },
1130
+ {
1131
+ name: 'Kyrgyzstan',
1132
+ isoCode: 'kg',
1133
+ dialCode: '996',
1134
+ flagClass: 'kg',
1135
+ priority: 0,
1136
+ placeholder: ''
1137
+ },
1138
+ {
1139
+ name: 'Laos',
1140
+ isoCode: 'la',
1141
+ dialCode: '856',
1142
+ flagClass: 'la',
1143
+ priority: 0,
1144
+ placeholder: ''
1145
+ },
1146
+ {
1147
+ name: 'Latvia',
1148
+ isoCode: 'lv',
1149
+ dialCode: '371',
1150
+ flagClass: 'lv',
1151
+ priority: 0,
1152
+ placeholder: ''
1153
+ },
1154
+ {
1155
+ name: 'Lebanon',
1156
+ isoCode: 'lb',
1157
+ dialCode: '961',
1158
+ flagClass: 'lb',
1159
+ priority: 0,
1160
+ placeholder: ''
1161
+ },
1162
+ {
1163
+ name: 'Lesotho',
1164
+ isoCode: 'ls',
1165
+ dialCode: '266',
1166
+ flagClass: 'ls',
1167
+ priority: 0,
1168
+ placeholder: ''
1169
+ },
1170
+ {
1171
+ name: 'Liberia',
1172
+ isoCode: 'lr',
1173
+ dialCode: '231',
1174
+ flagClass: 'lr',
1175
+ priority: 0,
1176
+ placeholder: ''
1177
+ },
1178
+ {
1179
+ name: 'Libyan Arab Jamahiriya',
1180
+ isoCode: 'ly',
1181
+ dialCode: '218',
1182
+ flagClass: 'ly',
1183
+ priority: 0,
1184
+ placeholder: ''
1185
+ },
1186
+ {
1187
+ name: 'Liechtenstein',
1188
+ isoCode: 'li',
1189
+ dialCode: '423',
1190
+ flagClass: 'li',
1191
+ priority: 0,
1192
+ placeholder: ''
1193
+ },
1194
+ {
1195
+ name: 'Lithuania',
1196
+ isoCode: 'lt',
1197
+ dialCode: '370',
1198
+ flagClass: 'lt',
1199
+ priority: 0,
1200
+ placeholder: ''
1201
+ },
1202
+ {
1203
+ name: 'Luxembourg',
1204
+ isoCode: 'lu',
1205
+ dialCode: '352',
1206
+ flagClass: 'lu',
1207
+ priority: 0,
1208
+ placeholder: ''
1209
+ },
1210
+ {
1211
+ name: 'Macao',
1212
+ isoCode: 'mo',
1213
+ dialCode: '853',
1214
+ flagClass: 'mo',
1215
+ priority: 0,
1216
+ placeholder: ''
1217
+ },
1218
+ {
1219
+ name: 'Macedonia',
1220
+ isoCode: 'mk',
1221
+ dialCode: '389',
1222
+ flagClass: 'mk',
1223
+ priority: 0,
1224
+ placeholder: ''
1225
+ },
1226
+ {
1227
+ name: 'Madagascar',
1228
+ isoCode: 'mg',
1229
+ dialCode: '261',
1230
+ flagClass: 'mg',
1231
+ priority: 0,
1232
+ placeholder: ''
1233
+ },
1234
+ {
1235
+ name: 'Malawi',
1236
+ isoCode: 'mw',
1237
+ dialCode: '265',
1238
+ flagClass: 'mw',
1239
+ priority: 0,
1240
+ placeholder: ''
1241
+ },
1242
+ {
1243
+ name: 'Malaysia',
1244
+ isoCode: 'my',
1245
+ dialCode: '60',
1246
+ flagClass: 'my',
1247
+ priority: 0,
1248
+ placeholder: ''
1249
+ },
1250
+ {
1251
+ name: 'Maldives',
1252
+ isoCode: 'mv',
1253
+ dialCode: '960',
1254
+ flagClass: 'mv',
1255
+ priority: 0,
1256
+ placeholder: ''
1257
+ },
1258
+ {
1259
+ name: 'Mali',
1260
+ isoCode: 'ml',
1261
+ dialCode: '223',
1262
+ flagClass: 'ml',
1263
+ priority: 0,
1264
+ placeholder: ''
1265
+ },
1266
+ {
1267
+ name: 'Malta',
1268
+ isoCode: 'mt',
1269
+ dialCode: '356',
1270
+ flagClass: 'mt',
1271
+ priority: 0,
1272
+ placeholder: ''
1273
+ },
1274
+ {
1275
+ name: 'Marshall Islands',
1276
+ isoCode: 'mh',
1277
+ dialCode: '692',
1278
+ flagClass: 'mh',
1279
+ priority: 0,
1280
+ placeholder: ''
1281
+ },
1282
+ {
1283
+ name: 'Martinique',
1284
+ isoCode: 'mq',
1285
+ dialCode: '596',
1286
+ flagClass: 'mq',
1287
+ priority: 0,
1288
+ placeholder: ''
1289
+ },
1290
+ {
1291
+ name: 'Mauritania',
1292
+ isoCode: 'mr',
1293
+ dialCode: '222',
1294
+ flagClass: 'mr',
1295
+ priority: 0,
1296
+ placeholder: ''
1297
+ },
1298
+ {
1299
+ name: 'Mauritius',
1300
+ isoCode: 'mu',
1301
+ dialCode: '230',
1302
+ flagClass: 'mu',
1303
+ priority: 0,
1304
+ placeholder: ''
1305
+ },
1306
+ {
1307
+ name: 'Mayotte',
1308
+ isoCode: 'yt',
1309
+ dialCode: '262',
1310
+ flagClass: 'yt',
1311
+ priority: 0,
1312
+ placeholder: ''
1313
+ },
1314
+ {
1315
+ name: 'Mexico',
1316
+ isoCode: 'mx',
1317
+ dialCode: '52',
1318
+ flagClass: 'mx',
1319
+ priority: 0,
1320
+ placeholder: ''
1321
+ },
1322
+ {
1323
+ name: 'Micronesia, Federated States of Micronesia',
1324
+ isoCode: 'fm',
1325
+ dialCode: '691',
1326
+ flagClass: 'fm',
1327
+ priority: 0,
1328
+ placeholder: ''
1329
+ },
1330
+ {
1331
+ name: 'Moldova',
1332
+ isoCode: 'md',
1333
+ dialCode: '373',
1334
+ flagClass: 'md',
1335
+ priority: 0,
1336
+ placeholder: ''
1337
+ },
1338
+ {
1339
+ name: 'Monaco',
1340
+ isoCode: 'mc',
1341
+ dialCode: '377',
1342
+ flagClass: 'mc',
1343
+ priority: 0,
1344
+ placeholder: ''
1345
+ },
1346
+ {
1347
+ name: 'Mongolia',
1348
+ isoCode: 'mn',
1349
+ dialCode: '976',
1350
+ flagClass: 'mn',
1351
+ priority: 0,
1352
+ placeholder: ''
1353
+ },
1354
+ {
1355
+ name: 'Montenegro',
1356
+ isoCode: 'me',
1357
+ dialCode: '382',
1358
+ flagClass: 'me',
1359
+ priority: 0,
1360
+ placeholder: ''
1361
+ },
1362
+ {
1363
+ name: 'Montserrat',
1364
+ isoCode: 'ms',
1365
+ dialCode: '1664',
1366
+ flagClass: 'ms',
1367
+ priority: 0,
1368
+ areaCodes: [
1369
+ '664'
1370
+ ],
1371
+ placeholder: ''
1372
+ },
1373
+ {
1374
+ name: 'Morocco',
1375
+ isoCode: 'ma',
1376
+ dialCode: '212',
1377
+ flagClass: 'ma',
1378
+ priority: 0,
1379
+ placeholder: ''
1380
+ },
1381
+ {
1382
+ name: 'Mozambique',
1383
+ isoCode: 'mz',
1384
+ dialCode: '258',
1385
+ flagClass: 'mz',
1386
+ priority: 0,
1387
+ placeholder: ''
1388
+ },
1389
+ {
1390
+ name: 'Myanmar',
1391
+ isoCode: 'mm',
1392
+ dialCode: '95',
1393
+ flagClass: 'mm',
1394
+ priority: 0,
1395
+ placeholder: ''
1396
+ },
1397
+ {
1398
+ name: 'Namibia',
1399
+ isoCode: 'na',
1400
+ dialCode: '264',
1401
+ flagClass: 'na',
1402
+ priority: 0,
1403
+ placeholder: ''
1404
+ },
1405
+ {
1406
+ name: 'Nauru',
1407
+ isoCode: 'nr',
1408
+ dialCode: '674',
1409
+ flagClass: 'nr',
1410
+ priority: 0,
1411
+ placeholder: ''
1412
+ },
1413
+ {
1414
+ name: 'Nepal',
1415
+ isoCode: 'np',
1416
+ dialCode: '977',
1417
+ flagClass: 'np',
1418
+ priority: 0,
1419
+ placeholder: ''
1420
+ },
1421
+ {
1422
+ name: 'Netherlands',
1423
+ isoCode: 'nl',
1424
+ dialCode: '31',
1425
+ flagClass: 'nl',
1426
+ priority: 0,
1427
+ placeholder: ''
1428
+ },
1429
+ {
1430
+ name: 'New Caledonia',
1431
+ isoCode: 'nc',
1432
+ dialCode: '687',
1433
+ flagClass: 'nc',
1434
+ priority: 0,
1435
+ placeholder: ''
1436
+ },
1437
+ {
1438
+ name: 'New Zealand',
1439
+ isoCode: 'nz',
1440
+ dialCode: '64',
1441
+ flagClass: 'nz',
1442
+ priority: 0,
1443
+ placeholder: ''
1444
+ },
1445
+ {
1446
+ name: 'Nicaragua',
1447
+ isoCode: 'ni',
1448
+ dialCode: '505',
1449
+ flagClass: 'ni',
1450
+ priority: 0,
1451
+ placeholder: ''
1452
+ },
1453
+ {
1454
+ name: 'Niger',
1455
+ isoCode: 'ne',
1456
+ dialCode: '227',
1457
+ flagClass: 'ne',
1458
+ priority: 0,
1459
+ placeholder: ''
1460
+ },
1461
+ {
1462
+ name: 'Nigeria',
1463
+ isoCode: 'ng',
1464
+ dialCode: '234',
1465
+ flagClass: 'ng',
1466
+ priority: 0,
1467
+ placeholder: ''
1468
+ },
1469
+ {
1470
+ name: 'Niue',
1471
+ isoCode: 'nu',
1472
+ dialCode: '683',
1473
+ flagClass: 'nu',
1474
+ priority: 0,
1475
+ placeholder: ''
1476
+ },
1477
+ {
1478
+ name: 'Norfolk Island',
1479
+ isoCode: 'nf',
1480
+ dialCode: '672',
1481
+ flagClass: 'nf',
1482
+ priority: 0,
1483
+ placeholder: ''
1484
+ },
1485
+ {
1486
+ name: 'Korea, Democratic People\'s Republic of Korea',
1487
+ isoCode: 'kp',
1488
+ dialCode: '850',
1489
+ flagClass: 'kp',
1490
+ priority: 0,
1491
+ placeholder: ''
1492
+ },
1493
+ {
1494
+ name: 'Northern Mariana Islands',
1495
+ isoCode: 'mp',
1496
+ dialCode: '1 670',
1497
+ flagClass: 'mp',
1498
+ priority: 0,
1499
+ placeholder: ''
1500
+ },
1501
+ {
1502
+ name: 'Norway',
1503
+ isoCode: 'no',
1504
+ dialCode: '47',
1505
+ flagClass: 'no',
1506
+ priority: 0,
1507
+ placeholder: ''
1508
+ },
1509
+ {
1510
+ name: 'Oman',
1511
+ isoCode: 'om',
1512
+ dialCode: '968',
1513
+ flagClass: 'om',
1514
+ priority: 0,
1515
+ placeholder: ''
1516
+ },
1517
+ {
1518
+ name: 'Pakistan',
1519
+ isoCode: 'pk',
1520
+ dialCode: '92',
1521
+ flagClass: 'pk',
1522
+ priority: 0,
1523
+ placeholder: ''
1524
+ },
1525
+ {
1526
+ name: 'Palau',
1527
+ isoCode: 'pw',
1528
+ dialCode: '680',
1529
+ flagClass: 'pw',
1530
+ priority: 0,
1531
+ placeholder: ''
1532
+ },
1533
+ {
1534
+ name: 'Palestinian Territory, Occupied',
1535
+ isoCode: 'ps',
1536
+ dialCode: '970',
1537
+ flagClass: 'ps',
1538
+ priority: 0,
1539
+ placeholder: ''
1540
+ },
1541
+ {
1542
+ name: 'Panama',
1543
+ isoCode: 'pa',
1544
+ dialCode: '507',
1545
+ flagClass: 'pa',
1546
+ priority: 0,
1547
+ placeholder: ''
1548
+ },
1549
+ {
1550
+ name: 'Papua New Guinea',
1551
+ isoCode: 'pg',
1552
+ dialCode: '675',
1553
+ flagClass: 'pg',
1554
+ priority: 0,
1555
+ placeholder: ''
1556
+ },
1557
+ {
1558
+ name: 'Paraguay',
1559
+ isoCode: 'py',
1560
+ dialCode: '595',
1561
+ flagClass: 'py',
1562
+ priority: 0,
1563
+ placeholder: ''
1564
+ },
1565
+ {
1566
+ name: 'Peru',
1567
+ isoCode: 'pe',
1568
+ dialCode: '51',
1569
+ flagClass: 'pe',
1570
+ priority: 0,
1571
+ placeholder: ''
1572
+ },
1573
+ {
1574
+ name: 'Philippines',
1575
+ isoCode: 'ph',
1576
+ dialCode: '63',
1577
+ flagClass: 'ph',
1578
+ priority: 0,
1579
+ placeholder: ''
1580
+ },
1581
+ {
1582
+ name: 'Poland',
1583
+ isoCode: 'pl',
1584
+ dialCode: '48',
1585
+ flagClass: 'pl',
1586
+ priority: 0,
1587
+ placeholder: ''
1588
+ },
1589
+ {
1590
+ name: 'Portugal',
1591
+ isoCode: 'pt',
1592
+ dialCode: '351',
1593
+ flagClass: 'pt',
1594
+ priority: 0,
1595
+ placeholder: ''
1596
+ },
1597
+ {
1598
+ name: 'Puerto Rico',
1599
+ isoCode: 'pr',
1600
+ dialCode: '1 939',
1601
+ flagClass: 'pr',
1602
+ priority: 0,
1603
+ areaCodes: [
1604
+ '787',
1605
+ '939'
1606
+ ],
1607
+ placeholder: ''
1608
+ },
1609
+ {
1610
+ name: 'Qatar',
1611
+ isoCode: 'qa',
1612
+ dialCode: '974',
1613
+ flagClass: 'qa',
1614
+ priority: 0,
1615
+ placeholder: ''
1616
+ },
1617
+ {
1618
+ name: 'Reunion',
1619
+ isoCode: 're',
1620
+ dialCode: '262',
1621
+ flagClass: 're',
1622
+ priority: 0,
1623
+ placeholder: ''
1624
+ },
1625
+ {
1626
+ name: 'Romania',
1627
+ isoCode: 'ro',
1628
+ dialCode: '40',
1629
+ flagClass: 'ro',
1630
+ priority: 0,
1631
+ placeholder: ''
1632
+ },
1633
+ {
1634
+ name: 'Russia',
1635
+ isoCode: 'ru',
1636
+ dialCode: '7',
1637
+ flagClass: 'ru',
1638
+ priority: 0,
1639
+ placeholder: ''
1640
+ },
1641
+ {
1642
+ name: 'Rwanda',
1643
+ isoCode: 'rw',
1644
+ dialCode: '250',
1645
+ flagClass: 'rw',
1646
+ priority: 0,
1647
+ placeholder: ''
1648
+ },
1649
+ {
1650
+ name: 'Saint Barthelemy',
1651
+ isoCode: 'bl',
1652
+ dialCode: '590',
1653
+ flagClass: 'bl',
1654
+ priority: 0,
1655
+ placeholder: ''
1656
+ },
1657
+ {
1658
+ name: 'Saint Helena, Ascension and Tristan Da Cunha',
1659
+ isoCode: 'sh',
1660
+ dialCode: '290',
1661
+ flagClass: 'sh',
1662
+ priority: 0,
1663
+ placeholder: ''
1664
+ },
1665
+ {
1666
+ name: 'Saint Kitts and Nevis',
1667
+ isoCode: 'kn',
1668
+ dialCode: '1 869',
1669
+ flagClass: 'kn',
1670
+ priority: 0,
1671
+ placeholder: ''
1672
+ },
1673
+ {
1674
+ name: 'Saint Lucia',
1675
+ isoCode: 'lc',
1676
+ dialCode: '1 758',
1677
+ flagClass: 'lc',
1678
+ priority: 0,
1679
+ areaCodes: [
1680
+ '758'
1681
+ ],
1682
+ placeholder: ''
1683
+ },
1684
+ {
1685
+ name: 'Saint Martin',
1686
+ isoCode: 'mf',
1687
+ dialCode: '590',
1688
+ flagClass: 'mf',
1689
+ priority: 0,
1690
+ placeholder: ''
1691
+ },
1692
+ {
1693
+ name: 'Saint Pierre and Miquelon',
1694
+ isoCode: 'pm',
1695
+ dialCode: '508',
1696
+ flagClass: 'pm',
1697
+ priority: 0,
1698
+ placeholder: ''
1699
+ },
1700
+ {
1701
+ name: 'Saint Vincent and the Grenadines',
1702
+ isoCode: 'vc',
1703
+ dialCode: '1 784',
1704
+ flagClass: 'vc',
1705
+ priority: 0,
1706
+ areaCodes: [
1707
+ '784'
1708
+ ],
1709
+ placeholder: ''
1710
+ },
1711
+ {
1712
+ name: 'Samoa',
1713
+ isoCode: 'ws',
1714
+ dialCode: '685',
1715
+ flagClass: 'ws',
1716
+ priority: 0,
1717
+ placeholder: ''
1718
+ },
1719
+ {
1720
+ name: 'San Marino',
1721
+ isoCode: 'sm',
1722
+ dialCode: '378',
1723
+ flagClass: 'sm',
1724
+ priority: 0,
1725
+ placeholder: ''
1726
+ },
1727
+ {
1728
+ name: 'Sao Tome and Principe',
1729
+ isoCode: 'st',
1730
+ dialCode: '239',
1731
+ flagClass: 'st',
1732
+ priority: 0,
1733
+ placeholder: ''
1734
+ },
1735
+ {
1736
+ name: 'Saudi Arabia',
1737
+ isoCode: 'sa',
1738
+ dialCode: '966',
1739
+ flagClass: 'sa',
1740
+ priority: 0,
1741
+ placeholder: ''
1742
+ },
1743
+ {
1744
+ name: 'Senegal',
1745
+ isoCode: 'sn',
1746
+ dialCode: '221',
1747
+ flagClass: 'sn',
1748
+ priority: 0,
1749
+ placeholder: ''
1750
+ },
1751
+ {
1752
+ name: 'Serbia',
1753
+ isoCode: 'rs',
1754
+ dialCode: '381',
1755
+ flagClass: 'rs',
1756
+ priority: 0,
1757
+ placeholder: ''
1758
+ },
1759
+ {
1760
+ name: 'Seychelles',
1761
+ isoCode: 'sc',
1762
+ dialCode: '248',
1763
+ flagClass: 'sc',
1764
+ priority: 0,
1765
+ placeholder: ''
1766
+ },
1767
+ {
1768
+ name: 'Sierra Leone',
1769
+ isoCode: 'sl',
1770
+ dialCode: '232',
1771
+ flagClass: 'sl',
1772
+ priority: 0,
1773
+ placeholder: ''
1774
+ },
1775
+ {
1776
+ name: 'Singapore',
1777
+ isoCode: 'sg',
1778
+ dialCode: '65',
1779
+ flagClass: 'sg',
1780
+ priority: 0,
1781
+ placeholder: ''
1782
+ },
1783
+ {
1784
+ name: 'Slovakia',
1785
+ isoCode: 'sk',
1786
+ dialCode: '421',
1787
+ flagClass: 'sk',
1788
+ priority: 0,
1789
+ placeholder: ''
1790
+ },
1791
+ {
1792
+ name: 'Slovenia',
1793
+ isoCode: 'si',
1794
+ dialCode: '386',
1795
+ flagClass: 'si',
1796
+ priority: 0,
1797
+ placeholder: ''
1798
+ },
1799
+ {
1800
+ name: 'Solomon Islands',
1801
+ isoCode: 'sb',
1802
+ dialCode: '677',
1803
+ flagClass: 'sb',
1804
+ priority: 0,
1805
+ placeholder: ''
1806
+ },
1807
+ {
1808
+ name: 'Somalia',
1809
+ isoCode: 'so',
1810
+ dialCode: '252',
1811
+ flagClass: 'so',
1812
+ priority: 0,
1813
+ placeholder: ''
1814
+ },
1815
+ {
1816
+ name: 'South Africa',
1817
+ isoCode: 'za',
1818
+ dialCode: '27',
1819
+ flagClass: 'za',
1820
+ priority: 0,
1821
+ placeholder: ''
1822
+ },
1823
+ {
1824
+ name: 'Korea, Republic of South Korea',
1825
+ isoCode: 'kr',
1826
+ dialCode: '82',
1827
+ flagClass: 'kr',
1828
+ priority: 0,
1829
+ placeholder: ''
1830
+ },
1831
+ {
1832
+ name: 'Spain',
1833
+ isoCode: 'es',
1834
+ dialCode: '34',
1835
+ flagClass: 'es',
1836
+ priority: 0,
1837
+ placeholder: ''
1838
+ },
1839
+ {
1840
+ name: 'Sri Lanka',
1841
+ isoCode: 'lk',
1842
+ dialCode: '94',
1843
+ flagClass: 'lk',
1844
+ priority: 0,
1845
+ placeholder: ''
1846
+ },
1847
+ {
1848
+ name: 'Sudan',
1849
+ isoCode: 'sd',
1850
+ dialCode: '249',
1851
+ flagClass: 'sd',
1852
+ priority: 0,
1853
+ placeholder: ''
1854
+ },
1855
+ {
1856
+ name: 'Suriname',
1857
+ isoCode: 'sr',
1858
+ dialCode: '597',
1859
+ flagClass: 'sr',
1860
+ priority: 0,
1861
+ placeholder: ''
1862
+ },
1863
+ {
1864
+ name: 'Svalbard and Jan Mayen',
1865
+ isoCode: 'sj',
1866
+ dialCode: '47',
1867
+ flagClass: 'sj',
1868
+ priority: 0,
1869
+ placeholder: ''
1870
+ },
1871
+ {
1872
+ name: 'Swaziland',
1873
+ isoCode: 'sz',
1874
+ dialCode: '268',
1875
+ flagClass: 'sz',
1876
+ priority: 0,
1877
+ placeholder: ''
1878
+ },
1879
+ {
1880
+ name: 'Sweden',
1881
+ isoCode: 'se',
1882
+ dialCode: '46',
1883
+ flagClass: 'se',
1884
+ priority: 0,
1885
+ placeholder: ''
1886
+ },
1887
+ {
1888
+ name: 'Switzerland',
1889
+ isoCode: 'ch',
1890
+ dialCode: '41',
1891
+ flagClass: 'ch',
1892
+ priority: 0,
1893
+ placeholder: ''
1894
+ },
1895
+ {
1896
+ name: 'Syrian Arab Republic',
1897
+ isoCode: 'sy',
1898
+ dialCode: '963',
1899
+ flagClass: 'sy',
1900
+ priority: 0,
1901
+ placeholder: ''
1902
+ },
1903
+ {
1904
+ name: 'Taiwan',
1905
+ isoCode: 'tw',
1906
+ dialCode: '886',
1907
+ flagClass: 'tw',
1908
+ priority: 0,
1909
+ placeholder: ''
1910
+ },
1911
+ {
1912
+ name: 'Tajikistan',
1913
+ isoCode: 'tj',
1914
+ dialCode: '992',
1915
+ flagClass: 'tj',
1916
+ priority: 0,
1917
+ placeholder: ''
1918
+ },
1919
+ {
1920
+ name: 'Tanzania, United Republic of Tanzania',
1921
+ isoCode: 'tz',
1922
+ dialCode: '255',
1923
+ flagClass: 'tz',
1924
+ priority: 0,
1925
+ placeholder: ''
1926
+ },
1927
+ {
1928
+ name: 'Thailand',
1929
+ isoCode: 'th',
1930
+ dialCode: '66',
1931
+ flagClass: 'th',
1932
+ priority: 0,
1933
+ placeholder: ''
1934
+ },
1935
+ {
1936
+ name: 'Timor-Leste',
1937
+ isoCode: 'tl',
1938
+ dialCode: '670',
1939
+ flagClass: 'tl',
1940
+ priority: 0,
1941
+ placeholder: ''
1942
+ },
1943
+ {
1944
+ name: 'Togo',
1945
+ isoCode: 'tg',
1946
+ dialCode: '228',
1947
+ flagClass: 'tg',
1948
+ priority: 0,
1949
+ placeholder: ''
1950
+ },
1951
+ {
1952
+ name: 'Tokelau',
1953
+ isoCode: 'tk',
1954
+ dialCode: '690',
1955
+ flagClass: 'tk',
1956
+ priority: 0,
1957
+ placeholder: ''
1958
+ },
1959
+ {
1960
+ name: 'Tonga',
1961
+ isoCode: 'to',
1962
+ dialCode: '676',
1963
+ flagClass: 'to',
1964
+ priority: 0,
1965
+ placeholder: ''
1966
+ },
1967
+ {
1968
+ name: 'Trinidad and Tobago',
1969
+ isoCode: 'tt',
1970
+ dialCode: '1 868',
1971
+ flagClass: 'tt',
1972
+ priority: 0,
1973
+ areaCodes: [
1974
+ '868'
1975
+ ],
1976
+ placeholder: ''
1977
+ },
1978
+ {
1979
+ name: 'Tunisia',
1980
+ isoCode: 'tn',
1981
+ dialCode: '216',
1982
+ flagClass: 'tn',
1983
+ priority: 0,
1984
+ placeholder: ''
1985
+ },
1986
+ {
1987
+ name: 'Turkey',
1988
+ isoCode: 'tr',
1989
+ dialCode: '90',
1990
+ flagClass: 'tr',
1991
+ priority: 0,
1992
+ placeholder: ''
1993
+ },
1994
+ {
1995
+ name: 'Turkmenistan',
1996
+ isoCode: 'tm',
1997
+ dialCode: '993',
1998
+ flagClass: 'tm',
1999
+ priority: 0,
2000
+ placeholder: ''
2001
+ },
2002
+ {
2003
+ name: 'Turks and Caicos Islands',
2004
+ isoCode: 'tc',
2005
+ dialCode: '1 649',
2006
+ flagClass: 'tc',
2007
+ priority: 0,
2008
+ placeholder: ''
2009
+ },
2010
+ {
2011
+ name: 'Tuvalu',
2012
+ isoCode: 'tv',
2013
+ dialCode: '688',
2014
+ flagClass: 'tv',
2015
+ priority: 0,
2016
+ placeholder: ''
2017
+ },
2018
+ {
2019
+ name: 'Virgin Islands, U.S.',
2020
+ isoCode: 'vi',
2021
+ dialCode: '1 340',
2022
+ flagClass: 'vi',
2023
+ priority: 0,
2024
+ areaCodes: [
2025
+ '340'
2026
+ ],
2027
+ placeholder: ''
2028
+ },
2029
+ {
2030
+ name: 'Uganda',
2031
+ isoCode: 'ug',
2032
+ dialCode: '256',
2033
+ flagClass: 'ug',
2034
+ priority: 0,
2035
+ placeholder: ''
2036
+ },
2037
+ {
2038
+ name: 'Ukraine',
2039
+ isoCode: 'ua',
2040
+ dialCode: '380',
2041
+ flagClass: 'ua',
2042
+ priority: 0,
2043
+ placeholder: ''
2044
+ },
2045
+ {
2046
+ name: 'United Arab Emirates',
2047
+ isoCode: 'ae',
2048
+ dialCode: '971',
2049
+ flagClass: 'ae',
2050
+ priority: 0,
2051
+ placeholder: ''
2052
+ },
2053
+ {
2054
+ name: 'United Kingdom',
2055
+ isoCode: 'gb',
2056
+ dialCode: '44',
2057
+ flagClass: 'gb',
2058
+ priority: 0,
2059
+ placeholder: ''
2060
+ },
2061
+ {
2062
+ name: 'United States',
2063
+ isoCode: 'us',
2064
+ dialCode: '1',
2065
+ flagClass: 'us',
2066
+ priority: 0,
2067
+ placeholder: ''
2068
+ },
2069
+ {
2070
+ name: 'Uruguay',
2071
+ isoCode: 'uy',
2072
+ dialCode: '598',
2073
+ flagClass: 'uy',
2074
+ priority: 0,
2075
+ placeholder: ''
2076
+ },
2077
+ {
2078
+ name: 'Uzbekistan',
2079
+ isoCode: 'uz',
2080
+ dialCode: '998',
2081
+ flagClass: 'uz',
2082
+ priority: 0,
2083
+ placeholder: ''
2084
+ },
2085
+ {
2086
+ name: 'Vanuatu',
2087
+ isoCode: 'vu',
2088
+ dialCode: '678',
2089
+ flagClass: 'vu',
2090
+ priority: 0,
2091
+ placeholder: ''
2092
+ },
2093
+ {
2094
+ name: 'Holy See (Vatican City State)',
2095
+ isoCode: 'va',
2096
+ dialCode: '379',
2097
+ flagClass: 'va',
2098
+ priority: 0,
2099
+ placeholder: ''
2100
+ },
2101
+ {
2102
+ name: 'Venezuela, Bolivarian Republic of Venezuela',
2103
+ isoCode: 've',
2104
+ dialCode: '58',
2105
+ flagClass: 've',
2106
+ priority: 0,
2107
+ placeholder: ''
2108
+ },
2109
+ {
2110
+ name: 'Vietnam',
2111
+ isoCode: 'vn',
2112
+ dialCode: '84',
2113
+ flagClass: 'vn',
2114
+ priority: 0,
2115
+ placeholder: ''
2116
+ },
2117
+ {
2118
+ name: 'Wallis and Futuna',
2119
+ isoCode: 'wf',
2120
+ dialCode: '681',
2121
+ flagClass: 'wf',
2122
+ priority: 0,
2123
+ placeholder: ''
2124
+ },
2125
+ {
2126
+ name: 'Yemen',
2127
+ isoCode: 'ye',
2128
+ dialCode: '967',
2129
+ flagClass: 'ye',
2130
+ priority: 0,
2131
+ placeholder: ''
2132
+ },
2133
+ {
2134
+ name: 'Zambia',
2135
+ isoCode: 'zm',
2136
+ dialCode: '260',
2137
+ flagClass: 'zm',
2138
+ priority: 0,
2139
+ placeholder: ''
2140
+ },
2141
+ {
2142
+ name: 'Zimbabwe',
2143
+ isoCode: 'zw',
2144
+ dialCode: '263',
2145
+ flagClass: 'zw',
2146
+ priority: 0,
2147
+ placeholder: ''
2148
+ },
2149
+ {
2150
+ name: 'Aland Islands',
2151
+ isoCode: 'ax',
2152
+ dialCode: '358',
2153
+ flagClass: 'ax',
2154
+ priority: 0,
2155
+ placeholder: ''
2156
+ }
2157
+ ];
2158
+
2159
+ class IonIntlTelInputService {
2160
+ constructor() {
2161
+ this.countryList = countries;
2162
+ }
2163
+ getListOfCountries() {
2164
+ return this.countryList;
2165
+ }
2166
+ }
2167
+ /** @nocollapse */ IonIntlTelInputService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2168
+ /** @nocollapse */ IonIntlTelInputService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputService, providedIn: 'root' });
2169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputService, decorators: [{
2170
+ type: Injectable,
2171
+ args: [{
2172
+ providedIn: 'root'
2173
+ }]
2174
+ }], ctorParameters: function () { return []; } });
2175
+
2176
+ class CountryPlaceholder {
2177
+ transform(country, inputPlaceholder, separateDialCode, fallbackPlaceholder, usePatternPlaceholder) {
2178
+ if (inputPlaceholder && inputPlaceholder.length > 0) {
2179
+ return inputPlaceholder;
2180
+ }
2181
+ const phoneUtil = PhoneNumberUtil.getInstance();
2182
+ try {
2183
+ const example = phoneUtil.getExampleNumber(country.isoCode);
2184
+ let placeholder = phoneUtil.format(example, PhoneNumberFormat.INTERNATIONAL);
2185
+ if (usePatternPlaceholder) {
2186
+ const dc = placeholder.substring(0, placeholder.indexOf(' '));
2187
+ placeholder = placeholder.substring(placeholder.indexOf(' ') + 1);
2188
+ placeholder = dc + ' ' + placeholder.replace(/\d/g, 'x');
2189
+ }
2190
+ if (placeholder) {
2191
+ if (separateDialCode) {
2192
+ return placeholder.substr(placeholder.indexOf(' ') + 1);
2193
+ }
2194
+ else {
2195
+ return placeholder;
2196
+ }
2197
+ }
2198
+ }
2199
+ catch (e) {
2200
+ return fallbackPlaceholder;
2201
+ }
2202
+ }
2203
+ }
2204
+ /** @nocollapse */ CountryPlaceholder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CountryPlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2205
+ /** @nocollapse */ CountryPlaceholder.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: CountryPlaceholder, name: "countryPlaceholder" });
2206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CountryPlaceholder, decorators: [{
2207
+ type: Pipe,
2208
+ args: [{ name: 'countryPlaceholder' }]
2209
+ }] });
2210
+
2211
+ /**
2212
+ * @ignore
2213
+ */
2214
+ /**
2215
+ * @author Azzam Asghar <azzam.asghar@interstellus.com>
2216
+ * @author Steve Drew <sdrew@waitwell.ca>
2217
+ */
2218
+ class IonIntlTelInputComponent {
2219
+ get hasValueCssClass() {
2220
+ return this.hasValue();
2221
+ }
2222
+ get isEnabled() {
2223
+ return !this.disabled;
2224
+ }
2225
+ constructor(el, platform, ionIntlTelInputService, modalCtrl) {
2226
+ this.el = el;
2227
+ this.platform = platform;
2228
+ this.ionIntlTelInputService = ionIntlTelInputService;
2229
+ this.modalCtrl = modalCtrl;
2230
+ this.cssClass = true;
2231
+ /**
2232
+ * autocomplete, set to 'tel' if needed
2233
+ *
2234
+ * @default 'off'
2235
+ * @memberof IonIntlTelInputComponent
2236
+ */
2237
+ this.autocomplete = 'off';
2238
+ /**
2239
+ * required, passed onto ion-input so we can be accessiblity compliant
2240
+ *
2241
+ * @default false
2242
+ * @memberof IonIntlTelInputComponent
2243
+ */
2244
+ this.required = false;
2245
+ /**
2246
+ * Iso Code of default selected Country.
2247
+ * See more on.
2248
+ *
2249
+ * @default ''
2250
+ * @memberof IonIntlTelInputComponent
2251
+ */
2252
+ this.defaultCountryiso = '';
2253
+ /**
2254
+ * Determines whether to use `00` or `+` as dial code prefix.
2255
+ * Available attributes are '+' | '00'.
2256
+ * See more on.
2257
+ *
2258
+ * @default +
2259
+ * @memberof IonIntlTelInputComponent
2260
+ */
2261
+ this.dialCodePrefix = '+';
2262
+ /**
2263
+ * Determines whether to select automatic country based on user input.
2264
+ * See more on.
2265
+ *
2266
+ * @default true
2267
+ * @memberof IonIntlTelInputComponent
2268
+ */
2269
+ this.enableAutoCountrySelect = true;
2270
+ /**
2271
+ * Determines whether an example number will be shown as a placeholder in input.
2272
+ * See more on.
2273
+ *
2274
+ * @default true
2275
+ * @memberof IonIntlTelInputComponent
2276
+ */
2277
+ this.enablePlaceholder = true;
2278
+ /**
2279
+ * A fallaback placeholder to be used if no example number is found for a country.
2280
+ * See more on.
2281
+ *
2282
+ * @default ''
2283
+ * @memberof IonIntlTelInputComponent
2284
+ */
2285
+ this.fallbackPlaceholder = '';
2286
+ /**
2287
+ * If a custom placeholder is needed for input.
2288
+ * If this property is set it will override `enablePlaceholder` and only this placeholder will be shown.
2289
+ * See more on.
2290
+ *
2291
+ * @default ''
2292
+ * @memberof IonIntlTelInputComponent
2293
+ */
2294
+ this.inputPlaceholder = '';
2295
+ /**
2296
+ * Instead of an example phone number, use a x pattern. Such as xxx-xxx-xxxx, this will be obtained
2297
+ * based on the example number from the google phone lib.
2298
+ *
2299
+ * @default true
2300
+ * @memberof IonIntlTelInputComponent
2301
+ */
2302
+ this.usePatternPlaceholder = true;
2303
+ /**
2304
+ * Maximum Length for input.
2305
+ * See more on.
2306
+ *
2307
+ * @default '15'
2308
+ * @memberof IonIntlTelInputComponent
2309
+ */
2310
+ this.maxLength = '15';
2311
+ /**
2312
+ * Title of modal opened to select country dial code.
2313
+ * See more on.
2314
+ *
2315
+ * @default 'Select Country'
2316
+ * @memberof IonIntlTelInputComponent
2317
+ */
2318
+ this.modalTitle = 'Select Country';
2319
+ /**
2320
+ * CSS class to attach to dial code selectionmodal.
2321
+ * See more on.
2322
+ *
2323
+ * @default 'ion-intl-tel-modal'
2324
+ * @memberof IonIntlTelInputComponent
2325
+ */
2326
+ this.modalCssClass = 'ion-intl-tel-modal';
2327
+ /**
2328
+ * Placeholder for input in dial code selection modal.
2329
+ * See more on.
2330
+ *
2331
+ * @default 'Enter country name'
2332
+ * @memberof IonIntlTelInputComponent
2333
+ */
2334
+ this.modalSearchPlaceholder = 'Enter country name';
2335
+ /**
2336
+ * Text for close button in dial code selection modal.
2337
+ * See more on.
2338
+ *
2339
+ * @default 'Close'
2340
+ * @memberof IonIntlTelInputComponent
2341
+ */
2342
+ this.modalCloseText = 'Close';
2343
+ /**
2344
+ * Slot for close button in dial code selection modal. [Ionic slots](https://ionicframework.com/docs/api/item) are supported
2345
+ * See more on.
2346
+ *
2347
+ * @default 'end'
2348
+ * @memberof IonIntlTelInputComponent
2349
+ */
2350
+ this.modalCloseButtonSlot = 'end';
2351
+ /**
2352
+ * Determines whether dial code selection modal should be searchable or not.
2353
+ * See more on.
2354
+ *
2355
+ * @default 'true'
2356
+ * @memberof IonIntlTelInputComponent
2357
+ */
2358
+ this.modalCanSearch = true;
2359
+ /**
2360
+ * Determines whether dial code selection modal is closed on backdrop click.
2361
+ * See more on.
2362
+ *
2363
+ * @default 'true'
2364
+ * @memberof IonIntlTelInputComponent
2365
+ */
2366
+ this.modalShouldBackdropClose = true;
2367
+ /**
2368
+ * Determines whether input should be focused when dial code selection modal is opened.
2369
+ * See more on.
2370
+ *
2371
+ * @default 'true'
2372
+ * @memberof IonIntlTelInputComponent
2373
+ */
2374
+ this.modalShouldFocusSearchbar = true;
2375
+ /**
2376
+ * Message to show when no countries are found for search in dial code selection modal.
2377
+ * See more on.
2378
+ *
2379
+ * @default 'true'
2380
+ * @memberof IonIntlTelInputComponent
2381
+ */
2382
+ this.modalSearchFailText = 'No countries found';
2383
+ /**
2384
+ * List of iso codes of manually selected countries as string, which will appear in the dropdown.
2385
+ * **Note**: `onlyCountries` should be a string array of country iso codes.
2386
+ * See more on.
2387
+ *
2388
+ * @default null
2389
+ * @memberof IonIntlTelInputComponent
2390
+ */
2391
+ this.onlyCountries = [];
2392
+ /**
2393
+ * List of iso codesn as string of countries, which will appear at the top in dial code selection modal.
2394
+ * **Note**: `preferredCountries` should be a string array of country iso codes.
2395
+ * See more on.
2396
+ *
2397
+ * @default null
2398
+ * @memberof IonIntlTelInputComponent
2399
+ */
2400
+ this.preferredCountries = [];
2401
+ /**
2402
+ * Determines whether first country should be selected in dial code select or not.
2403
+ * See more on.
2404
+ *
2405
+ * @default true
2406
+ * @memberof IonIntlTelInputComponent
2407
+ */
2408
+ this.selectFirstCountry = true;
2409
+ /**
2410
+ * Determines whether to visually separate dialcode into the drop down element.
2411
+ * See more on.
2412
+ *
2413
+ * @default true
2414
+ * @memberof IonIntlTelInputComponent
2415
+ */
2416
+ this.separateDialCode = true;
2417
+ /**
2418
+ * Fires when the Phone number Input is changed.
2419
+ * See more on.
2420
+ *
2421
+ * @memberof IonIntlTelInputComponent
2422
+ */
2423
+ this.numberChange = new EventEmitter();
2424
+ /**
2425
+ * Fires when the Phone number Input is blurred.
2426
+ * See more on.
2427
+ *
2428
+ * @memberof IonIntlTelInputComponent
2429
+ */
2430
+ this.numberBlur = new EventEmitter();
2431
+ /**
2432
+ * Fires when the Phone number Input is focused.
2433
+ * See more on.
2434
+ *
2435
+ * @memberof IonIntlTelInputComponent
2436
+ */
2437
+ this.numberFocus = new EventEmitter();
2438
+ /**
2439
+ * Fires when the user is typing in Phone number Input.
2440
+ * See more on.
2441
+ *
2442
+ * @memberof IonIntlTelInputComponent
2443
+ */
2444
+ this.numberInput = new EventEmitter();
2445
+ /**
2446
+ * Fires when the dial code selection is changed.
2447
+ * See more on.
2448
+ *
2449
+ * @memberof IonIntlTelInputComponent
2450
+ */
2451
+ this.codeChange = new EventEmitter();
2452
+ /**
2453
+ * Fires when the dial code selection modal is opened.
2454
+ * See more on.
2455
+ *
2456
+ * @memberof IonIntlTelInputComponent
2457
+ */
2458
+ this.codeOpen = new EventEmitter();
2459
+ /**
2460
+ * Fires when the dial code selection modal is closed.
2461
+ * See more on.
2462
+ *
2463
+ * @memberof IonIntlTelInputComponent
2464
+ */
2465
+ this.codeClose = new EventEmitter();
2466
+ /**
2467
+ * Fires when a dial code is selected in dial code selection modal.
2468
+ * See more on.
2469
+ *
2470
+ * @memberof IonIntlTelInputComponent
2471
+ */
2472
+ this.codeSelect = new EventEmitter();
2473
+ // tslint:disable-next-line: variable-name
2474
+ this._value = null;
2475
+ this.phoneNumber = '';
2476
+ this.countries = [];
2477
+ this.disabled = false;
2478
+ this.phoneUtil = PhoneNumberUtil.getInstance();
2479
+ this.onTouched = () => { };
2480
+ this.propagateChange = (_) => { };
2481
+ this.startsWith = (input, search) => {
2482
+ return input.substr(0, search.length) === search;
2483
+ };
2484
+ this.getClasses = (element) => {
2485
+ const classList = element.classList;
2486
+ const classes = [];
2487
+ for (let i = 0; i < classList.length; i++) {
2488
+ const item = classList.item(i);
2489
+ if (item !== null && this.startsWith(item, 'ng-')) {
2490
+ classes.push(`ion-${item.substr(3)}`);
2491
+ }
2492
+ }
2493
+ return classes;
2494
+ };
2495
+ this.setClasses = (element, classes) => {
2496
+ const classList = element.classList;
2497
+ [
2498
+ 'ion-valid',
2499
+ 'ion-invalid',
2500
+ 'ion-touched',
2501
+ 'ion-untouched',
2502
+ 'ion-dirty',
2503
+ 'ion-pristine',
2504
+ ].forEach((c) => classList.remove(c));
2505
+ classes.forEach((c) => classList.add(c));
2506
+ };
2507
+ this.setIonicClasses = (element) => {
2508
+ raf(() => {
2509
+ const input = element.nativeElement;
2510
+ const classes = this.getClasses(input);
2511
+ this.setClasses(input, classes);
2512
+ const item = input.closest('ion-item');
2513
+ if (item) {
2514
+ this.setClasses(item, classes);
2515
+ }
2516
+ });
2517
+ };
2518
+ this.setItemClass = (element, className, addClass) => {
2519
+ const input = element.nativeElement;
2520
+ const item = input.closest('ion-item');
2521
+ if (item) {
2522
+ const classList = item.classList;
2523
+ if (addClass) {
2524
+ classList.add(className);
2525
+ }
2526
+ else {
2527
+ classList.remove(className);
2528
+ }
2529
+ }
2530
+ };
2531
+ }
2532
+ get value() {
2533
+ return this._value;
2534
+ }
2535
+ set value(value) {
2536
+ this._value = value;
2537
+ this.setIonicClasses(this.el);
2538
+ }
2539
+ emitValueChange(change) {
2540
+ this.propagateChange(change);
2541
+ }
2542
+ ngOnInit() {
2543
+ this.isIos = this.platform.is('ios');
2544
+ this.isMD = !this.isIos;
2545
+ this.setItemClass(this.el, 'item-interactive', true);
2546
+ this.fetchAllCountries();
2547
+ this.setPreferredCountries();
2548
+ if (this.onlyCountries.length) {
2549
+ this.countries = this.countries.filter((country) => this.onlyCountries.includes(country.isoCode));
2550
+ }
2551
+ if (this.selectFirstCountry) {
2552
+ if (this.defaultCountryiso) {
2553
+ this.setCountry(this.getCountryByIsoCode(this.defaultCountryiso));
2554
+ }
2555
+ else {
2556
+ if (this.preferredCountries.length &&
2557
+ this.preferredCountries.includes(this.defaultCountryiso)) {
2558
+ this.setCountry(this.getCountryByIsoCode(this.preferredCountries[0]));
2559
+ }
2560
+ else {
2561
+ this.setCountry(this.countries[0]);
2562
+ }
2563
+ }
2564
+ }
2565
+ }
2566
+ ngOnChanges(changes) {
2567
+ if (this.countries &&
2568
+ changes.defaulyCountryisoCode &&
2569
+ changes.defaulyCountryisoCode.currentValue !==
2570
+ changes.defaulyCountryisoCode.previousValue) {
2571
+ this.setCountry(changes.defaulyCountryisoCode.currentValue);
2572
+ }
2573
+ }
2574
+ registerOnChange(fn) {
2575
+ this.propagateChange = fn;
2576
+ }
2577
+ registerOnTouched(fn) {
2578
+ this.onTouched = fn;
2579
+ }
2580
+ writeValue(obj) {
2581
+ this.fillValues(obj);
2582
+ }
2583
+ setDisabledState(isDisabled) {
2584
+ this.disabled = isDisabled;
2585
+ }
2586
+ fillValues(value) {
2587
+ if (value && typeof value === 'string') {
2588
+ let googleNumber;
2589
+ try {
2590
+ googleNumber = this.phoneUtil.parse(value, null);
2591
+ }
2592
+ catch (e) {
2593
+ }
2594
+ if (!googleNumber) {
2595
+ // If failed to parse, try adding a +1 and see if valid
2596
+ if (value.length >= 10 && value.indexOf('+') === -1) {
2597
+ const v = '+1' + value;
2598
+ googleNumber = this.phoneUtil.parse(v, null);
2599
+ }
2600
+ }
2601
+ if (!googleNumber) {
2602
+ console.log('Warning: failed to parse number: ', value);
2603
+ }
2604
+ if (googleNumber) {
2605
+ let isoCode = googleNumber && googleNumber.getCountryCode()
2606
+ ? this.getCountryIsoCode(googleNumber.getCountryCode(), googleNumber)
2607
+ : this.country.isoCode;
2608
+ if (isoCode && isoCode !== this.country.isoCode) {
2609
+ const newCountry = this.countries.find((country) => country.isoCode === isoCode);
2610
+ if (newCountry) {
2611
+ this.country = newCountry;
2612
+ }
2613
+ }
2614
+ isoCode = isoCode ? isoCode : this.country ? this.country.isoCode : null;
2615
+ const internationallNo = this.phoneUtil.format(googleNumber, PhoneNumberFormat.INTERNATIONAL);
2616
+ this.phoneNumber = this.removeDialCode(internationallNo);
2617
+ this.value = internationallNo;
2618
+ }
2619
+ return;
2620
+ }
2621
+ }
2622
+ hasValue() {
2623
+ return !this.isNullOrWhiteSpace(this.value);
2624
+ }
2625
+ onCodeOpen() {
2626
+ this.codeOpen.emit();
2627
+ }
2628
+ openModal() {
2629
+ return __awaiter(this, void 0, void 0, function* () {
2630
+ const modal = yield this.modalCtrl.create({
2631
+ component: IonIntTelCodeComponent,
2632
+ cssClass: this.modalCssClass,
2633
+ backdropDismiss: this.modalShouldBackdropClose,
2634
+ componentProps: {
2635
+ country: this.country,
2636
+ canSearch: this.modalCanSearch,
2637
+ closeButtonText: this.modalCloseText,
2638
+ closeButtonSlot: this.modalCloseButtonSlot,
2639
+ countries: this.countries,
2640
+ title: this.modalTitle,
2641
+ searchFailText: this.modalSearchFailText,
2642
+ searchPlaceholder: this.modalSearchPlaceholder,
2643
+ shouldFocusSearchbar: this.modalShouldFocusSearchbar,
2644
+ dialCode: this.separateDialCode ? this.dialCodePrefix : null
2645
+ }
2646
+ });
2647
+ yield modal.present();
2648
+ modal.onDidDismiss().then(data => {
2649
+ if (data.data) {
2650
+ this.country = data.data;
2651
+ this.onCodeChange();
2652
+ }
2653
+ });
2654
+ });
2655
+ }
2656
+ onCodeChange() {
2657
+ if (this.isNullOrWhiteSpace(this.phoneNumber)) {
2658
+ this.emitValueChange(null);
2659
+ }
2660
+ else {
2661
+ let googleNumber;
2662
+ try {
2663
+ googleNumber = this.phoneUtil.parse(this.phoneNumber, this.country.isoCode.toUpperCase());
2664
+ }
2665
+ catch (e) { }
2666
+ const internationallNo = googleNumber
2667
+ ? this.phoneUtil.format(googleNumber, PhoneNumberFormat.INTERNATIONAL)
2668
+ : '';
2669
+ const nationalNo = googleNumber
2670
+ ? this.phoneUtil.format(googleNumber, PhoneNumberFormat.NATIONAL)
2671
+ : '';
2672
+ if (this.separateDialCode && internationallNo) {
2673
+ this.phoneNumber = this.removeDialCode(internationallNo);
2674
+ }
2675
+ this.emitValueChange(internationallNo);
2676
+ this.codeChange.emit();
2677
+ }
2678
+ setTimeout(() => {
2679
+ this.numberInputEl.setFocus();
2680
+ }, 400);
2681
+ }
2682
+ onCodeClose() {
2683
+ this.onTouched();
2684
+ this.setIonicClasses(this.el);
2685
+ this.hasFocus = false;
2686
+ this.setItemClass(this.el, 'item-has-focus', false);
2687
+ this.codeClose.emit();
2688
+ }
2689
+ onCodeSelect() {
2690
+ this.codeSelect.emit();
2691
+ }
2692
+ onIonNumberChange(event) {
2693
+ this.setIonicClasses(this.el);
2694
+ this.numberChange.emit(event);
2695
+ }
2696
+ onIonNumberBlur() {
2697
+ this.onTouched();
2698
+ this.setIonicClasses(this.el);
2699
+ this.hasFocus = false;
2700
+ this.setItemClass(this.el, 'item-has-focus', false);
2701
+ this.numberBlur.emit();
2702
+ }
2703
+ onIonNumberFocus() {
2704
+ this.hasFocus = true;
2705
+ this.setItemClass(this.el, 'item-has-focus', true);
2706
+ this.numberFocus.emit();
2707
+ }
2708
+ onIonNumberInput(event) {
2709
+ this.numberInput.emit(event);
2710
+ }
2711
+ // called via (ngModelChange)
2712
+ onNumberChange() {
2713
+ if (!this.phoneNumber) {
2714
+ this.value = null;
2715
+ this.emitValueChange(null);
2716
+ return;
2717
+ }
2718
+ if (this.country) {
2719
+ this.emitValueChange(this.dialCodePrefix + this.country.dialCode + ' ' + this.phoneNumber);
2720
+ }
2721
+ let googleNumber;
2722
+ try {
2723
+ googleNumber = this.phoneUtil.parse(this.phoneNumber, this.country.isoCode.toUpperCase());
2724
+ }
2725
+ catch (e) {
2726
+ return;
2727
+ }
2728
+ let isoCode = this.country ? this.country.isoCode : null;
2729
+ // auto select country based on the extension (and areaCode if needed) (e.g select Canada if number starts with +1 416)
2730
+ if (this.enableAutoCountrySelect) {
2731
+ isoCode =
2732
+ googleNumber && googleNumber.getCountryCode()
2733
+ ? this.getCountryIsoCode(googleNumber.getCountryCode(), googleNumber)
2734
+ : this.country.isoCode;
2735
+ if (isoCode && isoCode !== this.country.isoCode) {
2736
+ const newCountry = this.countries.find((country) => country.isoCode === isoCode);
2737
+ if (newCountry) {
2738
+ this.country = newCountry;
2739
+ }
2740
+ }
2741
+ }
2742
+ isoCode = isoCode ? isoCode : this.country ? this.country.isoCode : null;
2743
+ if (!this.phoneNumber || !isoCode) {
2744
+ this.emitValueChange(null);
2745
+ }
2746
+ else {
2747
+ const internationallNo = googleNumber
2748
+ ? this.phoneUtil.format(googleNumber, PhoneNumberFormat.INTERNATIONAL)
2749
+ : '';
2750
+ const nationalNo = googleNumber
2751
+ ? this.phoneUtil.format(googleNumber, PhoneNumberFormat.NATIONAL)
2752
+ : '';
2753
+ if (this.separateDialCode && internationallNo) {
2754
+ this.phoneNumber = this.removeDialCode(internationallNo);
2755
+ }
2756
+ this.emitValueChange(internationallNo);
2757
+ }
2758
+ }
2759
+ onNumberKeyDown(event) {
2760
+ const allowedChars = /^[0-9\+\-\ ]/;
2761
+ const allowedCtrlChars = /[axcv]/;
2762
+ const allowedOtherKeys = [
2763
+ 'ArrowLeft',
2764
+ 'ArrowUp',
2765
+ 'ArrowRight',
2766
+ 'ArrowDown',
2767
+ 'Home',
2768
+ 'End',
2769
+ 'Insert',
2770
+ 'Delete',
2771
+ 'Backspace',
2772
+ 'Tab',
2773
+ ];
2774
+ const isCtrlKey = event.ctrlKey || event.metaKey;
2775
+ if (!allowedChars.test(event.key) &&
2776
+ !(isCtrlKey && allowedCtrlChars.test(event.key)) &&
2777
+ !allowedOtherKeys.includes(event.key)) {
2778
+ event.preventDefault();
2779
+ }
2780
+ }
2781
+ filterCountries(text) {
2782
+ return this.countries.filter((country) => {
2783
+ return (country.name.toLowerCase().indexOf(text) !== -1 ||
2784
+ country.name.toLowerCase().indexOf(text) !== -1 ||
2785
+ country.dialCode.toString().toLowerCase().indexOf(text) !== -1);
2786
+ });
2787
+ }
2788
+ getCountryIsoCode(countryCode, googleNumber) {
2789
+ const rawNumber = googleNumber.values_[2].toString();
2790
+ const countries = this.countries.filter((country) => country.dialCode === countryCode.toString());
2791
+ const mainCountry = countries.find((country) => country.areaCodes === undefined);
2792
+ const secondaryCountries = countries.filter((country) => country.areaCodes !== undefined);
2793
+ let matchedCountry = mainCountry ? mainCountry.isoCode : undefined;
2794
+ secondaryCountries.forEach((country) => {
2795
+ country.areaCodes.forEach((areaCode) => {
2796
+ if (rawNumber.startsWith(areaCode)) {
2797
+ matchedCountry = country.isoCode;
2798
+ }
2799
+ });
2800
+ });
2801
+ return matchedCountry;
2802
+ }
2803
+ fetchAllCountries() {
2804
+ this.countries = this.ionIntlTelInputService.getListOfCountries();
2805
+ }
2806
+ getCountryByIsoCode(isoCode) {
2807
+ for (const country of this.countries) {
2808
+ if (country.isoCode === isoCode) {
2809
+ return country;
2810
+ }
2811
+ }
2812
+ console.error('tel: unknown country iso code: ', isoCode);
2813
+ return;
2814
+ }
2815
+ isNullOrWhiteSpace(value) {
2816
+ if (value === null || value === undefined) {
2817
+ return true;
2818
+ }
2819
+ if (typeof value === 'string' && value === '') {
2820
+ return true;
2821
+ }
2822
+ return typeof value === 'object' && Object.keys(value).length === 0;
2823
+ }
2824
+ removeDialCode(phoneNumber) {
2825
+ if (this.separateDialCode && phoneNumber) {
2826
+ phoneNumber = phoneNumber.substr(phoneNumber.indexOf(' ') + 1);
2827
+ }
2828
+ return phoneNumber;
2829
+ }
2830
+ setCountry(country) {
2831
+ this.country = country;
2832
+ this.codeChange.emit(this.country);
2833
+ }
2834
+ setPreferredCountries() {
2835
+ for (const preferedCountryIsoCode of this.preferredCountries) {
2836
+ const country = this.getCountryByIsoCode(preferedCountryIsoCode);
2837
+ country.priority = country ? 1 : country.priority;
2838
+ }
2839
+ this.countries.sort((a, b) => a.priority > b.priority ? -1 : a.priority < b.priority ? 1 : 0);
2840
+ }
2841
+ }
2842
+ /** @nocollapse */ IonIntlTelInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputComponent, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: IonIntlTelInputService }, { token: i1.ModalController }], target: i0.ɵɵFactoryTarget.Component });
2843
+ /** @nocollapse */ IonIntlTelInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: IonIntlTelInputComponent, selector: "ion-intl-tel-input", inputs: { isEnabled: "isEnabled", autocomplete: "autocomplete", required: "required", defaultCountryiso: "defaultCountryiso", dialCodePrefix: "dialCodePrefix", enableAutoCountrySelect: "enableAutoCountrySelect", enablePlaceholder: "enablePlaceholder", fallbackPlaceholder: "fallbackPlaceholder", inputPlaceholder: "inputPlaceholder", usePatternPlaceholder: "usePatternPlaceholder", maxLength: "maxLength", modalTitle: "modalTitle", modalCssClass: "modalCssClass", modalSearchPlaceholder: "modalSearchPlaceholder", modalCloseText: "modalCloseText", modalCloseButtonSlot: "modalCloseButtonSlot", modalCanSearch: "modalCanSearch", modalShouldBackdropClose: "modalShouldBackdropClose", modalShouldFocusSearchbar: "modalShouldFocusSearchbar", modalSearchFailText: "modalSearchFailText", onlyCountries: "onlyCountries", preferredCountries: "preferredCountries", selectFirstCountry: "selectFirstCountry", separateDialCode: "separateDialCode" }, outputs: { numberChange: "numberChange", numberBlur: "numberBlur", numberFocus: "numberFocus", numberInput: "numberInput", codeChange: "codeChange", codeOpen: "codeOpen", codeClose: "codeClose", codeSelect: "codeSelect" }, host: { properties: { "class.ion-intl-tel-input": "this.cssClass", "class.ion-intl-tel-input-ios": "this.isIos", "class.ion-intl-tel-input-md": "this.isMD", "class.has-focus": "this.hasFocus", "class.ion-intl-tel-input-has-value": "this.hasValueCssClass", "class.ion-intl-tel-input-is-enabled": "this.isEnabled" } }, providers: [
2844
+ {
2845
+ provide: NG_VALUE_ACCESSOR,
2846
+ useExisting: forwardRef((() => IonIntlTelInputComponent)),
2847
+ multi: true,
2848
+ },
2849
+ ], viewQueries: [{ propertyName: "numberInputEl", first: true, predicate: ["numberInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ion-button\n fill=\"clear\"\n class=\"ion-intl-tel-input-btn\"\n [disabled] = \"disabled\"\n aria-label=\"country\"\n (click)=\"openModal()\"\n>\n <span class=\"ion-intl-tel-input-flag fi fi-{{country.flagClass}}\"></span><span class=\"ion-intl-tel-input-code\" *ngIf=\"separateDialCode\">{{dialCodePrefix}}{{country.dialCode}}</span>\n <ion-icon style=\"font-size:14px;opacity:.5;\" name=\"caret-down\"></ion-icon>\n</ion-button>\n<div class=\"ion-intl-tel-input-number\">\n <ion-input\n #numberInput\n [(ngModel)]=\"phoneNumber\"\n [autocomplete]=\"autocomplete\"\n [required]=\"required\"\n [disabled] = \"disabled\"\n [attr.maxLength]=\"maxLength\"\n type=\"tel\"\n (ionBlur)=\"onIonNumberBlur()\"\n (ionChange)=\"onIonNumberChange($event)\"\n (ionFocus)=\"onIonNumberFocus()\"\n (ionInput)=\"onIonNumberInput($event)\"\n (keydown)=\"onNumberKeyDown($event)\"\n (ngModelChange)=\"onNumberChange()\"\n placeholder=\"{{country | countryPlaceholder: inputPlaceholder:separateDialCode:fallbackPlaceholder:usePatternPlaceholder}}\" >\n </ion-input>\n</div>\n", styles: [":host{width:100%;display:flex;align-items:center}:host ion-button{color:var(--ion-color);height:100%;margin:0}:host ion-button::part(native){padding-inline-start:0;padding-inline-end:2px;margin:0;font-size:16px;font-weight:400}:host .fi{margin-right:5px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "legacy", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "size", "spellcheck", "step", "type", "value"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: CountryPlaceholder, name: "countryPlaceholder" }] });
2850
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputComponent, decorators: [{
2851
+ type: Component,
2852
+ args: [{ selector: 'ion-intl-tel-input', providers: [
2853
+ {
2854
+ provide: NG_VALUE_ACCESSOR,
2855
+ useExisting: forwardRef((() => IonIntlTelInputComponent)),
2856
+ multi: true,
2857
+ },
2858
+ ], template: "<ion-button\n fill=\"clear\"\n class=\"ion-intl-tel-input-btn\"\n [disabled] = \"disabled\"\n aria-label=\"country\"\n (click)=\"openModal()\"\n>\n <span class=\"ion-intl-tel-input-flag fi fi-{{country.flagClass}}\"></span><span class=\"ion-intl-tel-input-code\" *ngIf=\"separateDialCode\">{{dialCodePrefix}}{{country.dialCode}}</span>\n <ion-icon style=\"font-size:14px;opacity:.5;\" name=\"caret-down\"></ion-icon>\n</ion-button>\n<div class=\"ion-intl-tel-input-number\">\n <ion-input\n #numberInput\n [(ngModel)]=\"phoneNumber\"\n [autocomplete]=\"autocomplete\"\n [required]=\"required\"\n [disabled] = \"disabled\"\n [attr.maxLength]=\"maxLength\"\n type=\"tel\"\n (ionBlur)=\"onIonNumberBlur()\"\n (ionChange)=\"onIonNumberChange($event)\"\n (ionFocus)=\"onIonNumberFocus()\"\n (ionInput)=\"onIonNumberInput($event)\"\n (keydown)=\"onNumberKeyDown($event)\"\n (ngModelChange)=\"onNumberChange()\"\n placeholder=\"{{country | countryPlaceholder: inputPlaceholder:separateDialCode:fallbackPlaceholder:usePatternPlaceholder}}\" >\n </ion-input>\n</div>\n", styles: [":host{width:100%;display:flex;align-items:center}:host ion-button{color:var(--ion-color);height:100%;margin:0}:host ion-button::part(native){padding-inline-start:0;padding-inline-end:2px;margin:0;font-size:16px;font-weight:400}:host .fi{margin-right:5px}\n"] }]
2859
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Platform }, { type: IonIntlTelInputService }, { type: i1.ModalController }]; }, propDecorators: { cssClass: [{
2860
+ type: HostBinding,
2861
+ args: ['class.ion-intl-tel-input']
2862
+ }], isIos: [{
2863
+ type: HostBinding,
2864
+ args: ['class.ion-intl-tel-input-ios']
2865
+ }], isMD: [{
2866
+ type: HostBinding,
2867
+ args: ['class.ion-intl-tel-input-md']
2868
+ }], hasFocus: [{
2869
+ type: HostBinding,
2870
+ args: ['class.has-focus']
2871
+ }], hasValueCssClass: [{
2872
+ type: HostBinding,
2873
+ args: ['class.ion-intl-tel-input-has-value']
2874
+ }], isEnabled: [{
2875
+ type: HostBinding,
2876
+ args: ['class.ion-intl-tel-input-is-enabled']
2877
+ }, {
2878
+ type: Input,
2879
+ args: ['isEnabled']
2880
+ }], autocomplete: [{
2881
+ type: Input
2882
+ }], required: [{
2883
+ type: Input
2884
+ }], defaultCountryiso: [{
2885
+ type: Input
2886
+ }], dialCodePrefix: [{
2887
+ type: Input
2888
+ }], enableAutoCountrySelect: [{
2889
+ type: Input
2890
+ }], enablePlaceholder: [{
2891
+ type: Input
2892
+ }], fallbackPlaceholder: [{
2893
+ type: Input
2894
+ }], inputPlaceholder: [{
2895
+ type: Input
2896
+ }], usePatternPlaceholder: [{
2897
+ type: Input
2898
+ }], maxLength: [{
2899
+ type: Input
2900
+ }], modalTitle: [{
2901
+ type: Input
2902
+ }], modalCssClass: [{
2903
+ type: Input
2904
+ }], modalSearchPlaceholder: [{
2905
+ type: Input
2906
+ }], modalCloseText: [{
2907
+ type: Input
2908
+ }], modalCloseButtonSlot: [{
2909
+ type: Input
2910
+ }], modalCanSearch: [{
2911
+ type: Input
2912
+ }], modalShouldBackdropClose: [{
2913
+ type: Input
2914
+ }], modalShouldFocusSearchbar: [{
2915
+ type: Input
2916
+ }], modalSearchFailText: [{
2917
+ type: Input
2918
+ }], onlyCountries: [{
2919
+ type: Input
2920
+ }], preferredCountries: [{
2921
+ type: Input
2922
+ }], selectFirstCountry: [{
2923
+ type: Input
2924
+ }], separateDialCode: [{
2925
+ type: Input
2926
+ }], numberChange: [{
2927
+ type: Output
2928
+ }], numberBlur: [{
2929
+ type: Output
2930
+ }], numberFocus: [{
2931
+ type: Output
2932
+ }], numberInput: [{
2933
+ type: Output
2934
+ }], codeChange: [{
2935
+ type: Output
2936
+ }], codeOpen: [{
2937
+ type: Output
2938
+ }], codeClose: [{
2939
+ type: Output
2940
+ }], codeSelect: [{
2941
+ type: Output
2942
+ }], numberInputEl: [{
2943
+ type: ViewChild,
2944
+ args: ['numberInput', { static: false }]
2945
+ }] } });
2946
+
2947
+ class IonIntlTelInputModule {
2948
+ }
2949
+ /** @nocollapse */ IonIntlTelInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2950
+ /** @nocollapse */ IonIntlTelInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputModule, declarations: [CountryPlaceholder,
2951
+ IonIntlTelInputValidatorDirective,
2952
+ IonIntlTelInputComponent,
2953
+ IonIntTelCodeComponent], imports: [CommonModule,
2954
+ FormsModule,
2955
+ IonicModule], exports: [IonIntlTelInputComponent,
2956
+ IonIntlTelInputValidatorDirective,
2957
+ IonIntTelCodeComponent] });
2958
+ /** @nocollapse */ IonIntlTelInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputModule, providers: [
2959
+ IonIntlTelInputService
2960
+ ], imports: [CommonModule,
2961
+ FormsModule,
2962
+ IonicModule] });
2963
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputModule, decorators: [{
2964
+ type: NgModule,
2965
+ args: [{
2966
+ declarations: [
2967
+ CountryPlaceholder,
2968
+ IonIntlTelInputValidatorDirective,
2969
+ IonIntlTelInputComponent,
2970
+ IonIntTelCodeComponent
2971
+ ],
2972
+ imports: [
2973
+ CommonModule,
2974
+ FormsModule,
2975
+ IonicModule,
2976
+ ],
2977
+ exports: [
2978
+ IonIntlTelInputComponent,
2979
+ IonIntlTelInputValidatorDirective,
2980
+ IonIntTelCodeComponent
2981
+ ],
2982
+ providers: [
2983
+ IonIntlTelInputService
2984
+ ],
2985
+ }]
2986
+ }] });
2987
+
2988
+ /*
2989
+ * Public API Surface of ion-intl-tel-input
2990
+ */
2991
+
2992
+ /**
2993
+ * Generated bundle index. Do not edit.
2994
+ */
2995
+
2996
+ export { IonIntTelCodeComponent, IonIntlTelInputComponent, IonIntlTelInputModule, IonIntlTelInputService, IonIntlTelInputValidatorDirective, IonIntlTelInputValidators };
2997
+ //# sourceMappingURL=crodriguezdominguez-ion-intl-tel-input.mjs.map