@rpcbase/ui 0.206.0 → 0.208.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/index19.js +1 -1
- package/dist/index19.js.map +1 -1
- package/dist/index200.js +56 -55
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +60 -8
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +7 -15
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +15 -143
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +145 -4
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +4 -11
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +10 -104
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +94 -347
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +349 -87
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +73 -304
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +309 -193
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +211 -19
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +18 -27
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +27 -187
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +186 -16
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +18 -44
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +60 -8
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +42 -23
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +9 -44
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +25 -18
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +45 -3
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +17 -4
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +3 -21
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +4 -24
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +17 -64
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +23 -13
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +68 -4
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +14 -50
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +4 -6
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +50 -26
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +5 -13
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +25 -8
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +17 -3
- package/dist/index232.js.map +1 -0
- package/dist/index233.js +8 -24
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +2 -71
- package/dist/index235.js +29 -3
- package/dist/index235.js.map +1 -0
- package/dist/index236.js +69 -12
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +3 -54
- package/dist/index238.js +11 -114
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +51 -6
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +115 -13
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +6 -687
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +13 -253
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +662 -676
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +252 -7430
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +700 -6
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +7429 -11
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +5 -4
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +11 -458
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +5 -37
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +458 -18
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +34 -24
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +19 -4
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +23 -54
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +4 -7
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +57 -11
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +8 -3
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +12 -16
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +3 -26
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +15 -42
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +25 -13
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +40 -22
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +13 -17
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +24 -34
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +17 -5
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +35 -9
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +5 -8
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +9 -9
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +8 -10
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +9 -7
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +9 -72
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +7 -171
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +63 -104
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +169 -12
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +109 -75
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +12 -44
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +79 -12
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +45 -15
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +12 -98
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +15 -55
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +89 -98
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +27 -42
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +92 -97
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +62 -46
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +108 -38
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +48 -135
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +43 -139
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +105 -217
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +109 -210
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +168 -212
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +240 -5
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +298 -6
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +5 -7
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +4 -4
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +7 -6
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +6 -21
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +6 -10
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +18 -123
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +10 -164
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +116 -58
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +161 -106
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +66 -489
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +106 -59
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +492 -4
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +62 -27
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +4 -66
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +27 -152
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +59 -555
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +143 -201
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +56 -326
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +553 -260
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +214 -0
- package/dist/index311.js.map +1 -0
- package/dist/index312.js +335 -0
- package/dist/index312.js.map +1 -0
- package/dist/index313.js +272 -0
- package/dist/index313.js.map +1 -0
- package/package.json +2 -2
- package/dist/index234.js.map +0 -1
- package/dist/index237.js.map +0 -1
package/dist/index281.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import r from "./index279.js";
|
|
5
|
-
import i from "./index280.js";
|
|
6
|
-
//#region ../../node_modules/libphonenumber-js/es6/validatePhoneNumberLength.js
|
|
7
|
-
function a(e) {
|
|
1
|
+
import e from "./index280.js";
|
|
2
|
+
//#region ../../node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js
|
|
3
|
+
function t(e) {
|
|
8
4
|
"@babel/helpers - typeof";
|
|
9
|
-
return
|
|
5
|
+
return t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
10
6
|
return typeof e;
|
|
11
7
|
} : function(e) {
|
|
12
8
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
13
|
-
},
|
|
9
|
+
}, t(e);
|
|
14
10
|
}
|
|
15
|
-
function
|
|
11
|
+
function n(e, t) {
|
|
16
12
|
var n = Object.keys(e);
|
|
17
13
|
if (Object.getOwnPropertySymbols) {
|
|
18
14
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -22,54 +18,43 @@ function o(e, t) {
|
|
|
22
18
|
}
|
|
23
19
|
return n;
|
|
24
20
|
}
|
|
25
|
-
function
|
|
21
|
+
function r(e) {
|
|
26
22
|
for (var t = 1; t < arguments.length; t++) {
|
|
27
|
-
var
|
|
28
|
-
t % 2 ?
|
|
29
|
-
|
|
30
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(
|
|
31
|
-
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(
|
|
23
|
+
var r = arguments[t] == null ? {} : arguments[t];
|
|
24
|
+
t % 2 ? n(Object(r), !0).forEach(function(t) {
|
|
25
|
+
i(e, t, r[t]);
|
|
26
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : n(Object(r)).forEach(function(t) {
|
|
27
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
|
|
32
28
|
});
|
|
33
29
|
}
|
|
34
30
|
return e;
|
|
35
31
|
}
|
|
36
|
-
function
|
|
37
|
-
return (t =
|
|
32
|
+
function i(e, t, n) {
|
|
33
|
+
return (t = a(t)) in e ? Object.defineProperty(e, t, {
|
|
38
34
|
value: n,
|
|
39
35
|
enumerable: !0,
|
|
40
36
|
configurable: !0,
|
|
41
37
|
writable: !0
|
|
42
38
|
}) : e[t] = n, e;
|
|
43
39
|
}
|
|
44
|
-
function
|
|
45
|
-
var
|
|
46
|
-
return
|
|
40
|
+
function a(e) {
|
|
41
|
+
var n = o(e, "string");
|
|
42
|
+
return t(n) == "symbol" ? n : n + "";
|
|
47
43
|
}
|
|
48
|
-
function
|
|
49
|
-
if (
|
|
50
|
-
var
|
|
51
|
-
if (
|
|
52
|
-
var
|
|
53
|
-
if (
|
|
44
|
+
function o(e, n) {
|
|
45
|
+
if (t(e) != "object" || !e) return e;
|
|
46
|
+
var r = e[Symbol.toPrimitive];
|
|
47
|
+
if (r !== void 0) {
|
|
48
|
+
var i = r.call(e, n || "default");
|
|
49
|
+
if (t(i) != "object") return i;
|
|
54
50
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
55
51
|
}
|
|
56
|
-
return (
|
|
52
|
+
return (n === "string" ? String : Number)(e);
|
|
57
53
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
c = s(s({}, c), {}, { extract: !1 });
|
|
61
|
-
try {
|
|
62
|
-
var u = r(o, c, l);
|
|
63
|
-
l = new e(l), l.selectNumberingPlan(u.countryCallingCode);
|
|
64
|
-
var d = t(u.nationalNumber, u.country, l);
|
|
65
|
-
if (d !== "IS_POSSIBLE") return d;
|
|
66
|
-
} catch (e) {
|
|
67
|
-
/* istanbul ignore else */
|
|
68
|
-
if (e instanceof n) return e.message;
|
|
69
|
-
throw e;
|
|
70
|
-
}
|
|
54
|
+
function s(t, n, i) {
|
|
55
|
+
return e(t, r(r({}, n), {}, { v2: !0 }), i);
|
|
71
56
|
}
|
|
72
57
|
//#endregion
|
|
73
|
-
export {
|
|
58
|
+
export { s as default };
|
|
74
59
|
|
|
75
60
|
//# sourceMappingURL=index281.js.map
|
package/dist/index281.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index281.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/
|
|
1
|
+
{"version":3,"file":"index281.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport parse from './parse.js';\nexport default function parsePhoneNumberWithError(text, options, metadata) {\n return parse(text, _objectSpread(_objectSpread({}, options), {}, {\n v2: true\n }), metadata);\n}\n//# sourceMappingURL=parsePhoneNumberWithError_.js.map"],"x_google_ignoreList":[0],"mappings":";;AAAA,SAAS,EAAQ,GAAG;AAAE;AAA2B,QAAO,IAAwB,OAAO,UAArB,cAA2C,OAAO,OAAO,YAA1B,WAAqC,SAAU,GAAG;AAAE,SAAO,OAAO;KAAO,SAAU,GAAG;AAAE,SAAO,KAAmB,OAAO,UAArB,cAA+B,EAAE,gBAAgB,UAAU,MAAM,OAAO,YAAY,WAAW,OAAO;IAAM,EAAQ,EAAE;;AAC3T,SAAS,EAAQ,GAAG,GAAG;CAAE,IAAI,IAAI,OAAO,KAAK,EAAE;AAAE,KAAI,OAAO,uBAAuB;EAAE,IAAI,IAAI,OAAO,sBAAsB,EAAE;AAAE,QAAM,IAAI,EAAE,OAAO,SAAU,GAAG;AAAE,UAAO,OAAO,yBAAyB,GAAG,EAAE,CAAC;IAAc,GAAG,EAAE,KAAK,MAAM,GAAG,EAAE;;AAAI,QAAO;;AAC3P,SAAS,EAAc,GAAG;AAAE,MAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;EAAE,IAAI,IAAY,UAAU,MAAlB,OAAsC,EAAE,GAAjB,UAAU;AAAS,MAAI,IAAI,EAAQ,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,SAAU,GAAG;AAAE,KAAgB,GAAG,GAAG,EAAE,GAAG;IAAI,GAAG,OAAO,4BAA4B,OAAO,iBAAiB,GAAG,OAAO,0BAA0B,EAAE,CAAC,GAAG,EAAQ,OAAO,EAAE,CAAC,CAAC,QAAQ,SAAU,GAAG;AAAE,UAAO,eAAe,GAAG,GAAG,OAAO,yBAAyB,GAAG,EAAE,CAAC;IAAI;;AAAI,QAAO;;AACnb,SAAS,EAAgB,GAAG,GAAG,GAAG;AAAE,SAAQ,IAAI,EAAe,EAAE,KAAK,IAAI,OAAO,eAAe,GAAG,GAAG;EAAE,OAAO;EAAG,YAAY,CAAC;EAAG,cAAc,CAAC;EAAG,UAAU,CAAC;EAAG,CAAC,GAAG,EAAE,KAAK,GAAG;;AAChL,SAAS,EAAe,GAAG;CAAE,IAAI,IAAI,EAAa,GAAG,SAAS;AAAE,QAAmB,EAAQ,EAAE,IAAtB,WAAyB,IAAI,IAAI;;AACxG,SAAS,EAAa,GAAG,GAAG;AAAE,KAAgB,EAAQ,EAAE,IAAtB,YAA0B,CAAC,EAAG,QAAO;CAAG,IAAI,IAAI,EAAE,OAAO;AAAc,KAAe,MAAX,KAAK,GAAS;EAAE,IAAI,IAAI,EAAE,KAAK,GAAG,KAAK,UAAU;AAAE,MAAgB,EAAQ,EAAE,IAAtB,SAAwB,QAAO;AAAG,QAAU,UAAU,+CAA+C;;AAAI,SAAqB,MAAb,WAAiB,SAAS,QAAQ,EAAE;;AAEzT,SAAwB,EAA0B,GAAM,GAAS,GAAU;AACzE,QAAO,EAAM,GAAM,EAAc,EAAc,EAAE,EAAE,EAAQ,EAAE,EAAE,EAAE,EAC/D,IAAI,IACL,CAAC,EAAE,EAAS"}
|
package/dist/index282.js
CHANGED
|
@@ -1,117 +1,112 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import e from "./index249.js";
|
|
2
|
+
//#region ../../node_modules/libphonenumber-js/es6/normalizeArguments.js
|
|
3
|
+
function t(e) {
|
|
3
4
|
"@babel/helpers - typeof";
|
|
4
|
-
return
|
|
5
|
+
return t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
5
6
|
return typeof e;
|
|
6
7
|
} : function(e) {
|
|
7
8
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
8
|
-
}, e
|
|
9
|
-
}
|
|
10
|
-
function t(e, t) {
|
|
11
|
-
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
9
|
+
}, t(e);
|
|
12
10
|
}
|
|
13
11
|
function n(e, t) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
var n = Object.keys(e);
|
|
13
|
+
if (Object.getOwnPropertySymbols) {
|
|
14
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
15
|
+
t && (r = r.filter(function(t) {
|
|
16
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
17
|
+
})), n.push.apply(n, r);
|
|
18
|
+
}
|
|
19
|
+
return n;
|
|
20
|
+
}
|
|
21
|
+
function r(e) {
|
|
22
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
23
|
+
var r = arguments[t] == null ? {} : arguments[t];
|
|
24
|
+
t % 2 ? n(Object(r), !0).forEach(function(t) {
|
|
25
|
+
i(e, t, r[t]);
|
|
26
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : n(Object(r)).forEach(function(t) {
|
|
27
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
|
|
28
|
+
});
|
|
17
29
|
}
|
|
30
|
+
return e;
|
|
18
31
|
}
|
|
19
|
-
function
|
|
20
|
-
return t
|
|
32
|
+
function i(e, t, n) {
|
|
33
|
+
return (t = a(t)) in e ? Object.defineProperty(e, t, {
|
|
34
|
+
value: n,
|
|
35
|
+
enumerable: !0,
|
|
36
|
+
configurable: !0,
|
|
37
|
+
writable: !0
|
|
38
|
+
}) : e[t] = n, e;
|
|
21
39
|
}
|
|
22
|
-
function
|
|
23
|
-
var n =
|
|
24
|
-
return
|
|
40
|
+
function a(e) {
|
|
41
|
+
var n = o(e, "string");
|
|
42
|
+
return t(n) == "symbol" ? n : n + "";
|
|
25
43
|
}
|
|
26
|
-
function
|
|
27
|
-
if (e
|
|
28
|
-
var r =
|
|
44
|
+
function o(e, n) {
|
|
45
|
+
if (t(e) != "object" || !e) return e;
|
|
46
|
+
var r = e[Symbol.toPrimitive];
|
|
29
47
|
if (r !== void 0) {
|
|
30
|
-
var i = r.call(
|
|
31
|
-
if (
|
|
48
|
+
var i = r.call(e, n || "default");
|
|
49
|
+
if (t(i) != "object") return i;
|
|
32
50
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
33
51
|
}
|
|
34
|
-
return (n === "string" ? String : Number)(
|
|
52
|
+
return (n === "string" ? String : Number)(e);
|
|
35
53
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
54
|
+
function s(e, t) {
|
|
55
|
+
return f(e) || d(e, t) || l(e, t) || c();
|
|
56
|
+
}
|
|
57
|
+
function c() {
|
|
58
|
+
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
59
|
+
}
|
|
60
|
+
function l(e, t) {
|
|
61
|
+
if (e) {
|
|
62
|
+
if (typeof e == "string") return u(e, t);
|
|
63
|
+
var n = {}.toString.call(e).slice(8, -1);
|
|
64
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? u(e, t) : void 0;
|
|
40
65
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
key: "initCountryAndCallingCode",
|
|
66
|
-
value: function(e, t) {
|
|
67
|
-
this.setCountry(e), this.setCallingCode(t);
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
key: "setCountry",
|
|
72
|
-
value: function(e) {
|
|
73
|
-
this.country = e, this.onCountryChange(e);
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
key: "setCallingCode",
|
|
78
|
-
value: function(e) {
|
|
79
|
-
this.callingCode = e, this.onCallingCodeChange(e, this.country);
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
key: "startInternationalNumber",
|
|
84
|
-
value: function(e, t) {
|
|
85
|
-
this.international = !0, this.initCountryAndCallingCode(e, t);
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
key: "appendDigits",
|
|
90
|
-
value: function(e) {
|
|
91
|
-
this.digits += e;
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
key: "appendNationalSignificantNumberDigits",
|
|
96
|
-
value: function(e) {
|
|
97
|
-
this.nationalSignificantNumber += e;
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
key: "getNationalDigits",
|
|
102
|
-
value: function() {
|
|
103
|
-
return this.international ? this.digits.slice((this.IDDPrefix ? this.IDDPrefix.length : 0) + (this.callingCode ? this.callingCode.length : 0)) : this.digits;
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
key: "getDigitsWithoutInternationalPrefix",
|
|
108
|
-
value: function() {
|
|
109
|
-
return this.international && this.IDDPrefix ? this.digits.slice(this.IDDPrefix.length) : this.digits;
|
|
66
|
+
}
|
|
67
|
+
function u(e, t) {
|
|
68
|
+
(t == null || t > e.length) && (t = e.length);
|
|
69
|
+
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
70
|
+
return r;
|
|
71
|
+
}
|
|
72
|
+
function d(e, t) {
|
|
73
|
+
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
74
|
+
if (n != null) {
|
|
75
|
+
var r, i, a, o, s = [], c = !0, l = !1;
|
|
76
|
+
try {
|
|
77
|
+
if (a = (n = n.call(e)).next, t === 0) {
|
|
78
|
+
if (Object(n) !== n) return;
|
|
79
|
+
c = !1;
|
|
80
|
+
} else for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
|
|
81
|
+
} catch (e) {
|
|
82
|
+
l = !0, i = e;
|
|
83
|
+
} finally {
|
|
84
|
+
try {
|
|
85
|
+
if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
|
|
86
|
+
} finally {
|
|
87
|
+
if (l) throw i;
|
|
110
88
|
}
|
|
111
89
|
}
|
|
112
|
-
|
|
113
|
-
}
|
|
90
|
+
return s;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function f(e) {
|
|
94
|
+
if (Array.isArray(e)) return e;
|
|
95
|
+
}
|
|
96
|
+
function p(t) {
|
|
97
|
+
var n = s(Array.prototype.slice.call(t), 4), i = n[0], a = n[1], o = n[2], c = n[3], l, u, d;
|
|
98
|
+
if (typeof i == "string") l = i;
|
|
99
|
+
else throw TypeError("A text for parsing must be a string.");
|
|
100
|
+
if (!a || typeof a == "string") c ? (u = o, d = c) : (u = void 0, d = o), a && (u = r({ defaultCountry: a }, u));
|
|
101
|
+
else if (e(a)) o ? (u = a, d = o) : d = a;
|
|
102
|
+
else throw Error(`Invalid second argument: ${a}`);
|
|
103
|
+
return {
|
|
104
|
+
text: l,
|
|
105
|
+
options: u,
|
|
106
|
+
metadata: d
|
|
107
|
+
};
|
|
108
|
+
}
|
|
114
109
|
//#endregion
|
|
115
|
-
export {
|
|
110
|
+
export { p as default };
|
|
116
111
|
|
|
117
112
|
//# sourceMappingURL=index282.js.map
|
package/dist/index282.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index282.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/AsYouTypeState.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n// This \"state\" object simply holds the state of the \"AsYouType\" parser:\n//\n// * `country?: string` — The exact country of the phone number, if it could be determined.\n// When inputting a phone number in \"international\" format, it will derive the `country` from \"country calling code\" and the phone number digits.\n// When inputting a phone number in \"national\" format, it will derive the `country` from `defaultCountry` that was specified when creating the `AsYouType` formatter.\n// Sidenote: If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` flag was `true`, then for \"non-geographic phone numbers\" `state.country` would've been \"001\".\n// * `callingCode?: string` — \"Country calling code\" that has been extracted from the input phone number.\n// When inputting a phone number in \"international\" format, it will extract the \"country calling code\" from the digits that follow the \"+\" character.\n// When inputting a phone number in \"national\" format, `callingCode` will be `undefined`.\n// Sidenote: `state.callingCode` is therefore independent from `state.country` and there could be situations when `state.country` is defined by `state.callingCode` is not — that would be when inputting a phone number not in \"international\" format.\n// * `digits: string` — Phone number digits that have been input so far, including the \"+\" character, if present. In case of inputting non-arabic digits, those will be converted to arabic ones.\n// * `international: boolean` — Whether the phone number is being input in \"international\" format, i.e. with a \"+\" character.\n// * `missingPlus: boolean` — Whether it's a phone number in \"international\" format that is missing the leading \"+\" character for some reason — apparently, Google thinks that it's a common mistake when inputting a phone number.\n// * `IDDPrefix?: string` — An \"IDD prefix\", when the phone number is being input in an \"out-of-country dialing\" format. https://wikitravel.org/en/International_dialling_prefix\n// * `carrierCode?: string` — A \"carrier code\", if the phone number contains it. Normally, those can only be present in Colombia or Brazil, and only when calling from mobile phones to fixed-line numbers.\n// * `nationalPrefix?: string` — \"National prefix\", if present in the phone number input.\n// * `nationalSignificantNumber?: string` — National (significant) number digits that have been input so far.\n// * `nationalSignificantNumberIsModified: boolean` — Tells if the parsed national (significant) number is present as-is in the input string. For example, when inputting \"0343515551212999\" Argentinian mobile number, the parsed national (significant) number is \"93435551212999\". There, one can see how it stripped \"0\" national prefix and prepended a \"9\", because that's how it is instructed to do in Argentina's metadata. So in the described example, the parsed national (significant) number is not present as-is in the input string. Instead, it's \"modified\" in the input string. https://gitlab.com/caamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n// * `prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix?: string` — In some countries, a phone number could have a prefix that is not a \"national prefix\" but rather some other type of \"utility\" prefix.\n// For example, when calling within Australia, one could prepend `1831` prefix to hide caller's phone number.\n// https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n//\nvar AsYouTypeState = /*#__PURE__*/function () {\n function AsYouTypeState(_ref) {\n var onCountryChange = _ref.onCountryChange,\n onCallingCodeChange = _ref.onCallingCodeChange;\n _classCallCheck(this, AsYouTypeState);\n this.onCountryChange = onCountryChange;\n this.onCallingCodeChange = onCallingCodeChange;\n }\n return _createClass(AsYouTypeState, [{\n key: \"reset\",\n value: function reset(_ref2) {\n var country = _ref2.country,\n callingCode = _ref2.callingCode;\n this.international = false;\n this.missingPlus = false;\n this.IDDPrefix = undefined;\n this.callingCode = undefined;\n this.digits = '';\n this.resetNationalSignificantNumber();\n this.initCountryAndCallingCode(country, callingCode);\n }\n }, {\n key: \"resetNationalSignificantNumber\",\n value: function resetNationalSignificantNumber() {\n this.nationalSignificantNumber = this.getNationalDigits();\n this.nationalSignificantNumberIsModified = false;\n this.nationalPrefix = undefined;\n this.carrierCode = undefined;\n this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = undefined;\n }\n }, {\n key: \"update\",\n value: function update(properties) {\n for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n this[key] = properties[key];\n }\n }\n }, {\n key: \"initCountryAndCallingCode\",\n value: function initCountryAndCallingCode(country, callingCode) {\n this.setCountry(country);\n this.setCallingCode(callingCode);\n }\n }, {\n key: \"setCountry\",\n value: function setCountry(country) {\n this.country = country;\n this.onCountryChange(country);\n }\n }, {\n key: \"setCallingCode\",\n value: function setCallingCode(callingCode) {\n this.callingCode = callingCode;\n this.onCallingCodeChange(callingCode, this.country);\n }\n }, {\n key: \"startInternationalNumber\",\n value: function startInternationalNumber(country, callingCode) {\n // Prepend the `+` to parsed input.\n this.international = true;\n // If a default country was set then reset it\n // because an explicitly international phone\n // number is being entered.\n this.initCountryAndCallingCode(country, callingCode);\n }\n }, {\n key: \"appendDigits\",\n value: function appendDigits(nextDigits) {\n this.digits += nextDigits;\n }\n }, {\n key: \"appendNationalSignificantNumberDigits\",\n value: function appendNationalSignificantNumberDigits(nextDigits) {\n this.nationalSignificantNumber += nextDigits;\n }\n\n /**\r\n * Returns the part of `this.digits` that corresponds to the national number.\r\n * Basically, all digits that have been input by the user, except for the\r\n * international prefix and the country calling code part\r\n * (if the number is an international one).\r\n * @return {string}\r\n */\n }, {\n key: \"getNationalDigits\",\n value: function getNationalDigits() {\n if (this.international) {\n return this.digits.slice((this.IDDPrefix ? this.IDDPrefix.length : 0) + (this.callingCode ? this.callingCode.length : 0));\n }\n return this.digits;\n }\n }, {\n key: \"getDigitsWithoutInternationalPrefix\",\n value: function getDigitsWithoutInternationalPrefix() {\n if (this.international) {\n if (this.IDDPrefix) {\n return this.digits.slice(this.IDDPrefix.length);\n }\n }\n return this.digits;\n }\n }]);\n}();\nexport { AsYouTypeState as default };\n//# sourceMappingURL=AsYouTypeState.js.map"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,EAAQ,GAAG;AAAE;AAA2B,QAAO,IAAwB,OAAO,UAArB,cAA2C,OAAO,OAAO,YAA1B,WAAqC,SAAU,GAAG;AAAE,SAAO,OAAO;KAAO,SAAU,GAAG;AAAE,SAAO,KAAmB,OAAO,UAArB,cAA+B,EAAE,gBAAgB,UAAU,MAAM,OAAO,YAAY,WAAW,OAAO;IAAM,EAAQ,EAAE;;AAC3T,SAAS,EAAgB,GAAG,GAAG;AAAE,KAAI,EAAE,aAAa,GAAI,OAAU,UAAU,oCAAoC;;AAChH,SAAS,EAAkB,GAAG,GAAG;AAAE,MAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK;EAAE,IAAI,IAAI,EAAE;AAAI,IAAE,aAAa,EAAE,cAAc,CAAC,GAAG,EAAE,eAAe,CAAC,GAAG,WAAW,MAAM,EAAE,WAAW,CAAC,IAAI,OAAO,eAAe,GAAG,EAAe,EAAE,IAAI,EAAE,EAAE;;;AACnO,SAAS,EAAa,GAAG,GAAG,GAAG;AAAE,QAAO,KAAK,EAAkB,EAAE,WAAW,EAAE,EAAE,KAAK,EAAkB,GAAG,EAAE,EAAE,OAAO,eAAe,GAAG,aAAa,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE;;AACvK,SAAS,EAAe,GAAG;CAAE,IAAI,IAAI,EAAa,GAAG,SAAS;AAAE,QAAmB,EAAQ,EAAE,IAAtB,WAAyB,IAAI,IAAI;;AACxG,SAAS,EAAa,GAAG,GAAG;AAAE,KAAgB,EAAQ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,SAAoB,GAAS;AAElC,IADA,KAAK,UAAU,GACf,KAAK,gBAAgB,EAAQ;;GAEhC;EAAE;GACD,KAAK;GACL,OAAO,SAAwB,GAAa;AAE1C,IADA,KAAK,cAAc,GACnB,KAAK,oBAAoB,GAAa,KAAK,QAAQ;;GAEtD;EAAE;GACD,KAAK;GACL,OAAO,SAAkC,GAAS,GAAa;AAM7D,IAJA,KAAK,gBAAgB,IAIrB,KAAK,0BAA0B,GAAS,EAAY;;GAEvD;EAAE;GACD,KAAK;GACL,OAAO,SAAsB,GAAY;AACvC,SAAK,UAAU;;GAElB;EAAE;GACD,KAAK;GACL,OAAO,SAA+C,GAAY;AAChE,SAAK,6BAA6B;;GAUrC;EAAE;GACD,KAAK;GACL,OAAO,WAA6B;AAIlC,WAHI,KAAK,gBACA,KAAK,OAAO,OAAO,KAAK,YAAY,KAAK,UAAU,SAAS,MAAM,KAAK,cAAc,KAAK,YAAY,SAAS,GAAG,GAEpH,KAAK;;GAEf;EAAE;GACD,KAAK;GACL,OAAO,WAA+C;AAMpD,WALI,KAAK,iBACH,KAAK,YACA,KAAK,OAAO,MAAM,KAAK,UAAU,OAAO,GAG5C,KAAK;;GAEf;EAAC,CAAC;GACF"}
|
|
1
|
+
{"version":3,"file":"index282.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/normalizeArguments.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\nimport isObject from './helpers/isObject.js';\n\n// Extracts the following properties from function arguments:\n// * input `text`\n// * `options` object\n// * `metadata` JSON\nexport default function normalizeArguments(args) {\n var _Array$prototype$slic = Array.prototype.slice.call(args),\n _Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4),\n arg_1 = _Array$prototype$slic2[0],\n arg_2 = _Array$prototype$slic2[1],\n arg_3 = _Array$prototype$slic2[2],\n arg_4 = _Array$prototype$slic2[3];\n var text;\n var options;\n var metadata;\n\n // If the phone number is passed as a string.\n // `parsePhoneNumber('88005553535', ...)`.\n if (typeof arg_1 === 'string') {\n text = arg_1;\n } else throw new TypeError('A text for parsing must be a string.');\n\n // If \"default country\" argument is being passed then move it to `options`.\n // `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.\n if (!arg_2 || typeof arg_2 === 'string') {\n if (arg_4) {\n options = arg_3;\n metadata = arg_4;\n } else {\n options = undefined;\n metadata = arg_3;\n }\n if (arg_2) {\n options = _objectSpread({\n defaultCountry: arg_2\n }, options);\n }\n }\n // `defaultCountry` is not passed.\n // Example: `parsePhoneNumber('+78005553535', [options], metadata)`.\n else if (isObject(arg_2)) {\n if (arg_3) {\n options = arg_2;\n metadata = arg_3;\n } else {\n metadata = arg_2;\n }\n } else throw new Error(\"Invalid second argument: \".concat(arg_2));\n return {\n text: text,\n options: options,\n metadata: metadata\n };\n}\n//# sourceMappingURL=normalizeArguments.js.map"],"x_google_ignoreList":[0],"mappings":";;AAAA,SAAS,EAAQ,GAAG;AAAE;AAA2B,QAAO,IAAwB,OAAO,UAArB,cAA2C,OAAO,OAAO,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
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1
|
+
import { Metadata as e } from "./index250.js";
|
|
2
|
+
import t from "./index252.js";
|
|
3
|
+
import { ParseError as n } from "./index274.js";
|
|
4
|
+
import r from "./index281.js";
|
|
5
|
+
import i from "./index282.js";
|
|
6
|
+
//#region ../../node_modules/libphonenumber-js/es6/validatePhoneNumberLength.js
|
|
7
|
+
function a(e) {
|
|
8
|
+
"@babel/helpers - typeof";
|
|
9
|
+
return a = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
10
|
+
return typeof e;
|
|
11
|
+
} : function(e) {
|
|
12
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
13
|
+
}, a(e);
|
|
16
14
|
}
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var r =
|
|
21
|
-
|
|
15
|
+
function o(e, t) {
|
|
16
|
+
var n = Object.keys(e);
|
|
17
|
+
if (Object.getOwnPropertySymbols) {
|
|
18
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
19
|
+
t && (r = r.filter(function(t) {
|
|
20
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
21
|
+
})), n.push.apply(n, r);
|
|
22
22
|
}
|
|
23
|
+
return n;
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
(t
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
function s(e) {
|
|
26
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
27
|
+
var n = arguments[t] == null ? {} : arguments[t];
|
|
28
|
+
t % 2 ? o(Object(n), !0).forEach(function(t) {
|
|
29
|
+
c(e, t, n[t]);
|
|
30
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o(Object(n)).forEach(function(t) {
|
|
31
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return e;
|
|
28
35
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
function c(e, t, n) {
|
|
37
|
+
return (t = l(t)) in e ? Object.defineProperty(e, t, {
|
|
38
|
+
value: n,
|
|
39
|
+
enumerable: !0,
|
|
40
|
+
configurable: !0,
|
|
41
|
+
writable: !0
|
|
42
|
+
}) : e[t] = n, e;
|
|
34
43
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
44
|
+
function l(e) {
|
|
45
|
+
var t = u(e, "string");
|
|
46
|
+
return a(t) == "symbol" ? t : t + "";
|
|
37
47
|
}
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
function u(e, t) {
|
|
49
|
+
if (a(e) != "object" || !e) return e;
|
|
50
|
+
var n = e[Symbol.toPrimitive];
|
|
51
|
+
if (n !== void 0) {
|
|
52
|
+
var r = n.call(e, t || "default");
|
|
53
|
+
if (a(r) != "object") return r;
|
|
54
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
45
55
|
}
|
|
46
|
-
return
|
|
56
|
+
return (t === "string" ? String : Number)(e);
|
|
47
57
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
58
|
+
function d() {
|
|
59
|
+
var a = i(arguments), o = a.text, c = a.options, l = a.metadata;
|
|
60
|
+
c = s(s({}, c), {}, { extract: !1 });
|
|
61
|
+
try {
|
|
62
|
+
var u = r(o, c, l);
|
|
63
|
+
l = new e(l), l.selectNumberingPlan(u.countryCallingCode);
|
|
64
|
+
var d = t(u.nationalNumber, u.country, l);
|
|
65
|
+
if (d !== "IS_POSSIBLE") return d;
|
|
66
|
+
} catch (e) {
|
|
67
|
+
/* istanbul ignore else */
|
|
68
|
+
if (e instanceof n) return e.message;
|
|
69
|
+
throw e;
|
|
53
70
|
}
|
|
54
|
-
return [t, n];
|
|
55
71
|
}
|
|
56
72
|
//#endregion
|
|
57
|
-
export {
|
|
73
|
+
export { d as default };
|
|
58
74
|
|
|
59
75
|
//# sourceMappingURL=index283.js.map
|
package/dist/index283.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index283.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/
|
|
1
|
+
{"version":3,"file":"index283.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/validatePhoneNumberLength.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport normalizeArguments from './normalizeArguments.js';\nimport parsePhoneNumberWithError from './parsePhoneNumberWithError_.js';\nimport ParseError from './ParseError.js';\nimport Metadata from './metadata.js';\nimport checkNumberLength from './helpers/checkNumberLength.js';\nexport default function validatePhoneNumberLength() {\n var _normalizeArguments = normalizeArguments(arguments),\n text = _normalizeArguments.text,\n options = _normalizeArguments.options,\n metadata = _normalizeArguments.metadata;\n options = _objectSpread(_objectSpread({}, options), {}, {\n extract: false\n });\n\n // Parse phone number.\n try {\n var phoneNumber = parsePhoneNumberWithError(text, options, metadata);\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(phoneNumber.countryCallingCode);\n var result = checkNumberLength(phoneNumber.nationalNumber, phoneNumber.country, metadata);\n if (result !== 'IS_POSSIBLE') {\n return result;\n }\n } catch (error) {\n /* istanbul ignore else */\n if (error instanceof ParseError) {\n return error.message;\n } else {\n throw error;\n }\n }\n}\n//# sourceMappingURL=validatePhoneNumberLength.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;AAAA,SAAS,EAAQ,GAAG;AAAE;AAA2B,QAAO,IAAwB,OAAO,UAArB,cAA2C,OAAO,OAAO,YAA1B,WAAqC,SAAU,GAAG;AAAE,SAAO,OAAO;KAAO,SAAU,GAAG;AAAE,SAAO,KAAmB,OAAO,UAArB,cAA+B,EAAE,gBAAgB,UAAU,MAAM,OAAO,YAAY,WAAW,OAAO;IAAM,EAAQ,EAAE;;AAC3T,SAAS,EAAQ,GAAG,GAAG;CAAE,IAAI,IAAI,OAAO,KAAK,EAAE;AAAE,KAAI,OAAO,uBAAuB;EAAE,IAAI,IAAI,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