@intlify/core 12.0.0-alpha.5 → 12.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.esm-browser.js +177 -144
- package/dist/core.esm-browser.prod.js +467 -429
- package/dist/core.global.js +178 -142
- package/dist/core.global.prod.js +294 -256
- package/dist/core.js +1 -1
- package/dist/core.node.js +1 -1
- package/dist/core.runtime.esm-browser.js +177 -149
- package/dist/core.runtime.esm-browser.prod.js +327 -290
- package/dist/core.runtime.global.js +178 -147
- package/dist/core.runtime.global.prod.js +309 -271
- package/dist/core.runtime.js +1 -5
- package/dist/core.runtime.node.js +1 -5
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @intlify/core v12.0.0-alpha.
|
|
2
|
+
* @intlify/core v12.0.0-alpha.6
|
|
3
3
|
* (c) 2016-present kazuya kawaguchi and contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/ const e = /\{([0-9a-z]+)\}/gi;
|
|
@@ -21,31 +21,31 @@ function p(e, t) {
|
|
|
21
21
|
function m(e) {
|
|
22
22
|
return f(Object.prototype, e);
|
|
23
23
|
}
|
|
24
|
-
const h = Array.isArray, g = (e) => typeof e == `function`, _ = (e) => typeof e == `string`, v = (e) => typeof e == `boolean`, y = (e) => typeof e == `object` && !!e, b = (e) => y(e) && g(e.then) && g(e.catch), x = Object.prototype.toString, S = (e) => x.call(e), C = (e) => S(e) === `[object Object]`,
|
|
25
|
-
function
|
|
24
|
+
const h = Array.isArray, g = (e) => typeof e == `function`, _ = (e) => typeof e == `string`, v = (e) => typeof e == `boolean`, y = (e) => typeof e == `object` && !!e, b = (e) => y(e) && g(e.then) && g(e.catch), x = Object.prototype.toString, S = (e) => x.call(e), C = (e) => S(e) === `[object Object]`, w = (e) => e == null ? `` : h(e) || C(e) && e.toString === x ? JSON.stringify(e, null, 2) : String(e);
|
|
25
|
+
function T(e, t = ``) {
|
|
26
26
|
return e.reduce((e, n, r) => r === 0 ? e + n : e + t + n, ``);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function E(e, t) {
|
|
29
29
|
typeof console < `u` && (console.warn(`[intlify] ` + e), t && console.warn(t.stack));
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function D(e) {
|
|
32
32
|
return e.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`).replace(/\//g, `/`).replace(/=/g, `=`);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ee(e) {
|
|
35
35
|
return e.replace(/&(?![a-z0-9#]{2,6};)/gi, `&`).replace(/"/g, `"`).replace(/'/g, `'`).replace(/</g, `<`).replace(/>/g, `>`);
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
function
|
|
37
|
+
const te = /^javascript:/i, ne = /^(?:href|src|action|formaction)$/i, re = /&#(?:x([0-9a-f]+)|(\d+));?/gi, O = /&(?:Tab|NewLine);/g, ie = /:?/gi, ae = /[\u0000-\u0020\u007f-\u009f]/g, oe = /(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i, k = /(^|[\s"'<>/])on(\w+\s*=)/gi, se = /(?:^|[\s"'<>/])srcdoc\s*=/i, ce = /(^|[\s"'<>/])s(rcdoc\s*=)/gi, le = /(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;
|
|
38
|
+
function ue(e, t, n) {
|
|
39
39
|
let r = t || n;
|
|
40
40
|
if (!r) return e;
|
|
41
41
|
let i = Number.parseInt(r, t ? 16 : 10);
|
|
42
42
|
return i <= 127 ? String.fromCharCode(i) : e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
let t = e.replace(
|
|
46
|
-
return
|
|
44
|
+
function A(e) {
|
|
45
|
+
let t = e.replace(re, ue).replace(O, ``).replace(ie, `:`).replace(ae, ``);
|
|
46
|
+
return te.test(t);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function de(e) {
|
|
49
49
|
let t = /url\s*\(/gi, n = ``, r = 0, i;
|
|
50
50
|
for (; (i = t.exec(e)) !== null;) {
|
|
51
51
|
let a = i.index, o = t.lastIndex - 1, s = o + 1, c = 1, l = null;
|
|
@@ -61,19 +61,19 @@ function le(e) {
|
|
|
61
61
|
}
|
|
62
62
|
if (c !== 0) break;
|
|
63
63
|
let u = e.slice(o + 1, s).trim(), d = u.startsWith(`"`) && u.endsWith(`"`) || u.startsWith(`'`) && u.endsWith(`'`) ? u.slice(1, -1).trim() : u;
|
|
64
|
-
n += e.slice(r, a), n +=
|
|
64
|
+
n += e.slice(r, a), n += A(d) ? `url(about:blank)` : e.slice(a, s + 1), r = s + 1;
|
|
65
65
|
}
|
|
66
66
|
return n + e.slice(r);
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
68
|
+
function j(e, t) {
|
|
69
|
+
return ne.test(e) && A(t) ? `about:blank` : ee(e.toLowerCase() === `style` ? de(t) : t);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
return e = e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g, (e, t, n) => `${t}="${
|
|
71
|
+
function fe(e) {
|
|
72
|
+
return e = e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g, (e, t, n) => `${t}="${j(t, n)}"`), e = e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g, (e, t, n) => `${t}='${j(t, n)}'`), oe.test(e) && (e = e.replace(k, `$1on$2`)), se.test(e) && (e = e.replace(ce, `$1s$2`)), e = e.replace(le, (e, t, n, r) => A(r) ? `${t}${n}about:blank` : e), e;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
function
|
|
76
|
-
if (
|
|
74
|
+
const M = (e) => !y(e) || h(e);
|
|
75
|
+
function pe(e, t) {
|
|
76
|
+
if (M(e) || M(t) || t === Object.prototype) throw Error(`Invalid value`);
|
|
77
77
|
let n = [e, t];
|
|
78
78
|
for (; n.length;) {
|
|
79
79
|
let e = n.pop(), t = n.pop(), r = Object.keys(t);
|
|
@@ -95,21 +95,21 @@ function de(e, t) {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function me(e, t, n) {
|
|
99
99
|
return {
|
|
100
100
|
line: e,
|
|
101
101
|
column: t,
|
|
102
102
|
offset: n
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function he(e, t, n) {
|
|
106
106
|
let r = {
|
|
107
107
|
start: e,
|
|
108
108
|
end: t
|
|
109
109
|
};
|
|
110
110
|
return n != null && (r.source = n), r;
|
|
111
111
|
}
|
|
112
|
-
const
|
|
112
|
+
const N = {
|
|
113
113
|
EXPECTED_TOKEN: 1,
|
|
114
114
|
INVALID_TOKEN_IN_PLACEHOLDER: 2,
|
|
115
115
|
UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
|
|
@@ -127,30 +127,30 @@ const F = {
|
|
|
127
127
|
UNHANDLED_CODEGEN_NODE_TYPE: 15,
|
|
128
128
|
UNHANDLED_MINIFIER_NODE_TYPE: 16
|
|
129
129
|
};
|
|
130
|
-
|
|
131
|
-
function
|
|
130
|
+
N.EXPECTED_TOKEN, N.INVALID_TOKEN_IN_PLACEHOLDER, N.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, N.UNKNOWN_ESCAPE_SEQUENCE, N.INVALID_UNICODE_ESCAPE_SEQUENCE, N.UNBALANCED_CLOSING_BRACE, N.UNTERMINATED_CLOSING_BRACE, N.EMPTY_PLACEHOLDER, N.NOT_ALLOW_NEST_PLACEHOLDER, N.INVALID_LINKED_FORMAT, N.MUST_HAVE_MESSAGES_IN_PLURAL, N.UNEXPECTED_EMPTY_LINKED_MODIFIER, N.UNEXPECTED_EMPTY_LINKED_KEY, N.UNEXPECTED_LEXICAL_ANALYSIS, N.UNHANDLED_CODEGEN_NODE_TYPE, N.UNHANDLED_MINIFIER_NODE_TYPE;
|
|
131
|
+
function P(e, t, n = {}) {
|
|
132
132
|
let { domain: r, messages: i, args: a } = n, o = SyntaxError(String(e));
|
|
133
133
|
return o.code = e, t && (o.location = t), o.domain = r, o;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function F(e) {
|
|
136
136
|
throw e;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function I(e) {
|
|
139
139
|
switch (e.t = e.type, e.type) {
|
|
140
140
|
case 0: {
|
|
141
141
|
let t = e;
|
|
142
|
-
|
|
142
|
+
I(t.body), t.b = t.body, delete t.body;
|
|
143
143
|
break;
|
|
144
144
|
}
|
|
145
145
|
case 1: {
|
|
146
146
|
let t = e, n = t.cases;
|
|
147
|
-
for (let e = 0; e < n.length; e++)
|
|
147
|
+
for (let e = 0; e < n.length; e++) I(n[e]);
|
|
148
148
|
t.c = n, delete t.cases;
|
|
149
149
|
break;
|
|
150
150
|
}
|
|
151
151
|
case 2: {
|
|
152
152
|
let t = e, n = t.items;
|
|
153
|
-
for (let e = 0; e < n.length; e++)
|
|
153
|
+
for (let e = 0; e < n.length; e++) I(n[e]);
|
|
154
154
|
t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
|
|
155
155
|
break;
|
|
156
156
|
}
|
|
@@ -164,7 +164,7 @@ function L(e) {
|
|
|
164
164
|
}
|
|
165
165
|
case 6: {
|
|
166
166
|
let t = e;
|
|
167
|
-
|
|
167
|
+
I(t.key), t.k = t.key, delete t.key, t.modifier && (I(t.modifier), t.m = t.modifier, delete t.modifier);
|
|
168
168
|
break;
|
|
169
169
|
}
|
|
170
170
|
case 5: {
|
|
@@ -180,11 +180,11 @@ function L(e) {
|
|
|
180
180
|
}
|
|
181
181
|
delete e.type;
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function L(e) {
|
|
184
184
|
let t = e.body;
|
|
185
|
-
return t.type === 2 ?
|
|
185
|
+
return t.type === 2 ? R(t) : t.cases.forEach((e) => R(e)), e;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function R(e) {
|
|
188
188
|
if (e.items.length === 1) {
|
|
189
189
|
let t = e.items[0];
|
|
190
190
|
(t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
|
|
@@ -196,7 +196,7 @@ function z(e) {
|
|
|
196
196
|
t.push(r.value);
|
|
197
197
|
}
|
|
198
198
|
if (t.length === e.items.length) {
|
|
199
|
-
e.static =
|
|
199
|
+
e.static = T(t);
|
|
200
200
|
for (let t = 0; t < e.items.length; t++) {
|
|
201
201
|
let n = e.items[t];
|
|
202
202
|
(n.type === 3 || n.type === 9) && delete n.value;
|
|
@@ -204,7 +204,7 @@ function z(e) {
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function ge(e) {
|
|
208
208
|
let t = e, n = 0, r = 1, i = 1, a = 0, o = (e) => t[e] === `\r` && t[e + 1] === `
|
|
209
209
|
`, s = (e) => t[e] === `
|
|
210
210
|
`, c = (e) => t[e] === `\u2029`, l = (e) => t[e] === `\u2028`, u = (e) => o(e) || s(e) || c(e) || l(e), d = () => n, f = () => r, p = () => i, m = () => a, h = (e) => o(e) || c(e) || l(e) ? `
|
|
@@ -241,8 +241,8 @@ function he(e) {
|
|
|
241
241
|
skipToPeek: S
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
let n = t.location !== !1, r =
|
|
244
|
+
function _e(e, t = {}) {
|
|
245
|
+
let n = t.location !== !1, r = ge(e), i = () => r.index(), a = () => me(r.line(), r.column(), r.index()), o = a(), s = i(), c = {
|
|
246
246
|
currentType: 13,
|
|
247
247
|
offset: s,
|
|
248
248
|
startLoc: o,
|
|
@@ -258,11 +258,11 @@ function ge(e, t = {}) {
|
|
|
258
258
|
function d(e, t, r) {
|
|
259
259
|
e.endLoc = a(), e.currentType = t;
|
|
260
260
|
let i = { type: t };
|
|
261
|
-
return n && (i.loc =
|
|
261
|
+
return n && (i.loc = he(e.startLoc, e.endLoc)), r != null && (i.value = r), i;
|
|
262
262
|
}
|
|
263
263
|
let f = (e) => d(e, 13);
|
|
264
264
|
function p(e, t) {
|
|
265
|
-
return e.currentChar() === t ? (e.next(), t) : (
|
|
265
|
+
return e.currentChar() === t ? (e.next(), t) : (N.EXPECTED_TOKEN, a(), ``);
|
|
266
266
|
}
|
|
267
267
|
function m(e) {
|
|
268
268
|
let t = ``;
|
|
@@ -326,22 +326,22 @@ function ge(e, t = {}) {
|
|
|
326
326
|
let r = e.currentPeek() === `:`;
|
|
327
327
|
return e.resetPeek(), r;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function w(e, t) {
|
|
330
330
|
let { currentType: n } = t;
|
|
331
331
|
if (n !== 9) return !1;
|
|
332
332
|
let r = () => {
|
|
333
333
|
let t = e.currentPeek();
|
|
334
334
|
return t === `{` ? g(e.peek()) : t === `@` || t === `|` || t === `:` || t === `.` || t === ` ` || !t ? !1 : t === `
|
|
335
|
-
` ? (e.peek(), r()) :
|
|
335
|
+
` ? (e.peek(), r()) : E(e, !1);
|
|
336
336
|
}, i = r();
|
|
337
337
|
return e.resetPeek(), i;
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function T(e) {
|
|
340
340
|
m(e);
|
|
341
341
|
let t = e.currentPeek() === `|`;
|
|
342
342
|
return e.resetPeek(), t;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function E(e, t = !0) {
|
|
345
345
|
let n = (t = !1, r = ``) => {
|
|
346
346
|
let i = e.currentPeek();
|
|
347
347
|
return i === `{` || i === `@` || !i ? t : i === `|` ? r !== ` ` && r !== `
|
|
@@ -351,44 +351,44 @@ function ge(e, t = {}) {
|
|
|
351
351
|
}, r = n();
|
|
352
352
|
return t && e.resetPeek(), r;
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function D(e, t) {
|
|
355
355
|
let n = e.currentChar();
|
|
356
356
|
if (n !== void 0) return t(n) ? (e.next(), n) : null;
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function ee(e) {
|
|
359
359
|
let t = e.charCodeAt(0);
|
|
360
360
|
return t >= 97 && t <= 122 || t >= 65 && t <= 90 || t >= 48 && t <= 57 || t === 95 || t === 36;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
363
|
-
return
|
|
362
|
+
function te(e) {
|
|
363
|
+
return D(e, ee);
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function ne(e) {
|
|
366
366
|
let t = e.charCodeAt(0);
|
|
367
367
|
return t >= 97 && t <= 122 || t >= 65 && t <= 90 || t >= 48 && t <= 57 || t === 95 || t === 36 || t === 45;
|
|
368
368
|
}
|
|
369
|
-
function ne(e) {
|
|
370
|
-
return E(e, O);
|
|
371
|
-
}
|
|
372
369
|
function re(e) {
|
|
370
|
+
return D(e, ne);
|
|
371
|
+
}
|
|
372
|
+
function O(e) {
|
|
373
373
|
let t = e.charCodeAt(0);
|
|
374
374
|
return t >= 48 && t <= 57;
|
|
375
375
|
}
|
|
376
376
|
function ie(e) {
|
|
377
|
-
return
|
|
377
|
+
return D(e, O);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function ae(e) {
|
|
380
380
|
let t = e.charCodeAt(0);
|
|
381
381
|
return t >= 48 && t <= 57 || t >= 65 && t <= 70 || t >= 97 && t <= 102;
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
383
|
+
function oe(e) {
|
|
384
|
+
return D(e, ae);
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function k(e) {
|
|
387
387
|
let t = ``, n = ``;
|
|
388
388
|
for (; t = ie(e);) n += t;
|
|
389
389
|
return n;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function se(e) {
|
|
392
392
|
let t = ``;
|
|
393
393
|
for (;;) {
|
|
394
394
|
let n = e.currentChar();
|
|
@@ -398,152 +398,152 @@ function ge(e, t = {}) {
|
|
|
398
398
|
} else if (n === `{` || n === `}` || n === `@` || n === `|` || !n) break;
|
|
399
399
|
else if (n === ` ` || n === `
|
|
400
400
|
`) {
|
|
401
|
-
if (
|
|
402
|
-
else if (
|
|
401
|
+
if (E(e)) t += n, e.next();
|
|
402
|
+
else if (T(e)) break;
|
|
403
403
|
else t += n, e.next();
|
|
404
404
|
} else t += n, e.next();
|
|
405
405
|
}
|
|
406
406
|
return t;
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function ce(e) {
|
|
409
409
|
h(e);
|
|
410
410
|
let t = ``, n = ``;
|
|
411
|
-
for (; t =
|
|
411
|
+
for (; t = re(e);) n += t;
|
|
412
412
|
let r = e.currentChar();
|
|
413
413
|
if (r && r !== `}` && r !== void 0 && r !== ` ` && r !== `
|
|
414
414
|
` && r !== ` `) {
|
|
415
|
-
let t =
|
|
416
|
-
return
|
|
415
|
+
let t = M(e);
|
|
416
|
+
return N.INVALID_TOKEN_IN_PLACEHOLDER, a(), n + t, n + t;
|
|
417
417
|
}
|
|
418
|
-
return e.currentChar() === void 0 && (
|
|
418
|
+
return e.currentChar() === void 0 && (N.UNTERMINATED_CLOSING_BRACE, a()), n;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function le(e) {
|
|
421
421
|
h(e);
|
|
422
422
|
let t = ``;
|
|
423
|
-
return e.currentChar() === `-` ? (e.next(), t += `-${
|
|
423
|
+
return e.currentChar() === `-` ? (e.next(), t += `-${k(e)}`) : t += k(e), e.currentChar() === void 0 && (N.UNTERMINATED_CLOSING_BRACE, a()), t;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function ue(e) {
|
|
426
426
|
return e !== `'` && e !== `
|
|
427
427
|
`;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function A(e) {
|
|
430
430
|
h(e), p(e, `'`);
|
|
431
431
|
let t = ``, n = ``;
|
|
432
|
-
for (; t =
|
|
432
|
+
for (; t = D(e, ue);) n += t === `\\` ? de(e) : t;
|
|
433
433
|
let r = e.currentChar();
|
|
434
434
|
return r === `
|
|
435
|
-
` || r === void 0 ? (
|
|
435
|
+
` || r === void 0 ? (N.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), r === `
|
|
436
436
|
` && (e.next(), p(e, `'`)), n) : (p(e, `'`), n);
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function de(e) {
|
|
439
439
|
let t = e.currentChar();
|
|
440
440
|
switch (t) {
|
|
441
441
|
case `\\`:
|
|
442
442
|
case `'`: return e.next(), `\\${t}`;
|
|
443
|
-
case `u`: return
|
|
444
|
-
case `U`: return
|
|
445
|
-
default: return
|
|
443
|
+
case `u`: return j(e, t, 4);
|
|
444
|
+
case `U`: return j(e, t, 6);
|
|
445
|
+
default: return N.UNKNOWN_ESCAPE_SEQUENCE, a(), ``;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function j(e, t, n) {
|
|
449
449
|
p(e, t);
|
|
450
450
|
let r = ``;
|
|
451
451
|
for (let i = 0; i < n; i++) {
|
|
452
|
-
let n =
|
|
452
|
+
let n = oe(e);
|
|
453
453
|
if (!n) {
|
|
454
|
-
|
|
454
|
+
N.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), `${t}${r}${e.currentChar()}`;
|
|
455
455
|
break;
|
|
456
456
|
}
|
|
457
457
|
r += n;
|
|
458
458
|
}
|
|
459
459
|
return `\\${t}${r}`;
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function fe(e) {
|
|
462
462
|
return e !== `{` && e !== `}` && e !== ` ` && e !== `
|
|
463
463
|
`;
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function M(e) {
|
|
466
466
|
h(e);
|
|
467
467
|
let t = ``, n = ``;
|
|
468
|
-
for (; t =
|
|
468
|
+
for (; t = D(e, fe);) n += t;
|
|
469
469
|
return n;
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function pe(e) {
|
|
472
472
|
let t = ``, n = ``;
|
|
473
|
-
for (; t =
|
|
473
|
+
for (; t = te(e);) n += t;
|
|
474
474
|
return n;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function P(e) {
|
|
477
477
|
let t = (n) => {
|
|
478
478
|
let r = e.currentChar();
|
|
479
479
|
return r === `{` || r === `@` || r === `|` || r === `(` || r === `)` || !r || r === ` ` ? n : (n += r, e.next(), t(n));
|
|
480
480
|
};
|
|
481
481
|
return t(``);
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function F(e) {
|
|
484
484
|
h(e);
|
|
485
485
|
let t = p(e, `|`);
|
|
486
486
|
return h(e), t;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function I(e, t) {
|
|
489
489
|
let n = null;
|
|
490
490
|
switch (e.currentChar()) {
|
|
491
|
-
case `{`: return t.braceNest >= 1 && (
|
|
492
|
-
case `}`: return t.braceNest > 0 && t.currentType === 2 && (
|
|
493
|
-
case `@`: return t.braceNest > 0 && (
|
|
491
|
+
case `{`: return t.braceNest >= 1 && (N.NOT_ALLOW_NEST_PLACEHOLDER, a()), e.next(), n = d(t, 2, `{`), h(e), t.braceNest++, n;
|
|
492
|
+
case `}`: return t.braceNest > 0 && t.currentType === 2 && (N.EMPTY_PLACEHOLDER, a()), e.next(), n = d(t, 3, `}`), t.braceNest--, t.braceNest > 0 && h(e), t.inLinked && t.braceNest === 0 && (t.inLinked = !1), n;
|
|
493
|
+
case `@`: return t.braceNest > 0 && (N.UNTERMINATED_CLOSING_BRACE, a()), n = L(e, t) || f(t), t.braceNest = 0, n;
|
|
494
494
|
default: {
|
|
495
495
|
let r = !0, i = !0, o = !0;
|
|
496
|
-
if (
|
|
497
|
-
if (t.braceNest > 0 && (t.currentType === 4 || t.currentType === 5 || t.currentType === 6)) return
|
|
498
|
-
if (r = v(e, t)) return n = d(t, 4,
|
|
499
|
-
if (i = y(e, t)) return n = d(t, 5,
|
|
500
|
-
if (o = b(e, t)) return n = d(t, 6,
|
|
501
|
-
if (!r && !i && !o) return n = d(t, 12,
|
|
496
|
+
if (T(e)) return t.braceNest > 0 && (N.UNTERMINATED_CLOSING_BRACE, a()), n = d(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
|
|
497
|
+
if (t.braceNest > 0 && (t.currentType === 4 || t.currentType === 5 || t.currentType === 6)) return N.UNTERMINATED_CLOSING_BRACE, a(), t.braceNest = 0, R(e, t);
|
|
498
|
+
if (r = v(e, t)) return n = d(t, 4, ce(e)), h(e), n;
|
|
499
|
+
if (i = y(e, t)) return n = d(t, 5, le(e)), h(e), n;
|
|
500
|
+
if (o = b(e, t)) return n = d(t, 6, A(e)), h(e), n;
|
|
501
|
+
if (!r && !i && !o) return n = d(t, 12, M(e)), N.INVALID_TOKEN_IN_PLACEHOLDER, a(), n.value, h(e), n;
|
|
502
502
|
break;
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
return n;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function L(e, t) {
|
|
508
508
|
let { currentType: n } = t, r = null, i = e.currentChar();
|
|
509
509
|
switch ((n === 7 || n === 8 || n === 11 || n === 9) && (i === `
|
|
510
|
-
` || i === ` `) && (
|
|
510
|
+
` || i === ` `) && (N.INVALID_LINKED_FORMAT, a()), i) {
|
|
511
511
|
case `@`: return e.next(), r = d(t, 7, `@`), t.inLinked = !0, r;
|
|
512
512
|
case `.`: return h(e), e.next(), d(t, 8, `.`);
|
|
513
513
|
case `:`: return h(e), e.next(), d(t, 9, `:`);
|
|
514
|
-
default: return
|
|
514
|
+
default: return T(e) ? (r = d(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, r) : x(e, t) || C(e, t) ? (h(e), L(e, t)) : S(e, t) ? (h(e), d(t, 11, pe(e))) : w(e, t) ? (h(e), i === `{` ? I(e, t) || r : d(t, 10, P(e))) : (n === 7 && (N.INVALID_LINKED_FORMAT, a()), t.braceNest = 0, t.inLinked = !1, R(e, t));
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function R(e, t) {
|
|
518
518
|
let n = { type: 13 };
|
|
519
|
-
if (t.braceNest > 0) return
|
|
520
|
-
if (t.inLinked) return
|
|
519
|
+
if (t.braceNest > 0) return I(e, t) || f(t);
|
|
520
|
+
if (t.inLinked) return L(e, t) || f(t);
|
|
521
521
|
switch (e.currentChar()) {
|
|
522
|
-
case `{`: return
|
|
523
|
-
case `}`: return
|
|
524
|
-
case `@`: return
|
|
522
|
+
case `{`: return I(e, t) || f(t);
|
|
523
|
+
case `}`: return N.UNBALANCED_CLOSING_BRACE, a(), e.next(), d(t, 3, `}`);
|
|
524
|
+
case `@`: return L(e, t) || f(t);
|
|
525
525
|
default:
|
|
526
|
-
if (
|
|
527
|
-
if (
|
|
526
|
+
if (T(e)) return n = d(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
|
|
527
|
+
if (E(e)) return d(t, 0, se(e));
|
|
528
528
|
}
|
|
529
529
|
return n;
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function _e() {
|
|
532
532
|
let { currentType: e, offset: t, startLoc: n, endLoc: o } = c;
|
|
533
|
-
return c.lastType = e, c.lastOffset = t, c.lastStartLoc = n, c.lastEndLoc = o, c.offset = i(), c.startLoc = a(), r.currentChar() === void 0 ? d(c, 13) :
|
|
533
|
+
return c.lastType = e, c.lastOffset = t, c.lastStartLoc = n, c.lastEndLoc = o, c.offset = i(), c.startLoc = a(), r.currentChar() === void 0 ? d(c, 13) : R(r, c);
|
|
534
534
|
}
|
|
535
535
|
return {
|
|
536
|
-
nextToken:
|
|
536
|
+
nextToken: _e,
|
|
537
537
|
currentOffset: i,
|
|
538
538
|
currentPosition: a,
|
|
539
539
|
context: l
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
const
|
|
543
|
-
function
|
|
542
|
+
const ve = /\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6})/g, ye = /\\([\\@{}|])/g;
|
|
543
|
+
function be(e, t) {
|
|
544
544
|
return t;
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function xe(e, t, n) {
|
|
547
547
|
switch (e) {
|
|
548
548
|
case `\\\\`: return `\\`;
|
|
549
549
|
case `\\'`: return `'`;
|
|
@@ -553,7 +553,7 @@ function be(e, t, n) {
|
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function Se(e = {}) {
|
|
557
557
|
let t = e.location !== !1, { onError: n } = e;
|
|
558
558
|
function r(e, n, r) {
|
|
559
559
|
let i = { type: e };
|
|
@@ -567,7 +567,7 @@ function xe(e = {}) {
|
|
|
567
567
|
}
|
|
568
568
|
function a(e, t) {
|
|
569
569
|
let n = e.context(), a = r(3, n.offset, n.startLoc);
|
|
570
|
-
return a.value = t.replace(
|
|
570
|
+
return a.value = t.replace(ye, be), i(a, e.currentOffset(), e.currentPosition()), a;
|
|
571
571
|
}
|
|
572
572
|
function o(e, t) {
|
|
573
573
|
let { lastOffset: n, lastStartLoc: a } = e.context(), o = r(5, n, a);
|
|
@@ -579,11 +579,11 @@ function xe(e = {}) {
|
|
|
579
579
|
}
|
|
580
580
|
function l(e, t) {
|
|
581
581
|
let { lastOffset: n, lastStartLoc: a } = e.context(), o = r(9, n, a);
|
|
582
|
-
return o.value = t.replace(
|
|
582
|
+
return o.value = t.replace(ve, xe), e.nextToken(), i(o, e.currentOffset(), e.currentPosition()), o;
|
|
583
583
|
}
|
|
584
584
|
function u(e) {
|
|
585
585
|
let t = e.nextToken(), n = e.context(), { lastOffset: a, lastStartLoc: o } = n, s = r(8, a, o);
|
|
586
|
-
return t.type === 11 ? (t.value == null && (
|
|
586
|
+
return t.type === 11 ? (t.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, n.lastStartLoc, z(t)), s.value = t.value || ``, i(s, e.currentOffset(), e.currentPosition()), { node: s }) : (N.UNEXPECTED_EMPTY_LINKED_MODIFIER, n.lastStartLoc, s.value = ``, i(s, a, o), {
|
|
587
587
|
nextConsumeToken: t,
|
|
588
588
|
node: s
|
|
589
589
|
});
|
|
@@ -598,21 +598,21 @@ function xe(e = {}) {
|
|
|
598
598
|
let t = u(e);
|
|
599
599
|
n.modifier = t.node, a = t.nextConsumeToken || e.nextToken();
|
|
600
600
|
}
|
|
601
|
-
switch (a.type !== 9 && (
|
|
601
|
+
switch (a.type !== 9 && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(a)), a = e.nextToken(), a.type === 2 && (a = e.nextToken()), a.type) {
|
|
602
602
|
case 10:
|
|
603
|
-
a.value == null && (
|
|
603
|
+
a.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(a)), n.key = d(e, a.value || ``);
|
|
604
604
|
break;
|
|
605
605
|
case 4:
|
|
606
|
-
a.value == null && (
|
|
606
|
+
a.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(a)), n.key = s(e, a.value || ``);
|
|
607
607
|
break;
|
|
608
608
|
case 5:
|
|
609
|
-
a.value == null && (
|
|
609
|
+
a.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(a)), n.key = o(e, a.value || ``);
|
|
610
610
|
break;
|
|
611
611
|
case 6:
|
|
612
|
-
a.value == null && (
|
|
612
|
+
a.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(a)), n.key = l(e, a.value || ``);
|
|
613
613
|
break;
|
|
614
614
|
default: {
|
|
615
|
-
|
|
615
|
+
N.UNEXPECTED_EMPTY_LINKED_KEY, t.lastStartLoc;
|
|
616
616
|
let o = e.context(), s = r(7, o.offset, o.startLoc);
|
|
617
617
|
return s.value = ``, i(s, o.offset, o.startLoc), n.key = s, i(n, o.offset, o.startLoc), {
|
|
618
618
|
nextConsumeToken: a,
|
|
@@ -630,16 +630,16 @@ function xe(e = {}) {
|
|
|
630
630
|
let r = c || e.nextToken();
|
|
631
631
|
switch (c = null, r.type) {
|
|
632
632
|
case 0:
|
|
633
|
-
r.value == null && (
|
|
633
|
+
r.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(r)), n.items.push(a(e, r.value || ``));
|
|
634
634
|
break;
|
|
635
635
|
case 5:
|
|
636
|
-
r.value == null && (
|
|
636
|
+
r.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(r)), n.items.push(o(e, r.value || ``));
|
|
637
637
|
break;
|
|
638
638
|
case 4:
|
|
639
|
-
r.value == null && (
|
|
639
|
+
r.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(r)), n.items.push(s(e, r.value || ``));
|
|
640
640
|
break;
|
|
641
641
|
case 6:
|
|
642
|
-
r.value == null && (
|
|
642
|
+
r.value == null && (N.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, z(r)), n.items.push(l(e, r.value || ``));
|
|
643
643
|
break;
|
|
644
644
|
case 7: {
|
|
645
645
|
let t = f(e);
|
|
@@ -657,221 +657,222 @@ function xe(e = {}) {
|
|
|
657
657
|
let t = p(e);
|
|
658
658
|
s || (s = t.items.length === 0), c.cases.push(t);
|
|
659
659
|
} while (o.currentType !== 13);
|
|
660
|
-
return s &&
|
|
660
|
+
return s && N.MUST_HAVE_MESSAGES_IN_PLURAL, i(c, e.currentOffset(), e.currentPosition()), c;
|
|
661
661
|
}
|
|
662
662
|
function h(e) {
|
|
663
663
|
let t = e.context(), { offset: n, startLoc: r } = t, i = p(e);
|
|
664
664
|
return t.currentType === 13 ? i : m(e, n, r, i);
|
|
665
665
|
}
|
|
666
666
|
function g(n) {
|
|
667
|
-
let a =
|
|
668
|
-
return t && s.loc && (s.loc.source = n), s.body = h(a), e.onCacheKey && (s.cacheKey = e.onCacheKey(n)), o.currentType !== 13 && (
|
|
667
|
+
let a = _e(n, c({}, e)), o = a.context(), s = r(0, o.offset, o.startLoc);
|
|
668
|
+
return t && s.loc && (s.loc.source = n), s.body = h(a), e.onCacheKey && (s.cacheKey = e.onCacheKey(n)), o.currentType !== 13 && (N.UNEXPECTED_LEXICAL_ANALYSIS, o.lastStartLoc, n[o.offset]), i(s, a.currentOffset(), a.currentPosition()), s;
|
|
669
669
|
}
|
|
670
670
|
return { parse: g };
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function z(e) {
|
|
673
673
|
if (e.type === 13) return `EOF`;
|
|
674
674
|
let t = (e.value || ``).replace(/\r?\n/gu, `\\n`);
|
|
675
675
|
return t.length > 10 ? t.slice(0, 9) + `…` : t;
|
|
676
676
|
}
|
|
677
|
-
function
|
|
678
|
-
return y(e) &&
|
|
677
|
+
function B(e) {
|
|
678
|
+
return y(e) && Me(e) === 0 && (f(e, `b`) || f(e, `body`));
|
|
679
679
|
}
|
|
680
|
-
const
|
|
681
|
-
function
|
|
682
|
-
return
|
|
680
|
+
const Ce = [`b`, `body`];
|
|
681
|
+
function we(e) {
|
|
682
|
+
return H(e, Ce);
|
|
683
683
|
}
|
|
684
|
-
const
|
|
685
|
-
function
|
|
686
|
-
return
|
|
684
|
+
const Te = [`c`, `cases`];
|
|
685
|
+
function Ee(e) {
|
|
686
|
+
return H(e, Te, []);
|
|
687
687
|
}
|
|
688
|
-
const
|
|
689
|
-
function
|
|
690
|
-
return
|
|
688
|
+
const De = [`s`, `static`];
|
|
689
|
+
function Oe(e) {
|
|
690
|
+
return H(e, De);
|
|
691
691
|
}
|
|
692
|
-
const
|
|
693
|
-
function
|
|
694
|
-
return
|
|
692
|
+
const ke = [`i`, `items`];
|
|
693
|
+
function Ae(e) {
|
|
694
|
+
return H(e, ke, []);
|
|
695
695
|
}
|
|
696
|
-
const
|
|
697
|
-
function
|
|
698
|
-
return
|
|
696
|
+
const je = [`t`, `type`];
|
|
697
|
+
function Me(e) {
|
|
698
|
+
return H(e, je);
|
|
699
699
|
}
|
|
700
|
-
const
|
|
701
|
-
function
|
|
702
|
-
let n =
|
|
700
|
+
const Ne = [`v`, `value`];
|
|
701
|
+
function V(e, t) {
|
|
702
|
+
let n = H(e, Ne);
|
|
703
703
|
if (n != null) return n;
|
|
704
|
-
throw
|
|
704
|
+
throw U(t);
|
|
705
705
|
}
|
|
706
|
-
const
|
|
707
|
-
function
|
|
708
|
-
return
|
|
706
|
+
const Pe = [`m`, `modifier`];
|
|
707
|
+
function Fe(e) {
|
|
708
|
+
return H(e, Pe);
|
|
709
709
|
}
|
|
710
|
-
const
|
|
711
|
-
function
|
|
712
|
-
let t =
|
|
710
|
+
const Ie = [`k`, `key`];
|
|
711
|
+
function Le(e) {
|
|
712
|
+
let t = H(e, Ie);
|
|
713
713
|
if (t) return t;
|
|
714
|
-
throw
|
|
714
|
+
throw U(6);
|
|
715
715
|
}
|
|
716
|
-
function
|
|
716
|
+
function H(e, t, n) {
|
|
717
717
|
for (let n = 0; n < t.length; n++) {
|
|
718
718
|
let r = t[n];
|
|
719
719
|
if (f(e, r) && e[r] != null) return e[r];
|
|
720
720
|
}
|
|
721
721
|
return n;
|
|
722
722
|
}
|
|
723
|
-
const
|
|
724
|
-
...
|
|
725
|
-
...
|
|
726
|
-
...
|
|
727
|
-
...
|
|
728
|
-
...
|
|
723
|
+
const Re = [
|
|
724
|
+
...Ce,
|
|
725
|
+
...Te,
|
|
726
|
+
...De,
|
|
727
|
+
...ke,
|
|
728
|
+
...Ie,
|
|
729
|
+
...Pe,
|
|
729
730
|
...Ne,
|
|
730
|
-
...
|
|
731
|
-
...Ae
|
|
731
|
+
...je
|
|
732
732
|
];
|
|
733
|
-
function
|
|
733
|
+
function U(e) {
|
|
734
734
|
return Error(`unhandled node type: ${e}`);
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
return (t) =>
|
|
736
|
+
function ze(e) {
|
|
737
|
+
return (t) => Be(t, e);
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
let n =
|
|
741
|
-
if (n == null) throw
|
|
742
|
-
if (
|
|
743
|
-
let t =
|
|
744
|
-
return e.plural(t.reduce((t, n) => [...h(t) ? t : [t],
|
|
739
|
+
function Be(e, t) {
|
|
740
|
+
let n = we(t);
|
|
741
|
+
if (n == null) throw U(0);
|
|
742
|
+
if (Me(n) === 1) {
|
|
743
|
+
let t = Ee(n);
|
|
744
|
+
return e.plural(t.reduce((t, n) => [...h(t) ? t : [t], Ve(e, n)], []));
|
|
745
745
|
}
|
|
746
|
-
return
|
|
746
|
+
return Ve(e, n);
|
|
747
747
|
}
|
|
748
|
-
function
|
|
749
|
-
let n =
|
|
748
|
+
function Ve(e, t) {
|
|
749
|
+
let n = Oe(t);
|
|
750
750
|
if (n != null) return e.type === `text` ? n : e.normalize([n]);
|
|
751
751
|
{
|
|
752
|
-
let n =
|
|
752
|
+
let n = Ae(t).reduce((t, n) => [...t, He(e, n)], []);
|
|
753
753
|
return e.normalize(n);
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
let n =
|
|
756
|
+
function He(e, t) {
|
|
757
|
+
let n = Me(t);
|
|
758
758
|
switch (n) {
|
|
759
|
-
case 3: return
|
|
760
|
-
case 9: return
|
|
759
|
+
case 3: return V(t, n);
|
|
760
|
+
case 9: return V(t, n);
|
|
761
761
|
case 4: {
|
|
762
762
|
let r = t;
|
|
763
763
|
if (f(r, `k`) && r.k) return e.interpolate(e.named(r.k));
|
|
764
764
|
if (f(r, `key`) && r.key) return e.interpolate(e.named(r.key));
|
|
765
|
-
throw
|
|
765
|
+
throw U(n);
|
|
766
766
|
}
|
|
767
767
|
case 5: {
|
|
768
768
|
let r = t;
|
|
769
769
|
if (f(r, `i`) && i(r.i)) return e.interpolate(e.list(r.i));
|
|
770
770
|
if (f(r, `index`) && i(r.index)) return e.interpolate(e.list(r.index));
|
|
771
|
-
throw
|
|
771
|
+
throw U(n);
|
|
772
772
|
}
|
|
773
773
|
case 6: {
|
|
774
|
-
let n = t, r =
|
|
775
|
-
return e.linked(
|
|
774
|
+
let n = t, r = Fe(n), i = Le(n);
|
|
775
|
+
return e.linked(He(e, i), r ? He(e, r) : void 0, e.type);
|
|
776
776
|
}
|
|
777
|
-
case 7: return
|
|
778
|
-
case 8: return
|
|
777
|
+
case 7: return V(t, n);
|
|
778
|
+
case 8: return V(t, n);
|
|
779
779
|
default: throw Error(`unhandled node on format message part: ${n}`);
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
const
|
|
783
|
-
let
|
|
784
|
-
function
|
|
785
|
-
|
|
782
|
+
const Ue = (e) => e;
|
|
783
|
+
let W = u();
|
|
784
|
+
function We() {
|
|
785
|
+
W = u();
|
|
786
786
|
}
|
|
787
|
-
function
|
|
788
|
-
let n = !1, r = t.onError ||
|
|
787
|
+
function Ge(e, t = {}) {
|
|
788
|
+
let n = !1, r = t.onError || F;
|
|
789
789
|
t.onError = (e) => {
|
|
790
790
|
n = !0, r(e);
|
|
791
791
|
};
|
|
792
|
-
let i =
|
|
793
|
-
return t.optimize &&
|
|
792
|
+
let i = Se(t).parse(e);
|
|
793
|
+
return t.optimize && L(i), t.mangle && I(i), {
|
|
794
794
|
ast: i,
|
|
795
795
|
detectError: n,
|
|
796
796
|
code: ``
|
|
797
797
|
};
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function Ke(e, t) {
|
|
800
800
|
if (_(e)) {
|
|
801
801
|
v(t.warnHtmlMessage) && t.warnHtmlMessage;
|
|
802
|
-
let n = (t.onCacheKey ||
|
|
802
|
+
let n = (t.onCacheKey || Ue)(e), r = W[n];
|
|
803
803
|
if (r) return r;
|
|
804
|
-
let { ast: i, detectError: a } =
|
|
804
|
+
let { ast: i, detectError: a } = Ge(e, {
|
|
805
805
|
...t,
|
|
806
806
|
location: !1,
|
|
807
807
|
mangle: !0,
|
|
808
808
|
optimize: !0
|
|
809
|
-
}), o =
|
|
810
|
-
return a ? o :
|
|
809
|
+
}), o = ze(i);
|
|
810
|
+
return a ? o : W[n] = o;
|
|
811
811
|
}
|
|
812
812
|
{
|
|
813
|
+
if (!B(e)) return (() => e);
|
|
813
814
|
let t = e.cacheKey;
|
|
814
|
-
return t ?
|
|
815
|
+
return t ? W[t] || (W[t] = ze(e)) : ze(e);
|
|
815
816
|
}
|
|
816
817
|
}
|
|
817
|
-
const
|
|
818
|
+
const G = {
|
|
818
819
|
INVALID_ARGUMENT: 17,
|
|
819
820
|
INVALID_DATE_ARGUMENT: 18,
|
|
820
821
|
INVALID_ISO_DATE_ARGUMENT: 19,
|
|
821
822
|
NOT_SUPPORT_LOCALE_PROMISE_VALUE: 20,
|
|
822
823
|
NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 21,
|
|
823
824
|
NOT_SUPPORT_LOCALE_TYPE: 22
|
|
824
|
-
},
|
|
825
|
-
function
|
|
826
|
-
return
|
|
825
|
+
}, qe = 23;
|
|
826
|
+
function Je(e) {
|
|
827
|
+
return P(e, null, void 0);
|
|
827
828
|
}
|
|
828
|
-
|
|
829
|
-
function
|
|
830
|
-
return t.locale == null ?
|
|
829
|
+
G.INVALID_ARGUMENT, G.INVALID_DATE_ARGUMENT, G.INVALID_ISO_DATE_ARGUMENT, G.NOT_SUPPORT_LOCALE_PROMISE_VALUE, G.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION, G.NOT_SUPPORT_LOCALE_TYPE;
|
|
830
|
+
function Ye(e, t) {
|
|
831
|
+
return t.locale == null ? Xe(e.locale) : Xe(t.locale);
|
|
831
832
|
}
|
|
832
|
-
let
|
|
833
|
-
function
|
|
833
|
+
let K;
|
|
834
|
+
function Xe(e) {
|
|
834
835
|
if (_(e)) return e;
|
|
835
836
|
if (g(e)) {
|
|
836
|
-
if (e.resolvedOnce &&
|
|
837
|
+
if (e.resolvedOnce && K != null) return K;
|
|
837
838
|
if (e.constructor.name === `Function`) {
|
|
838
839
|
let t = e();
|
|
839
|
-
if (b(t)) throw Error(
|
|
840
|
-
return
|
|
840
|
+
if (b(t)) throw Error(G.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
|
|
841
|
+
return K = t;
|
|
841
842
|
}
|
|
842
|
-
throw Error(
|
|
843
|
+
throw Error(G.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
|
|
843
844
|
}
|
|
844
|
-
throw Error(
|
|
845
|
+
throw Error(G.NOT_SUPPORT_LOCALE_TYPE);
|
|
845
846
|
}
|
|
846
|
-
function
|
|
847
|
+
function Ze(e, t, n) {
|
|
847
848
|
return [.../* @__PURE__ */ new Set([n, ...h(t) ? t : y(t) ? Object.keys(t).filter((e) => e !== "default") : _(t) ? [t] : [n]])];
|
|
848
849
|
}
|
|
849
|
-
function
|
|
850
|
-
let r = _(n) ? n :
|
|
850
|
+
function Qe(e, t, n) {
|
|
851
|
+
let r = _(n) ? n : Y, i = e, a;
|
|
851
852
|
y(t) ? (i.__localeChainObjectCache || (i.__localeChainObjectCache = /* @__PURE__ */ new WeakMap()), a = i.__localeChainObjectCache.get(t), a || (a = /* @__PURE__ */ new Map(), i.__localeChainObjectCache.set(t, a))) : (i.__localeChainCache || (i.__localeChainCache = /* @__PURE__ */ new Map()), a = i.__localeChainCache.get(t), a || (a = /* @__PURE__ */ new Map(), i.__localeChainCache.set(t, a)));
|
|
852
853
|
let o = a.get(r);
|
|
853
854
|
if (o) return o;
|
|
854
855
|
let s = [], c = [n];
|
|
855
|
-
for (; h(c);) c =
|
|
856
|
+
for (; h(c);) c = $e(s, c, t);
|
|
856
857
|
let l = h(t) || !C(t) ? t : t.default ? t.default : null;
|
|
857
|
-
return c = _(l) ? [l] : l, h(c) &&
|
|
858
|
+
return c = _(l) ? [l] : l, h(c) && $e(s, c, !1), a.set(r, s), s;
|
|
858
859
|
}
|
|
859
|
-
function
|
|
860
|
+
function $e(e, t, n) {
|
|
860
861
|
let r = !0;
|
|
861
862
|
for (let i = 0; i < t.length && v(r); i++) {
|
|
862
863
|
let a = t[i];
|
|
863
|
-
_(a) && (r =
|
|
864
|
+
_(a) && (r = et(e, t[i], n));
|
|
864
865
|
}
|
|
865
866
|
return r;
|
|
866
867
|
}
|
|
867
|
-
function
|
|
868
|
+
function et(e, t, n) {
|
|
868
869
|
let r, i = t.split(`-`);
|
|
869
870
|
do
|
|
870
|
-
r =
|
|
871
|
+
r = tt(e, i.join(`-`), n), i.splice(-1, 1);
|
|
871
872
|
while (i.length && r === !0);
|
|
872
873
|
return r;
|
|
873
874
|
}
|
|
874
|
-
function
|
|
875
|
+
function tt(e, t, n) {
|
|
875
876
|
let r = !1;
|
|
876
877
|
if (!e.includes(t) && (r = !0, t)) {
|
|
877
878
|
r = t[t.length - 1] !== `!`;
|
|
@@ -880,53 +881,53 @@ function et(e, t, n) {
|
|
|
880
881
|
}
|
|
881
882
|
return r;
|
|
882
883
|
}
|
|
883
|
-
const
|
|
884
|
-
|
|
884
|
+
const q = [];
|
|
885
|
+
q[0] = {
|
|
885
886
|
w: [0],
|
|
886
887
|
i: [3, 0],
|
|
887
888
|
"[": [4],
|
|
888
889
|
o: [7]
|
|
889
|
-
},
|
|
890
|
+
}, q[1] = {
|
|
890
891
|
w: [1],
|
|
891
892
|
".": [2],
|
|
892
893
|
"[": [4],
|
|
893
894
|
o: [7]
|
|
894
|
-
},
|
|
895
|
+
}, q[2] = {
|
|
895
896
|
w: [2],
|
|
896
897
|
i: [3, 0],
|
|
897
898
|
0: [3, 0]
|
|
898
|
-
},
|
|
899
|
+
}, q[3] = {
|
|
899
900
|
i: [3, 0],
|
|
900
901
|
0: [3, 0],
|
|
901
902
|
w: [1, 1],
|
|
902
903
|
".": [2, 1],
|
|
903
904
|
"[": [4, 1],
|
|
904
905
|
o: [7, 1]
|
|
905
|
-
},
|
|
906
|
+
}, q[4] = {
|
|
906
907
|
"'": [5, 0],
|
|
907
908
|
"\"": [6, 0],
|
|
908
909
|
"[": [4, 2],
|
|
909
910
|
"]": [1, 3],
|
|
910
911
|
o: 8,
|
|
911
912
|
l: [4, 0]
|
|
912
|
-
},
|
|
913
|
+
}, q[5] = {
|
|
913
914
|
"'": [4, 0],
|
|
914
915
|
o: 8,
|
|
915
916
|
l: [5, 0]
|
|
916
|
-
},
|
|
917
|
+
}, q[6] = {
|
|
917
918
|
"\"": [4, 0],
|
|
918
919
|
o: 8,
|
|
919
920
|
l: [6, 0]
|
|
920
921
|
};
|
|
921
|
-
const
|
|
922
|
-
function nt(e) {
|
|
923
|
-
return tt.test(e);
|
|
924
|
-
}
|
|
922
|
+
const nt = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
|
|
925
923
|
function rt(e) {
|
|
924
|
+
return nt.test(e);
|
|
925
|
+
}
|
|
926
|
+
function it(e) {
|
|
926
927
|
let t = e.charCodeAt(0);
|
|
927
928
|
return t === e.charCodeAt(e.length - 1) && (t === 34 || t === 39) ? e.slice(1, -1) : e;
|
|
928
929
|
}
|
|
929
|
-
function
|
|
930
|
+
function at(e) {
|
|
930
931
|
if (e == null) return `o`;
|
|
931
932
|
switch (e.charCodeAt(0)) {
|
|
932
933
|
case 91:
|
|
@@ -947,11 +948,11 @@ function it(e) {
|
|
|
947
948
|
}
|
|
948
949
|
return `i`;
|
|
949
950
|
}
|
|
950
|
-
function
|
|
951
|
+
function ot(e) {
|
|
951
952
|
let t = e.trim();
|
|
952
|
-
return e.charAt(0) === `0` && isNaN(parseInt(e)) ? !1 :
|
|
953
|
+
return e.charAt(0) === `0` && isNaN(parseInt(e)) ? !1 : rt(t) ? it(t) : `*` + t;
|
|
953
954
|
}
|
|
954
|
-
function
|
|
955
|
+
function st(e) {
|
|
955
956
|
let t = [], n = -1, r = 0, i = 0, a, o, s, c, l, u, d, f = [];
|
|
956
957
|
f[0] = () => {
|
|
957
958
|
o === void 0 ? o = s : o += s;
|
|
@@ -962,7 +963,7 @@ function ot(e) {
|
|
|
962
963
|
}, f[3] = () => {
|
|
963
964
|
if (i > 0) i--, r = 4, f[0]();
|
|
964
965
|
else {
|
|
965
|
-
if (i = 0, o === void 0 || (o =
|
|
966
|
+
if (i = 0, o === void 0 || (o = ot(o), o === !1)) return !1;
|
|
966
967
|
f[1]();
|
|
967
968
|
}
|
|
968
969
|
};
|
|
@@ -971,29 +972,29 @@ function ot(e) {
|
|
|
971
972
|
if (r === 5 && t === `'` || r === 6 && t === `"`) return n++, s = `\\` + t, f[0](), !0;
|
|
972
973
|
}
|
|
973
974
|
for (; r !== null;) if (n++, a = e[n], !(a === `\\` && p())) {
|
|
974
|
-
if (c =
|
|
975
|
+
if (c = at(a), d = q[r], l = d[c] || d.l || 8, l === 8 || (r = l[0], l[1] !== void 0 && (u = f[l[1]], u && (s = a, u() === !1)))) return;
|
|
975
976
|
if (r === 7) return t;
|
|
976
977
|
}
|
|
977
978
|
}
|
|
978
|
-
const
|
|
979
|
-
function ct(e, t) {
|
|
980
|
-
return y(e) ? e[t] : null;
|
|
981
|
-
}
|
|
979
|
+
const ct = /* @__PURE__ */ new Map();
|
|
982
980
|
function lt(e, t) {
|
|
981
|
+
return y(e) ? p(e, t) : null;
|
|
982
|
+
}
|
|
983
|
+
function ut(e, t) {
|
|
983
984
|
if (!y(e)) return null;
|
|
984
|
-
let n =
|
|
985
|
-
if (n || (n =
|
|
985
|
+
let n = ct.get(t);
|
|
986
|
+
if (n || (n = st(t), n && ct.set(t, n)), !n) return null;
|
|
986
987
|
let r = n.length, i = e, a = 0;
|
|
987
988
|
for (; a < r;) {
|
|
988
989
|
let e = n[a];
|
|
989
|
-
if (
|
|
990
|
+
if (Re.includes(e) && B(i) || !y(i) || !f(i, e)) return null;
|
|
990
991
|
let t = i[e];
|
|
991
992
|
if (t === void 0 || g(i)) return null;
|
|
992
993
|
i = t, a++;
|
|
993
994
|
}
|
|
994
995
|
return i;
|
|
995
996
|
}
|
|
996
|
-
const
|
|
997
|
+
const J = {
|
|
997
998
|
NOT_FOUND_KEY: 1,
|
|
998
999
|
FALLBACK_TO_TRANSLATE: 2,
|
|
999
1000
|
CANNOT_FORMAT_NUMBER: 3,
|
|
@@ -1002,87 +1003,99 @@ const Y = {
|
|
|
1002
1003
|
FALLBACK_TO_DATE_FORMAT: 6,
|
|
1003
1004
|
EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7,
|
|
1004
1005
|
INVALID_NUMBER_ARGUMENT: 8,
|
|
1005
|
-
INVALID_DATE_ARGUMENT: 9
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
[
|
|
1011
|
-
[
|
|
1012
|
-
[
|
|
1013
|
-
[
|
|
1014
|
-
[
|
|
1015
|
-
[
|
|
1006
|
+
INVALID_DATE_ARGUMENT: 9,
|
|
1007
|
+
IGNORE_UNSAFE_LOCALE: 10,
|
|
1008
|
+
FALLBACK_TO_DEFAULT_PLURAL_RULE: 11,
|
|
1009
|
+
FALLBACK_FROM_INVALID_LOCALE: 12
|
|
1010
|
+
}, dt = 13, ft = {
|
|
1011
|
+
[J.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale {resource}.`,
|
|
1012
|
+
[J.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
|
|
1013
|
+
[J.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
|
|
1014
|
+
[J.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
|
|
1015
|
+
[J.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
|
|
1016
|
+
[J.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
|
|
1017
|
+
[J.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`,
|
|
1018
|
+
[J.INVALID_NUMBER_ARGUMENT]: `Invalid argument for number formatting: expected a number but received '{value}'.`,
|
|
1019
|
+
[J.INVALID_DATE_ARGUMENT]: `Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'.`,
|
|
1020
|
+
[J.IGNORE_UNSAFE_LOCALE]: `Ignore '{locale}' locale: it is a property name of Object.prototype`,
|
|
1021
|
+
[J.FALLBACK_TO_DEFAULT_PLURAL_RULE]: `Fall back to the default plural rule for '{locale}' locale: Intl.PluralRules does not support it`,
|
|
1022
|
+
[J.FALLBACK_FROM_INVALID_LOCALE]: `Fall back to '{target}' locale for {type} formatting with '{locale}' locale: it is not a BCP 47 language tag`
|
|
1016
1023
|
};
|
|
1017
|
-
function
|
|
1018
|
-
return t(
|
|
1024
|
+
function pt(e, ...n) {
|
|
1025
|
+
return t(ft[e], ...n);
|
|
1019
1026
|
}
|
|
1020
|
-
const
|
|
1021
|
-
function
|
|
1027
|
+
const mt = `12.0.0-alpha.6`, ht = -1, Y = `en-US`, gt = ``, _t = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
|
|
1028
|
+
function vt() {
|
|
1022
1029
|
return {
|
|
1023
1030
|
upper: (e, t) => t === `text` && _(e) ? e.toUpperCase() : t === `vnode` && y(e) && `__v_isVNode` in e ? e.children.toUpperCase() : e,
|
|
1024
1031
|
lower: (e, t) => t === `text` && _(e) ? e.toLowerCase() : t === `vnode` && y(e) && `__v_isVNode` in e ? e.children.toLowerCase() : e,
|
|
1025
|
-
capitalize: (e, t) => t === `text` && _(e) ?
|
|
1032
|
+
capitalize: (e, t) => t === `text` && _(e) ? _t(e) : t === `vnode` && y(e) && `__v_isVNode` in e ? _t(e.children) : e
|
|
1026
1033
|
};
|
|
1027
1034
|
}
|
|
1028
|
-
let
|
|
1029
|
-
function
|
|
1030
|
-
|
|
1035
|
+
let yt;
|
|
1036
|
+
function bt(e) {
|
|
1037
|
+
yt = e;
|
|
1031
1038
|
}
|
|
1032
|
-
let
|
|
1033
|
-
function
|
|
1034
|
-
|
|
1039
|
+
let xt;
|
|
1040
|
+
function St(e) {
|
|
1041
|
+
xt = e;
|
|
1035
1042
|
}
|
|
1036
|
-
let
|
|
1037
|
-
function
|
|
1038
|
-
|
|
1043
|
+
let Ct;
|
|
1044
|
+
function wt(e) {
|
|
1045
|
+
Ct = e;
|
|
1039
1046
|
}
|
|
1040
|
-
let
|
|
1041
|
-
function
|
|
1042
|
-
let t = g(e.onWarn) ? e.onWarn :
|
|
1043
|
-
|
|
1044
|
-
let
|
|
1047
|
+
let Tt = 0;
|
|
1048
|
+
function Et(e = {}) {
|
|
1049
|
+
let t = g(e.onWarn) ? e.onWarn : E, n = _(e.version) ? e.version : mt, r = _(e.locale) || g(e.locale) ? e.locale : Y, i = g(r) ? Y : r, a = At(e.fallbackLocale) ? e.fallbackLocale : i, o = C(e.messages) ? e.messages : Dt(i), s = C(e.datetimeFormats) ? e.datetimeFormats : Dt(i), l = C(e.numberFormats) ? e.numberFormats : Dt(i), d = c(u(), e.modifiers, vt()), f = e.pluralRules || u(), p = g(e.missing) ? e.missing : null, m = !jt(e.missingWarn) || e.missingWarn, h = !jt(e.fallbackWarn) || e.fallbackWarn, b = !!e.fallbackFormat, x = !!e.unresolving, S = g(e.postTranslation) ? e.postTranslation : null, w = C(e.processor) ? e.processor : null, T = !v(e.warnHtmlMessage) || e.warnHtmlMessage, D = !!e.escapeParameter, ee = g(e.messageCompiler) ? e.messageCompiler : yt || null, te = g(e.messageResolver) ? e.messageResolver : xt || lt, ne = g(e.localeFallbacker) ? e.localeFallbacker : Ct || Ze, re = y(e.fallbackContext) ? e.fallbackContext : void 0;
|
|
1050
|
+
Tt++;
|
|
1051
|
+
let O = {
|
|
1045
1052
|
version: n,
|
|
1046
|
-
cid:
|
|
1053
|
+
cid: Tt,
|
|
1047
1054
|
locale: r,
|
|
1048
1055
|
fallbackLocale: a,
|
|
1049
|
-
messages:
|
|
1050
|
-
modifiers:
|
|
1051
|
-
pluralRules:
|
|
1052
|
-
missing:
|
|
1053
|
-
missingWarn:
|
|
1054
|
-
fallbackWarn:
|
|
1055
|
-
fallbackFormat:
|
|
1056
|
-
unresolving:
|
|
1057
|
-
postTranslation:
|
|
1058
|
-
processor:
|
|
1059
|
-
warnHtmlMessage:
|
|
1056
|
+
messages: o,
|
|
1057
|
+
modifiers: d,
|
|
1058
|
+
pluralRules: f,
|
|
1059
|
+
missing: p,
|
|
1060
|
+
missingWarn: m,
|
|
1061
|
+
fallbackWarn: h,
|
|
1062
|
+
fallbackFormat: b,
|
|
1063
|
+
unresolving: x,
|
|
1064
|
+
postTranslation: S,
|
|
1065
|
+
processor: w,
|
|
1066
|
+
warnHtmlMessage: T,
|
|
1060
1067
|
escapeParameter: D,
|
|
1061
|
-
messageCompiler:
|
|
1062
|
-
messageResolver:
|
|
1063
|
-
localeFallbacker:
|
|
1064
|
-
fallbackContext:
|
|
1068
|
+
messageCompiler: ee,
|
|
1069
|
+
messageResolver: te,
|
|
1070
|
+
localeFallbacker: ne,
|
|
1071
|
+
fallbackContext: re,
|
|
1065
1072
|
onWarn: t
|
|
1066
1073
|
};
|
|
1067
|
-
return
|
|
1074
|
+
return O.datetimeFormats = s, O.numberFormats = l, O.__datetimeFormatters = /* @__PURE__ */ new Map(), O.__numberFormatters = /* @__PURE__ */ new Map(), O;
|
|
1068
1075
|
}
|
|
1069
|
-
const
|
|
1070
|
-
function
|
|
1076
|
+
const Dt = (e) => ({ [e]: u() });
|
|
1077
|
+
function Ot(e, t) {
|
|
1071
1078
|
let n = p(e.messages, t);
|
|
1072
1079
|
if (n == null) return;
|
|
1073
1080
|
let r = u();
|
|
1074
|
-
return
|
|
1081
|
+
return pe(n, r), r;
|
|
1075
1082
|
}
|
|
1076
|
-
function
|
|
1083
|
+
function kt(e, t, n) {
|
|
1077
1084
|
m(t) || (e.messages[t] = n);
|
|
1078
1085
|
}
|
|
1079
|
-
function
|
|
1086
|
+
function At(e) {
|
|
1087
|
+
return _(e) || h(e) || C(e) || e === !1;
|
|
1088
|
+
}
|
|
1089
|
+
function jt(e) {
|
|
1090
|
+
return v(e) || o(e);
|
|
1091
|
+
}
|
|
1092
|
+
function Mt(e, t) {
|
|
1080
1093
|
return o(e) ? e.test(t) : e;
|
|
1081
1094
|
}
|
|
1082
|
-
function
|
|
1095
|
+
function Nt(e, t) {
|
|
1083
1096
|
return o(e) ? e.test(t) : e;
|
|
1084
1097
|
}
|
|
1085
|
-
function
|
|
1098
|
+
function Pt(e, t, n, r, i) {
|
|
1086
1099
|
let { missing: a, onWarn: o } = e;
|
|
1087
1100
|
if (a !== null) {
|
|
1088
1101
|
let r = a(e, n, t, i);
|
|
@@ -1090,61 +1103,84 @@ function jt(e, t, n, r, i) {
|
|
|
1090
1103
|
}
|
|
1091
1104
|
return t;
|
|
1092
1105
|
}
|
|
1093
|
-
function
|
|
1106
|
+
function Ft(e, t) {
|
|
1094
1107
|
let n = e;
|
|
1095
1108
|
y(t) ? n.__localeChainObjectCache?.delete(t) : n.__localeChainCache?.delete(t);
|
|
1096
1109
|
}
|
|
1097
|
-
function
|
|
1098
|
-
|
|
1110
|
+
function It(e, t, n) {
|
|
1111
|
+
Ft(e, n), e.fallbackContext && Ft(e.fallbackContext, n);
|
|
1112
|
+
{
|
|
1113
|
+
let { __datetimeFormatters: t, __numberFormatters: n } = e;
|
|
1114
|
+
t.clear(), n.clear();
|
|
1115
|
+
}
|
|
1116
|
+
e.localeFallbacker(e, n, t);
|
|
1099
1117
|
}
|
|
1100
|
-
function
|
|
1118
|
+
function Lt(e, t) {
|
|
1101
1119
|
return e !== t && e.split(`-`)[0] === t.split(`-`)[0];
|
|
1102
1120
|
}
|
|
1103
|
-
function
|
|
1121
|
+
function Rt(e, t) {
|
|
1104
1122
|
let n = t.indexOf(e);
|
|
1105
1123
|
if (n === -1) return !1;
|
|
1106
|
-
for (let r = n + 1; r < t.length; r++) if (
|
|
1124
|
+
for (let r = n + 1; r < t.length; r++) if (Lt(e, t[r])) return !0;
|
|
1107
1125
|
return !1;
|
|
1108
1126
|
}
|
|
1109
|
-
function
|
|
1127
|
+
function zt(e, t, n, r, i, a, o) {
|
|
1110
1128
|
let { fallbackLocale: s, localeFallbacker: c, onWarn: l } = e, u = c(e, s, n);
|
|
1111
1129
|
for (let n = 0; n < u.length; n++) {
|
|
1112
|
-
let a = u[n], s = (r
|
|
1130
|
+
let a = u[n], s = p(p(r, a) || {}, t);
|
|
1113
1131
|
if (C(s) && _(a)) return a;
|
|
1114
|
-
|
|
1132
|
+
Pt(e, t, a, i, o);
|
|
1115
1133
|
}
|
|
1116
1134
|
return null;
|
|
1117
1135
|
}
|
|
1118
|
-
function
|
|
1136
|
+
function Bt(e) {
|
|
1137
|
+
try {
|
|
1138
|
+
return Intl.getCanonicalLocales(e), !0;
|
|
1139
|
+
} catch {
|
|
1140
|
+
return !1;
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
function Vt(e, t, n, r, i) {
|
|
1144
|
+
try {
|
|
1145
|
+
return new t(n, r);
|
|
1146
|
+
} catch (i) {
|
|
1147
|
+
if (Bt(n)) throw i;
|
|
1148
|
+
let { fallbackLocale: a, localeFallbacker: o, onWarn: s } = e;
|
|
1149
|
+
return new t(o(e, a, n).find(Bt) || `en-US`, r);
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
function Ht(e, [t, n, r, i], a, o, s, l) {
|
|
1153
|
+
let u = v(r.missingWarn) ? r.missingWarn : e.missingWarn, d = v(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, f = !!r.part, p = Ye(e, r);
|
|
1154
|
+
if (!_(t) || t === ``) {
|
|
1155
|
+
let t = Vt(e, a, p.replace(/!/g, ``), i, l);
|
|
1156
|
+
return f ? t.formatToParts(n) : t.format(n);
|
|
1157
|
+
}
|
|
1158
|
+
let m = zt(e, t, p, s, u, d, l);
|
|
1159
|
+
if (!_(m)) return e.unresolving ? -1 : t;
|
|
1160
|
+
let h = s[m][t], g = Ut(m, t, i), y = o.get(g);
|
|
1161
|
+
return y || (y = Vt(e, a, m, c({}, h, i), l), o.set(g, y)), f ? y.formatToParts(n) : y.format(n);
|
|
1162
|
+
}
|
|
1163
|
+
function Ut(e, t, n) {
|
|
1119
1164
|
let r = `${e}__${t}`;
|
|
1120
1165
|
return C(n) && !s(n) && (r = `${r}__${JSON.stringify(n)}`), r;
|
|
1121
1166
|
}
|
|
1122
|
-
function
|
|
1167
|
+
function Wt(e, t, n) {
|
|
1123
1168
|
for (let r in n) {
|
|
1124
1169
|
let n = `${t}__${r}`;
|
|
1125
1170
|
for (let t of e.keys()) (t === n || t.startsWith(`${n}__`)) && e.delete(t);
|
|
1126
1171
|
}
|
|
1127
1172
|
}
|
|
1128
|
-
function
|
|
1173
|
+
function Gt(e, t, n, r) {
|
|
1129
1174
|
let [, i, a, o] = e, s = n;
|
|
1130
1175
|
return _(i) ? t.key = i : C(i) && Object.keys(i).forEach((e) => {
|
|
1131
1176
|
r.includes(e) ? s[e] = i[e] : t[e] = i[e];
|
|
1132
1177
|
}), _(a) ? t.locale = a : C(a) && (s = a), C(o) && (s = o), s;
|
|
1133
1178
|
}
|
|
1134
|
-
function
|
|
1135
|
-
let { datetimeFormats: n,
|
|
1136
|
-
|
|
1137
|
-
let [l, u, d, f] = Ht(...t), p = v(d.missingWarn) ? d.missingWarn : e.missingWarn, m = v(d.fallbackWarn) ? d.fallbackWarn : e.fallbackWarn, h = !!d.part, g = q(e, d);
|
|
1138
|
-
if (!_(l) || l === ``) {
|
|
1139
|
-
let e = new Intl.DateTimeFormat(g.replace(/!/g, ``), f);
|
|
1140
|
-
return h ? e.formatToParts(u) : e.format(u);
|
|
1141
|
-
}
|
|
1142
|
-
let y = It(e, l, g, n, p, m, `datetime format`);
|
|
1143
|
-
if (!_(y)) return r ? -1 : l;
|
|
1144
|
-
let b = n[y][l], x = Lt(y, l, f), S = s.get(x);
|
|
1145
|
-
return S || (S = new Intl.DateTimeFormat(y, c({}, b, f)), s.set(x, S)), h ? S.formatToParts(u) : S.format(u);
|
|
1179
|
+
function Kt(e, ...t) {
|
|
1180
|
+
let { datetimeFormats: n, onWarn: r } = e, { __datetimeFormatters: o } = e;
|
|
1181
|
+
return !_(t[0]) && !a(t[0]) && !i(t[0]) ? `` : Ht(e, Jt(...t), Intl.DateTimeFormat, o, n, `datetime format`);
|
|
1146
1182
|
}
|
|
1147
|
-
const
|
|
1183
|
+
const qt = [
|
|
1148
1184
|
`localeMatcher`,
|
|
1149
1185
|
`weekday`,
|
|
1150
1186
|
`era`,
|
|
@@ -1166,24 +1202,24 @@ const Vt = [
|
|
|
1166
1202
|
`hourCycle`,
|
|
1167
1203
|
`fractionalSecondDigits`
|
|
1168
1204
|
];
|
|
1169
|
-
function
|
|
1205
|
+
function Jt(...e) {
|
|
1170
1206
|
let [t] = e, n = u(), r = u(), o;
|
|
1171
1207
|
if (_(t)) {
|
|
1172
1208
|
let e = t.match(/^(\d{4}-\d{2}-\d{2})(?:(T|\s)(.+))?$/);
|
|
1173
|
-
if (!e) throw Error(
|
|
1209
|
+
if (!e) throw Error(G.INVALID_ISO_DATE_ARGUMENT);
|
|
1174
1210
|
let n = e[3] ? e[3].trim().startsWith(`T`) ? `${e[1].trim()}${e[3].trim()}` : `${e[1].trim()}T${e[3].trim()}` : e[1].trim();
|
|
1175
1211
|
o = new Date(n);
|
|
1176
1212
|
try {
|
|
1177
1213
|
o.toISOString();
|
|
1178
1214
|
} catch {
|
|
1179
|
-
throw Error(
|
|
1215
|
+
throw Error(G.INVALID_ISO_DATE_ARGUMENT);
|
|
1180
1216
|
}
|
|
1181
1217
|
} else if (a(t)) {
|
|
1182
|
-
if (isNaN(t.getTime())) throw Error(
|
|
1218
|
+
if (isNaN(t.getTime())) throw Error(G.INVALID_DATE_ARGUMENT);
|
|
1183
1219
|
o = t;
|
|
1184
1220
|
} else if (i(t)) o = t;
|
|
1185
|
-
else throw Error(
|
|
1186
|
-
let s =
|
|
1221
|
+
else throw Error(G.INVALID_ARGUMENT);
|
|
1222
|
+
let s = Gt(e, n, r, qt);
|
|
1187
1223
|
return [
|
|
1188
1224
|
n.key || ``,
|
|
1189
1225
|
o,
|
|
@@ -1191,23 +1227,14 @@ function Ht(...e) {
|
|
|
1191
1227
|
s
|
|
1192
1228
|
];
|
|
1193
1229
|
}
|
|
1194
|
-
function
|
|
1195
|
-
|
|
1196
|
-
}
|
|
1197
|
-
function
|
|
1198
|
-
let { numberFormats: n,
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
let e = new Intl.NumberFormat(h.replace(/!/g, ``), d);
|
|
1203
|
-
return m ? e.formatToParts(l) : e.format(l);
|
|
1204
|
-
}
|
|
1205
|
-
let g = It(e, s, h, n, f, p, `number format`);
|
|
1206
|
-
if (!_(g)) return r ? -1 : s;
|
|
1207
|
-
let y = n[g][s], b = Lt(g, s, d), x = o.get(b);
|
|
1208
|
-
return x || (x = new Intl.NumberFormat(g, c({}, y, d)), o.set(b, x)), m ? x.formatToParts(l) : x.format(l);
|
|
1209
|
-
}
|
|
1210
|
-
const Gt = [
|
|
1230
|
+
function Yt(e, t, n) {
|
|
1231
|
+
Wt(e.__datetimeFormatters, t, n);
|
|
1232
|
+
}
|
|
1233
|
+
function Xt(e, ...t) {
|
|
1234
|
+
let { numberFormats: n, onWarn: r } = e, { __numberFormatters: a } = e;
|
|
1235
|
+
return i(t[0]) ? Ht(e, Qt(...t), Intl.NumberFormat, a, n, `number format`) : ``;
|
|
1236
|
+
}
|
|
1237
|
+
const Zt = [
|
|
1211
1238
|
`localeMatcher`,
|
|
1212
1239
|
`style`,
|
|
1213
1240
|
`currency`,
|
|
@@ -1229,10 +1256,10 @@ const Gt = [
|
|
|
1229
1256
|
`roundingIncrement`,
|
|
1230
1257
|
`trailingZeroDisplay`
|
|
1231
1258
|
];
|
|
1232
|
-
function
|
|
1259
|
+
function Qt(...e) {
|
|
1233
1260
|
let [t] = e, n = u(), r = u();
|
|
1234
|
-
if (!i(t)) throw Error(
|
|
1235
|
-
let a = t, o =
|
|
1261
|
+
if (!i(t)) throw Error(G.INVALID_ARGUMENT);
|
|
1262
|
+
let a = t, o = Gt(e, n, r, Zt);
|
|
1236
1263
|
return [
|
|
1237
1264
|
n.key || ``,
|
|
1238
1265
|
a,
|
|
@@ -1240,111 +1267,122 @@ function Kt(...e) {
|
|
|
1240
1267
|
o
|
|
1241
1268
|
];
|
|
1242
1269
|
}
|
|
1243
|
-
function
|
|
1244
|
-
|
|
1270
|
+
function $t(e, t, n) {
|
|
1271
|
+
Wt(e.__numberFormatters, t, n);
|
|
1245
1272
|
}
|
|
1246
|
-
const
|
|
1247
|
-
function
|
|
1273
|
+
const en = (e) => e, tn = (e) => ``, nn = `text`, rn = (e) => e.length === 0 ? `` : T(e), an = w;
|
|
1274
|
+
function X(e, t) {
|
|
1248
1275
|
return e = Math.abs(e), t === 2 ? e === 1 ? 0 : 1 : Math.min(e, 2);
|
|
1249
1276
|
}
|
|
1250
|
-
const
|
|
1277
|
+
const on = [
|
|
1251
1278
|
`zero`,
|
|
1252
1279
|
`one`,
|
|
1253
1280
|
`two`,
|
|
1254
1281
|
`few`,
|
|
1255
1282
|
`many`,
|
|
1256
1283
|
`other`
|
|
1257
|
-
],
|
|
1258
|
-
function
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
let
|
|
1262
|
-
|
|
1263
|
-
rules:
|
|
1264
|
-
categories:
|
|
1265
|
-
}
|
|
1284
|
+
], Z = /* @__PURE__ */ new Map();
|
|
1285
|
+
function sn(e) {
|
|
1286
|
+
try {
|
|
1287
|
+
if (Intl.PluralRules.supportedLocalesOf(e).length === 0) return null;
|
|
1288
|
+
let t = new Intl.PluralRules(e);
|
|
1289
|
+
return {
|
|
1290
|
+
rules: t,
|
|
1291
|
+
categories: t.resolvedOptions().pluralCategories.slice().sort((e, t) => on.indexOf(e) - on.indexOf(t))
|
|
1292
|
+
};
|
|
1293
|
+
} catch {
|
|
1294
|
+
return null;
|
|
1266
1295
|
}
|
|
1267
|
-
return t;
|
|
1268
1296
|
}
|
|
1269
|
-
function
|
|
1297
|
+
function cn(e) {
|
|
1298
|
+
let t = Z.get(e);
|
|
1299
|
+
return t === void 0 && (t = sn(e), Z.size >= 1e3 && Z.delete(Z.keys().next().value), Z.set(e, t)), t;
|
|
1300
|
+
}
|
|
1301
|
+
function ln(e) {
|
|
1270
1302
|
return i(e.pluralIndex) ? e.pluralIndex : i(e.named?.count) ? e.named.count : i(e.named?.n) ? e.named.n : -1;
|
|
1271
1303
|
}
|
|
1272
|
-
function
|
|
1273
|
-
let t = e.locale, n =
|
|
1274
|
-
r = _(t) && g(e.pluralRules
|
|
1275
|
-
let
|
|
1276
|
-
if (n >
|
|
1277
|
-
let a = r.select(Math.abs(e)),
|
|
1278
|
-
return Math.min(
|
|
1279
|
-
} :
|
|
1280
|
-
let a = r ===
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1304
|
+
function un(e = {}) {
|
|
1305
|
+
let t = e.locale, n = ln(e), r;
|
|
1306
|
+
r = _(t) && e.pluralRules && g(p(e.pluralRules, t)) ? e.pluralRules[t] : _(t) && typeof Intl < `u` && Intl.PluralRules !== void 0 ? (e, n) => {
|
|
1307
|
+
let r = cn(t);
|
|
1308
|
+
if (r === null || n > r.categories.length) return X(e, n);
|
|
1309
|
+
let { rules: i, categories: a } = r, o = i.select(Math.abs(e)), s = a.indexOf(o);
|
|
1310
|
+
return Math.min(s === -1 ? n - 1 : s, n - 1);
|
|
1311
|
+
} : X;
|
|
1312
|
+
let a = r === X ? void 0 : X, o = (e) => e[r(n, e.length, a)], s = e.list || [], l = (e) => s[e], d = e.named || u(), f = i(e.pluralIndex), v = (t) => {
|
|
1313
|
+
let n = m(t) ? p(d, t) : d[t];
|
|
1314
|
+
return f && n == null && (t === `count` || t === `n`) ? e.pluralIndex : n;
|
|
1315
|
+
};
|
|
1316
|
+
function b(t, n) {
|
|
1317
|
+
return (g(e.messages) ? e.messages(t, !!n) : y(e.messages) ? e.messages[t] : !1) || (e.parent ? e.parent.message(t) : tn);
|
|
1318
|
+
}
|
|
1319
|
+
let x = (t) => e.modifiers ? p(e.modifiers, t) : en, S = g(e.processor?.normalize) ? e.processor.normalize : rn, C = g(e.processor?.interpolate) ? e.processor.interpolate : an, w = {
|
|
1287
1320
|
list: l,
|
|
1288
|
-
named:
|
|
1321
|
+
named: v,
|
|
1289
1322
|
plural: o,
|
|
1290
1323
|
linked: (e, ...t) => {
|
|
1291
1324
|
let [n, r] = t, i = `text`, a = ``;
|
|
1292
1325
|
t.length === 1 ? y(n) ? (a = n.modifier || a, i = n.type || i) : _(n) && (a = n || a) : t.length === 2 && (_(n) && (a = n || a), _(r) && (i = r || i));
|
|
1293
|
-
let o =
|
|
1294
|
-
|
|
1326
|
+
let o = b(e, !0)(w), s = o === `` || o === void 0 ? e : o, c = i === `vnode` && h(s) && a ? s[0] : s;
|
|
1327
|
+
if (!a) return c;
|
|
1328
|
+
let l = x(a);
|
|
1329
|
+
return g(l) ? l(c, i) : c;
|
|
1295
1330
|
},
|
|
1296
|
-
message:
|
|
1297
|
-
type: _(e.processor?.type) ? e.processor.type :
|
|
1298
|
-
interpolate:
|
|
1299
|
-
normalize:
|
|
1300
|
-
values: c(u(), s, d
|
|
1331
|
+
message: b,
|
|
1332
|
+
type: _(e.processor?.type) ? e.processor.type : nn,
|
|
1333
|
+
interpolate: C,
|
|
1334
|
+
normalize: S,
|
|
1335
|
+
values: c(u(), s, d, f ? {
|
|
1336
|
+
count: v(`count`),
|
|
1337
|
+
n: v(`n`)
|
|
1338
|
+
} : {})
|
|
1301
1339
|
};
|
|
1302
|
-
return
|
|
1340
|
+
return w;
|
|
1303
1341
|
}
|
|
1304
|
-
const
|
|
1305
|
-
function
|
|
1306
|
-
let [n, r] =
|
|
1307
|
-
a &&
|
|
1342
|
+
const dn = () => ``, Q = (e) => g(e), $ = (e) => _(e) || B(e) || Q(e);
|
|
1343
|
+
function fn(e, ...t) {
|
|
1344
|
+
let [n, r] = gn(...t), i = Ye(e, r), a = v(r.escapeParameter) ? r.escapeParameter : e.escapeParameter;
|
|
1345
|
+
a && pn(r);
|
|
1308
1346
|
let o = !!r.resolvedMessage, [s, c, l] = o ? [
|
|
1309
1347
|
n,
|
|
1310
1348
|
i,
|
|
1311
|
-
e.messages
|
|
1312
|
-
] :
|
|
1349
|
+
p(e.messages, i) || u()
|
|
1350
|
+
] : mn(e, n, i, e.fallbackLocale, v(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, v(r.missingWarn) ? r.missingWarn : e.missingWarn), d = n;
|
|
1313
1351
|
if (!o && !$(s)) {
|
|
1314
1352
|
let t = _(r.default) ? r.default : v(r.default) || e.fallbackFormat ? e.messageCompiler ? n : () => n : null;
|
|
1315
1353
|
(e.fallbackFormat || t != null && (_(t) || g(t))) && (s = t, d = s);
|
|
1316
1354
|
}
|
|
1317
1355
|
if (!o && (!$(s) || !_(c))) return e.unresolving ? -1 : n;
|
|
1318
|
-
let f = !1,
|
|
1356
|
+
let f = !1, m = Q(s) ? s : hn(e, n, c, s, d, () => {
|
|
1319
1357
|
f = !0;
|
|
1320
1358
|
});
|
|
1321
1359
|
if (f) return s;
|
|
1322
|
-
let
|
|
1323
|
-
return a && _(
|
|
1360
|
+
let h = m(un(vn(e, c, l, r))), y = e.postTranslation ? e.postTranslation(h, n) : h;
|
|
1361
|
+
return a && _(y) && (y = fe(y)), y;
|
|
1324
1362
|
}
|
|
1325
|
-
function
|
|
1326
|
-
if (h(e.list) && (e.list = e.list.map((e) => _(e) ?
|
|
1363
|
+
function pn(e) {
|
|
1364
|
+
if (h(e.list) && (e.list = e.list.map((e) => _(e) ? D(e) : e)), y(e.named)) {
|
|
1327
1365
|
let t = e.named, n = u();
|
|
1328
1366
|
for (let e of Object.keys(t)) {
|
|
1329
1367
|
let r = t[e];
|
|
1330
|
-
n[e] = _(r) ?
|
|
1368
|
+
n[e] = _(r) ? D(r) : r;
|
|
1331
1369
|
}
|
|
1332
1370
|
e.named = n;
|
|
1333
1371
|
}
|
|
1334
1372
|
}
|
|
1335
|
-
function
|
|
1336
|
-
let { messages: o, onWarn: s, messageResolver: c, localeFallbacker: l } = e, d = l(e, r, n), f = u(),
|
|
1337
|
-
for (let n = 0; n < d.length && (
|
|
1338
|
-
let n =
|
|
1339
|
-
n !== t && (
|
|
1373
|
+
function mn(e, t, n, r, i, a) {
|
|
1374
|
+
let { messages: o, onWarn: s, messageResolver: c, localeFallbacker: l } = e, d = l(e, r, n), f = u(), m, h = null;
|
|
1375
|
+
for (let n = 0; n < d.length && (m = d[n], f = p(o, m) || u(), (h = c(f, t)) === null && (h = p(f, t)), !$(h)); n++) if (!Rt(m, d)) {
|
|
1376
|
+
let n = Pt(e, t, m, a, `translate`);
|
|
1377
|
+
n !== t && (h = n);
|
|
1340
1378
|
}
|
|
1341
1379
|
return [
|
|
1380
|
+
h,
|
|
1342
1381
|
m,
|
|
1343
|
-
p,
|
|
1344
1382
|
f
|
|
1345
1383
|
];
|
|
1346
1384
|
}
|
|
1347
|
-
function
|
|
1385
|
+
function hn(e, t, n, r, i, a) {
|
|
1348
1386
|
if (Q(r)) {
|
|
1349
1387
|
let e = r;
|
|
1350
1388
|
return e.locale = e.locale || n, e.key = e.key || t, e;
|
|
@@ -1353,16 +1391,16 @@ function ln(e, t, n, r, i, a) {
|
|
|
1353
1391
|
let e = (() => r);
|
|
1354
1392
|
return e.locale = n, e.key = t, e;
|
|
1355
1393
|
}
|
|
1356
|
-
let o = e.messageCompiler(r,
|
|
1394
|
+
let o = e.messageCompiler(r, _n(e, n, i, r, e.warnHtmlMessage, a));
|
|
1357
1395
|
return o.locale = n, o.key = t, o.source = r, o;
|
|
1358
1396
|
}
|
|
1359
|
-
function
|
|
1397
|
+
function gn(...e) {
|
|
1360
1398
|
let [t, n, r] = e;
|
|
1361
|
-
if (!_(t) && !i(t) && !Q(t) && !
|
|
1399
|
+
if (!_(t) && !i(t) && !Q(t) && !B(t)) throw Error(G.INVALID_ARGUMENT);
|
|
1362
1400
|
let a = i(t) ? String(t) : (Q(t), t), o = u();
|
|
1363
1401
|
return i(n) ? o.plural = n : _(n) ? o.default = n : C(n) && !s(n) ? o.named = n : h(n) && (o.list = n), i(r) ? o.plural = r : _(r) ? o.default = r : C(r) && c(o, r), [a, o];
|
|
1364
1402
|
}
|
|
1365
|
-
function
|
|
1403
|
+
function _n(e, t, r, i, a, o) {
|
|
1366
1404
|
return {
|
|
1367
1405
|
locale: t,
|
|
1368
1406
|
key: r,
|
|
@@ -1373,7 +1411,7 @@ function dn(e, t, r, i, a, o) {
|
|
|
1373
1411
|
onCacheKey: (e) => n(t, r, e)
|
|
1374
1412
|
};
|
|
1375
1413
|
}
|
|
1376
|
-
function
|
|
1414
|
+
function vn(e, t, n, r) {
|
|
1377
1415
|
let { modifiers: a, pluralRules: o, messageResolver: s, fallbackLocale: c, fallbackWarn: l, missingWarn: u, fallbackContext: d } = e;
|
|
1378
1416
|
return {
|
|
1379
1417
|
locale: t,
|
|
@@ -1382,16 +1420,16 @@ function fn(e, t, n, r) {
|
|
|
1382
1420
|
messages: (r, i) => {
|
|
1383
1421
|
let a = s(n, r);
|
|
1384
1422
|
if (a == null && (d || i)) {
|
|
1385
|
-
let [n, , i] =
|
|
1423
|
+
let [n, , i] = mn(d || e, r, t, c, l, u);
|
|
1386
1424
|
a = n ?? s(i, r);
|
|
1387
1425
|
}
|
|
1388
|
-
if (_(a) ||
|
|
1389
|
-
let n = !1, i =
|
|
1426
|
+
if (_(a) || B(a)) {
|
|
1427
|
+
let n = !1, i = hn(e, r, t, a, r, () => {
|
|
1390
1428
|
n = !0;
|
|
1391
1429
|
});
|
|
1392
|
-
return n ?
|
|
1430
|
+
return n ? dn : i;
|
|
1393
1431
|
}
|
|
1394
|
-
return Q(a) ? a :
|
|
1432
|
+
return Q(a) ? a : dn;
|
|
1395
1433
|
},
|
|
1396
1434
|
processor: e.processor ?? void 0,
|
|
1397
1435
|
list: r.list ?? void 0,
|
|
@@ -1399,4 +1437,4 @@ function fn(e, t, n, r) {
|
|
|
1399
1437
|
pluralIndex: i(r.plural) ? r.plural : void 0
|
|
1400
1438
|
};
|
|
1401
1439
|
}
|
|
1402
|
-
export {
|
|
1440
|
+
export { Re as AST_NODE_PROPS_KEYS, qe as CORE_ERROR_CODES_EXTEND_POINT, dt as CORE_WARN_CODES_EXTEND_POINT, J as CoreWarnCodes, qt as DATETIME_FORMAT_OPTIONS_KEYS, Y as DEFAULT_LOCALE, nn as DEFAULT_MESSAGE_DATA_TYPE, gt as MISSING_RESOLVE_VALUE, ht as NOT_RESOLVED, Zt as NUMBER_FORMAT_OPTIONS_KEYS, mt as VERSION, We as clearCompileCache, Yt as clearDateTimeFormat, $t as clearNumberFormat, Ke as compile, P as createCompileError, Et as createCoreContext, Je as createCoreError, un as createMessageContext, Kt as datetime, Qe as fallbackWithLocaleChain, Ze as fallbackWithSimple, Ye as getLocale, Ot as getLocaleMessage, pt as getWarnMessage, Pt as handleMissing, Lt as isAlmostSameLocale, At as isFallbackLocale, Rt as isImplicitFallback, B as isMessageAST, $ as isMessageFormat, Q as isMessageFunction, Mt as isTranslateFallbackWarn, Nt as isTranslateMissingWarn, jt as isWarnOption, Xt as number, st as parse, Jt as parseDateTimeArgs, Qt as parseNumberArgs, gn as parseTranslateArgs, wt as registerLocaleFallbacker, bt as registerMessageCompiler, St as registerMessageResolver, Xe as resolveLocale, ut as resolveValue, lt as resolveWithKeyValue, kt as setLocaleMessage, fn as translate, It as updateFallbackLocale };
|