@kong-ui-public/i18n 0.2.3 → 0.2.4
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 +705 -705
- package/dist/i18n.es.js.map +1 -1
- package/dist/i18n.umd.js +11 -11
- package/dist/i18n.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/i18n.es.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
var
|
|
3
|
-
return
|
|
4
|
-
|
|
5
|
-
} || function(
|
|
6
|
-
for (var i in
|
|
7
|
-
Object.prototype.hasOwnProperty.call(
|
|
8
|
-
},
|
|
1
|
+
import { defineComponent as ke, h as Xe } from "vue";
|
|
2
|
+
var z = function(e, t) {
|
|
3
|
+
return z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
4
|
+
n.__proto__ = r;
|
|
5
|
+
} || function(n, r) {
|
|
6
|
+
for (var i in r)
|
|
7
|
+
Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
|
|
8
|
+
}, z(e, t);
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function N(e, t) {
|
|
11
11
|
if (typeof t != "function" && t !== null)
|
|
12
12
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
13
|
-
|
|
14
|
-
function
|
|
13
|
+
z(e, t);
|
|
14
|
+
function n() {
|
|
15
15
|
this.constructor = e;
|
|
16
16
|
}
|
|
17
|
-
e.prototype = t === null ? Object.create(t) : (
|
|
18
|
-
}
|
|
19
|
-
var
|
|
20
|
-
return
|
|
21
|
-
for (var
|
|
22
|
-
|
|
23
|
-
for (var a in
|
|
24
|
-
Object.prototype.hasOwnProperty.call(
|
|
17
|
+
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
18
|
+
}
|
|
19
|
+
var m = function() {
|
|
20
|
+
return m = Object.assign || function(t) {
|
|
21
|
+
for (var n, r = 1, i = arguments.length; r < i; r++) {
|
|
22
|
+
n = arguments[r];
|
|
23
|
+
for (var a in n)
|
|
24
|
+
Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
|
|
25
25
|
}
|
|
26
26
|
return t;
|
|
27
|
-
},
|
|
27
|
+
}, m.apply(this, arguments);
|
|
28
28
|
};
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
function Ze(e, t) {
|
|
30
|
+
var n = {};
|
|
31
|
+
for (var r in e)
|
|
32
|
+
Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
33
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
34
|
+
for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++)
|
|
35
|
+
t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
36
|
+
return n;
|
|
37
|
+
}
|
|
38
|
+
function O(e, t, n) {
|
|
39
|
+
if (n || arguments.length === 2)
|
|
40
|
+
for (var r = 0, i = t.length, a; r < i; r++)
|
|
41
|
+
(a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
|
|
33
42
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
34
43
|
}
|
|
35
|
-
var
|
|
36
|
-
return x = Object.assign || function(t) {
|
|
37
|
-
for (var r, n = 1, i = arguments.length; n < i; n++) {
|
|
38
|
-
r = arguments[n];
|
|
39
|
-
for (var a in r)
|
|
40
|
-
Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
|
|
41
|
-
}
|
|
42
|
-
return t;
|
|
43
|
-
}, x.apply(this, arguments);
|
|
44
|
-
}, m;
|
|
44
|
+
var g;
|
|
45
45
|
(function(e) {
|
|
46
46
|
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";
|
|
47
|
-
})(
|
|
47
|
+
})(g || (g = {}));
|
|
48
48
|
var d;
|
|
49
49
|
(function(e) {
|
|
50
50
|
e[e.literal = 0] = "literal", e[e.argument = 1] = "argument", e[e.number = 2] = "number", e[e.date = 3] = "date", e[e.time = 4] = "time", e[e.select = 5] = "select", e[e.plural = 6] = "plural", e[e.pound = 7] = "pound", e[e.tag = 8] = "tag";
|
|
@@ -53,50 +53,50 @@ var w;
|
|
|
53
53
|
(function(e) {
|
|
54
54
|
e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
|
|
55
55
|
})(w || (w = {}));
|
|
56
|
-
function
|
|
56
|
+
function ae(e) {
|
|
57
57
|
return e.type === d.literal;
|
|
58
58
|
}
|
|
59
59
|
function We(e) {
|
|
60
60
|
return e.type === d.argument;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Ee(e) {
|
|
63
63
|
return e.type === d.number;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function de(e) {
|
|
66
66
|
return e.type === d.date;
|
|
67
67
|
}
|
|
68
68
|
function ye(e) {
|
|
69
69
|
return e.type === d.time;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function xe(e) {
|
|
72
72
|
return e.type === d.select;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function Te(e) {
|
|
75
75
|
return e.type === d.plural;
|
|
76
76
|
}
|
|
77
77
|
function ze(e) {
|
|
78
78
|
return e.type === d.pound;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Se(e) {
|
|
81
81
|
return e.type === d.tag;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Ie(e) {
|
|
84
84
|
return !!(e && typeof e == "object" && e.type === w.number);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function q(e) {
|
|
87
87
|
return !!(e && typeof e == "object" && e.type === w.dateTime);
|
|
88
88
|
}
|
|
89
|
-
var
|
|
89
|
+
var Ae = /[ \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;
|
|
90
90
|
function Je(e) {
|
|
91
91
|
var t = {};
|
|
92
|
-
return e.replace(qe, function(
|
|
93
|
-
var
|
|
94
|
-
switch (
|
|
92
|
+
return e.replace(qe, function(n) {
|
|
93
|
+
var r = n.length;
|
|
94
|
+
switch (n[0]) {
|
|
95
95
|
case "G":
|
|
96
|
-
t.era =
|
|
96
|
+
t.era = r === 4 ? "long" : r === 5 ? "narrow" : "short";
|
|
97
97
|
break;
|
|
98
98
|
case "y":
|
|
99
|
-
t.year =
|
|
99
|
+
t.year = r === 2 ? "2-digit" : "numeric";
|
|
100
100
|
break;
|
|
101
101
|
case "Y":
|
|
102
102
|
case "u":
|
|
@@ -108,30 +108,30 @@ function Je(e) {
|
|
|
108
108
|
throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
|
109
109
|
case "M":
|
|
110
110
|
case "L":
|
|
111
|
-
t.month = ["numeric", "2-digit", "short", "long", "narrow"][
|
|
111
|
+
t.month = ["numeric", "2-digit", "short", "long", "narrow"][r - 1];
|
|
112
112
|
break;
|
|
113
113
|
case "w":
|
|
114
114
|
case "W":
|
|
115
115
|
throw new RangeError("`w/W` (week) patterns are not supported");
|
|
116
116
|
case "d":
|
|
117
|
-
t.day = ["numeric", "2-digit"][
|
|
117
|
+
t.day = ["numeric", "2-digit"][r - 1];
|
|
118
118
|
break;
|
|
119
119
|
case "D":
|
|
120
120
|
case "F":
|
|
121
121
|
case "g":
|
|
122
122
|
throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
123
123
|
case "E":
|
|
124
|
-
t.weekday =
|
|
124
|
+
t.weekday = r === 4 ? "short" : r === 5 ? "narrow" : "short";
|
|
125
125
|
break;
|
|
126
126
|
case "e":
|
|
127
|
-
if (
|
|
127
|
+
if (r < 4)
|
|
128
128
|
throw new RangeError("`e..eee` (weekday) patterns are not supported");
|
|
129
|
-
t.weekday = ["short", "long", "narrow", "short"][
|
|
129
|
+
t.weekday = ["short", "long", "narrow", "short"][r - 4];
|
|
130
130
|
break;
|
|
131
131
|
case "c":
|
|
132
|
-
if (
|
|
132
|
+
if (r < 4)
|
|
133
133
|
throw new RangeError("`c..ccc` (weekday) patterns are not supported");
|
|
134
|
-
t.weekday = ["short", "long", "narrow", "short"][
|
|
134
|
+
t.weekday = ["short", "long", "narrow", "short"][r - 4];
|
|
135
135
|
break;
|
|
136
136
|
case "a":
|
|
137
137
|
t.hour12 = !0;
|
|
@@ -140,32 +140,32 @@ function Je(e) {
|
|
|
140
140
|
case "B":
|
|
141
141
|
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
|
142
142
|
case "h":
|
|
143
|
-
t.hourCycle = "h12", t.hour = ["numeric", "2-digit"][
|
|
143
|
+
t.hourCycle = "h12", t.hour = ["numeric", "2-digit"][r - 1];
|
|
144
144
|
break;
|
|
145
145
|
case "H":
|
|
146
|
-
t.hourCycle = "h23", t.hour = ["numeric", "2-digit"][
|
|
146
|
+
t.hourCycle = "h23", t.hour = ["numeric", "2-digit"][r - 1];
|
|
147
147
|
break;
|
|
148
148
|
case "K":
|
|
149
|
-
t.hourCycle = "h11", t.hour = ["numeric", "2-digit"][
|
|
149
|
+
t.hourCycle = "h11", t.hour = ["numeric", "2-digit"][r - 1];
|
|
150
150
|
break;
|
|
151
151
|
case "k":
|
|
152
|
-
t.hourCycle = "h24", t.hour = ["numeric", "2-digit"][
|
|
152
|
+
t.hourCycle = "h24", t.hour = ["numeric", "2-digit"][r - 1];
|
|
153
153
|
break;
|
|
154
154
|
case "j":
|
|
155
155
|
case "J":
|
|
156
156
|
case "C":
|
|
157
157
|
throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
|
|
158
158
|
case "m":
|
|
159
|
-
t.minute = ["numeric", "2-digit"][
|
|
159
|
+
t.minute = ["numeric", "2-digit"][r - 1];
|
|
160
160
|
break;
|
|
161
161
|
case "s":
|
|
162
|
-
t.second = ["numeric", "2-digit"][
|
|
162
|
+
t.second = ["numeric", "2-digit"][r - 1];
|
|
163
163
|
break;
|
|
164
164
|
case "S":
|
|
165
165
|
case "A":
|
|
166
166
|
throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
|
167
167
|
case "z":
|
|
168
|
-
t.timeZoneName =
|
|
168
|
+
t.timeZoneName = r < 4 ? "short" : "long";
|
|
169
169
|
break;
|
|
170
170
|
case "Z":
|
|
171
171
|
case "O":
|
|
@@ -184,8 +184,8 @@ function Ye(e) {
|
|
|
184
184
|
throw new Error("Number skeleton cannot be empty");
|
|
185
185
|
for (var t = e.split(Qe).filter(function(c) {
|
|
186
186
|
return c.length > 0;
|
|
187
|
-
}),
|
|
188
|
-
var a = i[
|
|
187
|
+
}), n = [], r = 0, i = t; r < i.length; r++) {
|
|
188
|
+
var a = i[r], o = a.split("/");
|
|
189
189
|
if (o.length === 0)
|
|
190
190
|
throw new Error("Invalid number skeleton");
|
|
191
191
|
for (var s = o[0], h = o.slice(1), l = 0, u = h; l < u.length; l++) {
|
|
@@ -193,21 +193,21 @@ function Ye(e) {
|
|
|
193
193
|
if (f.length === 0)
|
|
194
194
|
throw new Error("Invalid number skeleton");
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
n.push({ stem: s, options: h });
|
|
197
197
|
}
|
|
198
|
-
return
|
|
198
|
+
return n;
|
|
199
199
|
}
|
|
200
200
|
function $e(e) {
|
|
201
201
|
return e.replace(/^(.*?)-/, "");
|
|
202
202
|
}
|
|
203
|
-
var
|
|
204
|
-
function
|
|
203
|
+
var oe = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, He = /^(@+)?(\+|#+)?[rs]?$/g, Ke = /(\*)(0+)|(#+)(0+)|(0+)/g, Ne = /^(0+)$/;
|
|
204
|
+
function se(e) {
|
|
205
205
|
var t = {};
|
|
206
|
-
return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(
|
|
207
|
-
return typeof i != "string" ? (t.minimumSignificantDigits =
|
|
206
|
+
return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(He, function(n, r, i) {
|
|
207
|
+
return typeof i != "string" ? (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length) : i === "+" ? t.minimumSignificantDigits = r.length : r[0] === "#" ? t.maximumSignificantDigits = r.length : (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length + (typeof i == "string" ? i.length : 0)), "";
|
|
208
208
|
}), t;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function _e(e) {
|
|
211
211
|
switch (e) {
|
|
212
212
|
case "sign-auto":
|
|
213
213
|
return {
|
|
@@ -254,20 +254,20 @@ function et(e) {
|
|
|
254
254
|
}, e = e.slice(2)) : e[0] === "E" && (t = {
|
|
255
255
|
notation: "scientific"
|
|
256
256
|
}, e = e.slice(1)), t) {
|
|
257
|
-
var
|
|
258
|
-
if (
|
|
257
|
+
var n = e.slice(0, 2);
|
|
258
|
+
if (n === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : n === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !Ne.test(e))
|
|
259
259
|
throw new Error("Malformed concise eng/scientific notation");
|
|
260
260
|
t.minimumIntegerDigits = e.length;
|
|
261
261
|
}
|
|
262
262
|
return t;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
265
|
-
var t = {},
|
|
266
|
-
return
|
|
264
|
+
function ue(e) {
|
|
265
|
+
var t = {}, n = _e(e);
|
|
266
|
+
return n || t;
|
|
267
267
|
}
|
|
268
268
|
function tt(e) {
|
|
269
|
-
for (var t = {},
|
|
270
|
-
var i = n
|
|
269
|
+
for (var t = {}, n = 0, r = e; n < r.length; n++) {
|
|
270
|
+
var i = r[n];
|
|
271
271
|
switch (i.stem) {
|
|
272
272
|
case "percent":
|
|
273
273
|
case "%":
|
|
@@ -300,13 +300,13 @@ function tt(e) {
|
|
|
300
300
|
t.notation = "compact", t.compactDisplay = "long";
|
|
301
301
|
continue;
|
|
302
302
|
case "scientific":
|
|
303
|
-
t =
|
|
304
|
-
return
|
|
303
|
+
t = m(m(m({}, t), { notation: "scientific" }), i.options.reduce(function(h, l) {
|
|
304
|
+
return m(m({}, h), ue(l));
|
|
305
305
|
}, {}));
|
|
306
306
|
continue;
|
|
307
307
|
case "engineering":
|
|
308
|
-
t =
|
|
309
|
-
return
|
|
308
|
+
t = m(m(m({}, t), { notation: "engineering" }), i.options.reduce(function(h, l) {
|
|
309
|
+
return m(m({}, h), ue(l));
|
|
310
310
|
}, {}));
|
|
311
311
|
continue;
|
|
312
312
|
case "notation-simple":
|
|
@@ -330,45 +330,45 @@ function tt(e) {
|
|
|
330
330
|
case "integer-width":
|
|
331
331
|
if (i.options.length > 1)
|
|
332
332
|
throw new RangeError("integer-width stems only accept a single optional option");
|
|
333
|
-
i.options[0].replace(Ke, function(h, l, u, f, c,
|
|
333
|
+
i.options[0].replace(Ke, function(h, l, u, f, c, p) {
|
|
334
334
|
if (l)
|
|
335
335
|
t.minimumIntegerDigits = u.length;
|
|
336
336
|
else {
|
|
337
337
|
if (f && c)
|
|
338
338
|
throw new Error("We currently do not support maximum integer digits");
|
|
339
|
-
if (
|
|
339
|
+
if (p)
|
|
340
340
|
throw new Error("We currently do not support exact integer digits");
|
|
341
341
|
}
|
|
342
342
|
return "";
|
|
343
343
|
});
|
|
344
344
|
continue;
|
|
345
345
|
}
|
|
346
|
-
if (
|
|
346
|
+
if (Ne.test(i.stem)) {
|
|
347
347
|
t.minimumIntegerDigits = i.stem.length;
|
|
348
348
|
continue;
|
|
349
349
|
}
|
|
350
|
-
if (
|
|
350
|
+
if (oe.test(i.stem)) {
|
|
351
351
|
if (i.options.length > 1)
|
|
352
352
|
throw new RangeError("Fraction-precision stems only accept a single optional option");
|
|
353
|
-
i.stem.replace(
|
|
354
|
-
return u === "*" ? t.minimumFractionDigits = l.length : f && f[0] === "#" ? t.maximumFractionDigits = f.length : c &&
|
|
353
|
+
i.stem.replace(oe, function(h, l, u, f, c, p) {
|
|
354
|
+
return u === "*" ? t.minimumFractionDigits = l.length : f && f[0] === "#" ? t.maximumFractionDigits = f.length : c && p ? (t.minimumFractionDigits = c.length, t.maximumFractionDigits = c.length + p.length) : (t.minimumFractionDigits = l.length, t.maximumFractionDigits = l.length), "";
|
|
355
355
|
});
|
|
356
356
|
var a = i.options[0];
|
|
357
|
-
a === "w" ? t =
|
|
357
|
+
a === "w" ? t = m(m({}, t), { trailingZeroDisplay: "stripIfInteger" }) : a && (t = m(m({}, t), se(a)));
|
|
358
358
|
continue;
|
|
359
359
|
}
|
|
360
|
-
if (
|
|
361
|
-
t =
|
|
360
|
+
if (He.test(i.stem)) {
|
|
361
|
+
t = m(m({}, t), se(i.stem));
|
|
362
362
|
continue;
|
|
363
363
|
}
|
|
364
|
-
var o =
|
|
365
|
-
o && (t =
|
|
364
|
+
var o = _e(i.stem);
|
|
365
|
+
o && (t = m(m({}, t), o));
|
|
366
366
|
var s = et(i.stem);
|
|
367
|
-
s && (t =
|
|
367
|
+
s && (t = m(m({}, t), s));
|
|
368
368
|
}
|
|
369
369
|
return t;
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var U = {
|
|
372
372
|
AX: [
|
|
373
373
|
"H"
|
|
374
374
|
],
|
|
@@ -1706,20 +1706,20 @@ var j = {
|
|
|
1706
1706
|
]
|
|
1707
1707
|
};
|
|
1708
1708
|
function rt(e, t) {
|
|
1709
|
-
for (var
|
|
1710
|
-
var i = e.charAt(
|
|
1709
|
+
for (var n = "", r = 0; r < e.length; r++) {
|
|
1710
|
+
var i = e.charAt(r);
|
|
1711
1711
|
if (i === "j") {
|
|
1712
|
-
for (var a = 0;
|
|
1713
|
-
a++,
|
|
1712
|
+
for (var a = 0; r + 1 < e.length && e.charAt(r + 1) === i; )
|
|
1713
|
+
a++, r++;
|
|
1714
1714
|
var o = 1 + (a & 1), s = a < 2 ? 1 : 3 + (a >> 1), h = "a", l = nt(t);
|
|
1715
1715
|
for ((l == "H" || l == "k") && (s = 0); s-- > 0; )
|
|
1716
|
-
|
|
1716
|
+
n += h;
|
|
1717
1717
|
for (; o-- > 0; )
|
|
1718
|
-
|
|
1718
|
+
n = l + n;
|
|
1719
1719
|
} else
|
|
1720
|
-
i === "J" ?
|
|
1720
|
+
i === "J" ? n += "H" : n += i;
|
|
1721
1721
|
}
|
|
1722
|
-
return
|
|
1722
|
+
return n;
|
|
1723
1723
|
}
|
|
1724
1724
|
function nt(e) {
|
|
1725
1725
|
var t = e.hourCycle;
|
|
@@ -1738,70 +1738,70 @@ function nt(e) {
|
|
|
1738
1738
|
default:
|
|
1739
1739
|
throw new Error("Invalid hourCycle");
|
|
1740
1740
|
}
|
|
1741
|
-
var
|
|
1742
|
-
|
|
1743
|
-
var i =
|
|
1741
|
+
var n = e.language, r;
|
|
1742
|
+
n !== "root" && (r = e.maximize().region);
|
|
1743
|
+
var i = U[r || ""] || U[n || ""] || U["".concat(n, "-001")] || U["001"];
|
|
1744
1744
|
return i[0];
|
|
1745
1745
|
}
|
|
1746
|
-
var
|
|
1747
|
-
function
|
|
1746
|
+
var X, it = new RegExp("^".concat(Ae.source, "*")), at = new RegExp("".concat(Ae.source, "*$"));
|
|
1747
|
+
function v(e, t) {
|
|
1748
1748
|
return { start: e, end: t };
|
|
1749
1749
|
}
|
|
1750
1750
|
var ot = !!String.prototype.startsWith, st = !!String.fromCodePoint, ut = !!Object.fromEntries, ht = !!String.prototype.codePointAt, lt = !!String.prototype.trimStart, ft = !!String.prototype.trimEnd, ct = !!Number.isSafeInteger, mt = ct ? Number.isSafeInteger : function(e) {
|
|
1751
1751
|
return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
|
|
1752
|
-
},
|
|
1752
|
+
}, J = !0;
|
|
1753
1753
|
try {
|
|
1754
|
-
var gt =
|
|
1755
|
-
|
|
1754
|
+
var gt = Re("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
1755
|
+
J = ((X = gt.exec("a")) === null || X === void 0 ? void 0 : X[0]) === "a";
|
|
1756
1756
|
} catch {
|
|
1757
|
-
|
|
1757
|
+
J = !1;
|
|
1758
1758
|
}
|
|
1759
|
-
var
|
|
1759
|
+
var he = ot ? (
|
|
1760
1760
|
// Native
|
|
1761
|
-
function(t,
|
|
1762
|
-
return t.startsWith(
|
|
1761
|
+
function(t, n, r) {
|
|
1762
|
+
return t.startsWith(n, r);
|
|
1763
1763
|
}
|
|
1764
1764
|
) : (
|
|
1765
1765
|
// For IE11
|
|
1766
|
-
function(t,
|
|
1767
|
-
return t.slice(
|
|
1766
|
+
function(t, n, r) {
|
|
1767
|
+
return t.slice(r, r + n.length) === n;
|
|
1768
1768
|
}
|
|
1769
|
-
),
|
|
1769
|
+
), Q = st ? String.fromCodePoint : (
|
|
1770
1770
|
// IE11
|
|
1771
1771
|
function() {
|
|
1772
|
-
for (var t = [],
|
|
1773
|
-
t[
|
|
1774
|
-
for (var
|
|
1772
|
+
for (var t = [], n = 0; n < arguments.length; n++)
|
|
1773
|
+
t[n] = arguments[n];
|
|
1774
|
+
for (var r = "", i = t.length, a = 0, o; i > a; ) {
|
|
1775
1775
|
if (o = t[a++], o > 1114111)
|
|
1776
1776
|
throw RangeError(o + " is not a valid code point");
|
|
1777
|
-
|
|
1777
|
+
r += o < 65536 ? String.fromCharCode(o) : String.fromCharCode(((o -= 65536) >> 10) + 55296, o % 1024 + 56320);
|
|
1778
1778
|
}
|
|
1779
|
-
return
|
|
1779
|
+
return r;
|
|
1780
1780
|
}
|
|
1781
|
-
),
|
|
1781
|
+
), le = (
|
|
1782
1782
|
// native
|
|
1783
1783
|
ut ? Object.fromEntries : (
|
|
1784
1784
|
// Ponyfill
|
|
1785
1785
|
function(t) {
|
|
1786
|
-
for (var
|
|
1787
|
-
var a = i[
|
|
1788
|
-
|
|
1786
|
+
for (var n = {}, r = 0, i = t; r < i.length; r++) {
|
|
1787
|
+
var a = i[r], o = a[0], s = a[1];
|
|
1788
|
+
n[o] = s;
|
|
1789
1789
|
}
|
|
1790
|
-
return
|
|
1790
|
+
return n;
|
|
1791
1791
|
}
|
|
1792
1792
|
)
|
|
1793
|
-
),
|
|
1793
|
+
), Be = ht ? (
|
|
1794
1794
|
// Native
|
|
1795
|
-
function(t,
|
|
1796
|
-
return t.codePointAt(
|
|
1795
|
+
function(t, n) {
|
|
1796
|
+
return t.codePointAt(n);
|
|
1797
1797
|
}
|
|
1798
1798
|
) : (
|
|
1799
1799
|
// IE 11
|
|
1800
|
-
function(t,
|
|
1801
|
-
var
|
|
1802
|
-
if (!(
|
|
1803
|
-
var i = t.charCodeAt(
|
|
1804
|
-
return i < 55296 || i > 56319 ||
|
|
1800
|
+
function(t, n) {
|
|
1801
|
+
var r = t.length;
|
|
1802
|
+
if (!(n < 0 || n >= r)) {
|
|
1803
|
+
var i = t.charCodeAt(n), a;
|
|
1804
|
+
return i < 55296 || i > 56319 || n + 1 === r || (a = t.charCodeAt(n + 1)) < 56320 || a > 57343 ? i : (i - 55296 << 10) + (a - 56320) + 65536;
|
|
1805
1805
|
}
|
|
1806
1806
|
}
|
|
1807
1807
|
), pt = lt ? (
|
|
@@ -1825,66 +1825,66 @@ var le = ot ? (
|
|
|
1825
1825
|
return t.replace(at, "");
|
|
1826
1826
|
}
|
|
1827
1827
|
);
|
|
1828
|
-
function
|
|
1828
|
+
function Re(e, t) {
|
|
1829
1829
|
return new RegExp(e, t);
|
|
1830
1830
|
}
|
|
1831
|
-
var
|
|
1832
|
-
if (
|
|
1833
|
-
var
|
|
1834
|
-
|
|
1835
|
-
var
|
|
1836
|
-
|
|
1837
|
-
var i =
|
|
1838
|
-
return (
|
|
1831
|
+
var Y;
|
|
1832
|
+
if (J) {
|
|
1833
|
+
var fe = Re("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
1834
|
+
Y = function(t, n) {
|
|
1835
|
+
var r;
|
|
1836
|
+
fe.lastIndex = n;
|
|
1837
|
+
var i = fe.exec(t);
|
|
1838
|
+
return (r = i[1]) !== null && r !== void 0 ? r : "";
|
|
1839
1839
|
};
|
|
1840
1840
|
} else
|
|
1841
|
-
|
|
1842
|
-
for (var
|
|
1843
|
-
var i =
|
|
1844
|
-
if (i === void 0 ||
|
|
1841
|
+
Y = function(t, n) {
|
|
1842
|
+
for (var r = []; ; ) {
|
|
1843
|
+
var i = Be(t, n);
|
|
1844
|
+
if (i === void 0 || Oe(i) || yt(i))
|
|
1845
1845
|
break;
|
|
1846
|
-
|
|
1846
|
+
r.push(i), n += i >= 65536 ? 2 : 1;
|
|
1847
1847
|
}
|
|
1848
|
-
return
|
|
1848
|
+
return Q.apply(void 0, r);
|
|
1849
1849
|
};
|
|
1850
|
-
var
|
|
1850
|
+
var bt = (
|
|
1851
1851
|
/** @class */
|
|
1852
1852
|
function() {
|
|
1853
|
-
function e(t,
|
|
1854
|
-
|
|
1853
|
+
function e(t, n) {
|
|
1854
|
+
n === void 0 && (n = {}), this.message = t, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!n.ignoreTag, this.locale = n.locale, this.requiresOtherClause = !!n.requiresOtherClause, this.shouldParseSkeletons = !!n.shouldParseSkeletons;
|
|
1855
1855
|
}
|
|
1856
1856
|
return e.prototype.parse = function() {
|
|
1857
1857
|
if (this.offset() !== 0)
|
|
1858
1858
|
throw Error("parser can only be used once");
|
|
1859
1859
|
return this.parseMessage(0, "", !1);
|
|
1860
|
-
}, e.prototype.parseMessage = function(t,
|
|
1860
|
+
}, e.prototype.parseMessage = function(t, n, r) {
|
|
1861
1861
|
for (var i = []; !this.isEOF(); ) {
|
|
1862
1862
|
var a = this.char();
|
|
1863
1863
|
if (a === 123) {
|
|
1864
|
-
var o = this.parseArgument(t,
|
|
1864
|
+
var o = this.parseArgument(t, r);
|
|
1865
1865
|
if (o.err)
|
|
1866
1866
|
return o;
|
|
1867
1867
|
i.push(o.val);
|
|
1868
1868
|
} else {
|
|
1869
1869
|
if (a === 125 && t > 0)
|
|
1870
1870
|
break;
|
|
1871
|
-
if (a === 35 && (
|
|
1871
|
+
if (a === 35 && (n === "plural" || n === "selectordinal")) {
|
|
1872
1872
|
var s = this.clonePosition();
|
|
1873
1873
|
this.bump(), i.push({
|
|
1874
1874
|
type: d.pound,
|
|
1875
|
-
location:
|
|
1875
|
+
location: v(s, this.clonePosition())
|
|
1876
1876
|
});
|
|
1877
1877
|
} else if (a === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
1878
|
-
if (
|
|
1878
|
+
if (r)
|
|
1879
1879
|
break;
|
|
1880
|
-
return this.error(
|
|
1881
|
-
} else if (a === 60 && !this.ignoreTag &&
|
|
1882
|
-
var o = this.parseTag(t,
|
|
1880
|
+
return this.error(g.UNMATCHED_CLOSING_TAG, v(this.clonePosition(), this.clonePosition()));
|
|
1881
|
+
} else if (a === 60 && !this.ignoreTag && $(this.peek() || 0)) {
|
|
1882
|
+
var o = this.parseTag(t, n);
|
|
1883
1883
|
if (o.err)
|
|
1884
1884
|
return o;
|
|
1885
1885
|
i.push(o.val);
|
|
1886
1886
|
} else {
|
|
1887
|
-
var o = this.parseLiteral(t,
|
|
1887
|
+
var o = this.parseLiteral(t, n);
|
|
1888
1888
|
if (o.err)
|
|
1889
1889
|
return o;
|
|
1890
1890
|
i.push(o.val);
|
|
@@ -1892,8 +1892,8 @@ var Et = (
|
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
1894
|
return { val: i, err: null };
|
|
1895
|
-
}, e.prototype.parseTag = function(t,
|
|
1896
|
-
var
|
|
1895
|
+
}, e.prototype.parseTag = function(t, n) {
|
|
1896
|
+
var r = this.clonePosition();
|
|
1897
1897
|
this.bump();
|
|
1898
1898
|
var i = this.parseTagName();
|
|
1899
1899
|
if (this.bumpSpace(), this.bumpIf("/>"))
|
|
@@ -1901,45 +1901,45 @@ var Et = (
|
|
|
1901
1901
|
val: {
|
|
1902
1902
|
type: d.literal,
|
|
1903
1903
|
value: "<".concat(i, "/>"),
|
|
1904
|
-
location:
|
|
1904
|
+
location: v(r, this.clonePosition())
|
|
1905
1905
|
},
|
|
1906
1906
|
err: null
|
|
1907
1907
|
};
|
|
1908
1908
|
if (this.bumpIf(">")) {
|
|
1909
|
-
var a = this.parseMessage(t + 1,
|
|
1909
|
+
var a = this.parseMessage(t + 1, n, !0);
|
|
1910
1910
|
if (a.err)
|
|
1911
1911
|
return a;
|
|
1912
1912
|
var o = a.val, s = this.clonePosition();
|
|
1913
1913
|
if (this.bumpIf("</")) {
|
|
1914
|
-
if (this.isEOF() ||
|
|
1915
|
-
return this.error(
|
|
1914
|
+
if (this.isEOF() || !$(this.char()))
|
|
1915
|
+
return this.error(g.INVALID_TAG, v(s, this.clonePosition()));
|
|
1916
1916
|
var h = this.clonePosition(), l = this.parseTagName();
|
|
1917
|
-
return i !== l ? this.error(
|
|
1917
|
+
return i !== l ? this.error(g.UNMATCHED_CLOSING_TAG, v(h, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
|
|
1918
1918
|
val: {
|
|
1919
1919
|
type: d.tag,
|
|
1920
1920
|
value: i,
|
|
1921
1921
|
children: o,
|
|
1922
|
-
location:
|
|
1922
|
+
location: v(r, this.clonePosition())
|
|
1923
1923
|
},
|
|
1924
1924
|
err: null
|
|
1925
|
-
} : this.error(
|
|
1925
|
+
} : this.error(g.INVALID_TAG, v(s, this.clonePosition())));
|
|
1926
1926
|
} else
|
|
1927
|
-
return this.error(
|
|
1927
|
+
return this.error(g.UNCLOSED_TAG, v(r, this.clonePosition()));
|
|
1928
1928
|
} else
|
|
1929
|
-
return this.error(
|
|
1929
|
+
return this.error(g.INVALID_TAG, v(r, this.clonePosition()));
|
|
1930
1930
|
}, e.prototype.parseTagName = function() {
|
|
1931
1931
|
var t = this.offset();
|
|
1932
1932
|
for (this.bump(); !this.isEOF() && dt(this.char()); )
|
|
1933
1933
|
this.bump();
|
|
1934
1934
|
return this.message.slice(t, this.offset());
|
|
1935
|
-
}, e.prototype.parseLiteral = function(t,
|
|
1936
|
-
for (var
|
|
1937
|
-
var a = this.tryParseQuote(
|
|
1935
|
+
}, e.prototype.parseLiteral = function(t, n) {
|
|
1936
|
+
for (var r = this.clonePosition(), i = ""; ; ) {
|
|
1937
|
+
var a = this.tryParseQuote(n);
|
|
1938
1938
|
if (a) {
|
|
1939
1939
|
i += a;
|
|
1940
1940
|
continue;
|
|
1941
1941
|
}
|
|
1942
|
-
var o = this.tryParseUnquoted(t,
|
|
1942
|
+
var o = this.tryParseUnquoted(t, n);
|
|
1943
1943
|
if (o) {
|
|
1944
1944
|
i += o;
|
|
1945
1945
|
continue;
|
|
@@ -1951,14 +1951,14 @@ var Et = (
|
|
|
1951
1951
|
}
|
|
1952
1952
|
break;
|
|
1953
1953
|
}
|
|
1954
|
-
var h =
|
|
1954
|
+
var h = v(r, this.clonePosition());
|
|
1955
1955
|
return {
|
|
1956
1956
|
val: { type: d.literal, value: i, location: h },
|
|
1957
1957
|
err: null
|
|
1958
1958
|
};
|
|
1959
1959
|
}, e.prototype.tryParseLeftAngleBracket = function() {
|
|
1960
1960
|
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
|
|
1961
|
-
!
|
|
1961
|
+
!Et(this.peek() || 0)) ? (this.bump(), "<") : null;
|
|
1962
1962
|
}, e.prototype.tryParseQuote = function(t) {
|
|
1963
1963
|
if (this.isEOF() || this.char() !== 39)
|
|
1964
1964
|
return null;
|
|
@@ -1978,37 +1978,37 @@ var Et = (
|
|
|
1978
1978
|
return null;
|
|
1979
1979
|
}
|
|
1980
1980
|
this.bump();
|
|
1981
|
-
var
|
|
1981
|
+
var n = [this.char()];
|
|
1982
1982
|
for (this.bump(); !this.isEOF(); ) {
|
|
1983
|
-
var
|
|
1984
|
-
if (
|
|
1983
|
+
var r = this.char();
|
|
1984
|
+
if (r === 39)
|
|
1985
1985
|
if (this.peek() === 39)
|
|
1986
|
-
|
|
1986
|
+
n.push(39), this.bump();
|
|
1987
1987
|
else {
|
|
1988
1988
|
this.bump();
|
|
1989
1989
|
break;
|
|
1990
1990
|
}
|
|
1991
1991
|
else
|
|
1992
|
-
|
|
1992
|
+
n.push(r);
|
|
1993
1993
|
this.bump();
|
|
1994
1994
|
}
|
|
1995
|
-
return
|
|
1996
|
-
}, e.prototype.tryParseUnquoted = function(t,
|
|
1995
|
+
return Q.apply(void 0, n);
|
|
1996
|
+
}, e.prototype.tryParseUnquoted = function(t, n) {
|
|
1997
1997
|
if (this.isEOF())
|
|
1998
1998
|
return null;
|
|
1999
|
-
var
|
|
2000
|
-
return
|
|
2001
|
-
}, e.prototype.parseArgument = function(t,
|
|
2002
|
-
var
|
|
1999
|
+
var r = this.char();
|
|
2000
|
+
return r === 60 || r === 123 || r === 35 && (n === "plural" || n === "selectordinal") || r === 125 && t > 0 ? null : (this.bump(), Q(r));
|
|
2001
|
+
}, e.prototype.parseArgument = function(t, n) {
|
|
2002
|
+
var r = this.clonePosition();
|
|
2003
2003
|
if (this.bump(), this.bumpSpace(), this.isEOF())
|
|
2004
|
-
return this.error(
|
|
2004
|
+
return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(r, this.clonePosition()));
|
|
2005
2005
|
if (this.char() === 125)
|
|
2006
|
-
return this.bump(), this.error(
|
|
2006
|
+
return this.bump(), this.error(g.EMPTY_ARGUMENT, v(r, this.clonePosition()));
|
|
2007
2007
|
var i = this.parseIdentifierIfPossible().value;
|
|
2008
2008
|
if (!i)
|
|
2009
|
-
return this.error(
|
|
2009
|
+
return this.error(g.MALFORMED_ARGUMENT, v(r, this.clonePosition()));
|
|
2010
2010
|
if (this.bumpSpace(), this.isEOF())
|
|
2011
|
-
return this.error(
|
|
2011
|
+
return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(r, this.clonePosition()));
|
|
2012
2012
|
switch (this.char()) {
|
|
2013
2013
|
case 125:
|
|
2014
2014
|
return this.bump(), {
|
|
@@ -2016,25 +2016,25 @@ var Et = (
|
|
|
2016
2016
|
type: d.argument,
|
|
2017
2017
|
// value does not include the opening and closing braces.
|
|
2018
2018
|
value: i,
|
|
2019
|
-
location:
|
|
2019
|
+
location: v(r, this.clonePosition())
|
|
2020
2020
|
},
|
|
2021
2021
|
err: null
|
|
2022
2022
|
};
|
|
2023
2023
|
case 44:
|
|
2024
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(
|
|
2024
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(r, this.clonePosition())) : this.parseArgumentOptions(t, n, i, r);
|
|
2025
2025
|
default:
|
|
2026
|
-
return this.error(
|
|
2026
|
+
return this.error(g.MALFORMED_ARGUMENT, v(r, this.clonePosition()));
|
|
2027
2027
|
}
|
|
2028
2028
|
}, e.prototype.parseIdentifierIfPossible = function() {
|
|
2029
|
-
var t = this.clonePosition(),
|
|
2029
|
+
var t = this.clonePosition(), n = this.offset(), r = Y(this.message, n), i = n + r.length;
|
|
2030
2030
|
this.bumpTo(i);
|
|
2031
|
-
var a = this.clonePosition(), o =
|
|
2032
|
-
return { value:
|
|
2033
|
-
}, e.prototype.parseArgumentOptions = function(t,
|
|
2031
|
+
var a = this.clonePosition(), o = v(t, a);
|
|
2032
|
+
return { value: r, location: o };
|
|
2033
|
+
}, e.prototype.parseArgumentOptions = function(t, n, r, i) {
|
|
2034
2034
|
var a, o = this.clonePosition(), s = this.parseIdentifierIfPossible().value, h = this.clonePosition();
|
|
2035
2035
|
switch (s) {
|
|
2036
2036
|
case "":
|
|
2037
|
-
return this.error(
|
|
2037
|
+
return this.error(g.EXPECT_ARGUMENT_TYPE, v(o, h));
|
|
2038
2038
|
case "number":
|
|
2039
2039
|
case "date":
|
|
2040
2040
|
case "time": {
|
|
@@ -2047,35 +2047,35 @@ var Et = (
|
|
|
2047
2047
|
return f;
|
|
2048
2048
|
var c = vt(f.val);
|
|
2049
2049
|
if (c.length === 0)
|
|
2050
|
-
return this.error(
|
|
2051
|
-
var
|
|
2052
|
-
l = { style: c, styleLocation:
|
|
2050
|
+
return this.error(g.EXPECT_ARGUMENT_STYLE, v(this.clonePosition(), this.clonePosition()));
|
|
2051
|
+
var p = v(u, this.clonePosition());
|
|
2052
|
+
l = { style: c, styleLocation: p };
|
|
2053
2053
|
}
|
|
2054
|
-
var
|
|
2055
|
-
if (
|
|
2056
|
-
return
|
|
2057
|
-
var
|
|
2058
|
-
if (l &&
|
|
2054
|
+
var b = this.tryParseArgumentClose(i);
|
|
2055
|
+
if (b.err)
|
|
2056
|
+
return b;
|
|
2057
|
+
var E = v(i, this.clonePosition());
|
|
2058
|
+
if (l && he(l == null ? void 0 : l.style, "::", 0)) {
|
|
2059
2059
|
var y = pt(l.style.slice(2));
|
|
2060
2060
|
if (s === "number") {
|
|
2061
2061
|
var f = this.parseNumberSkeletonFromString(y, l.styleLocation);
|
|
2062
2062
|
return f.err ? f : {
|
|
2063
|
-
val: { type: d.number, value:
|
|
2063
|
+
val: { type: d.number, value: r, location: E, style: f.val },
|
|
2064
2064
|
err: null
|
|
2065
2065
|
};
|
|
2066
2066
|
} else {
|
|
2067
2067
|
if (y.length === 0)
|
|
2068
|
-
return this.error(
|
|
2069
|
-
var
|
|
2070
|
-
this.locale && (
|
|
2068
|
+
return this.error(g.EXPECT_DATE_TIME_SKELETON, E);
|
|
2069
|
+
var x = y;
|
|
2070
|
+
this.locale && (x = rt(y, this.locale));
|
|
2071
2071
|
var c = {
|
|
2072
2072
|
type: w.dateTime,
|
|
2073
|
-
pattern:
|
|
2073
|
+
pattern: x,
|
|
2074
2074
|
location: l.styleLocation,
|
|
2075
|
-
parsedOptions: this.shouldParseSkeletons ? Je(
|
|
2076
|
-
},
|
|
2075
|
+
parsedOptions: this.shouldParseSkeletons ? Je(x) : {}
|
|
2076
|
+
}, H = s === "date" ? d.date : d.time;
|
|
2077
2077
|
return {
|
|
2078
|
-
val: { type:
|
|
2078
|
+
val: { type: H, value: r, location: E, style: c },
|
|
2079
2079
|
err: null
|
|
2080
2080
|
};
|
|
2081
2081
|
}
|
|
@@ -2083,8 +2083,8 @@ var Et = (
|
|
|
2083
2083
|
return {
|
|
2084
2084
|
val: {
|
|
2085
2085
|
type: s === "number" ? d.number : s === "date" ? d.date : d.time,
|
|
2086
|
-
value:
|
|
2087
|
-
location:
|
|
2086
|
+
value: r,
|
|
2087
|
+
location: E,
|
|
2088
2088
|
style: (a = l == null ? void 0 : l.style) !== null && a !== void 0 ? a : null
|
|
2089
2089
|
},
|
|
2090
2090
|
err: null
|
|
@@ -2093,61 +2093,61 @@ var Et = (
|
|
|
2093
2093
|
case "plural":
|
|
2094
2094
|
case "selectordinal":
|
|
2095
2095
|
case "select": {
|
|
2096
|
-
var
|
|
2096
|
+
var T = this.clonePosition();
|
|
2097
2097
|
if (this.bumpSpace(), !this.bumpIf(","))
|
|
2098
|
-
return this.error(
|
|
2098
|
+
return this.error(g.EXPECT_SELECT_ARGUMENT_OPTIONS, v(T, m({}, T)));
|
|
2099
2099
|
this.bumpSpace();
|
|
2100
|
-
var
|
|
2101
|
-
if (s !== "select" &&
|
|
2100
|
+
var D = this.parseIdentifierIfPossible(), L = 0;
|
|
2101
|
+
if (s !== "select" && D.value === "offset") {
|
|
2102
2102
|
if (!this.bumpIf(":"))
|
|
2103
|
-
return this.error(
|
|
2103
|
+
return this.error(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, v(this.clonePosition(), this.clonePosition()));
|
|
2104
2104
|
this.bumpSpace();
|
|
2105
|
-
var f = this.tryParseDecimalInteger(
|
|
2105
|
+
var f = this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
|
|
2106
2106
|
if (f.err)
|
|
2107
2107
|
return f;
|
|
2108
|
-
this.bumpSpace(),
|
|
2108
|
+
this.bumpSpace(), D = this.parseIdentifierIfPossible(), L = f.val;
|
|
2109
2109
|
}
|
|
2110
|
-
var
|
|
2111
|
-
if (
|
|
2112
|
-
return
|
|
2113
|
-
var
|
|
2114
|
-
if (
|
|
2115
|
-
return
|
|
2116
|
-
var
|
|
2110
|
+
var G = this.tryParsePluralOrSelectOptions(t, s, n, D);
|
|
2111
|
+
if (G.err)
|
|
2112
|
+
return G;
|
|
2113
|
+
var b = this.tryParseArgumentClose(i);
|
|
2114
|
+
if (b.err)
|
|
2115
|
+
return b;
|
|
2116
|
+
var ie = v(i, this.clonePosition());
|
|
2117
2117
|
return s === "select" ? {
|
|
2118
2118
|
val: {
|
|
2119
2119
|
type: d.select,
|
|
2120
|
-
value:
|
|
2121
|
-
options:
|
|
2122
|
-
location:
|
|
2120
|
+
value: r,
|
|
2121
|
+
options: le(G.val),
|
|
2122
|
+
location: ie
|
|
2123
2123
|
},
|
|
2124
2124
|
err: null
|
|
2125
2125
|
} : {
|
|
2126
2126
|
val: {
|
|
2127
2127
|
type: d.plural,
|
|
2128
|
-
value:
|
|
2129
|
-
options:
|
|
2130
|
-
offset:
|
|
2128
|
+
value: r,
|
|
2129
|
+
options: le(G.val),
|
|
2130
|
+
offset: L,
|
|
2131
2131
|
pluralType: s === "plural" ? "cardinal" : "ordinal",
|
|
2132
|
-
location:
|
|
2132
|
+
location: ie
|
|
2133
2133
|
},
|
|
2134
2134
|
err: null
|
|
2135
2135
|
};
|
|
2136
2136
|
}
|
|
2137
2137
|
default:
|
|
2138
|
-
return this.error(
|
|
2138
|
+
return this.error(g.INVALID_ARGUMENT_TYPE, v(o, h));
|
|
2139
2139
|
}
|
|
2140
2140
|
}, e.prototype.tryParseArgumentClose = function(t) {
|
|
2141
|
-
return this.isEOF() || this.char() !== 125 ? this.error(
|
|
2141
|
+
return this.isEOF() || this.char() !== 125 ? this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(t, this.clonePosition())) : (this.bump(), { val: !0, err: null });
|
|
2142
2142
|
}, e.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
2143
|
-
for (var t = 0,
|
|
2144
|
-
var
|
|
2145
|
-
switch (
|
|
2143
|
+
for (var t = 0, n = this.clonePosition(); !this.isEOF(); ) {
|
|
2144
|
+
var r = this.char();
|
|
2145
|
+
switch (r) {
|
|
2146
2146
|
case 39: {
|
|
2147
2147
|
this.bump();
|
|
2148
2148
|
var i = this.clonePosition();
|
|
2149
2149
|
if (!this.bumpUntil("'"))
|
|
2150
|
-
return this.error(
|
|
2150
|
+
return this.error(g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, v(i, this.clonePosition()));
|
|
2151
2151
|
this.bump();
|
|
2152
2152
|
break;
|
|
2153
2153
|
}
|
|
@@ -2160,7 +2160,7 @@ var Et = (
|
|
|
2160
2160
|
t -= 1;
|
|
2161
2161
|
else
|
|
2162
2162
|
return {
|
|
2163
|
-
val: this.message.slice(
|
|
2163
|
+
val: this.message.slice(n.offset, this.offset()),
|
|
2164
2164
|
err: null
|
|
2165
2165
|
};
|
|
2166
2166
|
break;
|
|
@@ -2171,61 +2171,61 @@ var Et = (
|
|
|
2171
2171
|
}
|
|
2172
2172
|
}
|
|
2173
2173
|
return {
|
|
2174
|
-
val: this.message.slice(
|
|
2174
|
+
val: this.message.slice(n.offset, this.offset()),
|
|
2175
2175
|
err: null
|
|
2176
2176
|
};
|
|
2177
|
-
}, e.prototype.parseNumberSkeletonFromString = function(t,
|
|
2178
|
-
var
|
|
2177
|
+
}, e.prototype.parseNumberSkeletonFromString = function(t, n) {
|
|
2178
|
+
var r = [];
|
|
2179
2179
|
try {
|
|
2180
|
-
|
|
2180
|
+
r = Ye(t);
|
|
2181
2181
|
} catch {
|
|
2182
|
-
return this.error(
|
|
2182
|
+
return this.error(g.INVALID_NUMBER_SKELETON, n);
|
|
2183
2183
|
}
|
|
2184
2184
|
return {
|
|
2185
2185
|
val: {
|
|
2186
2186
|
type: w.number,
|
|
2187
|
-
tokens:
|
|
2188
|
-
location:
|
|
2189
|
-
parsedOptions: this.shouldParseSkeletons ? tt(
|
|
2187
|
+
tokens: r,
|
|
2188
|
+
location: n,
|
|
2189
|
+
parsedOptions: this.shouldParseSkeletons ? tt(r) : {}
|
|
2190
2190
|
},
|
|
2191
2191
|
err: null
|
|
2192
2192
|
};
|
|
2193
|
-
}, e.prototype.tryParsePluralOrSelectOptions = function(t,
|
|
2193
|
+
}, e.prototype.tryParsePluralOrSelectOptions = function(t, n, r, i) {
|
|
2194
2194
|
for (var a, o = !1, s = [], h = /* @__PURE__ */ new Set(), l = i.value, u = i.location; ; ) {
|
|
2195
2195
|
if (l.length === 0) {
|
|
2196
2196
|
var f = this.clonePosition();
|
|
2197
|
-
if (
|
|
2198
|
-
var c = this.tryParseDecimalInteger(
|
|
2197
|
+
if (n !== "select" && this.bumpIf("=")) {
|
|
2198
|
+
var c = this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_SELECTOR, g.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
2199
2199
|
if (c.err)
|
|
2200
2200
|
return c;
|
|
2201
|
-
u =
|
|
2201
|
+
u = v(f, this.clonePosition()), l = this.message.slice(f.offset, this.offset());
|
|
2202
2202
|
} else
|
|
2203
2203
|
break;
|
|
2204
2204
|
}
|
|
2205
2205
|
if (h.has(l))
|
|
2206
|
-
return this.error(
|
|
2206
|
+
return this.error(n === "select" ? g.DUPLICATE_SELECT_ARGUMENT_SELECTOR : g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, u);
|
|
2207
2207
|
l === "other" && (o = !0), this.bumpSpace();
|
|
2208
|
-
var
|
|
2208
|
+
var p = this.clonePosition();
|
|
2209
2209
|
if (!this.bumpIf("{"))
|
|
2210
|
-
return this.error(
|
|
2211
|
-
var
|
|
2212
|
-
if (E.err)
|
|
2213
|
-
return E;
|
|
2214
|
-
var b = this.tryParseArgumentClose(g);
|
|
2210
|
+
return this.error(n === "select" ? g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, v(this.clonePosition(), this.clonePosition()));
|
|
2211
|
+
var b = this.parseMessage(t + 1, n, r);
|
|
2215
2212
|
if (b.err)
|
|
2216
2213
|
return b;
|
|
2214
|
+
var E = this.tryParseArgumentClose(p);
|
|
2215
|
+
if (E.err)
|
|
2216
|
+
return E;
|
|
2217
2217
|
s.push([
|
|
2218
2218
|
l,
|
|
2219
2219
|
{
|
|
2220
|
-
value:
|
|
2221
|
-
location: p
|
|
2220
|
+
value: b.val,
|
|
2221
|
+
location: v(p, this.clonePosition())
|
|
2222
2222
|
}
|
|
2223
2223
|
]), h.add(l), this.bumpSpace(), a = this.parseIdentifierIfPossible(), l = a.value, u = a.location;
|
|
2224
2224
|
}
|
|
2225
|
-
return s.length === 0 ? this.error(
|
|
2226
|
-
}, e.prototype.tryParseDecimalInteger = function(t,
|
|
2227
|
-
var
|
|
2228
|
-
this.bumpIf("+") || this.bumpIf("-") && (
|
|
2225
|
+
return s.length === 0 ? this.error(n === "select" ? g.EXPECT_SELECT_ARGUMENT_SELECTOR : g.EXPECT_PLURAL_ARGUMENT_SELECTOR, v(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(g.MISSING_OTHER_CLAUSE, v(this.clonePosition(), this.clonePosition())) : { val: s, err: null };
|
|
2226
|
+
}, e.prototype.tryParseDecimalInteger = function(t, n) {
|
|
2227
|
+
var r = 1, i = this.clonePosition();
|
|
2228
|
+
this.bumpIf("+") || this.bumpIf("-") && (r = -1);
|
|
2229
2229
|
for (var a = !1, o = 0; !this.isEOF(); ) {
|
|
2230
2230
|
var s = this.char();
|
|
2231
2231
|
if (s >= 48 && s <= 57)
|
|
@@ -2233,8 +2233,8 @@ var Et = (
|
|
|
2233
2233
|
else
|
|
2234
2234
|
break;
|
|
2235
2235
|
}
|
|
2236
|
-
var h =
|
|
2237
|
-
return a ? (o *=
|
|
2236
|
+
var h = v(i, this.clonePosition());
|
|
2237
|
+
return a ? (o *= r, mt(o) ? { val: o, err: null } : this.error(n, h)) : this.error(t, h);
|
|
2238
2238
|
}, e.prototype.offset = function() {
|
|
2239
2239
|
return this.position.offset;
|
|
2240
2240
|
}, e.prototype.isEOF = function() {
|
|
@@ -2249,17 +2249,17 @@ var Et = (
|
|
|
2249
2249
|
var t = this.position.offset;
|
|
2250
2250
|
if (t >= this.message.length)
|
|
2251
2251
|
throw Error("out of bound");
|
|
2252
|
-
var
|
|
2253
|
-
if (
|
|
2252
|
+
var n = Be(this.message, t);
|
|
2253
|
+
if (n === void 0)
|
|
2254
2254
|
throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary"));
|
|
2255
|
-
return
|
|
2256
|
-
}, e.prototype.error = function(t,
|
|
2255
|
+
return n;
|
|
2256
|
+
}, e.prototype.error = function(t, n) {
|
|
2257
2257
|
return {
|
|
2258
2258
|
val: null,
|
|
2259
2259
|
err: {
|
|
2260
2260
|
kind: t,
|
|
2261
2261
|
message: this.message,
|
|
2262
|
-
location:
|
|
2262
|
+
location: n
|
|
2263
2263
|
}
|
|
2264
2264
|
};
|
|
2265
2265
|
}, e.prototype.bump = function() {
|
|
@@ -2268,198 +2268,198 @@ var Et = (
|
|
|
2268
2268
|
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);
|
|
2269
2269
|
}
|
|
2270
2270
|
}, e.prototype.bumpIf = function(t) {
|
|
2271
|
-
if (
|
|
2272
|
-
for (var
|
|
2271
|
+
if (he(this.message, t, this.offset())) {
|
|
2272
|
+
for (var n = 0; n < t.length; n++)
|
|
2273
2273
|
this.bump();
|
|
2274
2274
|
return !0;
|
|
2275
2275
|
}
|
|
2276
2276
|
return !1;
|
|
2277
2277
|
}, e.prototype.bumpUntil = function(t) {
|
|
2278
|
-
var
|
|
2279
|
-
return
|
|
2278
|
+
var n = this.offset(), r = this.message.indexOf(t, n);
|
|
2279
|
+
return r >= 0 ? (this.bumpTo(r), !0) : (this.bumpTo(this.message.length), !1);
|
|
2280
2280
|
}, e.prototype.bumpTo = function(t) {
|
|
2281
2281
|
if (this.offset() > t)
|
|
2282
2282
|
throw Error("targetOffset ".concat(t, " must be greater than or equal to the current offset ").concat(this.offset()));
|
|
2283
2283
|
for (t = Math.min(t, this.message.length); ; ) {
|
|
2284
|
-
var
|
|
2285
|
-
if (
|
|
2284
|
+
var n = this.offset();
|
|
2285
|
+
if (n === t)
|
|
2286
2286
|
break;
|
|
2287
|
-
if (
|
|
2287
|
+
if (n > t)
|
|
2288
2288
|
throw Error("targetOffset ".concat(t, " is at invalid UTF-16 code unit boundary"));
|
|
2289
2289
|
if (this.bump(), this.isEOF())
|
|
2290
2290
|
break;
|
|
2291
2291
|
}
|
|
2292
2292
|
}, e.prototype.bumpSpace = function() {
|
|
2293
|
-
for (; !this.isEOF() &&
|
|
2293
|
+
for (; !this.isEOF() && Oe(this.char()); )
|
|
2294
2294
|
this.bump();
|
|
2295
2295
|
}, e.prototype.peek = function() {
|
|
2296
2296
|
if (this.isEOF())
|
|
2297
2297
|
return null;
|
|
2298
|
-
var t = this.char(),
|
|
2299
|
-
return
|
|
2298
|
+
var t = this.char(), n = this.offset(), r = this.message.charCodeAt(n + (t >= 65536 ? 2 : 1));
|
|
2299
|
+
return r ?? null;
|
|
2300
2300
|
}, e;
|
|
2301
2301
|
}()
|
|
2302
2302
|
);
|
|
2303
|
-
function
|
|
2303
|
+
function $(e) {
|
|
2304
2304
|
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
|
|
2305
2305
|
}
|
|
2306
|
-
function
|
|
2307
|
-
return
|
|
2306
|
+
function Et(e) {
|
|
2307
|
+
return $(e) || e === 47;
|
|
2308
2308
|
}
|
|
2309
2309
|
function dt(e) {
|
|
2310
2310
|
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;
|
|
2311
2311
|
}
|
|
2312
|
-
function
|
|
2312
|
+
function Oe(e) {
|
|
2313
2313
|
return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
|
|
2314
2314
|
}
|
|
2315
|
-
function
|
|
2315
|
+
function yt(e) {
|
|
2316
2316
|
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;
|
|
2317
2317
|
}
|
|
2318
|
-
function
|
|
2318
|
+
function K(e) {
|
|
2319
2319
|
e.forEach(function(t) {
|
|
2320
|
-
if (delete t.location,
|
|
2321
|
-
for (var
|
|
2322
|
-
delete t.options[
|
|
2320
|
+
if (delete t.location, xe(t) || Te(t))
|
|
2321
|
+
for (var n in t.options)
|
|
2322
|
+
delete t.options[n].location, K(t.options[n].value);
|
|
2323
2323
|
else
|
|
2324
|
-
|
|
2324
|
+
Ee(t) && Ie(t.style) || (de(t) || ye(t)) && q(t.style) ? delete t.style.location : Se(t) && K(t.children);
|
|
2325
2325
|
});
|
|
2326
2326
|
}
|
|
2327
|
-
function
|
|
2328
|
-
t === void 0 && (t = {}), t =
|
|
2329
|
-
var
|
|
2330
|
-
if (
|
|
2331
|
-
var
|
|
2332
|
-
throw
|
|
2327
|
+
function xt(e, t) {
|
|
2328
|
+
t === void 0 && (t = {}), t = m({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
|
|
2329
|
+
var n = new bt(e, t).parse();
|
|
2330
|
+
if (n.err) {
|
|
2331
|
+
var r = SyntaxError(g[n.err.kind]);
|
|
2332
|
+
throw r.location = n.err.location, r.originalMessage = n.err.message, r;
|
|
2333
2333
|
}
|
|
2334
|
-
return t != null && t.captureLocation ||
|
|
2334
|
+
return t != null && t.captureLocation || K(n.val), n.val;
|
|
2335
2335
|
}
|
|
2336
|
-
function
|
|
2337
|
-
var
|
|
2336
|
+
function _(e, t) {
|
|
2337
|
+
var n = t && t.cache ? t.cache : Nt, r = t && t.serializer ? t.serializer : Ht, i = t && t.strategy ? t.strategy : St;
|
|
2338
2338
|
return i(e, {
|
|
2339
|
-
cache:
|
|
2340
|
-
serializer:
|
|
2339
|
+
cache: n,
|
|
2340
|
+
serializer: r
|
|
2341
2341
|
});
|
|
2342
2342
|
}
|
|
2343
2343
|
function Tt(e) {
|
|
2344
2344
|
return e == null || typeof e == "number" || typeof e == "boolean";
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2347
|
-
var i = Tt(
|
|
2348
|
-
return typeof a > "u" && (a = e.call(this,
|
|
2346
|
+
function Pe(e, t, n, r) {
|
|
2347
|
+
var i = Tt(r) ? r : n(r), a = t.get(i);
|
|
2348
|
+
return typeof a > "u" && (a = e.call(this, r), t.set(i, a)), a;
|
|
2349
2349
|
}
|
|
2350
|
-
function
|
|
2351
|
-
var
|
|
2352
|
-
return typeof a > "u" && (a = e.apply(this,
|
|
2350
|
+
function Le(e, t, n) {
|
|
2351
|
+
var r = Array.prototype.slice.call(arguments, 3), i = n(r), a = t.get(i);
|
|
2352
|
+
return typeof a > "u" && (a = e.apply(this, r), t.set(i, a)), a;
|
|
2353
2353
|
}
|
|
2354
|
-
function
|
|
2355
|
-
return
|
|
2354
|
+
function ee(e, t, n, r, i) {
|
|
2355
|
+
return n.bind(t, e, r, i);
|
|
2356
2356
|
}
|
|
2357
2357
|
function St(e, t) {
|
|
2358
|
-
var
|
|
2359
|
-
return
|
|
2358
|
+
var n = e.length === 1 ? Pe : Le;
|
|
2359
|
+
return ee(e, this, n, t.cache.create(), t.serializer);
|
|
2360
2360
|
}
|
|
2361
2361
|
function It(e, t) {
|
|
2362
|
-
return
|
|
2362
|
+
return ee(e, this, Le, t.cache.create(), t.serializer);
|
|
2363
2363
|
}
|
|
2364
2364
|
function At(e, t) {
|
|
2365
|
-
return
|
|
2365
|
+
return ee(e, this, Pe, t.cache.create(), t.serializer);
|
|
2366
2366
|
}
|
|
2367
2367
|
var Ht = function() {
|
|
2368
2368
|
return JSON.stringify(arguments);
|
|
2369
2369
|
};
|
|
2370
|
-
function
|
|
2370
|
+
function te() {
|
|
2371
2371
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2372
2372
|
}
|
|
2373
|
-
|
|
2373
|
+
te.prototype.get = function(e) {
|
|
2374
2374
|
return this.cache[e];
|
|
2375
2375
|
};
|
|
2376
|
-
|
|
2376
|
+
te.prototype.set = function(e, t) {
|
|
2377
2377
|
this.cache[e] = t;
|
|
2378
2378
|
};
|
|
2379
2379
|
var Nt = {
|
|
2380
2380
|
create: function() {
|
|
2381
|
-
return new
|
|
2381
|
+
return new te();
|
|
2382
2382
|
}
|
|
2383
|
-
},
|
|
2383
|
+
}, B = {
|
|
2384
2384
|
variadic: It,
|
|
2385
2385
|
monadic: At
|
|
2386
|
-
},
|
|
2386
|
+
}, R;
|
|
2387
2387
|
(function(e) {
|
|
2388
2388
|
e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API";
|
|
2389
|
-
})(
|
|
2390
|
-
var
|
|
2389
|
+
})(R || (R = {}));
|
|
2390
|
+
var P = (
|
|
2391
2391
|
/** @class */
|
|
2392
2392
|
function(e) {
|
|
2393
|
-
|
|
2394
|
-
function t(
|
|
2395
|
-
var a = e.call(this,
|
|
2396
|
-
return a.code =
|
|
2393
|
+
N(t, e);
|
|
2394
|
+
function t(n, r, i) {
|
|
2395
|
+
var a = e.call(this, n) || this;
|
|
2396
|
+
return a.code = r, a.originalMessage = i, a;
|
|
2397
2397
|
}
|
|
2398
2398
|
return t.prototype.toString = function() {
|
|
2399
2399
|
return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
|
|
2400
2400
|
}, t;
|
|
2401
2401
|
}(Error)
|
|
2402
|
-
),
|
|
2402
|
+
), ce = (
|
|
2403
2403
|
/** @class */
|
|
2404
2404
|
function(e) {
|
|
2405
|
-
|
|
2406
|
-
function t(
|
|
2407
|
-
return e.call(this, 'Invalid values for "'.concat(
|
|
2405
|
+
N(t, e);
|
|
2406
|
+
function t(n, r, i, a) {
|
|
2407
|
+
return e.call(this, 'Invalid values for "'.concat(n, '": "').concat(r, '". Options are "').concat(Object.keys(i).join('", "'), '"'), R.INVALID_VALUE, a) || this;
|
|
2408
2408
|
}
|
|
2409
2409
|
return t;
|
|
2410
|
-
}(
|
|
2410
|
+
}(P)
|
|
2411
2411
|
), _t = (
|
|
2412
2412
|
/** @class */
|
|
2413
2413
|
function(e) {
|
|
2414
|
-
|
|
2415
|
-
function t(
|
|
2416
|
-
return e.call(this, 'Value for "'.concat(
|
|
2414
|
+
N(t, e);
|
|
2415
|
+
function t(n, r, i) {
|
|
2416
|
+
return e.call(this, 'Value for "'.concat(n, '" must be of type ').concat(r), R.INVALID_VALUE, i) || this;
|
|
2417
2417
|
}
|
|
2418
2418
|
return t;
|
|
2419
|
-
}(
|
|
2419
|
+
}(P)
|
|
2420
2420
|
), Bt = (
|
|
2421
2421
|
/** @class */
|
|
2422
2422
|
function(e) {
|
|
2423
|
-
|
|
2424
|
-
function t(
|
|
2425
|
-
return e.call(this, 'The intl string context variable "'.concat(
|
|
2423
|
+
N(t, e);
|
|
2424
|
+
function t(n, r) {
|
|
2425
|
+
return e.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(r, '"'), R.MISSING_VALUE, r) || this;
|
|
2426
2426
|
}
|
|
2427
2427
|
return t;
|
|
2428
|
-
}(
|
|
2429
|
-
),
|
|
2428
|
+
}(P)
|
|
2429
|
+
), I;
|
|
2430
2430
|
(function(e) {
|
|
2431
2431
|
e[e.literal = 0] = "literal", e[e.object = 1] = "object";
|
|
2432
|
-
})(
|
|
2432
|
+
})(I || (I = {}));
|
|
2433
2433
|
function Rt(e) {
|
|
2434
|
-
return e.length < 2 ? e : e.reduce(function(t,
|
|
2435
|
-
var
|
|
2436
|
-
return !
|
|
2434
|
+
return e.length < 2 ? e : e.reduce(function(t, n) {
|
|
2435
|
+
var r = t[t.length - 1];
|
|
2436
|
+
return !r || r.type !== I.literal || n.type !== I.literal ? t.push(n) : r.value += n.value, t;
|
|
2437
2437
|
}, []);
|
|
2438
2438
|
}
|
|
2439
2439
|
function Ot(e) {
|
|
2440
2440
|
return typeof e == "function";
|
|
2441
2441
|
}
|
|
2442
|
-
function
|
|
2443
|
-
if (e.length === 1 &&
|
|
2442
|
+
function V(e, t, n, r, i, a, o) {
|
|
2443
|
+
if (e.length === 1 && ae(e[0]))
|
|
2444
2444
|
return [
|
|
2445
2445
|
{
|
|
2446
|
-
type:
|
|
2446
|
+
type: I.literal,
|
|
2447
2447
|
value: e[0].value
|
|
2448
2448
|
}
|
|
2449
2449
|
];
|
|
2450
2450
|
for (var s = [], h = 0, l = e; h < l.length; h++) {
|
|
2451
2451
|
var u = l[h];
|
|
2452
|
-
if (
|
|
2452
|
+
if (ae(u)) {
|
|
2453
2453
|
s.push({
|
|
2454
|
-
type:
|
|
2454
|
+
type: I.literal,
|
|
2455
2455
|
value: u.value
|
|
2456
2456
|
});
|
|
2457
2457
|
continue;
|
|
2458
2458
|
}
|
|
2459
2459
|
if (ze(u)) {
|
|
2460
2460
|
typeof a == "number" && s.push({
|
|
2461
|
-
type:
|
|
2462
|
-
value:
|
|
2461
|
+
type: I.literal,
|
|
2462
|
+
value: n.getNumberFormat(t).format(a)
|
|
2463
2463
|
});
|
|
2464
2464
|
continue;
|
|
2465
2465
|
}
|
|
@@ -2469,93 +2469,93 @@ function k(e, t, r, n, i, a, o) {
|
|
|
2469
2469
|
var c = i[f];
|
|
2470
2470
|
if (We(u)) {
|
|
2471
2471
|
(!c || typeof c == "string" || typeof c == "number") && (c = typeof c == "string" || typeof c == "number" ? String(c) : ""), s.push({
|
|
2472
|
-
type: typeof c == "string" ?
|
|
2472
|
+
type: typeof c == "string" ? I.literal : I.object,
|
|
2473
2473
|
value: c
|
|
2474
2474
|
});
|
|
2475
2475
|
continue;
|
|
2476
2476
|
}
|
|
2477
|
-
if (
|
|
2478
|
-
var
|
|
2477
|
+
if (de(u)) {
|
|
2478
|
+
var p = typeof u.style == "string" ? r.date[u.style] : q(u.style) ? u.style.parsedOptions : void 0;
|
|
2479
2479
|
s.push({
|
|
2480
|
-
type:
|
|
2481
|
-
value:
|
|
2480
|
+
type: I.literal,
|
|
2481
|
+
value: n.getDateTimeFormat(t, p).format(c)
|
|
2482
2482
|
});
|
|
2483
2483
|
continue;
|
|
2484
2484
|
}
|
|
2485
2485
|
if (ye(u)) {
|
|
2486
|
-
var
|
|
2486
|
+
var p = typeof u.style == "string" ? r.time[u.style] : q(u.style) ? u.style.parsedOptions : r.time.medium;
|
|
2487
2487
|
s.push({
|
|
2488
|
-
type:
|
|
2489
|
-
value:
|
|
2488
|
+
type: I.literal,
|
|
2489
|
+
value: n.getDateTimeFormat(t, p).format(c)
|
|
2490
2490
|
});
|
|
2491
2491
|
continue;
|
|
2492
2492
|
}
|
|
2493
|
-
if (
|
|
2494
|
-
var
|
|
2495
|
-
|
|
2496
|
-
type:
|
|
2497
|
-
value:
|
|
2493
|
+
if (Ee(u)) {
|
|
2494
|
+
var p = typeof u.style == "string" ? r.number[u.style] : Ie(u.style) ? u.style.parsedOptions : void 0;
|
|
2495
|
+
p && p.scale && (c = c * (p.scale || 1)), s.push({
|
|
2496
|
+
type: I.literal,
|
|
2497
|
+
value: n.getNumberFormat(t, p).format(c)
|
|
2498
2498
|
});
|
|
2499
2499
|
continue;
|
|
2500
2500
|
}
|
|
2501
|
-
if (
|
|
2502
|
-
var
|
|
2501
|
+
if (Se(u)) {
|
|
2502
|
+
var b = u.children, E = u.value, y = i[E];
|
|
2503
2503
|
if (!Ot(y))
|
|
2504
|
-
throw new _t(
|
|
2505
|
-
var
|
|
2506
|
-
return
|
|
2504
|
+
throw new _t(E, "function", o);
|
|
2505
|
+
var x = V(b, t, n, r, i, a), H = y(x.map(function(L) {
|
|
2506
|
+
return L.value;
|
|
2507
2507
|
}));
|
|
2508
|
-
Array.isArray(
|
|
2508
|
+
Array.isArray(H) || (H = [H]), s.push.apply(s, H.map(function(L) {
|
|
2509
2509
|
return {
|
|
2510
|
-
type: typeof
|
|
2511
|
-
value:
|
|
2510
|
+
type: typeof L == "string" ? I.literal : I.object,
|
|
2511
|
+
value: L
|
|
2512
2512
|
};
|
|
2513
2513
|
}));
|
|
2514
2514
|
}
|
|
2515
|
-
if (
|
|
2516
|
-
var
|
|
2517
|
-
if (!
|
|
2518
|
-
throw new
|
|
2519
|
-
s.push.apply(s,
|
|
2515
|
+
if (xe(u)) {
|
|
2516
|
+
var T = u.options[c] || u.options.other;
|
|
2517
|
+
if (!T)
|
|
2518
|
+
throw new ce(u.value, c, Object.keys(u.options), o);
|
|
2519
|
+
s.push.apply(s, V(T.value, t, n, r, i));
|
|
2520
2520
|
continue;
|
|
2521
2521
|
}
|
|
2522
|
-
if (
|
|
2523
|
-
var
|
|
2524
|
-
if (!
|
|
2522
|
+
if (Te(u)) {
|
|
2523
|
+
var T = u.options["=".concat(c)];
|
|
2524
|
+
if (!T) {
|
|
2525
2525
|
if (!Intl.PluralRules)
|
|
2526
|
-
throw new
|
|
2526
|
+
throw new P(`Intl.PluralRules is not available in this environment.
|
|
2527
2527
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
2528
|
-
`,
|
|
2529
|
-
var
|
|
2530
|
-
|
|
2528
|
+
`, R.MISSING_INTL_API, o);
|
|
2529
|
+
var D = n.getPluralRules(t, { type: u.pluralType }).select(c - (u.offset || 0));
|
|
2530
|
+
T = u.options[D] || u.options.other;
|
|
2531
2531
|
}
|
|
2532
|
-
if (!
|
|
2533
|
-
throw new
|
|
2534
|
-
s.push.apply(s,
|
|
2532
|
+
if (!T)
|
|
2533
|
+
throw new ce(u.value, c, Object.keys(u.options), o);
|
|
2534
|
+
s.push.apply(s, V(T.value, t, n, r, i, c - (u.offset || 0)));
|
|
2535
2535
|
continue;
|
|
2536
2536
|
}
|
|
2537
2537
|
}
|
|
2538
2538
|
return Rt(s);
|
|
2539
2539
|
}
|
|
2540
2540
|
function Pt(e, t) {
|
|
2541
|
-
return t ?
|
|
2542
|
-
return r
|
|
2541
|
+
return t ? m(m(m({}, e || {}), t || {}), Object.keys(e).reduce(function(n, r) {
|
|
2542
|
+
return n[r] = m(m({}, e[r]), t[r] || {}), n;
|
|
2543
2543
|
}, {})) : e;
|
|
2544
2544
|
}
|
|
2545
2545
|
function Lt(e, t) {
|
|
2546
|
-
return t ? Object.keys(e).reduce(function(
|
|
2547
|
-
return r
|
|
2548
|
-
},
|
|
2546
|
+
return t ? Object.keys(e).reduce(function(n, r) {
|
|
2547
|
+
return n[r] = Pt(e[r], t[r]), n;
|
|
2548
|
+
}, m({}, e)) : e;
|
|
2549
2549
|
}
|
|
2550
|
-
function
|
|
2550
|
+
function Z(e) {
|
|
2551
2551
|
return {
|
|
2552
2552
|
create: function() {
|
|
2553
2553
|
return {
|
|
2554
2554
|
get: function(t) {
|
|
2555
2555
|
return e[t];
|
|
2556
2556
|
},
|
|
2557
|
-
set: function(t,
|
|
2558
|
-
e[t] =
|
|
2557
|
+
set: function(t, n) {
|
|
2558
|
+
e[t] = n;
|
|
2559
2559
|
}
|
|
2560
2560
|
};
|
|
2561
2561
|
}
|
|
@@ -2567,71 +2567,71 @@ function Mt(e) {
|
|
|
2567
2567
|
dateTime: {},
|
|
2568
2568
|
pluralRules: {}
|
|
2569
2569
|
}), {
|
|
2570
|
-
getNumberFormat:
|
|
2571
|
-
for (var t,
|
|
2572
|
-
r
|
|
2573
|
-
return new ((t = Intl.NumberFormat).bind.apply(t,
|
|
2570
|
+
getNumberFormat: _(function() {
|
|
2571
|
+
for (var t, n = [], r = 0; r < arguments.length; r++)
|
|
2572
|
+
n[r] = arguments[r];
|
|
2573
|
+
return new ((t = Intl.NumberFormat).bind.apply(t, O([void 0], n, !1)))();
|
|
2574
2574
|
}, {
|
|
2575
|
-
cache:
|
|
2576
|
-
strategy:
|
|
2575
|
+
cache: Z(e.number),
|
|
2576
|
+
strategy: B.variadic
|
|
2577
2577
|
}),
|
|
2578
|
-
getDateTimeFormat:
|
|
2579
|
-
for (var t,
|
|
2580
|
-
r
|
|
2581
|
-
return new ((t = Intl.DateTimeFormat).bind.apply(t,
|
|
2578
|
+
getDateTimeFormat: _(function() {
|
|
2579
|
+
for (var t, n = [], r = 0; r < arguments.length; r++)
|
|
2580
|
+
n[r] = arguments[r];
|
|
2581
|
+
return new ((t = Intl.DateTimeFormat).bind.apply(t, O([void 0], n, !1)))();
|
|
2582
2582
|
}, {
|
|
2583
|
-
cache:
|
|
2584
|
-
strategy:
|
|
2583
|
+
cache: Z(e.dateTime),
|
|
2584
|
+
strategy: B.variadic
|
|
2585
2585
|
}),
|
|
2586
|
-
getPluralRules:
|
|
2587
|
-
for (var t,
|
|
2588
|
-
r
|
|
2589
|
-
return new ((t = Intl.PluralRules).bind.apply(t,
|
|
2586
|
+
getPluralRules: _(function() {
|
|
2587
|
+
for (var t, n = [], r = 0; r < arguments.length; r++)
|
|
2588
|
+
n[r] = arguments[r];
|
|
2589
|
+
return new ((t = Intl.PluralRules).bind.apply(t, O([void 0], n, !1)))();
|
|
2590
2590
|
}, {
|
|
2591
|
-
cache:
|
|
2592
|
-
strategy:
|
|
2591
|
+
cache: Z(e.pluralRules),
|
|
2592
|
+
strategy: B.variadic
|
|
2593
2593
|
})
|
|
2594
2594
|
};
|
|
2595
2595
|
}
|
|
2596
|
-
var
|
|
2596
|
+
var Me = (
|
|
2597
2597
|
/** @class */
|
|
2598
2598
|
function() {
|
|
2599
|
-
function e(t,
|
|
2600
|
-
|
|
2599
|
+
function e(t, n, r, i) {
|
|
2600
|
+
n === void 0 && (n = e.defaultLocale);
|
|
2601
2601
|
var a = this;
|
|
2602
2602
|
if (this.formatterCache = {
|
|
2603
2603
|
number: {},
|
|
2604
2604
|
dateTime: {},
|
|
2605
2605
|
pluralRules: {}
|
|
2606
|
-
}, this.format = function(
|
|
2607
|
-
var
|
|
2608
|
-
if (
|
|
2609
|
-
return
|
|
2610
|
-
var
|
|
2611
|
-
return !
|
|
2606
|
+
}, this.format = function(h) {
|
|
2607
|
+
var l = a.formatToParts(h);
|
|
2608
|
+
if (l.length === 1)
|
|
2609
|
+
return l[0].value;
|
|
2610
|
+
var u = l.reduce(function(f, c) {
|
|
2611
|
+
return !f.length || c.type !== I.literal || typeof f[f.length - 1] != "string" ? f.push(c.value) : f[f.length - 1] += c.value, f;
|
|
2612
2612
|
}, []);
|
|
2613
|
-
return
|
|
2614
|
-
}, this.formatToParts = function(
|
|
2615
|
-
return
|
|
2613
|
+
return u.length <= 1 ? u[0] || "" : u;
|
|
2614
|
+
}, this.formatToParts = function(h) {
|
|
2615
|
+
return V(a.ast, a.locales, a.formatters, a.formats, h, void 0, a.message);
|
|
2616
2616
|
}, this.resolvedOptions = function() {
|
|
2617
|
-
var
|
|
2617
|
+
var h;
|
|
2618
2618
|
return {
|
|
2619
|
-
locale: ((
|
|
2619
|
+
locale: ((h = a.resolvedLocale) === null || h === void 0 ? void 0 : h.toString()) || Intl.NumberFormat.supportedLocalesOf(a.locales)[0]
|
|
2620
2620
|
};
|
|
2621
2621
|
}, this.getAst = function() {
|
|
2622
2622
|
return a.ast;
|
|
2623
|
-
}, this.locales =
|
|
2623
|
+
}, this.locales = n, this.resolvedLocale = e.resolveLocale(n), typeof t == "string") {
|
|
2624
2624
|
if (this.message = t, !e.__parse)
|
|
2625
2625
|
throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
});
|
|
2626
|
+
var o = i || {};
|
|
2627
|
+
o.formatters;
|
|
2628
|
+
var s = Ze(o, ["formatters"]);
|
|
2629
|
+
this.ast = e.__parse(t, m(m({}, s), { locale: this.resolvedLocale }));
|
|
2630
2630
|
} else
|
|
2631
2631
|
this.ast = t;
|
|
2632
2632
|
if (!Array.isArray(this.ast))
|
|
2633
2633
|
throw new TypeError("A message must be provided as a String or AST.");
|
|
2634
|
-
this.formats = Lt(e.formats,
|
|
2634
|
+
this.formats = Lt(e.formats, r), this.formatters = i && i.formatters || Mt(this.formatterCache);
|
|
2635
2635
|
}
|
|
2636
2636
|
return Object.defineProperty(e, "defaultLocale", {
|
|
2637
2637
|
get: function() {
|
|
@@ -2641,10 +2641,10 @@ var Ce = (
|
|
|
2641
2641
|
configurable: !0
|
|
2642
2642
|
}), e.memoizedDefaultLocale = null, e.resolveLocale = function(t) {
|
|
2643
2643
|
if (!(typeof Intl.Locale > "u")) {
|
|
2644
|
-
var
|
|
2645
|
-
return
|
|
2644
|
+
var n = Intl.NumberFormat.supportedLocalesOf(t);
|
|
2645
|
+
return n.length > 0 ? new Intl.Locale(n[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]);
|
|
2646
2646
|
}
|
|
2647
|
-
}, e.__parse =
|
|
2647
|
+
}, e.__parse = xt, e.formats = {
|
|
2648
2648
|
number: {
|
|
2649
2649
|
integer: {
|
|
2650
2650
|
maximumFractionDigits: 0
|
|
@@ -2704,92 +2704,92 @@ var Ce = (
|
|
|
2704
2704
|
}
|
|
2705
2705
|
}, e;
|
|
2706
2706
|
}()
|
|
2707
|
-
),
|
|
2707
|
+
), S;
|
|
2708
2708
|
(function(e) {
|
|
2709
2709
|
e.FORMAT_ERROR = "FORMAT_ERROR", e.UNSUPPORTED_FORMATTER = "UNSUPPORTED_FORMATTER", e.INVALID_CONFIG = "INVALID_CONFIG", e.MISSING_DATA = "MISSING_DATA", e.MISSING_TRANSLATION = "MISSING_TRANSLATION";
|
|
2710
|
-
})(
|
|
2711
|
-
var
|
|
2710
|
+
})(S || (S = {}));
|
|
2711
|
+
var A = (
|
|
2712
2712
|
/** @class */
|
|
2713
2713
|
function(e) {
|
|
2714
|
-
|
|
2715
|
-
function t(
|
|
2714
|
+
N(t, e);
|
|
2715
|
+
function t(n, r, i) {
|
|
2716
2716
|
var a = this, o = i ? i instanceof Error ? i : new Error(String(i)) : void 0;
|
|
2717
|
-
return a = e.call(this, "[@formatjs/intl Error ".concat(
|
|
2717
|
+
return a = e.call(this, "[@formatjs/intl Error ".concat(n, "] ").concat(r, `
|
|
2718
2718
|
`).concat(o ? `
|
|
2719
2719
|
`.concat(o.message, `
|
|
2720
|
-
`).concat(o.stack) : "")) || this, a.code =
|
|
2720
|
+
`).concat(o.stack) : "")) || this, a.code = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(a, t), a;
|
|
2721
2721
|
}
|
|
2722
2722
|
return t;
|
|
2723
2723
|
}(Error)
|
|
2724
2724
|
), Ct = (
|
|
2725
2725
|
/** @class */
|
|
2726
2726
|
function(e) {
|
|
2727
|
-
|
|
2728
|
-
function t(
|
|
2729
|
-
return e.call(this,
|
|
2727
|
+
N(t, e);
|
|
2728
|
+
function t(n, r) {
|
|
2729
|
+
return e.call(this, S.UNSUPPORTED_FORMATTER, n, r) || this;
|
|
2730
2730
|
}
|
|
2731
2731
|
return t;
|
|
2732
|
-
}(
|
|
2733
|
-
),
|
|
2732
|
+
}(A)
|
|
2733
|
+
), wt = (
|
|
2734
2734
|
/** @class */
|
|
2735
2735
|
function(e) {
|
|
2736
|
-
|
|
2737
|
-
function t(
|
|
2738
|
-
return e.call(this,
|
|
2736
|
+
N(t, e);
|
|
2737
|
+
function t(n, r) {
|
|
2738
|
+
return e.call(this, S.INVALID_CONFIG, n, r) || this;
|
|
2739
2739
|
}
|
|
2740
2740
|
return t;
|
|
2741
|
-
}(
|
|
2742
|
-
),
|
|
2741
|
+
}(A)
|
|
2742
|
+
), me = (
|
|
2743
2743
|
/** @class */
|
|
2744
2744
|
function(e) {
|
|
2745
|
-
|
|
2746
|
-
function t(
|
|
2747
|
-
return e.call(this,
|
|
2745
|
+
N(t, e);
|
|
2746
|
+
function t(n, r) {
|
|
2747
|
+
return e.call(this, S.MISSING_DATA, n, r) || this;
|
|
2748
2748
|
}
|
|
2749
2749
|
return t;
|
|
2750
|
-
}(
|
|
2751
|
-
),
|
|
2750
|
+
}(A)
|
|
2751
|
+
), re = (
|
|
2752
2752
|
/** @class */
|
|
2753
2753
|
function(e) {
|
|
2754
|
-
|
|
2755
|
-
function t(
|
|
2756
|
-
return e.call(this,
|
|
2757
|
-
Locale: `).concat(
|
|
2754
|
+
N(t, e);
|
|
2755
|
+
function t(n, r, i) {
|
|
2756
|
+
return e.call(this, S.FORMAT_ERROR, "".concat(n, `
|
|
2757
|
+
Locale: `).concat(r, `
|
|
2758
2758
|
`), i) || this;
|
|
2759
2759
|
}
|
|
2760
2760
|
return t;
|
|
2761
|
-
}(
|
|
2762
|
-
),
|
|
2761
|
+
}(A)
|
|
2762
|
+
), W = (
|
|
2763
2763
|
/** @class */
|
|
2764
2764
|
function(e) {
|
|
2765
|
-
|
|
2766
|
-
function t(
|
|
2767
|
-
var o = e.call(this, "".concat(
|
|
2765
|
+
N(t, e);
|
|
2766
|
+
function t(n, r, i, a) {
|
|
2767
|
+
var o = e.call(this, "".concat(n, `
|
|
2768
2768
|
MessageID: `).concat(i == null ? void 0 : i.id, `
|
|
2769
2769
|
Default Message: `).concat(i == null ? void 0 : i.defaultMessage, `
|
|
2770
2770
|
Description: `).concat(i == null ? void 0 : i.description, `
|
|
2771
|
-
`),
|
|
2771
|
+
`), r, a) || this;
|
|
2772
2772
|
return o.descriptor = i, o;
|
|
2773
2773
|
}
|
|
2774
2774
|
return t;
|
|
2775
|
-
}(
|
|
2776
|
-
),
|
|
2775
|
+
}(re)
|
|
2776
|
+
), Dt = (
|
|
2777
2777
|
/** @class */
|
|
2778
2778
|
function(e) {
|
|
2779
|
-
|
|
2780
|
-
function t(
|
|
2781
|
-
var i = e.call(this,
|
|
2779
|
+
N(t, e);
|
|
2780
|
+
function t(n, r) {
|
|
2781
|
+
var i = e.call(this, S.MISSING_TRANSLATION, 'Missing message: "'.concat(n.id, '" for locale "').concat(r, '", using ').concat(n.defaultMessage ? "default message (".concat(typeof n.defaultMessage == "string" ? n.defaultMessage : n.defaultMessage.map(function(a) {
|
|
2782
2782
|
var o;
|
|
2783
2783
|
return (o = a.value) !== null && o !== void 0 ? o : JSON.stringify(a);
|
|
2784
2784
|
}).join(), ")") : "id", " as fallback.")) || this;
|
|
2785
|
-
return i.descriptor =
|
|
2785
|
+
return i.descriptor = n, i;
|
|
2786
2786
|
}
|
|
2787
2787
|
return t;
|
|
2788
|
-
}(
|
|
2788
|
+
}(A)
|
|
2789
2789
|
);
|
|
2790
|
-
function
|
|
2791
|
-
return
|
|
2792
|
-
return i in e ?
|
|
2790
|
+
function C(e, t, n) {
|
|
2791
|
+
return n === void 0 && (n = {}), t.reduce(function(r, i) {
|
|
2792
|
+
return i in e ? r[i] = e[i] : i in n && (r[i] = n[i]), r;
|
|
2793
2793
|
}, {});
|
|
2794
2794
|
}
|
|
2795
2795
|
var Ft = function(e) {
|
|
@@ -2806,7 +2806,7 @@ var Ft = function(e) {
|
|
|
2806
2806
|
onError: Ft,
|
|
2807
2807
|
onWarn: Gt
|
|
2808
2808
|
};
|
|
2809
|
-
function
|
|
2809
|
+
function Ce() {
|
|
2810
2810
|
return {
|
|
2811
2811
|
dateTime: {},
|
|
2812
2812
|
number: {},
|
|
@@ -2817,152 +2817,152 @@ function De() {
|
|
|
2817
2817
|
displayNames: {}
|
|
2818
2818
|
};
|
|
2819
2819
|
}
|
|
2820
|
-
function
|
|
2820
|
+
function M(e) {
|
|
2821
2821
|
return {
|
|
2822
2822
|
create: function() {
|
|
2823
2823
|
return {
|
|
2824
2824
|
get: function(t) {
|
|
2825
2825
|
return e[t];
|
|
2826
2826
|
},
|
|
2827
|
-
set: function(t,
|
|
2828
|
-
e[t] =
|
|
2827
|
+
set: function(t, n) {
|
|
2828
|
+
e[t] = n;
|
|
2829
2829
|
}
|
|
2830
2830
|
};
|
|
2831
2831
|
}
|
|
2832
2832
|
};
|
|
2833
2833
|
}
|
|
2834
2834
|
function jt(e) {
|
|
2835
|
-
e === void 0 && (e =
|
|
2836
|
-
var t = Intl.RelativeTimeFormat,
|
|
2835
|
+
e === void 0 && (e = Ce());
|
|
2836
|
+
var t = Intl.RelativeTimeFormat, n = Intl.ListFormat, r = Intl.DisplayNames, i = _(function() {
|
|
2837
2837
|
for (var s, h = [], l = 0; l < arguments.length; l++)
|
|
2838
2838
|
h[l] = arguments[l];
|
|
2839
|
-
return new ((s = Intl.DateTimeFormat).bind.apply(s,
|
|
2839
|
+
return new ((s = Intl.DateTimeFormat).bind.apply(s, O([void 0], h, !1)))();
|
|
2840
2840
|
}, {
|
|
2841
|
-
cache:
|
|
2842
|
-
strategy:
|
|
2843
|
-
}), a =
|
|
2841
|
+
cache: M(e.dateTime),
|
|
2842
|
+
strategy: B.variadic
|
|
2843
|
+
}), a = _(function() {
|
|
2844
2844
|
for (var s, h = [], l = 0; l < arguments.length; l++)
|
|
2845
2845
|
h[l] = arguments[l];
|
|
2846
|
-
return new ((s = Intl.NumberFormat).bind.apply(s,
|
|
2846
|
+
return new ((s = Intl.NumberFormat).bind.apply(s, O([void 0], h, !1)))();
|
|
2847
2847
|
}, {
|
|
2848
|
-
cache:
|
|
2849
|
-
strategy:
|
|
2850
|
-
}), o =
|
|
2848
|
+
cache: M(e.number),
|
|
2849
|
+
strategy: B.variadic
|
|
2850
|
+
}), o = _(function() {
|
|
2851
2851
|
for (var s, h = [], l = 0; l < arguments.length; l++)
|
|
2852
2852
|
h[l] = arguments[l];
|
|
2853
|
-
return new ((s = Intl.PluralRules).bind.apply(s,
|
|
2853
|
+
return new ((s = Intl.PluralRules).bind.apply(s, O([void 0], h, !1)))();
|
|
2854
2854
|
}, {
|
|
2855
|
-
cache:
|
|
2856
|
-
strategy:
|
|
2855
|
+
cache: M(e.pluralRules),
|
|
2856
|
+
strategy: B.variadic
|
|
2857
2857
|
});
|
|
2858
2858
|
return {
|
|
2859
2859
|
getDateTimeFormat: i,
|
|
2860
2860
|
getNumberFormat: a,
|
|
2861
|
-
getMessageFormat:
|
|
2862
|
-
return new
|
|
2861
|
+
getMessageFormat: _(function(s, h, l, u) {
|
|
2862
|
+
return new Me(s, h, l, m({ formatters: {
|
|
2863
2863
|
getNumberFormat: a,
|
|
2864
2864
|
getDateTimeFormat: i,
|
|
2865
2865
|
getPluralRules: o
|
|
2866
2866
|
} }, u || {}));
|
|
2867
2867
|
}, {
|
|
2868
|
-
cache:
|
|
2869
|
-
strategy:
|
|
2868
|
+
cache: M(e.message),
|
|
2869
|
+
strategy: B.variadic
|
|
2870
2870
|
}),
|
|
2871
|
-
getRelativeTimeFormat:
|
|
2871
|
+
getRelativeTimeFormat: _(function() {
|
|
2872
2872
|
for (var s = [], h = 0; h < arguments.length; h++)
|
|
2873
2873
|
s[h] = arguments[h];
|
|
2874
|
-
return new (t.bind.apply(t,
|
|
2874
|
+
return new (t.bind.apply(t, O([void 0], s, !1)))();
|
|
2875
2875
|
}, {
|
|
2876
|
-
cache:
|
|
2877
|
-
strategy:
|
|
2876
|
+
cache: M(e.relativeTime),
|
|
2877
|
+
strategy: B.variadic
|
|
2878
2878
|
}),
|
|
2879
2879
|
getPluralRules: o,
|
|
2880
|
-
getListFormat:
|
|
2880
|
+
getListFormat: _(function() {
|
|
2881
2881
|
for (var s = [], h = 0; h < arguments.length; h++)
|
|
2882
2882
|
s[h] = arguments[h];
|
|
2883
|
-
return new (
|
|
2883
|
+
return new (n.bind.apply(n, O([void 0], s, !1)))();
|
|
2884
2884
|
}, {
|
|
2885
|
-
cache:
|
|
2886
|
-
strategy:
|
|
2885
|
+
cache: M(e.list),
|
|
2886
|
+
strategy: B.variadic
|
|
2887
2887
|
}),
|
|
2888
|
-
getDisplayNames:
|
|
2888
|
+
getDisplayNames: _(function() {
|
|
2889
2889
|
for (var s = [], h = 0; h < arguments.length; h++)
|
|
2890
2890
|
s[h] = arguments[h];
|
|
2891
|
-
return new (
|
|
2891
|
+
return new (r.bind.apply(r, O([void 0], s, !1)))();
|
|
2892
2892
|
}, {
|
|
2893
|
-
cache:
|
|
2894
|
-
strategy:
|
|
2893
|
+
cache: M(e.displayNames),
|
|
2894
|
+
strategy: B.variadic
|
|
2895
2895
|
})
|
|
2896
2896
|
};
|
|
2897
2897
|
}
|
|
2898
|
-
function
|
|
2898
|
+
function ne(e, t, n, r) {
|
|
2899
2899
|
var i = e && e[t], a;
|
|
2900
|
-
if (i && (a = i[
|
|
2900
|
+
if (i && (a = i[n]), a)
|
|
2901
2901
|
return a;
|
|
2902
|
-
|
|
2902
|
+
r(new Ct("No ".concat(t, " format named: ").concat(n)));
|
|
2903
2903
|
}
|
|
2904
|
-
function Vt(e, t,
|
|
2905
|
-
if (
|
|
2906
|
-
throw new
|
|
2904
|
+
function Vt(e, t, n) {
|
|
2905
|
+
if (n === void 0 && (n = Error), !e)
|
|
2906
|
+
throw new n(t);
|
|
2907
2907
|
}
|
|
2908
|
-
function
|
|
2909
|
-
return Object.keys(e).reduce(function(
|
|
2910
|
-
return r
|
|
2908
|
+
function j(e, t) {
|
|
2909
|
+
return Object.keys(e).reduce(function(n, r) {
|
|
2910
|
+
return n[r] = m({ timeZone: t }, e[r]), n;
|
|
2911
2911
|
}, {});
|
|
2912
2912
|
}
|
|
2913
|
-
function
|
|
2914
|
-
var
|
|
2915
|
-
return
|
|
2916
|
-
return
|
|
2913
|
+
function ge(e, t) {
|
|
2914
|
+
var n = Object.keys(m(m({}, e), t));
|
|
2915
|
+
return n.reduce(function(r, i) {
|
|
2916
|
+
return r[i] = m(m({}, e[i] || {}), t[i] || {}), r;
|
|
2917
2917
|
}, {});
|
|
2918
2918
|
}
|
|
2919
|
-
function
|
|
2919
|
+
function pe(e, t) {
|
|
2920
2920
|
if (!t)
|
|
2921
2921
|
return e;
|
|
2922
|
-
var
|
|
2923
|
-
return
|
|
2924
|
-
}
|
|
2925
|
-
var
|
|
2926
|
-
var a = e.locale, o = e.formats, s = e.messages, h = e.defaultLocale, l = e.defaultFormats, u = e.fallbackOnEmptyString, f = e.onError, c = e.timeZone,
|
|
2927
|
-
|
|
2928
|
-
var
|
|
2929
|
-
Vt(!!
|
|
2930
|
-
var y = String(
|
|
2922
|
+
var n = Me.formats;
|
|
2923
|
+
return m(m(m({}, n), e), { date: ge(j(n.date, t), j(e.date || {}, t)), time: ge(j(n.time, t), j(e.time || {}, t)) });
|
|
2924
|
+
}
|
|
2925
|
+
var ve = function(e, t, n, r, i) {
|
|
2926
|
+
var a = e.locale, o = e.formats, s = e.messages, h = e.defaultLocale, l = e.defaultFormats, u = e.fallbackOnEmptyString, f = e.onError, c = e.timeZone, p = e.defaultRichTextElements;
|
|
2927
|
+
n === void 0 && (n = { id: "" });
|
|
2928
|
+
var b = n.id, E = n.defaultMessage;
|
|
2929
|
+
Vt(!!b, "[@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");
|
|
2930
|
+
var y = String(b), x = (
|
|
2931
2931
|
// In case messages is Object.create(null)
|
|
2932
2932
|
// e.g import('foo.json') from webpack)
|
|
2933
2933
|
// See https://github.com/formatjs/formatjs/issues/1914
|
|
2934
2934
|
s && Object.prototype.hasOwnProperty.call(s, y) && s[y]
|
|
2935
2935
|
);
|
|
2936
|
-
if (Array.isArray(
|
|
2937
|
-
return
|
|
2938
|
-
if (!
|
|
2939
|
-
return
|
|
2940
|
-
if (
|
|
2941
|
-
if (u === !1 &&
|
|
2942
|
-
return
|
|
2943
|
-
if ((!
|
|
2936
|
+
if (Array.isArray(x) && x.length === 1 && x[0].type === d.literal)
|
|
2937
|
+
return x[0].value;
|
|
2938
|
+
if (!r && x && typeof x == "string" && !p)
|
|
2939
|
+
return x.replace(/'\{(.*?)\}'/gi, "{$1}");
|
|
2940
|
+
if (r = m(m({}, p), r || {}), o = pe(o, c), l = pe(l, c), !x) {
|
|
2941
|
+
if (u === !1 && x === "")
|
|
2942
|
+
return x;
|
|
2943
|
+
if ((!E || a && a.toLowerCase() !== h.toLowerCase()) && f(new Dt(n, a)), E)
|
|
2944
2944
|
try {
|
|
2945
|
-
var
|
|
2946
|
-
return
|
|
2947
|
-
} catch (
|
|
2948
|
-
return f(new
|
|
2945
|
+
var H = t.getMessageFormat(E, h, l, i);
|
|
2946
|
+
return H.format(r);
|
|
2947
|
+
} catch (T) {
|
|
2948
|
+
return f(new W('Error formatting default message for: "'.concat(y, '", rendering default message verbatim'), a, n, T)), typeof E == "string" ? E : y;
|
|
2949
2949
|
}
|
|
2950
2950
|
return y;
|
|
2951
2951
|
}
|
|
2952
2952
|
try {
|
|
2953
|
-
var
|
|
2954
|
-
return
|
|
2955
|
-
} catch (
|
|
2956
|
-
f(new
|
|
2953
|
+
var H = t.getMessageFormat(x, a, o, m({ formatters: t }, i || {}));
|
|
2954
|
+
return H.format(r);
|
|
2955
|
+
} catch (T) {
|
|
2956
|
+
f(new W('Error formatting message: "'.concat(y, '", using ').concat(E ? "default message" : "id", " as fallback."), a, n, T));
|
|
2957
2957
|
}
|
|
2958
|
-
if (
|
|
2958
|
+
if (E)
|
|
2959
2959
|
try {
|
|
2960
|
-
var
|
|
2961
|
-
return
|
|
2962
|
-
} catch (
|
|
2963
|
-
f(new
|
|
2960
|
+
var H = t.getMessageFormat(E, h, l, i);
|
|
2961
|
+
return H.format(r);
|
|
2962
|
+
} catch (T) {
|
|
2963
|
+
f(new W('Error formatting the default message for: "'.concat(y, '", rendering message verbatim'), a, n, T));
|
|
2964
2964
|
}
|
|
2965
|
-
return typeof
|
|
2965
|
+
return typeof x == "string" ? x : typeof E == "string" ? E : y;
|
|
2966
2966
|
}, we = [
|
|
2967
2967
|
"formatMatcher",
|
|
2968
2968
|
"timeZone",
|
|
@@ -2984,64 +2984,64 @@ var Ee = function(e, t, r, n, i) {
|
|
|
2984
2984
|
"numberingSystem",
|
|
2985
2985
|
"fractionalSecondDigits"
|
|
2986
2986
|
];
|
|
2987
|
-
function
|
|
2987
|
+
function k(e, t, n, r) {
|
|
2988
2988
|
var i = e.locale, a = e.formats, o = e.onError, s = e.timeZone;
|
|
2989
|
-
|
|
2990
|
-
var h =
|
|
2991
|
-
return t === "time" && !u.hour && !u.minute && !u.second && !u.timeStyle && !u.dateStyle && (u =
|
|
2989
|
+
r === void 0 && (r = {});
|
|
2990
|
+
var h = r.format, l = m(m({}, s && { timeZone: s }), h && ne(a, t, h, o)), u = C(r, we, l);
|
|
2991
|
+
return t === "time" && !u.hour && !u.minute && !u.second && !u.timeStyle && !u.dateStyle && (u = m(m({}, u), { hour: "numeric", minute: "numeric" })), n(i, u);
|
|
2992
2992
|
}
|
|
2993
2993
|
function kt(e, t) {
|
|
2994
|
-
for (var
|
|
2995
|
-
r
|
|
2996
|
-
var i =
|
|
2994
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
|
2995
|
+
n[r - 2] = arguments[r];
|
|
2996
|
+
var i = n[0], a = n[1], o = a === void 0 ? {} : a, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
2997
2997
|
try {
|
|
2998
|
-
return
|
|
2998
|
+
return k(e, "date", t, o).format(s);
|
|
2999
2999
|
} catch (h) {
|
|
3000
|
-
e.onError(new
|
|
3000
|
+
e.onError(new A(S.FORMAT_ERROR, "Error formatting date.", h));
|
|
3001
3001
|
}
|
|
3002
3002
|
return String(s);
|
|
3003
3003
|
}
|
|
3004
3004
|
function Xt(e, t) {
|
|
3005
|
-
for (var
|
|
3006
|
-
r
|
|
3007
|
-
var i =
|
|
3005
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
|
3006
|
+
n[r - 2] = arguments[r];
|
|
3007
|
+
var i = n[0], a = n[1], o = a === void 0 ? {} : a, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
3008
3008
|
try {
|
|
3009
|
-
return
|
|
3009
|
+
return k(e, "time", t, o).format(s);
|
|
3010
3010
|
} catch (h) {
|
|
3011
|
-
e.onError(new
|
|
3011
|
+
e.onError(new A(S.FORMAT_ERROR, "Error formatting time.", h));
|
|
3012
3012
|
}
|
|
3013
3013
|
return String(s);
|
|
3014
3014
|
}
|
|
3015
3015
|
function Zt(e, t) {
|
|
3016
|
-
for (var
|
|
3017
|
-
r
|
|
3018
|
-
var i =
|
|
3016
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
|
3017
|
+
n[r - 2] = arguments[r];
|
|
3018
|
+
var i = n[0], a = n[1], o = n[2], s = o === void 0 ? {} : o, h = e.timeZone, l = e.locale, u = e.onError, f = C(s, we, h ? { timeZone: h } : {});
|
|
3019
3019
|
try {
|
|
3020
3020
|
return t(l, f).formatRange(i, a);
|
|
3021
3021
|
} catch (c) {
|
|
3022
|
-
u(new
|
|
3022
|
+
u(new A(S.FORMAT_ERROR, "Error formatting date time range.", c));
|
|
3023
3023
|
}
|
|
3024
3024
|
return String(i);
|
|
3025
3025
|
}
|
|
3026
3026
|
function Wt(e, t) {
|
|
3027
|
-
for (var
|
|
3028
|
-
r
|
|
3029
|
-
var i =
|
|
3027
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
|
3028
|
+
n[r - 2] = arguments[r];
|
|
3029
|
+
var i = n[0], a = n[1], o = a === void 0 ? {} : a, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
3030
3030
|
try {
|
|
3031
|
-
return
|
|
3031
|
+
return k(e, "date", t, o).formatToParts(s);
|
|
3032
3032
|
} catch (h) {
|
|
3033
|
-
e.onError(new
|
|
3033
|
+
e.onError(new A(S.FORMAT_ERROR, "Error formatting date.", h));
|
|
3034
3034
|
}
|
|
3035
3035
|
return [];
|
|
3036
3036
|
}
|
|
3037
3037
|
function zt(e, t) {
|
|
3038
|
-
for (var
|
|
3039
|
-
r
|
|
3040
|
-
var i =
|
|
3038
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
|
3039
|
+
n[r - 2] = arguments[r];
|
|
3040
|
+
var i = n[0], a = n[1], o = a === void 0 ? {} : a, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
3041
3041
|
try {
|
|
3042
|
-
return
|
|
3042
|
+
return k(e, "time", t, o).formatToParts(s);
|
|
3043
3043
|
} catch (h) {
|
|
3044
|
-
e.onError(new
|
|
3044
|
+
e.onError(new A(S.FORMAT_ERROR, "Error formatting time.", h));
|
|
3045
3045
|
}
|
|
3046
3046
|
return [];
|
|
3047
3047
|
}
|
|
@@ -3051,16 +3051,16 @@ var qt = [
|
|
|
3051
3051
|
"fallback",
|
|
3052
3052
|
"languageDisplay"
|
|
3053
3053
|
];
|
|
3054
|
-
function Jt(e, t,
|
|
3054
|
+
function Jt(e, t, n, r) {
|
|
3055
3055
|
var i = e.locale, a = e.onError, o = Intl.DisplayNames;
|
|
3056
|
-
o || a(new
|
|
3056
|
+
o || a(new P(`Intl.DisplayNames is not available in this environment.
|
|
3057
3057
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
3058
|
-
`,
|
|
3059
|
-
var s =
|
|
3058
|
+
`, R.MISSING_INTL_API));
|
|
3059
|
+
var s = C(r, qt);
|
|
3060
3060
|
try {
|
|
3061
|
-
return t(i, s).of(
|
|
3061
|
+
return t(i, s).of(n);
|
|
3062
3062
|
} catch (h) {
|
|
3063
|
-
a(new
|
|
3063
|
+
a(new A(S.FORMAT_ERROR, "Error formatting display name.", h));
|
|
3064
3064
|
}
|
|
3065
3065
|
}
|
|
3066
3066
|
var Qt = [
|
|
@@ -3070,24 +3070,24 @@ var Qt = [
|
|
|
3070
3070
|
function Yt(e) {
|
|
3071
3071
|
return "".concat(be, "_").concat(e, "_").concat(be);
|
|
3072
3072
|
}
|
|
3073
|
-
function $t(e, t,
|
|
3074
|
-
|
|
3075
|
-
var i =
|
|
3073
|
+
function $t(e, t, n, r) {
|
|
3074
|
+
r === void 0 && (r = {});
|
|
3075
|
+
var i = De(e, t, n, r).reduce(function(a, o) {
|
|
3076
3076
|
var s = o.value;
|
|
3077
3077
|
return typeof s != "string" ? a.push(s) : typeof a[a.length - 1] == "string" ? a[a.length - 1] += s : a.push(s), a;
|
|
3078
3078
|
}, []);
|
|
3079
3079
|
return i.length === 1 ? i[0] : i.length === 0 ? "" : i;
|
|
3080
3080
|
}
|
|
3081
|
-
function
|
|
3081
|
+
function De(e, t, n, r) {
|
|
3082
3082
|
var i = e.locale, a = e.onError;
|
|
3083
|
-
|
|
3083
|
+
r === void 0 && (r = {});
|
|
3084
3084
|
var o = Intl.ListFormat;
|
|
3085
|
-
o || a(new
|
|
3085
|
+
o || a(new P(`Intl.ListFormat is not available in this environment.
|
|
3086
3086
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
3087
|
-
`,
|
|
3088
|
-
var s =
|
|
3087
|
+
`, R.MISSING_INTL_API));
|
|
3088
|
+
var s = C(r, Qt);
|
|
3089
3089
|
try {
|
|
3090
|
-
var h = {}, l =
|
|
3090
|
+
var h = {}, l = n.map(function(u, f) {
|
|
3091
3091
|
if (typeof u == "object") {
|
|
3092
3092
|
var c = Yt(f);
|
|
3093
3093
|
return h[c] = u, c;
|
|
@@ -3095,46 +3095,46 @@ Try polyfilling it using "@formatjs/intl-listformat"
|
|
|
3095
3095
|
return String(u);
|
|
3096
3096
|
});
|
|
3097
3097
|
return t(i, s).formatToParts(l).map(function(u) {
|
|
3098
|
-
return u.type === "literal" ? u :
|
|
3098
|
+
return u.type === "literal" ? u : m(m({}, u), { value: h[u.value] || u.value });
|
|
3099
3099
|
});
|
|
3100
3100
|
} catch (u) {
|
|
3101
|
-
a(new
|
|
3101
|
+
a(new A(S.FORMAT_ERROR, "Error formatting list.", u));
|
|
3102
3102
|
}
|
|
3103
|
-
return
|
|
3103
|
+
return n;
|
|
3104
3104
|
}
|
|
3105
3105
|
var Kt = ["type"];
|
|
3106
|
-
function er(e, t,
|
|
3106
|
+
function er(e, t, n, r) {
|
|
3107
3107
|
var i = e.locale, a = e.onError;
|
|
3108
|
-
|
|
3108
|
+
r === void 0 && (r = {}), Intl.PluralRules || a(new P(`Intl.PluralRules is not available in this environment.
|
|
3109
3109
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3110
|
-
`,
|
|
3111
|
-
var o =
|
|
3110
|
+
`, R.MISSING_INTL_API));
|
|
3111
|
+
var o = C(r, Kt);
|
|
3112
3112
|
try {
|
|
3113
|
-
return t(i, o).select(
|
|
3113
|
+
return t(i, o).select(n);
|
|
3114
3114
|
} catch (s) {
|
|
3115
|
-
a(new
|
|
3115
|
+
a(new re("Error formatting plural.", i, s));
|
|
3116
3116
|
}
|
|
3117
3117
|
return "other";
|
|
3118
3118
|
}
|
|
3119
3119
|
var tr = ["numeric", "style"];
|
|
3120
|
-
function rr(e, t,
|
|
3121
|
-
var
|
|
3122
|
-
|
|
3123
|
-
var o =
|
|
3124
|
-
return t(
|
|
3120
|
+
function rr(e, t, n) {
|
|
3121
|
+
var r = e.locale, i = e.formats, a = e.onError;
|
|
3122
|
+
n === void 0 && (n = {});
|
|
3123
|
+
var o = n.format, s = !!o && ne(i, "relative", o, a) || {}, h = C(n, tr, s);
|
|
3124
|
+
return t(r, h);
|
|
3125
3125
|
}
|
|
3126
|
-
function nr(e, t,
|
|
3127
|
-
i === void 0 && (i = {}),
|
|
3126
|
+
function nr(e, t, n, r, i) {
|
|
3127
|
+
i === void 0 && (i = {}), r || (r = "second");
|
|
3128
3128
|
var a = Intl.RelativeTimeFormat;
|
|
3129
|
-
a || e.onError(new
|
|
3129
|
+
a || e.onError(new P(`Intl.RelativeTimeFormat is not available in this environment.
|
|
3130
3130
|
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
3131
|
-
`,
|
|
3131
|
+
`, R.MISSING_INTL_API));
|
|
3132
3132
|
try {
|
|
3133
|
-
return rr(e, t, i).format(
|
|
3133
|
+
return rr(e, t, i).format(n, r);
|
|
3134
3134
|
} catch (o) {
|
|
3135
|
-
e.onError(new
|
|
3135
|
+
e.onError(new re("Error formatting relative time.", e.locale, o));
|
|
3136
3136
|
}
|
|
3137
|
-
return String(
|
|
3137
|
+
return String(n);
|
|
3138
3138
|
}
|
|
3139
3139
|
var ir = [
|
|
3140
3140
|
"style",
|
|
@@ -3158,27 +3158,27 @@ var ir = [
|
|
|
3158
3158
|
"unitDisplay",
|
|
3159
3159
|
"numberingSystem"
|
|
3160
3160
|
];
|
|
3161
|
-
function
|
|
3162
|
-
var
|
|
3163
|
-
r === void 0 && (r = {});
|
|
3164
|
-
var o = r.format, s = o && ie(i, "number", o, a) || {}, h = D(r, ir, s);
|
|
3165
|
-
return t(n, h);
|
|
3166
|
-
}
|
|
3167
|
-
function ar(e, t, r, n) {
|
|
3161
|
+
function Fe(e, t, n) {
|
|
3162
|
+
var r = e.locale, i = e.formats, a = e.onError;
|
|
3168
3163
|
n === void 0 && (n = {});
|
|
3164
|
+
var o = n.format, s = o && ne(i, "number", o, a) || {}, h = C(n, ir, s);
|
|
3165
|
+
return t(r, h);
|
|
3166
|
+
}
|
|
3167
|
+
function ar(e, t, n, r) {
|
|
3168
|
+
r === void 0 && (r = {});
|
|
3169
3169
|
try {
|
|
3170
|
-
return
|
|
3170
|
+
return Fe(e, t, r).format(n);
|
|
3171
3171
|
} catch (i) {
|
|
3172
|
-
e.onError(new
|
|
3172
|
+
e.onError(new A(S.FORMAT_ERROR, "Error formatting number.", i));
|
|
3173
3173
|
}
|
|
3174
|
-
return String(
|
|
3174
|
+
return String(n);
|
|
3175
3175
|
}
|
|
3176
|
-
function or(e, t,
|
|
3177
|
-
|
|
3176
|
+
function or(e, t, n, r) {
|
|
3177
|
+
r === void 0 && (r = {});
|
|
3178
3178
|
try {
|
|
3179
|
-
return
|
|
3179
|
+
return Fe(e, t, r).formatToParts(n);
|
|
3180
3180
|
} catch (i) {
|
|
3181
|
-
e.onError(new
|
|
3181
|
+
e.onError(new A(S.FORMAT_ERROR, "Error formatting number.", i));
|
|
3182
3182
|
}
|
|
3183
3183
|
return [];
|
|
3184
3184
|
}
|
|
@@ -3192,69 +3192,69 @@ Please consider using "@formatjs/cli" to pre-compile your messages for performan
|
|
|
3192
3192
|
For more details see https://formatjs.io/docs/getting-started/message-distribution`);
|
|
3193
3193
|
}
|
|
3194
3194
|
function hr(e, t) {
|
|
3195
|
-
var
|
|
3196
|
-
return i ? !Intl.NumberFormat.supportedLocalesOf(i).length && o ? o(new
|
|
3197
|
-
formatters:
|
|
3198
|
-
formatNumber: ar.bind(null,
|
|
3199
|
-
formatNumberToParts: or.bind(null,
|
|
3200
|
-
formatRelativeTime: nr.bind(null,
|
|
3201
|
-
formatDate: kt.bind(null,
|
|
3202
|
-
formatDateToParts: Wt.bind(null,
|
|
3203
|
-
formatTime: Xt.bind(null,
|
|
3204
|
-
formatDateTimeRange: Zt.bind(null,
|
|
3205
|
-
formatTimeToParts: zt.bind(null,
|
|
3206
|
-
formatPlural: er.bind(null,
|
|
3195
|
+
var n = jt(t), r = m(m({}, Ut), e), i = r.locale, a = r.defaultLocale, o = r.onError;
|
|
3196
|
+
return i ? !Intl.NumberFormat.supportedLocalesOf(i).length && o ? o(new me('Missing locale data for locale: "'.concat(i, '" in Intl.NumberFormat. Using default locale: "').concat(a, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : !Intl.DateTimeFormat.supportedLocalesOf(i).length && o && o(new me('Missing locale data for locale: "'.concat(i, '" in Intl.DateTimeFormat. Using default locale: "').concat(a, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : (o && o(new wt('"locale" was not configured, using "'.concat(a, '" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))), r.locale = r.defaultLocale || "en"), ur(r), m(m({}, r), {
|
|
3197
|
+
formatters: n,
|
|
3198
|
+
formatNumber: ar.bind(null, r, n.getNumberFormat),
|
|
3199
|
+
formatNumberToParts: or.bind(null, r, n.getNumberFormat),
|
|
3200
|
+
formatRelativeTime: nr.bind(null, r, n.getRelativeTimeFormat),
|
|
3201
|
+
formatDate: kt.bind(null, r, n.getDateTimeFormat),
|
|
3202
|
+
formatDateToParts: Wt.bind(null, r, n.getDateTimeFormat),
|
|
3203
|
+
formatTime: Xt.bind(null, r, n.getDateTimeFormat),
|
|
3204
|
+
formatDateTimeRange: Zt.bind(null, r, n.getDateTimeFormat),
|
|
3205
|
+
formatTimeToParts: zt.bind(null, r, n.getDateTimeFormat),
|
|
3206
|
+
formatPlural: er.bind(null, r, n.getPluralRules),
|
|
3207
3207
|
// @ts-expect-error TODO: will get to this later
|
|
3208
|
-
formatMessage:
|
|
3208
|
+
formatMessage: ve.bind(null, r, n),
|
|
3209
3209
|
// @ts-expect-error TODO: will get to this later
|
|
3210
|
-
$t:
|
|
3211
|
-
formatList: $t.bind(null,
|
|
3212
|
-
formatListToParts:
|
|
3213
|
-
formatDisplayName: Jt.bind(null,
|
|
3210
|
+
$t: ve.bind(null, r, n),
|
|
3211
|
+
formatList: $t.bind(null, r, n.getListFormat),
|
|
3212
|
+
formatListToParts: De.bind(null, r, n.getListFormat),
|
|
3213
|
+
formatDisplayName: Jt.bind(null, r, n.getDisplayNames)
|
|
3214
3214
|
});
|
|
3215
3215
|
}
|
|
3216
|
-
var lr =
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
function
|
|
3216
|
+
var lr = F;
|
|
3217
|
+
F.flatten = F;
|
|
3218
|
+
F.unflatten = je;
|
|
3219
|
+
function Ge(e) {
|
|
3220
3220
|
return e && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
|
|
3221
3221
|
}
|
|
3222
|
-
function
|
|
3222
|
+
function Ue(e) {
|
|
3223
3223
|
return e;
|
|
3224
3224
|
}
|
|
3225
|
-
function
|
|
3225
|
+
function F(e, t) {
|
|
3226
3226
|
t = t || {};
|
|
3227
|
-
const
|
|
3227
|
+
const n = t.delimiter || ".", r = t.maxDepth, i = t.transformKey || Ue, a = {};
|
|
3228
3228
|
function o(s, h, l) {
|
|
3229
3229
|
l = l || 1, Object.keys(s).forEach(function(u) {
|
|
3230
|
-
const f = s[u], c = t.safe && Array.isArray(f),
|
|
3231
|
-
if (!c && !
|
|
3230
|
+
const f = s[u], c = t.safe && Array.isArray(f), p = Object.prototype.toString.call(f), b = Ge(f), E = p === "[object Object]" || p === "[object Array]", y = h ? h + n + i(u) : i(u);
|
|
3231
|
+
if (!c && !b && E && Object.keys(f).length && (!t.maxDepth || l < r))
|
|
3232
3232
|
return o(f, y, l + 1);
|
|
3233
3233
|
a[y] = f;
|
|
3234
3234
|
});
|
|
3235
3235
|
}
|
|
3236
3236
|
return o(e), a;
|
|
3237
3237
|
}
|
|
3238
|
-
function
|
|
3238
|
+
function je(e, t) {
|
|
3239
3239
|
t = t || {};
|
|
3240
|
-
const
|
|
3241
|
-
if (
|
|
3240
|
+
const n = t.delimiter || ".", r = t.overwrite || !1, i = t.transformKey || Ue, a = {};
|
|
3241
|
+
if (Ge(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
3242
3242
|
return e;
|
|
3243
3243
|
function s(u) {
|
|
3244
3244
|
const f = Number(u);
|
|
3245
3245
|
return isNaN(f) || u.indexOf(".") !== -1 || t.object ? u : f;
|
|
3246
3246
|
}
|
|
3247
3247
|
function h(u, f, c) {
|
|
3248
|
-
return Object.keys(c).reduce(function(
|
|
3249
|
-
return
|
|
3248
|
+
return Object.keys(c).reduce(function(p, b) {
|
|
3249
|
+
return p[u + n + b] = c[b], p;
|
|
3250
3250
|
}, f);
|
|
3251
3251
|
}
|
|
3252
3252
|
function l(u) {
|
|
3253
|
-
const f = Object.prototype.toString.call(u), c = f === "[object Array]",
|
|
3253
|
+
const f = Object.prototype.toString.call(u), c = f === "[object Array]", p = f === "[object Object]";
|
|
3254
3254
|
if (u) {
|
|
3255
3255
|
if (c)
|
|
3256
3256
|
return !u.length;
|
|
3257
|
-
if (
|
|
3257
|
+
if (p)
|
|
3258
3258
|
return !Object.keys(u).length;
|
|
3259
3259
|
} else
|
|
3260
3260
|
return !0;
|
|
@@ -3264,26 +3264,26 @@ function Ve(e, t) {
|
|
|
3264
3264
|
return !(c === "[object Object]" || c === "[object Array]") || l(e[f]) ? (u[f] = e[f], u) : h(
|
|
3265
3265
|
f,
|
|
3266
3266
|
u,
|
|
3267
|
-
|
|
3267
|
+
F(e[f], t)
|
|
3268
3268
|
);
|
|
3269
3269
|
}, {}), Object.keys(e).forEach(function(u) {
|
|
3270
|
-
const f = u.split(
|
|
3271
|
-
let c = s(f.shift()),
|
|
3272
|
-
for (;
|
|
3270
|
+
const f = u.split(n).map(i);
|
|
3271
|
+
let c = s(f.shift()), p = s(f[0]), b = a;
|
|
3272
|
+
for (; p !== void 0; ) {
|
|
3273
3273
|
if (c === "__proto__")
|
|
3274
3274
|
return;
|
|
3275
|
-
const
|
|
3276
|
-
if (!
|
|
3275
|
+
const E = Object.prototype.toString.call(b[c]), y = E === "[object Object]" || E === "[object Array]";
|
|
3276
|
+
if (!r && !y && typeof b[c] < "u")
|
|
3277
3277
|
return;
|
|
3278
|
-
(
|
|
3278
|
+
(r && !y || !r && b[c] == null) && (b[c] = typeof p == "number" && !t.object ? [] : {}), b = b[c], f.length > 0 && (c = s(f.shift()), p = s(f[0]));
|
|
3279
3279
|
}
|
|
3280
|
-
|
|
3280
|
+
b[c] = je(e[u], t);
|
|
3281
3281
|
}), a;
|
|
3282
3282
|
}
|
|
3283
|
-
const fr =
|
|
3284
|
-
let
|
|
3285
|
-
const gr = (e, t,
|
|
3286
|
-
const
|
|
3283
|
+
const fr = Ce();
|
|
3284
|
+
let Ve;
|
|
3285
|
+
const gr = (e, t, n = !1) => {
|
|
3286
|
+
const r = hr(
|
|
3287
3287
|
{
|
|
3288
3288
|
locale: e,
|
|
3289
3289
|
messages: lr.flatten(t, {
|
|
@@ -3293,18 +3293,18 @@ const gr = (e, t, r = !1) => {
|
|
|
3293
3293
|
},
|
|
3294
3294
|
fr
|
|
3295
3295
|
), s = {
|
|
3296
|
-
t: (h, l, u) =>
|
|
3297
|
-
te: (h) => !!
|
|
3298
|
-
tm: (h) =>
|
|
3299
|
-
...
|
|
3296
|
+
t: (h, l, u) => r.formatMessage({ id: h }, l, u),
|
|
3297
|
+
te: (h) => !!r.messages[h],
|
|
3298
|
+
tm: (h) => r.messages[h] || [],
|
|
3299
|
+
...r,
|
|
3300
3300
|
source: t
|
|
3301
3301
|
};
|
|
3302
|
-
return
|
|
3302
|
+
return n && (Ve = s), s;
|
|
3303
3303
|
};
|
|
3304
3304
|
function pr() {
|
|
3305
|
-
return
|
|
3305
|
+
return Ve;
|
|
3306
3306
|
}
|
|
3307
|
-
const cr = (e) =>
|
|
3307
|
+
const cr = (e) => ke({
|
|
3308
3308
|
name: "I18nT",
|
|
3309
3309
|
props: {
|
|
3310
3310
|
keypath: {
|
|
@@ -3316,28 +3316,28 @@ const cr = (e) => Xe({
|
|
|
3316
3316
|
default: "span"
|
|
3317
3317
|
}
|
|
3318
3318
|
},
|
|
3319
|
-
setup(t, { slots:
|
|
3320
|
-
const
|
|
3319
|
+
setup(t, { slots: n }) {
|
|
3320
|
+
const r = (i) => {
|
|
3321
3321
|
if (!i)
|
|
3322
3322
|
return [];
|
|
3323
3323
|
const a = /(\{[^}]+\})/g;
|
|
3324
3324
|
return i.split(a).filter(Boolean);
|
|
3325
3325
|
};
|
|
3326
3326
|
return () => {
|
|
3327
|
-
const i = Object.keys(
|
|
3328
|
-
let o =
|
|
3327
|
+
const i = Object.keys(n).filter((s) => s !== "_"), a = e.messages[t.keypath].toString();
|
|
3328
|
+
let o = r(a);
|
|
3329
3329
|
return o = o.filter((s) => s !== ""), o.forEach((s, h) => {
|
|
3330
3330
|
if (!s.startsWith("{") && !s.endsWith("}"))
|
|
3331
3331
|
return;
|
|
3332
3332
|
const l = s.replace(/[\{\}]/g, "");
|
|
3333
|
-
l === "0" &&
|
|
3334
|
-
}),
|
|
3333
|
+
l === "0" && n.default ? o[h] = n.default() : i.includes(l) && n[l] && (o[h] = n[l]());
|
|
3334
|
+
}), Xe(t.tag, t, o);
|
|
3335
3335
|
};
|
|
3336
3336
|
}
|
|
3337
3337
|
}), vr = {
|
|
3338
3338
|
install(e, t) {
|
|
3339
|
-
const { i18n:
|
|
3340
|
-
e.component("I18nT", cr(
|
|
3339
|
+
const { i18n: n } = t;
|
|
3340
|
+
e.component("I18nT", cr(n));
|
|
3341
3341
|
}
|
|
3342
3342
|
};
|
|
3343
3343
|
export {
|