@kong-ui-public/i18n 2.3.3-pr.2198.4eddb2429.0 → 2.3.3-pr.2274.eabe722e7.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/i18n.es.js +273 -277
- package/dist/i18n.umd.js +10 -10
- package/dist/types/Translation.d.ts +4 -4
- package/dist/types/Translation.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/i18n.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Ge, h as Ue } from "vue";
|
|
2
2
|
var z = function(e, t) {
|
|
3
3
|
return z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
|
|
4
4
|
r.__proto__ = n;
|
|
@@ -24,7 +24,7 @@ var f = function() {
|
|
|
24
24
|
return t;
|
|
25
25
|
}, f.apply(this, arguments);
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function Ve(e, t) {
|
|
28
28
|
var r = {};
|
|
29
29
|
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
30
30
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -38,55 +38,51 @@ function A(e, t, r) {
|
|
|
38
38
|
return e.concat(i || Array.prototype.slice.call(t));
|
|
39
39
|
}
|
|
40
40
|
function I(e, t) {
|
|
41
|
-
var r = t && t.cache ? t.cache :
|
|
41
|
+
var r = t && t.cache ? t.cache : ze, n = t && t.serializer ? t.serializer : Ze, a = t && t.strategy ? t.strategy : Xe;
|
|
42
42
|
return a(e, {
|
|
43
43
|
cache: r,
|
|
44
44
|
serializer: n
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function ke(e) {
|
|
48
48
|
return e == null || typeof e == "number" || typeof e == "boolean";
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
var a =
|
|
50
|
+
function je(e, t, r, n) {
|
|
51
|
+
var a = ke(n) ? n : r(n), i = t.get(a);
|
|
52
52
|
return typeof i > "u" && (i = e.call(this, n), t.set(a, i)), i;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Ee(e, t, r) {
|
|
55
55
|
var n = Array.prototype.slice.call(arguments, 3), a = r(n), i = t.get(a);
|
|
56
56
|
return typeof i > "u" && (i = e.apply(this, n), t.set(a, i)), i;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function de(e, t, r, n, a) {
|
|
59
59
|
return r.bind(t, e, n, a);
|
|
60
60
|
}
|
|
61
61
|
function Xe(e, t) {
|
|
62
|
-
var r = e.length === 1 ?
|
|
63
|
-
return
|
|
62
|
+
var r = e.length === 1 ? je : Ee;
|
|
63
|
+
return de(e, this, r, t.cache.create(), t.serializer);
|
|
64
64
|
}
|
|
65
65
|
function We(e, t) {
|
|
66
|
-
return
|
|
66
|
+
return de(e, this, Ee, t.cache.create(), t.serializer);
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
return ee(e, this, Ee, t.cache.create(), t.serializer);
|
|
70
|
-
}
|
|
71
|
-
var ze = function() {
|
|
68
|
+
var Ze = function() {
|
|
72
69
|
return JSON.stringify(arguments);
|
|
73
70
|
};
|
|
74
|
-
function
|
|
71
|
+
function ee() {
|
|
75
72
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
76
73
|
}
|
|
77
|
-
|
|
74
|
+
ee.prototype.get = function(e) {
|
|
78
75
|
return this.cache[e];
|
|
79
76
|
};
|
|
80
|
-
|
|
77
|
+
ee.prototype.set = function(e, t) {
|
|
81
78
|
this.cache[e] = t;
|
|
82
79
|
};
|
|
83
|
-
var
|
|
80
|
+
var ze = {
|
|
84
81
|
create: function() {
|
|
85
|
-
return new
|
|
82
|
+
return new ee();
|
|
86
83
|
}
|
|
87
84
|
}, N = {
|
|
88
|
-
variadic: We
|
|
89
|
-
monadic: Ze
|
|
85
|
+
variadic: We
|
|
90
86
|
}, g;
|
|
91
87
|
(function(e) {
|
|
92
88
|
e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", e[e.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", e[e.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", e[e.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", e[e.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", e[e.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", e[e.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", e[e.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", e[e.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", e[e.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", e[e.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", e[e.INVALID_TAG = 23] = "INVALID_TAG", e[e.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", e[e.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", e[e.UNCLOSED_TAG = 27] = "UNCLOSED_TAG";
|
|
@@ -99,43 +95,43 @@ var D;
|
|
|
99
95
|
(function(e) {
|
|
100
96
|
e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
|
|
101
97
|
})(D || (D = {}));
|
|
102
|
-
function
|
|
98
|
+
function ne(e) {
|
|
103
99
|
return e.type === y.literal;
|
|
104
100
|
}
|
|
105
|
-
function
|
|
101
|
+
function Je(e) {
|
|
106
102
|
return e.type === y.argument;
|
|
107
103
|
}
|
|
108
|
-
function
|
|
104
|
+
function be(e) {
|
|
109
105
|
return e.type === y.number;
|
|
110
106
|
}
|
|
111
|
-
function
|
|
107
|
+
function ye(e) {
|
|
112
108
|
return e.type === y.date;
|
|
113
109
|
}
|
|
114
|
-
function
|
|
110
|
+
function xe(e) {
|
|
115
111
|
return e.type === y.time;
|
|
116
112
|
}
|
|
117
|
-
function
|
|
113
|
+
function Te(e) {
|
|
118
114
|
return e.type === y.select;
|
|
119
115
|
}
|
|
120
|
-
function
|
|
116
|
+
function Se(e) {
|
|
121
117
|
return e.type === y.plural;
|
|
122
118
|
}
|
|
123
|
-
function
|
|
119
|
+
function qe(e) {
|
|
124
120
|
return e.type === y.pound;
|
|
125
121
|
}
|
|
126
|
-
function
|
|
122
|
+
function He(e) {
|
|
127
123
|
return e.type === y.tag;
|
|
128
124
|
}
|
|
129
|
-
function
|
|
125
|
+
function Ie(e) {
|
|
130
126
|
return !!(e && typeof e == "object" && e.type === D.number);
|
|
131
127
|
}
|
|
132
128
|
function J(e) {
|
|
133
129
|
return !!(e && typeof e == "object" && e.type === D.dateTime);
|
|
134
130
|
}
|
|
135
|
-
var
|
|
136
|
-
function
|
|
131
|
+
var Ne = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, Qe = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
132
|
+
function Ye(e) {
|
|
137
133
|
var t = {};
|
|
138
|
-
return e.replace(
|
|
134
|
+
return e.replace(Qe, function(r) {
|
|
139
135
|
var n = r.length;
|
|
140
136
|
switch (r[0]) {
|
|
141
137
|
case "G":
|
|
@@ -224,11 +220,11 @@ function $e(e) {
|
|
|
224
220
|
return "";
|
|
225
221
|
}), t;
|
|
226
222
|
}
|
|
227
|
-
var
|
|
228
|
-
function
|
|
223
|
+
var $e = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
224
|
+
function Ke(e) {
|
|
229
225
|
if (e.length === 0)
|
|
230
226
|
throw new Error("Number skeleton cannot be empty");
|
|
231
|
-
for (var t = e.split(
|
|
227
|
+
for (var t = e.split($e).filter(function(c) {
|
|
232
228
|
return c.length > 0;
|
|
233
229
|
}), r = [], n = 0, a = t; n < a.length; n++) {
|
|
234
230
|
var i = a[n], o = i.split("/");
|
|
@@ -243,17 +239,17 @@ function et(e) {
|
|
|
243
239
|
}
|
|
244
240
|
return r;
|
|
245
241
|
}
|
|
246
|
-
function
|
|
242
|
+
function et(e) {
|
|
247
243
|
return e.replace(/^(.*?)-/, "");
|
|
248
244
|
}
|
|
249
|
-
var
|
|
250
|
-
function
|
|
245
|
+
var ae = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Ae = /^(@+)?(\+|#+)?[rs]?$/g, tt = /(\*)(0+)|(#+)(0+)|(0+)/g, Be = /^(0+)$/;
|
|
246
|
+
function ie(e) {
|
|
251
247
|
var t = {};
|
|
252
|
-
return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(
|
|
248
|
+
return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(Ae, function(r, n, a) {
|
|
253
249
|
return typeof a != "string" ? (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length) : a === "+" ? t.minimumSignificantDigits = n.length : n[0] === "#" ? t.maximumSignificantDigits = n.length : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length + (typeof a == "string" ? a.length : 0)), "";
|
|
254
250
|
}), t;
|
|
255
251
|
}
|
|
256
|
-
function
|
|
252
|
+
function _e(e) {
|
|
257
253
|
switch (e) {
|
|
258
254
|
case "sign-auto":
|
|
259
255
|
return {
|
|
@@ -293,7 +289,7 @@ function Pe(e) {
|
|
|
293
289
|
};
|
|
294
290
|
}
|
|
295
291
|
}
|
|
296
|
-
function
|
|
292
|
+
function rt(e) {
|
|
297
293
|
var t;
|
|
298
294
|
if (e[0] === "E" && e[1] === "E" ? (t = {
|
|
299
295
|
notation: "engineering"
|
|
@@ -301,17 +297,17 @@ function nt(e) {
|
|
|
301
297
|
notation: "scientific"
|
|
302
298
|
}, e = e.slice(1)), t) {
|
|
303
299
|
var r = e.slice(0, 2);
|
|
304
|
-
if (r === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : r === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !
|
|
300
|
+
if (r === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : r === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !Be.test(e))
|
|
305
301
|
throw new Error("Malformed concise eng/scientific notation");
|
|
306
302
|
t.minimumIntegerDigits = e.length;
|
|
307
303
|
}
|
|
308
304
|
return t;
|
|
309
305
|
}
|
|
310
|
-
function
|
|
311
|
-
var t = {}, r =
|
|
306
|
+
function oe(e) {
|
|
307
|
+
var t = {}, r = _e(e);
|
|
312
308
|
return r || t;
|
|
313
309
|
}
|
|
314
|
-
function
|
|
310
|
+
function nt(e) {
|
|
315
311
|
for (var t = {}, r = 0, n = e; r < n.length; r++) {
|
|
316
312
|
var a = n[r];
|
|
317
313
|
switch (a.stem) {
|
|
@@ -335,7 +331,7 @@ function at(e) {
|
|
|
335
331
|
continue;
|
|
336
332
|
case "measure-unit":
|
|
337
333
|
case "unit":
|
|
338
|
-
t.style = "unit", t.unit =
|
|
334
|
+
t.style = "unit", t.unit = et(a.options[0]);
|
|
339
335
|
continue;
|
|
340
336
|
case "compact-short":
|
|
341
337
|
case "K":
|
|
@@ -347,12 +343,12 @@ function at(e) {
|
|
|
347
343
|
continue;
|
|
348
344
|
case "scientific":
|
|
349
345
|
t = f(f(f({}, t), { notation: "scientific" }), a.options.reduce(function(u, l) {
|
|
350
|
-
return f(f({}, u),
|
|
346
|
+
return f(f({}, u), oe(l));
|
|
351
347
|
}, {}));
|
|
352
348
|
continue;
|
|
353
349
|
case "engineering":
|
|
354
350
|
t = f(f(f({}, t), { notation: "engineering" }), a.options.reduce(function(u, l) {
|
|
355
|
-
return f(f({}, u),
|
|
351
|
+
return f(f({}, u), oe(l));
|
|
356
352
|
}, {}));
|
|
357
353
|
continue;
|
|
358
354
|
case "notation-simple":
|
|
@@ -397,7 +393,7 @@ function at(e) {
|
|
|
397
393
|
case "integer-width":
|
|
398
394
|
if (a.options.length > 1)
|
|
399
395
|
throw new RangeError("integer-width stems only accept a single optional option");
|
|
400
|
-
a.options[0].replace(
|
|
396
|
+
a.options[0].replace(tt, function(u, l, h, m, c, b) {
|
|
401
397
|
if (l)
|
|
402
398
|
t.minimumIntegerDigits = h.length;
|
|
403
399
|
else {
|
|
@@ -410,27 +406,27 @@ function at(e) {
|
|
|
410
406
|
});
|
|
411
407
|
continue;
|
|
412
408
|
}
|
|
413
|
-
if (
|
|
409
|
+
if (Be.test(a.stem)) {
|
|
414
410
|
t.minimumIntegerDigits = a.stem.length;
|
|
415
411
|
continue;
|
|
416
412
|
}
|
|
417
|
-
if (
|
|
413
|
+
if (ae.test(a.stem)) {
|
|
418
414
|
if (a.options.length > 1)
|
|
419
415
|
throw new RangeError("Fraction-precision stems only accept a single optional option");
|
|
420
|
-
a.stem.replace(
|
|
416
|
+
a.stem.replace(ae, function(u, l, h, m, c, b) {
|
|
421
417
|
return h === "*" ? t.minimumFractionDigits = l.length : m && m[0] === "#" ? t.maximumFractionDigits = m.length : c && b ? (t.minimumFractionDigits = c.length, t.maximumFractionDigits = c.length + b.length) : (t.minimumFractionDigits = l.length, t.maximumFractionDigits = l.length), "";
|
|
422
418
|
});
|
|
423
419
|
var i = a.options[0];
|
|
424
|
-
i === "w" ? t = f(f({}, t), { trailingZeroDisplay: "stripIfInteger" }) : i && (t = f(f({}, t),
|
|
420
|
+
i === "w" ? t = f(f({}, t), { trailingZeroDisplay: "stripIfInteger" }) : i && (t = f(f({}, t), ie(i)));
|
|
425
421
|
continue;
|
|
426
422
|
}
|
|
427
|
-
if (
|
|
428
|
-
t = f(f({}, t),
|
|
423
|
+
if (Ae.test(a.stem)) {
|
|
424
|
+
t = f(f({}, t), ie(a.stem));
|
|
429
425
|
continue;
|
|
430
426
|
}
|
|
431
|
-
var o =
|
|
427
|
+
var o = _e(a.stem);
|
|
432
428
|
o && (t = f(f({}, t), o));
|
|
433
|
-
var s =
|
|
429
|
+
var s = rt(a.stem);
|
|
434
430
|
s && (t = f(f({}, t), s));
|
|
435
431
|
}
|
|
436
432
|
return t;
|
|
@@ -1850,13 +1846,13 @@ var U = {
|
|
|
1850
1846
|
"h"
|
|
1851
1847
|
]
|
|
1852
1848
|
};
|
|
1853
|
-
function
|
|
1849
|
+
function at(e, t) {
|
|
1854
1850
|
for (var r = "", n = 0; n < e.length; n++) {
|
|
1855
1851
|
var a = e.charAt(n);
|
|
1856
1852
|
if (a === "j") {
|
|
1857
1853
|
for (var i = 0; n + 1 < e.length && e.charAt(n + 1) === a; )
|
|
1858
1854
|
i++, n++;
|
|
1859
|
-
var o = 1 + (i & 1), s = i < 2 ? 1 : 3 + (i >> 1), u = "a", l =
|
|
1855
|
+
var o = 1 + (i & 1), s = i < 2 ? 1 : 3 + (i >> 1), u = "a", l = it(t);
|
|
1860
1856
|
for ((l == "H" || l == "k") && (s = 0); s-- > 0; )
|
|
1861
1857
|
r += u;
|
|
1862
1858
|
for (; o-- > 0; )
|
|
@@ -1865,7 +1861,7 @@ function it(e, t) {
|
|
|
1865
1861
|
}
|
|
1866
1862
|
return r;
|
|
1867
1863
|
}
|
|
1868
|
-
function
|
|
1864
|
+
function it(e) {
|
|
1869
1865
|
var t = e.hourCycle;
|
|
1870
1866
|
if (t === void 0 && // @ts-ignore hourCycle(s) is not identified yet
|
|
1871
1867
|
e.hourCycles && // @ts-ignore
|
|
@@ -1887,20 +1883,20 @@ function ot(e) {
|
|
|
1887
1883
|
var a = U[n || ""] || U[r || ""] || U["".concat(r, "-001")] || U["001"];
|
|
1888
1884
|
return a[0];
|
|
1889
1885
|
}
|
|
1890
|
-
var X,
|
|
1886
|
+
var X, ot = new RegExp("^".concat(Ne.source, "*")), st = new RegExp("".concat(Ne.source, "*$"));
|
|
1891
1887
|
function v(e, t) {
|
|
1892
1888
|
return { start: e, end: t };
|
|
1893
1889
|
}
|
|
1894
|
-
var
|
|
1890
|
+
var ut = !!String.prototype.startsWith && "_a".startsWith("a", 1), ht = !!String.fromCodePoint, lt = !!Object.fromEntries, ft = !!String.prototype.codePointAt, mt = !!String.prototype.trimStart, ct = !!String.prototype.trimEnd, gt = !!Number.isSafeInteger, pt = gt ? Number.isSafeInteger : function(e) {
|
|
1895
1891
|
return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
|
|
1896
1892
|
}, q = !0;
|
|
1897
1893
|
try {
|
|
1898
|
-
var
|
|
1899
|
-
q = ((X =
|
|
1894
|
+
var vt = Le("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
1895
|
+
q = ((X = vt.exec("a")) === null || X === void 0 ? void 0 : X[0]) === "a";
|
|
1900
1896
|
} catch {
|
|
1901
1897
|
q = !1;
|
|
1902
1898
|
}
|
|
1903
|
-
var
|
|
1899
|
+
var se = ut ? (
|
|
1904
1900
|
// Native
|
|
1905
1901
|
function(t, r, n) {
|
|
1906
1902
|
return t.startsWith(r, n);
|
|
@@ -1910,7 +1906,7 @@ var ue = ht ? (
|
|
|
1910
1906
|
function(t, r, n) {
|
|
1911
1907
|
return t.slice(n, n + r.length) === r;
|
|
1912
1908
|
}
|
|
1913
|
-
), Q =
|
|
1909
|
+
), Q = ht ? String.fromCodePoint : (
|
|
1914
1910
|
// IE11
|
|
1915
1911
|
function() {
|
|
1916
1912
|
for (var t = [], r = 0; r < arguments.length; r++)
|
|
@@ -1922,9 +1918,9 @@ var ue = ht ? (
|
|
|
1922
1918
|
}
|
|
1923
1919
|
return n;
|
|
1924
1920
|
}
|
|
1925
|
-
),
|
|
1921
|
+
), ue = (
|
|
1926
1922
|
// native
|
|
1927
|
-
|
|
1923
|
+
lt ? Object.fromEntries : (
|
|
1928
1924
|
// Ponyfill
|
|
1929
1925
|
function(t) {
|
|
1930
1926
|
for (var r = {}, n = 0, a = t; n < a.length; n++) {
|
|
@@ -1934,7 +1930,7 @@ var ue = ht ? (
|
|
|
1934
1930
|
return r;
|
|
1935
1931
|
}
|
|
1936
1932
|
)
|
|
1937
|
-
),
|
|
1933
|
+
), Pe = ft ? (
|
|
1938
1934
|
// Native
|
|
1939
1935
|
function(t, r) {
|
|
1940
1936
|
return t.codePointAt(r);
|
|
@@ -1948,7 +1944,7 @@ var ue = ht ? (
|
|
|
1948
1944
|
return a < 55296 || a > 56319 || r + 1 === n || (i = t.charCodeAt(r + 1)) < 56320 || i > 57343 ? a : (a - 55296 << 10) + (i - 56320) + 65536;
|
|
1949
1945
|
}
|
|
1950
1946
|
}
|
|
1951
|
-
), Et =
|
|
1947
|
+
), Et = mt ? (
|
|
1952
1948
|
// Native
|
|
1953
1949
|
function(t) {
|
|
1954
1950
|
return t.trimStart();
|
|
@@ -1956,9 +1952,9 @@ var ue = ht ? (
|
|
|
1956
1952
|
) : (
|
|
1957
1953
|
// Ponyfill
|
|
1958
1954
|
function(t) {
|
|
1959
|
-
return t.replace(
|
|
1955
|
+
return t.replace(ot, "");
|
|
1960
1956
|
}
|
|
1961
|
-
),
|
|
1957
|
+
), dt = ct ? (
|
|
1962
1958
|
// Native
|
|
1963
1959
|
function(t) {
|
|
1964
1960
|
return t.trimEnd();
|
|
@@ -1966,32 +1962,32 @@ var ue = ht ? (
|
|
|
1966
1962
|
) : (
|
|
1967
1963
|
// Ponyfill
|
|
1968
1964
|
function(t) {
|
|
1969
|
-
return t.replace(
|
|
1965
|
+
return t.replace(st, "");
|
|
1970
1966
|
}
|
|
1971
1967
|
);
|
|
1972
|
-
function
|
|
1968
|
+
function Le(e, t) {
|
|
1973
1969
|
return new RegExp(e, t);
|
|
1974
1970
|
}
|
|
1975
1971
|
var Y;
|
|
1976
1972
|
if (q) {
|
|
1977
|
-
var
|
|
1973
|
+
var he = Le("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
1978
1974
|
Y = function(t, r) {
|
|
1979
1975
|
var n;
|
|
1980
|
-
|
|
1981
|
-
var a =
|
|
1976
|
+
he.lastIndex = r;
|
|
1977
|
+
var a = he.exec(t);
|
|
1982
1978
|
return (n = a[1]) !== null && n !== void 0 ? n : "";
|
|
1983
1979
|
};
|
|
1984
1980
|
} else
|
|
1985
1981
|
Y = function(t, r) {
|
|
1986
1982
|
for (var n = []; ; ) {
|
|
1987
|
-
var a =
|
|
1988
|
-
if (a === void 0 ||
|
|
1983
|
+
var a = Pe(t, r);
|
|
1984
|
+
if (a === void 0 || Re(a) || Tt(a))
|
|
1989
1985
|
break;
|
|
1990
1986
|
n.push(a), r += a >= 65536 ? 2 : 1;
|
|
1991
1987
|
}
|
|
1992
1988
|
return Q.apply(void 0, n);
|
|
1993
1989
|
};
|
|
1994
|
-
var
|
|
1990
|
+
var bt = (
|
|
1995
1991
|
/** @class */
|
|
1996
1992
|
function() {
|
|
1997
1993
|
function e(t, r) {
|
|
@@ -2073,7 +2069,7 @@ var yt = (
|
|
|
2073
2069
|
return this.error(g.INVALID_TAG, v(n, this.clonePosition()));
|
|
2074
2070
|
}, e.prototype.parseTagName = function() {
|
|
2075
2071
|
var t = this.offset();
|
|
2076
|
-
for (this.bump(); !this.isEOF() &&
|
|
2072
|
+
for (this.bump(); !this.isEOF() && xt(this.char()); )
|
|
2077
2073
|
this.bump();
|
|
2078
2074
|
return this.message.slice(t, this.offset());
|
|
2079
2075
|
}, e.prototype.parseLiteral = function(t, r) {
|
|
@@ -2102,7 +2098,7 @@ var yt = (
|
|
|
2102
2098
|
};
|
|
2103
2099
|
}, e.prototype.tryParseLeftAngleBracket = function() {
|
|
2104
2100
|
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
|
|
2105
|
-
!
|
|
2101
|
+
!yt(this.peek() || 0)) ? (this.bump(), "<") : null;
|
|
2106
2102
|
}, e.prototype.tryParseQuote = function(t) {
|
|
2107
2103
|
if (this.isEOF() || this.char() !== 39)
|
|
2108
2104
|
return null;
|
|
@@ -2189,7 +2185,7 @@ var yt = (
|
|
|
2189
2185
|
var h = this.clonePosition(), m = this.parseSimpleArgStyleIfPossible();
|
|
2190
2186
|
if (m.err)
|
|
2191
2187
|
return m;
|
|
2192
|
-
var c =
|
|
2188
|
+
var c = dt(m.val);
|
|
2193
2189
|
if (c.length === 0)
|
|
2194
2190
|
return this.error(g.EXPECT_ARGUMENT_STYLE, v(this.clonePosition(), this.clonePosition()));
|
|
2195
2191
|
var b = v(h, this.clonePosition());
|
|
@@ -2198,28 +2194,28 @@ var yt = (
|
|
|
2198
2194
|
var x = this.tryParseArgumentClose(a);
|
|
2199
2195
|
if (x.err)
|
|
2200
2196
|
return x;
|
|
2201
|
-
var
|
|
2202
|
-
if (l &&
|
|
2197
|
+
var E = v(a, this.clonePosition());
|
|
2198
|
+
if (l && se(l == null ? void 0 : l.style, "::", 0)) {
|
|
2203
2199
|
var p = Et(l.style.slice(2));
|
|
2204
2200
|
if (s === "number") {
|
|
2205
2201
|
var m = this.parseNumberSkeletonFromString(p, l.styleLocation);
|
|
2206
2202
|
return m.err ? m : {
|
|
2207
|
-
val: { type: y.number, value: n, location:
|
|
2203
|
+
val: { type: y.number, value: n, location: E, style: m.val },
|
|
2208
2204
|
err: null
|
|
2209
2205
|
};
|
|
2210
2206
|
} else {
|
|
2211
2207
|
if (p.length === 0)
|
|
2212
|
-
return this.error(g.EXPECT_DATE_TIME_SKELETON,
|
|
2213
|
-
var
|
|
2214
|
-
this.locale && (
|
|
2208
|
+
return this.error(g.EXPECT_DATE_TIME_SKELETON, E);
|
|
2209
|
+
var d = p;
|
|
2210
|
+
this.locale && (d = at(p, this.locale));
|
|
2215
2211
|
var c = {
|
|
2216
2212
|
type: D.dateTime,
|
|
2217
|
-
pattern:
|
|
2213
|
+
pattern: d,
|
|
2218
2214
|
location: l.styleLocation,
|
|
2219
|
-
parsedOptions: this.shouldParseSkeletons ?
|
|
2215
|
+
parsedOptions: this.shouldParseSkeletons ? Ye(d) : {}
|
|
2220
2216
|
}, T = s === "date" ? y.date : y.time;
|
|
2221
2217
|
return {
|
|
2222
|
-
val: { type: T, value: n, location:
|
|
2218
|
+
val: { type: T, value: n, location: E, style: c },
|
|
2223
2219
|
err: null
|
|
2224
2220
|
};
|
|
2225
2221
|
}
|
|
@@ -2228,7 +2224,7 @@ var yt = (
|
|
|
2228
2224
|
val: {
|
|
2229
2225
|
type: s === "number" ? y.number : s === "date" ? y.date : y.time,
|
|
2230
2226
|
value: n,
|
|
2231
|
-
location:
|
|
2227
|
+
location: E,
|
|
2232
2228
|
style: (i = l == null ? void 0 : l.style) !== null && i !== void 0 ? i : null
|
|
2233
2229
|
},
|
|
2234
2230
|
err: null
|
|
@@ -2257,23 +2253,23 @@ var yt = (
|
|
|
2257
2253
|
var x = this.tryParseArgumentClose(a);
|
|
2258
2254
|
if (x.err)
|
|
2259
2255
|
return x;
|
|
2260
|
-
var
|
|
2256
|
+
var re = v(a, this.clonePosition());
|
|
2261
2257
|
return s === "select" ? {
|
|
2262
2258
|
val: {
|
|
2263
2259
|
type: y.select,
|
|
2264
2260
|
value: n,
|
|
2265
|
-
options:
|
|
2266
|
-
location:
|
|
2261
|
+
options: ue(G.val),
|
|
2262
|
+
location: re
|
|
2267
2263
|
},
|
|
2268
2264
|
err: null
|
|
2269
2265
|
} : {
|
|
2270
2266
|
val: {
|
|
2271
2267
|
type: y.plural,
|
|
2272
2268
|
value: n,
|
|
2273
|
-
options:
|
|
2269
|
+
options: ue(G.val),
|
|
2274
2270
|
offset: R,
|
|
2275
2271
|
pluralType: s === "plural" ? "cardinal" : "ordinal",
|
|
2276
|
-
location:
|
|
2272
|
+
location: re
|
|
2277
2273
|
},
|
|
2278
2274
|
err: null
|
|
2279
2275
|
};
|
|
@@ -2321,7 +2317,7 @@ var yt = (
|
|
|
2321
2317
|
}, e.prototype.parseNumberSkeletonFromString = function(t, r) {
|
|
2322
2318
|
var n = [];
|
|
2323
2319
|
try {
|
|
2324
|
-
n =
|
|
2320
|
+
n = Ke(t);
|
|
2325
2321
|
} catch {
|
|
2326
2322
|
return this.error(g.INVALID_NUMBER_SKELETON, r);
|
|
2327
2323
|
}
|
|
@@ -2330,7 +2326,7 @@ var yt = (
|
|
|
2330
2326
|
type: D.number,
|
|
2331
2327
|
tokens: n,
|
|
2332
2328
|
location: r,
|
|
2333
|
-
parsedOptions: this.shouldParseSkeletons ?
|
|
2329
|
+
parsedOptions: this.shouldParseSkeletons ? nt(n) : {}
|
|
2334
2330
|
},
|
|
2335
2331
|
err: null
|
|
2336
2332
|
};
|
|
@@ -2355,9 +2351,9 @@ var yt = (
|
|
|
2355
2351
|
var x = this.parseMessage(t + 1, r, n);
|
|
2356
2352
|
if (x.err)
|
|
2357
2353
|
return x;
|
|
2358
|
-
var
|
|
2359
|
-
if (
|
|
2360
|
-
return
|
|
2354
|
+
var E = this.tryParseArgumentClose(b);
|
|
2355
|
+
if (E.err)
|
|
2356
|
+
return E;
|
|
2361
2357
|
s.push([
|
|
2362
2358
|
l,
|
|
2363
2359
|
{
|
|
@@ -2378,7 +2374,7 @@ var yt = (
|
|
|
2378
2374
|
break;
|
|
2379
2375
|
}
|
|
2380
2376
|
var u = v(a, this.clonePosition());
|
|
2381
|
-
return i ? (o *= n,
|
|
2377
|
+
return i ? (o *= n, pt(o) ? { val: o, err: null } : this.error(r, u)) : this.error(t, u);
|
|
2382
2378
|
}, e.prototype.offset = function() {
|
|
2383
2379
|
return this.position.offset;
|
|
2384
2380
|
}, e.prototype.isEOF = function() {
|
|
@@ -2393,7 +2389,7 @@ var yt = (
|
|
|
2393
2389
|
var t = this.position.offset;
|
|
2394
2390
|
if (t >= this.message.length)
|
|
2395
2391
|
throw Error("out of bound");
|
|
2396
|
-
var r =
|
|
2392
|
+
var r = Pe(this.message, t);
|
|
2397
2393
|
if (r === void 0)
|
|
2398
2394
|
throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary"));
|
|
2399
2395
|
return r;
|
|
@@ -2412,7 +2408,7 @@ var yt = (
|
|
|
2412
2408
|
t === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += t < 65536 ? 1 : 2);
|
|
2413
2409
|
}
|
|
2414
2410
|
}, e.prototype.bumpIf = function(t) {
|
|
2415
|
-
if (
|
|
2411
|
+
if (se(this.message, t, this.offset())) {
|
|
2416
2412
|
for (var r = 0; r < t.length; r++)
|
|
2417
2413
|
this.bump();
|
|
2418
2414
|
return !0;
|
|
@@ -2434,7 +2430,7 @@ var yt = (
|
|
|
2434
2430
|
break;
|
|
2435
2431
|
}
|
|
2436
2432
|
}, e.prototype.bumpSpace = function() {
|
|
2437
|
-
for (; !this.isEOF() &&
|
|
2433
|
+
for (; !this.isEOF() && Re(this.char()); )
|
|
2438
2434
|
this.bump();
|
|
2439
2435
|
}, e.prototype.peek = function() {
|
|
2440
2436
|
if (this.isEOF())
|
|
@@ -2447,29 +2443,29 @@ var yt = (
|
|
|
2447
2443
|
function $(e) {
|
|
2448
2444
|
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
|
|
2449
2445
|
}
|
|
2450
|
-
function
|
|
2446
|
+
function yt(e) {
|
|
2451
2447
|
return $(e) || e === 47;
|
|
2452
2448
|
}
|
|
2453
|
-
function
|
|
2449
|
+
function xt(e) {
|
|
2454
2450
|
return e === 45 || e === 46 || e >= 48 && e <= 57 || e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90 || e == 183 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8255 && e <= 8256 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
|
|
2455
2451
|
}
|
|
2456
|
-
function
|
|
2452
|
+
function Re(e) {
|
|
2457
2453
|
return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
|
|
2458
2454
|
}
|
|
2459
|
-
function
|
|
2455
|
+
function Tt(e) {
|
|
2460
2456
|
return e >= 33 && e <= 35 || e === 36 || e >= 37 && e <= 39 || e === 40 || e === 41 || e === 42 || e === 43 || e === 44 || e === 45 || e >= 46 && e <= 47 || e >= 58 && e <= 59 || e >= 60 && e <= 62 || e >= 63 && e <= 64 || e === 91 || e === 92 || e === 93 || e === 94 || e === 96 || e === 123 || e === 124 || e === 125 || e === 126 || e === 161 || e >= 162 && e <= 165 || e === 166 || e === 167 || e === 169 || e === 171 || e === 172 || e === 174 || e === 176 || e === 177 || e === 182 || e === 187 || e === 191 || e === 215 || e === 247 || e >= 8208 && e <= 8213 || e >= 8214 && e <= 8215 || e === 8216 || e === 8217 || e === 8218 || e >= 8219 && e <= 8220 || e === 8221 || e === 8222 || e === 8223 || e >= 8224 && e <= 8231 || e >= 8240 && e <= 8248 || e === 8249 || e === 8250 || e >= 8251 && e <= 8254 || e >= 8257 && e <= 8259 || e === 8260 || e === 8261 || e === 8262 || e >= 8263 && e <= 8273 || e === 8274 || e === 8275 || e >= 8277 && e <= 8286 || e >= 8592 && e <= 8596 || e >= 8597 && e <= 8601 || e >= 8602 && e <= 8603 || e >= 8604 && e <= 8607 || e === 8608 || e >= 8609 && e <= 8610 || e === 8611 || e >= 8612 && e <= 8613 || e === 8614 || e >= 8615 && e <= 8621 || e === 8622 || e >= 8623 && e <= 8653 || e >= 8654 && e <= 8655 || e >= 8656 && e <= 8657 || e === 8658 || e === 8659 || e === 8660 || e >= 8661 && e <= 8691 || e >= 8692 && e <= 8959 || e >= 8960 && e <= 8967 || e === 8968 || e === 8969 || e === 8970 || e === 8971 || e >= 8972 && e <= 8991 || e >= 8992 && e <= 8993 || e >= 8994 && e <= 9e3 || e === 9001 || e === 9002 || e >= 9003 && e <= 9083 || e === 9084 || e >= 9085 && e <= 9114 || e >= 9115 && e <= 9139 || e >= 9140 && e <= 9179 || e >= 9180 && e <= 9185 || e >= 9186 && e <= 9254 || e >= 9255 && e <= 9279 || e >= 9280 && e <= 9290 || e >= 9291 && e <= 9311 || e >= 9472 && e <= 9654 || e === 9655 || e >= 9656 && e <= 9664 || e === 9665 || e >= 9666 && e <= 9719 || e >= 9720 && e <= 9727 || e >= 9728 && e <= 9838 || e === 9839 || e >= 9840 && e <= 10087 || e === 10088 || e === 10089 || e === 10090 || e === 10091 || e === 10092 || e === 10093 || e === 10094 || e === 10095 || e === 10096 || e === 10097 || e === 10098 || e === 10099 || e === 10100 || e === 10101 || e >= 10132 && e <= 10175 || e >= 10176 && e <= 10180 || e === 10181 || e === 10182 || e >= 10183 && e <= 10213 || e === 10214 || e === 10215 || e === 10216 || e === 10217 || e === 10218 || e === 10219 || e === 10220 || e === 10221 || e === 10222 || e === 10223 || e >= 10224 && e <= 10239 || e >= 10240 && e <= 10495 || e >= 10496 && e <= 10626 || e === 10627 || e === 10628 || e === 10629 || e === 10630 || e === 10631 || e === 10632 || e === 10633 || e === 10634 || e === 10635 || e === 10636 || e === 10637 || e === 10638 || e === 10639 || e === 10640 || e === 10641 || e === 10642 || e === 10643 || e === 10644 || e === 10645 || e === 10646 || e === 10647 || e === 10648 || e >= 10649 && e <= 10711 || e === 10712 || e === 10713 || e === 10714 || e === 10715 || e >= 10716 && e <= 10747 || e === 10748 || e === 10749 || e >= 10750 && e <= 11007 || e >= 11008 && e <= 11055 || e >= 11056 && e <= 11076 || e >= 11077 && e <= 11078 || e >= 11079 && e <= 11084 || e >= 11085 && e <= 11123 || e >= 11124 && e <= 11125 || e >= 11126 && e <= 11157 || e === 11158 || e >= 11159 && e <= 11263 || e >= 11776 && e <= 11777 || e === 11778 || e === 11779 || e === 11780 || e === 11781 || e >= 11782 && e <= 11784 || e === 11785 || e === 11786 || e === 11787 || e === 11788 || e === 11789 || e >= 11790 && e <= 11798 || e === 11799 || e >= 11800 && e <= 11801 || e === 11802 || e === 11803 || e === 11804 || e === 11805 || e >= 11806 && e <= 11807 || e === 11808 || e === 11809 || e === 11810 || e === 11811 || e === 11812 || e === 11813 || e === 11814 || e === 11815 || e === 11816 || e === 11817 || e >= 11818 && e <= 11822 || e === 11823 || e >= 11824 && e <= 11833 || e >= 11834 && e <= 11835 || e >= 11836 && e <= 11839 || e === 11840 || e === 11841 || e === 11842 || e >= 11843 && e <= 11855 || e >= 11856 && e <= 11857 || e === 11858 || e >= 11859 && e <= 11903 || e >= 12289 && e <= 12291 || e === 12296 || e === 12297 || e === 12298 || e === 12299 || e === 12300 || e === 12301 || e === 12302 || e === 12303 || e === 12304 || e === 12305 || e >= 12306 && e <= 12307 || e === 12308 || e === 12309 || e === 12310 || e === 12311 || e === 12312 || e === 12313 || e === 12314 || e === 12315 || e === 12316 || e === 12317 || e >= 12318 && e <= 12319 || e === 12320 || e === 12336 || e === 64830 || e === 64831 || e >= 65093 && e <= 65094;
|
|
2461
2457
|
}
|
|
2462
2458
|
function K(e) {
|
|
2463
2459
|
e.forEach(function(t) {
|
|
2464
|
-
if (delete t.location,
|
|
2460
|
+
if (delete t.location, Te(t) || Se(t))
|
|
2465
2461
|
for (var r in t.options)
|
|
2466
2462
|
delete t.options[r].location, K(t.options[r].value);
|
|
2467
|
-
else
|
|
2463
|
+
else be(t) && Ie(t.style) || (ye(t) || xe(t)) && J(t.style) ? delete t.style.location : He(t) && K(t.children);
|
|
2468
2464
|
});
|
|
2469
2465
|
}
|
|
2470
|
-
function
|
|
2466
|
+
function St(e, t) {
|
|
2471
2467
|
t === void 0 && (t = {}), t = f({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
|
|
2472
|
-
var r = new
|
|
2468
|
+
var r = new bt(e, t).parse();
|
|
2473
2469
|
if (r.err) {
|
|
2474
2470
|
var n = SyntaxError(g[r.err.kind]);
|
|
2475
2471
|
throw n.location = r.err.location, n.originalMessage = r.err.message, n;
|
|
@@ -2492,7 +2488,7 @@ var L = (
|
|
|
2492
2488
|
return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
|
|
2493
2489
|
}, t;
|
|
2494
2490
|
}(Error)
|
|
2495
|
-
),
|
|
2491
|
+
), le = (
|
|
2496
2492
|
/** @class */
|
|
2497
2493
|
function(e) {
|
|
2498
2494
|
_(t, e);
|
|
@@ -2501,7 +2497,7 @@ var L = (
|
|
|
2501
2497
|
}
|
|
2502
2498
|
return t;
|
|
2503
2499
|
}(L)
|
|
2504
|
-
),
|
|
2500
|
+
), Ht = (
|
|
2505
2501
|
/** @class */
|
|
2506
2502
|
function(e) {
|
|
2507
2503
|
_(t, e);
|
|
@@ -2510,7 +2506,7 @@ var L = (
|
|
|
2510
2506
|
}
|
|
2511
2507
|
return t;
|
|
2512
2508
|
}(L)
|
|
2513
|
-
),
|
|
2509
|
+
), It = (
|
|
2514
2510
|
/** @class */
|
|
2515
2511
|
function(e) {
|
|
2516
2512
|
_(t, e);
|
|
@@ -2523,17 +2519,17 @@ var L = (
|
|
|
2523
2519
|
(function(e) {
|
|
2524
2520
|
e[e.literal = 0] = "literal", e[e.object = 1] = "object";
|
|
2525
2521
|
})(H || (H = {}));
|
|
2526
|
-
function
|
|
2522
|
+
function Nt(e) {
|
|
2527
2523
|
return e.length < 2 ? e : e.reduce(function(t, r) {
|
|
2528
2524
|
var n = t[t.length - 1];
|
|
2529
2525
|
return !n || n.type !== H.literal || r.type !== H.literal ? t.push(r) : n.value += r.value, t;
|
|
2530
2526
|
}, []);
|
|
2531
2527
|
}
|
|
2532
|
-
function
|
|
2528
|
+
function At(e) {
|
|
2533
2529
|
return typeof e == "function";
|
|
2534
2530
|
}
|
|
2535
2531
|
function k(e, t, r, n, a, i, o) {
|
|
2536
|
-
if (e.length === 1 &&
|
|
2532
|
+
if (e.length === 1 && ne(e[0]))
|
|
2537
2533
|
return [
|
|
2538
2534
|
{
|
|
2539
2535
|
type: H.literal,
|
|
@@ -2542,14 +2538,14 @@ function k(e, t, r, n, a, i, o) {
|
|
|
2542
2538
|
];
|
|
2543
2539
|
for (var s = [], u = 0, l = e; u < l.length; u++) {
|
|
2544
2540
|
var h = l[u];
|
|
2545
|
-
if (
|
|
2541
|
+
if (ne(h)) {
|
|
2546
2542
|
s.push({
|
|
2547
2543
|
type: H.literal,
|
|
2548
2544
|
value: h.value
|
|
2549
2545
|
});
|
|
2550
2546
|
continue;
|
|
2551
2547
|
}
|
|
2552
|
-
if (
|
|
2548
|
+
if (qe(h)) {
|
|
2553
2549
|
typeof i == "number" && s.push({
|
|
2554
2550
|
type: H.literal,
|
|
2555
2551
|
value: r.getNumberFormat(t).format(i)
|
|
@@ -2558,16 +2554,16 @@ function k(e, t, r, n, a, i, o) {
|
|
|
2558
2554
|
}
|
|
2559
2555
|
var m = h.value;
|
|
2560
2556
|
if (!(a && m in a))
|
|
2561
|
-
throw new
|
|
2557
|
+
throw new It(m, o);
|
|
2562
2558
|
var c = a[m];
|
|
2563
|
-
if (
|
|
2559
|
+
if (Je(h)) {
|
|
2564
2560
|
(!c || typeof c == "string" || typeof c == "number") && (c = typeof c == "string" || typeof c == "number" ? String(c) : ""), s.push({
|
|
2565
2561
|
type: typeof c == "string" ? H.literal : H.object,
|
|
2566
2562
|
value: c
|
|
2567
2563
|
});
|
|
2568
2564
|
continue;
|
|
2569
2565
|
}
|
|
2570
|
-
if (
|
|
2566
|
+
if (ye(h)) {
|
|
2571
2567
|
var b = typeof h.style == "string" ? n.date[h.style] : J(h.style) ? h.style.parsedOptions : void 0;
|
|
2572
2568
|
s.push({
|
|
2573
2569
|
type: H.literal,
|
|
@@ -2575,7 +2571,7 @@ function k(e, t, r, n, a, i, o) {
|
|
|
2575
2571
|
});
|
|
2576
2572
|
continue;
|
|
2577
2573
|
}
|
|
2578
|
-
if (
|
|
2574
|
+
if (xe(h)) {
|
|
2579
2575
|
var b = typeof h.style == "string" ? n.time[h.style] : J(h.style) ? h.style.parsedOptions : n.time.medium;
|
|
2580
2576
|
s.push({
|
|
2581
2577
|
type: H.literal,
|
|
@@ -2583,19 +2579,19 @@ function k(e, t, r, n, a, i, o) {
|
|
|
2583
2579
|
});
|
|
2584
2580
|
continue;
|
|
2585
2581
|
}
|
|
2586
|
-
if (
|
|
2587
|
-
var b = typeof h.style == "string" ? n.number[h.style] :
|
|
2582
|
+
if (be(h)) {
|
|
2583
|
+
var b = typeof h.style == "string" ? n.number[h.style] : Ie(h.style) ? h.style.parsedOptions : void 0;
|
|
2588
2584
|
b && b.scale && (c = c * (b.scale || 1)), s.push({
|
|
2589
2585
|
type: H.literal,
|
|
2590
2586
|
value: r.getNumberFormat(t, b).format(c)
|
|
2591
2587
|
});
|
|
2592
2588
|
continue;
|
|
2593
2589
|
}
|
|
2594
|
-
if (
|
|
2595
|
-
var x = h.children,
|
|
2596
|
-
if (!
|
|
2597
|
-
throw new
|
|
2598
|
-
var
|
|
2590
|
+
if (He(h)) {
|
|
2591
|
+
var x = h.children, E = h.value, p = a[E];
|
|
2592
|
+
if (!At(p))
|
|
2593
|
+
throw new Ht(E, "function", o);
|
|
2594
|
+
var d = k(x, t, r, n, a, i), T = p(d.map(function(R) {
|
|
2599
2595
|
return R.value;
|
|
2600
2596
|
}));
|
|
2601
2597
|
Array.isArray(T) || (T = [T]), s.push.apply(s, T.map(function(R) {
|
|
@@ -2605,14 +2601,14 @@ function k(e, t, r, n, a, i, o) {
|
|
|
2605
2601
|
};
|
|
2606
2602
|
}));
|
|
2607
2603
|
}
|
|
2608
|
-
if (
|
|
2604
|
+
if (Te(h)) {
|
|
2609
2605
|
var S = h.options[c] || h.options.other;
|
|
2610
2606
|
if (!S)
|
|
2611
|
-
throw new
|
|
2607
|
+
throw new le(h.value, c, Object.keys(h.options), o);
|
|
2612
2608
|
s.push.apply(s, k(S.value, t, r, n, a));
|
|
2613
2609
|
continue;
|
|
2614
2610
|
}
|
|
2615
|
-
if (
|
|
2611
|
+
if (Se(h)) {
|
|
2616
2612
|
var S = h.options["=".concat(c)];
|
|
2617
2613
|
if (!S) {
|
|
2618
2614
|
if (!Intl.PluralRules)
|
|
@@ -2623,21 +2619,21 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
|
2623
2619
|
S = h.options[w] || h.options.other;
|
|
2624
2620
|
}
|
|
2625
2621
|
if (!S)
|
|
2626
|
-
throw new
|
|
2622
|
+
throw new le(h.value, c, Object.keys(h.options), o);
|
|
2627
2623
|
s.push.apply(s, k(S.value, t, r, n, a, c - (h.offset || 0)));
|
|
2628
2624
|
continue;
|
|
2629
2625
|
}
|
|
2630
2626
|
}
|
|
2631
|
-
return
|
|
2627
|
+
return Nt(s);
|
|
2632
2628
|
}
|
|
2633
|
-
function
|
|
2629
|
+
function Bt(e, t) {
|
|
2634
2630
|
return t ? f(f(f({}, e || {}), t || {}), Object.keys(e).reduce(function(r, n) {
|
|
2635
2631
|
return r[n] = f(f({}, e[n]), t[n] || {}), r;
|
|
2636
2632
|
}, {})) : e;
|
|
2637
2633
|
}
|
|
2638
|
-
function
|
|
2634
|
+
function _t(e, t) {
|
|
2639
2635
|
return t ? Object.keys(e).reduce(function(r, n) {
|
|
2640
|
-
return r[n] =
|
|
2636
|
+
return r[n] = Bt(e[n], t[n]), r;
|
|
2641
2637
|
}, f({}, e)) : e;
|
|
2642
2638
|
}
|
|
2643
2639
|
function W(e) {
|
|
@@ -2654,7 +2650,7 @@ function W(e) {
|
|
|
2654
2650
|
}
|
|
2655
2651
|
};
|
|
2656
2652
|
}
|
|
2657
|
-
function
|
|
2653
|
+
function Pt(e) {
|
|
2658
2654
|
return e === void 0 && (e = {
|
|
2659
2655
|
number: {},
|
|
2660
2656
|
dateTime: {},
|
|
@@ -2686,7 +2682,7 @@ function Lt(e) {
|
|
|
2686
2682
|
})
|
|
2687
2683
|
};
|
|
2688
2684
|
}
|
|
2689
|
-
var
|
|
2685
|
+
var Oe = (
|
|
2690
2686
|
/** @class */
|
|
2691
2687
|
function() {
|
|
2692
2688
|
function e(t, r, n, a) {
|
|
@@ -2718,13 +2714,13 @@ var Me = (
|
|
|
2718
2714
|
throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
2719
2715
|
var o = a || {};
|
|
2720
2716
|
o.formatters;
|
|
2721
|
-
var s =
|
|
2717
|
+
var s = Ve(o, ["formatters"]);
|
|
2722
2718
|
this.ast = e.__parse(t, f(f({}, s), { locale: this.resolvedLocale }));
|
|
2723
2719
|
} else
|
|
2724
2720
|
this.ast = t;
|
|
2725
2721
|
if (!Array.isArray(this.ast))
|
|
2726
2722
|
throw new TypeError("A message must be provided as a String or AST.");
|
|
2727
|
-
this.formats =
|
|
2723
|
+
this.formats = _t(e.formats, n), this.formatters = a && a.formatters || Pt(this.formatterCache);
|
|
2728
2724
|
}
|
|
2729
2725
|
return Object.defineProperty(e, "defaultLocale", {
|
|
2730
2726
|
get: function() {
|
|
@@ -2737,7 +2733,7 @@ var Me = (
|
|
|
2737
2733
|
var r = Intl.NumberFormat.supportedLocalesOf(t);
|
|
2738
2734
|
return r.length > 0 ? new Intl.Locale(r[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]);
|
|
2739
2735
|
}
|
|
2740
|
-
}, e.__parse =
|
|
2736
|
+
}, e.__parse = St, e.formats = {
|
|
2741
2737
|
number: {
|
|
2742
2738
|
integer: {
|
|
2743
2739
|
maximumFractionDigits: 0
|
|
@@ -2814,7 +2810,7 @@ var F = (
|
|
|
2814
2810
|
}
|
|
2815
2811
|
return t;
|
|
2816
2812
|
}(Error)
|
|
2817
|
-
),
|
|
2813
|
+
), Lt = (
|
|
2818
2814
|
/** @class */
|
|
2819
2815
|
function(e) {
|
|
2820
2816
|
_(t, e);
|
|
@@ -2823,7 +2819,7 @@ var F = (
|
|
|
2823
2819
|
}
|
|
2824
2820
|
return t;
|
|
2825
2821
|
}(F)
|
|
2826
|
-
),
|
|
2822
|
+
), Rt = (
|
|
2827
2823
|
/** @class */
|
|
2828
2824
|
function(e) {
|
|
2829
2825
|
_(t, e);
|
|
@@ -2832,7 +2828,7 @@ var F = (
|
|
|
2832
2828
|
}
|
|
2833
2829
|
return t;
|
|
2834
2830
|
}(F)
|
|
2835
|
-
),
|
|
2831
|
+
), fe = (
|
|
2836
2832
|
/** @class */
|
|
2837
2833
|
function(e) {
|
|
2838
2834
|
_(t, e);
|
|
@@ -2867,7 +2863,7 @@ Description: `).concat(a == null ? void 0 : a.description, `
|
|
|
2867
2863
|
}
|
|
2868
2864
|
return t;
|
|
2869
2865
|
}(B)
|
|
2870
|
-
),
|
|
2866
|
+
), Ot = (
|
|
2871
2867
|
/** @class */
|
|
2872
2868
|
function(e) {
|
|
2873
2869
|
_(t, e);
|
|
@@ -2886,21 +2882,21 @@ function C(e, t, r) {
|
|
|
2886
2882
|
return a in e ? n[a] = e[a] : a in r && (n[a] = r[a]), n;
|
|
2887
2883
|
}, {});
|
|
2888
2884
|
}
|
|
2889
|
-
var
|
|
2885
|
+
var Mt = function(e) {
|
|
2890
2886
|
process.env.NODE_ENV !== "production" && console.error(e);
|
|
2891
|
-
},
|
|
2887
|
+
}, Ct = function(e) {
|
|
2892
2888
|
process.env.NODE_ENV !== "production" && console.warn(e);
|
|
2893
|
-
},
|
|
2889
|
+
}, Dt = {
|
|
2894
2890
|
formats: {},
|
|
2895
2891
|
messages: {},
|
|
2896
2892
|
timeZone: void 0,
|
|
2897
2893
|
defaultLocale: "en",
|
|
2898
2894
|
defaultFormats: {},
|
|
2899
2895
|
fallbackOnEmptyString: !0,
|
|
2900
|
-
onError:
|
|
2901
|
-
onWarn:
|
|
2896
|
+
onError: Mt,
|
|
2897
|
+
onWarn: Ct
|
|
2902
2898
|
};
|
|
2903
|
-
function
|
|
2899
|
+
function Me() {
|
|
2904
2900
|
return {
|
|
2905
2901
|
dateTime: {},
|
|
2906
2902
|
number: {},
|
|
@@ -2925,8 +2921,8 @@ function O(e) {
|
|
|
2925
2921
|
}
|
|
2926
2922
|
};
|
|
2927
2923
|
}
|
|
2928
|
-
function
|
|
2929
|
-
e === void 0 && (e =
|
|
2924
|
+
function wt(e) {
|
|
2925
|
+
e === void 0 && (e = Me());
|
|
2930
2926
|
var t = Intl.RelativeTimeFormat, r = Intl.ListFormat, n = Intl.DisplayNames, a = I(function() {
|
|
2931
2927
|
for (var s, u = [], l = 0; l < arguments.length; l++)
|
|
2932
2928
|
u[l] = arguments[l];
|
|
@@ -2953,7 +2949,7 @@ function Ft(e) {
|
|
|
2953
2949
|
getDateTimeFormat: a,
|
|
2954
2950
|
getNumberFormat: i,
|
|
2955
2951
|
getMessageFormat: I(function(s, u, l, h) {
|
|
2956
|
-
return new
|
|
2952
|
+
return new Oe(s, u, l, f({ formatters: {
|
|
2957
2953
|
getNumberFormat: i,
|
|
2958
2954
|
getDateTimeFormat: a,
|
|
2959
2955
|
getPluralRules: o
|
|
@@ -2989,13 +2985,13 @@ function Ft(e) {
|
|
|
2989
2985
|
})
|
|
2990
2986
|
};
|
|
2991
2987
|
}
|
|
2992
|
-
function
|
|
2988
|
+
function te(e, t, r, n) {
|
|
2993
2989
|
var a = e && e[t], i;
|
|
2994
2990
|
if (a && (i = a[r]), i)
|
|
2995
2991
|
return i;
|
|
2996
|
-
n(new
|
|
2992
|
+
n(new Lt("No ".concat(t, " format named: ").concat(r)));
|
|
2997
2993
|
}
|
|
2998
|
-
function
|
|
2994
|
+
function Ft(e, t, r) {
|
|
2999
2995
|
if (r === void 0 && (r = Error), !e)
|
|
3000
2996
|
throw new r(t);
|
|
3001
2997
|
}
|
|
@@ -3039,60 +3035,60 @@ function V(e, t) {
|
|
|
3039
3035
|
return r[n] = f({ timeZone: t }, e[n]), r;
|
|
3040
3036
|
}, {});
|
|
3041
3037
|
}
|
|
3042
|
-
function
|
|
3038
|
+
function me(e, t) {
|
|
3043
3039
|
var r = Object.keys(f(f({}, e), t));
|
|
3044
3040
|
return r.reduce(function(n, a) {
|
|
3045
3041
|
return n[a] = f(f({}, e[a] || {}), t[a] || {}), n;
|
|
3046
3042
|
}, {});
|
|
3047
3043
|
}
|
|
3048
|
-
function
|
|
3044
|
+
function ce(e, t) {
|
|
3049
3045
|
if (!t)
|
|
3050
3046
|
return e;
|
|
3051
|
-
var r =
|
|
3052
|
-
return f(f(f({}, r), e), { date:
|
|
3047
|
+
var r = Oe.formats;
|
|
3048
|
+
return f(f(f({}, r), e), { date: me(V(r.date, t), V(e.date || {}, t)), time: me(V(r.time, t), V(e.time || {}, t)) });
|
|
3053
3049
|
}
|
|
3054
|
-
var
|
|
3050
|
+
var ge = function(e, t, r, n, a) {
|
|
3055
3051
|
var i = e.locale, o = e.formats, s = e.messages, u = e.defaultLocale, l = e.defaultFormats, h = e.fallbackOnEmptyString, m = e.onError, c = e.timeZone, b = e.defaultRichTextElements;
|
|
3056
3052
|
r === void 0 && (r = { id: "" });
|
|
3057
|
-
var x = r.id,
|
|
3058
|
-
|
|
3059
|
-
var p = String(x),
|
|
3053
|
+
var x = r.id, E = r.defaultMessage;
|
|
3054
|
+
Ft(!!x, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
|
|
3055
|
+
var p = String(x), d = (
|
|
3060
3056
|
// In case messages is Object.create(null)
|
|
3061
3057
|
// e.g import('foo.json') from webpack)
|
|
3062
3058
|
// See https://github.com/formatjs/formatjs/issues/1914
|
|
3063
3059
|
s && Object.prototype.hasOwnProperty.call(s, p) && s[p]
|
|
3064
3060
|
);
|
|
3065
|
-
if (Array.isArray(
|
|
3066
|
-
return
|
|
3067
|
-
if (!n &&
|
|
3068
|
-
return
|
|
3069
|
-
if (n = f(f({}, b), n || {}), o =
|
|
3070
|
-
if (h === !1 &&
|
|
3071
|
-
return
|
|
3072
|
-
if ((!
|
|
3061
|
+
if (Array.isArray(d) && d.length === 1 && d[0].type === y.literal)
|
|
3062
|
+
return d[0].value;
|
|
3063
|
+
if (!n && d && typeof d == "string" && !b)
|
|
3064
|
+
return d.replace(/'\{(.*?)\}'/gi, "{$1}");
|
|
3065
|
+
if (n = f(f({}, b), n || {}), o = ce(o, c), l = ce(l, c), !d) {
|
|
3066
|
+
if (h === !1 && d === "")
|
|
3067
|
+
return d;
|
|
3068
|
+
if ((!E || i && i.toLowerCase() !== u.toLowerCase()) && m(new Ot(r, i)), E)
|
|
3073
3069
|
try {
|
|
3074
|
-
var T = t.getMessageFormat(
|
|
3070
|
+
var T = t.getMessageFormat(E, u, l, a);
|
|
3075
3071
|
return T.format(n);
|
|
3076
3072
|
} catch (S) {
|
|
3077
|
-
return m(new Z('Error formatting default message for: "'.concat(p, '", rendering default message verbatim'), i, r, S)), typeof
|
|
3073
|
+
return m(new Z('Error formatting default message for: "'.concat(p, '", rendering default message verbatim'), i, r, S)), typeof E == "string" ? E : p;
|
|
3078
3074
|
}
|
|
3079
3075
|
return p;
|
|
3080
3076
|
}
|
|
3081
3077
|
try {
|
|
3082
|
-
var T = t.getMessageFormat(
|
|
3078
|
+
var T = t.getMessageFormat(d, i, o, f({ formatters: t }, a || {}));
|
|
3083
3079
|
return T.format(n);
|
|
3084
3080
|
} catch (S) {
|
|
3085
|
-
m(new Z('Error formatting message: "'.concat(p, '", using ').concat(
|
|
3081
|
+
m(new Z('Error formatting message: "'.concat(p, '", using ').concat(E ? "default message" : "id", " as fallback."), i, r, S));
|
|
3086
3082
|
}
|
|
3087
|
-
if (
|
|
3083
|
+
if (E)
|
|
3088
3084
|
try {
|
|
3089
|
-
var T = t.getMessageFormat(
|
|
3085
|
+
var T = t.getMessageFormat(E, u, l, a);
|
|
3090
3086
|
return T.format(n);
|
|
3091
3087
|
} catch (S) {
|
|
3092
3088
|
m(new Z('Error formatting the default message for: "'.concat(p, '", rendering message verbatim'), i, r, S));
|
|
3093
3089
|
}
|
|
3094
|
-
return typeof
|
|
3095
|
-
},
|
|
3090
|
+
return typeof d == "string" ? d : typeof E == "string" ? E : p;
|
|
3091
|
+
}, Ce = [
|
|
3096
3092
|
"formatMatcher",
|
|
3097
3093
|
"timeZone",
|
|
3098
3094
|
"hour12",
|
|
@@ -3116,10 +3112,10 @@ var pe = function(e, t, r, n, a) {
|
|
|
3116
3112
|
function j(e, t, r, n) {
|
|
3117
3113
|
var a = e.locale, i = e.formats, o = e.onError, s = e.timeZone;
|
|
3118
3114
|
n === void 0 && (n = {});
|
|
3119
|
-
var u = n.format, l = f(f({}, s && { timeZone: s }), u &&
|
|
3115
|
+
var u = n.format, l = f(f({}, s && { timeZone: s }), u && te(i, t, u, o)), h = C(n, Ce, l);
|
|
3120
3116
|
return t === "time" && !h.hour && !h.minute && !h.second && !h.timeStyle && !h.dateStyle && (h = f(f({}, h), { hour: "numeric", minute: "numeric" })), r(a, h);
|
|
3121
3117
|
}
|
|
3122
|
-
function
|
|
3118
|
+
function Gt(e, t) {
|
|
3123
3119
|
for (var r = [], n = 2; n < arguments.length; n++)
|
|
3124
3120
|
r[n - 2] = arguments[n];
|
|
3125
3121
|
var a = r[0], i = r[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
@@ -3130,7 +3126,7 @@ function Ut(e, t) {
|
|
|
3130
3126
|
}
|
|
3131
3127
|
return String(s);
|
|
3132
3128
|
}
|
|
3133
|
-
function
|
|
3129
|
+
function Ut(e, t) {
|
|
3134
3130
|
for (var r = [], n = 2; n < arguments.length; n++)
|
|
3135
3131
|
r[n - 2] = arguments[n];
|
|
3136
3132
|
var a = r[0], i = r[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
@@ -3141,10 +3137,10 @@ function Vt(e, t) {
|
|
|
3141
3137
|
}
|
|
3142
3138
|
return String(s);
|
|
3143
3139
|
}
|
|
3144
|
-
function
|
|
3140
|
+
function Vt(e, t) {
|
|
3145
3141
|
for (var r = [], n = 2; n < arguments.length; n++)
|
|
3146
3142
|
r[n - 2] = arguments[n];
|
|
3147
|
-
var a = r[0], i = r[1], o = r[2], s = o === void 0 ? {} : o, u = e.timeZone, l = e.locale, h = e.onError, m = C(s,
|
|
3143
|
+
var a = r[0], i = r[1], o = r[2], s = o === void 0 ? {} : o, u = e.timeZone, l = e.locale, h = e.onError, m = C(s, Ce, u ? { timeZone: u } : {});
|
|
3148
3144
|
try {
|
|
3149
3145
|
return t(l, m).formatRange(a, i);
|
|
3150
3146
|
} catch (c) {
|
|
@@ -3152,7 +3148,7 @@ function kt(e, t) {
|
|
|
3152
3148
|
}
|
|
3153
3149
|
return String(a);
|
|
3154
3150
|
}
|
|
3155
|
-
function
|
|
3151
|
+
function kt(e, t) {
|
|
3156
3152
|
for (var r = [], n = 2; n < arguments.length; n++)
|
|
3157
3153
|
r[n - 2] = arguments[n];
|
|
3158
3154
|
var a = r[0], i = r[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
@@ -3163,7 +3159,7 @@ function jt(e, t) {
|
|
|
3163
3159
|
}
|
|
3164
3160
|
return [];
|
|
3165
3161
|
}
|
|
3166
|
-
function
|
|
3162
|
+
function jt(e, t) {
|
|
3167
3163
|
for (var r = [], n = 2; n < arguments.length; n++)
|
|
3168
3164
|
r[n - 2] = arguments[n];
|
|
3169
3165
|
var a = r[0], i = r[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
@@ -3174,51 +3170,51 @@ function Xt(e, t) {
|
|
|
3174
3170
|
}
|
|
3175
3171
|
return [];
|
|
3176
3172
|
}
|
|
3177
|
-
var
|
|
3173
|
+
var Xt = [
|
|
3178
3174
|
"style",
|
|
3179
3175
|
"type",
|
|
3180
3176
|
"fallback",
|
|
3181
3177
|
"languageDisplay"
|
|
3182
3178
|
];
|
|
3183
|
-
function
|
|
3179
|
+
function Wt(e, t, r, n) {
|
|
3184
3180
|
var a = e.locale, i = e.onError, o = Intl.DisplayNames;
|
|
3185
3181
|
o || i(new L(`Intl.DisplayNames is not available in this environment.
|
|
3186
3182
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
3187
3183
|
`, P.MISSING_INTL_API));
|
|
3188
|
-
var s = C(n,
|
|
3184
|
+
var s = C(n, Xt);
|
|
3189
3185
|
try {
|
|
3190
3186
|
return t(a, s).of(r);
|
|
3191
3187
|
} catch (u) {
|
|
3192
3188
|
i(new B("Error formatting display name.", a, u));
|
|
3193
3189
|
}
|
|
3194
3190
|
}
|
|
3195
|
-
var
|
|
3191
|
+
var Zt = [
|
|
3196
3192
|
"type",
|
|
3197
3193
|
"style"
|
|
3198
|
-
],
|
|
3199
|
-
function
|
|
3200
|
-
return "".concat(
|
|
3194
|
+
], pe = Date.now();
|
|
3195
|
+
function zt(e) {
|
|
3196
|
+
return "".concat(pe, "_").concat(e, "_").concat(pe);
|
|
3201
3197
|
}
|
|
3202
|
-
function
|
|
3198
|
+
function Jt(e, t, r, n) {
|
|
3203
3199
|
n === void 0 && (n = {});
|
|
3204
|
-
var a =
|
|
3200
|
+
var a = De(e, t, r, n).reduce(function(i, o) {
|
|
3205
3201
|
var s = o.value;
|
|
3206
3202
|
return typeof s != "string" ? i.push(s) : typeof i[i.length - 1] == "string" ? i[i.length - 1] += s : i.push(s), i;
|
|
3207
3203
|
}, []);
|
|
3208
3204
|
return a.length === 1 ? a[0] : a.length === 0 ? "" : a;
|
|
3209
3205
|
}
|
|
3210
|
-
function
|
|
3206
|
+
function De(e, t, r, n) {
|
|
3211
3207
|
var a = e.locale, i = e.onError;
|
|
3212
3208
|
n === void 0 && (n = {});
|
|
3213
3209
|
var o = Intl.ListFormat;
|
|
3214
3210
|
o || i(new L(`Intl.ListFormat is not available in this environment.
|
|
3215
3211
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
3216
3212
|
`, P.MISSING_INTL_API));
|
|
3217
|
-
var s = C(n,
|
|
3213
|
+
var s = C(n, Zt);
|
|
3218
3214
|
try {
|
|
3219
3215
|
var u = {}, l = r.map(function(h, m) {
|
|
3220
3216
|
if (typeof h == "object") {
|
|
3221
|
-
var c =
|
|
3217
|
+
var c = zt(m);
|
|
3222
3218
|
return u[c] = h, c;
|
|
3223
3219
|
}
|
|
3224
3220
|
return String(h);
|
|
@@ -3231,13 +3227,13 @@ Try polyfilling it using "@formatjs/intl-listformat"
|
|
|
3231
3227
|
}
|
|
3232
3228
|
return r;
|
|
3233
3229
|
}
|
|
3234
|
-
var
|
|
3235
|
-
function
|
|
3230
|
+
var qt = ["type"];
|
|
3231
|
+
function Qt(e, t, r, n) {
|
|
3236
3232
|
var a = e.locale, i = e.onError;
|
|
3237
3233
|
n === void 0 && (n = {}), Intl.PluralRules || i(new L(`Intl.PluralRules is not available in this environment.
|
|
3238
3234
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3239
3235
|
`, P.MISSING_INTL_API));
|
|
3240
|
-
var o = C(n,
|
|
3236
|
+
var o = C(n, qt);
|
|
3241
3237
|
try {
|
|
3242
3238
|
return t(a, o).select(r);
|
|
3243
3239
|
} catch (s) {
|
|
@@ -3245,27 +3241,27 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
|
3245
3241
|
}
|
|
3246
3242
|
return "other";
|
|
3247
3243
|
}
|
|
3248
|
-
var
|
|
3249
|
-
function
|
|
3244
|
+
var Yt = ["numeric", "style"];
|
|
3245
|
+
function $t(e, t, r) {
|
|
3250
3246
|
var n = e.locale, a = e.formats, i = e.onError;
|
|
3251
3247
|
r === void 0 && (r = {});
|
|
3252
|
-
var o = r.format, s = !!o &&
|
|
3248
|
+
var o = r.format, s = !!o && te(a, "relative", o, i) || {}, u = C(r, Yt, s);
|
|
3253
3249
|
return t(n, u);
|
|
3254
3250
|
}
|
|
3255
|
-
function
|
|
3251
|
+
function Kt(e, t, r, n, a) {
|
|
3256
3252
|
a === void 0 && (a = {}), n || (n = "second");
|
|
3257
3253
|
var i = Intl.RelativeTimeFormat;
|
|
3258
3254
|
i || e.onError(new L(`Intl.RelativeTimeFormat is not available in this environment.
|
|
3259
3255
|
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
3260
3256
|
`, P.MISSING_INTL_API));
|
|
3261
3257
|
try {
|
|
3262
|
-
return
|
|
3258
|
+
return $t(e, t, a).format(r, n);
|
|
3263
3259
|
} catch (o) {
|
|
3264
3260
|
e.onError(new B("Error formatting relative time.", e.locale, o));
|
|
3265
3261
|
}
|
|
3266
3262
|
return String(r);
|
|
3267
3263
|
}
|
|
3268
|
-
var
|
|
3264
|
+
var er = [
|
|
3269
3265
|
"style",
|
|
3270
3266
|
"currency",
|
|
3271
3267
|
"unit",
|
|
@@ -3291,135 +3287,135 @@ var tr = [
|
|
|
3291
3287
|
"roundingIncrement",
|
|
3292
3288
|
"roundingMode"
|
|
3293
3289
|
];
|
|
3294
|
-
function
|
|
3290
|
+
function we(e, t, r) {
|
|
3295
3291
|
var n = e.locale, a = e.formats, i = e.onError;
|
|
3296
3292
|
r === void 0 && (r = {});
|
|
3297
|
-
var o = r.format, s = o &&
|
|
3293
|
+
var o = r.format, s = o && te(a, "number", o, i) || {}, u = C(r, er, s);
|
|
3298
3294
|
return t(n, u);
|
|
3299
3295
|
}
|
|
3300
|
-
function
|
|
3296
|
+
function tr(e, t, r, n) {
|
|
3301
3297
|
n === void 0 && (n = {});
|
|
3302
3298
|
try {
|
|
3303
|
-
return
|
|
3299
|
+
return we(e, t, n).format(r);
|
|
3304
3300
|
} catch (a) {
|
|
3305
3301
|
e.onError(new B("Error formatting number.", e.locale, a));
|
|
3306
3302
|
}
|
|
3307
3303
|
return String(r);
|
|
3308
3304
|
}
|
|
3309
|
-
function
|
|
3305
|
+
function rr(e, t, r, n) {
|
|
3310
3306
|
n === void 0 && (n = {});
|
|
3311
3307
|
try {
|
|
3312
|
-
return
|
|
3308
|
+
return we(e, t, n).formatToParts(r);
|
|
3313
3309
|
} catch (a) {
|
|
3314
3310
|
e.onError(new B("Error formatting number.", e.locale, a));
|
|
3315
3311
|
}
|
|
3316
3312
|
return [];
|
|
3317
3313
|
}
|
|
3318
|
-
function
|
|
3314
|
+
function nr(e) {
|
|
3319
3315
|
var t = e ? e[Object.keys(e)[0]] : void 0;
|
|
3320
3316
|
return typeof t == "string";
|
|
3321
3317
|
}
|
|
3322
|
-
function
|
|
3323
|
-
e.onWarn && e.defaultRichTextElements &&
|
|
3318
|
+
function ar(e) {
|
|
3319
|
+
e.onWarn && e.defaultRichTextElements && nr(e.messages || {}) && e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
3324
3320
|
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
3325
3321
|
For more details see https://formatjs.io/docs/getting-started/message-distribution`);
|
|
3326
3322
|
}
|
|
3327
|
-
function
|
|
3328
|
-
var r =
|
|
3329
|
-
return a ? !Intl.NumberFormat.supportedLocalesOf(a).length && o ? o(new
|
|
3323
|
+
function ir(e, t) {
|
|
3324
|
+
var r = wt(t), n = f(f({}, Dt), e), a = n.locale, i = n.defaultLocale, o = n.onError;
|
|
3325
|
+
return a ? !Intl.NumberFormat.supportedLocalesOf(a).length && o ? o(new fe('Missing locale data for locale: "'.concat(a, '" in Intl.NumberFormat. Using default locale: "').concat(i, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : !Intl.DateTimeFormat.supportedLocalesOf(a).length && o && o(new fe('Missing locale data for locale: "'.concat(a, '" in Intl.DateTimeFormat. Using default locale: "').concat(i, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : (o && o(new Rt('"locale" was not configured, using "'.concat(i, '" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))), n.locale = n.defaultLocale || "en"), ar(n), f(f({}, n), {
|
|
3330
3326
|
formatters: r,
|
|
3331
|
-
formatNumber:
|
|
3332
|
-
formatNumberToParts:
|
|
3333
|
-
formatRelativeTime:
|
|
3334
|
-
formatDate:
|
|
3335
|
-
formatDateToParts:
|
|
3336
|
-
formatTime:
|
|
3337
|
-
formatDateTimeRange:
|
|
3338
|
-
formatTimeToParts:
|
|
3339
|
-
formatPlural:
|
|
3327
|
+
formatNumber: tr.bind(null, n, r.getNumberFormat),
|
|
3328
|
+
formatNumberToParts: rr.bind(null, n, r.getNumberFormat),
|
|
3329
|
+
formatRelativeTime: Kt.bind(null, n, r.getRelativeTimeFormat),
|
|
3330
|
+
formatDate: Gt.bind(null, n, r.getDateTimeFormat),
|
|
3331
|
+
formatDateToParts: kt.bind(null, n, r.getDateTimeFormat),
|
|
3332
|
+
formatTime: Ut.bind(null, n, r.getDateTimeFormat),
|
|
3333
|
+
formatDateTimeRange: Vt.bind(null, n, r.getDateTimeFormat),
|
|
3334
|
+
formatTimeToParts: jt.bind(null, n, r.getDateTimeFormat),
|
|
3335
|
+
formatPlural: Qt.bind(null, n, r.getPluralRules),
|
|
3340
3336
|
// @ts-expect-error TODO: will get to this later
|
|
3341
|
-
formatMessage:
|
|
3337
|
+
formatMessage: ge.bind(null, n, r),
|
|
3342
3338
|
// @ts-expect-error TODO: will get to this later
|
|
3343
|
-
$t:
|
|
3344
|
-
formatList:
|
|
3345
|
-
formatListToParts:
|
|
3346
|
-
formatDisplayName:
|
|
3339
|
+
$t: ge.bind(null, n, r),
|
|
3340
|
+
formatList: Jt.bind(null, n, r.getListFormat),
|
|
3341
|
+
formatListToParts: De.bind(null, n, r.getListFormat),
|
|
3342
|
+
formatDisplayName: Wt.bind(null, n, r.getDisplayNames)
|
|
3347
3343
|
});
|
|
3348
3344
|
}
|
|
3349
|
-
function
|
|
3345
|
+
function or(e) {
|
|
3350
3346
|
return e && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
|
|
3351
3347
|
}
|
|
3352
|
-
function
|
|
3348
|
+
function sr(e) {
|
|
3353
3349
|
return e;
|
|
3354
3350
|
}
|
|
3355
|
-
function
|
|
3351
|
+
function ur(e, t) {
|
|
3356
3352
|
t = t || {};
|
|
3357
|
-
const r = t.delimiter || ".", n = t.maxDepth, a = t.transformKey ||
|
|
3353
|
+
const r = t.delimiter || ".", n = t.maxDepth, a = t.transformKey || sr, i = {};
|
|
3358
3354
|
function o(s, u, l) {
|
|
3359
3355
|
l = l || 1, Object.keys(s).forEach(function(h) {
|
|
3360
|
-
const m = s[h], c = t.safe && Array.isArray(m), b = Object.prototype.toString.call(m), x =
|
|
3361
|
-
if (!c && !x &&
|
|
3356
|
+
const m = s[h], c = t.safe && Array.isArray(m), b = Object.prototype.toString.call(m), x = or(m), E = b === "[object Object]" || b === "[object Array]", p = u ? u + r + a(h) : a(h);
|
|
3357
|
+
if (!c && !x && E && Object.keys(m).length && (!t.maxDepth || l < n))
|
|
3362
3358
|
return o(m, p, l + 1);
|
|
3363
3359
|
i[p] = m;
|
|
3364
3360
|
});
|
|
3365
3361
|
}
|
|
3366
3362
|
return o(e), i;
|
|
3367
3363
|
}
|
|
3368
|
-
const
|
|
3369
|
-
let
|
|
3370
|
-
const
|
|
3364
|
+
const hr = Me();
|
|
3365
|
+
let Fe;
|
|
3366
|
+
const ve = {
|
|
3371
3367
|
year: "numeric",
|
|
3372
3368
|
month: "short",
|
|
3373
3369
|
day: "numeric",
|
|
3374
3370
|
hour: "numeric",
|
|
3375
3371
|
minute: "numeric"
|
|
3376
|
-
},
|
|
3377
|
-
var
|
|
3378
|
-
const n = typeof r == "boolean", a =
|
|
3372
|
+
}, mr = (e, t, r = !1) => {
|
|
3373
|
+
var E;
|
|
3374
|
+
const n = typeof r == "boolean", a = ir(
|
|
3379
3375
|
{
|
|
3380
3376
|
...n ? null : r,
|
|
3381
3377
|
locale: e,
|
|
3382
|
-
messages:
|
|
3378
|
+
messages: ur(t, {
|
|
3383
3379
|
safe: !0
|
|
3384
3380
|
// Preserve arrays
|
|
3385
3381
|
}),
|
|
3386
3382
|
formats: {
|
|
3387
3383
|
...n ? null : r.formats,
|
|
3388
3384
|
date: {
|
|
3389
|
-
...n ? null : (
|
|
3390
|
-
datetime:
|
|
3385
|
+
...n ? null : (E = r.formats) == null ? void 0 : E.date,
|
|
3386
|
+
datetime: ve
|
|
3391
3387
|
}
|
|
3392
3388
|
}
|
|
3393
3389
|
},
|
|
3394
|
-
|
|
3390
|
+
hr
|
|
3395
3391
|
), { $t: i, ...o } = a, s = o, u = (p) => p.toString().length === 13 ? Math.floor(p / 1e3) : p, l = (p) => {
|
|
3396
|
-
const
|
|
3392
|
+
const d = "Invalid Date";
|
|
3397
3393
|
if (!p)
|
|
3398
|
-
return
|
|
3394
|
+
return d;
|
|
3399
3395
|
try {
|
|
3400
3396
|
const T = new Date(u(p) * 1e3);
|
|
3401
|
-
return s.formatDate(T,
|
|
3397
|
+
return s.formatDate(T, ve);
|
|
3402
3398
|
} catch {
|
|
3403
|
-
return
|
|
3399
|
+
return d;
|
|
3404
3400
|
}
|
|
3405
3401
|
}, x = {
|
|
3406
3402
|
formatUnixTimeStamp: l,
|
|
3407
3403
|
formatIsoDate: (p) => {
|
|
3408
|
-
const
|
|
3404
|
+
const d = Date.parse(p) / 1e3, T = Math.floor(d);
|
|
3409
3405
|
return l(T);
|
|
3410
3406
|
},
|
|
3411
|
-
t: (p,
|
|
3407
|
+
t: (p, d, T) => s.formatMessage({ id: p }, d, T),
|
|
3412
3408
|
te: (p) => !!s.messages[p],
|
|
3413
3409
|
tm: (p) => s.messages[p] || [],
|
|
3414
3410
|
...s,
|
|
3415
3411
|
source: t
|
|
3416
3412
|
};
|
|
3417
|
-
return (typeof r == "boolean" && r === !0 || typeof r != "boolean" && r.isGlobal === !0) && (
|
|
3413
|
+
return (typeof r == "boolean" && r === !0 || typeof r != "boolean" && r.isGlobal === !0) && (Fe = x), x;
|
|
3418
3414
|
};
|
|
3419
|
-
function
|
|
3420
|
-
return
|
|
3415
|
+
function cr() {
|
|
3416
|
+
return Fe;
|
|
3421
3417
|
}
|
|
3422
|
-
const
|
|
3418
|
+
const lr = (e = null) => Ge({
|
|
3423
3419
|
name: "I18nT",
|
|
3424
3420
|
props: {
|
|
3425
3421
|
i18n: {
|
|
@@ -3452,18 +3448,18 @@ const fr = (e = null) => Ue({
|
|
|
3452
3448
|
return;
|
|
3453
3449
|
const h = u.replace(/[\{\}]/g, "");
|
|
3454
3450
|
h === "0" && r.default ? o[l] = r.default() : a.includes(h) && r[h] && (o[l] = r[h]());
|
|
3455
|
-
}),
|
|
3451
|
+
}), Ue(t.tag, t, o);
|
|
3456
3452
|
};
|
|
3457
3453
|
}
|
|
3458
|
-
}),
|
|
3454
|
+
}), gr = {
|
|
3459
3455
|
install(e, t) {
|
|
3460
3456
|
const { i18n: r } = t;
|
|
3461
|
-
e.component("I18nT",
|
|
3457
|
+
e.component("I18nT", lr(r));
|
|
3462
3458
|
}
|
|
3463
3459
|
};
|
|
3464
3460
|
export {
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3461
|
+
gr as Translation,
|
|
3462
|
+
mr as createI18n,
|
|
3463
|
+
lr as i18nTComponent,
|
|
3464
|
+
cr as useI18n
|
|
3469
3465
|
};
|