intl-tel-input 25.8.2 → 25.8.3
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.
- package/README.md +5 -5
- package/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +9 -23
- package/angular/build/IntlTelInputWithUtils.js +9 -23
- package/angular/build/types/intl-tel-input.d.ts +0 -1
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.d.ts +0 -1
- package/build/js/intlTelInput.js +10 -24
- package/build/js/intlTelInput.min.js +4 -4
- package/build/js/intlTelInputWithUtils.js +10 -24
- package/build/js/intlTelInputWithUtils.min.js +3 -3
- package/package.json +1 -1
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +9 -23
- package/react/build/IntlTelInput.d.ts +0 -1
- package/react/build/IntlTelInput.js +9 -23
- package/react/build/IntlTelInputWithUtils.cjs +9 -23
- package/react/build/IntlTelInputWithUtils.js +9 -23
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +70 -75
- package/vue/build/IntlTelInputWithUtils.mjs +75 -80
package/README.md
CHANGED
|
@@ -77,16 +77,16 @@ _Note: We have now dropped support for all versions of Internet Explorer because
|
|
|
77
77
|
## Getting Started (Using a CDN)
|
|
78
78
|
1. Add the CSS
|
|
79
79
|
```html
|
|
80
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.
|
|
80
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.3/build/css/intlTelInput.css">
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
2. Add the plugin script and initialise it on your input element
|
|
84
84
|
```html
|
|
85
|
-
<script src="https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.
|
|
85
|
+
<script src="https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.3/build/js/intlTelInput.min.js"></script>
|
|
86
86
|
<script>
|
|
87
87
|
const input = document.querySelector("#phone");
|
|
88
88
|
window.intlTelInput(input, {
|
|
89
|
-
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.
|
|
89
|
+
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.3/build/js/utils.js"),
|
|
90
90
|
});
|
|
91
91
|
</script>
|
|
92
92
|
```
|
|
@@ -322,7 +322,7 @@ The `loadUtils` option takes a function which returns a Promise which resolves t
|
|
|
322
322
|
```js
|
|
323
323
|
// (A) import utils module from a CDN
|
|
324
324
|
intlTelInput(htmlInputElement, {
|
|
325
|
-
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.
|
|
325
|
+
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.3/build/js/utils.js"),
|
|
326
326
|
});
|
|
327
327
|
|
|
328
328
|
// (B) import utils module from your own hosted version of utils.js
|
|
@@ -606,7 +606,7 @@ The `loadUtils` option takes a function which returns a Promise which resolves t
|
|
|
606
606
|
```js
|
|
607
607
|
// (A) import utils module from a CDN
|
|
608
608
|
intlTelInput(htmlInputElement, {
|
|
609
|
-
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.
|
|
609
|
+
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.3/build/js/utils.js"),
|
|
610
610
|
});
|
|
611
611
|
|
|
612
612
|
// (B) import utils module from your own hosted version of utils.js
|
package/angular/README.md
CHANGED
|
@@ -29,7 +29,7 @@ import "intl-tel-input/styles";
|
|
|
29
29
|
|
|
30
30
|
See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/angular/demo/validation/validation.component.ts) for a more fleshed-out example of how to handle validation.
|
|
31
31
|
|
|
32
|
-
A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/angularWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/angular"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.
|
|
32
|
+
A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/angularWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/angular"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.8.3/build/js/utils.js"`.
|
|
33
33
|
|
|
34
34
|
## Props
|
|
35
35
|
Here's a list of all of the current props you can pass to the IntlTelInput Angular component.
|
|
@@ -1946,7 +1946,7 @@ var Iti = class _Iti {
|
|
|
1946
1946
|
this.dropdownArrow = createEl("div", { class: "iti__arrow", "aria-hidden": "true" }, selectedCountryPrimary);
|
|
1947
1947
|
}
|
|
1948
1948
|
if (separateDialCode) {
|
|
1949
|
-
this.selectedDialCode = createEl("div", { class: "iti__selected-dial-code",
|
|
1949
|
+
this.selectedDialCode = createEl("div", { class: "iti__selected-dial-code", dir: "ltr" }, this.selectedCountry);
|
|
1950
1950
|
}
|
|
1951
1951
|
if (allowDropdown) {
|
|
1952
1952
|
const extraClasses = fixDropdownWidth ? "" : "iti--flexible-dropdown-width";
|
|
@@ -2645,20 +2645,20 @@ var Iti = class _Iti {
|
|
|
2645
2645
|
if (this.selectedCountryData.iso2) {
|
|
2646
2646
|
this.defaultCountry = this.selectedCountryData.iso2;
|
|
2647
2647
|
}
|
|
2648
|
-
if (this.
|
|
2649
|
-
|
|
2650
|
-
let ariaLabel
|
|
2651
|
-
if (iso2
|
|
2652
|
-
|
|
2648
|
+
if (this.selectedCountry) {
|
|
2649
|
+
const flagClass = iso2 && showFlags ? `iti__flag iti__${iso2}` : "iti__flag iti__globe";
|
|
2650
|
+
let ariaLabel, title;
|
|
2651
|
+
if (iso2) {
|
|
2652
|
+
title = this.selectedCountryData.name;
|
|
2653
2653
|
ariaLabel = i18n.selectedCountryAriaLabel.replace("${country}", this.selectedCountryData.name);
|
|
2654
2654
|
} else {
|
|
2655
|
-
|
|
2655
|
+
title = i18n.noCountrySelected;
|
|
2656
2656
|
ariaLabel = i18n.noCountrySelected;
|
|
2657
2657
|
}
|
|
2658
2658
|
this.selectedCountryInner.className = flagClass;
|
|
2659
|
+
this.selectedCountry.setAttribute("title", title);
|
|
2659
2660
|
this.selectedCountry.setAttribute("aria-label", ariaLabel);
|
|
2660
2661
|
}
|
|
2661
|
-
this._setSelectedCountryTitleAttribute(iso2, separateDialCode);
|
|
2662
2662
|
if (separateDialCode) {
|
|
2663
2663
|
const dialCode = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
2664
2664
|
this.selectedDialCode.innerHTML = dialCode;
|
|
@@ -2703,20 +2703,6 @@ var Iti = class _Iti {
|
|
|
2703
2703
|
}
|
|
2704
2704
|
}
|
|
2705
2705
|
}
|
|
2706
|
-
_setSelectedCountryTitleAttribute(iso2 = null, separateDialCode) {
|
|
2707
|
-
if (!this.selectedCountry) {
|
|
2708
|
-
return;
|
|
2709
|
-
}
|
|
2710
|
-
let title;
|
|
2711
|
-
if (iso2 && !separateDialCode) {
|
|
2712
|
-
title = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}`;
|
|
2713
|
-
} else if (iso2) {
|
|
2714
|
-
title = this.selectedCountryData.name;
|
|
2715
|
-
} else {
|
|
2716
|
-
title = this.options.i18n.noCountrySelected;
|
|
2717
|
-
}
|
|
2718
|
-
this.selectedCountry.setAttribute("title", title);
|
|
2719
|
-
}
|
|
2720
2706
|
//* When the input is in a hidden container during initialisation, we must inject some markup
|
|
2721
2707
|
//* into the end of the DOM to calculate the correct offsetWidth.
|
|
2722
2708
|
//* NOTE: this is only used when separateDialCode is enabled, so countryContainer and selectedCountry
|
|
@@ -3108,7 +3094,7 @@ var intlTelInput = Object.assign((input, options) => {
|
|
|
3108
3094
|
attachUtils,
|
|
3109
3095
|
startedLoadingUtilsScript: false,
|
|
3110
3096
|
startedLoadingAutoCountry: false,
|
|
3111
|
-
version: "25.8.
|
|
3097
|
+
version: "25.8.3"
|
|
3112
3098
|
});
|
|
3113
3099
|
var intl_tel_input_default = intlTelInput;
|
|
3114
3100
|
|
|
@@ -1946,7 +1946,7 @@ var Iti = class _Iti {
|
|
|
1946
1946
|
this.dropdownArrow = createEl("div", { class: "iti__arrow", "aria-hidden": "true" }, selectedCountryPrimary);
|
|
1947
1947
|
}
|
|
1948
1948
|
if (separateDialCode) {
|
|
1949
|
-
this.selectedDialCode = createEl("div", { class: "iti__selected-dial-code",
|
|
1949
|
+
this.selectedDialCode = createEl("div", { class: "iti__selected-dial-code", dir: "ltr" }, this.selectedCountry);
|
|
1950
1950
|
}
|
|
1951
1951
|
if (allowDropdown) {
|
|
1952
1952
|
const extraClasses = fixDropdownWidth ? "" : "iti--flexible-dropdown-width";
|
|
@@ -2645,20 +2645,20 @@ var Iti = class _Iti {
|
|
|
2645
2645
|
if (this.selectedCountryData.iso2) {
|
|
2646
2646
|
this.defaultCountry = this.selectedCountryData.iso2;
|
|
2647
2647
|
}
|
|
2648
|
-
if (this.
|
|
2649
|
-
|
|
2650
|
-
let ariaLabel
|
|
2651
|
-
if (iso2
|
|
2652
|
-
|
|
2648
|
+
if (this.selectedCountry) {
|
|
2649
|
+
const flagClass = iso2 && showFlags ? `iti__flag iti__${iso2}` : "iti__flag iti__globe";
|
|
2650
|
+
let ariaLabel, title;
|
|
2651
|
+
if (iso2) {
|
|
2652
|
+
title = this.selectedCountryData.name;
|
|
2653
2653
|
ariaLabel = i18n.selectedCountryAriaLabel.replace("${country}", this.selectedCountryData.name);
|
|
2654
2654
|
} else {
|
|
2655
|
-
|
|
2655
|
+
title = i18n.noCountrySelected;
|
|
2656
2656
|
ariaLabel = i18n.noCountrySelected;
|
|
2657
2657
|
}
|
|
2658
2658
|
this.selectedCountryInner.className = flagClass;
|
|
2659
|
+
this.selectedCountry.setAttribute("title", title);
|
|
2659
2660
|
this.selectedCountry.setAttribute("aria-label", ariaLabel);
|
|
2660
2661
|
}
|
|
2661
|
-
this._setSelectedCountryTitleAttribute(iso2, separateDialCode);
|
|
2662
2662
|
if (separateDialCode) {
|
|
2663
2663
|
const dialCode = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
2664
2664
|
this.selectedDialCode.innerHTML = dialCode;
|
|
@@ -2703,20 +2703,6 @@ var Iti = class _Iti {
|
|
|
2703
2703
|
}
|
|
2704
2704
|
}
|
|
2705
2705
|
}
|
|
2706
|
-
_setSelectedCountryTitleAttribute(iso2 = null, separateDialCode) {
|
|
2707
|
-
if (!this.selectedCountry) {
|
|
2708
|
-
return;
|
|
2709
|
-
}
|
|
2710
|
-
let title;
|
|
2711
|
-
if (iso2 && !separateDialCode) {
|
|
2712
|
-
title = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}`;
|
|
2713
|
-
} else if (iso2) {
|
|
2714
|
-
title = this.selectedCountryData.name;
|
|
2715
|
-
} else {
|
|
2716
|
-
title = this.options.i18n.noCountrySelected;
|
|
2717
|
-
}
|
|
2718
|
-
this.selectedCountry.setAttribute("title", title);
|
|
2719
|
-
}
|
|
2720
2706
|
//* When the input is in a hidden container during initialisation, we must inject some markup
|
|
2721
2707
|
//* into the end of the DOM to calculate the correct offsetWidth.
|
|
2722
2708
|
//* NOTE: this is only used when separateDialCode is enabled, so countryContainer and selectedCountry
|
|
@@ -3108,7 +3094,7 @@ var intlTelInput = Object.assign((input, options) => {
|
|
|
3108
3094
|
attachUtils,
|
|
3109
3095
|
startedLoadingUtilsScript: false,
|
|
3110
3096
|
startedLoadingAutoCountry: false,
|
|
3111
|
-
version: "25.8.
|
|
3097
|
+
version: "25.8.3"
|
|
3112
3098
|
});
|
|
3113
3099
|
var intl_tel_input_default = intlTelInput;
|
|
3114
3100
|
|
|
@@ -176,7 +176,6 @@ export declare class Iti {
|
|
|
176
176
|
private _setCountry;
|
|
177
177
|
private _updateInputPadding;
|
|
178
178
|
private _updateMaxLength;
|
|
179
|
-
private _setSelectedCountryTitleAttribute;
|
|
180
179
|
private _getHiddenSelectedCountryWidth;
|
|
181
180
|
private _updatePlaceholder;
|
|
182
181
|
private _selectListItem;
|
package/build/js/data.js
CHANGED
package/build/js/data.min.js
CHANGED
|
@@ -470,7 +470,6 @@ declare module "intl-tel-input" {
|
|
|
470
470
|
private _setCountry;
|
|
471
471
|
private _updateInputPadding;
|
|
472
472
|
private _updateMaxLength;
|
|
473
|
-
private _setSelectedCountryTitleAttribute;
|
|
474
473
|
private _getHiddenSelectedCountryWidth;
|
|
475
474
|
private _updatePlaceholder;
|
|
476
475
|
private _selectListItem;
|
package/build/js/intlTelInput.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* International Telephone Input v25.8.
|
|
2
|
+
* International Telephone Input v25.8.3
|
|
3
3
|
* https://github.com/jackocnr/intl-tel-input.git
|
|
4
4
|
* Licensed under the MIT license
|
|
5
5
|
*/
|
|
@@ -2031,7 +2031,7 @@ var factoryOutput = (() => {
|
|
|
2031
2031
|
if (separateDialCode) {
|
|
2032
2032
|
this.selectedDialCode = createEl(
|
|
2033
2033
|
"div",
|
|
2034
|
-
{ class: "iti__selected-dial-code",
|
|
2034
|
+
{ class: "iti__selected-dial-code", dir: "ltr" },
|
|
2035
2035
|
this.selectedCountry
|
|
2036
2036
|
);
|
|
2037
2037
|
}
|
|
@@ -2778,20 +2778,20 @@ var factoryOutput = (() => {
|
|
|
2778
2778
|
if (this.selectedCountryData.iso2) {
|
|
2779
2779
|
this.defaultCountry = this.selectedCountryData.iso2;
|
|
2780
2780
|
}
|
|
2781
|
-
if (this.
|
|
2782
|
-
|
|
2783
|
-
let ariaLabel
|
|
2784
|
-
if (iso2
|
|
2785
|
-
|
|
2781
|
+
if (this.selectedCountry) {
|
|
2782
|
+
const flagClass = iso2 && showFlags ? `iti__flag iti__${iso2}` : "iti__flag iti__globe";
|
|
2783
|
+
let ariaLabel, title;
|
|
2784
|
+
if (iso2) {
|
|
2785
|
+
title = this.selectedCountryData.name;
|
|
2786
2786
|
ariaLabel = i18n.selectedCountryAriaLabel.replace("${country}", this.selectedCountryData.name);
|
|
2787
2787
|
} else {
|
|
2788
|
-
|
|
2788
|
+
title = i18n.noCountrySelected;
|
|
2789
2789
|
ariaLabel = i18n.noCountrySelected;
|
|
2790
2790
|
}
|
|
2791
2791
|
this.selectedCountryInner.className = flagClass;
|
|
2792
|
+
this.selectedCountry.setAttribute("title", title);
|
|
2792
2793
|
this.selectedCountry.setAttribute("aria-label", ariaLabel);
|
|
2793
2794
|
}
|
|
2794
|
-
this._setSelectedCountryTitleAttribute(iso2, separateDialCode);
|
|
2795
2795
|
if (separateDialCode) {
|
|
2796
2796
|
const dialCode = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
2797
2797
|
this.selectedDialCode.innerHTML = dialCode;
|
|
@@ -2841,20 +2841,6 @@ var factoryOutput = (() => {
|
|
|
2841
2841
|
}
|
|
2842
2842
|
}
|
|
2843
2843
|
}
|
|
2844
|
-
_setSelectedCountryTitleAttribute(iso2 = null, separateDialCode) {
|
|
2845
|
-
if (!this.selectedCountry) {
|
|
2846
|
-
return;
|
|
2847
|
-
}
|
|
2848
|
-
let title;
|
|
2849
|
-
if (iso2 && !separateDialCode) {
|
|
2850
|
-
title = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}`;
|
|
2851
|
-
} else if (iso2) {
|
|
2852
|
-
title = this.selectedCountryData.name;
|
|
2853
|
-
} else {
|
|
2854
|
-
title = this.options.i18n.noCountrySelected;
|
|
2855
|
-
}
|
|
2856
|
-
this.selectedCountry.setAttribute("title", title);
|
|
2857
|
-
}
|
|
2858
2844
|
//* When the input is in a hidden container during initialisation, we must inject some markup
|
|
2859
2845
|
//* into the end of the DOM to calculate the correct offsetWidth.
|
|
2860
2846
|
//* NOTE: this is only used when separateDialCode is enabled, so countryContainer and selectedCountry
|
|
@@ -3280,7 +3266,7 @@ var factoryOutput = (() => {
|
|
|
3280
3266
|
attachUtils,
|
|
3281
3267
|
startedLoadingUtilsScript: false,
|
|
3282
3268
|
startedLoadingAutoCountry: false,
|
|
3283
|
-
version: "25.8.
|
|
3269
|
+
version: "25.8.3"
|
|
3284
3270
|
}
|
|
3285
3271
|
);
|
|
3286
3272
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* International Telephone Input v25.8.
|
|
2
|
+
* International Telephone Input v25.8.3
|
|
3
3
|
* https://github.com/jackocnr/intl-tel-input.git
|
|
4
4
|
* Licensed under the MIT license
|
|
5
5
|
*/
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
}
|
|
14
14
|
}(() => {
|
|
15
15
|
|
|
16
|
-
var factoryOutput=(()=>{var L=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var O=(o,t)=>{for(var e in t)L(o,e,{get:t[e],enumerable:!0})},B=(o,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of H(t))!R.call(o,n)&&n!==e&&L(o,n,{get:()=>t[n],enumerable:!(i=x(t,n))||i.enumerable});return o};var F=o=>B(L({},"__esModule",{value:!0}),o);var J={};O(J,{Iti:()=>w,default:()=>Y});var U=[["af","93"],["ax","358",1],["al","355"],["dz","213"],["as","1",5,["684"]],["ad","376"],["ao","244"],["ai","1",6,["264"]],["ag","1",7,["268"]],["ar","54"],["am","374"],["aw","297"],["ac","247"],["au","61",0,null,"0"],["at","43"],["az","994"],["bs","1",8,["242"]],["bh","973"],["bd","880"],["bb","1",9,["246"]],["by","375"],["be","32"],["bz","501"],["bj","229"],["bm","1",10,["441"]],["bt","975"],["bo","591"],["ba","387"],["bw","267"],["br","55"],["io","246"],["vg","1",11,["284"]],["bn","673"],["bg","359"],["bf","226"],["bi","257"],["kh","855"],["cm","237"],["ca","1",1,["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"]],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"]],["cf","236"],["td","235"],["cl","56"],["cn","86"],["cx","61",2,["89164"],"0"],["cc","61",1,["89162"],"0"],["co","57"],["km","269"],["cg","242"],["cd","243"],["ck","682"],["cr","506"],["ci","225"],["hr","385"],["cu","53"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"]],["do","1",2,["809","829","849"]],["ec","593"],["eg","20"],["sv","503"],["gq","240"],["er","291"],["ee","372"],["sz","268"],["et","251"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0],["fr","33"],["gf","594"],["pf","689"],["ga","241"],["gm","220"],["ge","995"],["de","49"],["gh","233"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"]],["gp","590",0],["gu","1",15,["671"]],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36"],["is","354"],["in","91"],["id","62"],["ir","98"],["iq","964"],["ie","353"],["im","44",2,["1624","74576","7524","7924","7624"],"0"],["il","972"],["it","39",0],["jm","1",4,["876","658"]],["jp","81"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962"],["kz","7",1,["33","7"],"8"],["ke","254"],["ki","686"],["xk","383"],["kw","965"],["kg","996"],["la","856"],["lv","371"],["lb","961"],["ls","266"],["lr","231"],["ly","218"],["li","423"],["lt","370"],["lu","352"],["mo","853"],["mg","261"],["mw","265"],["my","60"],["mv","960"],["ml","223"],["mt","356"],["mh","692"],["mq","596"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373"],["mc","377"],["mn","976"],["me","382"],["ms","1",16,["664"]],["ma","212",0,null,"0"],["mz","258"],["mm","95"],["na","264"],["nr","674"],["np","977"],["nl","31"],["nc","687"],["nz","64"],["ni","505"],["ne","227"],["ng","234"],["nu","683"],["nf","672"],["kp","850"],["mk","389"],["mp","1",17,["670"]],["no","47",0],["om","968"],["pk","92"],["pw","680"],["ps","970"],["pa","507"],["pg","675"],["py","595"],["pe","51"],["ph","63"],["pl","48"],["pt","351"],["pr","1",3,["787","939"]],["qa","974"],["re","262",0,null,"0"],["ro","40"],["ru","7",0,null,"8"],["rw","250"],["ws","685"],["sm","378"],["st","239"],["sa","966"],["sn","221"],["rs","381"],["sc","248"],["sl","232"],["sg","65"],["sx","1",21,["721"]],["sk","421"],["si","386"],["sb","677"],["so","252"],["za","27"],["kr","82"],["ss","211"],["es","34"],["lk","94"],["bl","590",1],["sh","290"],["kn","1",18,["869"]],["lc","1",19,["758"]],["mf","590",2],["pm","508"],["vc","1",20,["784"]],["sd","249"],["sr","597"],["sj","47",1,["79"]],["se","46"],["ch","41"],["sy","963"],["tw","886"],["tj","992"],["tz","255"],["th","66"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"]],["tn","216"],["tr","90"],["tm","993"],["tc","1",23,["649"]],["tv","688"],["ug","256"],["ua","380"],["ae","971"],["gb","44",0,null,"0"],["us","1",0],["uy","598"],["vi","1",24,["340"]],["uz","998"],["vu","678"],["va","39",1,["06698"]],["ve","58"],["vn","84"],["wf","681"],["eh","212",1,["5288","5289"],"0"],["ye","967"],["zm","260"],["zw","263"]],E=[];for(let o of U)E.push({name:"",iso2:o[0],dialCode:o[1],priority:o[2]||0,areaCodes:o[3]||null,nodeById:{},nationalPrefix:o[4]||null});var v=E;var z={ad:"Andorra",ae:"United Arab Emirates",af:"Afghanistan",ag:"Antigua & Barbuda",ai:"Anguilla",al:"Albania",am:"Armenia",ao:"Angola",ar:"Argentina",as:"American Samoa",at:"Austria",au:"Australia",aw:"Aruba",ax:"\xC5land Islands",az:"Azerbaijan",ba:"Bosnia & Herzegovina",bb:"Barbados",bd:"Bangladesh",be:"Belgium",bf:"Burkina Faso",bg:"Bulgaria",bh:"Bahrain",bi:"Burundi",bj:"Benin",bl:"St. Barth\xE9lemy",bm:"Bermuda",bn:"Brunei",bo:"Bolivia",bq:"Caribbean Netherlands",br:"Brazil",bs:"Bahamas",bt:"Bhutan",bw:"Botswana",by:"Belarus",bz:"Belize",ca:"Canada",cc:"Cocos (Keeling) Islands",cd:"Congo - Kinshasa",cf:"Central African Republic",cg:"Congo - Brazzaville",ch:"Switzerland",ci:"C\xF4te d\u2019Ivoire",ck:"Cook Islands",cl:"Chile",cm:"Cameroon",cn:"China",co:"Colombia",cr:"Costa Rica",cu:"Cuba",cv:"Cape Verde",cw:"Cura\xE7ao",cx:"Christmas Island",cy:"Cyprus",cz:"Czechia",de:"Germany",dj:"Djibouti",dk:"Denmark",dm:"Dominica",do:"Dominican Republic",dz:"Algeria",ec:"Ecuador",ee:"Estonia",eg:"Egypt",eh:"Western Sahara",er:"Eritrea",es:"Spain",et:"Ethiopia",fi:"Finland",fj:"Fiji",fk:"Falkland Islands",fm:"Micronesia",fo:"Faroe Islands",fr:"France",ga:"Gabon",gb:"United Kingdom",gd:"Grenada",ge:"Georgia",gf:"French Guiana",gg:"Guernsey",gh:"Ghana",gi:"Gibraltar",gl:"Greenland",gm:"Gambia",gn:"Guinea",gp:"Guadeloupe",gq:"Equatorial Guinea",gr:"Greece",gt:"Guatemala",gu:"Guam",gw:"Guinea-Bissau",gy:"Guyana",hk:"Hong Kong SAR China",hn:"Honduras",hr:"Croatia",ht:"Haiti",hu:"Hungary",id:"Indonesia",ie:"Ireland",il:"Israel",im:"Isle of Man",in:"India",io:"British Indian Ocean Territory",iq:"Iraq",ir:"Iran",is:"Iceland",it:"Italy",je:"Jersey",jm:"Jamaica",jo:"Jordan",jp:"Japan",ke:"Kenya",kg:"Kyrgyzstan",kh:"Cambodia",ki:"Kiribati",km:"Comoros",kn:"St. Kitts & Nevis",kp:"North Korea",kr:"South Korea",kw:"Kuwait",ky:"Cayman Islands",kz:"Kazakhstan",la:"Laos",lb:"Lebanon",lc:"St. Lucia",li:"Liechtenstein",lk:"Sri Lanka",lr:"Liberia",ls:"Lesotho",lt:"Lithuania",lu:"Luxembourg",lv:"Latvia",ly:"Libya",ma:"Morocco",mc:"Monaco",md:"Moldova",me:"Montenegro",mf:"St. Martin",mg:"Madagascar",mh:"Marshall Islands",mk:"North Macedonia",ml:"Mali",mm:"Myanmar (Burma)",mn:"Mongolia",mo:"Macao SAR China",mp:"Northern Mariana Islands",mq:"Martinique",mr:"Mauritania",ms:"Montserrat",mt:"Malta",mu:"Mauritius",mv:"Maldives",mw:"Malawi",mx:"Mexico",my:"Malaysia",mz:"Mozambique",na:"Namibia",nc:"New Caledonia",ne:"Niger",nf:"Norfolk Island",ng:"Nigeria",ni:"Nicaragua",nl:"Netherlands",no:"Norway",np:"Nepal",nr:"Nauru",nu:"Niue",nz:"New Zealand",om:"Oman",pa:"Panama",pe:"Peru",pf:"French Polynesia",pg:"Papua New Guinea",ph:"Philippines",pk:"Pakistan",pl:"Poland",pm:"St. Pierre & Miquelon",pr:"Puerto Rico",ps:"Palestinian Territories",pt:"Portugal",pw:"Palau",py:"Paraguay",qa:"Qatar",re:"R\xE9union",ro:"Romania",rs:"Serbia",ru:"Russia",rw:"Rwanda",sa:"Saudi Arabia",sb:"Solomon Islands",sc:"Seychelles",sd:"Sudan",se:"Sweden",sg:"Singapore",sh:"St. Helena",si:"Slovenia",sj:"Svalbard & Jan Mayen",sk:"Slovakia",sl:"Sierra Leone",sm:"San Marino",sn:"Senegal",so:"Somalia",sr:"Suriname",ss:"South Sudan",st:"S\xE3o Tom\xE9 & Pr\xEDncipe",sv:"El Salvador",sx:"Sint Maarten",sy:"Syria",sz:"Eswatini",tc:"Turks & Caicos Islands",td:"Chad",tg:"Togo",th:"Thailand",tj:"Tajikistan",tk:"Tokelau",tl:"Timor-Leste",tm:"Turkmenistan",tn:"Tunisia",to:"Tonga",tr:"Turkey",tt:"Trinidad & Tobago",tv:"Tuvalu",tw:"Taiwan",tz:"Tanzania",ua:"Ukraine",ug:"Uganda",us:"United States",uy:"Uruguay",uz:"Uzbekistan",va:"Vatican City",vc:"St. Vincent & Grenadines",ve:"Venezuela",vg:"British Virgin Islands",vi:"U.S. Virgin Islands",vn:"Vietnam",vu:"Vanuatu",wf:"Wallis & Futuna",ws:"Samoa",ye:"Yemen",yt:"Mayotte",za:"South Africa",zm:"Zambia",zw:"Zimbabwe"},D=z;var j={selectedCountryAriaLabel:"Change country, selected ${country}",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",zeroSearchResults:"No results found",oneSearchResult:"1 result found",multipleSearchResults:"${count} results found",ac:"Ascension Island",xk:"Kosovo"},S=j;var $={...D,...S},T=$;for(let o of v)o.name=T[o.iso2];var K=0,N=o=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(o).matches,V=()=>{if(typeof navigator<"u"&&typeof window<"u"){let o=/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)");return o||t||i&&e}return!1},k={allowDropdown:!0,autoPlaceholder:"polite",containerClass:"",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",showFlags:!0,separateDialCode:!1,strictMode:!1,useFullscreenPopup:V(),validationNumberTypes:["MOBILE"]},W=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],I=o=>o.replace(/\D/g,""),A=(o="")=>o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),M=o=>{let t=I(o);if(t.charAt(0)==="1"){let e=t.substring(1,4);return W.includes(e)}return!1},G=(o,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let s=0;s<t.length;s++){if(/[+0-9]/.test(t[s])&&n++,n===o&&!i)return s+1;if(i&&n===o+1)return s}return t.length},c=(o,t,e)=>{let i=document.createElement(o);return t&&Object.entries(t).forEach(([n,s])=>i.setAttribute(n,s)),e&&e.appendChild(i),i},b=(o,...t)=>{let{instances:e}=r;Object.values(e).forEach(i=>i[o](...t))},w=class o{static _buildClassNames(t){return Object.keys(t).filter(e=>!!t[e]).join(" ")}constructor(t,e={}){this.id=K++,this.a=t,this.c=null,this.d=Object.assign({},k,e),this.e=!!t.getAttribute("placeholder")}_init(){this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!1),this.d.onlyCountries.length===1&&(this.d.initialCountry=this.d.onlyCountries[0]),this.d.separateDialCode&&(this.d.nationalMode=!1),this.d.allowDropdown&&!this.d.showFlags&&!this.d.separateDialCode&&(this.d.nationalMode=!1),this.d.useFullscreenPopup&&!this.d.dropdownContainer&&(this.d.dropdownContainer=document.body),this.isAndroid=typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1,this.isRTL=!!this.a.closest("[dir=rtl]"),this.a.dir="ltr";let t=this.d.allowDropdown||this.d.separateDialCode;this.showSelectedCountryOnLeft=this.isRTL?!t:t,this.d.separateDialCode&&(this.isRTL?this.originalPaddingRight=this.a.style.paddingRight:this.originalPaddingLeft=this.a.style.paddingLeft),this.d.i18n={...T,...this.d.i18n};let e=new Promise((n,s)=>{this.h=n,this.i=s}),i=new Promise((n,s)=>{this.i0=n,this.i1=s});this.promise=Promise.all([e,i]),this.s={},this._b(),this._f(),this._h(),this._i(),this._i3()}_b(){this._d(),this._d2(),this._d0(),this._sortCountries(),this.countryByIso2=new Map(this.p.map(t=>[t.iso2,t])),this._cacheSearchTokens()}_cacheSearchTokens(){for(let t of this.p)t.normalisedName=A(t.name),t.initials=t.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map(e=>e[0]).join("").toLowerCase(),t.dialCodePlus=`+${t.dialCode}`}_sortCountries(){this.d.countryOrder&&(this.d.countryOrder=this.d.countryOrder.map(t=>t.toLowerCase())),this.p.sort((t,e)=>{let{countryOrder:i}=this.d;if(i){let n=i.indexOf(t.iso2),s=i.indexOf(e.iso2),a=n>-1,d=s>-1;if(a||d)return a&&d?n-s:a?-1:1}return t.name.localeCompare(e.name)})}_c(t,e,i){e.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=e.length),this.q.hasOwnProperty(e)||(this.q[e]=[]);let n=this.q[e];if(n.includes(t))return;let s=i!==void 0?i:n.length;n[s]=t}_d(){let{onlyCountries:t,excludeCountries:e}=this.d;if(t.length){let i=t.map(n=>n.toLowerCase());this.p=v.filter(n=>i.includes(n.iso2))}else if(e.length){let i=e.map(n=>n.toLowerCase());this.p=v.filter(n=>!i.includes(n.iso2))}else this.p=v}_d0(){for(let t of this.p){let e=t.iso2.toLowerCase();this.d.i18n.hasOwnProperty(e)&&(t.name=this.d.i18n[e])}}_d2(){this.dialCodes=new Set,this.dialCodeMaxLen=0,this.q={};for(let t of this.p)this.dialCodes.has(t.dialCode)||this.dialCodes.add(t.dialCode),this._c(t.iso2,t.dialCode,t.priority);for(let t of this.p)if(t.areaCodes){let e=this.q[t.dialCode][0];for(let i of t.areaCodes){for(let n=1;n<i.length;n++){let s=i.substring(0,n),a=t.dialCode+s;this._c(e,a),this._c(t.iso2,a)}this._c(t.iso2,t.dialCode+i)}}}_f(){this.a.classList.add("iti__tel-input"),!this.a.hasAttribute("autocomplete")&&!(this.a.form&&this.a.form.hasAttribute("autocomplete"))&&this.a.setAttribute("autocomplete","off");let{allowDropdown:t,separateDialCode:e,showFlags:i,containerClass:n,hiddenInput:s,dropdownContainer:a,fixDropdownWidth:d,useFullscreenPopup:l,countrySearch:p,i18n:m}=this.d,y=o._buildClassNames({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":i,"iti--inline-dropdown":!l,[n]:!!n}),C=c("div",{class:y});if(this.a.parentNode?.insertBefore(C,this.a),t||i||e){this.k=c("div",{class:"iti__country-container"},C),this.showSelectedCountryOnLeft?this.k.style.left="0px":this.k.style.right="0px",t?(this.selectedCountry=c("button",{type:"button",class:"iti__selected-country","aria-expanded":"false","aria-label":this.d.i18n.noCountrySelected,"aria-haspopup":"dialog","aria-controls":`iti-${this.id}__dropdown-content`},this.k),this.a.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=c("div",{class:"iti__selected-country"},this.k);let u=c("div",{class:"iti__selected-country-primary"},this.selectedCountry);if(this.l=c("div",{class:"iti__flag"},u),t&&(this.u=c("div",{class:"iti__arrow","aria-hidden":"true"},u)),e&&(this.t=c("div",{class:"iti__selected-dial-code","aria-hidden":"true",dir:"ltr"},this.selectedCountry)),t){let h=d?"":"iti--flexible-dropdown-width";if(this.dropdownContent=c("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content iti__hide ${h}`,role:"dialog","aria-modal":"true"}),p){let g=c("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=c("span",{class:"iti__search-icon","aria-hidden":"true"},g),this.searchIcon.innerHTML=`
|
|
16
|
+
var factoryOutput=(()=>{var L=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var O=(o,t)=>{for(var e in t)L(o,e,{get:t[e],enumerable:!0})},B=(o,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of H(t))!R.call(o,n)&&n!==e&&L(o,n,{get:()=>t[n],enumerable:!(i=x(t,n))||i.enumerable});return o};var F=o=>B(L({},"__esModule",{value:!0}),o);var J={};O(J,{Iti:()=>w,default:()=>Y});var U=[["af","93"],["ax","358",1],["al","355"],["dz","213"],["as","1",5,["684"]],["ad","376"],["ao","244"],["ai","1",6,["264"]],["ag","1",7,["268"]],["ar","54"],["am","374"],["aw","297"],["ac","247"],["au","61",0,null,"0"],["at","43"],["az","994"],["bs","1",8,["242"]],["bh","973"],["bd","880"],["bb","1",9,["246"]],["by","375"],["be","32"],["bz","501"],["bj","229"],["bm","1",10,["441"]],["bt","975"],["bo","591"],["ba","387"],["bw","267"],["br","55"],["io","246"],["vg","1",11,["284"]],["bn","673"],["bg","359"],["bf","226"],["bi","257"],["kh","855"],["cm","237"],["ca","1",1,["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"]],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"]],["cf","236"],["td","235"],["cl","56"],["cn","86"],["cx","61",2,["89164"],"0"],["cc","61",1,["89162"],"0"],["co","57"],["km","269"],["cg","242"],["cd","243"],["ck","682"],["cr","506"],["ci","225"],["hr","385"],["cu","53"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"]],["do","1",2,["809","829","849"]],["ec","593"],["eg","20"],["sv","503"],["gq","240"],["er","291"],["ee","372"],["sz","268"],["et","251"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0],["fr","33"],["gf","594"],["pf","689"],["ga","241"],["gm","220"],["ge","995"],["de","49"],["gh","233"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"]],["gp","590",0],["gu","1",15,["671"]],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36"],["is","354"],["in","91"],["id","62"],["ir","98"],["iq","964"],["ie","353"],["im","44",2,["1624","74576","7524","7924","7624"],"0"],["il","972"],["it","39",0],["jm","1",4,["876","658"]],["jp","81"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962"],["kz","7",1,["33","7"],"8"],["ke","254"],["ki","686"],["xk","383"],["kw","965"],["kg","996"],["la","856"],["lv","371"],["lb","961"],["ls","266"],["lr","231"],["ly","218"],["li","423"],["lt","370"],["lu","352"],["mo","853"],["mg","261"],["mw","265"],["my","60"],["mv","960"],["ml","223"],["mt","356"],["mh","692"],["mq","596"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373"],["mc","377"],["mn","976"],["me","382"],["ms","1",16,["664"]],["ma","212",0,null,"0"],["mz","258"],["mm","95"],["na","264"],["nr","674"],["np","977"],["nl","31"],["nc","687"],["nz","64"],["ni","505"],["ne","227"],["ng","234"],["nu","683"],["nf","672"],["kp","850"],["mk","389"],["mp","1",17,["670"]],["no","47",0],["om","968"],["pk","92"],["pw","680"],["ps","970"],["pa","507"],["pg","675"],["py","595"],["pe","51"],["ph","63"],["pl","48"],["pt","351"],["pr","1",3,["787","939"]],["qa","974"],["re","262",0,null,"0"],["ro","40"],["ru","7",0,null,"8"],["rw","250"],["ws","685"],["sm","378"],["st","239"],["sa","966"],["sn","221"],["rs","381"],["sc","248"],["sl","232"],["sg","65"],["sx","1",21,["721"]],["sk","421"],["si","386"],["sb","677"],["so","252"],["za","27"],["kr","82"],["ss","211"],["es","34"],["lk","94"],["bl","590",1],["sh","290"],["kn","1",18,["869"]],["lc","1",19,["758"]],["mf","590",2],["pm","508"],["vc","1",20,["784"]],["sd","249"],["sr","597"],["sj","47",1,["79"]],["se","46"],["ch","41"],["sy","963"],["tw","886"],["tj","992"],["tz","255"],["th","66"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"]],["tn","216"],["tr","90"],["tm","993"],["tc","1",23,["649"]],["tv","688"],["ug","256"],["ua","380"],["ae","971"],["gb","44",0,null,"0"],["us","1",0],["uy","598"],["vi","1",24,["340"]],["uz","998"],["vu","678"],["va","39",1,["06698"]],["ve","58"],["vn","84"],["wf","681"],["eh","212",1,["5288","5289"],"0"],["ye","967"],["zm","260"],["zw","263"]],E=[];for(let o of U)E.push({name:"",iso2:o[0],dialCode:o[1],priority:o[2]||0,areaCodes:o[3]||null,nodeById:{},nationalPrefix:o[4]||null});var v=E;var z={ad:"Andorra",ae:"United Arab Emirates",af:"Afghanistan",ag:"Antigua & Barbuda",ai:"Anguilla",al:"Albania",am:"Armenia",ao:"Angola",ar:"Argentina",as:"American Samoa",at:"Austria",au:"Australia",aw:"Aruba",ax:"\xC5land Islands",az:"Azerbaijan",ba:"Bosnia & Herzegovina",bb:"Barbados",bd:"Bangladesh",be:"Belgium",bf:"Burkina Faso",bg:"Bulgaria",bh:"Bahrain",bi:"Burundi",bj:"Benin",bl:"St. Barth\xE9lemy",bm:"Bermuda",bn:"Brunei",bo:"Bolivia",bq:"Caribbean Netherlands",br:"Brazil",bs:"Bahamas",bt:"Bhutan",bw:"Botswana",by:"Belarus",bz:"Belize",ca:"Canada",cc:"Cocos (Keeling) Islands",cd:"Congo - Kinshasa",cf:"Central African Republic",cg:"Congo - Brazzaville",ch:"Switzerland",ci:"C\xF4te d\u2019Ivoire",ck:"Cook Islands",cl:"Chile",cm:"Cameroon",cn:"China",co:"Colombia",cr:"Costa Rica",cu:"Cuba",cv:"Cape Verde",cw:"Cura\xE7ao",cx:"Christmas Island",cy:"Cyprus",cz:"Czechia",de:"Germany",dj:"Djibouti",dk:"Denmark",dm:"Dominica",do:"Dominican Republic",dz:"Algeria",ec:"Ecuador",ee:"Estonia",eg:"Egypt",eh:"Western Sahara",er:"Eritrea",es:"Spain",et:"Ethiopia",fi:"Finland",fj:"Fiji",fk:"Falkland Islands",fm:"Micronesia",fo:"Faroe Islands",fr:"France",ga:"Gabon",gb:"United Kingdom",gd:"Grenada",ge:"Georgia",gf:"French Guiana",gg:"Guernsey",gh:"Ghana",gi:"Gibraltar",gl:"Greenland",gm:"Gambia",gn:"Guinea",gp:"Guadeloupe",gq:"Equatorial Guinea",gr:"Greece",gt:"Guatemala",gu:"Guam",gw:"Guinea-Bissau",gy:"Guyana",hk:"Hong Kong SAR China",hn:"Honduras",hr:"Croatia",ht:"Haiti",hu:"Hungary",id:"Indonesia",ie:"Ireland",il:"Israel",im:"Isle of Man",in:"India",io:"British Indian Ocean Territory",iq:"Iraq",ir:"Iran",is:"Iceland",it:"Italy",je:"Jersey",jm:"Jamaica",jo:"Jordan",jp:"Japan",ke:"Kenya",kg:"Kyrgyzstan",kh:"Cambodia",ki:"Kiribati",km:"Comoros",kn:"St. Kitts & Nevis",kp:"North Korea",kr:"South Korea",kw:"Kuwait",ky:"Cayman Islands",kz:"Kazakhstan",la:"Laos",lb:"Lebanon",lc:"St. Lucia",li:"Liechtenstein",lk:"Sri Lanka",lr:"Liberia",ls:"Lesotho",lt:"Lithuania",lu:"Luxembourg",lv:"Latvia",ly:"Libya",ma:"Morocco",mc:"Monaco",md:"Moldova",me:"Montenegro",mf:"St. Martin",mg:"Madagascar",mh:"Marshall Islands",mk:"North Macedonia",ml:"Mali",mm:"Myanmar (Burma)",mn:"Mongolia",mo:"Macao SAR China",mp:"Northern Mariana Islands",mq:"Martinique",mr:"Mauritania",ms:"Montserrat",mt:"Malta",mu:"Mauritius",mv:"Maldives",mw:"Malawi",mx:"Mexico",my:"Malaysia",mz:"Mozambique",na:"Namibia",nc:"New Caledonia",ne:"Niger",nf:"Norfolk Island",ng:"Nigeria",ni:"Nicaragua",nl:"Netherlands",no:"Norway",np:"Nepal",nr:"Nauru",nu:"Niue",nz:"New Zealand",om:"Oman",pa:"Panama",pe:"Peru",pf:"French Polynesia",pg:"Papua New Guinea",ph:"Philippines",pk:"Pakistan",pl:"Poland",pm:"St. Pierre & Miquelon",pr:"Puerto Rico",ps:"Palestinian Territories",pt:"Portugal",pw:"Palau",py:"Paraguay",qa:"Qatar",re:"R\xE9union",ro:"Romania",rs:"Serbia",ru:"Russia",rw:"Rwanda",sa:"Saudi Arabia",sb:"Solomon Islands",sc:"Seychelles",sd:"Sudan",se:"Sweden",sg:"Singapore",sh:"St. Helena",si:"Slovenia",sj:"Svalbard & Jan Mayen",sk:"Slovakia",sl:"Sierra Leone",sm:"San Marino",sn:"Senegal",so:"Somalia",sr:"Suriname",ss:"South Sudan",st:"S\xE3o Tom\xE9 & Pr\xEDncipe",sv:"El Salvador",sx:"Sint Maarten",sy:"Syria",sz:"Eswatini",tc:"Turks & Caicos Islands",td:"Chad",tg:"Togo",th:"Thailand",tj:"Tajikistan",tk:"Tokelau",tl:"Timor-Leste",tm:"Turkmenistan",tn:"Tunisia",to:"Tonga",tr:"Turkey",tt:"Trinidad & Tobago",tv:"Tuvalu",tw:"Taiwan",tz:"Tanzania",ua:"Ukraine",ug:"Uganda",us:"United States",uy:"Uruguay",uz:"Uzbekistan",va:"Vatican City",vc:"St. Vincent & Grenadines",ve:"Venezuela",vg:"British Virgin Islands",vi:"U.S. Virgin Islands",vn:"Vietnam",vu:"Vanuatu",wf:"Wallis & Futuna",ws:"Samoa",ye:"Yemen",yt:"Mayotte",za:"South Africa",zm:"Zambia",zw:"Zimbabwe"},D=z;var j={selectedCountryAriaLabel:"Change country, selected ${country}",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",zeroSearchResults:"No results found",oneSearchResult:"1 result found",multipleSearchResults:"${count} results found",ac:"Ascension Island",xk:"Kosovo"},S=j;var $={...D,...S},T=$;for(let o of v)o.name=T[o.iso2];var K=0,N=o=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(o).matches,V=()=>{if(typeof navigator<"u"&&typeof window<"u"){let o=/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)");return o||t||i&&e}return!1},k={allowDropdown:!0,autoPlaceholder:"polite",containerClass:"",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",showFlags:!0,separateDialCode:!1,strictMode:!1,useFullscreenPopup:V(),validationNumberTypes:["MOBILE"]},W=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],I=o=>o.replace(/\D/g,""),A=(o="")=>o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),M=o=>{let t=I(o);if(t.charAt(0)==="1"){let e=t.substring(1,4);return W.includes(e)}return!1},G=(o,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let s=0;s<t.length;s++){if(/[+0-9]/.test(t[s])&&n++,n===o&&!i)return s+1;if(i&&n===o+1)return s}return t.length},c=(o,t,e)=>{let i=document.createElement(o);return t&&Object.entries(t).forEach(([n,s])=>i.setAttribute(n,s)),e&&e.appendChild(i),i},b=(o,...t)=>{let{instances:e}=a;Object.values(e).forEach(i=>i[o](...t))},w=class o{static _buildClassNames(t){return Object.keys(t).filter(e=>!!t[e]).join(" ")}constructor(t,e={}){this.id=K++,this.a=t,this.c=null,this.d=Object.assign({},k,e),this.e=!!t.getAttribute("placeholder")}_init(){this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!1),this.d.onlyCountries.length===1&&(this.d.initialCountry=this.d.onlyCountries[0]),this.d.separateDialCode&&(this.d.nationalMode=!1),this.d.allowDropdown&&!this.d.showFlags&&!this.d.separateDialCode&&(this.d.nationalMode=!1),this.d.useFullscreenPopup&&!this.d.dropdownContainer&&(this.d.dropdownContainer=document.body),this.isAndroid=typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1,this.isRTL=!!this.a.closest("[dir=rtl]"),this.a.dir="ltr";let t=this.d.allowDropdown||this.d.separateDialCode;this.showSelectedCountryOnLeft=this.isRTL?!t:t,this.d.separateDialCode&&(this.isRTL?this.originalPaddingRight=this.a.style.paddingRight:this.originalPaddingLeft=this.a.style.paddingLeft),this.d.i18n={...T,...this.d.i18n};let e=new Promise((n,s)=>{this.h=n,this.i=s}),i=new Promise((n,s)=>{this.i0=n,this.i1=s});this.promise=Promise.all([e,i]),this.s={},this._b(),this._f(),this._h(),this._i(),this._i3()}_b(){this._d(),this._d2(),this._d0(),this._sortCountries(),this.countryByIso2=new Map(this.p.map(t=>[t.iso2,t])),this._cacheSearchTokens()}_cacheSearchTokens(){for(let t of this.p)t.normalisedName=A(t.name),t.initials=t.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map(e=>e[0]).join("").toLowerCase(),t.dialCodePlus=`+${t.dialCode}`}_sortCountries(){this.d.countryOrder&&(this.d.countryOrder=this.d.countryOrder.map(t=>t.toLowerCase())),this.p.sort((t,e)=>{let{countryOrder:i}=this.d;if(i){let n=i.indexOf(t.iso2),s=i.indexOf(e.iso2),l=n>-1,d=s>-1;if(l||d)return l&&d?n-s:l?-1:1}return t.name.localeCompare(e.name)})}_c(t,e,i){e.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=e.length),this.q.hasOwnProperty(e)||(this.q[e]=[]);let n=this.q[e];if(n.includes(t))return;let s=i!==void 0?i:n.length;n[s]=t}_d(){let{onlyCountries:t,excludeCountries:e}=this.d;if(t.length){let i=t.map(n=>n.toLowerCase());this.p=v.filter(n=>i.includes(n.iso2))}else if(e.length){let i=e.map(n=>n.toLowerCase());this.p=v.filter(n=>!i.includes(n.iso2))}else this.p=v}_d0(){for(let t of this.p){let e=t.iso2.toLowerCase();this.d.i18n.hasOwnProperty(e)&&(t.name=this.d.i18n[e])}}_d2(){this.dialCodes=new Set,this.dialCodeMaxLen=0,this.q={};for(let t of this.p)this.dialCodes.has(t.dialCode)||this.dialCodes.add(t.dialCode),this._c(t.iso2,t.dialCode,t.priority);for(let t of this.p)if(t.areaCodes){let e=this.q[t.dialCode][0];for(let i of t.areaCodes){for(let n=1;n<i.length;n++){let s=i.substring(0,n),l=t.dialCode+s;this._c(e,l),this._c(t.iso2,l)}this._c(t.iso2,t.dialCode+i)}}}_f(){this.a.classList.add("iti__tel-input"),!this.a.hasAttribute("autocomplete")&&!(this.a.form&&this.a.form.hasAttribute("autocomplete"))&&this.a.setAttribute("autocomplete","off");let{allowDropdown:t,separateDialCode:e,showFlags:i,containerClass:n,hiddenInput:s,dropdownContainer:l,fixDropdownWidth:d,useFullscreenPopup:r,countrySearch:p,i18n:m}=this.d,C=o._buildClassNames({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":i,"iti--inline-dropdown":!r,[n]:!!n}),g=c("div",{class:C});if(this.a.parentNode?.insertBefore(g,this.a),t||i||e){this.k=c("div",{class:"iti__country-container"},g),this.showSelectedCountryOnLeft?this.k.style.left="0px":this.k.style.right="0px",t?(this.selectedCountry=c("button",{type:"button",class:"iti__selected-country","aria-expanded":"false","aria-label":this.d.i18n.noCountrySelected,"aria-haspopup":"dialog","aria-controls":`iti-${this.id}__dropdown-content`},this.k),this.a.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=c("div",{class:"iti__selected-country"},this.k);let u=c("div",{class:"iti__selected-country-primary"},this.selectedCountry);if(this.l=c("div",{class:"iti__flag"},u),t&&(this.u=c("div",{class:"iti__arrow","aria-hidden":"true"},u)),e&&(this.t=c("div",{class:"iti__selected-dial-code",dir:"ltr"},this.selectedCountry)),t){let h=d?"":"iti--flexible-dropdown-width";if(this.dropdownContent=c("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content iti__hide ${h}`,role:"dialog","aria-modal":"true"}),p){let y=c("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=c("span",{class:"iti__search-icon","aria-hidden":"true"},y),this.searchIcon.innerHTML=`
|
|
17
17
|
<svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" aria-hidden="true">
|
|
18
18
|
<circle cx="11" cy="11" r="7" />
|
|
19
19
|
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
20
|
-
</svg>`,this.searchInput=c("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:m.searchPlaceholder,role:"combobox","aria-expanded":"true","aria-label":m.searchPlaceholder,"aria-controls":`iti-${this.id}__country-listbox`,"aria-autocomplete":"list",autocomplete:"off"},
|
|
20
|
+
</svg>`,this.searchInput=c("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:m.searchPlaceholder,role:"combobox","aria-expanded":"true","aria-label":m.searchPlaceholder,"aria-controls":`iti-${this.id}__country-listbox`,"aria-autocomplete":"list",autocomplete:"off"},y),this.searchClearButton=c("button",{type:"button",class:"iti__search-clear iti__hide","aria-label":m.clearSearchAriaLabel,tabindex:"-1"},y);let f=`iti-${this.id}-clear-mask`;this.searchClearButton.innerHTML=`
|
|
21
21
|
<svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true" focusable="false">
|
|
22
22
|
<mask id="${f}" maskUnits="userSpaceOnUse">
|
|
23
23
|
<rect width="16" height="16" fill="white" />
|
|
24
24
|
<path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />
|
|
25
25
|
</mask>
|
|
26
26
|
<circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${f})" />
|
|
27
|
-
</svg>`,this.searchResultsA11yText=c("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=c("div",{class:"iti__no-results iti__hide","aria-hidden":"true"},this.dropdownContent),this.searchNoResults.textContent=m.zeroSearchResults}if(this.countryList=c("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox","aria-label":m.countryListAriaLabel},this.dropdownContent),this._g(),p&&this._p4(),a){let g=o._buildClassNames({iti:!0,"iti--container":!0,"iti--fullscreen-popup":l,"iti--inline-dropdown":!l,[n]:!!n});this.dropdown=c("div",{class:g}),this.dropdown.appendChild(this.dropdownContent)}else this.k.appendChild(this.dropdownContent)}}if(C.appendChild(this.a),this._updateInputPadding(),s){let u=this.a.getAttribute("name")||"",h=s(u);if(h.phone){let g=this.a.form?.querySelector(`input[name="${h.phone}"]`);g?this.hiddenInput=g:(this.hiddenInput=c("input",{type:"hidden",name:h.phone}),C.appendChild(this.hiddenInput))}if(h.country){let g=this.a.form?.querySelector(`input[name="${h.country}"]`);g?this.hiddenInputCountry=g:(this.hiddenInputCountry=c("input",{type:"hidden",name:h.country}),C.appendChild(this.hiddenInputCountry))}}}_g(){for(let t=0;t<this.p.length;t++){let e=this.p[t],i=t===0?"iti__highlight":"",n=c("li",{id:`iti-${this.id}__item-${e.iso2}`,class:`iti__country ${i}`,tabindex:"-1",role:"option","data-dial-code":e.dialCode,"data-country-code":e.iso2,"aria-selected":"false"},this.countryList);e.nodeById[this.id]=n;let s="";this.d.showFlags&&(s+=`<div class='iti__flag iti__${e.iso2}'></div>`),s+=`<span class='iti__country-name'>${e.name}</span>`,s+=`<span class='iti__dial-code' dir='ltr'>+${e.dialCode}</span>`,n.insertAdjacentHTML("beforeend",s)}}_h(t=!1){let e=this.a.getAttribute("value"),i=this.a.value,s=e&&e.charAt(0)==="+"&&(!i||i.charAt(0)!=="+")?e:i,a=this._5(s),d=M(s),{initialCountry:l,geoIpLookup:p}=this.d,m=l==="auto"&&p;if(a&&!d)this._v(s);else if(!m||t){let y=l?l.toLowerCase():"";y&&this._y(y,!0)?this._z(y):a&&d?this._z("us"):this._z()}s&&this._u(s)}_i(){this._j(),this.d.allowDropdown&&this._i2(),(this.hiddenInput||this.hiddenInputCountry)&&this.a.form&&this._i0()}_i0(){this._a14=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.hiddenInputCountry&&(this.hiddenInputCountry.value=this.getSelectedCountryData().iso2||"")},this.a.form?.addEventListener("submit",this._a14)}_i2(){this._a9=e=>{this.dropdownContent.classList.contains("iti__hide")?this.a.focus():e.preventDefault()};let t=this.a.closest("label");t&&t.addEventListener("click",this._a9),this._a10=()=>{this.dropdownContent.classList.contains("iti__hide")&&!this.a.disabled&&!this.a.readOnly&&this._n()},this.selectedCountry.addEventListener("click",this._a10),this._a11=e=>{this.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this._n()),e.key==="Tab"&&this._2()},this.k.addEventListener("keydown",this._a11)}_i3(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.d;t&&!r.utils?(this._handlePageLoad=()=>{window.removeEventListener("load",this._handlePageLoad),r.attachUtils(t)?.catch(()=>{})},r.documentReady()?this._handlePageLoad():window.addEventListener("load",this._handlePageLoad)):this.i0(),e==="auto"&&i&&!this.s.iso2?this._i4():this.h()}_i4(){r.autoCountry?this.handleAutoCountry():r.startedLoadingAutoCountry||(r.startedLoadingAutoCountry=!0,typeof this.d.geoIpLookup=="function"&&this.d.geoIpLookup((t="")=>{let e=t.toLowerCase();e&&this._y(e,!0)?(r.autoCountry=e,setTimeout(()=>b("handleAutoCountry"))):(this._h(!0),b("rejectAutoCountryPromise"))},()=>{this._h(!0),b("rejectAutoCountryPromise")}))}_nWithPlus(){this._n(),this.searchInput.value="+",this._p3("",!0)}_j(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,formatOnDisplay:n,allowDropdown:s,countrySearch:a}=this.d,d=!1;/\p{L}/u.test(this.a.value)&&(d=!0),this._a12=l=>{if(this.isAndroid&&l?.data==="+"&&i&&s&&a){let C=this.a.selectionStart||0,u=this.a.value.substring(0,C-1),h=this.a.value.substring(C);this.a.value=u+h,this._nWithPlus();return}this._v(this.a.value)&&this._8();let p=l?.data&&/[^+0-9]/.test(l.data),m=l?.inputType==="insertFromPaste"&&this.a.value;p||m&&!t?d=!0:/[^+0-9]/.test(this.a.value)||(d=!1);let y=l?.detail&&l.detail.isSetNumber&&!n;if(e&&!d&&!y){let C=this.a.selectionStart||0,h=this.a.value.substring(0,C).replace(/[^+0-9]/g,"").length,g=l?.inputType==="deleteContentForward",f=this._9(),_=G(h,f,C,g);this.a.value=f,this.a.setSelectionRange(_,_)}},this.a.addEventListener("input",this._a12),(t||i)&&(this._handleKeydownEvent=l=>{if(l.key&&l.key.length===1&&!l.altKey&&!l.ctrlKey&&!l.metaKey){if(i&&s&&a&&l.key==="+"){l.preventDefault(),this._nWithPlus();return}if(t){let p=this.a.value,y=!(p.charAt(0)==="+")&&this.a.selectionStart===0&&l.key==="+",C=/^[0-9]$/.test(l.key),u=i?C:y||C,h=p.slice(0,this.a.selectionStart)+l.key+p.slice(this.a.selectionEnd),g=this._6(h),f=r.utils.getCoreNumber(g,this.s.iso2),_=this.maxCoreNumberLength&&f.length>this.maxCoreNumberLength,P=this._getNewCountryFromNumber(g)!==null;(!u||_&&!P&&!y)&&l.preventDefault()}}},this.a.addEventListener("keydown",this._handleKeydownEvent))}_j2(t){let e=parseInt(this.a.getAttribute("maxlength")||"",10);return e&&t.length>e?t.substring(0,e):t}_trigger(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.a.dispatchEvent(i)}_n(){let{fixDropdownWidth:t,countrySearch:e}=this.d;if(t&&(this.dropdownContent.style.width=`${this.a.offsetWidth}px`),this.dropdownContent.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._o(),e){let i=this.countryList.firstElementChild;i&&(this._x(i,!1),this.countryList.scrollTop=0),this.searchInput.focus()}this._p(),this.u.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_o(){if(this.d.dropdownContainer&&this.d.dropdownContainer.appendChild(this.dropdown),!this.d.useFullscreenPopup){let t=this.a.getBoundingClientRect(),e=this.a.offsetHeight;this.d.dropdownContainer&&(this.dropdown.style.top=`${t.top+e}px`,this.dropdown.style.left=`${t.left}px`,this._a4=()=>this._2(),window.addEventListener("scroll",this._a4))}}_p(){this._a0=i=>{let n=i.target?.closest(".iti__country");n&&this._x(n,!1)},this.countryList.addEventListener("mouseover",this._a0),this._a1=i=>{let n=i.target?.closest(".iti__country");n&&this._1(n)},this.countryList.addEventListener("click",this._a1),this._a2=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._2()},setTimeout(()=>{document.documentElement.addEventListener("click",this._a2)},0);let t="",e=null;if(this._a3=i=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(i.key)&&(i.preventDefault(),i.stopPropagation(),i.key==="ArrowUp"||i.key==="ArrowDown"?this._q(i.key):i.key==="Enter"?this._r():i.key==="Escape"&&this._2()),!this.d.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(i.key)&&(i.stopPropagation(),e&&clearTimeout(e),t+=i.key.toLowerCase(),this._searchForCountry(t),e=setTimeout(()=>{t=""},1e3))},document.addEventListener("keydown",this._a3),this.d.countrySearch){let i=()=>{let s=this.searchInput.value.trim();s?this._p3(s):this._p3("",!0),this.searchInput.value?this.searchClearButton.classList.remove("iti__hide"):this.searchClearButton.classList.add("iti__hide")},n=null;this._a7=()=>{n&&clearTimeout(n),n=setTimeout(()=>{i(),n=null},100)},this.searchInput.addEventListener("input",this._a7),this._handleSearchClear=()=>{this.searchInput.value="",this.searchInput.focus(),i()},this.searchClearButton.addEventListener("click",this._handleSearchClear)}}_searchForCountry(t){for(let e of this.p)if(e.name.substring(0,t.length).toLowerCase()===t){let n=e.nodeById[this.id];this._x(n,!1),this._3(n);break}}_p3(t,e=!1){let i=!0;this.countryList.innerHTML="";let n=A(t),s=n.length,a=[],d=[],l=[],p=[],m=[],y=[];for(let u of this.p)e||s===0?l.push(u):u.iso2===n?a.push(u):u.normalisedName.startsWith(n)?d.push(u):u.normalisedName.includes(n)?l.push(u):n===u.dialCode||n===u.dialCodePlus?p.push(u):u.dialCodePlus.includes(n)?m.push(u):u.initials.includes(n)&&y.push(u);let C=[...a.sort((u,h)=>u.priority-h.priority),...d.sort((u,h)=>u.priority-h.priority),...l.sort((u,h)=>u.priority-h.priority),...p.sort((u,h)=>u.priority-h.priority),...m.sort((u,h)=>u.priority-h.priority),...y.sort((u,h)=>u.priority-h.priority)];for(let u of C){let h=u.nodeById[this.id];h&&(this.countryList.appendChild(h),i&&(this._x(h,!1),i=!1))}i?(this._x(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove("iti__hide")):this.searchNoResults&&this.searchNoResults.classList.add("iti__hide"),this.countryList.scrollTop=0,this._p4()}_p4(){let{i18n:t}=this.d,e=this.countryList.childElementCount,i;"searchResultsText"in t?i=t.searchResultsText(e):e===0?i=t.zeroSearchResults:e===1?i=t.oneSearchResult:i=t.multipleSearchResults.replace("${count}",e.toString()),this.searchResultsA11yText.textContent=i}_q(t){let e=t==="ArrowUp"?this.c?.previousElementSibling:this.c?.nextElementSibling;!e&&this.countryList.childElementCount>1&&(e=t==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild),e&&(this._3(e),this._x(e,!1))}_r(){this.c&&this._1(this.c)}_u(t){let e=t;if(this.d.formatOnDisplay&&r.utils&&this.s){let i=this.d.nationalMode||e.charAt(0)!=="+"&&!this.d.separateDialCode,{NATIONAL:n,INTERNATIONAL:s}=r.utils.numberFormat,a=i?n:s;e=r.utils.formatNumber(e,this.s.iso2,a)}e=this._7(e),this.a.value=e}_v(t){let e=this._getNewCountryFromNumber(t);return e!==null?this._z(e):!1}_ensureHasDialCode(t){let{dialCode:e,nationalPrefix:i}=this.s;if(t.charAt(0)==="+"||!e)return t;let a=i&&t.charAt(0)===i&&!this.d.separateDialCode?t.substring(1):t;return`+${e}${a}`}_getNewCountryFromNumber(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.s.iso2,s=this.s.dialCode;i=this._ensureHasDialCode(i);let a=this._5(i,!0),d=I(i);if(a){let l=I(a),p=this.q[l];if(!n&&this.j&&p.includes(this.j))return this.j;let m=this.s.areaCodes&&d.length>l.length,y=n&&p.includes(n)&&!m;if(!(s==="1"&&M(d))&&!y){for(let u of p)if(u)return u}}else{if(i.charAt(0)==="+"&&d.length)return"";if((!i||i==="+")&&!this.s.iso2)return this.j}return null}_x(t,e){let i=this.c;if(i&&(i.classList.remove("iti__highlight"),i.setAttribute("aria-selected","false")),this.c=t,this.c&&(this.c.classList.add("iti__highlight"),this.c.setAttribute("aria-selected","true"),this.d.countrySearch)){let n=this.c.getAttribute("id")||"";this.searchInput.setAttribute("aria-activedescendant",n)}e&&this.c.focus()}_y(t,e){let i=this.countryByIso2.get(t);if(i)return i;if(e)return null;throw new Error(`No country data for '${t}'`)}_z(t){let{separateDialCode:e,showFlags:i,i18n:n}=this.d,s=this.s.iso2?this.s:{};if(this.s=t?this._y(t,!1)||{}:{},this.s.iso2&&(this.j=this.s.iso2),this.l){let a="",d="";t&&i?(a=`iti__flag iti__${t}`,d=n.selectedCountryAriaLabel.replace("${country}",this.s.name)):(a="iti__flag iti__globe",d=n.noCountrySelected),this.l.className=a,this.selectedCountry.setAttribute("aria-label",d)}if(this._z3(t,e),e){let a=this.s.dialCode?`+${this.s.dialCode}`:"";this.t.innerHTML=a,this._updateInputPadding()}return this._0(),this._updateMaxLength(),s.iso2!==t}_updateInputPadding(){if(this.selectedCountry){let e=(this.selectedCountry.offsetWidth||this._z2())+6;this.showSelectedCountryOnLeft?this.a.style.paddingLeft=`${e}px`:this.a.style.paddingRight=`${e}px`}}_updateMaxLength(){let{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.d,{iso2:n}=this.s;if(t&&r.utils)if(n){let s=r.utils.numberType[e],a=r.utils.getExampleNumber(n,!1,s,!0),d=a;for(;r.utils.isPossibleNumber(a,n,i);)d=a,a+="0";let l=r.utils.getCoreNumber(d,n);this.maxCoreNumberLength=l.length,n==="by"&&(this.maxCoreNumberLength=l.length+1)}else this.maxCoreNumberLength=null}_z3(t=null,e){if(!this.selectedCountry)return;let i;t&&!e?i=`${this.s.name}: +${this.s.dialCode}`:t?i=this.s.name:i=this.d.i18n.noCountrySelected,this.selectedCountry.setAttribute("title",i)}_z2(){if(this.a.parentNode){let t=this.a.parentNode.cloneNode(!1);t.style.visibility="hidden",document.body.appendChild(t);let e=this.k.cloneNode();t.appendChild(e);let i=this.selectedCountry.cloneNode(!0);e.appendChild(i);let n=i.offsetWidth;return document.body.removeChild(t),n}return 0}_0(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.d,s=t==="aggressive"||!this.e&&t==="polite";if(r.utils&&s){let a=r.utils.numberType[e],d=this.s.iso2?r.utils.getExampleNumber(this.s.iso2,i,a):"";d=this._7(d),typeof n=="function"&&(d=n(d,this.s)),this.a.setAttribute("placeholder",d)}}_1(t){let e=this._z(t.getAttribute("data-country-code"));this._2(),this._4(t.getAttribute("data-dial-code")),this.a.focus(),e&&this._8()}_2(){this.dropdownContent.classList.add("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","false"),this.c&&this.c.setAttribute("aria-selected","false"),this.d.countrySearch&&this.searchInput.removeAttribute("aria-activedescendant"),this.u.classList.remove("iti__arrow--up"),this.d.countrySearch&&(this.searchInput.removeEventListener("input",this._a7),this.searchClearButton.removeEventListener("click",this._handleSearchClear)),document.documentElement.removeEventListener("click",this._a2),this.countryList.removeEventListener("mouseover",this._a0),this.countryList.removeEventListener("click",this._a1),this.d.dropdownContainer&&(this.d.useFullscreenPopup||window.removeEventListener("scroll",this._a4),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._handlePageLoad&&window.removeEventListener("load",this._handlePageLoad),this._trigger("close:countrydropdown")}_3(t){let e=this.countryList,i=document.documentElement.scrollTop,n=e.offsetHeight,s=e.getBoundingClientRect().top+i,a=s+n,d=t.offsetHeight,l=t.getBoundingClientRect().top+i,p=l+d,m=l-s+e.scrollTop;if(l<s)e.scrollTop=m;else if(p>a){let y=n-d;e.scrollTop=m-y}}_4(t){let e=this.a.value,i=`+${t}`,n;if(e.charAt(0)==="+"){let s=this._5(e);s?n=e.replace(s,i):n=i,this.a.value=n}}_5(t,e){let i="";if(t.charAt(0)==="+"){let n="";for(let s=0;s<t.length;s++){let a=t.charAt(s);if(!isNaN(parseInt(a,10))){if(n+=a,e)this.q[n]&&(i=t.substring(0,s+1));else if(this.dialCodes.has(n)){i=t.substring(0,s+1);break}if(n.length===this.dialCodeMaxLen)break}}}return i}_6(t){let e=t||this.a.value.trim(),{dialCode:i}=this.s,n,s=I(e);return this.d.separateDialCode&&e.charAt(0)!=="+"&&i&&s?n=`+${i}`:n="",n+e}_7(t){let e=t;if(this.d.separateDialCode){let i=this._5(e);if(i){i=`+${this.s.dialCode}`;let n=e[i.length]===" "||e[i.length]==="-"?i.length+1:i.length;e=e.substring(n)}}return this._j2(e)}_8(){this._trigger("countrychange")}_9(){let t=this._6(),e=r.utils?r.utils.formatNumberAsYouType(t,this.s.iso2):t,{dialCode:i}=this.s;return this.d.separateDialCode&&this.a.value.charAt(0)!=="+"&&e.includes(`+${i}`)?(e.split(`+${i}`)[1]||"").trim():e}handleAutoCountry(){this.d.initialCountry==="auto"&&r.autoCountry&&(this.j=r.autoCountry,this.s.iso2||this.l.classList.contains("iti__globe")||this.setCountry(this.j),this.h())}handleUtils(){r.utils&&(this.a.value&&this._u(this.a.value),this.s.iso2&&(this._0(),this._updateMaxLength())),this.i0()}destroy(){this.a.iti=void 0;let{allowDropdown:t,separateDialCode:e}=this.d;if(t){this._2(),this.selectedCountry.removeEventListener("click",this._a10),this.k.removeEventListener("keydown",this._a11);let s=this.a.closest("label");s&&s.removeEventListener("click",this._a9)}let{form:i}=this.a;this._a14&&i&&i.removeEventListener("submit",this._a14),this.a.removeEventListener("input",this._a12),this._handleKeydownEvent&&this.a.removeEventListener("keydown",this._handleKeydownEvent),this.a.removeAttribute("data-intl-tel-input-id"),e&&(this.isRTL?this.a.style.paddingRight=this.originalPaddingRight:this.a.style.paddingLeft=this.originalPaddingLeft);let n=this.a.parentNode;n?.parentNode?.insertBefore(this.a,n),n?.parentNode?.removeChild(n),delete r.instances[this.id]}getExtension(){return r.utils?r.utils.getExtension(this._6(),this.s.iso2):""}getNumber(t){if(r.utils){let{iso2:e}=this.s;return r.utils.formatNumber(this._6(),e,t)}return""}getNumberType(){return r.utils?r.utils.getNumberType(this._6(),this.s.iso2):-99}getSelectedCountryData(){return this.s}getValidationError(){if(r.utils){let{iso2:t}=this.s;return r.utils.getValidationError(this._6(),t)}return-99}isValidNumber(){return this._validateNumber(!1)}isValidNumberPrecise(){return this._validateNumber(!0)}_utilsIsPossibleNumber(t){return r.utils?r.utils.isPossibleNumber(t,this.s.iso2,this.d.validationNumberTypes):null}_validateNumber(t){if(!this.s.iso2)return!1;let e=this._6(),i=e.search(/\p{L}/u),n=s=>t?this._utilsIsValidNumber(s):this._utilsIsPossibleNumber(s);if(i>-1){let s=e.substring(0,i),a=n(s),d=n(e);return a&&d}return n(e)}_utilsIsValidNumber(t){return r.utils?r.utils.isValidNumber(t,this.s.iso2,this.d.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase(),i=this.s.iso2;(t&&e!==i||!t&&i)&&(this._z(e),this._4(this.s.dialCode),this._8())}setNumber(t){let e=this._v(t);this._u(t),e&&this._8(),this._trigger("input",{isSetNumber:!0})}setPlaceholderNumberType(t){this.d.placeholderNumberType=t,this._0()}setDisabled(t){this.a.disabled=t,t?this.selectedCountry.setAttribute("disabled","true"):this.selectedCountry.removeAttribute("disabled")}},q=o=>{if(!r.utils&&!r.startedLoadingUtilsScript){let t;if(typeof o=="function")try{t=Promise.resolve(o())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof o}`));return r.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return r.utils=i,b("handleUtils"),!0}).catch(e=>{throw b("rejectUtilsScriptPromise",e),e})}return null},r=Object.assign((o,t)=>{let e=new w(o,t);return e._init(),o.setAttribute("data-intl-tel-input-id",e.id.toString()),r.instances[e.id]=e,o.iti=e,e},{defaults:k,documentReady:()=>document.readyState==="complete",getCountryData:()=>v,getInstance:o=>{let t=o.getAttribute("data-intl-tel-input-id");return t?r.instances[t]:null},instances:{},attachUtils:q,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.8.2"}),Y=r;return F(J);})();
|
|
27
|
+
</svg>`,this.searchResultsA11yText=c("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=c("div",{class:"iti__no-results iti__hide","aria-hidden":"true"},this.dropdownContent),this.searchNoResults.textContent=m.zeroSearchResults}if(this.countryList=c("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox","aria-label":m.countryListAriaLabel},this.dropdownContent),this._g(),p&&this._p4(),l){let y=o._buildClassNames({iti:!0,"iti--container":!0,"iti--fullscreen-popup":r,"iti--inline-dropdown":!r,[n]:!!n});this.dropdown=c("div",{class:y}),this.dropdown.appendChild(this.dropdownContent)}else this.k.appendChild(this.dropdownContent)}}if(g.appendChild(this.a),this._updateInputPadding(),s){let u=this.a.getAttribute("name")||"",h=s(u);if(h.phone){let y=this.a.form?.querySelector(`input[name="${h.phone}"]`);y?this.hiddenInput=y:(this.hiddenInput=c("input",{type:"hidden",name:h.phone}),g.appendChild(this.hiddenInput))}if(h.country){let y=this.a.form?.querySelector(`input[name="${h.country}"]`);y?this.hiddenInputCountry=y:(this.hiddenInputCountry=c("input",{type:"hidden",name:h.country}),g.appendChild(this.hiddenInputCountry))}}}_g(){for(let t=0;t<this.p.length;t++){let e=this.p[t],i=t===0?"iti__highlight":"",n=c("li",{id:`iti-${this.id}__item-${e.iso2}`,class:`iti__country ${i}`,tabindex:"-1",role:"option","data-dial-code":e.dialCode,"data-country-code":e.iso2,"aria-selected":"false"},this.countryList);e.nodeById[this.id]=n;let s="";this.d.showFlags&&(s+=`<div class='iti__flag iti__${e.iso2}'></div>`),s+=`<span class='iti__country-name'>${e.name}</span>`,s+=`<span class='iti__dial-code' dir='ltr'>+${e.dialCode}</span>`,n.insertAdjacentHTML("beforeend",s)}}_h(t=!1){let e=this.a.getAttribute("value"),i=this.a.value,s=e&&e.charAt(0)==="+"&&(!i||i.charAt(0)!=="+")?e:i,l=this._5(s),d=M(s),{initialCountry:r,geoIpLookup:p}=this.d,m=r==="auto"&&p;if(l&&!d)this._v(s);else if(!m||t){let C=r?r.toLowerCase():"";C&&this._y(C,!0)?this._z(C):l&&d?this._z("us"):this._z()}s&&this._u(s)}_i(){this._j(),this.d.allowDropdown&&this._i2(),(this.hiddenInput||this.hiddenInputCountry)&&this.a.form&&this._i0()}_i0(){this._a14=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.hiddenInputCountry&&(this.hiddenInputCountry.value=this.getSelectedCountryData().iso2||"")},this.a.form?.addEventListener("submit",this._a14)}_i2(){this._a9=e=>{this.dropdownContent.classList.contains("iti__hide")?this.a.focus():e.preventDefault()};let t=this.a.closest("label");t&&t.addEventListener("click",this._a9),this._a10=()=>{this.dropdownContent.classList.contains("iti__hide")&&!this.a.disabled&&!this.a.readOnly&&this._n()},this.selectedCountry.addEventListener("click",this._a10),this._a11=e=>{this.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this._n()),e.key==="Tab"&&this._2()},this.k.addEventListener("keydown",this._a11)}_i3(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.d;t&&!a.utils?(this._handlePageLoad=()=>{window.removeEventListener("load",this._handlePageLoad),a.attachUtils(t)?.catch(()=>{})},a.documentReady()?this._handlePageLoad():window.addEventListener("load",this._handlePageLoad)):this.i0(),e==="auto"&&i&&!this.s.iso2?this._i4():this.h()}_i4(){a.autoCountry?this.handleAutoCountry():a.startedLoadingAutoCountry||(a.startedLoadingAutoCountry=!0,typeof this.d.geoIpLookup=="function"&&this.d.geoIpLookup((t="")=>{let e=t.toLowerCase();e&&this._y(e,!0)?(a.autoCountry=e,setTimeout(()=>b("handleAutoCountry"))):(this._h(!0),b("rejectAutoCountryPromise"))},()=>{this._h(!0),b("rejectAutoCountryPromise")}))}_nWithPlus(){this._n(),this.searchInput.value="+",this._p3("",!0)}_j(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,formatOnDisplay:n,allowDropdown:s,countrySearch:l}=this.d,d=!1;/\p{L}/u.test(this.a.value)&&(d=!0),this._a12=r=>{if(this.isAndroid&&r?.data==="+"&&i&&s&&l){let g=this.a.selectionStart||0,u=this.a.value.substring(0,g-1),h=this.a.value.substring(g);this.a.value=u+h,this._nWithPlus();return}this._v(this.a.value)&&this._8();let p=r?.data&&/[^+0-9]/.test(r.data),m=r?.inputType==="insertFromPaste"&&this.a.value;p||m&&!t?d=!0:/[^+0-9]/.test(this.a.value)||(d=!1);let C=r?.detail&&r.detail.isSetNumber&&!n;if(e&&!d&&!C){let g=this.a.selectionStart||0,h=this.a.value.substring(0,g).replace(/[^+0-9]/g,"").length,y=r?.inputType==="deleteContentForward",f=this._9(),_=G(h,f,g,y);this.a.value=f,this.a.setSelectionRange(_,_)}},this.a.addEventListener("input",this._a12),(t||i)&&(this._handleKeydownEvent=r=>{if(r.key&&r.key.length===1&&!r.altKey&&!r.ctrlKey&&!r.metaKey){if(i&&s&&l&&r.key==="+"){r.preventDefault(),this._nWithPlus();return}if(t){let p=this.a.value,C=!(p.charAt(0)==="+")&&this.a.selectionStart===0&&r.key==="+",g=/^[0-9]$/.test(r.key),u=i?g:C||g,h=p.slice(0,this.a.selectionStart)+r.key+p.slice(this.a.selectionEnd),y=this._6(h),f=a.utils.getCoreNumber(y,this.s.iso2),_=this.maxCoreNumberLength&&f.length>this.maxCoreNumberLength,P=this._getNewCountryFromNumber(y)!==null;(!u||_&&!P&&!C)&&r.preventDefault()}}},this.a.addEventListener("keydown",this._handleKeydownEvent))}_j2(t){let e=parseInt(this.a.getAttribute("maxlength")||"",10);return e&&t.length>e?t.substring(0,e):t}_trigger(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.a.dispatchEvent(i)}_n(){let{fixDropdownWidth:t,countrySearch:e}=this.d;if(t&&(this.dropdownContent.style.width=`${this.a.offsetWidth}px`),this.dropdownContent.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._o(),e){let i=this.countryList.firstElementChild;i&&(this._x(i,!1),this.countryList.scrollTop=0),this.searchInput.focus()}this._p(),this.u.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_o(){if(this.d.dropdownContainer&&this.d.dropdownContainer.appendChild(this.dropdown),!this.d.useFullscreenPopup){let t=this.a.getBoundingClientRect(),e=this.a.offsetHeight;this.d.dropdownContainer&&(this.dropdown.style.top=`${t.top+e}px`,this.dropdown.style.left=`${t.left}px`,this._a4=()=>this._2(),window.addEventListener("scroll",this._a4))}}_p(){this._a0=i=>{let n=i.target?.closest(".iti__country");n&&this._x(n,!1)},this.countryList.addEventListener("mouseover",this._a0),this._a1=i=>{let n=i.target?.closest(".iti__country");n&&this._1(n)},this.countryList.addEventListener("click",this._a1),this._a2=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._2()},setTimeout(()=>{document.documentElement.addEventListener("click",this._a2)},0);let t="",e=null;if(this._a3=i=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(i.key)&&(i.preventDefault(),i.stopPropagation(),i.key==="ArrowUp"||i.key==="ArrowDown"?this._q(i.key):i.key==="Enter"?this._r():i.key==="Escape"&&this._2()),!this.d.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(i.key)&&(i.stopPropagation(),e&&clearTimeout(e),t+=i.key.toLowerCase(),this._searchForCountry(t),e=setTimeout(()=>{t=""},1e3))},document.addEventListener("keydown",this._a3),this.d.countrySearch){let i=()=>{let s=this.searchInput.value.trim();s?this._p3(s):this._p3("",!0),this.searchInput.value?this.searchClearButton.classList.remove("iti__hide"):this.searchClearButton.classList.add("iti__hide")},n=null;this._a7=()=>{n&&clearTimeout(n),n=setTimeout(()=>{i(),n=null},100)},this.searchInput.addEventListener("input",this._a7),this._handleSearchClear=()=>{this.searchInput.value="",this.searchInput.focus(),i()},this.searchClearButton.addEventListener("click",this._handleSearchClear)}}_searchForCountry(t){for(let e of this.p)if(e.name.substring(0,t.length).toLowerCase()===t){let n=e.nodeById[this.id];this._x(n,!1),this._3(n);break}}_p3(t,e=!1){let i=!0;this.countryList.innerHTML="";let n=A(t),s=n.length,l=[],d=[],r=[],p=[],m=[],C=[];for(let u of this.p)e||s===0?r.push(u):u.iso2===n?l.push(u):u.normalisedName.startsWith(n)?d.push(u):u.normalisedName.includes(n)?r.push(u):n===u.dialCode||n===u.dialCodePlus?p.push(u):u.dialCodePlus.includes(n)?m.push(u):u.initials.includes(n)&&C.push(u);let g=[...l.sort((u,h)=>u.priority-h.priority),...d.sort((u,h)=>u.priority-h.priority),...r.sort((u,h)=>u.priority-h.priority),...p.sort((u,h)=>u.priority-h.priority),...m.sort((u,h)=>u.priority-h.priority),...C.sort((u,h)=>u.priority-h.priority)];for(let u of g){let h=u.nodeById[this.id];h&&(this.countryList.appendChild(h),i&&(this._x(h,!1),i=!1))}i?(this._x(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove("iti__hide")):this.searchNoResults&&this.searchNoResults.classList.add("iti__hide"),this.countryList.scrollTop=0,this._p4()}_p4(){let{i18n:t}=this.d,e=this.countryList.childElementCount,i;"searchResultsText"in t?i=t.searchResultsText(e):e===0?i=t.zeroSearchResults:e===1?i=t.oneSearchResult:i=t.multipleSearchResults.replace("${count}",e.toString()),this.searchResultsA11yText.textContent=i}_q(t){let e=t==="ArrowUp"?this.c?.previousElementSibling:this.c?.nextElementSibling;!e&&this.countryList.childElementCount>1&&(e=t==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild),e&&(this._3(e),this._x(e,!1))}_r(){this.c&&this._1(this.c)}_u(t){let e=t;if(this.d.formatOnDisplay&&a.utils&&this.s){let i=this.d.nationalMode||e.charAt(0)!=="+"&&!this.d.separateDialCode,{NATIONAL:n,INTERNATIONAL:s}=a.utils.numberFormat,l=i?n:s;e=a.utils.formatNumber(e,this.s.iso2,l)}e=this._7(e),this.a.value=e}_v(t){let e=this._getNewCountryFromNumber(t);return e!==null?this._z(e):!1}_ensureHasDialCode(t){let{dialCode:e,nationalPrefix:i}=this.s;if(t.charAt(0)==="+"||!e)return t;let l=i&&t.charAt(0)===i&&!this.d.separateDialCode?t.substring(1):t;return`+${e}${l}`}_getNewCountryFromNumber(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.s.iso2,s=this.s.dialCode;i=this._ensureHasDialCode(i);let l=this._5(i,!0),d=I(i);if(l){let r=I(l),p=this.q[r];if(!n&&this.j&&p.includes(this.j))return this.j;let m=this.s.areaCodes&&d.length>r.length,C=n&&p.includes(n)&&!m;if(!(s==="1"&&M(d))&&!C){for(let u of p)if(u)return u}}else{if(i.charAt(0)==="+"&&d.length)return"";if((!i||i==="+")&&!this.s.iso2)return this.j}return null}_x(t,e){let i=this.c;if(i&&(i.classList.remove("iti__highlight"),i.setAttribute("aria-selected","false")),this.c=t,this.c&&(this.c.classList.add("iti__highlight"),this.c.setAttribute("aria-selected","true"),this.d.countrySearch)){let n=this.c.getAttribute("id")||"";this.searchInput.setAttribute("aria-activedescendant",n)}e&&this.c.focus()}_y(t,e){let i=this.countryByIso2.get(t);if(i)return i;if(e)return null;throw new Error(`No country data for '${t}'`)}_z(t){let{separateDialCode:e,showFlags:i,i18n:n}=this.d,s=this.s.iso2?this.s:{};if(this.s=t?this._y(t,!1)||{}:{},this.s.iso2&&(this.j=this.s.iso2),this.selectedCountry){let l=t&&i?`iti__flag iti__${t}`:"iti__flag iti__globe",d,r;t?(r=this.s.name,d=n.selectedCountryAriaLabel.replace("${country}",this.s.name)):(r=n.noCountrySelected,d=n.noCountrySelected),this.l.className=l,this.selectedCountry.setAttribute("title",r),this.selectedCountry.setAttribute("aria-label",d)}if(e){let l=this.s.dialCode?`+${this.s.dialCode}`:"";this.t.innerHTML=l,this._updateInputPadding()}return this._0(),this._updateMaxLength(),s.iso2!==t}_updateInputPadding(){if(this.selectedCountry){let e=(this.selectedCountry.offsetWidth||this._z2())+6;this.showSelectedCountryOnLeft?this.a.style.paddingLeft=`${e}px`:this.a.style.paddingRight=`${e}px`}}_updateMaxLength(){let{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.d,{iso2:n}=this.s;if(t&&a.utils)if(n){let s=a.utils.numberType[e],l=a.utils.getExampleNumber(n,!1,s,!0),d=l;for(;a.utils.isPossibleNumber(l,n,i);)d=l,l+="0";let r=a.utils.getCoreNumber(d,n);this.maxCoreNumberLength=r.length,n==="by"&&(this.maxCoreNumberLength=r.length+1)}else this.maxCoreNumberLength=null}_z2(){if(this.a.parentNode){let t=this.a.parentNode.cloneNode(!1);t.style.visibility="hidden",document.body.appendChild(t);let e=this.k.cloneNode();t.appendChild(e);let i=this.selectedCountry.cloneNode(!0);e.appendChild(i);let n=i.offsetWidth;return document.body.removeChild(t),n}return 0}_0(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.d,s=t==="aggressive"||!this.e&&t==="polite";if(a.utils&&s){let l=a.utils.numberType[e],d=this.s.iso2?a.utils.getExampleNumber(this.s.iso2,i,l):"";d=this._7(d),typeof n=="function"&&(d=n(d,this.s)),this.a.setAttribute("placeholder",d)}}_1(t){let e=this._z(t.getAttribute("data-country-code"));this._2(),this._4(t.getAttribute("data-dial-code")),this.a.focus(),e&&this._8()}_2(){this.dropdownContent.classList.add("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","false"),this.c&&this.c.setAttribute("aria-selected","false"),this.d.countrySearch&&this.searchInput.removeAttribute("aria-activedescendant"),this.u.classList.remove("iti__arrow--up"),this.d.countrySearch&&(this.searchInput.removeEventListener("input",this._a7),this.searchClearButton.removeEventListener("click",this._handleSearchClear)),document.documentElement.removeEventListener("click",this._a2),this.countryList.removeEventListener("mouseover",this._a0),this.countryList.removeEventListener("click",this._a1),this.d.dropdownContainer&&(this.d.useFullscreenPopup||window.removeEventListener("scroll",this._a4),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._handlePageLoad&&window.removeEventListener("load",this._handlePageLoad),this._trigger("close:countrydropdown")}_3(t){let e=this.countryList,i=document.documentElement.scrollTop,n=e.offsetHeight,s=e.getBoundingClientRect().top+i,l=s+n,d=t.offsetHeight,r=t.getBoundingClientRect().top+i,p=r+d,m=r-s+e.scrollTop;if(r<s)e.scrollTop=m;else if(p>l){let C=n-d;e.scrollTop=m-C}}_4(t){let e=this.a.value,i=`+${t}`,n;if(e.charAt(0)==="+"){let s=this._5(e);s?n=e.replace(s,i):n=i,this.a.value=n}}_5(t,e){let i="";if(t.charAt(0)==="+"){let n="";for(let s=0;s<t.length;s++){let l=t.charAt(s);if(!isNaN(parseInt(l,10))){if(n+=l,e)this.q[n]&&(i=t.substring(0,s+1));else if(this.dialCodes.has(n)){i=t.substring(0,s+1);break}if(n.length===this.dialCodeMaxLen)break}}}return i}_6(t){let e=t||this.a.value.trim(),{dialCode:i}=this.s,n,s=I(e);return this.d.separateDialCode&&e.charAt(0)!=="+"&&i&&s?n=`+${i}`:n="",n+e}_7(t){let e=t;if(this.d.separateDialCode){let i=this._5(e);if(i){i=`+${this.s.dialCode}`;let n=e[i.length]===" "||e[i.length]==="-"?i.length+1:i.length;e=e.substring(n)}}return this._j2(e)}_8(){this._trigger("countrychange")}_9(){let t=this._6(),e=a.utils?a.utils.formatNumberAsYouType(t,this.s.iso2):t,{dialCode:i}=this.s;return this.d.separateDialCode&&this.a.value.charAt(0)!=="+"&&e.includes(`+${i}`)?(e.split(`+${i}`)[1]||"").trim():e}handleAutoCountry(){this.d.initialCountry==="auto"&&a.autoCountry&&(this.j=a.autoCountry,this.s.iso2||this.l.classList.contains("iti__globe")||this.setCountry(this.j),this.h())}handleUtils(){a.utils&&(this.a.value&&this._u(this.a.value),this.s.iso2&&(this._0(),this._updateMaxLength())),this.i0()}destroy(){this.a.iti=void 0;let{allowDropdown:t,separateDialCode:e}=this.d;if(t){this._2(),this.selectedCountry.removeEventListener("click",this._a10),this.k.removeEventListener("keydown",this._a11);let s=this.a.closest("label");s&&s.removeEventListener("click",this._a9)}let{form:i}=this.a;this._a14&&i&&i.removeEventListener("submit",this._a14),this.a.removeEventListener("input",this._a12),this._handleKeydownEvent&&this.a.removeEventListener("keydown",this._handleKeydownEvent),this.a.removeAttribute("data-intl-tel-input-id"),e&&(this.isRTL?this.a.style.paddingRight=this.originalPaddingRight:this.a.style.paddingLeft=this.originalPaddingLeft);let n=this.a.parentNode;n?.parentNode?.insertBefore(this.a,n),n?.parentNode?.removeChild(n),delete a.instances[this.id]}getExtension(){return a.utils?a.utils.getExtension(this._6(),this.s.iso2):""}getNumber(t){if(a.utils){let{iso2:e}=this.s;return a.utils.formatNumber(this._6(),e,t)}return""}getNumberType(){return a.utils?a.utils.getNumberType(this._6(),this.s.iso2):-99}getSelectedCountryData(){return this.s}getValidationError(){if(a.utils){let{iso2:t}=this.s;return a.utils.getValidationError(this._6(),t)}return-99}isValidNumber(){return this._validateNumber(!1)}isValidNumberPrecise(){return this._validateNumber(!0)}_utilsIsPossibleNumber(t){return a.utils?a.utils.isPossibleNumber(t,this.s.iso2,this.d.validationNumberTypes):null}_validateNumber(t){if(!this.s.iso2)return!1;let e=this._6(),i=e.search(/\p{L}/u),n=s=>t?this._utilsIsValidNumber(s):this._utilsIsPossibleNumber(s);if(i>-1){let s=e.substring(0,i),l=n(s),d=n(e);return l&&d}return n(e)}_utilsIsValidNumber(t){return a.utils?a.utils.isValidNumber(t,this.s.iso2,this.d.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase(),i=this.s.iso2;(t&&e!==i||!t&&i)&&(this._z(e),this._4(this.s.dialCode),this._8())}setNumber(t){let e=this._v(t);this._u(t),e&&this._8(),this._trigger("input",{isSetNumber:!0})}setPlaceholderNumberType(t){this.d.placeholderNumberType=t,this._0()}setDisabled(t){this.a.disabled=t,t?this.selectedCountry.setAttribute("disabled","true"):this.selectedCountry.removeAttribute("disabled")}},q=o=>{if(!a.utils&&!a.startedLoadingUtilsScript){let t;if(typeof o=="function")try{t=Promise.resolve(o())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof o}`));return a.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return a.utils=i,b("handleUtils"),!0}).catch(e=>{throw b("rejectUtilsScriptPromise",e),e})}return null},a=Object.assign((o,t)=>{let e=new w(o,t);return e._init(),o.setAttribute("data-intl-tel-input-id",e.id.toString()),a.instances[e.id]=e,o.iti=e,e},{defaults:k,documentReady:()=>document.readyState==="complete",getCountryData:()=>v,getInstance:o=>{let t=o.getAttribute("data-intl-tel-input-id");return t?a.instances[t]:null},instances:{},attachUtils:q,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.8.3"}),Y=a;return F(J);})();
|
|
28
28
|
|
|
29
29
|
// UMD
|
|
30
30
|
return factoryOutput.default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* International Telephone Input v25.8.
|
|
2
|
+
* International Telephone Input v25.8.3
|
|
3
3
|
* https://github.com/jackocnr/intl-tel-input.git
|
|
4
4
|
* Licensed under the MIT license
|
|
5
5
|
*/
|
|
@@ -2030,7 +2030,7 @@ var factoryOutput = (() => {
|
|
|
2030
2030
|
if (separateDialCode) {
|
|
2031
2031
|
this.selectedDialCode = createEl(
|
|
2032
2032
|
"div",
|
|
2033
|
-
{ class: "iti__selected-dial-code",
|
|
2033
|
+
{ class: "iti__selected-dial-code", dir: "ltr" },
|
|
2034
2034
|
this.selectedCountry
|
|
2035
2035
|
);
|
|
2036
2036
|
}
|
|
@@ -2777,20 +2777,20 @@ var factoryOutput = (() => {
|
|
|
2777
2777
|
if (this.selectedCountryData.iso2) {
|
|
2778
2778
|
this.defaultCountry = this.selectedCountryData.iso2;
|
|
2779
2779
|
}
|
|
2780
|
-
if (this.
|
|
2781
|
-
|
|
2782
|
-
let ariaLabel
|
|
2783
|
-
if (iso2
|
|
2784
|
-
|
|
2780
|
+
if (this.selectedCountry) {
|
|
2781
|
+
const flagClass = iso2 && showFlags ? `iti__flag iti__${iso2}` : "iti__flag iti__globe";
|
|
2782
|
+
let ariaLabel, title;
|
|
2783
|
+
if (iso2) {
|
|
2784
|
+
title = this.selectedCountryData.name;
|
|
2785
2785
|
ariaLabel = i18n.selectedCountryAriaLabel.replace("${country}", this.selectedCountryData.name);
|
|
2786
2786
|
} else {
|
|
2787
|
-
|
|
2787
|
+
title = i18n.noCountrySelected;
|
|
2788
2788
|
ariaLabel = i18n.noCountrySelected;
|
|
2789
2789
|
}
|
|
2790
2790
|
this.selectedCountryInner.className = flagClass;
|
|
2791
|
+
this.selectedCountry.setAttribute("title", title);
|
|
2791
2792
|
this.selectedCountry.setAttribute("aria-label", ariaLabel);
|
|
2792
2793
|
}
|
|
2793
|
-
this._setSelectedCountryTitleAttribute(iso2, separateDialCode);
|
|
2794
2794
|
if (separateDialCode) {
|
|
2795
2795
|
const dialCode = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
2796
2796
|
this.selectedDialCode.innerHTML = dialCode;
|
|
@@ -2840,20 +2840,6 @@ var factoryOutput = (() => {
|
|
|
2840
2840
|
}
|
|
2841
2841
|
}
|
|
2842
2842
|
}
|
|
2843
|
-
_setSelectedCountryTitleAttribute(iso2 = null, separateDialCode) {
|
|
2844
|
-
if (!this.selectedCountry) {
|
|
2845
|
-
return;
|
|
2846
|
-
}
|
|
2847
|
-
let title;
|
|
2848
|
-
if (iso2 && !separateDialCode) {
|
|
2849
|
-
title = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}`;
|
|
2850
|
-
} else if (iso2) {
|
|
2851
|
-
title = this.selectedCountryData.name;
|
|
2852
|
-
} else {
|
|
2853
|
-
title = this.options.i18n.noCountrySelected;
|
|
2854
|
-
}
|
|
2855
|
-
this.selectedCountry.setAttribute("title", title);
|
|
2856
|
-
}
|
|
2857
2843
|
//* When the input is in a hidden container during initialisation, we must inject some markup
|
|
2858
2844
|
//* into the end of the DOM to calculate the correct offsetWidth.
|
|
2859
2845
|
//* NOTE: this is only used when separateDialCode is enabled, so countryContainer and selectedCountry
|
|
@@ -3279,7 +3265,7 @@ var factoryOutput = (() => {
|
|
|
3279
3265
|
attachUtils,
|
|
3280
3266
|
startedLoadingUtilsScript: false,
|
|
3281
3267
|
startedLoadingAutoCountry: false,
|
|
3282
|
-
version: "25.8.
|
|
3268
|
+
version: "25.8.3"
|
|
3283
3269
|
}
|
|
3284
3270
|
);
|
|
3285
3271
|
var intl_tel_input_default = intlTelInput;
|