intl-tel-input 24.8.2 → 25.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -47
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.d.ts +6 -8
- package/build/js/intlTelInput.js +37 -43
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +301 -302
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/build/js/utils.js +51 -52
- package/package.json +1 -1
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +36 -42
- package/react/build/IntlTelInput.d.ts +6 -8
- package/react/build/IntlTelInput.js +36 -42
- package/react/build/IntlTelInputWithUtils.cjs +300 -301
- package/react/build/IntlTelInputWithUtils.js +300 -301
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +64 -65
- package/vue/build/IntlTelInputWithUtils.mjs +669 -671
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* International Telephone Input
|
|
2
|
+
* International Telephone Input v25.0.1
|
|
3
3
|
* https://github.com/jackocnr/intl-tel-input.git
|
|
4
4
|
* Licensed under the MIT license
|
|
5
5
|
*/
|
|
@@ -1663,8 +1663,8 @@ var factoryOutput = (() => {
|
|
|
1663
1663
|
i18n: {},
|
|
1664
1664
|
//* Initial country.
|
|
1665
1665
|
initialCountry: "",
|
|
1666
|
-
//*
|
|
1667
|
-
|
|
1666
|
+
//* A function to load the utils script.
|
|
1667
|
+
loadUtils: null,
|
|
1668
1668
|
//* National vs international formatting for numbers e.g. placeholders and displaying existing numbers.
|
|
1669
1669
|
nationalMode: true,
|
|
1670
1670
|
//* Display only these countries.
|
|
@@ -1685,10 +1685,8 @@ var factoryOutput = (() => {
|
|
|
1685
1685
|
navigator.userAgent
|
|
1686
1686
|
) || window.innerWidth <= 500
|
|
1687
1687
|
) : false,
|
|
1688
|
-
//* Deprecated! Use `loadUtilsOnInit` instead.
|
|
1689
|
-
utilsScript: "",
|
|
1690
1688
|
//* The number type to enforce during validation.
|
|
1691
|
-
|
|
1689
|
+
validationNumberTypes: ["MOBILE"]
|
|
1692
1690
|
};
|
|
1693
1691
|
var regionlessNanpNumbers = [
|
|
1694
1692
|
"800",
|
|
@@ -2061,18 +2059,28 @@ var factoryOutput = (() => {
|
|
|
2061
2059
|
const telInputName = this.telInput.getAttribute("name") || "";
|
|
2062
2060
|
const names = hiddenInput(telInputName);
|
|
2063
2061
|
if (names.phone) {
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2062
|
+
const existingInput = this.telInput.form?.querySelector(`input[name="${names.phone}"]`);
|
|
2063
|
+
if (existingInput) {
|
|
2064
|
+
this.hiddenInput = existingInput;
|
|
2065
|
+
} else {
|
|
2066
|
+
this.hiddenInput = createEl("input", {
|
|
2067
|
+
type: "hidden",
|
|
2068
|
+
name: names.phone
|
|
2069
|
+
});
|
|
2070
|
+
wrapper.appendChild(this.hiddenInput);
|
|
2071
|
+
}
|
|
2069
2072
|
}
|
|
2070
2073
|
if (names.country) {
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2074
|
+
const existingInput = this.telInput.form?.querySelector(`input[name="${names.country}"]`);
|
|
2075
|
+
if (existingInput) {
|
|
2076
|
+
this.hiddenInputCountry = existingInput;
|
|
2077
|
+
} else {
|
|
2078
|
+
this.hiddenInputCountry = createEl("input", {
|
|
2079
|
+
type: "hidden",
|
|
2080
|
+
name: names.country
|
|
2081
|
+
});
|
|
2082
|
+
wrapper.appendChild(this.hiddenInputCountry);
|
|
2083
|
+
}
|
|
2076
2084
|
}
|
|
2077
2085
|
}
|
|
2078
2086
|
}
|
|
@@ -2197,15 +2205,11 @@ var factoryOutput = (() => {
|
|
|
2197
2205
|
}
|
|
2198
2206
|
//* Init many requests: utils script / geo ip lookup.
|
|
2199
2207
|
_initRequests() {
|
|
2200
|
-
let {
|
|
2201
|
-
if (
|
|
2202
|
-
console.warn("intl-tel-input: The `utilsScript` option is deprecated and will be removed in a future release! Please use the `loadUtilsOnInit` option instead.");
|
|
2203
|
-
loadUtilsOnInit = utilsScript;
|
|
2204
|
-
}
|
|
2205
|
-
if (loadUtilsOnInit && !intlTelInput.utils) {
|
|
2208
|
+
let { loadUtils, initialCountry, geoIpLookup } = this.options;
|
|
2209
|
+
if (loadUtils && !intlTelInput.utils) {
|
|
2206
2210
|
this._handlePageLoad = () => {
|
|
2207
2211
|
window.removeEventListener("load", this._handlePageLoad);
|
|
2208
|
-
intlTelInput.loadUtils
|
|
2212
|
+
intlTelInput.attachUtils(loadUtils)?.catch(() => {
|
|
2209
2213
|
});
|
|
2210
2214
|
};
|
|
2211
2215
|
if (intlTelInput.documentReady()) {
|
|
@@ -2669,7 +2673,7 @@ var factoryOutput = (() => {
|
|
|
2669
2673
|
}
|
|
2670
2674
|
//* Update the maximum valid number length for the currently selected country.
|
|
2671
2675
|
_updateMaxLength() {
|
|
2672
|
-
const { strictMode, placeholderNumberType,
|
|
2676
|
+
const { strictMode, placeholderNumberType, validationNumberTypes } = this.options;
|
|
2673
2677
|
const { iso2 } = this.selectedCountryData;
|
|
2674
2678
|
if (strictMode && intlTelInput.utils) {
|
|
2675
2679
|
if (iso2) {
|
|
@@ -2681,7 +2685,7 @@ var factoryOutput = (() => {
|
|
|
2681
2685
|
true
|
|
2682
2686
|
);
|
|
2683
2687
|
let validNumber = exampleNumber;
|
|
2684
|
-
while (intlTelInput.utils.isPossibleNumber(exampleNumber, iso2,
|
|
2688
|
+
while (intlTelInput.utils.isPossibleNumber(exampleNumber, iso2, validationNumberTypes)) {
|
|
2685
2689
|
validNumber = exampleNumber;
|
|
2686
2690
|
exampleNumber += "0";
|
|
2687
2691
|
}
|
|
@@ -3033,7 +3037,7 @@ var factoryOutput = (() => {
|
|
|
3033
3037
|
return this._utilsIsPossibleNumber(val);
|
|
3034
3038
|
}
|
|
3035
3039
|
_utilsIsPossibleNumber(val) {
|
|
3036
|
-
return intlTelInput.utils ? intlTelInput.utils.isPossibleNumber(val, this.selectedCountryData.iso2, this.options.
|
|
3040
|
+
return intlTelInput.utils ? intlTelInput.utils.isPossibleNumber(val, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
|
|
3037
3041
|
}
|
|
3038
3042
|
//* Validate the input val (precise)
|
|
3039
3043
|
isValidNumberPrecise() {
|
|
@@ -3051,7 +3055,7 @@ var factoryOutput = (() => {
|
|
|
3051
3055
|
return this._utilsIsValidNumber(val);
|
|
3052
3056
|
}
|
|
3053
3057
|
_utilsIsValidNumber(val) {
|
|
3054
|
-
return intlTelInput.utils ? intlTelInput.utils.isValidNumber(val, this.selectedCountryData.iso2) : null;
|
|
3058
|
+
return intlTelInput.utils ? intlTelInput.utils.isValidNumber(val, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
|
|
3055
3059
|
}
|
|
3056
3060
|
//* Update the selected country, and update the input val accordingly.
|
|
3057
3061
|
setCountry(iso2) {
|
|
@@ -3087,29 +3091,23 @@ var factoryOutput = (() => {
|
|
|
3087
3091
|
}
|
|
3088
3092
|
}
|
|
3089
3093
|
};
|
|
3090
|
-
var
|
|
3094
|
+
var attachUtils = (source) => {
|
|
3091
3095
|
if (!intlTelInput.utils && !intlTelInput.startedLoadingUtilsScript) {
|
|
3092
3096
|
let loadCall;
|
|
3093
|
-
if (typeof source === "
|
|
3094
|
-
loadCall = Promise.reject(new Error("INTENTIONALLY BROKEN: this build of intl-tel-input includes the utilities module inline, but it has incorrectly attempted to load the utilities separately. If you are seeing this message, something is broken!"));
|
|
3095
|
-
} else if (typeof source === "function") {
|
|
3097
|
+
if (typeof source === "function") {
|
|
3096
3098
|
try {
|
|
3097
3099
|
loadCall = Promise.resolve(source());
|
|
3098
3100
|
} catch (error) {
|
|
3099
3101
|
return Promise.reject(error);
|
|
3100
3102
|
}
|
|
3101
3103
|
} else {
|
|
3102
|
-
return Promise.reject(new TypeError(`The argument passed to
|
|
3104
|
+
return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof source}`));
|
|
3103
3105
|
}
|
|
3104
3106
|
intlTelInput.startedLoadingUtilsScript = true;
|
|
3105
3107
|
return loadCall.then((module) => {
|
|
3106
3108
|
const utils2 = module?.default;
|
|
3107
3109
|
if (!utils2 || typeof utils2 !== "object") {
|
|
3108
|
-
|
|
3109
|
-
throw new TypeError(`The module loaded from ${source} did not set utils as its default export.`);
|
|
3110
|
-
} else {
|
|
3111
|
-
throw new TypeError("The loader function passed to loadUtils did not resolve to a module object with utils as its default export.");
|
|
3112
|
-
}
|
|
3110
|
+
throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
|
|
3113
3111
|
}
|
|
3114
3112
|
intlTelInput.utils = utils2;
|
|
3115
3113
|
forEachInstance("handleUtils");
|
|
@@ -3142,10 +3140,10 @@ var factoryOutput = (() => {
|
|
|
3142
3140
|
},
|
|
3143
3141
|
//* A map from instance ID to instance object.
|
|
3144
3142
|
instances: {},
|
|
3145
|
-
|
|
3143
|
+
attachUtils,
|
|
3146
3144
|
startedLoadingUtilsScript: false,
|
|
3147
3145
|
startedLoadingAutoCountry: false,
|
|
3148
|
-
version: "
|
|
3146
|
+
version: "25.0.1"
|
|
3149
3147
|
}
|
|
3150
3148
|
);
|
|
3151
3149
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -3179,7 +3177,7 @@ var factoryOutput = (() => {
|
|
|
3179
3177
|
return b;
|
|
3180
3178
|
}
|
|
3181
3179
|
;
|
|
3182
|
-
var
|
|
3180
|
+
var da = class {
|
|
3183
3181
|
constructor(a) {
|
|
3184
3182
|
if (ba !== ba) throw Error("SafeUrl is not meant to be built directly");
|
|
3185
3183
|
this.g = a;
|
|
@@ -3188,8 +3186,8 @@ var factoryOutput = (() => {
|
|
|
3188
3186
|
return this.g.toString();
|
|
3189
3187
|
}
|
|
3190
3188
|
}, ba = {};
|
|
3191
|
-
new
|
|
3192
|
-
new
|
|
3189
|
+
new da("about:invalid#zClosurez");
|
|
3190
|
+
new da("about:blank");
|
|
3193
3191
|
const ea = {};
|
|
3194
3192
|
class fa {
|
|
3195
3193
|
constructor() {
|
|
@@ -3368,91 +3366,91 @@ var factoryOutput = (() => {
|
|
|
3368
3366
|
return b;
|
|
3369
3367
|
};
|
|
3370
3368
|
var xa = /^-?[0-9]+$/;
|
|
3371
|
-
function
|
|
3369
|
+
function B() {
|
|
3372
3370
|
}
|
|
3373
|
-
n(
|
|
3374
|
-
|
|
3371
|
+
n(B, z);
|
|
3372
|
+
B.prototype.g = function(a, b) {
|
|
3375
3373
|
a = new a.h();
|
|
3376
3374
|
a.l = this;
|
|
3377
3375
|
a.h = b;
|
|
3378
3376
|
a.g = {};
|
|
3379
3377
|
return a;
|
|
3380
3378
|
};
|
|
3381
|
-
function
|
|
3379
|
+
function C() {
|
|
3382
3380
|
}
|
|
3383
|
-
n(
|
|
3384
|
-
|
|
3381
|
+
n(C, B);
|
|
3382
|
+
C.prototype.h = function(a, b) {
|
|
3385
3383
|
return 8 == a.h ? !!b : z.prototype.h.apply(this, arguments);
|
|
3386
3384
|
};
|
|
3387
|
-
|
|
3388
|
-
return
|
|
3385
|
+
C.prototype.g = function(a, b) {
|
|
3386
|
+
return C.ma.g.call(this, a, b);
|
|
3389
3387
|
};
|
|
3390
|
-
function
|
|
3388
|
+
function D(a, b) {
|
|
3391
3389
|
null != a && this.g.apply(this, arguments);
|
|
3392
3390
|
}
|
|
3393
|
-
|
|
3394
|
-
|
|
3391
|
+
D.prototype.h = "";
|
|
3392
|
+
D.prototype.set = function(a) {
|
|
3395
3393
|
this.h = "" + a;
|
|
3396
3394
|
};
|
|
3397
|
-
|
|
3395
|
+
D.prototype.g = function(a, b, c) {
|
|
3398
3396
|
this.h += String(a);
|
|
3399
3397
|
if (null != b) for (let d = 1; d < arguments.length; d++) this.h += arguments[d];
|
|
3400
3398
|
return this;
|
|
3401
3399
|
};
|
|
3402
|
-
function
|
|
3400
|
+
function E(a) {
|
|
3403
3401
|
a.h = "";
|
|
3404
3402
|
}
|
|
3405
|
-
|
|
3403
|
+
D.prototype.toString = function() {
|
|
3406
3404
|
return this.h;
|
|
3407
3405
|
};
|
|
3408
|
-
function E() {
|
|
3409
|
-
p.call(this);
|
|
3410
|
-
}
|
|
3411
|
-
n(E, p);
|
|
3412
|
-
var za = null;
|
|
3413
3406
|
function F() {
|
|
3414
3407
|
p.call(this);
|
|
3415
3408
|
}
|
|
3416
3409
|
n(F, p);
|
|
3417
|
-
var
|
|
3410
|
+
var ya = null;
|
|
3418
3411
|
function G() {
|
|
3419
3412
|
p.call(this);
|
|
3420
3413
|
}
|
|
3421
3414
|
n(G, p);
|
|
3422
|
-
var
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
E.m = E.prototype.m;
|
|
3415
|
+
var za = null;
|
|
3416
|
+
function H() {
|
|
3417
|
+
p.call(this);
|
|
3418
|
+
}
|
|
3419
|
+
n(H, p);
|
|
3420
|
+
var Aa = null;
|
|
3429
3421
|
F.prototype.m = function() {
|
|
3430
|
-
var a =
|
|
3431
|
-
a || (
|
|
3422
|
+
var a = ya;
|
|
3423
|
+
a || (ya = a = y(F, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: true, i: 9, type: String }, 2: { name: "format", required: true, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: true, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: false, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } }));
|
|
3432
3424
|
return a;
|
|
3433
3425
|
};
|
|
3434
3426
|
F.m = F.prototype.m;
|
|
3435
3427
|
G.prototype.m = function() {
|
|
3436
|
-
var a =
|
|
3437
|
-
a || (
|
|
3428
|
+
var a = za;
|
|
3429
|
+
a || (za = a = y(G, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: true, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: true, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } }));
|
|
3430
|
+
return a;
|
|
3431
|
+
};
|
|
3432
|
+
G.m = G.prototype.m;
|
|
3433
|
+
H.prototype.m = function() {
|
|
3434
|
+
var a = Aa;
|
|
3435
|
+
a || (Aa = a = y(H, {
|
|
3438
3436
|
0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
|
|
3439
|
-
1: { name: "general_desc", i: 11, type:
|
|
3440
|
-
2: { name: "fixed_line", i: 11, type:
|
|
3441
|
-
3: { name: "mobile", i: 11, type:
|
|
3442
|
-
4: { name: "toll_free", i: 11, type:
|
|
3443
|
-
5: { name: "premium_rate", i: 11, type:
|
|
3444
|
-
6: { name: "shared_cost", i: 11, type:
|
|
3445
|
-
7: { name: "personal_number", i: 11, type:
|
|
3446
|
-
8: { name: "voip", i: 11, type:
|
|
3447
|
-
21: { name: "pager", i: 11, type:
|
|
3448
|
-
25: { name: "uan", i: 11, type:
|
|
3449
|
-
27: { name: "emergency", i: 11, type:
|
|
3450
|
-
28: { name: "voicemail", i: 11, type:
|
|
3451
|
-
29: { name: "short_code", i: 11, type:
|
|
3452
|
-
30: { name: "standard_rate", i: 11, type:
|
|
3453
|
-
31: { name: "carrier_specific", i: 11, type:
|
|
3454
|
-
33: { name: "sms_services", i: 11, type:
|
|
3455
|
-
24: { name: "no_international_dialling", i: 11, type:
|
|
3437
|
+
1: { name: "general_desc", i: 11, type: G },
|
|
3438
|
+
2: { name: "fixed_line", i: 11, type: G },
|
|
3439
|
+
3: { name: "mobile", i: 11, type: G },
|
|
3440
|
+
4: { name: "toll_free", i: 11, type: G },
|
|
3441
|
+
5: { name: "premium_rate", i: 11, type: G },
|
|
3442
|
+
6: { name: "shared_cost", i: 11, type: G },
|
|
3443
|
+
7: { name: "personal_number", i: 11, type: G },
|
|
3444
|
+
8: { name: "voip", i: 11, type: G },
|
|
3445
|
+
21: { name: "pager", i: 11, type: G },
|
|
3446
|
+
25: { name: "uan", i: 11, type: G },
|
|
3447
|
+
27: { name: "emergency", i: 11, type: G },
|
|
3448
|
+
28: { name: "voicemail", i: 11, type: G },
|
|
3449
|
+
29: { name: "short_code", i: 11, type: G },
|
|
3450
|
+
30: { name: "standard_rate", i: 11, type: G },
|
|
3451
|
+
31: { name: "carrier_specific", i: 11, type: G },
|
|
3452
|
+
33: { name: "sms_services", i: 11, type: G },
|
|
3453
|
+
24: { name: "no_international_dialling", i: 11, type: G },
|
|
3456
3454
|
9: { name: "id", required: true, i: 9, type: String },
|
|
3457
3455
|
10: { name: "country_code", i: 5, type: Number },
|
|
3458
3456
|
11: { name: "international_prefix", i: 9, type: String },
|
|
@@ -3466,31 +3464,31 @@ var factoryOutput = (() => {
|
|
|
3466
3464
|
},
|
|
3467
3465
|
16: { name: "national_prefix_transform_rule", i: 9, type: String },
|
|
3468
3466
|
18: { name: "same_mobile_and_fixed_line_pattern", i: 8, defaultValue: false, type: Boolean },
|
|
3469
|
-
19: { name: "number_format", aa: true, i: 11, type:
|
|
3470
|
-
20: { name: "intl_number_format", aa: true, i: 11, type:
|
|
3467
|
+
19: { name: "number_format", aa: true, i: 11, type: F },
|
|
3468
|
+
20: { name: "intl_number_format", aa: true, i: 11, type: F },
|
|
3471
3469
|
22: { name: "main_country_for_code", i: 8, defaultValue: false, type: Boolean },
|
|
3472
3470
|
23: { name: "leading_digits", i: 9, type: String }
|
|
3473
3471
|
}));
|
|
3474
3472
|
return a;
|
|
3475
3473
|
};
|
|
3476
|
-
|
|
3477
|
-
function
|
|
3474
|
+
H.m = H.prototype.m;
|
|
3475
|
+
function I() {
|
|
3478
3476
|
p.call(this);
|
|
3479
3477
|
}
|
|
3480
|
-
n(
|
|
3481
|
-
var
|
|
3482
|
-
|
|
3483
|
-
var a =
|
|
3484
|
-
a || (
|
|
3478
|
+
n(I, p);
|
|
3479
|
+
var Ba = null, Ca = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
|
|
3480
|
+
I.prototype.m = function() {
|
|
3481
|
+
var a = Ba;
|
|
3482
|
+
a || (Ba = a = y(I, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: true, i: 5, type: Number }, 2: { name: "national_number", required: true, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: Ca }, 7: {
|
|
3485
3483
|
name: "preferred_domestic_carrier_code",
|
|
3486
3484
|
i: 9,
|
|
3487
3485
|
type: String
|
|
3488
3486
|
} }));
|
|
3489
3487
|
return a;
|
|
3490
3488
|
};
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
var
|
|
3489
|
+
I.ctor = I;
|
|
3490
|
+
I.ctor.m = I.prototype.m;
|
|
3491
|
+
var J = {
|
|
3494
3492
|
1: "US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),
|
|
3495
3493
|
7: ["RU", "KZ"],
|
|
3496
3494
|
20: ["EG"],
|
|
@@ -3706,7 +3704,7 @@ var factoryOutput = (() => {
|
|
|
3706
3704
|
995: ["GE"],
|
|
3707
3705
|
996: ["KG"],
|
|
3708
3706
|
998: ["UZ"]
|
|
3709
|
-
},
|
|
3707
|
+
}, Da = {
|
|
3710
3708
|
AC: [, [
|
|
3711
3709
|
,
|
|
3712
3710
|
,
|
|
@@ -8571,14 +8569,14 @@ var factoryOutput = (() => {
|
|
|
8571
8569
|
], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 888, , , , , , , , 1, [[, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "\\d{11}", , , , "12345678901"], , , [, , , , , , , , , [-1]]],
|
|
8572
8570
|
979: [, [, , "[1359]\\d{8}", , , , , , , [9], [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "[1359]\\d{8}", , , , "123456789", , , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 979, , , , , , , , 1, [[, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]]
|
|
8573
8571
|
};
|
|
8574
|
-
function
|
|
8572
|
+
function K() {
|
|
8575
8573
|
this.g = {};
|
|
8576
8574
|
}
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
return
|
|
8575
|
+
K.h = void 0;
|
|
8576
|
+
K.g = function() {
|
|
8577
|
+
return K.h ? K.h : K.h = new K();
|
|
8580
8578
|
};
|
|
8581
|
-
var
|
|
8579
|
+
var Ea = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "\uFF10": "0", "\uFF11": "1", "\uFF12": "2", "\uFF13": "3", "\uFF14": "4", "\uFF15": "5", "\uFF16": "6", "\uFF17": "7", "\uFF18": "8", "\uFF19": "9", "\u0660": "0", "\u0661": "1", "\u0662": "2", "\u0663": "3", "\u0664": "4", "\u0665": "5", "\u0666": "6", "\u0667": "7", "\u0668": "8", "\u0669": "9", "\u06F0": "0", "\u06F1": "1", "\u06F2": "2", "\u06F3": "3", "\u06F4": "4", "\u06F5": "5", "\u06F6": "6", "\u06F7": "7", "\u06F8": "8", "\u06F9": "9" }, Fa = {
|
|
8582
8580
|
0: "0",
|
|
8583
8581
|
1: "1",
|
|
8584
8582
|
2: "2",
|
|
@@ -8592,7 +8590,7 @@ var factoryOutput = (() => {
|
|
|
8592
8590
|
"+": "+",
|
|
8593
8591
|
"*": "*",
|
|
8594
8592
|
"#": "#"
|
|
8595
|
-
},
|
|
8593
|
+
}, Ga = {
|
|
8596
8594
|
0: "0",
|
|
8597
8595
|
1: "1",
|
|
8598
8596
|
2: "2",
|
|
@@ -8659,48 +8657,48 @@ var factoryOutput = (() => {
|
|
|
8659
8657
|
X: "9",
|
|
8660
8658
|
Y: "9",
|
|
8661
8659
|
Z: "9"
|
|
8662
|
-
},
|
|
8663
|
-
function
|
|
8660
|
+
}, Ha = RegExp("[+\uFF0B]+"), L = RegExp("^[+\uFF0B]+"), Ia = RegExp("([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])"), Ja = RegExp("[+\uFF0B0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]"), Ka = /[\\\/] *x/, La = RegExp("[^0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9A-Za-z#]+$"), Ma = /(?:.*?[A-Za-z]){3}.*/, Na = RegExp("^\\+([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]|[\\-\\.\\(\\)]?)*[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]|[\\-\\.\\(\\)]?)*$"), Oa = RegExp("^([A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]+((\\-)*[A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])*\\.?$");
|
|
8661
|
+
function M(a) {
|
|
8664
8662
|
return "([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]{1," + a + "})";
|
|
8665
8663
|
}
|
|
8666
|
-
function
|
|
8667
|
-
return ";ext=" +
|
|
8664
|
+
function Pa() {
|
|
8665
|
+
return ";ext=" + M("20") + "|[ \xA0\\t,]*(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)[:\\.\uFF0E]?[ \xA0\\t,-]*" + (M("20") + "#?|[ \xA0\\t,]*(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)[:\\.\uFF0E]?[ \xA0\\t,-]*") + (M("9") + "#?|[- ]+") + (M("6") + "#|[ \xA0\\t]*(?:,{2}|;)[:\\.\uFF0E]?[ \xA0\\t,-]*") + (M("15") + "#?|[ \xA0\\t]*(?:,)+[:\\.\uFF0E]?[ \xA0\\t,-]*") + (M("9") + "#?");
|
|
8666
|
+
}
|
|
8667
|
+
var Qa = new RegExp("(?:" + Pa() + ")$", "i"), Ra = new RegExp("^[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]{2}$|^[+\uFF0B]*(?:[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*]*[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]){3,}[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]*(?:" + Pa() + ")?$", "i"), Sa = /(\$\d)/, Ta = /^\(?\$1\)?$/;
|
|
8668
|
+
function Ua(a) {
|
|
8669
|
+
return 2 > a.length ? false : N(Ra, a);
|
|
8668
8670
|
}
|
|
8669
|
-
var Ra = new RegExp("(?:" + Qa() + ")$", "i"), Sa = new RegExp("^[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]{2}$|^[+\uFF0B]*(?:[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*]*[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]){3,}[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]*(?:" + Qa() + ")?$", "i"), Ta = /(\$\d)/, Ua = /^\(?\$1\)?$/;
|
|
8670
8671
|
function Va(a) {
|
|
8671
|
-
return
|
|
8672
|
+
return N(Ma, a) ? O(a, Ga) : O(a, Ea);
|
|
8672
8673
|
}
|
|
8673
8674
|
function Wa(a) {
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
function Xa(a) {
|
|
8677
|
-
var b = Wa(a.toString());
|
|
8678
|
-
D(a);
|
|
8675
|
+
var b = Va(a.toString());
|
|
8676
|
+
E(a);
|
|
8679
8677
|
a.g(b);
|
|
8680
8678
|
}
|
|
8681
|
-
function
|
|
8679
|
+
function Xa(a) {
|
|
8682
8680
|
return null != a && (1 != x(a, 9) || -1 != u(a, 9)[0]);
|
|
8683
8681
|
}
|
|
8684
|
-
function
|
|
8685
|
-
for (var c = new
|
|
8682
|
+
function O(a, b) {
|
|
8683
|
+
for (var c = new D(), d, e = a.length, f = 0; f < e; ++f) d = a.charAt(f), d = b[d.toUpperCase()], null != d && c.g(d);
|
|
8686
8684
|
return c.toString();
|
|
8687
8685
|
}
|
|
8688
|
-
function
|
|
8689
|
-
return 0 == a.length ||
|
|
8686
|
+
function Ya(a) {
|
|
8687
|
+
return 0 == a.length || Ta.test(a);
|
|
8690
8688
|
}
|
|
8691
|
-
function
|
|
8692
|
-
return null != a && isNaN(a) && a.toUpperCase() in
|
|
8689
|
+
function P(a) {
|
|
8690
|
+
return null != a && isNaN(a) && a.toUpperCase() in Da;
|
|
8693
8691
|
}
|
|
8694
|
-
|
|
8692
|
+
K.prototype.format = function(a, b) {
|
|
8695
8693
|
if (0 == r(a, 2) && q(a, 5)) {
|
|
8696
8694
|
var c = w(a, 5);
|
|
8697
8695
|
if (0 < c.length) return c;
|
|
8698
8696
|
}
|
|
8699
8697
|
c = w(a, 1);
|
|
8700
|
-
var d =
|
|
8701
|
-
if (0 == b) return
|
|
8702
|
-
if (!(c in
|
|
8703
|
-
var e =
|
|
8698
|
+
var d = Q(a);
|
|
8699
|
+
if (0 == b) return Za(c, 0, d, "");
|
|
8700
|
+
if (!(c in J)) return d;
|
|
8701
|
+
var e = R(this, c, S(c));
|
|
8704
8702
|
a = q(a, 3) && 0 != r(a, 3).length ? 3 == b ? ";ext=" + r(a, 3) : q(e, 13) ? r(e, 13) + w(a, 3) : " ext. " + w(a, 3) : "";
|
|
8705
8703
|
a: {
|
|
8706
8704
|
e = 0 == u(e, 20).length || 2 == b ? u(e, 19) : u(e, 20);
|
|
@@ -8708,7 +8706,7 @@ var factoryOutput = (() => {
|
|
|
8708
8706
|
f = e[h];
|
|
8709
8707
|
var l = x(f, 3);
|
|
8710
8708
|
if (0 == l || 0 == d.search(r(f, 3, l - 1))) {
|
|
8711
|
-
if (l = new RegExp(r(f, 1)),
|
|
8709
|
+
if (l = new RegExp(r(f, 1)), N(l, d)) {
|
|
8712
8710
|
e = f;
|
|
8713
8711
|
break a;
|
|
8714
8712
|
}
|
|
@@ -8719,18 +8717,18 @@ var factoryOutput = (() => {
|
|
|
8719
8717
|
null != e && (g = e, e = w(g, 2), f = new RegExp(r(g, 1)), w(
|
|
8720
8718
|
g,
|
|
8721
8719
|
5
|
|
8722
|
-
), g = w(g, 4), d = 2 == b && null != g && 0 < g.length ? d.replace(f, e.replace(
|
|
8723
|
-
return
|
|
8720
|
+
), g = w(g, 4), d = 2 == b && null != g && 0 < g.length ? d.replace(f, e.replace(Sa, g)) : d.replace(f, e), 3 == b && (d = d.replace(RegExp("^[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]+"), ""), d = d.replace(RegExp("[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]+", "g"), "-")));
|
|
8721
|
+
return Za(c, b, d, a);
|
|
8724
8722
|
};
|
|
8725
|
-
function
|
|
8726
|
-
return "001" == c ?
|
|
8723
|
+
function R(a, b, c) {
|
|
8724
|
+
return "001" == c ? T(a, "" + b) : T(a, c);
|
|
8727
8725
|
}
|
|
8728
|
-
function
|
|
8726
|
+
function Q(a) {
|
|
8729
8727
|
if (!q(a, 2)) return "";
|
|
8730
8728
|
var b = "" + r(a, 2);
|
|
8731
8729
|
return q(a, 4) && r(a, 4) && 0 < w(a, 8) ? Array(w(a, 8) + 1).join("0") + b : b;
|
|
8732
8730
|
}
|
|
8733
|
-
function
|
|
8731
|
+
function Za(a, b, c, d) {
|
|
8734
8732
|
switch (b) {
|
|
8735
8733
|
case 0:
|
|
8736
8734
|
return "+" + a + c + d;
|
|
@@ -8742,7 +8740,7 @@ var factoryOutput = (() => {
|
|
|
8742
8740
|
return c + d;
|
|
8743
8741
|
}
|
|
8744
8742
|
}
|
|
8745
|
-
function
|
|
8743
|
+
function U(a, b) {
|
|
8746
8744
|
switch (b) {
|
|
8747
8745
|
case 4:
|
|
8748
8746
|
return r(a, 5);
|
|
@@ -8769,42 +8767,56 @@ var factoryOutput = (() => {
|
|
|
8769
8767
|
return r(a, 1);
|
|
8770
8768
|
}
|
|
8771
8769
|
}
|
|
8772
|
-
function
|
|
8773
|
-
|
|
8770
|
+
function $a(a, b) {
|
|
8771
|
+
var c = ab(a, b);
|
|
8772
|
+
a = R(a, w(b, 1), c);
|
|
8773
|
+
if (null == a) return -1;
|
|
8774
|
+
b = Q(b);
|
|
8775
|
+
return bb(b, a);
|
|
8774
8776
|
}
|
|
8775
|
-
function
|
|
8777
|
+
function bb(a, b) {
|
|
8778
|
+
return V(a, r(b, 1)) ? V(a, r(b, 5)) ? 4 : V(a, r(b, 4)) ? 3 : V(a, r(b, 6)) ? 5 : V(a, r(b, 8)) ? 6 : V(a, r(b, 7)) ? 7 : V(a, r(b, 21)) ? 8 : V(a, r(b, 25)) ? 9 : V(a, r(b, 28)) ? 10 : V(a, r(b, 2)) ? r(b, 18) || V(a, r(b, 3)) ? 2 : 0 : !r(b, 18) && V(a, r(b, 3)) ? 1 : -1 : -1;
|
|
8779
|
+
}
|
|
8780
|
+
function T(a, b) {
|
|
8776
8781
|
if (null == b) return null;
|
|
8777
8782
|
b = b.toUpperCase();
|
|
8778
8783
|
var c = a.g[b];
|
|
8779
8784
|
if (null == c) {
|
|
8780
|
-
c =
|
|
8785
|
+
c = Da[b];
|
|
8781
8786
|
if (null == c) return null;
|
|
8782
|
-
c = new
|
|
8787
|
+
c = new C().g(H.m(), c);
|
|
8783
8788
|
a.g[b] = c;
|
|
8784
8789
|
}
|
|
8785
8790
|
return c;
|
|
8786
8791
|
}
|
|
8787
|
-
function
|
|
8792
|
+
function V(a, b) {
|
|
8788
8793
|
var c = a.length;
|
|
8789
|
-
return 0 < x(b, 9) && -1 == u(b, 9).indexOf(c) ? false :
|
|
8794
|
+
return 0 < x(b, 9) && -1 == u(b, 9).indexOf(c) ? false : N(w(b, 2), a);
|
|
8790
8795
|
}
|
|
8791
|
-
function
|
|
8796
|
+
function cb(a, b) {
|
|
8797
|
+
var c = ab(a, b);
|
|
8798
|
+
var d = w(b, 1);
|
|
8799
|
+
var e = R(a, d, c);
|
|
8800
|
+
null == e || "001" != c && d != db(a, c) ? e = false : (a = Q(b), e = -1 != bb(a, e));
|
|
8801
|
+
return e;
|
|
8802
|
+
}
|
|
8803
|
+
function ab(a, b) {
|
|
8792
8804
|
if (null == b) return null;
|
|
8793
8805
|
var c = w(b, 1);
|
|
8794
|
-
c =
|
|
8806
|
+
c = J[c];
|
|
8795
8807
|
if (null == c) a = null;
|
|
8796
8808
|
else if (1 == c.length) a = c[0];
|
|
8797
8809
|
else a: {
|
|
8798
|
-
b =
|
|
8810
|
+
b = Q(b);
|
|
8799
8811
|
for (var d, e = c.length, f = 0; f < e; f++) {
|
|
8800
8812
|
d = c[f];
|
|
8801
|
-
var g =
|
|
8813
|
+
var g = T(a, d);
|
|
8802
8814
|
if (q(g, 23)) {
|
|
8803
8815
|
if (0 == b.search(r(g, 23))) {
|
|
8804
8816
|
a = d;
|
|
8805
8817
|
break a;
|
|
8806
8818
|
}
|
|
8807
|
-
} else if (-1 !=
|
|
8819
|
+
} else if (-1 != bb(b, g)) {
|
|
8808
8820
|
a = d;
|
|
8809
8821
|
break a;
|
|
8810
8822
|
}
|
|
@@ -8813,92 +8825,92 @@ var factoryOutput = (() => {
|
|
|
8813
8825
|
}
|
|
8814
8826
|
return a;
|
|
8815
8827
|
}
|
|
8816
|
-
function
|
|
8817
|
-
a =
|
|
8828
|
+
function S(a) {
|
|
8829
|
+
a = J[a];
|
|
8818
8830
|
return null == a ? "ZZ" : a[0];
|
|
8819
8831
|
}
|
|
8820
|
-
function
|
|
8821
|
-
a =
|
|
8832
|
+
function db(a, b) {
|
|
8833
|
+
a = T(a, b);
|
|
8822
8834
|
if (null == a) throw Error("Invalid region code: " + b);
|
|
8823
8835
|
return w(a, 10);
|
|
8824
8836
|
}
|
|
8825
|
-
function
|
|
8826
|
-
var e =
|
|
8837
|
+
function W(a, b, c, d) {
|
|
8838
|
+
var e = U(c, d), f = 0 == x(e, 9) ? u(r(c, 1), 9) : u(e, 9);
|
|
8827
8839
|
e = u(e, 10);
|
|
8828
|
-
if (2 == d) if (
|
|
8829
|
-
else return
|
|
8840
|
+
if (2 == d) if (Xa(U(c, 0))) a = U(c, 1), Xa(a) && (f = f.concat(0 == x(a, 9) ? u(r(c, 1), 9) : u(a, 9)), f.sort(), 0 == e.length ? e = u(a, 10) : (e = e.concat(u(a, 10)), e.sort()));
|
|
8841
|
+
else return W(a, b, c, 1);
|
|
8830
8842
|
if (-1 == f[0]) return 5;
|
|
8831
8843
|
b = b.length;
|
|
8832
8844
|
if (-1 < e.indexOf(b)) return 4;
|
|
8833
8845
|
c = f[0];
|
|
8834
8846
|
return c == b ? 0 : c > b ? 2 : f[f.length - 1] < b ? 3 : -1 < f.indexOf(b, 1) ? 0 : 5;
|
|
8835
8847
|
}
|
|
8836
|
-
function
|
|
8837
|
-
var d =
|
|
8848
|
+
function X(a, b, c) {
|
|
8849
|
+
var d = Q(b);
|
|
8838
8850
|
b = w(b, 1);
|
|
8839
|
-
if (!(b in
|
|
8840
|
-
b =
|
|
8841
|
-
return
|
|
8851
|
+
if (!(b in J)) return 1;
|
|
8852
|
+
b = R(a, b, S(b));
|
|
8853
|
+
return W(a, d, b, c);
|
|
8842
8854
|
}
|
|
8843
|
-
function
|
|
8855
|
+
function eb(a, b) {
|
|
8844
8856
|
a = a.toString();
|
|
8845
8857
|
if (0 == a.length || "0" == a.charAt(0)) return 0;
|
|
8846
|
-
for (var c, d = a.length, e = 1; 3 >= e && e <= d; ++e) if (c = parseInt(a.substring(0, e), 10), c in
|
|
8858
|
+
for (var c, d = a.length, e = 1; 3 >= e && e <= d; ++e) if (c = parseInt(a.substring(0, e), 10), c in J) return b.g(a.substring(e)), c;
|
|
8847
8859
|
return 0;
|
|
8848
8860
|
}
|
|
8849
|
-
function
|
|
8861
|
+
function fb(a, b, c, d, e, f) {
|
|
8850
8862
|
if (0 == b.length) return 0;
|
|
8851
|
-
b = new
|
|
8863
|
+
b = new D(b);
|
|
8852
8864
|
var g;
|
|
8853
8865
|
null != c && (g = r(c, 11));
|
|
8854
8866
|
null == g && (g = "NonMatch");
|
|
8855
8867
|
var h = b.toString();
|
|
8856
8868
|
if (0 == h.length) g = 20;
|
|
8857
|
-
else if (
|
|
8869
|
+
else if (L.test(h)) h = h.replace(L, ""), E(b), b.g(Va(h)), g = 1;
|
|
8858
8870
|
else {
|
|
8859
8871
|
h = new RegExp(g);
|
|
8860
|
-
|
|
8872
|
+
Wa(b);
|
|
8861
8873
|
g = b.toString();
|
|
8862
8874
|
if (0 == g.search(h)) {
|
|
8863
8875
|
h = g.match(h)[0].length;
|
|
8864
|
-
var l = g.substring(h).match(
|
|
8865
|
-
l && null != l[1] && 0 < l[1].length && "0" ==
|
|
8876
|
+
var l = g.substring(h).match(Ia);
|
|
8877
|
+
l && null != l[1] && 0 < l[1].length && "0" == O(l[1], Ea) ? g = false : (E(b), b.g(g.substring(h)), g = true);
|
|
8866
8878
|
} else g = false;
|
|
8867
8879
|
g = g ? 5 : 20;
|
|
8868
8880
|
}
|
|
8869
8881
|
e && t(f, 6, g);
|
|
8870
8882
|
if (20 != g) {
|
|
8871
8883
|
if (2 >= b.h.length) throw Error("Phone number too short after IDD");
|
|
8872
|
-
a =
|
|
8884
|
+
a = eb(b, d);
|
|
8873
8885
|
if (0 != a) return t(f, 1, a), a;
|
|
8874
8886
|
throw Error("Invalid country calling code");
|
|
8875
8887
|
}
|
|
8876
|
-
if (null != c && (g = w(c, 10), h = "" + g, l = b.toString(), 0 == l.lastIndexOf(h, 0) && (h = new
|
|
8888
|
+
if (null != c && (g = w(c, 10), h = "" + g, l = b.toString(), 0 == l.lastIndexOf(h, 0) && (h = new D(l.substring(h.length)), l = r(c, 1), l = new RegExp(w(l, 2)), gb(h, c, null), h = h.toString(), !N(l, b.toString()) && N(l, h) || 3 == W(a, b.toString(), c, -1)))) return d.g(h), e && t(f, 6, 10), t(f, 1, g), g;
|
|
8877
8889
|
t(f, 1, 0);
|
|
8878
8890
|
return 0;
|
|
8879
8891
|
}
|
|
8880
|
-
function
|
|
8892
|
+
function gb(a, b, c) {
|
|
8881
8893
|
var d = a.toString(), e = d.length, f = r(b, 15);
|
|
8882
8894
|
if (0 != e && null != f && 0 != f.length) {
|
|
8883
8895
|
var g = new RegExp("^(?:" + f + ")");
|
|
8884
8896
|
if (e = g.exec(d)) {
|
|
8885
8897
|
f = new RegExp(w(r(b, 1), 2));
|
|
8886
|
-
var h =
|
|
8898
|
+
var h = N(f, d), l = e.length - 1;
|
|
8887
8899
|
b = r(b, 16);
|
|
8888
8900
|
if (null == b || 0 == b.length || null == e[l] || 0 == e[l].length) {
|
|
8889
|
-
if (!h ||
|
|
8890
|
-
} else if (d = d.replace(g, b), !h ||
|
|
8901
|
+
if (!h || N(f, d.substring(e[0].length))) null != c && 0 < l && null != e[l] && c.g(e[1]), a.set(d.substring(e[0].length));
|
|
8902
|
+
} else if (d = d.replace(g, b), !h || N(f, d)) null != c && 0 < l && c.g(e[1]), a.set(d);
|
|
8891
8903
|
}
|
|
8892
8904
|
}
|
|
8893
8905
|
}
|
|
8894
|
-
function
|
|
8895
|
-
if (!
|
|
8896
|
-
return
|
|
8906
|
+
function Y(a, b, c) {
|
|
8907
|
+
if (!P(c) && 0 < b.length && "+" != b.charAt(0)) throw Error("Invalid country calling code");
|
|
8908
|
+
return hb(a, b, c, true);
|
|
8897
8909
|
}
|
|
8898
|
-
function
|
|
8910
|
+
function hb(a, b, c, d) {
|
|
8899
8911
|
if (null == b) throw Error("The string supplied did not seem to be a phone number");
|
|
8900
8912
|
if (250 < b.length) throw Error("The string supplied is too long to be a phone number");
|
|
8901
|
-
var e = new
|
|
8913
|
+
var e = new D();
|
|
8902
8914
|
var f = b.indexOf(";phone-context=");
|
|
8903
8915
|
if (-1 === f) f = null;
|
|
8904
8916
|
else if (f += 15, f >= b.length) f = "";
|
|
@@ -8907,24 +8919,24 @@ var factoryOutput = (() => {
|
|
|
8907
8919
|
f = -1 !== g ? b.substring(f, g) : b.substring(f);
|
|
8908
8920
|
}
|
|
8909
8921
|
var h = f;
|
|
8910
|
-
null == h ? g = true : 0 === h.length ? g = false : (g =
|
|
8922
|
+
null == h ? g = true : 0 === h.length ? g = false : (g = Na.exec(h), h = Oa.exec(h), g = null !== g || null !== h);
|
|
8911
8923
|
if (!g) throw Error("The string supplied did not seem to be a phone number");
|
|
8912
|
-
null != f ? ("+" === f.charAt(0) && e.g(f), f = b.indexOf("tel:"), e.g(b.substring(0 <= f ? f + 4 : 0, b.indexOf(";phone-context=")))) : (f = e.g, g = b ?? "", h = g.search(
|
|
8924
|
+
null != f ? ("+" === f.charAt(0) && e.g(f), f = b.indexOf("tel:"), e.g(b.substring(0 <= f ? f + 4 : 0, b.indexOf(";phone-context=")))) : (f = e.g, g = b ?? "", h = g.search(Ja), 0 <= h ? (g = g.substring(h), g = g.replace(La, ""), h = g.search(Ka), 0 <= h && (g = g.substring(0, h))) : g = "", f.call(e, g));
|
|
8913
8925
|
f = e.toString();
|
|
8914
8926
|
g = f.indexOf(";isub=");
|
|
8915
|
-
0 < g && (
|
|
8916
|
-
if (!
|
|
8927
|
+
0 < g && (E(e), e.g(f.substring(0, g)));
|
|
8928
|
+
if (!Ua(e.toString())) throw Error("The string supplied did not seem to be a phone number");
|
|
8917
8929
|
f = e.toString();
|
|
8918
|
-
if (!(
|
|
8919
|
-
f = new
|
|
8930
|
+
if (!(P(c) || null != f && 0 < f.length && L.test(f))) throw Error("Invalid country calling code");
|
|
8931
|
+
f = new I();
|
|
8920
8932
|
d && t(f, 5, b);
|
|
8921
8933
|
a: {
|
|
8922
8934
|
b = e.toString();
|
|
8923
|
-
g = b.search(
|
|
8924
|
-
if (0 <= g &&
|
|
8925
|
-
h = b.match(
|
|
8935
|
+
g = b.search(Qa);
|
|
8936
|
+
if (0 <= g && Ua(b.substring(0, g))) {
|
|
8937
|
+
h = b.match(Qa);
|
|
8926
8938
|
for (var l = h.length, A = 1; A < l; ++A) if (null != h[A] && 0 < h[A].length) {
|
|
8927
|
-
|
|
8939
|
+
E(e);
|
|
8928
8940
|
e.g(b.substring(0, g));
|
|
8929
8941
|
b = h[A];
|
|
8930
8942
|
break a;
|
|
@@ -8933,24 +8945,24 @@ var factoryOutput = (() => {
|
|
|
8933
8945
|
b = "";
|
|
8934
8946
|
}
|
|
8935
8947
|
0 < b.length && t(f, 3, b);
|
|
8936
|
-
g =
|
|
8937
|
-
b = new
|
|
8948
|
+
g = T(a, c);
|
|
8949
|
+
b = new D();
|
|
8938
8950
|
h = 0;
|
|
8939
8951
|
l = e.toString();
|
|
8940
8952
|
try {
|
|
8941
|
-
h =
|
|
8942
|
-
} catch (
|
|
8943
|
-
if ("Invalid country calling code" ==
|
|
8944
|
-
if (l = l.replace(
|
|
8945
|
-
} else throw
|
|
8953
|
+
h = fb(a, l, g, b, d, f);
|
|
8954
|
+
} catch (ca) {
|
|
8955
|
+
if ("Invalid country calling code" == ca.message && L.test(l)) {
|
|
8956
|
+
if (l = l.replace(L, ""), h = fb(a, l, g, b, d, f), 0 == h) throw ca;
|
|
8957
|
+
} else throw ca;
|
|
8946
8958
|
}
|
|
8947
|
-
0 != h ? (e =
|
|
8959
|
+
0 != h ? (e = S(h), e != c && (g = R(a, h, e))) : (Wa(e), b.g(e.toString()), null != c ? (h = w(g, 10), t(
|
|
8948
8960
|
f,
|
|
8949
8961
|
1,
|
|
8950
8962
|
h
|
|
8951
8963
|
)) : d && (delete f.h[6], f.g && delete f.g[6]));
|
|
8952
8964
|
if (2 > b.h.length) throw Error("The string supplied is too short to be a phone number");
|
|
8953
|
-
null != g && (c = new
|
|
8965
|
+
null != g && (c = new D(), e = new D(b.toString()), gb(e, g, c), a = W(a, e.toString(), g, -1), 2 != a && 4 != a && 5 != a && (b = e, d && 0 < c.toString().length && t(f, 7, c.toString())));
|
|
8954
8966
|
d = b.toString();
|
|
8955
8967
|
a = d.length;
|
|
8956
8968
|
if (2 > a) throw Error("The string supplied is too short to be a phone number");
|
|
@@ -8963,70 +8975,70 @@ var factoryOutput = (() => {
|
|
|
8963
8975
|
t(f, 2, parseInt(d, 10));
|
|
8964
8976
|
return f;
|
|
8965
8977
|
}
|
|
8966
|
-
function
|
|
8978
|
+
function N(a, b) {
|
|
8967
8979
|
return (a = "string" == typeof a ? b.match("^(?:" + a + ")$") : b.match(a)) && a[0].length == b.length ? true : false;
|
|
8968
8980
|
}
|
|
8969
8981
|
;
|
|
8970
|
-
function
|
|
8982
|
+
function ib(a) {
|
|
8971
8983
|
this.fa = RegExp("\u2008");
|
|
8972
8984
|
this.ja = "";
|
|
8973
|
-
this.v = new
|
|
8985
|
+
this.v = new D();
|
|
8974
8986
|
this.da = "";
|
|
8975
|
-
this.s = new
|
|
8976
|
-
this.ba = new
|
|
8987
|
+
this.s = new D();
|
|
8988
|
+
this.ba = new D();
|
|
8977
8989
|
this.u = true;
|
|
8978
8990
|
this.ea = this.ca = this.la = false;
|
|
8979
|
-
this.ga =
|
|
8991
|
+
this.ga = K.g();
|
|
8980
8992
|
this.$ = 0;
|
|
8981
|
-
this.h = new
|
|
8993
|
+
this.h = new D();
|
|
8982
8994
|
this.ha = false;
|
|
8983
8995
|
this.o = "";
|
|
8984
|
-
this.g = new
|
|
8996
|
+
this.g = new D();
|
|
8985
8997
|
this.j = [];
|
|
8986
8998
|
this.ka = a;
|
|
8987
|
-
this.l =
|
|
8999
|
+
this.l = jb(this, this.ka);
|
|
8988
9000
|
}
|
|
8989
|
-
var
|
|
8990
|
-
t(
|
|
8991
|
-
var
|
|
8992
|
-
function
|
|
9001
|
+
var kb = new H();
|
|
9002
|
+
t(kb, 11, "NA");
|
|
9003
|
+
var lb = RegExp("^[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*\\$1[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*(\\$\\d[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*)*$"), mb = /[- ]/;
|
|
9004
|
+
function jb(a, b) {
|
|
8993
9005
|
var c = a.ga;
|
|
8994
|
-
b =
|
|
8995
|
-
a =
|
|
8996
|
-
return null != a ? a :
|
|
9006
|
+
b = P(b) ? db(c, b) : 0;
|
|
9007
|
+
a = T(a.ga, S(b));
|
|
9008
|
+
return null != a ? a : kb;
|
|
8997
9009
|
}
|
|
8998
|
-
function
|
|
9010
|
+
function nb(a) {
|
|
8999
9011
|
for (var b = a.j.length, c = 0; c < b; ++c) {
|
|
9000
9012
|
var d = a.j[c], e = w(d, 1);
|
|
9001
9013
|
if (a.da == e) return false;
|
|
9002
9014
|
var f = a;
|
|
9003
9015
|
var g = d, h = w(g, 1);
|
|
9004
|
-
|
|
9016
|
+
E(f.v);
|
|
9005
9017
|
var l = f;
|
|
9006
9018
|
g = w(g, 2);
|
|
9007
9019
|
var A = "999999999999999".match(h)[0];
|
|
9008
9020
|
A.length < l.g.h.length ? l = "" : (l = A.replace(new RegExp(h, "g"), g), l = l.replace(RegExp("9", "g"), "\u2008"));
|
|
9009
9021
|
0 < l.length ? (f.v.g(l), f = true) : f = false;
|
|
9010
|
-
if (f) return a.da = e, a.ha =
|
|
9022
|
+
if (f) return a.da = e, a.ha = mb.test(r(d, 4)), a.$ = 0, true;
|
|
9011
9023
|
}
|
|
9012
9024
|
return a.u = false;
|
|
9013
9025
|
}
|
|
9014
|
-
function
|
|
9026
|
+
function ob(a, b) {
|
|
9015
9027
|
for (var c = [], d = b.length - 3, e = a.j.length, f = 0; f < e; ++f) {
|
|
9016
9028
|
var g = a.j[f];
|
|
9017
9029
|
0 == x(g, 3) ? c.push(a.j[f]) : (g = r(g, 3, Math.min(d, x(g, 3) - 1)), 0 == b.search(g) && c.push(a.j[f]));
|
|
9018
9030
|
}
|
|
9019
9031
|
a.j = c;
|
|
9020
9032
|
}
|
|
9021
|
-
function
|
|
9033
|
+
function pb(a, b) {
|
|
9022
9034
|
a.s.g(b);
|
|
9023
9035
|
var c = b;
|
|
9024
|
-
|
|
9036
|
+
Ia.test(c) || 1 == a.s.h.length && Ha.test(c) ? ("+" == b ? (c = b, a.ba.g(b)) : (c = Ea[b], a.ba.g(c), a.g.g(c)), b = c) : (a.u = false, a.la = true);
|
|
9025
9037
|
if (!a.u) {
|
|
9026
9038
|
if (!a.la) {
|
|
9027
|
-
if (
|
|
9028
|
-
if (
|
|
9029
|
-
} else if (0 < a.o.length && (b = a.g.toString(),
|
|
9039
|
+
if (qb(a)) {
|
|
9040
|
+
if (rb(a)) return sb(a);
|
|
9041
|
+
} else if (0 < a.o.length && (b = a.g.toString(), E(a.g), a.g.g(a.o), a.g.g(b), b = a.h.toString(), c = b.lastIndexOf(a.o), E(a.h), a.h.g(b.substring(0, c))), a.o != tb(a)) return a.h.g(" "), sb(a);
|
|
9030
9042
|
}
|
|
9031
9043
|
return a.s.toString();
|
|
9032
9044
|
}
|
|
@@ -9036,93 +9048,93 @@ var factoryOutput = (() => {
|
|
|
9036
9048
|
case 2:
|
|
9037
9049
|
return a.s.toString();
|
|
9038
9050
|
case 3:
|
|
9039
|
-
if (
|
|
9040
|
-
else return a.o =
|
|
9051
|
+
if (qb(a)) a.ea = true;
|
|
9052
|
+
else return a.o = tb(a), ub(a);
|
|
9041
9053
|
default:
|
|
9042
|
-
if (a.ea) return
|
|
9054
|
+
if (a.ea) return rb(a) && (a.ea = false), a.h.toString() + a.g.toString();
|
|
9043
9055
|
if (0 < a.j.length) {
|
|
9044
|
-
b =
|
|
9045
|
-
c =
|
|
9056
|
+
b = vb(a, b);
|
|
9057
|
+
c = wb(a);
|
|
9046
9058
|
if (0 < c.length) return c;
|
|
9047
|
-
|
|
9048
|
-
return
|
|
9059
|
+
ob(a, a.g.toString());
|
|
9060
|
+
return nb(a) ? xb(a) : a.u ? Z(a, b) : a.s.toString();
|
|
9049
9061
|
}
|
|
9050
|
-
return
|
|
9062
|
+
return ub(a);
|
|
9051
9063
|
}
|
|
9052
9064
|
}
|
|
9053
|
-
function
|
|
9065
|
+
function sb(a) {
|
|
9054
9066
|
a.u = true;
|
|
9055
9067
|
a.ea = false;
|
|
9056
9068
|
a.j = [];
|
|
9057
9069
|
a.$ = 0;
|
|
9058
|
-
|
|
9070
|
+
E(a.v);
|
|
9059
9071
|
a.da = "";
|
|
9060
|
-
return
|
|
9072
|
+
return ub(a);
|
|
9061
9073
|
}
|
|
9062
|
-
function
|
|
9074
|
+
function wb(a) {
|
|
9063
9075
|
for (var b = a.g.toString(), c = a.j.length, d = 0; d < c; ++d) {
|
|
9064
9076
|
var e = a.j[d], f = w(e, 1);
|
|
9065
|
-
if (new RegExp("^(?:" + f + ")$").test(b) && (a.ha =
|
|
9077
|
+
if (new RegExp("^(?:" + f + ")$").test(b) && (a.ha = mb.test(r(e, 4)), e = b.replace(new RegExp(f, "g"), r(e, 2)), e = Z(a, e), O(e, Fa) == a.ba)) return e;
|
|
9066
9078
|
}
|
|
9067
9079
|
return "";
|
|
9068
9080
|
}
|
|
9069
|
-
function
|
|
9081
|
+
function Z(a, b) {
|
|
9070
9082
|
var c = a.h.h.length;
|
|
9071
9083
|
return a.ha && 0 < c && " " != a.h.toString().charAt(c - 1) ? a.h + " " + b : a.h + b;
|
|
9072
9084
|
}
|
|
9073
|
-
function
|
|
9085
|
+
function ub(a) {
|
|
9074
9086
|
var b = a.g.toString();
|
|
9075
9087
|
if (3 <= b.length) {
|
|
9076
9088
|
for (var c = a.ca && 0 == a.o.length && 0 < x(a.l, 20) ? u(a.l, 20) : u(a.l, 19), d = c.length, e = 0; e < d; ++e) {
|
|
9077
9089
|
var f = c[e];
|
|
9078
|
-
0 < a.o.length &&
|
|
9090
|
+
0 < a.o.length && Ya(w(f, 4)) && !r(f, 6) && !q(f, 5) || (0 != a.o.length || a.ca || Ya(w(f, 4)) || r(f, 6)) && lb.test(w(f, 2)) && a.j.push(f);
|
|
9079
9091
|
}
|
|
9080
|
-
|
|
9081
|
-
b =
|
|
9082
|
-
return 0 < b.length ? b :
|
|
9092
|
+
ob(a, b);
|
|
9093
|
+
b = wb(a);
|
|
9094
|
+
return 0 < b.length ? b : nb(a) ? xb(a) : a.s.toString();
|
|
9083
9095
|
}
|
|
9084
|
-
return
|
|
9096
|
+
return Z(a, b);
|
|
9085
9097
|
}
|
|
9086
|
-
function
|
|
9098
|
+
function xb(a) {
|
|
9087
9099
|
var b = a.g.toString(), c = b.length;
|
|
9088
9100
|
if (0 < c) {
|
|
9089
|
-
for (var d = "", e = 0; e < c; e++) d =
|
|
9090
|
-
return a.u ?
|
|
9101
|
+
for (var d = "", e = 0; e < c; e++) d = vb(a, b.charAt(e));
|
|
9102
|
+
return a.u ? Z(a, d) : a.s.toString();
|
|
9091
9103
|
}
|
|
9092
9104
|
return a.h.toString();
|
|
9093
9105
|
}
|
|
9094
|
-
function
|
|
9106
|
+
function tb(a) {
|
|
9095
9107
|
var b = a.g.toString(), c = 0;
|
|
9096
9108
|
if (1 != r(a.l, 10)) var d = false;
|
|
9097
9109
|
else d = a.g.toString(), d = "1" == d.charAt(0) && "0" != d.charAt(1) && "1" != d.charAt(1);
|
|
9098
9110
|
d ? (c = 1, a.h.g("1").g(" "), a.ca = true) : q(a.l, 15) && (d = new RegExp("^(?:" + r(a.l, 15) + ")"), d = b.match(d), null != d && null != d[0] && 0 < d[0].length && (a.ca = true, c = d[0].length, a.h.g(b.substring(0, c))));
|
|
9099
|
-
|
|
9111
|
+
E(a.g);
|
|
9100
9112
|
a.g.g(b.substring(c));
|
|
9101
9113
|
return b.substring(0, c);
|
|
9102
9114
|
}
|
|
9103
|
-
function
|
|
9115
|
+
function qb(a) {
|
|
9104
9116
|
var b = a.ba.toString(), c = new RegExp("^(?:\\+|" + r(a.l, 11) + ")");
|
|
9105
9117
|
c = b.match(c);
|
|
9106
|
-
return null != c && null != c[0] && 0 < c[0].length ? (a.ca = true, c = c[0].length,
|
|
9118
|
+
return null != c && null != c[0] && 0 < c[0].length ? (a.ca = true, c = c[0].length, E(a.g), a.g.g(b.substring(c)), E(a.h), a.h.g(b.substring(0, c)), "+" != b.charAt(0) && a.h.g(" "), true) : false;
|
|
9107
9119
|
}
|
|
9108
|
-
function
|
|
9120
|
+
function rb(a) {
|
|
9109
9121
|
if (0 == a.g.h.length) return false;
|
|
9110
|
-
var b = new
|
|
9122
|
+
var b = new D(), c = eb(a.g, b);
|
|
9111
9123
|
if (0 == c) return false;
|
|
9112
|
-
|
|
9124
|
+
E(a.g);
|
|
9113
9125
|
a.g.g(b.toString());
|
|
9114
|
-
b =
|
|
9115
|
-
"001" == b ? a.l =
|
|
9126
|
+
b = S(c);
|
|
9127
|
+
"001" == b ? a.l = T(a.ga, "" + c) : b != a.ka && (a.l = jb(a, b));
|
|
9116
9128
|
a.h.g("" + c).g(" ");
|
|
9117
9129
|
a.o = "";
|
|
9118
9130
|
return true;
|
|
9119
9131
|
}
|
|
9120
|
-
function
|
|
9132
|
+
function vb(a, b) {
|
|
9121
9133
|
var c = a.v.toString();
|
|
9122
9134
|
if (0 <= c.substring(a.$).search(a.fa)) {
|
|
9123
9135
|
var d = c.search(a.fa);
|
|
9124
9136
|
b = c.replace(a.fa, b);
|
|
9125
|
-
|
|
9137
|
+
E(a.v);
|
|
9126
9138
|
a.v.g(b);
|
|
9127
9139
|
a.$ = d;
|
|
9128
9140
|
return b.substring(0, a.$ + 1);
|
|
@@ -9132,13 +9144,13 @@ var factoryOutput = (() => {
|
|
|
9132
9144
|
return a.s.toString();
|
|
9133
9145
|
}
|
|
9134
9146
|
;
|
|
9135
|
-
const
|
|
9147
|
+
const yb = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
|
|
9136
9148
|
m("intlTelInputUtilsTemp", {});
|
|
9137
9149
|
m("intlTelInputUtilsTemp.formatNumberAsYouType", (a, b) => {
|
|
9138
9150
|
try {
|
|
9139
|
-
const c = a.replace(/[^+0-9]/g, ""), d = new
|
|
9151
|
+
const c = a.replace(/[^+0-9]/g, ""), d = new ib(b);
|
|
9140
9152
|
b = "";
|
|
9141
|
-
for (let e = 0; e < c.length; e++) d.ja =
|
|
9153
|
+
for (let e = 0; e < c.length; e++) d.ja = pb(d, c.charAt(e)), b = d.ja;
|
|
9142
9154
|
return b;
|
|
9143
9155
|
} catch {
|
|
9144
9156
|
return a;
|
|
@@ -9146,8 +9158,8 @@ var factoryOutput = (() => {
|
|
|
9146
9158
|
});
|
|
9147
9159
|
m("intlTelInputUtilsTemp.formatNumber", (a, b, c) => {
|
|
9148
9160
|
try {
|
|
9149
|
-
const e =
|
|
9150
|
-
var d =
|
|
9161
|
+
const e = K.g(), f = Y(e, a, b);
|
|
9162
|
+
var d = X(e, f, -1);
|
|
9151
9163
|
return 0 == d || 4 == d ? e.format(f, "undefined" === typeof c ? 0 : c) : a;
|
|
9152
9164
|
} catch {
|
|
9153
9165
|
return a;
|
|
@@ -9155,15 +9167,15 @@ var factoryOutput = (() => {
|
|
|
9155
9167
|
});
|
|
9156
9168
|
m("intlTelInputUtilsTemp.getExampleNumber", (a, b, c, d) => {
|
|
9157
9169
|
try {
|
|
9158
|
-
const l =
|
|
9170
|
+
const l = K.g();
|
|
9159
9171
|
a: {
|
|
9160
9172
|
var e = l;
|
|
9161
|
-
if (
|
|
9162
|
-
var f = T(
|
|
9173
|
+
if (P(a)) {
|
|
9174
|
+
var f = U(T(e, a), c);
|
|
9163
9175
|
try {
|
|
9164
9176
|
if (q(f, 6)) {
|
|
9165
9177
|
var g = r(f, 6);
|
|
9166
|
-
var h =
|
|
9178
|
+
var h = hb(e, g, a, false);
|
|
9167
9179
|
break a;
|
|
9168
9180
|
}
|
|
9169
9181
|
} catch (A) {
|
|
@@ -9178,21 +9190,15 @@ var factoryOutput = (() => {
|
|
|
9178
9190
|
});
|
|
9179
9191
|
m("intlTelInputUtilsTemp.getExtension", (a, b) => {
|
|
9180
9192
|
try {
|
|
9181
|
-
return r(
|
|
9193
|
+
return r(Y(K.g(), a, b), 3);
|
|
9182
9194
|
} catch {
|
|
9183
9195
|
return "";
|
|
9184
9196
|
}
|
|
9185
9197
|
});
|
|
9186
9198
|
m("intlTelInputUtilsTemp.getNumberType", (a, b) => {
|
|
9187
9199
|
try {
|
|
9188
|
-
const
|
|
9189
|
-
|
|
9190
|
-
if (null == d) var e = -1;
|
|
9191
|
-
else {
|
|
9192
|
-
var f = P(h);
|
|
9193
|
-
e = ab(f, d);
|
|
9194
|
-
}
|
|
9195
|
-
return e;
|
|
9200
|
+
const c = K.g(), d = Y(c, a, b);
|
|
9201
|
+
return $a(c, d);
|
|
9196
9202
|
} catch {
|
|
9197
9203
|
return -99;
|
|
9198
9204
|
}
|
|
@@ -9200,53 +9206,46 @@ var factoryOutput = (() => {
|
|
|
9200
9206
|
m("intlTelInputUtilsTemp.getValidationError", (a, b) => {
|
|
9201
9207
|
if (!b) return 1;
|
|
9202
9208
|
try {
|
|
9203
|
-
const c =
|
|
9204
|
-
return
|
|
9209
|
+
const c = K.g(), d = Y(c, a, b);
|
|
9210
|
+
return X(c, d, -1);
|
|
9205
9211
|
} catch (c) {
|
|
9206
9212
|
return "Invalid country calling code" === c.message ? 1 : 3 >= a.length || "Phone number too short after IDD" === c.message || "The string supplied is too short to be a phone number" === c.message ? 2 : "The string supplied is too long to be a phone number" === c.message ? 3 : -99;
|
|
9207
9213
|
}
|
|
9208
9214
|
});
|
|
9209
|
-
m("intlTelInputUtilsTemp.isValidNumber", (a, b) => {
|
|
9215
|
+
m("intlTelInputUtilsTemp.isValidNumber", (a, b, c) => {
|
|
9210
9216
|
try {
|
|
9211
|
-
const
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
|
|
9215
|
-
if (null == f || "001" != d && e != cb(a, d)) var g = false;
|
|
9216
|
-
else {
|
|
9217
|
-
var h = P(c);
|
|
9218
|
-
g = -1 != ab(h, f);
|
|
9217
|
+
const d = K.g(), e = Y(d, a, b), f = cb(d, e);
|
|
9218
|
+
if (c) {
|
|
9219
|
+
const g = c.map((h) => yb[h]);
|
|
9220
|
+
return f && g.includes($a(d, e));
|
|
9219
9221
|
}
|
|
9220
|
-
return
|
|
9222
|
+
return f;
|
|
9221
9223
|
} catch {
|
|
9222
9224
|
return false;
|
|
9223
9225
|
}
|
|
9224
9226
|
});
|
|
9225
9227
|
m("intlTelInputUtilsTemp.isPossibleNumber", (a, b, c) => {
|
|
9226
9228
|
try {
|
|
9227
|
-
const d =
|
|
9229
|
+
const d = K.g(), e = Y(d, a, b);
|
|
9228
9230
|
if (c) {
|
|
9229
|
-
|
|
9230
|
-
if (
|
|
9231
|
-
|
|
9232
|
-
return g || h || f;
|
|
9233
|
-
}
|
|
9234
|
-
return f;
|
|
9231
|
+
c.includes("FIXED_LINE_OR_MOBILE") && (c.includes("MOBILE") || c.push("MOBILE"), c.includes("FIXED_LINE") || c.push("FIXED_LINE"));
|
|
9232
|
+
for (let f of c) if (0 === X(d, e, yb[f])) return true;
|
|
9233
|
+
return false;
|
|
9235
9234
|
}
|
|
9236
|
-
return 0 ===
|
|
9235
|
+
return 0 === X(d, e, -1);
|
|
9237
9236
|
} catch {
|
|
9238
9237
|
return false;
|
|
9239
9238
|
}
|
|
9240
9239
|
});
|
|
9241
9240
|
m("intlTelInputUtilsTemp.getCoreNumber", (a, b) => {
|
|
9242
9241
|
try {
|
|
9243
|
-
return r(
|
|
9242
|
+
return r(Y(K.g(), a, b), 2).toString();
|
|
9244
9243
|
} catch {
|
|
9245
9244
|
return "";
|
|
9246
9245
|
}
|
|
9247
9246
|
});
|
|
9248
9247
|
m("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 });
|
|
9249
|
-
m("intlTelInputUtilsTemp.numberType",
|
|
9248
|
+
m("intlTelInputUtilsTemp.numberType", yb);
|
|
9250
9249
|
m("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
|
|
9251
9250
|
})();
|
|
9252
9251
|
var utils = window.intlTelInputUtilsTemp;
|