intl-tel-input 24.3.4 → 24.3.6
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 +7 -5
- package/build/css/demo.css +4 -6
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.js +2 -2
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +2 -2
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/package.json +1 -1
- package/react/README.md +2 -2
- package/react/build/IntlTelInput.cjs +1 -1
- package/react/build/IntlTelInput.js +1 -1
- package/react/build/IntlTelInputWithUtils.cjs +1 -1
- package/react/build/IntlTelInputWithUtils.js +1 -1
- package/vue/README.md +7 -9
- package/vue/build/IntlTelInput.mjs +5 -5
- package/vue/build/IntlTelInputWithUtils.mjs +38 -38
package/package.json
CHANGED
package/react/README.md
CHANGED
|
@@ -28,7 +28,7 @@ import "intl-tel-input/styles";
|
|
|
28
28
|
|
|
29
29
|
See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/react/demo/validation/ValidationApp.tsx) for a more fleshed-out example of how to handle validation.
|
|
30
30
|
|
|
31
|
-
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/reactWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `utilsScript` 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 `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@24.3.
|
|
31
|
+
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/reactWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `utilsScript` 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 `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@24.3.6/build/js/utils.js"`.
|
|
32
32
|
|
|
33
33
|
## Props
|
|
34
34
|
Here's a list of all of the current props you can pass to the IntlTelInput React component.
|
|
@@ -43,7 +43,7 @@ The initial value to put in the input. This will get auto-formatted on init (acc
|
|
|
43
43
|
|
|
44
44
|
**initOptions**
|
|
45
45
|
Type: `Object`
|
|
46
|
-
An object containing
|
|
46
|
+
An object containing the [initialisation options](https://github.com/jackocnr/intl-tel-input?tab=readme-ov-file#initialisation-options) to pass to the plugin. You can use these exactly the same way as with the main JavaScript plugin.
|
|
47
47
|
|
|
48
48
|
**inputProps**
|
|
49
49
|
Type: `Object`
|
package/vue/README.md
CHANGED
|
@@ -2,20 +2,18 @@
|
|
|
2
2
|
A Vue component wrapper for the [intl-tel-input](https://github.com/jackocnr/intl-tel-input) JavaScript plugin. View the [source code](https://github.com/jackocnr/intl-tel-input/blob/master/vue/src/intl-tel-input/IntlTelInput.vue).
|
|
3
3
|
|
|
4
4
|
## Table of Contents
|
|
5
|
-
- [Demo
|
|
5
|
+
- [Demo](#demo)
|
|
6
6
|
- [Getting Started](#getting-started)
|
|
7
7
|
- [Props](#props)
|
|
8
|
-
- [Accessing Instance Methods](#accessing-instance-methods)
|
|
9
|
-
- [Accessing Static Methods](#accessing-static-methods)
|
|
10
|
-
- [Troubleshooting](#troubleshooting)
|
|
11
8
|
|
|
12
|
-
## Demo
|
|
9
|
+
## Demo
|
|
13
10
|
Try it for yourself by downloading the project and running `npm install` and then `npm run vue:demo` and then copying the given URL into your browser.
|
|
14
11
|
|
|
15
12
|
## Getting Started
|
|
16
13
|
```vue
|
|
17
14
|
<script setup>
|
|
18
|
-
import IntlTelInput from "
|
|
15
|
+
import IntlTelInput from "intl-tel-input/vueWithUtils";
|
|
16
|
+
import "intl-tel-input/styles";
|
|
19
17
|
</script>
|
|
20
18
|
|
|
21
19
|
<template>
|
|
@@ -29,13 +27,13 @@ Try it for yourself by downloading the project and running `npm install` and the
|
|
|
29
27
|
|
|
30
28
|
See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/vue/demo/validation/App.vue) for a more fleshed-out example of how to handle validation [COMING SOON].
|
|
31
29
|
|
|
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/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `utilsScript` 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 `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@24.3.
|
|
30
|
+
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/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `utilsScript` 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 `utilsScript` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@24.3.6/build/js/utils.js"`.
|
|
33
31
|
|
|
34
32
|
## Props
|
|
35
33
|
Here's a list of all of the current props you can pass to the IntlTelInput Vue component.
|
|
36
34
|
|
|
37
35
|
**options**
|
|
38
36
|
Type: `Object`
|
|
39
|
-
An object containing
|
|
37
|
+
An object containing the [initialisation options](https://github.com/jackocnr/intl-tel-input?tab=readme-ov-file#initialisation-options) to pass to the plugin. You can use these exactly the same way as with the main JavaScript plugin.
|
|
40
38
|
|
|
41
|
-
[MORE COMING SOON]
|
|
39
|
+
[MORE COMING SOON]
|
|
@@ -1561,7 +1561,7 @@ const F = {
|
|
|
1561
1561
|
za: "South Africa",
|
|
1562
1562
|
zm: "Zambia",
|
|
1563
1563
|
zw: "Zimbabwe"
|
|
1564
|
-
},
|
|
1564
|
+
}, z = {
|
|
1565
1565
|
selectedCountryAriaLabel: "Selected country",
|
|
1566
1566
|
noCountrySelected: "No country selected",
|
|
1567
1567
|
countryListAriaLabel: "List of countries",
|
|
@@ -1572,10 +1572,10 @@ const F = {
|
|
|
1572
1572
|
// additional countries (not supported by country-list library)
|
|
1573
1573
|
ac: "Ascension Island",
|
|
1574
1574
|
xk: "Kosovo"
|
|
1575
|
-
}, S = { ...F, ...
|
|
1575
|
+
}, S = { ...F, ...z };
|
|
1576
1576
|
for (let u = 0; u < b.length; u++)
|
|
1577
1577
|
b[u].name = S[b[u].iso2];
|
|
1578
|
-
let
|
|
1578
|
+
let R = 0;
|
|
1579
1579
|
const k = {
|
|
1580
1580
|
//* Whether or not to allow the dropdown.
|
|
1581
1581
|
allowDropdown: !0,
|
|
@@ -1676,7 +1676,7 @@ const k = {
|
|
|
1676
1676
|
};
|
|
1677
1677
|
class K {
|
|
1678
1678
|
constructor(t, e = {}) {
|
|
1679
|
-
this.id =
|
|
1679
|
+
this.id = R++, this.telInput = t, this.highlightedItem = null, this.options = Object.assign({}, k, e), this.hadInitialPlaceholder = !!t.getAttribute("placeholder");
|
|
1680
1680
|
}
|
|
1681
1681
|
//* Can't be private as it's called from intlTelInput convenience wrapper.
|
|
1682
1682
|
_init() {
|
|
@@ -2471,7 +2471,7 @@ const U = (u) => !l.utils && !l.startedLoadingUtilsScript ? (l.startedLoadingUti
|
|
|
2471
2471
|
//* A map from instance ID to instance object.
|
|
2472
2472
|
instances: {},
|
|
2473
2473
|
loadUtils: U,
|
|
2474
|
-
version:
|
|
2474
|
+
version: "24.3.6"
|
|
2475
2475
|
}
|
|
2476
2476
|
), G = {
|
|
2477
2477
|
__name: "IntlTelInput",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeModels as t2, useModel as A2, ref as y1, onMounted as
|
|
1
|
+
import { mergeModels as t2, useModel as A2, ref as y1, onMounted as L2, watch as N2, onUnmounted as E2, withDirectives as D2, openBlock as M2, createElementBlock as x2, vModelText as P2 } from "vue";
|
|
2
2
|
const e2 = [
|
|
3
3
|
[
|
|
4
4
|
"af",
|
|
@@ -1667,7 +1667,7 @@ const s2 = {
|
|
|
1667
1667
|
return a;
|
|
1668
1668
|
}
|
|
1669
1669
|
return e.length;
|
|
1670
|
-
},
|
|
1670
|
+
}, N = (y, e, i) => {
|
|
1671
1671
|
const s = document.createElement(y);
|
|
1672
1672
|
return e && Object.entries(e).forEach(([u, a]) => s.setAttribute(u, a)), i && i.appendChild(s), s;
|
|
1673
1673
|
}, e1 = (y) => {
|
|
@@ -1785,16 +1785,16 @@ class U2 {
|
|
|
1785
1785
|
} = this.options;
|
|
1786
1786
|
let T = "iti";
|
|
1787
1787
|
e && (T += " iti--allow-dropdown"), s && (T += " iti--show-flags"), u && (T += ` ${u}`), g || (T += " iti--inline-dropdown");
|
|
1788
|
-
const S =
|
|
1788
|
+
const S = N("div", { class: T });
|
|
1789
1789
|
if ((I = this.telInput.parentNode) == null || I.insertBefore(S, this.telInput), e || s || i) {
|
|
1790
|
-
this.countryContainer =
|
|
1790
|
+
this.countryContainer = N(
|
|
1791
1791
|
"div",
|
|
1792
1792
|
{
|
|
1793
1793
|
class: "iti__country-container",
|
|
1794
1794
|
style: this.showSelectedCountryOnLeft ? "left: 0" : "right: 0"
|
|
1795
1795
|
},
|
|
1796
1796
|
S
|
|
1797
|
-
), e ? (this.selectedCountry =
|
|
1797
|
+
), e ? (this.selectedCountry = N(
|
|
1798
1798
|
"button",
|
|
1799
1799
|
{
|
|
1800
1800
|
type: "button",
|
|
@@ -1806,30 +1806,30 @@ class U2 {
|
|
|
1806
1806
|
role: "combobox"
|
|
1807
1807
|
},
|
|
1808
1808
|
this.countryContainer
|
|
1809
|
-
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry =
|
|
1809
|
+
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = N(
|
|
1810
1810
|
"div",
|
|
1811
1811
|
{ class: "iti__selected-country" },
|
|
1812
1812
|
this.countryContainer
|
|
1813
1813
|
);
|
|
1814
|
-
const A =
|
|
1815
|
-
if (this.selectedCountryInner =
|
|
1814
|
+
const A = N("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
|
|
1815
|
+
if (this.selectedCountryInner = N("div", { class: "iti__flag" }, A), this.selectedCountryA11yText = N(
|
|
1816
1816
|
"span",
|
|
1817
1817
|
{ class: "iti__a11y-text" },
|
|
1818
1818
|
this.selectedCountryInner
|
|
1819
|
-
), e && (this.dropdownArrow =
|
|
1819
|
+
), e && (this.dropdownArrow = N(
|
|
1820
1820
|
"div",
|
|
1821
1821
|
{ class: "iti__arrow", "aria-hidden": "true" },
|
|
1822
1822
|
A
|
|
1823
|
-
)), i && (this.selectedDialCode =
|
|
1823
|
+
)), i && (this.selectedDialCode = N(
|
|
1824
1824
|
"div",
|
|
1825
1825
|
{ class: "iti__selected-dial-code" },
|
|
1826
1826
|
this.selectedCountry
|
|
1827
1827
|
)), e) {
|
|
1828
1828
|
const x = p ? "" : "iti--flexible-dropdown-width";
|
|
1829
|
-
if (this.dropdownContent =
|
|
1829
|
+
if (this.dropdownContent = N("div", {
|
|
1830
1830
|
id: `iti-${this.id}__dropdown-content`,
|
|
1831
1831
|
class: `iti__dropdown-content iti__hide ${x}`
|
|
1832
|
-
}), b && (this.searchInput =
|
|
1832
|
+
}), b && (this.searchInput = N(
|
|
1833
1833
|
"input",
|
|
1834
1834
|
{
|
|
1835
1835
|
type: "text",
|
|
@@ -1843,11 +1843,11 @@ class U2 {
|
|
|
1843
1843
|
autocomplete: "off"
|
|
1844
1844
|
},
|
|
1845
1845
|
this.dropdownContent
|
|
1846
|
-
), this.searchResultsA11yText =
|
|
1846
|
+
), this.searchResultsA11yText = N(
|
|
1847
1847
|
"span",
|
|
1848
1848
|
{ class: "iti__a11y-text" },
|
|
1849
1849
|
this.dropdownContent
|
|
1850
|
-
)), this.countryList =
|
|
1850
|
+
)), this.countryList = N(
|
|
1851
1851
|
"ul",
|
|
1852
1852
|
{
|
|
1853
1853
|
class: "iti__country-list",
|
|
@@ -1858,17 +1858,17 @@ class U2 {
|
|
|
1858
1858
|
this.dropdownContent
|
|
1859
1859
|
), this._appendListItems(), b && this._updateSearchResultsText(), c) {
|
|
1860
1860
|
let O = "iti iti--container";
|
|
1861
|
-
g ? O += " iti--fullscreen-popup" : O += " iti--inline-dropdown", this.dropdown =
|
|
1861
|
+
g ? O += " iti--fullscreen-popup" : O += " iti--inline-dropdown", this.dropdown = N("div", { class: O }), this.dropdown.appendChild(this.dropdownContent);
|
|
1862
1862
|
} else
|
|
1863
1863
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1864
1864
|
}
|
|
1865
1865
|
}
|
|
1866
1866
|
if (S.appendChild(this.telInput), this._updateInputPadding(), a) {
|
|
1867
1867
|
const A = this.telInput.getAttribute("name") || "", x = a(A);
|
|
1868
|
-
x.phone && (this.hiddenInput =
|
|
1868
|
+
x.phone && (this.hiddenInput = N("input", {
|
|
1869
1869
|
type: "hidden",
|
|
1870
1870
|
name: x.phone
|
|
1871
|
-
}), S.appendChild(this.hiddenInput)), x.country && (this.hiddenInputCountry =
|
|
1871
|
+
}), S.appendChild(this.hiddenInput)), x.country && (this.hiddenInputCountry = N("input", {
|
|
1872
1872
|
type: "hidden",
|
|
1873
1873
|
name: x.country
|
|
1874
1874
|
}), S.appendChild(this.hiddenInputCountry));
|
|
@@ -1877,7 +1877,7 @@ class U2 {
|
|
|
1877
1877
|
//* For each country: add a country list item <li> to the countryList <ul> container.
|
|
1878
1878
|
_appendListItems() {
|
|
1879
1879
|
for (let e = 0; e < this.countries.length; e++) {
|
|
1880
|
-
const i = this.countries[e], s = e === 0 ? "iti__highlight" : "", u =
|
|
1880
|
+
const i = this.countries[e], s = e === 0 ? "iti__highlight" : "", u = N(
|
|
1881
1881
|
"li",
|
|
1882
1882
|
{
|
|
1883
1883
|
id: `iti-${this.id}__item-${i.iso2}`,
|
|
@@ -2471,7 +2471,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
2471
2471
|
//* A map from instance ID to instance object.
|
|
2472
2472
|
instances: {},
|
|
2473
2473
|
loadUtils: F2,
|
|
2474
|
-
version:
|
|
2474
|
+
version: "24.3.6"
|
|
2475
2475
|
}
|
|
2476
2476
|
);
|
|
2477
2477
|
(function() {
|
|
@@ -2672,19 +2672,19 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
2672
2672
|
}, J.prototype.g = function(d, t) {
|
|
2673
2673
|
return J.ma.g.call(this, d, t);
|
|
2674
2674
|
};
|
|
2675
|
-
function
|
|
2675
|
+
function L(d, t) {
|
|
2676
2676
|
d != null && this.g.apply(this, arguments);
|
|
2677
2677
|
}
|
|
2678
|
-
|
|
2678
|
+
L.prototype.h = "", L.prototype.set = function(d) {
|
|
2679
2679
|
this.h = "" + d;
|
|
2680
|
-
},
|
|
2680
|
+
}, L.prototype.g = function(d, t, $) {
|
|
2681
2681
|
if (this.h += String(d), t != null) for (let n = 1; n < arguments.length; n++) this.h += arguments[n];
|
|
2682
2682
|
return this;
|
|
2683
2683
|
};
|
|
2684
2684
|
function B(d) {
|
|
2685
2685
|
d.h = "";
|
|
2686
2686
|
}
|
|
2687
|
-
|
|
2687
|
+
L.prototype.toString = function() {
|
|
2688
2688
|
return this.h;
|
|
2689
2689
|
};
|
|
2690
2690
|
function j() {
|
|
@@ -8077,14 +8077,14 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
8077
8077
|
X: "9",
|
|
8078
8078
|
Y: "9",
|
|
8079
8079
|
Z: "9"
|
|
8080
|
-
}, f2 = RegExp("[++]+"), X = RegExp("^[++]+"),
|
|
8080
|
+
}, f2 = RegExp("[++]+"), X = RegExp("^[++]+"), L1 = RegExp("([0-90-9٠-٩۰-۹])"), p2 = RegExp("[++0-90-9٠-٩۰-۹]"), g2 = /[\\\/] *x/, C2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), m2 = /(?:.*?[A-Za-z]){3}.*/, y2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), _2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
|
|
8081
8081
|
function Z(d) {
|
|
8082
8082
|
return "([0-90-9٠-٩۰-۹]{1," + d + "})";
|
|
8083
8083
|
}
|
|
8084
|
-
function
|
|
8084
|
+
function N1() {
|
|
8085
8085
|
return ";ext=" + Z("20") + "|[ \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[ \\t,-]*" + (Z("20") + "#?|[ \\t,]*(?:[xx##~~]|int|int)[:\\..]?[ \\t,-]*") + (Z("9") + "#?|[- ]+") + (Z("6") + "#|[ \\t]*(?:,{2}|;)[:\\..]?[ \\t,-]*") + (Z("15") + "#?|[ \\t]*(?:,)+[:\\..]?[ \\t,-]*") + (Z("9") + "#?");
|
|
8086
8086
|
}
|
|
8087
|
-
var E1 = new RegExp("(?:" +
|
|
8087
|
+
var E1 = new RegExp("(?:" + N1() + ")$", "i"), I2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + N1() + ")?$", "i"), v2 = /(\$\d)/, S2 = /^\(?\$1\)?$/;
|
|
8088
8088
|
function D1(d) {
|
|
8089
8089
|
return 2 > d.length ? !1 : G(I2, d);
|
|
8090
8090
|
}
|
|
@@ -8099,7 +8099,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
8099
8099
|
return d != null && (F(d, 9) != 1 || M(d, 9)[0] != -1);
|
|
8100
8100
|
}
|
|
8101
8101
|
function r1(d, t) {
|
|
8102
|
-
for (var $ = new
|
|
8102
|
+
for (var $ = new L(), n, r = d.length, o = 0; o < r; ++o) n = d.charAt(o), n = t[n.toUpperCase()], n != null && $.g(n);
|
|
8103
8103
|
return $.toString();
|
|
8104
8104
|
}
|
|
8105
8105
|
function R1(d) {
|
|
@@ -8248,7 +8248,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
8248
8248
|
}
|
|
8249
8249
|
function U1(d, t, $, n, r, o) {
|
|
8250
8250
|
if (t.length == 0) return 0;
|
|
8251
|
-
t = new
|
|
8251
|
+
t = new L(t);
|
|
8252
8252
|
var l;
|
|
8253
8253
|
$ != null && (l = f($, 11)), l == null && (l = "NonMatch");
|
|
8254
8254
|
var h = t.toString();
|
|
@@ -8257,7 +8257,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
8257
8257
|
else {
|
|
8258
8258
|
if (h = new RegExp(l), x1(t), l = t.toString(), l.search(h) == 0) {
|
|
8259
8259
|
h = l.match(h)[0].length;
|
|
8260
|
-
var m = l.substring(h).match(
|
|
8260
|
+
var m = l.substring(h).match(L1);
|
|
8261
8261
|
m && m[1] != null && 0 < m[1].length && r1(m[1], p1) == "0" ? l = !1 : (B(t), t.g(l.substring(h)), l = !0);
|
|
8262
8262
|
} else l = !1;
|
|
8263
8263
|
l = l ? 5 : 20;
|
|
@@ -8267,7 +8267,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
8267
8267
|
if (d = G1(t, n), d != 0) return E(o, 1, d), d;
|
|
8268
8268
|
throw Error("Invalid country calling code");
|
|
8269
8269
|
}
|
|
8270
|
-
return $ != null && (l = v($, 10), h = "" + l, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new
|
|
8270
|
+
return $ != null && (l = v($, 10), h = "" + l, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new L(m.substring(h.length)), m = f($, 1), m = new RegExp(v(m, 2)), F1(h, $, null), h = h.toString(), !G(m, t.toString()) && G(m, h) || l1(d, t.toString(), $, -1) == 3)) ? (n.g(h), r && E(o, 6, 10), E(o, 1, l), l) : (E(o, 1, 0), 0);
|
|
8271
8271
|
}
|
|
8272
8272
|
function F1(d, t, $) {
|
|
8273
8273
|
var n = d.toString(), r = n.length, o = f(t, 15);
|
|
@@ -8287,7 +8287,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
8287
8287
|
function V1(d, t, $, n) {
|
|
8288
8288
|
if (t == null) throw Error("The string supplied did not seem to be a phone number");
|
|
8289
8289
|
if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
|
|
8290
|
-
var r = new
|
|
8290
|
+
var r = new L(), o = t.indexOf(";phone-context=");
|
|
8291
8291
|
if (o === -1) o = null;
|
|
8292
8292
|
else if (o += 15, o >= t.length) o = "";
|
|
8293
8293
|
else {
|
|
@@ -8308,7 +8308,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
8308
8308
|
}
|
|
8309
8309
|
t = "";
|
|
8310
8310
|
}
|
|
8311
|
-
0 < t.length && E(o, 3, t), l = K(d, $), t = new
|
|
8311
|
+
0 < t.length && E(o, 3, t), l = K(d, $), t = new L(), h = 0, m = r.toString();
|
|
8312
8312
|
try {
|
|
8313
8313
|
h = U1(d, m, l, t, n, o);
|
|
8314
8314
|
} catch (m1) {
|
|
@@ -8320,7 +8320,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
8320
8320
|
o,
|
|
8321
8321
|
1,
|
|
8322
8322
|
h
|
|
8323
|
-
)) : n && (delete o.h[6], o.g && delete o.g[6])), 2 > t.h.length || (l != null && ($ = new
|
|
8323
|
+
)) : n && (delete o.h[6], o.g && delete o.g[6])), 2 > t.h.length || (l != null && ($ = new L(), r = new L(t.toString()), F1(r, l, $), d = l1(d, r.toString(), l, -1), d != 2 && d != 4 && d != 5 && (t = r, n && 0 < $.toString().length && E(o, 7, $.toString()))), n = t.toString(), d = n.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
|
|
8324
8324
|
if (17 < d) throw Error("The string supplied is too long to be a phone number");
|
|
8325
8325
|
if (1 < n.length && n.charAt(0) == "0") {
|
|
8326
8326
|
for (E(o, 4, !0), d = 1; d < n.length - 1 && n.charAt(d) == "0"; ) d++;
|
|
@@ -8332,7 +8332,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
8332
8332
|
return !!((d = typeof d == "string" ? t.match("^(?:" + d + ")$") : t.match(d)) && d[0].length == t.length);
|
|
8333
8333
|
}
|
|
8334
8334
|
function w2(d) {
|
|
8335
|
-
this.fa = RegExp(" "), this.ja = "", this.v = new
|
|
8335
|
+
this.fa = RegExp(" "), this.ja = "", this.v = new L(), this.da = "", this.s = new L(), this.ba = new L(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new L(), this.ha = !1, this.o = "", this.g = new L(), this.j = [], this.ka = d, this.l = j1(this, this.ka);
|
|
8336
8336
|
}
|
|
8337
8337
|
var K1 = new W();
|
|
8338
8338
|
E(K1, 11, "NA");
|
|
@@ -8364,7 +8364,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
8364
8364
|
function T2(d, t) {
|
|
8365
8365
|
d.s.g(t);
|
|
8366
8366
|
var $ = t;
|
|
8367
|
-
if (
|
|
8367
|
+
if (L1.test($) || d.s.h.length == 1 && f2.test($) ? (t == "+" ? ($ = t, d.ba.g(t)) : ($ = p1[t], d.ba.g($), d.g.g($)), t = $) : (d.u = !1, d.la = !0), !d.u) {
|
|
8368
8368
|
if (!d.la) {
|
|
8369
8369
|
if (X1(d)) {
|
|
8370
8370
|
if (Q1(d)) return Z1(d);
|
|
@@ -8429,7 +8429,7 @@ const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
|
|
|
8429
8429
|
}
|
|
8430
8430
|
function Q1(d) {
|
|
8431
8431
|
if (d.g.h.length == 0) return !1;
|
|
8432
|
-
var t = new
|
|
8432
|
+
var t = new L(), $ = G1(d.g, t);
|
|
8433
8433
|
return $ == 0 ? !1 : (B(d.g), d.g.g(t.toString()), t = t1($), t == "001" ? d.l = K(d.ga, "" + $) : t != d.ka && (d.l = j1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
|
|
8434
8434
|
}
|
|
8435
8435
|
function d2(d, t) {
|
|
@@ -8580,9 +8580,9 @@ const H2 = {
|
|
|
8580
8580
|
var I;
|
|
8581
8581
|
a("changeCountry", ((I = p.value) == null ? void 0 : I.getSelectedCountryData().iso2) ?? ""), T(), _();
|
|
8582
8582
|
};
|
|
8583
|
-
return
|
|
8583
|
+
return L2(() => {
|
|
8584
8584
|
c.value && (p.value = C(c.value, u.options), u.value && p.value.setNumber(u.value), u.disabled && p.value.setDisabled(u.disabled));
|
|
8585
|
-
}),
|
|
8585
|
+
}), N2(
|
|
8586
8586
|
() => u.disabled,
|
|
8587
8587
|
(I) => {
|
|
8588
8588
|
var A;
|