gc_i18n 1.2.11 → 1.2.12
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/lib/gc_i18n.js +542 -534
- package/lib/gc_i18n.umd.cjs +9 -9
- package/package.json +1 -1
- package/packages/index.js +29 -9
package/lib/gc_i18n.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import './gc_i18n.css';
|
|
2
|
-
import
|
|
3
|
-
import _n, { Message as
|
|
2
|
+
import Ua from "keyboardjs";
|
|
3
|
+
import _n, { Message as tt } from "view-ui-plus";
|
|
4
4
|
import "view-ui-plus/dist/styles/viewuiplus.css";
|
|
5
|
-
import { defineComponent as Xt, h as Zn, getCurrentInstance as
|
|
5
|
+
import { defineComponent as Xt, h as Zn, getCurrentInstance as He, effectScope as Va, inject as Wa, onMounted as $a, onUnmounted as xa, Fragment as Jt, ref as Ga, shallowRef as Ka, computed as Ge, watch as Mt, isRef as Ya, createVNode as re, Text as Ha, resolveComponent as z, resolveDirective as Ba, createBlock as fe, openBlock as se, withCtx as ne, createElementBlock as mn, createCommentVNode as dn, createElementVNode as Ne, withDirectives as ja, createTextVNode as Ct, renderList as Xa, toDisplayString as gn, nextTick as Ja, createApp as Qa } from "vue";
|
|
6
6
|
import x from "lodash-es";
|
|
7
|
-
import
|
|
7
|
+
import it from "axios";
|
|
8
8
|
import pe from "store2";
|
|
9
|
-
import { jws as
|
|
9
|
+
import { jws as qa } from "jsrsasign";
|
|
10
10
|
/*!
|
|
11
11
|
* shared v11.1.3
|
|
12
12
|
* (c) 2025 kazuya kawaguchi
|
|
@@ -23,26 +23,26 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
23
23
|
e.measure(t, n, a), e.clearMarks(n), e.clearMarks(a);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
function
|
|
28
|
-
return t.length === 1 && M(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(
|
|
26
|
+
const Za = /\{([0-9a-zA-Z]+)\}/g;
|
|
27
|
+
function ct(e, ...t) {
|
|
28
|
+
return t.length === 1 && M(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(Za, (n, a) => t.hasOwnProperty(a) ? t[a] : "");
|
|
29
29
|
}
|
|
30
|
-
const de = (e, t = !1) => t ? Symbol.for(e) : Symbol(e),
|
|
30
|
+
const de = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), za = (e, t, n) => es({ l: e, k: t, s: n }), es = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), j = (e) => typeof e == "number" && isFinite(e), ts = (e) => Qt(e) === "[object Date]", Fe = (e) => Qt(e) === "[object RegExp]", ut = (e) => P(e) && Object.keys(e).length === 0, Q = Object.assign, ns = Object.create, W = (e = null) => ns(e);
|
|
31
31
|
let En;
|
|
32
32
|
const Se = () => En || (En = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : W());
|
|
33
33
|
function pn(e) {
|
|
34
34
|
return e.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const as = Object.prototype.hasOwnProperty;
|
|
37
37
|
function ce(e, t) {
|
|
38
|
-
return
|
|
38
|
+
return as.call(e, t);
|
|
39
39
|
}
|
|
40
|
-
const B = Array.isArray, $ = (e) => typeof e == "function", I = (e) => typeof e == "string", F = (e) => typeof e == "boolean", M = (e) => e !== null && typeof e == "object",
|
|
40
|
+
const B = Array.isArray, $ = (e) => typeof e == "function", I = (e) => typeof e == "string", F = (e) => typeof e == "boolean", M = (e) => e !== null && typeof e == "object", ss = (e) => M(e) && $(e.then) && $(e.catch), zn = Object.prototype.toString, Qt = (e) => zn.call(e), P = (e) => Qt(e) === "[object Object]", rs = (e) => e == null ? "" : B(e) || P(e) && e.toString === zn ? JSON.stringify(e, null, 2) : String(e);
|
|
41
41
|
function qt(e, t = "") {
|
|
42
42
|
return e.reduce((n, a, s) => s === 0 ? n + a : n + t + a, "");
|
|
43
43
|
}
|
|
44
44
|
const hn = 2;
|
|
45
|
-
function
|
|
45
|
+
function os(e, t = 0, n = e.length) {
|
|
46
46
|
const a = e.split(/\r?\n/);
|
|
47
47
|
let s = 0;
|
|
48
48
|
const r = [];
|
|
@@ -94,15 +94,15 @@ function zt() {
|
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
const
|
|
98
|
-
function
|
|
99
|
-
if (
|
|
97
|
+
const nt = (e) => !M(e) || B(e);
|
|
98
|
+
function rt(e, t) {
|
|
99
|
+
if (nt(e) || nt(t))
|
|
100
100
|
throw new Error("Invalid value");
|
|
101
101
|
const n = [{ src: e, des: t }];
|
|
102
102
|
for (; n.length; ) {
|
|
103
103
|
const { src: a, des: s } = n.pop();
|
|
104
104
|
Object.keys(a).forEach((r) => {
|
|
105
|
-
r !== "__proto__" && (M(a[r]) && !M(s[r]) && (s[r] = Array.isArray(a[r]) ? [] : W()),
|
|
105
|
+
r !== "__proto__" && (M(a[r]) && !M(s[r]) && (s[r] = Array.isArray(a[r]) ? [] : W()), nt(s[r]) || nt(a[r]) ? s[r] = a[r] : n.push({ src: a[r], des: s[r] }));
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -111,10 +111,10 @@ function st(e, t) {
|
|
|
111
111
|
* (c) 2025 kazuya kawaguchi
|
|
112
112
|
* Released under the MIT License.
|
|
113
113
|
*/
|
|
114
|
-
function
|
|
114
|
+
function ls(e, t, n) {
|
|
115
115
|
return { line: e, column: t, offset: n };
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Ft(e, t, n) {
|
|
118
118
|
return { start: e, end: t };
|
|
119
119
|
}
|
|
120
120
|
const k = {
|
|
@@ -138,7 +138,7 @@ const k = {
|
|
|
138
138
|
UNHANDLED_CODEGEN_NODE_TYPE: 15,
|
|
139
139
|
// minifier error codes
|
|
140
140
|
UNHANDLED_MINIFIER_NODE_TYPE: 16
|
|
141
|
-
},
|
|
141
|
+
}, is = 17, cs = {
|
|
142
142
|
// tokenizer error messages
|
|
143
143
|
[k.EXPECTED_TOKEN]: "Expected token: '{0}'",
|
|
144
144
|
[k.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
|
|
@@ -160,19 +160,19 @@ const k = {
|
|
|
160
160
|
// minimizer error messages
|
|
161
161
|
[k.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
|
|
162
162
|
};
|
|
163
|
-
function
|
|
164
|
-
const { domain: a, messages: s, args: r } = n, o = process.env.NODE_ENV !== "production" ?
|
|
163
|
+
function Ue(e, t, n = {}) {
|
|
164
|
+
const { domain: a, messages: s, args: r } = n, o = process.env.NODE_ENV !== "production" ? ct((s || cs)[e] || "", ...r || []) : e, l = new SyntaxError(String(o));
|
|
165
165
|
return l.code = e, t && (l.location = t), l.domain = a, l;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function us(e) {
|
|
168
168
|
throw e;
|
|
169
169
|
}
|
|
170
|
-
const
|
|
171
|
-
`,
|
|
172
|
-
function
|
|
170
|
+
const fs = /<\/?[\w\s="/.':;#-\/]+>/, _s = (e) => fs.test(e), Ee = " ", ms = "\r", Z = `
|
|
171
|
+
`, ds = "\u2028", gs = "\u2029";
|
|
172
|
+
function Es(e) {
|
|
173
173
|
const t = e;
|
|
174
174
|
let n = 0, a = 1, s = 1, r = 0;
|
|
175
|
-
const o = (h) => t[h] ===
|
|
175
|
+
const o = (h) => t[h] === ms && t[h + 1] === Z, l = (h) => t[h] === Z, u = (h) => t[h] === gs, _ = (h) => t[h] === ds, E = (h) => o(h) || l(h) || u(h) || _(h), N = () => n, p = () => a, S = () => s, D = () => r, v = (h) => o(h) || u(h) || _(h) ? Z : t[h], A = () => v(n), f = () => v(n + r);
|
|
176
176
|
function g() {
|
|
177
177
|
return r = 0, E(n) && (a++, s = 0), o(n) && n++, n++, s++, t[n];
|
|
178
178
|
}
|
|
@@ -206,9 +206,9 @@ function gs(e) {
|
|
|
206
206
|
skipToPeek: y
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
const Te = void 0,
|
|
210
|
-
function
|
|
211
|
-
const n = t.location !== !1, a =
|
|
209
|
+
const Te = void 0, ps = ".", Tn = "'", hs = "tokenizer";
|
|
210
|
+
function Ns(e, t = {}) {
|
|
211
|
+
const n = t.location !== !1, a = Es(e), s = () => a.index(), r = () => ls(a.line(), a.column(), a.index()), o = r(), l = s(), u = {
|
|
212
212
|
currentType: 13,
|
|
213
213
|
offset: l,
|
|
214
214
|
startLoc: o,
|
|
@@ -224,17 +224,17 @@ function hs(e, t = {}) {
|
|
|
224
224
|
function N(i, c, T, ...C) {
|
|
225
225
|
const K = _();
|
|
226
226
|
if (c.column += T, c.offset += T, E) {
|
|
227
|
-
const Y = n ?
|
|
228
|
-
domain:
|
|
227
|
+
const Y = n ? Ft(K.startLoc, c) : null, w = Ue(i, Y, {
|
|
228
|
+
domain: hs,
|
|
229
229
|
args: C
|
|
230
230
|
});
|
|
231
|
-
E(
|
|
231
|
+
E(w);
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
function p(i, c, T) {
|
|
235
235
|
i.endLoc = r(), i.currentType = c;
|
|
236
236
|
const C = { type: c };
|
|
237
|
-
return n && (C.loc =
|
|
237
|
+
return n && (C.loc = Ft(i.startLoc, i.endLoc)), T != null && (C.value = T), C;
|
|
238
238
|
}
|
|
239
239
|
const S = (i) => p(
|
|
240
240
|
i,
|
|
@@ -308,7 +308,7 @@ function hs(e, t = {}) {
|
|
|
308
308
|
const C = f(i.currentPeek());
|
|
309
309
|
return i.resetPeek(), C;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function R(i, c) {
|
|
312
312
|
const { currentType: T } = c;
|
|
313
313
|
if (!(T === 7 || T === 11))
|
|
314
314
|
return !1;
|
|
@@ -316,7 +316,7 @@ function hs(e, t = {}) {
|
|
|
316
316
|
const C = i.currentPeek() === ":";
|
|
317
317
|
return i.resetPeek(), C;
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function U(i, c) {
|
|
320
320
|
const { currentType: T } = c;
|
|
321
321
|
if (T !== 9)
|
|
322
322
|
return !1;
|
|
@@ -333,8 +333,8 @@ function hs(e, t = {}) {
|
|
|
333
333
|
}
|
|
334
334
|
function ie(i, c = !0) {
|
|
335
335
|
const T = (K = !1, Y = "") => {
|
|
336
|
-
const
|
|
337
|
-
return
|
|
336
|
+
const w = i.currentPeek();
|
|
337
|
+
return w === "{" || w === "@" || !w ? K : w === "|" ? !(Y === Ee || Y === Z) : w === Ee ? (i.peek(), T(!0, Ee)) : w === Z ? (i.peek(), T(!0, Z)) : !0;
|
|
338
338
|
}, C = T();
|
|
339
339
|
return c && i.resetPeek(), C;
|
|
340
340
|
}
|
|
@@ -350,10 +350,10 @@ function hs(e, t = {}) {
|
|
|
350
350
|
c === 95 || // _
|
|
351
351
|
c === 36;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function mt(i) {
|
|
354
354
|
return J(i, ke);
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function dt(i) {
|
|
357
357
|
const c = i.charCodeAt(0);
|
|
358
358
|
return c >= 97 && c <= 122 || // a-z
|
|
359
359
|
c >= 65 && c <= 90 || // A-Z
|
|
@@ -362,32 +362,32 @@ function hs(e, t = {}) {
|
|
|
362
362
|
c === 36 || // $
|
|
363
363
|
c === 45;
|
|
364
364
|
}
|
|
365
|
-
function dt(i) {
|
|
366
|
-
return J(i, mt);
|
|
367
|
-
}
|
|
368
365
|
function gt(i) {
|
|
369
|
-
|
|
370
|
-
return c >= 48 && c <= 57;
|
|
366
|
+
return J(i, dt);
|
|
371
367
|
}
|
|
372
368
|
function Et(i) {
|
|
373
|
-
|
|
369
|
+
const c = i.charCodeAt(0);
|
|
370
|
+
return c >= 48 && c <= 57;
|
|
374
371
|
}
|
|
375
372
|
function pt(i) {
|
|
373
|
+
return J(i, Et);
|
|
374
|
+
}
|
|
375
|
+
function ht(i) {
|
|
376
376
|
const c = i.charCodeAt(0);
|
|
377
377
|
return c >= 48 && c <= 57 || // 0-9
|
|
378
378
|
c >= 65 && c <= 70 || // A-F
|
|
379
379
|
c >= 97 && c <= 102;
|
|
380
380
|
}
|
|
381
381
|
function ge(i) {
|
|
382
|
-
return J(i,
|
|
382
|
+
return J(i, ht);
|
|
383
383
|
}
|
|
384
384
|
function Ve(i) {
|
|
385
385
|
let c = "", T = "";
|
|
386
|
-
for (; c =
|
|
386
|
+
for (; c = pt(i); )
|
|
387
387
|
T += c;
|
|
388
388
|
return T;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function Nt(i) {
|
|
391
391
|
let c = "";
|
|
392
392
|
for (; ; ) {
|
|
393
393
|
const T = i.currentChar();
|
|
@@ -406,44 +406,44 @@ function hs(e, t = {}) {
|
|
|
406
406
|
}
|
|
407
407
|
return c;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function Tt(i) {
|
|
410
410
|
A(i);
|
|
411
411
|
let c = "", T = "";
|
|
412
|
-
for (; c =
|
|
412
|
+
for (; c = gt(i); )
|
|
413
413
|
T += c;
|
|
414
414
|
return i.currentChar() === Te && N(k.UNTERMINATED_CLOSING_BRACE, r(), 0), T;
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function Lt(i) {
|
|
417
417
|
A(i);
|
|
418
418
|
let c = "";
|
|
419
419
|
return i.currentChar() === "-" ? (i.next(), c += `-${Ve(i)}`) : c += Ve(i), i.currentChar() === Te && N(k.UNTERMINATED_CLOSING_BRACE, r(), 0), c;
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function bt(i) {
|
|
422
422
|
return i !== Tn && i !== Z;
|
|
423
423
|
}
|
|
424
424
|
function un(i) {
|
|
425
425
|
A(i), D(i, "'");
|
|
426
426
|
let c = "", T = "";
|
|
427
|
-
for (; c = J(i,
|
|
428
|
-
c === "\\" ? T +=
|
|
427
|
+
for (; c = J(i, bt); )
|
|
428
|
+
c === "\\" ? T += Ot(i) : T += c;
|
|
429
429
|
const C = i.currentChar();
|
|
430
430
|
return C === Z || C === Te ? (N(k.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, r(), 0), C === Z && (i.next(), D(i, "'")), T) : (D(i, "'"), T);
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function Ot(i) {
|
|
433
433
|
const c = i.currentChar();
|
|
434
434
|
switch (c) {
|
|
435
435
|
case "\\":
|
|
436
436
|
case "'":
|
|
437
437
|
return i.next(), `\\${c}`;
|
|
438
438
|
case "u":
|
|
439
|
-
return
|
|
439
|
+
return ze(i, c, 4);
|
|
440
440
|
case "U":
|
|
441
|
-
return
|
|
441
|
+
return ze(i, c, 6);
|
|
442
442
|
default:
|
|
443
443
|
return N(k.UNKNOWN_ESCAPE_SEQUENCE, r(), 0, c), "";
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function ze(i, c, T) {
|
|
447
447
|
D(i, c);
|
|
448
448
|
let C = "";
|
|
449
449
|
for (let K = 0; K < T; K++) {
|
|
@@ -456,23 +456,23 @@ function hs(e, t = {}) {
|
|
|
456
456
|
}
|
|
457
457
|
return `\\${c}${C}`;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function It(i) {
|
|
460
460
|
return i !== "{" && i !== "}" && i !== Ee && i !== Z;
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function vt(i) {
|
|
463
463
|
A(i);
|
|
464
464
|
let c = "", T = "";
|
|
465
|
-
for (; c = J(i,
|
|
465
|
+
for (; c = J(i, It); )
|
|
466
466
|
T += c;
|
|
467
467
|
return T;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function yt(i) {
|
|
470
470
|
let c = "", T = "";
|
|
471
|
-
for (; c =
|
|
471
|
+
for (; c = mt(i); )
|
|
472
472
|
T += c;
|
|
473
473
|
return T;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function St(i) {
|
|
476
476
|
const c = (T) => {
|
|
477
477
|
const C = i.currentChar();
|
|
478
478
|
return C === "{" || C === "@" || C === "|" || C === "(" || C === ")" || !C || C === Ee ? T : (T += C, i.next(), c(T));
|
|
@@ -508,19 +508,19 @@ function hs(e, t = {}) {
|
|
|
508
508
|
case "@":
|
|
509
509
|
return c.braceNest > 0 && N(k.UNTERMINATED_CLOSING_BRACE, r(), 0), T = Ie(i, c) || S(c), c.braceNest = 0, T;
|
|
510
510
|
default: {
|
|
511
|
-
let K = !0, Y = !0,
|
|
511
|
+
let K = !0, Y = !0, w = !0;
|
|
512
512
|
if (X(i))
|
|
513
513
|
return c.braceNest > 0 && N(k.UNTERMINATED_CLOSING_BRACE, r(), 0), T = p(c, 1, We(i)), c.braceNest = 0, c.inLinked = !1, T;
|
|
514
514
|
if (c.braceNest > 0 && (c.currentType === 4 || c.currentType === 5 || c.currentType === 6))
|
|
515
515
|
return N(k.UNTERMINATED_CLOSING_BRACE, r(), 0), c.braceNest = 0, xe(i, c);
|
|
516
516
|
if (K = b(i, c))
|
|
517
|
-
return T = p(c, 4,
|
|
517
|
+
return T = p(c, 4, Tt(i)), A(i), T;
|
|
518
518
|
if (Y = m(i, c))
|
|
519
|
-
return T = p(c, 5,
|
|
520
|
-
if (
|
|
519
|
+
return T = p(c, 5, Lt(i)), A(i), T;
|
|
520
|
+
if (w = O(i, c))
|
|
521
521
|
return T = p(c, 6, un(i)), A(i), T;
|
|
522
|
-
if (!K && !Y && !
|
|
523
|
-
return T = p(c, 12,
|
|
522
|
+
if (!K && !Y && !w)
|
|
523
|
+
return T = p(c, 12, vt(i)), N(k.INVALID_TOKEN_IN_PLACEHOLDER, r(), 0, T.value), A(i), T;
|
|
524
524
|
break;
|
|
525
525
|
}
|
|
526
526
|
}
|
|
@@ -553,7 +553,7 @@ function hs(e, t = {}) {
|
|
|
553
553
|
/* TokenChars.LinkedDelimiter */
|
|
554
554
|
);
|
|
555
555
|
default:
|
|
556
|
-
return X(i) ? (C = p(c, 1, We(i)), c.braceNest = 0, c.inLinked = !1, C) : y(i, c) ||
|
|
556
|
+
return X(i) ? (C = p(c, 1, We(i)), c.braceNest = 0, c.inLinked = !1, C) : y(i, c) || R(i, c) ? (A(i), Ie(i, c)) : h(i, c) ? (A(i), p(c, 11, yt(i))) : U(i, c) ? (A(i), K === "{" ? $e(i, c) || C : p(c, 10, St(i))) : (T === 7 && N(k.INVALID_LINKED_FORMAT, r(), 0), c.braceNest = 0, c.inLinked = !1, xe(i, c));
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
function xe(i, c) {
|
|
@@ -581,13 +581,13 @@ function hs(e, t = {}) {
|
|
|
581
581
|
if (X(i))
|
|
582
582
|
return T = p(c, 1, We(i)), c.braceNest = 0, c.inLinked = !1, T;
|
|
583
583
|
if (ie(i))
|
|
584
|
-
return p(c, 0,
|
|
584
|
+
return p(c, 0, Nt(i));
|
|
585
585
|
break;
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
return T;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function At() {
|
|
591
591
|
const { currentType: i, offset: c, startLoc: T, endLoc: C } = u;
|
|
592
592
|
return u.lastType = i, u.lastOffset = c, u.lastStartLoc = T, u.lastEndLoc = C, u.offset = s(), u.startLoc = r(), a.currentChar() === Te ? p(
|
|
593
593
|
u,
|
|
@@ -596,14 +596,14 @@ function hs(e, t = {}) {
|
|
|
596
596
|
) : xe(a, u);
|
|
597
597
|
}
|
|
598
598
|
return {
|
|
599
|
-
nextToken:
|
|
599
|
+
nextToken: At,
|
|
600
600
|
currentOffset: s,
|
|
601
601
|
currentPosition: r,
|
|
602
602
|
context: _
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
|
-
const
|
|
606
|
-
function
|
|
605
|
+
const Ts = "parser", Ls = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
|
|
606
|
+
function bs(e, t, n) {
|
|
607
607
|
switch (e) {
|
|
608
608
|
case "\\\\":
|
|
609
609
|
return "\\";
|
|
@@ -616,16 +616,16 @@ function Ls(e, t, n) {
|
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function Os(e = {}) {
|
|
620
620
|
const t = e.location !== !1, { onError: n } = e;
|
|
621
621
|
function a(f, g, b, m, ...O) {
|
|
622
622
|
const y = f.currentPosition();
|
|
623
623
|
if (y.offset += m, y.column += m, n) {
|
|
624
|
-
const h = t ?
|
|
625
|
-
domain:
|
|
624
|
+
const h = t ? Ft(b, y) : null, R = Ue(g, h, {
|
|
625
|
+
domain: Ts,
|
|
626
626
|
args: O
|
|
627
627
|
});
|
|
628
|
-
n(
|
|
628
|
+
n(R);
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
function s(f, g, b) {
|
|
@@ -649,7 +649,7 @@ function bs(e = {}) {
|
|
|
649
649
|
}
|
|
650
650
|
function _(f, g) {
|
|
651
651
|
const b = f.context(), { lastOffset: m, lastStartLoc: O } = b, y = s(9, m, O);
|
|
652
|
-
return y.value = g.replace(
|
|
652
|
+
return y.value = g.replace(Ls, bs), f.nextToken(), r(y, f.currentOffset(), f.currentPosition()), y;
|
|
653
653
|
}
|
|
654
654
|
function E(f) {
|
|
655
655
|
const g = f.nextToken(), b = f.context(), { lastOffset: m, lastStartLoc: O } = b, y = s(8, m, O);
|
|
@@ -702,19 +702,19 @@ function bs(e = {}) {
|
|
|
702
702
|
O.items = [];
|
|
703
703
|
let y = null;
|
|
704
704
|
do {
|
|
705
|
-
const
|
|
706
|
-
switch (y = null,
|
|
705
|
+
const U = y || f.nextToken();
|
|
706
|
+
switch (y = null, U.type) {
|
|
707
707
|
case 0:
|
|
708
|
-
|
|
708
|
+
U.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, _e(U)), O.items.push(o(f, U.value || ""));
|
|
709
709
|
break;
|
|
710
710
|
case 5:
|
|
711
|
-
|
|
711
|
+
U.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, _e(U)), O.items.push(l(f, U.value || ""));
|
|
712
712
|
break;
|
|
713
713
|
case 4:
|
|
714
|
-
|
|
714
|
+
U.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, _e(U)), O.items.push(u(f, U.value || ""));
|
|
715
715
|
break;
|
|
716
716
|
case 6:
|
|
717
|
-
|
|
717
|
+
U.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, _e(U)), O.items.push(_(f, U.value || ""));
|
|
718
718
|
break;
|
|
719
719
|
case 7: {
|
|
720
720
|
const X = p(f);
|
|
@@ -723,8 +723,8 @@ function bs(e = {}) {
|
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
725
|
} while (g.currentType !== 13 && g.currentType !== 1);
|
|
726
|
-
const h = g.currentType === 1 ? g.lastOffset : f.currentOffset(),
|
|
727
|
-
return r(O, h,
|
|
726
|
+
const h = g.currentType === 1 ? g.lastOffset : f.currentOffset(), R = g.currentType === 1 ? g.lastEndLoc : f.currentPosition();
|
|
727
|
+
return r(O, h, R), O;
|
|
728
728
|
}
|
|
729
729
|
function D(f, g, b, m) {
|
|
730
730
|
const O = f.context();
|
|
@@ -732,8 +732,8 @@ function bs(e = {}) {
|
|
|
732
732
|
const h = s(1, g, b);
|
|
733
733
|
h.cases = [], h.cases.push(m);
|
|
734
734
|
do {
|
|
735
|
-
const
|
|
736
|
-
y || (y =
|
|
735
|
+
const R = S(f);
|
|
736
|
+
y || (y = R.items.length === 0), h.cases.push(R);
|
|
737
737
|
} while (O.currentType !== 13);
|
|
738
738
|
return y && a(f, k.MUST_HAVE_MESSAGES_IN_PLURAL, b, 0), r(h, f.currentOffset(), f.currentPosition()), h;
|
|
739
739
|
}
|
|
@@ -742,7 +742,7 @@ function bs(e = {}) {
|
|
|
742
742
|
return g.currentType === 13 ? O : D(f, b, m, O);
|
|
743
743
|
}
|
|
744
744
|
function A(f) {
|
|
745
|
-
const g =
|
|
745
|
+
const g = Ns(f, Q({}, e)), b = g.context(), m = s(0, b.offset, b.startLoc);
|
|
746
746
|
return t && m.loc && (m.loc.source = f), m.body = v(g), e.onCacheKey && (m.cacheKey = e.onCacheKey(f)), b.currentType !== 13 && a(g, k.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, f[b.offset] || ""), r(m, g.currentOffset(), g.currentPosition()), m;
|
|
747
747
|
}
|
|
748
748
|
return { parse: A };
|
|
@@ -753,7 +753,7 @@ function _e(e) {
|
|
|
753
753
|
const t = (e.value || "").replace(/\r?\n/gu, "\\n");
|
|
754
754
|
return t.length > 10 ? t.slice(0, 9) + "…" : t;
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function Is(e, t = {}) {
|
|
757
757
|
const n = {
|
|
758
758
|
ast: e,
|
|
759
759
|
helpers: /* @__PURE__ */ new Set()
|
|
@@ -805,8 +805,8 @@ function en(e, t) {
|
|
|
805
805
|
break;
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
|
-
function
|
|
809
|
-
const n =
|
|
808
|
+
function vs(e, t = {}) {
|
|
809
|
+
const n = Is(e);
|
|
810
810
|
n.helper(
|
|
811
811
|
"normalize"
|
|
812
812
|
/* HelperNameMap.NORMALIZE */
|
|
@@ -814,7 +814,7 @@ function Is(e, t = {}) {
|
|
|
814
814
|
const a = n.context();
|
|
815
815
|
e.helpers = Array.from(a.helpers);
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function ys(e) {
|
|
818
818
|
const t = e.body;
|
|
819
819
|
return t.type === 2 ? bn(t) : t.cases.forEach((n) => bn(n)), e;
|
|
820
820
|
}
|
|
@@ -839,7 +839,7 @@ function bn(e) {
|
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
|
-
const
|
|
842
|
+
const Ss = "minifier";
|
|
843
843
|
function Me(e) {
|
|
844
844
|
switch (e.t = e.type, e.type) {
|
|
845
845
|
case 0: {
|
|
@@ -886,15 +886,15 @@ function Me(e) {
|
|
|
886
886
|
}
|
|
887
887
|
default:
|
|
888
888
|
if (process.env.NODE_ENV !== "production")
|
|
889
|
-
throw
|
|
890
|
-
domain:
|
|
889
|
+
throw Ue(k.UNHANDLED_MINIFIER_NODE_TYPE, null, {
|
|
890
|
+
domain: Ss,
|
|
891
891
|
args: [e.type]
|
|
892
892
|
});
|
|
893
893
|
}
|
|
894
894
|
delete e.type;
|
|
895
895
|
}
|
|
896
|
-
const
|
|
897
|
-
function
|
|
896
|
+
const As = "parser";
|
|
897
|
+
function Cs(e, t) {
|
|
898
898
|
const { filename: n, breakLineCode: a, needIndent: s } = t, r = t.location !== !1, o = {
|
|
899
899
|
filename: n,
|
|
900
900
|
code: "",
|
|
@@ -936,25 +936,25 @@ function As(e, t) {
|
|
|
936
936
|
needIndent: () => o.needIndent
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Ds(e, t) {
|
|
940
940
|
const { helper: n } = e;
|
|
941
941
|
e.push(`${n(
|
|
942
942
|
"linked"
|
|
943
943
|
/* HelperNameMap.LINKED */
|
|
944
|
-
)}(`),
|
|
944
|
+
)}(`), we(e, t.key), t.modifier ? (e.push(", "), we(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
|
|
945
945
|
}
|
|
946
|
-
function
|
|
946
|
+
function ks(e, t) {
|
|
947
947
|
const { helper: n, needIndent: a } = e;
|
|
948
948
|
e.push(`${n(
|
|
949
949
|
"normalize"
|
|
950
950
|
/* HelperNameMap.NORMALIZE */
|
|
951
951
|
)}([`), e.indent(a());
|
|
952
952
|
const s = t.items.length;
|
|
953
|
-
for (let r = 0; r < s && (
|
|
953
|
+
for (let r = 0; r < s && (we(e, t.items[r]), r !== s - 1); r++)
|
|
954
954
|
e.push(", ");
|
|
955
955
|
e.deindent(a()), e.push("])");
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function Rs(e, t) {
|
|
958
958
|
const { helper: n, needIndent: a } = e;
|
|
959
959
|
if (t.cases.length > 1) {
|
|
960
960
|
e.push(`${n(
|
|
@@ -962,28 +962,28 @@ function ks(e, t) {
|
|
|
962
962
|
/* HelperNameMap.PLURAL */
|
|
963
963
|
)}([`), e.indent(a());
|
|
964
964
|
const s = t.cases.length;
|
|
965
|
-
for (let r = 0; r < s && (
|
|
965
|
+
for (let r = 0; r < s && (we(e, t.cases[r]), r !== s - 1); r++)
|
|
966
966
|
e.push(", ");
|
|
967
967
|
e.deindent(a()), e.push("])");
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
970
|
function Ps(e, t) {
|
|
971
|
-
t.body ?
|
|
971
|
+
t.body ? we(e, t.body) : e.push("null");
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function we(e, t) {
|
|
974
974
|
const { helper: n } = e;
|
|
975
975
|
switch (t.type) {
|
|
976
976
|
case 0:
|
|
977
977
|
Ps(e, t);
|
|
978
978
|
break;
|
|
979
979
|
case 1:
|
|
980
|
-
|
|
980
|
+
Rs(e, t);
|
|
981
981
|
break;
|
|
982
982
|
case 2:
|
|
983
|
-
|
|
983
|
+
ks(e, t);
|
|
984
984
|
break;
|
|
985
985
|
case 6:
|
|
986
|
-
|
|
986
|
+
Ds(e, t);
|
|
987
987
|
break;
|
|
988
988
|
case 8:
|
|
989
989
|
e.push(JSON.stringify(t.value), t);
|
|
@@ -1017,22 +1017,22 @@ function Ue(e, t) {
|
|
|
1017
1017
|
break;
|
|
1018
1018
|
default:
|
|
1019
1019
|
if (process.env.NODE_ENV !== "production")
|
|
1020
|
-
throw
|
|
1021
|
-
domain:
|
|
1020
|
+
throw Ue(k.UNHANDLED_CODEGEN_NODE_TYPE, null, {
|
|
1021
|
+
domain: As,
|
|
1022
1022
|
args: [t.type]
|
|
1023
1023
|
});
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
|
-
const
|
|
1026
|
+
const Ms = (e, t = {}) => {
|
|
1027
1027
|
const n = I(t.mode) ? t.mode : "normal", a = I(t.filename) ? t.filename : "message.intl";
|
|
1028
1028
|
t.sourceMap;
|
|
1029
1029
|
const s = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
|
|
1030
|
-
`, r = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], l =
|
|
1030
|
+
`, r = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], l = Cs(e, {
|
|
1031
1031
|
filename: a,
|
|
1032
1032
|
breakLineCode: s,
|
|
1033
1033
|
needIndent: r
|
|
1034
1034
|
});
|
|
1035
|
-
l.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), l.indent(r), o.length > 0 && (l.push(`const { ${qt(o.map((E) => `${E}: _${E}`), ", ")} } = ctx`), l.newline()), l.push("return "),
|
|
1035
|
+
l.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), l.indent(r), o.length > 0 && (l.push(`const { ${qt(o.map((E) => `${E}: _${E}`), ", ")} } = ctx`), l.newline()), l.push("return "), we(l, e), l.deindent(r), l.push("}"), delete e.helpers;
|
|
1036
1036
|
const { code: u, map: _ } = l.context();
|
|
1037
1037
|
return {
|
|
1038
1038
|
ast: e,
|
|
@@ -1041,16 +1041,16 @@ const Rs = (e, t = {}) => {
|
|
|
1041
1041
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1042
1042
|
};
|
|
1043
1043
|
};
|
|
1044
|
-
function
|
|
1045
|
-
const n = Q({}, t), a = !!n.jit, s = !!n.minify, r = n.optimize == null ? !0 : n.optimize, l =
|
|
1046
|
-
return a ? (r &&
|
|
1044
|
+
function Fs(e, t = {}) {
|
|
1045
|
+
const n = Q({}, t), a = !!n.jit, s = !!n.minify, r = n.optimize == null ? !0 : n.optimize, l = Os(n).parse(e);
|
|
1046
|
+
return a ? (r && ys(l), s && Me(l), { ast: l, code: "" }) : (vs(l, n), Ms(l, n));
|
|
1047
1047
|
}
|
|
1048
1048
|
/*!
|
|
1049
1049
|
* core-base v11.1.3
|
|
1050
1050
|
* (c) 2025 kazuya kawaguchi
|
|
1051
1051
|
* Released under the MIT License.
|
|
1052
1052
|
*/
|
|
1053
|
-
function
|
|
1053
|
+
function ws() {
|
|
1054
1054
|
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Se().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Se().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
|
|
1055
1055
|
}
|
|
1056
1056
|
function le(e) {
|
|
@@ -1061,15 +1061,15 @@ function Us(e) {
|
|
|
1061
1061
|
return be(e, ea);
|
|
1062
1062
|
}
|
|
1063
1063
|
const ta = ["c", "cases"];
|
|
1064
|
-
function
|
|
1064
|
+
function Vs(e) {
|
|
1065
1065
|
return be(e, ta, []);
|
|
1066
1066
|
}
|
|
1067
1067
|
const na = ["s", "static"];
|
|
1068
|
-
function
|
|
1068
|
+
function Ws(e) {
|
|
1069
1069
|
return be(e, na);
|
|
1070
1070
|
}
|
|
1071
1071
|
const aa = ["i", "items"];
|
|
1072
|
-
function
|
|
1072
|
+
function $s(e) {
|
|
1073
1073
|
return be(e, aa, []);
|
|
1074
1074
|
}
|
|
1075
1075
|
const sa = ["t", "type"];
|
|
@@ -1077,22 +1077,22 @@ function tn(e) {
|
|
|
1077
1077
|
return be(e, sa);
|
|
1078
1078
|
}
|
|
1079
1079
|
const ra = ["v", "value"];
|
|
1080
|
-
function
|
|
1080
|
+
function at(e, t) {
|
|
1081
1081
|
const n = be(e, ra);
|
|
1082
1082
|
if (n != null)
|
|
1083
1083
|
return n;
|
|
1084
|
-
throw
|
|
1084
|
+
throw Be(t);
|
|
1085
1085
|
}
|
|
1086
1086
|
const oa = ["m", "modifier"];
|
|
1087
|
-
function
|
|
1087
|
+
function xs(e) {
|
|
1088
1088
|
return be(e, oa);
|
|
1089
1089
|
}
|
|
1090
1090
|
const la = ["k", "key"];
|
|
1091
|
-
function
|
|
1091
|
+
function Gs(e) {
|
|
1092
1092
|
const t = be(e, la);
|
|
1093
1093
|
if (t)
|
|
1094
1094
|
return t;
|
|
1095
|
-
throw
|
|
1095
|
+
throw Be(
|
|
1096
1096
|
6
|
|
1097
1097
|
/* NodeTypes.Linked */
|
|
1098
1098
|
);
|
|
@@ -1115,21 +1115,21 @@ const ia = [
|
|
|
1115
1115
|
...ra,
|
|
1116
1116
|
...sa
|
|
1117
1117
|
];
|
|
1118
|
-
function
|
|
1118
|
+
function Be(e) {
|
|
1119
1119
|
return new Error(`unhandled node type: ${e}`);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1122
|
-
return (n) =>
|
|
1121
|
+
function Dt(e) {
|
|
1122
|
+
return (n) => Ks(n, e);
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1124
|
+
function Ks(e, t) {
|
|
1125
1125
|
const n = Us(t);
|
|
1126
1126
|
if (n == null)
|
|
1127
|
-
throw
|
|
1127
|
+
throw Be(
|
|
1128
1128
|
0
|
|
1129
1129
|
/* NodeTypes.Resource */
|
|
1130
1130
|
);
|
|
1131
1131
|
if (tn(n) === 1) {
|
|
1132
|
-
const r =
|
|
1132
|
+
const r = Vs(n);
|
|
1133
1133
|
return e.plural(r.reduce((o, l) => [
|
|
1134
1134
|
...o,
|
|
1135
1135
|
On(e, l)
|
|
@@ -1138,28 +1138,28 @@ function Gs(e, t) {
|
|
|
1138
1138
|
return On(e, n);
|
|
1139
1139
|
}
|
|
1140
1140
|
function On(e, t) {
|
|
1141
|
-
const n =
|
|
1141
|
+
const n = Ws(t);
|
|
1142
1142
|
if (n != null)
|
|
1143
1143
|
return e.type === "text" ? n : e.normalize([n]);
|
|
1144
1144
|
{
|
|
1145
|
-
const a =
|
|
1145
|
+
const a = $s(t).reduce((s, r) => [...s, wt(e, r)], []);
|
|
1146
1146
|
return e.normalize(a);
|
|
1147
1147
|
}
|
|
1148
1148
|
}
|
|
1149
|
-
function
|
|
1149
|
+
function wt(e, t) {
|
|
1150
1150
|
const n = tn(t);
|
|
1151
1151
|
switch (n) {
|
|
1152
1152
|
case 3:
|
|
1153
|
-
return
|
|
1153
|
+
return at(t, n);
|
|
1154
1154
|
case 9:
|
|
1155
|
-
return
|
|
1155
|
+
return at(t, n);
|
|
1156
1156
|
case 4: {
|
|
1157
1157
|
const a = t;
|
|
1158
1158
|
if (ce(a, "k") && a.k)
|
|
1159
1159
|
return e.interpolate(e.named(a.k));
|
|
1160
1160
|
if (ce(a, "key") && a.key)
|
|
1161
1161
|
return e.interpolate(e.named(a.key));
|
|
1162
|
-
throw
|
|
1162
|
+
throw Be(n);
|
|
1163
1163
|
}
|
|
1164
1164
|
case 5: {
|
|
1165
1165
|
const a = t;
|
|
@@ -1167,76 +1167,76 @@ function Ft(e, t) {
|
|
|
1167
1167
|
return e.interpolate(e.list(a.i));
|
|
1168
1168
|
if (ce(a, "index") && j(a.index))
|
|
1169
1169
|
return e.interpolate(e.list(a.index));
|
|
1170
|
-
throw
|
|
1170
|
+
throw Be(n);
|
|
1171
1171
|
}
|
|
1172
1172
|
case 6: {
|
|
1173
|
-
const a = t, s =
|
|
1174
|
-
return e.linked(
|
|
1173
|
+
const a = t, s = xs(a), r = Gs(a);
|
|
1174
|
+
return e.linked(wt(e, r), s ? wt(e, s) : void 0, e.type);
|
|
1175
1175
|
}
|
|
1176
1176
|
case 7:
|
|
1177
|
-
return
|
|
1177
|
+
return at(t, n);
|
|
1178
1178
|
case 8:
|
|
1179
|
-
return
|
|
1179
|
+
return at(t, n);
|
|
1180
1180
|
default:
|
|
1181
1181
|
throw new Error(`unhandled node on format message part: ${n}`);
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
|
-
const
|
|
1185
|
-
function
|
|
1186
|
-
t &&
|
|
1184
|
+
const Ys = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
|
|
1185
|
+
function Hs(e, t) {
|
|
1186
|
+
t && _s(e) && Le(ct(Ys, { source: e }));
|
|
1187
1187
|
}
|
|
1188
|
-
const
|
|
1189
|
-
let
|
|
1190
|
-
function
|
|
1188
|
+
const Bs = (e) => e;
|
|
1189
|
+
let st = W();
|
|
1190
|
+
function js(e, t = {}) {
|
|
1191
1191
|
let n = !1;
|
|
1192
|
-
const a = t.onError ||
|
|
1192
|
+
const a = t.onError || us;
|
|
1193
1193
|
return t.onError = (s) => {
|
|
1194
1194
|
n = !0, a(s);
|
|
1195
|
-
}, { ...
|
|
1195
|
+
}, { ...Fs(e, t), detectError: n };
|
|
1196
1196
|
}
|
|
1197
1197
|
// @__NO_SIDE_EFFECTS__
|
|
1198
|
-
function
|
|
1198
|
+
function Xs(e, t) {
|
|
1199
1199
|
if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && I(e)) {
|
|
1200
1200
|
const n = F(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
|
|
1201
|
-
process.env.NODE_ENV !== "production" &&
|
|
1202
|
-
const s = (t.onCacheKey ||
|
|
1201
|
+
process.env.NODE_ENV !== "production" && Hs(e, n);
|
|
1202
|
+
const s = (t.onCacheKey || Bs)(e), r = st[s];
|
|
1203
1203
|
if (r)
|
|
1204
1204
|
return r;
|
|
1205
|
-
const { ast: o, detectError: l } =
|
|
1205
|
+
const { ast: o, detectError: l } = js(e, {
|
|
1206
1206
|
...t,
|
|
1207
1207
|
location: process.env.NODE_ENV !== "production",
|
|
1208
1208
|
jit: !0
|
|
1209
|
-
}), u =
|
|
1210
|
-
return l ? u :
|
|
1209
|
+
}), u = Dt(o);
|
|
1210
|
+
return l ? u : st[s] = u;
|
|
1211
1211
|
} else {
|
|
1212
1212
|
if (process.env.NODE_ENV !== "production" && !le(e))
|
|
1213
1213
|
return Le(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), () => e;
|
|
1214
1214
|
const n = e.cacheKey;
|
|
1215
1215
|
if (n) {
|
|
1216
|
-
const a =
|
|
1217
|
-
return a || (
|
|
1216
|
+
const a = st[n];
|
|
1217
|
+
return a || (st[n] = Dt(e));
|
|
1218
1218
|
} else
|
|
1219
|
-
return
|
|
1219
|
+
return Dt(e);
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
|
-
let
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1222
|
+
let je = null;
|
|
1223
|
+
function Js(e) {
|
|
1224
|
+
je = e;
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1227
|
-
|
|
1226
|
+
function Qs(e, t, n) {
|
|
1227
|
+
je && je.emit("i18n:init", {
|
|
1228
1228
|
timestamp: Date.now(),
|
|
1229
1229
|
i18n: e,
|
|
1230
1230
|
version: t,
|
|
1231
1231
|
meta: n
|
|
1232
1232
|
});
|
|
1233
1233
|
}
|
|
1234
|
-
const
|
|
1235
|
-
function
|
|
1236
|
-
return (t) =>
|
|
1234
|
+
const qs = /* @__PURE__ */ Zs("function:translate");
|
|
1235
|
+
function Zs(e) {
|
|
1236
|
+
return (t) => je && je.emit(e, t);
|
|
1237
1237
|
}
|
|
1238
1238
|
const q = {
|
|
1239
|
-
INVALID_ARGUMENT:
|
|
1239
|
+
INVALID_ARGUMENT: is,
|
|
1240
1240
|
// 17
|
|
1241
1241
|
INVALID_DATE_ARGUMENT: 18,
|
|
1242
1242
|
INVALID_ISO_DATE_ARGUMENT: 19,
|
|
@@ -1244,11 +1244,11 @@ const q = {
|
|
|
1244
1244
|
NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
|
|
1245
1245
|
NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
|
|
1246
1246
|
NOT_SUPPORT_LOCALE_TYPE: 23
|
|
1247
|
-
},
|
|
1247
|
+
}, zs = 24;
|
|
1248
1248
|
function he(e) {
|
|
1249
|
-
return
|
|
1249
|
+
return Ue(e, null, process.env.NODE_ENV !== "production" ? { messages: er } : void 0);
|
|
1250
1250
|
}
|
|
1251
|
-
const
|
|
1251
|
+
const er = {
|
|
1252
1252
|
[q.INVALID_ARGUMENT]: "Invalid arguments",
|
|
1253
1253
|
[q.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
|
|
1254
1254
|
[q.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
|
|
@@ -1260,31 +1260,31 @@ const zs = {
|
|
|
1260
1260
|
function nn(e, t) {
|
|
1261
1261
|
return t.locale != null ? In(t.locale) : In(e.locale);
|
|
1262
1262
|
}
|
|
1263
|
-
let
|
|
1263
|
+
let kt;
|
|
1264
1264
|
function In(e) {
|
|
1265
1265
|
if (I(e))
|
|
1266
1266
|
return e;
|
|
1267
1267
|
if ($(e)) {
|
|
1268
|
-
if (e.resolvedOnce &&
|
|
1269
|
-
return
|
|
1268
|
+
if (e.resolvedOnce && kt != null)
|
|
1269
|
+
return kt;
|
|
1270
1270
|
if (e.constructor.name === "Function") {
|
|
1271
1271
|
const t = e();
|
|
1272
|
-
if (
|
|
1272
|
+
if (ss(t))
|
|
1273
1273
|
throw he(q.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
|
|
1274
|
-
return
|
|
1274
|
+
return kt = t;
|
|
1275
1275
|
} else
|
|
1276
1276
|
throw he(q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
|
|
1277
1277
|
} else
|
|
1278
1278
|
throw he(q.NOT_SUPPORT_LOCALE_TYPE);
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function tr(e, t, n) {
|
|
1281
1281
|
return [.../* @__PURE__ */ new Set([
|
|
1282
1282
|
n,
|
|
1283
1283
|
...B(t) ? t : M(t) ? Object.keys(t) : I(t) ? [t] : [n]
|
|
1284
1284
|
])];
|
|
1285
1285
|
}
|
|
1286
1286
|
function ca(e, t, n) {
|
|
1287
|
-
const a = I(n) ? n :
|
|
1287
|
+
const a = I(n) ? n : Xe, s = e;
|
|
1288
1288
|
s.__localeChainCache || (s.__localeChainCache = /* @__PURE__ */ new Map());
|
|
1289
1289
|
let r = s.__localeChainCache.get(a);
|
|
1290
1290
|
if (!r) {
|
|
@@ -1292,7 +1292,7 @@ function ca(e, t, n) {
|
|
|
1292
1292
|
let o = [n];
|
|
1293
1293
|
for (; B(o); )
|
|
1294
1294
|
o = vn(r, o, t);
|
|
1295
|
-
const l = B(t) || !
|
|
1295
|
+
const l = B(t) || !P(t) ? t : t.default ? t.default : null;
|
|
1296
1296
|
o = I(l) ? [l] : l, B(o) && vn(r, o, !1), s.__localeChainCache.set(a, r);
|
|
1297
1297
|
}
|
|
1298
1298
|
return r;
|
|
@@ -1301,25 +1301,25 @@ function vn(e, t, n) {
|
|
|
1301
1301
|
let a = !0;
|
|
1302
1302
|
for (let s = 0; s < t.length && F(a); s++) {
|
|
1303
1303
|
const r = t[s];
|
|
1304
|
-
I(r) && (a =
|
|
1304
|
+
I(r) && (a = nr(e, t[s], n));
|
|
1305
1305
|
}
|
|
1306
1306
|
return a;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function nr(e, t, n) {
|
|
1309
1309
|
let a;
|
|
1310
1310
|
const s = t.split("-");
|
|
1311
1311
|
do {
|
|
1312
1312
|
const r = s.join("-");
|
|
1313
|
-
a =
|
|
1313
|
+
a = ar(e, r, n), s.splice(-1, 1);
|
|
1314
1314
|
} while (s.length && a === !0);
|
|
1315
1315
|
return a;
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function ar(e, t, n) {
|
|
1318
1318
|
let a = !1;
|
|
1319
1319
|
if (!e.includes(t) && (a = !0, t)) {
|
|
1320
1320
|
a = t[t.length - 1] !== "!";
|
|
1321
1321
|
const s = t.replace(/!/g, "");
|
|
1322
|
-
e.push(s), (B(n) ||
|
|
1322
|
+
e.push(s), (B(n) || P(n)) && n[s] && (a = n[s]);
|
|
1323
1323
|
}
|
|
1324
1324
|
return a;
|
|
1325
1325
|
}
|
|
@@ -1484,15 +1484,15 @@ Oe[
|
|
|
1484
1484
|
/* Actions.APPEND */
|
|
1485
1485
|
]
|
|
1486
1486
|
};
|
|
1487
|
-
const
|
|
1488
|
-
function sr(e) {
|
|
1489
|
-
return ar.test(e);
|
|
1490
|
-
}
|
|
1487
|
+
const sr = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
|
|
1491
1488
|
function rr(e) {
|
|
1489
|
+
return sr.test(e);
|
|
1490
|
+
}
|
|
1491
|
+
function or(e) {
|
|
1492
1492
|
const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
|
|
1493
1493
|
return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function lr(e) {
|
|
1496
1496
|
if (e == null)
|
|
1497
1497
|
return "o";
|
|
1498
1498
|
switch (e.charCodeAt(0)) {
|
|
@@ -1529,11 +1529,11 @@ function or(e) {
|
|
|
1529
1529
|
}
|
|
1530
1530
|
return "i";
|
|
1531
1531
|
}
|
|
1532
|
-
function
|
|
1532
|
+
function ir(e) {
|
|
1533
1533
|
const t = e.trim();
|
|
1534
|
-
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 :
|
|
1534
|
+
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : rr(t) ? or(t) : "*" + t;
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1536
|
+
function cr(e) {
|
|
1537
1537
|
const t = [];
|
|
1538
1538
|
let n = -1, a = 0, s = 0, r, o, l, u, _, E, N;
|
|
1539
1539
|
const p = [];
|
|
@@ -1565,7 +1565,7 @@ function ir(e) {
|
|
|
1565
1565
|
/* Actions.APPEND */
|
|
1566
1566
|
]();
|
|
1567
1567
|
else {
|
|
1568
|
-
if (s = 0, o === void 0 || (o =
|
|
1568
|
+
if (s = 0, o === void 0 || (o = ir(o), o === !1))
|
|
1569
1569
|
return !1;
|
|
1570
1570
|
p[
|
|
1571
1571
|
1
|
|
@@ -1583,21 +1583,21 @@ function ir(e) {
|
|
|
1583
1583
|
}
|
|
1584
1584
|
for (; a !== null; )
|
|
1585
1585
|
if (n++, r = e[n], !(r === "\\" && S())) {
|
|
1586
|
-
if (u =
|
|
1586
|
+
if (u = lr(r), N = Oe[a], _ = N[u] || N.l || 8, _ === 8 || (a = _[0], _[1] !== void 0 && (E = p[_[1]], E && (l = r, E() === !1))))
|
|
1587
1587
|
return;
|
|
1588
1588
|
if (a === 7)
|
|
1589
1589
|
return t;
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
1592
|
const yn = /* @__PURE__ */ new Map();
|
|
1593
|
-
function
|
|
1593
|
+
function ur(e, t) {
|
|
1594
1594
|
return M(e) ? e[t] : null;
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1596
|
+
function fr(e, t) {
|
|
1597
1597
|
if (!M(e))
|
|
1598
1598
|
return null;
|
|
1599
1599
|
let n = yn.get(t);
|
|
1600
|
-
if (n || (n =
|
|
1600
|
+
if (n || (n = cr(t), n && yn.set(t, n)), !n)
|
|
1601
1601
|
return null;
|
|
1602
1602
|
const a = n.length;
|
|
1603
1603
|
let s = e, r = 0;
|
|
@@ -1620,7 +1620,7 @@ const ee = {
|
|
|
1620
1620
|
CANNOT_FORMAT_DATE: 5,
|
|
1621
1621
|
FALLBACK_TO_DATE_FORMAT: 6,
|
|
1622
1622
|
EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7
|
|
1623
|
-
},
|
|
1623
|
+
}, _r = 8, mr = {
|
|
1624
1624
|
[ee.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
|
|
1625
1625
|
[ee.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
|
|
1626
1626
|
[ee.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
|
|
@@ -1630,10 +1630,10 @@ const ee = {
|
|
|
1630
1630
|
[ee.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."
|
|
1631
1631
|
};
|
|
1632
1632
|
function Ce(e, ...t) {
|
|
1633
|
-
return
|
|
1633
|
+
return ct(mr[e], ...t);
|
|
1634
1634
|
}
|
|
1635
|
-
const
|
|
1636
|
-
function
|
|
1635
|
+
const dr = "11.1.3", ft = -1, Xe = "en-US", ot = "", Sn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
|
|
1636
|
+
function gr() {
|
|
1637
1637
|
return {
|
|
1638
1638
|
upper: (e, t) => t === "text" && I(e) ? e.toUpperCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
|
|
1639
1639
|
lower: (e, t) => t === "text" && I(e) ? e.toLowerCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
|
|
@@ -1641,30 +1641,30 @@ function dr() {
|
|
|
1641
1641
|
};
|
|
1642
1642
|
}
|
|
1643
1643
|
let ua;
|
|
1644
|
-
function
|
|
1644
|
+
function Er(e) {
|
|
1645
1645
|
ua = e;
|
|
1646
1646
|
}
|
|
1647
1647
|
let fa;
|
|
1648
|
-
function
|
|
1648
|
+
function pr(e) {
|
|
1649
1649
|
fa = e;
|
|
1650
1650
|
}
|
|
1651
1651
|
let _a;
|
|
1652
|
-
function
|
|
1652
|
+
function hr(e) {
|
|
1653
1653
|
_a = e;
|
|
1654
1654
|
}
|
|
1655
1655
|
let ma = null;
|
|
1656
|
-
const
|
|
1656
|
+
const Nr = /* @__NO_SIDE_EFFECTS__ */ (e) => {
|
|
1657
1657
|
ma = e;
|
|
1658
|
-
},
|
|
1658
|
+
}, Tr = /* @__NO_SIDE_EFFECTS__ */ () => ma;
|
|
1659
1659
|
let da = null;
|
|
1660
1660
|
const An = (e) => {
|
|
1661
1661
|
da = e;
|
|
1662
|
-
},
|
|
1662
|
+
}, Lr = () => da;
|
|
1663
1663
|
let Cn = 0;
|
|
1664
|
-
function
|
|
1665
|
-
const t = $(e.onWarn) ? e.onWarn : Le, n = I(e.version) ? e.version :
|
|
1664
|
+
function br(e = {}) {
|
|
1665
|
+
const t = $(e.onWarn) ? e.onWarn : Le, n = I(e.version) ? e.version : dr, a = I(e.locale) || $(e.locale) ? e.locale : Xe, s = $(a) ? Xe : a, r = B(e.fallbackLocale) || P(e.fallbackLocale) || I(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : s, o = P(e.messages) ? e.messages : Rt(s), l = P(e.datetimeFormats) ? e.datetimeFormats : Rt(s), u = P(e.numberFormats) ? e.numberFormats : Rt(s), _ = Q(W(), e.modifiers, gr()), E = e.pluralRules || W(), N = $(e.missing) ? e.missing : null, p = F(e.missingWarn) || Fe(e.missingWarn) ? e.missingWarn : !0, S = F(e.fallbackWarn) || Fe(e.fallbackWarn) ? e.fallbackWarn : !0, D = !!e.fallbackFormat, v = !!e.unresolving, A = $(e.postTranslation) ? e.postTranslation : null, f = P(e.processor) ? e.processor : null, g = F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, b = !!e.escapeParameter, m = $(e.messageCompiler) ? e.messageCompiler : ua;
|
|
1666
1666
|
process.env.NODE_ENV !== "production" && $(e.messageCompiler) && Zt(Ce(ee.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
|
|
1667
|
-
const O = $(e.messageResolver) ? e.messageResolver : fa ||
|
|
1667
|
+
const O = $(e.messageResolver) ? e.messageResolver : fa || ur, y = $(e.localeFallbacker) ? e.localeFallbacker : _a || tr, h = M(e.fallbackContext) ? e.fallbackContext : void 0, R = e, U = M(R.__datetimeFormatters) ? R.__datetimeFormatters : /* @__PURE__ */ new Map(), X = M(R.__numberFormatters) ? R.__numberFormatters : /* @__PURE__ */ new Map(), ie = M(R.__meta) ? R.__meta : {};
|
|
1668
1668
|
Cn++;
|
|
1669
1669
|
const J = {
|
|
1670
1670
|
version: n,
|
|
@@ -1690,10 +1690,10 @@ function Lr(e = {}) {
|
|
|
1690
1690
|
onWarn: t,
|
|
1691
1691
|
__meta: ie
|
|
1692
1692
|
};
|
|
1693
|
-
return J.datetimeFormats = l, J.numberFormats = u, J.__datetimeFormatters =
|
|
1693
|
+
return J.datetimeFormats = l, J.numberFormats = u, J.__datetimeFormatters = U, J.__numberFormatters = X, process.env.NODE_ENV !== "production" && (J.__v_emitter = R.__v_emitter != null ? R.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && Qs(J, n, ie), J;
|
|
1694
1694
|
}
|
|
1695
|
-
const
|
|
1696
|
-
function
|
|
1695
|
+
const Rt = (e) => ({ [e]: W() });
|
|
1696
|
+
function _t(e, t) {
|
|
1697
1697
|
return e instanceof RegExp ? e.test(t) : e;
|
|
1698
1698
|
}
|
|
1699
1699
|
function ga(e, t) {
|
|
@@ -1723,7 +1723,7 @@ function Ke(e, t, n) {
|
|
|
1723
1723
|
function Ea(e, t) {
|
|
1724
1724
|
return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1726
|
+
function Or(e, t) {
|
|
1727
1727
|
const n = t.indexOf(e);
|
|
1728
1728
|
if (n === -1)
|
|
1729
1729
|
return !1;
|
|
@@ -1739,7 +1739,7 @@ const Dn = typeof Intl < "u", pa = {
|
|
|
1739
1739
|
function kn(e, ...t) {
|
|
1740
1740
|
const { datetimeFormats: n, unresolving: a, fallbackLocale: s, onWarn: r, localeFallbacker: o } = e, { __datetimeFormatters: l } = e;
|
|
1741
1741
|
if (process.env.NODE_ENV !== "production" && !pa.dateTimeFormat)
|
|
1742
|
-
return r(Ce(ee.CANNOT_FORMAT_DATE)),
|
|
1742
|
+
return r(Ce(ee.CANNOT_FORMAT_DATE)), ot;
|
|
1743
1743
|
const [u, _, E, N] = Ut(...t), p = F(E.missingWarn) ? E.missingWarn : e.missingWarn, S = F(E.fallbackWarn) ? E.fallbackWarn : e.fallbackWarn, D = !!E.part, v = nn(e, E), A = o(
|
|
1744
1744
|
e,
|
|
1745
1745
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
@@ -1750,8 +1750,8 @@ function kn(e, ...t) {
|
|
|
1750
1750
|
return new Intl.DateTimeFormat(v, N).format(_);
|
|
1751
1751
|
let f = {}, g, b = null, m = v, O = null;
|
|
1752
1752
|
const y = "datetime format";
|
|
1753
|
-
for (let
|
|
1754
|
-
if (g = O = A[
|
|
1753
|
+
for (let U = 0; U < A.length; U++) {
|
|
1754
|
+
if (g = O = A[U], process.env.NODE_ENV !== "production" && v !== g && _t(S, u) && r(Ce(ee.FALLBACK_TO_DATE_FORMAT, {
|
|
1755
1755
|
key: u,
|
|
1756
1756
|
target: g
|
|
1757
1757
|
})), process.env.NODE_ENV !== "production" && v !== g) {
|
|
@@ -1764,16 +1764,16 @@ function kn(e, ...t) {
|
|
|
1764
1764
|
groupId: `${y}:${u}`
|
|
1765
1765
|
});
|
|
1766
1766
|
}
|
|
1767
|
-
if (f = n[g] || {}, b = f[u],
|
|
1767
|
+
if (f = n[g] || {}, b = f[u], P(b))
|
|
1768
1768
|
break;
|
|
1769
1769
|
an(e, u, g, p, y), m = O;
|
|
1770
1770
|
}
|
|
1771
|
-
if (!
|
|
1772
|
-
return a ?
|
|
1771
|
+
if (!P(b) || !I(g))
|
|
1772
|
+
return a ? ft : u;
|
|
1773
1773
|
let h = `${g}__${u}`;
|
|
1774
|
-
|
|
1775
|
-
let
|
|
1776
|
-
return
|
|
1774
|
+
ut(N) || (h = `${h}__${JSON.stringify(N)}`);
|
|
1775
|
+
let R = l.get(h);
|
|
1776
|
+
return R || (R = new Intl.DateTimeFormat(g, Q({}, b, N)), l.set(h, R)), D ? R.formatToParts(_) : R.format(_);
|
|
1777
1777
|
}
|
|
1778
1778
|
const ha = [
|
|
1779
1779
|
"localeMatcher",
|
|
@@ -1811,7 +1811,7 @@ function Ut(...e) {
|
|
|
1811
1811
|
} catch {
|
|
1812
1812
|
throw he(q.INVALID_ISO_DATE_ARGUMENT);
|
|
1813
1813
|
}
|
|
1814
|
-
} else if (
|
|
1814
|
+
} else if (ts(t)) {
|
|
1815
1815
|
if (isNaN(t.getTime()))
|
|
1816
1816
|
throw he(q.INVALID_DATE_ARGUMENT);
|
|
1817
1817
|
l = t;
|
|
@@ -1819,22 +1819,22 @@ function Ut(...e) {
|
|
|
1819
1819
|
l = t;
|
|
1820
1820
|
else
|
|
1821
1821
|
throw he(q.INVALID_ARGUMENT);
|
|
1822
|
-
return I(n) ? r.key = n :
|
|
1822
|
+
return I(n) ? r.key = n : P(n) && Object.keys(n).forEach((u) => {
|
|
1823
1823
|
ha.includes(u) ? o[u] = n[u] : r[u] = n[u];
|
|
1824
|
-
}), I(a) ? r.locale = a :
|
|
1824
|
+
}), I(a) ? r.locale = a : P(a) && (o = a), P(s) && (o = s), [r.key || "", l, r, o];
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1826
|
+
function Rn(e, t, n) {
|
|
1827
1827
|
const a = e;
|
|
1828
1828
|
for (const s in n) {
|
|
1829
1829
|
const r = `${t}__${s}`;
|
|
1830
1830
|
a.__datetimeFormatters.has(r) && a.__datetimeFormatters.delete(r);
|
|
1831
1831
|
}
|
|
1832
1832
|
}
|
|
1833
|
-
function
|
|
1833
|
+
function Pn(e, ...t) {
|
|
1834
1834
|
const { numberFormats: n, unresolving: a, fallbackLocale: s, onWarn: r, localeFallbacker: o } = e, { __numberFormatters: l } = e;
|
|
1835
1835
|
if (process.env.NODE_ENV !== "production" && !pa.numberFormat)
|
|
1836
|
-
return r(Ce(ee.CANNOT_FORMAT_NUMBER)),
|
|
1837
|
-
const [u, _, E, N] =
|
|
1836
|
+
return r(Ce(ee.CANNOT_FORMAT_NUMBER)), ot;
|
|
1837
|
+
const [u, _, E, N] = Vt(...t), p = F(E.missingWarn) ? E.missingWarn : e.missingWarn, S = F(E.fallbackWarn) ? E.fallbackWarn : e.fallbackWarn, D = !!E.part, v = nn(e, E), A = o(
|
|
1838
1838
|
e,
|
|
1839
1839
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1840
1840
|
s,
|
|
@@ -1844,8 +1844,8 @@ function Rn(e, ...t) {
|
|
|
1844
1844
|
return new Intl.NumberFormat(v, N).format(_);
|
|
1845
1845
|
let f = {}, g, b = null, m = v, O = null;
|
|
1846
1846
|
const y = "number format";
|
|
1847
|
-
for (let
|
|
1848
|
-
if (g = O = A[
|
|
1847
|
+
for (let U = 0; U < A.length; U++) {
|
|
1848
|
+
if (g = O = A[U], process.env.NODE_ENV !== "production" && v !== g && _t(S, u) && r(Ce(ee.FALLBACK_TO_NUMBER_FORMAT, {
|
|
1849
1849
|
key: u,
|
|
1850
1850
|
target: g
|
|
1851
1851
|
})), process.env.NODE_ENV !== "production" && v !== g) {
|
|
@@ -1858,16 +1858,16 @@ function Rn(e, ...t) {
|
|
|
1858
1858
|
groupId: `${y}:${u}`
|
|
1859
1859
|
});
|
|
1860
1860
|
}
|
|
1861
|
-
if (f = n[g] || {}, b = f[u],
|
|
1861
|
+
if (f = n[g] || {}, b = f[u], P(b))
|
|
1862
1862
|
break;
|
|
1863
1863
|
an(e, u, g, p, y), m = O;
|
|
1864
1864
|
}
|
|
1865
|
-
if (!
|
|
1866
|
-
return a ?
|
|
1865
|
+
if (!P(b) || !I(g))
|
|
1866
|
+
return a ? ft : u;
|
|
1867
1867
|
let h = `${g}__${u}`;
|
|
1868
|
-
|
|
1869
|
-
let
|
|
1870
|
-
return
|
|
1868
|
+
ut(N) || (h = `${h}__${JSON.stringify(N)}`);
|
|
1869
|
+
let R = l.get(h);
|
|
1870
|
+
return R || (R = new Intl.NumberFormat(g, Q({}, b, N)), l.set(h, R)), D ? R.formatToParts(_) : R.format(_);
|
|
1871
1871
|
}
|
|
1872
1872
|
const Na = [
|
|
1873
1873
|
"localeMatcher",
|
|
@@ -1891,15 +1891,15 @@ const Na = [
|
|
|
1891
1891
|
"roundingIncrement",
|
|
1892
1892
|
"trailingZeroDisplay"
|
|
1893
1893
|
];
|
|
1894
|
-
function
|
|
1894
|
+
function Vt(...e) {
|
|
1895
1895
|
const [t, n, a, s] = e, r = W();
|
|
1896
1896
|
let o = W();
|
|
1897
1897
|
if (!j(t))
|
|
1898
1898
|
throw he(q.INVALID_ARGUMENT);
|
|
1899
1899
|
const l = t;
|
|
1900
|
-
return I(n) ? r.key = n :
|
|
1900
|
+
return I(n) ? r.key = n : P(n) && Object.keys(n).forEach((u) => {
|
|
1901
1901
|
Na.includes(u) ? o[u] = n[u] : r[u] = n[u];
|
|
1902
|
-
}), I(a) ? r.locale = a :
|
|
1902
|
+
}), I(a) ? r.locale = a : P(a) && (o = a), P(s) && (o = s), [r.key || "", l, r, o];
|
|
1903
1903
|
}
|
|
1904
1904
|
function Mn(e, t, n) {
|
|
1905
1905
|
const a = e;
|
|
@@ -1908,26 +1908,26 @@ function Mn(e, t, n) {
|
|
|
1908
1908
|
a.__numberFormatters.has(r) && a.__numberFormatters.delete(r);
|
|
1909
1909
|
}
|
|
1910
1910
|
}
|
|
1911
|
-
const
|
|
1911
|
+
const Ir = (e) => e, vr = (e) => "", yr = "text", Sr = (e) => e.length === 0 ? "" : qt(e), Ar = rs;
|
|
1912
1912
|
function Fn(e, t) {
|
|
1913
1913
|
return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1915
|
+
function Cr(e) {
|
|
1916
1916
|
const t = j(e.pluralIndex) ? e.pluralIndex : -1;
|
|
1917
1917
|
return e.named && (j(e.named.count) || j(e.named.n)) ? j(e.named.count) ? e.named.count : j(e.named.n) ? e.named.n : t : t;
|
|
1918
1918
|
}
|
|
1919
|
-
function
|
|
1919
|
+
function Dr(e, t) {
|
|
1920
1920
|
t.count || (t.count = e), t.n || (t.n = e);
|
|
1921
1921
|
}
|
|
1922
|
-
function
|
|
1923
|
-
const t = e.locale, n =
|
|
1924
|
-
j(e.pluralIndex) &&
|
|
1922
|
+
function kr(e = {}) {
|
|
1923
|
+
const t = e.locale, n = Cr(e), a = M(e.pluralRules) && I(t) && $(e.pluralRules[t]) ? e.pluralRules[t] : Fn, s = M(e.pluralRules) && I(t) && $(e.pluralRules[t]) ? Fn : void 0, r = (f) => f[a(n, f.length, s)], o = e.list || [], l = (f) => o[f], u = e.named || W();
|
|
1924
|
+
j(e.pluralIndex) && Dr(n, u);
|
|
1925
1925
|
const _ = (f) => u[f];
|
|
1926
1926
|
function E(f, g) {
|
|
1927
1927
|
const b = $(e.messages) ? e.messages(f, !!g) : M(e.messages) ? e.messages[f] : !1;
|
|
1928
|
-
return b || (e.parent ? e.parent.message(f) :
|
|
1928
|
+
return b || (e.parent ? e.parent.message(f) : vr);
|
|
1929
1929
|
}
|
|
1930
|
-
const N = (f) => e.modifiers ? e.modifiers[f] :
|
|
1930
|
+
const N = (f) => e.modifiers ? e.modifiers[f] : Ir, p = P(e.processor) && $(e.processor.normalize) ? e.processor.normalize : Sr, S = P(e.processor) && $(e.processor.interpolate) ? e.processor.interpolate : Ar, D = P(e.processor) && I(e.processor.type) ? e.processor.type : yr, A = {
|
|
1931
1931
|
list: l,
|
|
1932
1932
|
named: _,
|
|
1933
1933
|
plural: r,
|
|
@@ -1935,11 +1935,11 @@ function Dr(e = {}) {
|
|
|
1935
1935
|
const [b, m] = g;
|
|
1936
1936
|
let O = "text", y = "";
|
|
1937
1937
|
g.length === 1 ? M(b) ? (y = b.modifier || y, O = b.type || O) : I(b) && (y = b || y) : g.length === 2 && (I(b) && (y = b || y), I(m) && (O = m || O));
|
|
1938
|
-
const h = E(f, !0)(A),
|
|
1938
|
+
const h = E(f, !0)(A), R = (
|
|
1939
1939
|
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
|
1940
1940
|
O === "vnode" && B(h) && y ? h[0] : h
|
|
1941
1941
|
);
|
|
1942
|
-
return y ? N(y)(
|
|
1942
|
+
return y ? N(y)(R, O) : R;
|
|
1943
1943
|
},
|
|
1944
1944
|
message: E,
|
|
1945
1945
|
type: D,
|
|
@@ -1949,26 +1949,26 @@ function Dr(e = {}) {
|
|
|
1949
1949
|
};
|
|
1950
1950
|
return A;
|
|
1951
1951
|
}
|
|
1952
|
-
const
|
|
1953
|
-
function
|
|
1954
|
-
const { fallbackFormat: n, postTranslation: a, unresolving: s, messageCompiler: r, fallbackLocale: o, messages: l } = e, [u, _] =
|
|
1955
|
-
p &&
|
|
1952
|
+
const wn = () => "", oe = (e) => $(e);
|
|
1953
|
+
function Un(e, ...t) {
|
|
1954
|
+
const { fallbackFormat: n, postTranslation: a, unresolving: s, messageCompiler: r, fallbackLocale: o, messages: l } = e, [u, _] = Wt(...t), E = F(_.missingWarn) ? _.missingWarn : e.missingWarn, N = F(_.fallbackWarn) ? _.fallbackWarn : e.fallbackWarn, p = F(_.escapeParameter) ? _.escapeParameter : e.escapeParameter, S = !!_.resolvedMessage, D = I(_.default) || F(_.default) ? F(_.default) ? r ? u : () => u : _.default : n ? r ? u : () => u : null, v = n || D != null && (I(D) || $(D)), A = nn(e, _);
|
|
1955
|
+
p && Rr(_);
|
|
1956
1956
|
let [f, g, b] = S ? [
|
|
1957
1957
|
u,
|
|
1958
1958
|
A,
|
|
1959
1959
|
l[A] || W()
|
|
1960
1960
|
] : Ta(e, u, A, o, N, E), m = f, O = u;
|
|
1961
1961
|
if (!S && !(I(m) || le(m) || oe(m)) && v && (m = D, O = m), !S && (!(I(m) || le(m) || oe(m)) || !I(g)))
|
|
1962
|
-
return s ?
|
|
1962
|
+
return s ? ft : u;
|
|
1963
1963
|
if (process.env.NODE_ENV !== "production" && I(m) && e.messageCompiler == null)
|
|
1964
1964
|
return Le(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${u}'.`), u;
|
|
1965
1965
|
let y = !1;
|
|
1966
1966
|
const h = () => {
|
|
1967
1967
|
y = !0;
|
|
1968
|
-
},
|
|
1968
|
+
}, R = oe(m) ? m : La(e, u, g, m, O, h);
|
|
1969
1969
|
if (y)
|
|
1970
1970
|
return m;
|
|
1971
|
-
const
|
|
1971
|
+
const U = wr(e, g, b, _), X = kr(U), ie = Pr(e, R, X), J = a ? a(ie, u) : ie;
|
|
1972
1972
|
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
1973
1973
|
const ke = {
|
|
1974
1974
|
timestamp: Date.now(),
|
|
@@ -1977,11 +1977,11 @@ function wn(e, ...t) {
|
|
|
1977
1977
|
format: I(m) ? m : oe(m) ? m.source : "",
|
|
1978
1978
|
message: J
|
|
1979
1979
|
};
|
|
1980
|
-
ke.meta = Q({}, e.__meta, /* @__PURE__ */
|
|
1980
|
+
ke.meta = Q({}, e.__meta, /* @__PURE__ */ Tr() || {}), qs(ke);
|
|
1981
1981
|
}
|
|
1982
1982
|
return J;
|
|
1983
1983
|
}
|
|
1984
|
-
function
|
|
1984
|
+
function Rr(e) {
|
|
1985
1985
|
B(e.list) ? e.list = e.list.map((t) => I(t) ? pn(t) : t) : M(e.named) && Object.keys(e.named).forEach((t) => {
|
|
1986
1986
|
I(e.named[t]) && (e.named[t] = pn(e.named[t]));
|
|
1987
1987
|
});
|
|
@@ -1991,7 +1991,7 @@ function Ta(e, t, n, a, s, r) {
|
|
|
1991
1991
|
let N = W(), p, S = null, D = n, v = null;
|
|
1992
1992
|
const A = "translate";
|
|
1993
1993
|
for (let f = 0; f < E.length; f++) {
|
|
1994
|
-
if (p = v = E[f], process.env.NODE_ENV !== "production" && n !== p && !Ea(n, p) &&
|
|
1994
|
+
if (p = v = E[f], process.env.NODE_ENV !== "production" && n !== p && !Ea(n, p) && _t(s, t) && l(Ce(ee.FALLBACK_TO_TRANSLATE, {
|
|
1995
1995
|
key: t,
|
|
1996
1996
|
target: p
|
|
1997
1997
|
})), process.env.NODE_ENV !== "production" && n !== p) {
|
|
@@ -2018,7 +2018,7 @@ function Ta(e, t, n, a, s, r) {
|
|
|
2018
2018
|
}
|
|
2019
2019
|
if (I(S) || le(S) || oe(S))
|
|
2020
2020
|
break;
|
|
2021
|
-
if (!
|
|
2021
|
+
if (!Or(p, E)) {
|
|
2022
2022
|
const O = an(
|
|
2023
2023
|
e,
|
|
2024
2024
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
@@ -2045,7 +2045,7 @@ function La(e, t, n, a, s, r) {
|
|
|
2045
2045
|
}
|
|
2046
2046
|
let u = null, _, E;
|
|
2047
2047
|
process.env.NODE_ENV !== "production" && ue && (u = window.performance.now(), _ = "intlify-message-compilation-start", E = "intlify-message-compilation-end", ae && ae(_));
|
|
2048
|
-
const N = o(a,
|
|
2048
|
+
const N = o(a, Mr(e, n, s, a, l, r));
|
|
2049
2049
|
if (process.env.NODE_ENV !== "production" && ue) {
|
|
2050
2050
|
const p = window.performance.now(), S = e.__v_emitter;
|
|
2051
2051
|
S && u && S.emit("message-compilation", {
|
|
@@ -2072,21 +2072,21 @@ function Pr(e, t, n) {
|
|
|
2072
2072
|
}
|
|
2073
2073
|
return o;
|
|
2074
2074
|
}
|
|
2075
|
-
function
|
|
2075
|
+
function Wt(...e) {
|
|
2076
2076
|
const [t, n, a] = e, s = W();
|
|
2077
2077
|
if (!I(t) && !j(t) && !oe(t) && !le(t))
|
|
2078
2078
|
throw he(q.INVALID_ARGUMENT);
|
|
2079
2079
|
const r = j(t) ? String(t) : (oe(t), t);
|
|
2080
|
-
return j(n) ? s.plural = n : I(n) ? s.default = n :
|
|
2080
|
+
return j(n) ? s.plural = n : I(n) ? s.default = n : P(n) && !ut(n) ? s.named = n : B(n) && (s.list = n), j(a) ? s.plural = a : I(a) ? s.default = a : P(a) && Q(s, a), [r, s];
|
|
2081
2081
|
}
|
|
2082
|
-
function
|
|
2082
|
+
function Mr(e, t, n, a, s, r) {
|
|
2083
2083
|
return {
|
|
2084
2084
|
locale: t,
|
|
2085
2085
|
key: n,
|
|
2086
2086
|
warnHtmlMessage: s,
|
|
2087
2087
|
onError: (o) => {
|
|
2088
2088
|
if (r && r(o), process.env.NODE_ENV !== "production") {
|
|
2089
|
-
const l =
|
|
2089
|
+
const l = Fr(a), u = `Message compilation error: ${o.message}`, _ = o.location && l && os(l, o.location.start.offset, o.location.end.offset), E = e.__v_emitter;
|
|
2090
2090
|
E && l && E.emit("compile-error", {
|
|
2091
2091
|
message: l,
|
|
2092
2092
|
error: o.message,
|
|
@@ -2098,16 +2098,16 @@ ${_}` : u);
|
|
|
2098
2098
|
} else
|
|
2099
2099
|
throw o;
|
|
2100
2100
|
},
|
|
2101
|
-
onCacheKey: (o) =>
|
|
2101
|
+
onCacheKey: (o) => za(t, n, o)
|
|
2102
2102
|
};
|
|
2103
2103
|
}
|
|
2104
|
-
function
|
|
2104
|
+
function Fr(e) {
|
|
2105
2105
|
if (I(e))
|
|
2106
2106
|
return e;
|
|
2107
2107
|
if (e.loc && e.loc.source)
|
|
2108
2108
|
return e.loc.source;
|
|
2109
2109
|
}
|
|
2110
|
-
function
|
|
2110
|
+
function wr(e, t, n, a) {
|
|
2111
2111
|
const { modifiers: s, pluralRules: r, messageResolver: o, fallbackLocale: l, fallbackWarn: u, missingWarn: _, fallbackContext: E } = e, p = {
|
|
2112
2112
|
locale: t,
|
|
2113
2113
|
modifiers: s,
|
|
@@ -2131,29 +2131,29 @@ function Fr(e, t, n, a) {
|
|
|
2131
2131
|
const g = La(e, S, t, v, S, () => {
|
|
2132
2132
|
A = !0;
|
|
2133
2133
|
});
|
|
2134
|
-
return A ?
|
|
2135
|
-
} else return oe(v) ? v :
|
|
2134
|
+
return A ? wn : g;
|
|
2135
|
+
} else return oe(v) ? v : wn;
|
|
2136
2136
|
}
|
|
2137
2137
|
};
|
|
2138
2138
|
return e.processor && (p.processor = e.processor), a.list && (p.list = a.list), a.named && (p.named = a.named), j(a.plural) && (p.pluralIndex = a.plural), p;
|
|
2139
2139
|
}
|
|
2140
|
-
|
|
2140
|
+
ws();
|
|
2141
2141
|
function Ur() {
|
|
2142
2142
|
return ba().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
2143
2143
|
}
|
|
2144
2144
|
function ba() {
|
|
2145
2145
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
2146
2146
|
}
|
|
2147
|
-
const
|
|
2148
|
-
let
|
|
2149
|
-
function
|
|
2147
|
+
const Vr = typeof Proxy == "function", Wr = "devtools-plugin:setup", $r = "plugin:settings:set";
|
|
2148
|
+
let Pe, $t;
|
|
2149
|
+
function xr() {
|
|
2150
2150
|
var e;
|
|
2151
|
-
return
|
|
2151
|
+
return Pe !== void 0 || (typeof window < "u" && window.performance ? (Pe = !0, $t = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (Pe = !0, $t = globalThis.perf_hooks.performance) : Pe = !1), Pe;
|
|
2152
2152
|
}
|
|
2153
|
-
function
|
|
2154
|
-
return
|
|
2153
|
+
function Gr() {
|
|
2154
|
+
return xr() ? $t.now() : Date.now();
|
|
2155
2155
|
}
|
|
2156
|
-
class
|
|
2156
|
+
class Kr {
|
|
2157
2157
|
constructor(t, n) {
|
|
2158
2158
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
|
|
2159
2159
|
const a = {};
|
|
@@ -2181,9 +2181,9 @@ class Gr {
|
|
|
2181
2181
|
r = o;
|
|
2182
2182
|
},
|
|
2183
2183
|
now() {
|
|
2184
|
-
return
|
|
2184
|
+
return Gr();
|
|
2185
2185
|
}
|
|
2186
|
-
}, n && n.on(
|
|
2186
|
+
}, n && n.on($r, (o, l) => {
|
|
2187
2187
|
o === this.plugin.id && this.fallbacks.setSettings(l);
|
|
2188
2188
|
}), this.proxiedOn = new Proxy({}, {
|
|
2189
2189
|
get: (o, l) => this.target ? this.target.on[l] : (...u) => {
|
|
@@ -2215,12 +2215,12 @@ class Gr {
|
|
|
2215
2215
|
n.resolve(await this.target[n.method](...n.args));
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
|
-
function
|
|
2219
|
-
const n = e, a = ba(), s = Ur(), r =
|
|
2218
|
+
function Yr(e, t) {
|
|
2219
|
+
const n = e, a = ba(), s = Ur(), r = Vr && n.enableEarlyProxy;
|
|
2220
2220
|
if (s && (a.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !r))
|
|
2221
|
-
s.emit(
|
|
2221
|
+
s.emit(Wr, e, t);
|
|
2222
2222
|
else {
|
|
2223
|
-
const o = r ? new
|
|
2223
|
+
const o = r ? new Kr(n, s) : null;
|
|
2224
2224
|
(a.__VUE_DEVTOOLS_PLUGINS__ = a.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
2225
2225
|
pluginDescriptor: n,
|
|
2226
2226
|
setupFn: t,
|
|
@@ -2233,13 +2233,13 @@ function Kr(e, t) {
|
|
|
2233
2233
|
* (c) 2025 kazuya kawaguchi
|
|
2234
2234
|
* Released under the MIT License.
|
|
2235
2235
|
*/
|
|
2236
|
-
const
|
|
2237
|
-
function
|
|
2236
|
+
const Hr = "11.1.3";
|
|
2237
|
+
function Br() {
|
|
2238
2238
|
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Se().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Se().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Se().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Se().__INTLIFY_PROD_DEVTOOLS__ = !1);
|
|
2239
2239
|
}
|
|
2240
2240
|
const G = {
|
|
2241
2241
|
// composer module errors
|
|
2242
|
-
UNEXPECTED_RETURN_TYPE:
|
|
2242
|
+
UNEXPECTED_RETURN_TYPE: zs,
|
|
2243
2243
|
// 24
|
|
2244
2244
|
// legacy module errors
|
|
2245
2245
|
INVALID_ARGUMENT: 25,
|
|
@@ -2260,9 +2260,9 @@ const G = {
|
|
|
2260
2260
|
NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
|
|
2261
2261
|
};
|
|
2262
2262
|
function te(e, ...t) {
|
|
2263
|
-
return
|
|
2263
|
+
return Ue(e, null, process.env.NODE_ENV !== "production" ? { messages: jr, args: t } : void 0);
|
|
2264
2264
|
}
|
|
2265
|
-
const
|
|
2265
|
+
const jr = {
|
|
2266
2266
|
[G.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
|
|
2267
2267
|
[G.INVALID_ARGUMENT]: "Invalid argument",
|
|
2268
2268
|
[G.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
|
|
@@ -2274,8 +2274,8 @@ const Br = {
|
|
|
2274
2274
|
[G.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
|
|
2275
2275
|
[G.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
|
|
2276
2276
|
[G.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
|
|
2277
|
-
},
|
|
2278
|
-
FALLBACK_TO_ROOT:
|
|
2277
|
+
}, xt = /* @__PURE__ */ de("__translateVNode"), Gt = /* @__PURE__ */ de("__datetimeParts"), Kt = /* @__PURE__ */ de("__numberParts"), De = /* @__PURE__ */ de("__enableEmitter"), Je = /* @__PURE__ */ de("__disableEmitter"), Oa = de("__setPluralRules"), Ia = /* @__PURE__ */ de("__injectWithOption"), Yt = /* @__PURE__ */ de("__dispose"), me = {
|
|
2278
|
+
FALLBACK_TO_ROOT: _r,
|
|
2279
2279
|
// 8
|
|
2280
2280
|
NOT_FOUND_PARENT_SCOPE: 9,
|
|
2281
2281
|
IGNORE_OBJ_FLATTEN: 10,
|
|
@@ -2287,7 +2287,7 @@ const Br = {
|
|
|
2287
2287
|
* @deprecated will be removed at vue-i18n v12
|
|
2288
2288
|
*/
|
|
2289
2289
|
DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12
|
|
2290
|
-
},
|
|
2290
|
+
}, Xr = {
|
|
2291
2291
|
[me.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
|
|
2292
2292
|
[me.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
|
|
2293
2293
|
[me.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
|
|
@@ -2301,16 +2301,16 @@ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guid
|
|
|
2301
2301
|
*/
|
|
2302
2302
|
[me.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: "'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead."
|
|
2303
2303
|
};
|
|
2304
|
-
function
|
|
2305
|
-
return
|
|
2304
|
+
function Ze(e, ...t) {
|
|
2305
|
+
return ct(Xr[e], ...t);
|
|
2306
2306
|
}
|
|
2307
|
-
function
|
|
2307
|
+
function Qe(e) {
|
|
2308
2308
|
if (!M(e) || le(e))
|
|
2309
2309
|
return e;
|
|
2310
2310
|
for (const t in e)
|
|
2311
2311
|
if (ce(e, t))
|
|
2312
2312
|
if (!t.includes("."))
|
|
2313
|
-
M(e[t]) &&
|
|
2313
|
+
M(e[t]) && Qe(e[t]);
|
|
2314
2314
|
else {
|
|
2315
2315
|
const n = t.split("."), a = n.length - 1;
|
|
2316
2316
|
let s = e, r = !1;
|
|
@@ -2318,7 +2318,7 @@ function Je(e) {
|
|
|
2318
2318
|
if (n[o] === "__proto__")
|
|
2319
2319
|
throw new Error(`unsafe key: ${n[o]}`);
|
|
2320
2320
|
if (n[o] in s || (s[n[o]] = W()), !M(s[n[o]])) {
|
|
2321
|
-
process.env.NODE_ENV !== "production" && Le(
|
|
2321
|
+
process.env.NODE_ENV !== "production" && Le(Ze(me.IGNORE_OBJ_FLATTEN, {
|
|
2322
2322
|
key: n[o]
|
|
2323
2323
|
})), r = !0;
|
|
2324
2324
|
break;
|
|
@@ -2327,22 +2327,22 @@ function Je(e) {
|
|
|
2327
2327
|
}
|
|
2328
2328
|
if (r || (le(s) ? ia.includes(n[a]) || delete e[t] : (s[n[a]] = e[t], delete e[t])), !le(s)) {
|
|
2329
2329
|
const o = s[n[a]];
|
|
2330
|
-
M(o) &&
|
|
2330
|
+
M(o) && Qe(o);
|
|
2331
2331
|
}
|
|
2332
2332
|
}
|
|
2333
2333
|
return e;
|
|
2334
2334
|
}
|
|
2335
2335
|
function sn(e, t) {
|
|
2336
|
-
const { messages: n, __i18n: a, messageResolver: s, flatJson: r } = t, o =
|
|
2336
|
+
const { messages: n, __i18n: a, messageResolver: s, flatJson: r } = t, o = P(n) ? n : B(a) ? W() : { [e]: W() };
|
|
2337
2337
|
if (B(a) && a.forEach((l) => {
|
|
2338
2338
|
if ("locale" in l && "resource" in l) {
|
|
2339
2339
|
const { locale: u, resource: _ } = l;
|
|
2340
|
-
u ? (o[u] = o[u] || W(),
|
|
2340
|
+
u ? (o[u] = o[u] || W(), rt(_, o[u])) : rt(_, o);
|
|
2341
2341
|
} else
|
|
2342
|
-
I(l) &&
|
|
2342
|
+
I(l) && rt(JSON.parse(l), o);
|
|
2343
2343
|
}), s == null && r)
|
|
2344
2344
|
for (const l in o)
|
|
2345
|
-
ce(o, l) &&
|
|
2345
|
+
ce(o, l) && Qe(o[l]);
|
|
2346
2346
|
return o;
|
|
2347
2347
|
}
|
|
2348
2348
|
function va(e) {
|
|
@@ -2376,13 +2376,13 @@ function ya(e, t, n) {
|
|
|
2376
2376
|
function Vn(e) {
|
|
2377
2377
|
return re(Ha, null, e, 0);
|
|
2378
2378
|
}
|
|
2379
|
-
const Wn = "__INTLIFY_META__", $n = () => [],
|
|
2379
|
+
const Wn = "__INTLIFY_META__", $n = () => [], Jr = () => !1;
|
|
2380
2380
|
let xn = 0;
|
|
2381
2381
|
function Gn(e) {
|
|
2382
|
-
return (t, n, a, s) => e(n, a,
|
|
2382
|
+
return (t, n, a, s) => e(n, a, He() || void 0, s);
|
|
2383
2383
|
}
|
|
2384
|
-
const
|
|
2385
|
-
const e =
|
|
2384
|
+
const Qr = /* @__NO_SIDE_EFFECTS__ */ () => {
|
|
2385
|
+
const e = He();
|
|
2386
2386
|
let t = null;
|
|
2387
2387
|
return e && (t = va(e)[Wn]) ? { [Wn]: t } : null;
|
|
2388
2388
|
};
|
|
@@ -2391,18 +2391,18 @@ function rn(e = {}) {
|
|
|
2391
2391
|
let o = F(e.inheritLocale) ? e.inheritLocale : !0;
|
|
2392
2392
|
const l = r(
|
|
2393
2393
|
// prettier-ignore
|
|
2394
|
-
t && o ? t.locale.value : I(e.locale) ? e.locale :
|
|
2394
|
+
t && o ? t.locale.value : I(e.locale) ? e.locale : Xe
|
|
2395
2395
|
), u = r(
|
|
2396
2396
|
// prettier-ignore
|
|
2397
|
-
t && o ? t.fallbackLocale.value : I(e.fallbackLocale) || B(e.fallbackLocale) ||
|
|
2398
|
-
), _ = r(sn(l.value, e)), E = r(
|
|
2397
|
+
t && o ? t.fallbackLocale.value : I(e.fallbackLocale) || B(e.fallbackLocale) || P(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : l.value
|
|
2398
|
+
), _ = r(sn(l.value, e)), E = r(P(e.datetimeFormats) ? e.datetimeFormats : { [l.value]: {} }), N = r(P(e.numberFormats) ? e.numberFormats : { [l.value]: {} });
|
|
2399
2399
|
let p = t ? t.missingWarn : F(e.missingWarn) || Fe(e.missingWarn) ? e.missingWarn : !0, S = t ? t.fallbackWarn : F(e.fallbackWarn) || Fe(e.fallbackWarn) ? e.fallbackWarn : !0, D = t ? t.fallbackRoot : F(e.fallbackRoot) ? e.fallbackRoot : !0, v = !!e.fallbackFormat, A = $(e.missing) ? e.missing : null, f = $(e.missing) ? Gn(e.missing) : null, g = $(e.postTranslation) ? e.postTranslation : null, b = t ? t.warnHtmlMessage : F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, m = !!e.escapeParameter;
|
|
2400
|
-
const O = t ? t.modifiers :
|
|
2400
|
+
const O = t ? t.modifiers : P(e.modifiers) ? e.modifiers : {};
|
|
2401
2401
|
let y = e.pluralRules || t && t.pluralRules, h;
|
|
2402
2402
|
h = (() => {
|
|
2403
2403
|
a && An(null);
|
|
2404
2404
|
const d = {
|
|
2405
|
-
version:
|
|
2405
|
+
version: Hr,
|
|
2406
2406
|
locale: l.value,
|
|
2407
2407
|
fallbackLocale: u.value,
|
|
2408
2408
|
messages: _.value,
|
|
@@ -2420,11 +2420,11 @@ function rn(e = {}) {
|
|
|
2420
2420
|
messageCompiler: e.messageCompiler,
|
|
2421
2421
|
__meta: { framework: "vue" }
|
|
2422
2422
|
};
|
|
2423
|
-
d.datetimeFormats = E.value, d.numberFormats = N.value, d.__datetimeFormatters =
|
|
2424
|
-
const L =
|
|
2423
|
+
d.datetimeFormats = E.value, d.numberFormats = N.value, d.__datetimeFormatters = P(h) ? h.__datetimeFormatters : void 0, d.__numberFormatters = P(h) ? h.__numberFormatters : void 0, process.env.NODE_ENV !== "production" && (d.__v_emitter = P(h) ? h.__v_emitter : void 0);
|
|
2424
|
+
const L = br(d);
|
|
2425
2425
|
return a && An(L), L;
|
|
2426
2426
|
})(), Ke(h, l.value, u.value);
|
|
2427
|
-
function
|
|
2427
|
+
function U() {
|
|
2428
2428
|
return [
|
|
2429
2429
|
l.value,
|
|
2430
2430
|
u.value,
|
|
@@ -2443,34 +2443,34 @@ function rn(e = {}) {
|
|
|
2443
2443
|
set: (d) => {
|
|
2444
2444
|
h.fallbackLocale = d, u.value = d, Ke(h, l.value, d);
|
|
2445
2445
|
}
|
|
2446
|
-
}), J = Ge(() => _.value), ke = /* @__PURE__ */ Ge(() => E.value),
|
|
2447
|
-
function
|
|
2446
|
+
}), J = Ge(() => _.value), ke = /* @__PURE__ */ Ge(() => E.value), mt = /* @__PURE__ */ Ge(() => N.value);
|
|
2447
|
+
function dt() {
|
|
2448
2448
|
return $(g) ? g : null;
|
|
2449
2449
|
}
|
|
2450
|
-
function
|
|
2450
|
+
function gt(d) {
|
|
2451
2451
|
g = d, h.postTranslation = d;
|
|
2452
2452
|
}
|
|
2453
|
-
function
|
|
2453
|
+
function Et() {
|
|
2454
2454
|
return A;
|
|
2455
2455
|
}
|
|
2456
|
-
function
|
|
2456
|
+
function pt(d) {
|
|
2457
2457
|
d !== null && (f = Gn(d)), A = d, h.missing = f;
|
|
2458
2458
|
}
|
|
2459
|
-
function
|
|
2459
|
+
function ht(d, L) {
|
|
2460
2460
|
return d !== "translate" || !L.resolvedMessage;
|
|
2461
2461
|
}
|
|
2462
|
-
const ge = (d, L, V, H, ve,
|
|
2463
|
-
|
|
2464
|
-
let
|
|
2462
|
+
const ge = (d, L, V, H, ve, et) => {
|
|
2463
|
+
U();
|
|
2464
|
+
let Re;
|
|
2465
2465
|
try {
|
|
2466
|
-
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, a || (h.fallbackContext = t ?
|
|
2466
|
+
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, a || (h.fallbackContext = t ? Lr() : void 0), Re = d(h);
|
|
2467
2467
|
} finally {
|
|
2468
2468
|
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, a || (h.fallbackContext = void 0);
|
|
2469
2469
|
}
|
|
2470
2470
|
if (V !== "translate exists" && // for not `te` (e.g `t`)
|
|
2471
|
-
j(
|
|
2472
|
-
const [ye,
|
|
2473
|
-
if (process.env.NODE_ENV !== "production" && t && I(ye) &&
|
|
2471
|
+
j(Re) && Re === ft || V === "translate exists" && !Re) {
|
|
2472
|
+
const [ye, wa] = L();
|
|
2473
|
+
if (process.env.NODE_ENV !== "production" && t && I(ye) && ht(V, wa) && (D && (_t(S, ye) || ga(p, ye)) && Le(Ze(me.FALLBACK_TO_ROOT, {
|
|
2474
2474
|
key: ye,
|
|
2475
2475
|
type: V
|
|
2476
2476
|
})), process.env.NODE_ENV !== "production")) {
|
|
@@ -2484,70 +2484,70 @@ function rn(e = {}) {
|
|
|
2484
2484
|
}
|
|
2485
2485
|
return t && D ? H(t) : ve(ye);
|
|
2486
2486
|
} else {
|
|
2487
|
-
if (
|
|
2488
|
-
return
|
|
2487
|
+
if (et(Re))
|
|
2488
|
+
return Re;
|
|
2489
2489
|
throw te(G.UNEXPECTED_RETURN_TYPE);
|
|
2490
2490
|
}
|
|
2491
2491
|
};
|
|
2492
2492
|
function Ve(...d) {
|
|
2493
|
-
return ge((L) => Reflect.apply(
|
|
2493
|
+
return ge((L) => Reflect.apply(Un, null, [L, ...d]), () => Wt(...d), "translate", (L) => Reflect.apply(L.t, L, [...d]), (L) => L, (L) => I(L));
|
|
2494
2494
|
}
|
|
2495
|
-
function
|
|
2495
|
+
function Nt(...d) {
|
|
2496
2496
|
const [L, V, H] = d;
|
|
2497
2497
|
if (H && !M(H))
|
|
2498
2498
|
throw te(G.INVALID_ARGUMENT);
|
|
2499
2499
|
return Ve(L, V, Q({ resolvedMessage: !0 }, H || {}));
|
|
2500
2500
|
}
|
|
2501
|
-
function Nt(...d) {
|
|
2502
|
-
return ge((L) => Reflect.apply(kn, null, [L, ...d]), () => Ut(...d), "datetime format", (L) => Reflect.apply(L.d, L, [...d]), () => rt, (L) => I(L));
|
|
2503
|
-
}
|
|
2504
2501
|
function Tt(...d) {
|
|
2505
|
-
return ge((L) => Reflect.apply(
|
|
2502
|
+
return ge((L) => Reflect.apply(kn, null, [L, ...d]), () => Ut(...d), "datetime format", (L) => Reflect.apply(L.d, L, [...d]), () => ot, (L) => I(L));
|
|
2503
|
+
}
|
|
2504
|
+
function Lt(...d) {
|
|
2505
|
+
return ge((L) => Reflect.apply(Pn, null, [L, ...d]), () => Vt(...d), "number format", (L) => Reflect.apply(L.n, L, [...d]), () => ot, (L) => I(L));
|
|
2506
2506
|
}
|
|
2507
|
-
function
|
|
2507
|
+
function bt(d) {
|
|
2508
2508
|
return d.map((L) => I(L) || j(L) || F(L) ? Vn(String(L)) : L);
|
|
2509
2509
|
}
|
|
2510
|
-
const
|
|
2511
|
-
normalize:
|
|
2510
|
+
const Ot = {
|
|
2511
|
+
normalize: bt,
|
|
2512
2512
|
interpolate: (d) => d,
|
|
2513
2513
|
type: "vnode"
|
|
2514
2514
|
};
|
|
2515
|
-
function
|
|
2515
|
+
function ze(...d) {
|
|
2516
2516
|
return ge((L) => {
|
|
2517
2517
|
let V;
|
|
2518
2518
|
const H = L;
|
|
2519
2519
|
try {
|
|
2520
|
-
H.processor =
|
|
2520
|
+
H.processor = Ot, V = Reflect.apply(Un, null, [H, ...d]);
|
|
2521
2521
|
} finally {
|
|
2522
2522
|
H.processor = null;
|
|
2523
2523
|
}
|
|
2524
2524
|
return V;
|
|
2525
|
-
}, () =>
|
|
2526
|
-
}
|
|
2527
|
-
function Ot(...d) {
|
|
2528
|
-
return ge((L) => Reflect.apply(Rn, null, [L, ...d]), () => wt(...d), "number format", (L) => L[Gt](...d), $n, (L) => I(L) || B(L));
|
|
2525
|
+
}, () => Wt(...d), "translate", (L) => L[xt](...d), (L) => [Vn(L)], (L) => B(L));
|
|
2529
2526
|
}
|
|
2530
2527
|
function It(...d) {
|
|
2531
|
-
return ge((L) => Reflect.apply(
|
|
2528
|
+
return ge((L) => Reflect.apply(Pn, null, [L, ...d]), () => Vt(...d), "number format", (L) => L[Kt](...d), $n, (L) => I(L) || B(L));
|
|
2529
|
+
}
|
|
2530
|
+
function vt(...d) {
|
|
2531
|
+
return ge((L) => Reflect.apply(kn, null, [L, ...d]), () => Ut(...d), "datetime format", (L) => L[Gt](...d), $n, (L) => I(L) || B(L));
|
|
2532
2532
|
}
|
|
2533
|
-
function
|
|
2533
|
+
function yt(d) {
|
|
2534
2534
|
y = d, h.pluralRules = y;
|
|
2535
2535
|
}
|
|
2536
|
-
function
|
|
2536
|
+
function St(d, L) {
|
|
2537
2537
|
return ge(() => {
|
|
2538
2538
|
if (!d)
|
|
2539
2539
|
return !1;
|
|
2540
2540
|
const V = I(L) ? L : l.value, H = Ie(V), ve = h.messageResolver(H, d);
|
|
2541
2541
|
return le(ve) || oe(ve) || I(ve);
|
|
2542
|
-
}, () => [d], "translate exists", (V) => Reflect.apply(V.te, V, [d, L]),
|
|
2542
|
+
}, () => [d], "translate exists", (V) => Reflect.apply(V.te, V, [d, L]), Jr, (V) => F(V));
|
|
2543
2543
|
}
|
|
2544
2544
|
function We(d) {
|
|
2545
2545
|
let L = null;
|
|
2546
2546
|
const V = ca(h, u.value, l.value);
|
|
2547
2547
|
for (let H = 0; H < V.length; H++) {
|
|
2548
|
-
const ve = _.value[V[H]] || {},
|
|
2549
|
-
if (
|
|
2550
|
-
L =
|
|
2548
|
+
const ve = _.value[V[H]] || {}, et = h.messageResolver(ve, d);
|
|
2549
|
+
if (et != null) {
|
|
2550
|
+
L = et;
|
|
2551
2551
|
break;
|
|
2552
2552
|
}
|
|
2553
2553
|
}
|
|
@@ -2564,27 +2564,27 @@ function rn(e = {}) {
|
|
|
2564
2564
|
if (s) {
|
|
2565
2565
|
const V = { [d]: L };
|
|
2566
2566
|
for (const H in V)
|
|
2567
|
-
ce(V, H) &&
|
|
2567
|
+
ce(V, H) && Qe(V[H]);
|
|
2568
2568
|
L = V[d];
|
|
2569
2569
|
}
|
|
2570
2570
|
_.value[d] = L, h.messages = _.value;
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2572
|
+
function At(d, L) {
|
|
2573
2573
|
_.value[d] = _.value[d] || {};
|
|
2574
2574
|
const V = { [d]: L };
|
|
2575
2575
|
if (s)
|
|
2576
2576
|
for (const H in V)
|
|
2577
|
-
ce(V, H) &&
|
|
2578
|
-
L = V[d],
|
|
2577
|
+
ce(V, H) && Qe(V[H]);
|
|
2578
|
+
L = V[d], rt(L, _.value[d]), h.messages = _.value;
|
|
2579
2579
|
}
|
|
2580
2580
|
function i(d) {
|
|
2581
2581
|
return E.value[d] || {};
|
|
2582
2582
|
}
|
|
2583
2583
|
function c(d, L) {
|
|
2584
|
-
E.value[d] = L, h.datetimeFormats = E.value,
|
|
2584
|
+
E.value[d] = L, h.datetimeFormats = E.value, Rn(h, d, L);
|
|
2585
2585
|
}
|
|
2586
2586
|
function T(d, L) {
|
|
2587
|
-
E.value[d] = Q(E.value[d] || {}, L), h.datetimeFormats = E.value,
|
|
2587
|
+
E.value[d] = Q(E.value[d] || {}, L), h.datetimeFormats = E.value, Rn(h, d, L);
|
|
2588
2588
|
}
|
|
2589
2589
|
function C(d) {
|
|
2590
2590
|
return N.value[d] || {};
|
|
@@ -2595,12 +2595,12 @@ function rn(e = {}) {
|
|
|
2595
2595
|
function Y(d, L) {
|
|
2596
2596
|
N.value[d] = Q(N.value[d] || {}, L), h.numberFormats = N.value, Mn(h, d, L);
|
|
2597
2597
|
}
|
|
2598
|
-
xn++, t && ue && (
|
|
2598
|
+
xn++, t && ue && (Mt(t.locale, (d) => {
|
|
2599
2599
|
o && (l.value = d, h.locale = d, Ke(h, l.value, u.value));
|
|
2600
|
-
}),
|
|
2600
|
+
}), Mt(t.fallbackLocale, (d) => {
|
|
2601
2601
|
o && (u.value = d, h.fallbackLocale = d, Ke(h, l.value, u.value));
|
|
2602
2602
|
}));
|
|
2603
|
-
const
|
|
2603
|
+
const w = {
|
|
2604
2604
|
id: xn,
|
|
2605
2605
|
locale: X,
|
|
2606
2606
|
fallbackLocale: ie,
|
|
@@ -2662,33 +2662,33 @@ function rn(e = {}) {
|
|
|
2662
2662
|
t: Ve,
|
|
2663
2663
|
getLocaleMessage: Ie,
|
|
2664
2664
|
setLocaleMessage: xe,
|
|
2665
|
-
mergeLocaleMessage:
|
|
2666
|
-
getPostTranslationHandler:
|
|
2667
|
-
setPostTranslationHandler:
|
|
2668
|
-
getMissingHandler:
|
|
2669
|
-
setMissingHandler:
|
|
2670
|
-
[Oa]:
|
|
2665
|
+
mergeLocaleMessage: At,
|
|
2666
|
+
getPostTranslationHandler: dt,
|
|
2667
|
+
setPostTranslationHandler: gt,
|
|
2668
|
+
getMissingHandler: Et,
|
|
2669
|
+
setMissingHandler: pt,
|
|
2670
|
+
[Oa]: yt
|
|
2671
2671
|
};
|
|
2672
|
-
return
|
|
2672
|
+
return w.datetimeFormats = ke, w.numberFormats = mt, w.rt = Nt, w.te = St, w.tm = $e, w.d = Tt, w.n = Lt, w.getDateTimeFormat = i, w.setDateTimeFormat = c, w.mergeDateTimeFormat = T, w.getNumberFormat = C, w.setNumberFormat = K, w.mergeNumberFormat = Y, w[Ia] = n, w[xt] = ze, w[Gt] = vt, w[Kt] = It, process.env.NODE_ENV !== "production" && (w[De] = (d) => {
|
|
2673
2673
|
h.__v_emitter = d;
|
|
2674
|
-
},
|
|
2674
|
+
}, w[Je] = () => {
|
|
2675
2675
|
h.__v_emitter = void 0;
|
|
2676
|
-
}),
|
|
2676
|
+
}), w;
|
|
2677
2677
|
}
|
|
2678
2678
|
const Sa = "vue-i18n: composer properties", Pt = {
|
|
2679
2679
|
"vue-devtools-plugin-vue-i18n": "Vue I18n DevTools",
|
|
2680
2680
|
"vue-i18n-resource-inspector": "Vue I18n DevTools",
|
|
2681
2681
|
"vue-i18n-timeline": "Vue I18n"
|
|
2682
|
-
}, Qr = {
|
|
2683
|
-
"vue-i18n-resource-inspector": "Search for scopes ..."
|
|
2684
2682
|
}, qr = {
|
|
2683
|
+
"vue-i18n-resource-inspector": "Search for scopes ..."
|
|
2684
|
+
}, Zr = {
|
|
2685
2685
|
"vue-i18n-timeline": 16764185
|
|
2686
2686
|
};
|
|
2687
|
-
let
|
|
2688
|
-
async function
|
|
2687
|
+
let Ht;
|
|
2688
|
+
async function zr(e, t) {
|
|
2689
2689
|
return new Promise((n, a) => {
|
|
2690
2690
|
try {
|
|
2691
|
-
|
|
2691
|
+
Yr({
|
|
2692
2692
|
id: "vue-devtools-plugin-vue-i18n",
|
|
2693
2693
|
label: Pt["vue-devtools-plugin-vue-i18n"],
|
|
2694
2694
|
packageName: "vue-i18n",
|
|
@@ -2698,37 +2698,37 @@ async function Zr(e, t) {
|
|
|
2698
2698
|
app: e
|
|
2699
2699
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2700
2700
|
}, (s) => {
|
|
2701
|
-
|
|
2702
|
-
|
|
2701
|
+
Ht = s, s.on.visitComponentTree(({ componentInstance: o, treeNode: l }) => {
|
|
2702
|
+
eo(o, l, t);
|
|
2703
2703
|
}), s.on.inspectComponent(({ componentInstance: o, instanceData: l }) => {
|
|
2704
2704
|
o.vnode.el && o.vnode.el.__VUE_I18N__ && l && (t.mode === "legacy" ? o.vnode.el.__VUE_I18N__ !== t.global.__composer && Kn(l, o.vnode.el.__VUE_I18N__) : Kn(l, o.vnode.el.__VUE_I18N__));
|
|
2705
2705
|
}), s.addInspector({
|
|
2706
2706
|
id: "vue-i18n-resource-inspector",
|
|
2707
2707
|
label: Pt["vue-i18n-resource-inspector"],
|
|
2708
2708
|
icon: "language",
|
|
2709
|
-
treeFilterPlaceholder:
|
|
2709
|
+
treeFilterPlaceholder: qr["vue-i18n-resource-inspector"]
|
|
2710
2710
|
}), s.on.getInspectorTree((o) => {
|
|
2711
|
-
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" &&
|
|
2711
|
+
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && ro(o, t);
|
|
2712
2712
|
});
|
|
2713
2713
|
const r = /* @__PURE__ */ new Map();
|
|
2714
2714
|
s.on.getInspectorState(async (o) => {
|
|
2715
2715
|
if (o.app === e && o.inspectorId === "vue-i18n-resource-inspector")
|
|
2716
|
-
if (s.unhighlightElement(),
|
|
2716
|
+
if (s.unhighlightElement(), lo(o, t), o.nodeId === "global") {
|
|
2717
2717
|
if (!r.has(o.app)) {
|
|
2718
2718
|
const [l] = await s.getComponentInstances(o.app);
|
|
2719
2719
|
r.set(o.app, l);
|
|
2720
2720
|
}
|
|
2721
2721
|
s.highlightElement(r.get(o.app));
|
|
2722
2722
|
} else {
|
|
2723
|
-
const l =
|
|
2723
|
+
const l = oo(o.nodeId, t);
|
|
2724
2724
|
l && s.highlightElement(l);
|
|
2725
2725
|
}
|
|
2726
2726
|
}), s.on.editInspectorState((o) => {
|
|
2727
|
-
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" &&
|
|
2727
|
+
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && co(o, t);
|
|
2728
2728
|
}), s.addTimelineLayer({
|
|
2729
2729
|
id: "vue-i18n-timeline",
|
|
2730
2730
|
label: Pt["vue-i18n-timeline"],
|
|
2731
|
-
color:
|
|
2731
|
+
color: Zr["vue-i18n-timeline"]
|
|
2732
2732
|
}), n(!0);
|
|
2733
2733
|
});
|
|
2734
2734
|
} catch (s) {
|
|
@@ -2739,7 +2739,7 @@ async function Zr(e, t) {
|
|
|
2739
2739
|
function Aa(e) {
|
|
2740
2740
|
return e.type.name || e.type.displayName || e.type.__file || "Anonymous";
|
|
2741
2741
|
}
|
|
2742
|
-
function
|
|
2742
|
+
function eo(e, t, n) {
|
|
2743
2743
|
const a = n.mode === "composition" ? n.global : n.global.__composer;
|
|
2744
2744
|
if (e && e.vnode.el && e.vnode.el.__VUE_I18N__ && e.vnode.el.__VUE_I18N__ !== a) {
|
|
2745
2745
|
const s = {
|
|
@@ -2793,30 +2793,30 @@ function on(e) {
|
|
|
2793
2793
|
const t = {};
|
|
2794
2794
|
return Object.keys(e).forEach((n) => {
|
|
2795
2795
|
const a = e[n];
|
|
2796
|
-
$(a) && "source" in a ? t[n] =
|
|
2796
|
+
$(a) && "source" in a ? t[n] = so(a) : le(a) && a.loc && a.loc.source ? t[n] = a.loc.source : M(a) ? t[n] = on(a) : t[n] = a;
|
|
2797
2797
|
}), t;
|
|
2798
2798
|
}
|
|
2799
|
-
const
|
|
2799
|
+
const to = {
|
|
2800
2800
|
"<": "<",
|
|
2801
2801
|
">": ">",
|
|
2802
2802
|
'"': """,
|
|
2803
2803
|
"&": "&"
|
|
2804
2804
|
};
|
|
2805
|
-
function to(e) {
|
|
2806
|
-
return e.replace(/[<>"&]/g, no);
|
|
2807
|
-
}
|
|
2808
2805
|
function no(e) {
|
|
2809
|
-
return
|
|
2806
|
+
return e.replace(/[<>"&]/g, ao);
|
|
2810
2807
|
}
|
|
2811
2808
|
function ao(e) {
|
|
2809
|
+
return to[e] || e;
|
|
2810
|
+
}
|
|
2811
|
+
function so(e) {
|
|
2812
2812
|
return {
|
|
2813
2813
|
_custom: {
|
|
2814
2814
|
type: "function",
|
|
2815
|
-
display: `<span>ƒ</span> ${e.source ? `("${
|
|
2815
|
+
display: `<span>ƒ</span> ${e.source ? `("${no(e.source)}")` : "(?)"}`
|
|
2816
2816
|
}
|
|
2817
2817
|
};
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2819
|
+
function ro(e, t) {
|
|
2820
2820
|
e.rootNodes.push({
|
|
2821
2821
|
id: "global",
|
|
2822
2822
|
label: "Global Scope"
|
|
@@ -2830,7 +2830,7 @@ function so(e, t) {
|
|
|
2830
2830
|
});
|
|
2831
2831
|
}
|
|
2832
2832
|
}
|
|
2833
|
-
function
|
|
2833
|
+
function oo(e, t) {
|
|
2834
2834
|
let n = null;
|
|
2835
2835
|
if (e !== "global") {
|
|
2836
2836
|
for (const [a, s] of t.__instances.entries())
|
|
@@ -2849,11 +2849,11 @@ function Ca(e, t) {
|
|
|
2849
2849
|
return n ? t.mode === "composition" ? n : n.__composer : null;
|
|
2850
2850
|
}
|
|
2851
2851
|
}
|
|
2852
|
-
function
|
|
2852
|
+
function lo(e, t) {
|
|
2853
2853
|
const n = Ca(e.nodeId, t);
|
|
2854
|
-
return n && (e.state =
|
|
2854
|
+
return n && (e.state = io(n)), null;
|
|
2855
2855
|
}
|
|
2856
|
-
function
|
|
2856
|
+
function io(e) {
|
|
2857
2857
|
const t = {}, n = "Locale related info", a = [
|
|
2858
2858
|
{
|
|
2859
2859
|
type: n,
|
|
@@ -2912,10 +2912,10 @@ function lo(e) {
|
|
|
2912
2912
|
}
|
|
2913
2913
|
return t;
|
|
2914
2914
|
}
|
|
2915
|
-
function
|
|
2916
|
-
if (
|
|
2915
|
+
function qe(e, t) {
|
|
2916
|
+
if (Ht) {
|
|
2917
2917
|
let n;
|
|
2918
|
-
t && "groupId" in t && (n = t.groupId, delete t.groupId),
|
|
2918
|
+
t && "groupId" in t && (n = t.groupId, delete t.groupId), Ht.addTimelineEvent({
|
|
2919
2919
|
layerId: "vue-i18n-timeline",
|
|
2920
2920
|
event: {
|
|
2921
2921
|
title: e,
|
|
@@ -2928,21 +2928,21 @@ function Qe(e, t) {
|
|
|
2928
2928
|
});
|
|
2929
2929
|
}
|
|
2930
2930
|
}
|
|
2931
|
-
function
|
|
2931
|
+
function co(e, t) {
|
|
2932
2932
|
const n = Ca(e.nodeId, t);
|
|
2933
2933
|
if (n) {
|
|
2934
2934
|
const [a] = e.path;
|
|
2935
2935
|
a === "locale" && I(e.state.value) ? n.locale.value = e.state.value : a === "fallbackLocale" && (I(e.state.value) || B(e.state.value) || M(e.state.value)) ? n.fallbackLocale.value = e.state.value : a === "inheritLocale" && F(e.state.value) && (n.inheritLocale = e.state.value);
|
|
2936
2936
|
}
|
|
2937
2937
|
}
|
|
2938
|
-
function
|
|
2939
|
-
const t = I(e.locale) ? e.locale :
|
|
2938
|
+
function uo(e) {
|
|
2939
|
+
const t = I(e.locale) ? e.locale : Xe, n = I(e.fallbackLocale) || B(e.fallbackLocale) || P(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, a = $(e.missing) ? e.missing : void 0, s = F(e.silentTranslationWarn) || Fe(e.silentTranslationWarn) ? !e.silentTranslationWarn : !0, r = F(e.silentFallbackWarn) || Fe(e.silentFallbackWarn) ? !e.silentFallbackWarn : !0, o = F(e.fallbackRoot) ? e.fallbackRoot : !0, l = !!e.formatFallbackMessages, u = P(e.modifiers) ? e.modifiers : {}, _ = e.pluralizationRules, E = $(e.postTranslation) ? e.postTranslation : void 0, N = I(e.warnHtmlInMessage) ? e.warnHtmlInMessage !== "off" : !0, p = !!e.escapeParameterHtml, S = F(e.sync) ? e.sync : !0;
|
|
2940
2940
|
let D = e.messages;
|
|
2941
|
-
if (
|
|
2941
|
+
if (P(e.sharedMessages)) {
|
|
2942
2942
|
const O = e.sharedMessages;
|
|
2943
|
-
D = Object.keys(O).reduce((h,
|
|
2944
|
-
const
|
|
2945
|
-
return Q(
|
|
2943
|
+
D = Object.keys(O).reduce((h, R) => {
|
|
2944
|
+
const U = h[R] || (h[R] = {});
|
|
2945
|
+
return Q(U, O[R]), h;
|
|
2946
2946
|
}, D || {});
|
|
2947
2947
|
}
|
|
2948
2948
|
const { __i18n: v, __root: A, __injectWithOption: f } = e, g = e.datetimeFormats, b = e.numberFormats, m = e.flatJson;
|
|
@@ -2970,8 +2970,8 @@ function co(e) {
|
|
|
2970
2970
|
__injectWithOption: f
|
|
2971
2971
|
};
|
|
2972
2972
|
}
|
|
2973
|
-
function
|
|
2974
|
-
const t = rn(
|
|
2973
|
+
function Bt(e = {}) {
|
|
2974
|
+
const t = rn(uo(e)), { __extender: n } = e, a = {
|
|
2975
2975
|
// id
|
|
2976
2976
|
id: t.id,
|
|
2977
2977
|
// locale
|
|
@@ -3136,13 +3136,13 @@ function Ht(e = {}) {
|
|
|
3136
3136
|
r[De] && r[De](s);
|
|
3137
3137
|
}, a.__disableEmitter = () => {
|
|
3138
3138
|
const s = t;
|
|
3139
|
-
s[
|
|
3139
|
+
s[Je] && s[Je]();
|
|
3140
3140
|
}), a;
|
|
3141
3141
|
}
|
|
3142
|
-
function
|
|
3142
|
+
function fo(e, t, n) {
|
|
3143
3143
|
return {
|
|
3144
3144
|
beforeCreate() {
|
|
3145
|
-
const a =
|
|
3145
|
+
const a = He();
|
|
3146
3146
|
if (!a)
|
|
3147
3147
|
throw te(G.UNEXPECTED_ERROR);
|
|
3148
3148
|
const s = this.$options;
|
|
@@ -3151,7 +3151,7 @@ function uo(e, t, n) {
|
|
|
3151
3151
|
if (s.__i18n && (r.__i18n = s.__i18n), r.__root = t, this === this.$root)
|
|
3152
3152
|
this.$i18n = Yn(e, r);
|
|
3153
3153
|
else {
|
|
3154
|
-
r.__injectWithOption = !0, r.__extender = n.__vueI18nExtend, this.$i18n =
|
|
3154
|
+
r.__injectWithOption = !0, r.__extender = n.__vueI18nExtend, this.$i18n = Bt(r);
|
|
3155
3155
|
const o = this.$i18n;
|
|
3156
3156
|
o.__extender && (o.__disposer = o.__extender(this.$i18n));
|
|
3157
3157
|
}
|
|
@@ -3159,7 +3159,7 @@ function uo(e, t, n) {
|
|
|
3159
3159
|
if (this === this.$root)
|
|
3160
3160
|
this.$i18n = Yn(e, s);
|
|
3161
3161
|
else {
|
|
3162
|
-
this.$i18n =
|
|
3162
|
+
this.$i18n = Bt({
|
|
3163
3163
|
__i18n: s.__i18n,
|
|
3164
3164
|
__injectWithOption: !0,
|
|
3165
3165
|
__extender: n.__vueI18nExtend,
|
|
@@ -3177,15 +3177,15 @@ function uo(e, t, n) {
|
|
|
3177
3177
|
const a = this.$i18n;
|
|
3178
3178
|
this.$el.__VUE_I18N__ = a.__composer;
|
|
3179
3179
|
const s = this.__v_emitter = zt();
|
|
3180
|
-
a.__enableEmitter && a.__enableEmitter(s), s.on("*",
|
|
3180
|
+
a.__enableEmitter && a.__enableEmitter(s), s.on("*", qe);
|
|
3181
3181
|
}
|
|
3182
3182
|
},
|
|
3183
3183
|
unmounted() {
|
|
3184
|
-
const a =
|
|
3184
|
+
const a = He();
|
|
3185
3185
|
if (!a)
|
|
3186
3186
|
throw te(G.UNEXPECTED_ERROR);
|
|
3187
3187
|
const s = this.$i18n;
|
|
3188
|
-
process.env.NODE_ENV !== "production" && this.$el && this.$el.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*",
|
|
3188
|
+
process.env.NODE_ENV !== "production" && this.$el && this.$el.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*", qe), delete this.__v_emitter), this.$i18n && (s.__disableEmitter && s.__disableEmitter(), delete this.$el.__VUE_I18N__)), delete this.$t, delete this.$rt, delete this.$te, delete this.$d, delete this.$n, delete this.$tm, s.__disposer && (s.__disposer(), delete s.__disposer, delete s.__extender), n.__deleteInstance(a), delete this.$i18n;
|
|
3189
3189
|
}
|
|
3190
3190
|
};
|
|
3191
3191
|
}
|
|
@@ -3215,7 +3215,7 @@ const ln = {
|
|
|
3215
3215
|
type: Object
|
|
3216
3216
|
}
|
|
3217
3217
|
};
|
|
3218
|
-
function
|
|
3218
|
+
function _o({ slots: e }, t) {
|
|
3219
3219
|
return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((a, s) => [
|
|
3220
3220
|
...a,
|
|
3221
3221
|
// prettier-ignore
|
|
@@ -3228,7 +3228,7 @@ function fo({ slots: e }, t) {
|
|
|
3228
3228
|
function Da() {
|
|
3229
3229
|
return Jt;
|
|
3230
3230
|
}
|
|
3231
|
-
const
|
|
3231
|
+
const mo = /* @__PURE__ */ Xt({
|
|
3232
3232
|
/* eslint-disable */
|
|
3233
3233
|
name: "i18n-t",
|
|
3234
3234
|
props: Q({
|
|
@@ -3251,12 +3251,12 @@ const _o = /* @__PURE__ */ Xt({
|
|
|
3251
3251
|
return () => {
|
|
3252
3252
|
const r = Object.keys(n).filter((N) => N !== "_"), o = W();
|
|
3253
3253
|
e.locale && (o.locale = e.locale), e.plural !== void 0 && (o.plural = I(e.plural) ? +e.plural : e.plural);
|
|
3254
|
-
const l =
|
|
3254
|
+
const l = _o(t, r), u = s[xt](e.keypath, l, o), _ = Q(W(), a), E = I(e.tag) || M(e.tag) ? e.tag : Da();
|
|
3255
3255
|
return Zn(E, _, u);
|
|
3256
3256
|
};
|
|
3257
3257
|
}
|
|
3258
|
-
}), Hn =
|
|
3259
|
-
function
|
|
3258
|
+
}), Hn = mo;
|
|
3259
|
+
function go(e) {
|
|
3260
3260
|
return B(e) && !I(e[0]);
|
|
3261
3261
|
}
|
|
3262
3262
|
function ka(e, t, n, a) {
|
|
@@ -3269,13 +3269,13 @@ function ka(e, t, n, a) {
|
|
|
3269
3269
|
let _ = [o.key];
|
|
3270
3270
|
B(u) ? _ = u.map((p, S) => {
|
|
3271
3271
|
const D = s[p.type], v = D ? D({ [p.type]: p.value, index: S, parts: u }) : [p.value];
|
|
3272
|
-
return
|
|
3272
|
+
return go(v) && (v[0].key = `${p.type}-${S}`), v;
|
|
3273
3273
|
}) : I(u) && (_ = [u]);
|
|
3274
3274
|
const E = Q(W(), r), N = I(e.tag) || M(e.tag) ? e.tag : Da();
|
|
3275
3275
|
return Zn(N, E, _);
|
|
3276
3276
|
};
|
|
3277
3277
|
}
|
|
3278
|
-
const
|
|
3278
|
+
const Eo = /* @__PURE__ */ Xt({
|
|
3279
3279
|
/* eslint-disable */
|
|
3280
3280
|
name: "i18n-n",
|
|
3281
3281
|
props: Q({
|
|
@@ -3296,11 +3296,11 @@ const go = /* @__PURE__ */ Xt({
|
|
|
3296
3296
|
});
|
|
3297
3297
|
return ka(e, t, Na, (...a) => (
|
|
3298
3298
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3299
|
-
n[
|
|
3299
|
+
n[Kt](...a)
|
|
3300
3300
|
));
|
|
3301
3301
|
}
|
|
3302
|
-
}), Bn =
|
|
3303
|
-
function
|
|
3302
|
+
}), Bn = Eo;
|
|
3303
|
+
function po(e, t) {
|
|
3304
3304
|
const n = e;
|
|
3305
3305
|
if (e.mode === "composition")
|
|
3306
3306
|
return n.__getInstance(t) || e.global;
|
|
@@ -3309,13 +3309,13 @@ function Eo(e, t) {
|
|
|
3309
3309
|
return a != null ? a.__composer : e.global.__composer;
|
|
3310
3310
|
}
|
|
3311
3311
|
}
|
|
3312
|
-
function
|
|
3312
|
+
function ho(e) {
|
|
3313
3313
|
const t = (o) => {
|
|
3314
|
-
process.env.NODE_ENV !== "production" && Zt(
|
|
3314
|
+
process.env.NODE_ENV !== "production" && Zt(Ze(me.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));
|
|
3315
3315
|
const { instance: l, value: u } = o;
|
|
3316
3316
|
if (!l || !l.$)
|
|
3317
3317
|
throw te(G.UNEXPECTED_ERROR);
|
|
3318
|
-
const _ =
|
|
3318
|
+
const _ = po(e, l.$), E = jn(u);
|
|
3319
3319
|
return [
|
|
3320
3320
|
Reflect.apply(_.t, _, [...Xn(E)]),
|
|
3321
3321
|
_
|
|
@@ -3324,7 +3324,7 @@ function po(e) {
|
|
|
3324
3324
|
return {
|
|
3325
3325
|
created: (o, l) => {
|
|
3326
3326
|
const [u, _] = t(l);
|
|
3327
|
-
ue && e.global === _ && (o.__i18nWatcher =
|
|
3327
|
+
ue && e.global === _ && (o.__i18nWatcher = Mt(_.locale, () => {
|
|
3328
3328
|
l.instance && l.instance.$forceUpdate();
|
|
3329
3329
|
})), o.__composer = _, o.textContent = u;
|
|
3330
3330
|
},
|
|
@@ -3348,7 +3348,7 @@ function po(e) {
|
|
|
3348
3348
|
function jn(e) {
|
|
3349
3349
|
if (I(e))
|
|
3350
3350
|
return { path: e };
|
|
3351
|
-
if (
|
|
3351
|
+
if (P(e)) {
|
|
3352
3352
|
if (!("path" in e))
|
|
3353
3353
|
throw te(G.REQUIRED_VALUE, "path");
|
|
3354
3354
|
return e;
|
|
@@ -3359,15 +3359,15 @@ function Xn(e) {
|
|
|
3359
3359
|
const { path: t, locale: n, args: a, choice: s, plural: r } = e, o = {}, l = a || {};
|
|
3360
3360
|
return I(n) && (o.locale = n), j(s) && (o.plural = s), j(r) && (o.plural = r), [t, l, o];
|
|
3361
3361
|
}
|
|
3362
|
-
function
|
|
3363
|
-
const a =
|
|
3364
|
-
(F(a.globalInstall) ? a.globalInstall : !0) && ([Hn.name, "I18nT"].forEach((r) => e.component(r, Hn)), [Bn.name, "I18nN"].forEach((r) => e.component(r, Bn)), [Qn.name, "I18nD"].forEach((r) => e.component(r, Qn))), e.directive("t",
|
|
3362
|
+
function No(e, t, ...n) {
|
|
3363
|
+
const a = P(n[0]) ? n[0] : {};
|
|
3364
|
+
(F(a.globalInstall) ? a.globalInstall : !0) && ([Hn.name, "I18nT"].forEach((r) => e.component(r, Hn)), [Bn.name, "I18nN"].forEach((r) => e.component(r, Bn)), [Qn.name, "I18nD"].forEach((r) => e.component(r, Qn))), e.directive("t", ho(t));
|
|
3365
3365
|
}
|
|
3366
|
-
const
|
|
3367
|
-
function
|
|
3366
|
+
const To = /* @__PURE__ */ de("global-vue-i18n");
|
|
3367
|
+
function Lo(e = {}) {
|
|
3368
3368
|
const t = __VUE_I18N_LEGACY_API__ && F(e.legacy) ? e.legacy : __VUE_I18N_LEGACY_API__;
|
|
3369
|
-
process.env.NODE_ENV !== "production" && t && Zt(
|
|
3370
|
-
const n = F(e.globalInjection) ? e.globalInjection : !0, a = /* @__PURE__ */ new Map(), [s, r] =
|
|
3369
|
+
process.env.NODE_ENV !== "production" && t && Zt(Ze(me.DEPRECATE_LEGACY_MODE));
|
|
3370
|
+
const n = F(e.globalInjection) ? e.globalInjection : !0, a = /* @__PURE__ */ new Map(), [s, r] = bo(e, t), o = /* @__PURE__ */ de(process.env.NODE_ENV !== "production" ? "vue-i18n" : "");
|
|
3371
3371
|
function l(N) {
|
|
3372
3372
|
return a.get(N) || null;
|
|
3373
3373
|
}
|
|
@@ -3384,17 +3384,17 @@ function To(e = {}) {
|
|
|
3384
3384
|
},
|
|
3385
3385
|
// install plugin
|
|
3386
3386
|
async install(N, ...p) {
|
|
3387
|
-
if (process.env.NODE_ENV !== "production" && (N.__VUE_I18N__ = E), N.__VUE_I18N_SYMBOL__ = o, N.provide(N.__VUE_I18N_SYMBOL__, E),
|
|
3387
|
+
if (process.env.NODE_ENV !== "production" && (N.__VUE_I18N__ = E), N.__VUE_I18N_SYMBOL__ = o, N.provide(N.__VUE_I18N_SYMBOL__, E), P(p[0])) {
|
|
3388
3388
|
const v = p[0];
|
|
3389
3389
|
E.__composerExtend = v.__composerExtend, E.__vueI18nExtend = v.__vueI18nExtend;
|
|
3390
3390
|
}
|
|
3391
3391
|
let S = null;
|
|
3392
|
-
!t && n && (S =
|
|
3392
|
+
!t && n && (S = Do(N, E.global)), __VUE_I18N_FULL_INSTALL__ && No(N, E, ...p), __VUE_I18N_LEGACY_API__ && t && N.mixin(fo(r, r.__composer, E));
|
|
3393
3393
|
const D = N.unmount;
|
|
3394
3394
|
if (N.unmount = () => {
|
|
3395
3395
|
S && S(), E.dispose(), D();
|
|
3396
3396
|
}, process.env.NODE_ENV !== "production") {
|
|
3397
|
-
if (!await
|
|
3397
|
+
if (!await zr(N, E))
|
|
3398
3398
|
throw te(G.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
|
|
3399
3399
|
const A = zt();
|
|
3400
3400
|
if (t) {
|
|
@@ -3404,7 +3404,7 @@ function To(e = {}) {
|
|
|
3404
3404
|
const f = r;
|
|
3405
3405
|
f[De] && f[De](A);
|
|
3406
3406
|
}
|
|
3407
|
-
A.on("*",
|
|
3407
|
+
A.on("*", qe);
|
|
3408
3408
|
}
|
|
3409
3409
|
},
|
|
3410
3410
|
// global accessor
|
|
@@ -3426,48 +3426,48 @@ function To(e = {}) {
|
|
|
3426
3426
|
return E;
|
|
3427
3427
|
}
|
|
3428
3428
|
function cn(e = {}) {
|
|
3429
|
-
const t =
|
|
3429
|
+
const t = He();
|
|
3430
3430
|
if (t == null)
|
|
3431
3431
|
throw te(G.MUST_BE_CALL_SETUP_TOP);
|
|
3432
3432
|
if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
|
|
3433
3433
|
throw te(G.NOT_INSTALLED);
|
|
3434
|
-
const n =
|
|
3434
|
+
const n = Oo(t), a = vo(n), s = va(t), r = Io(e, s);
|
|
3435
3435
|
if (r === "global")
|
|
3436
3436
|
return ya(a, e, s), a;
|
|
3437
3437
|
if (r === "parent") {
|
|
3438
|
-
let u =
|
|
3439
|
-
return u == null && (process.env.NODE_ENV !== "production" && Le(
|
|
3438
|
+
let u = yo(n, t, e.__useComponent);
|
|
3439
|
+
return u == null && (process.env.NODE_ENV !== "production" && Le(Ze(me.NOT_FOUND_PARENT_SCOPE)), u = a), u;
|
|
3440
3440
|
}
|
|
3441
3441
|
const o = n;
|
|
3442
3442
|
let l = o.__getInstance(t);
|
|
3443
3443
|
if (l == null) {
|
|
3444
3444
|
const u = Q({}, e);
|
|
3445
|
-
"__i18n" in s && (u.__i18n = s.__i18n), a && (u.__root = a), l = rn(u), o.__composerExtend && (l[
|
|
3445
|
+
"__i18n" in s && (u.__i18n = s.__i18n), a && (u.__root = a), l = rn(u), o.__composerExtend && (l[Yt] = o.__composerExtend(l)), Ao(o, t, l), o.__setInstance(t, l);
|
|
3446
3446
|
}
|
|
3447
3447
|
return l;
|
|
3448
3448
|
}
|
|
3449
|
-
function
|
|
3450
|
-
const n = Va(), a = __VUE_I18N_LEGACY_API__ && t ? n.run(() =>
|
|
3449
|
+
function bo(e, t) {
|
|
3450
|
+
const n = Va(), a = __VUE_I18N_LEGACY_API__ && t ? n.run(() => Bt(e)) : n.run(() => rn(e));
|
|
3451
3451
|
if (a == null)
|
|
3452
3452
|
throw te(G.UNEXPECTED_ERROR);
|
|
3453
3453
|
return [n, a];
|
|
3454
3454
|
}
|
|
3455
|
-
function
|
|
3456
|
-
const t = Wa(e.isCE ?
|
|
3455
|
+
function Oo(e) {
|
|
3456
|
+
const t = Wa(e.isCE ? To : e.appContext.app.__VUE_I18N_SYMBOL__);
|
|
3457
3457
|
if (!t)
|
|
3458
3458
|
throw te(e.isCE ? G.NOT_INSTALLED_WITH_PROVIDE : G.UNEXPECTED_ERROR);
|
|
3459
3459
|
return t;
|
|
3460
3460
|
}
|
|
3461
|
-
function
|
|
3462
|
-
return
|
|
3461
|
+
function Io(e, t) {
|
|
3462
|
+
return ut(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
|
|
3463
3463
|
}
|
|
3464
|
-
function
|
|
3464
|
+
function vo(e) {
|
|
3465
3465
|
return e.mode === "composition" ? e.global : e.global.__composer;
|
|
3466
3466
|
}
|
|
3467
|
-
function
|
|
3467
|
+
function yo(e, t, n = !1) {
|
|
3468
3468
|
let a = null;
|
|
3469
3469
|
const s = t.root;
|
|
3470
|
-
let r =
|
|
3470
|
+
let r = So(t, n);
|
|
3471
3471
|
for (; r != null; ) {
|
|
3472
3472
|
const o = e;
|
|
3473
3473
|
if (e.mode === "composition")
|
|
@@ -3482,32 +3482,32 @@ function vo(e, t, n = !1) {
|
|
|
3482
3482
|
}
|
|
3483
3483
|
return a;
|
|
3484
3484
|
}
|
|
3485
|
-
function
|
|
3485
|
+
function So(e, t = !1) {
|
|
3486
3486
|
return e == null ? null : t && e.vnode.ctx || e.parent;
|
|
3487
3487
|
}
|
|
3488
|
-
function
|
|
3488
|
+
function Ao(e, t, n) {
|
|
3489
3489
|
let a = null;
|
|
3490
3490
|
$a(() => {
|
|
3491
3491
|
if (process.env.NODE_ENV !== "production" && t.vnode.el) {
|
|
3492
3492
|
t.vnode.el.__VUE_I18N__ = n, a = zt();
|
|
3493
3493
|
const s = n;
|
|
3494
|
-
s[De] && s[De](a), a.on("*",
|
|
3494
|
+
s[De] && s[De](a), a.on("*", qe);
|
|
3495
3495
|
}
|
|
3496
3496
|
}, t), xa(() => {
|
|
3497
3497
|
const s = n;
|
|
3498
|
-
process.env.NODE_ENV !== "production" && t.vnode.el && t.vnode.el.__VUE_I18N__ && (a && a.off("*",
|
|
3499
|
-
const r = s[
|
|
3500
|
-
r && (r(), delete s[
|
|
3498
|
+
process.env.NODE_ENV !== "production" && t.vnode.el && t.vnode.el.__VUE_I18N__ && (a && a.off("*", qe), s[Je] && s[Je](), delete t.vnode.el.__VUE_I18N__), e.__deleteInstance(t);
|
|
3499
|
+
const r = s[Yt];
|
|
3500
|
+
r && (r(), delete s[Yt]);
|
|
3501
3501
|
}, t);
|
|
3502
3502
|
}
|
|
3503
|
-
const
|
|
3503
|
+
const Co = [
|
|
3504
3504
|
"locale",
|
|
3505
3505
|
"fallbackLocale",
|
|
3506
3506
|
"availableLocales"
|
|
3507
3507
|
], Jn = ["t", "rt", "d", "n", "tm", "te"];
|
|
3508
|
-
function
|
|
3508
|
+
function Do(e, t) {
|
|
3509
3509
|
const n = /* @__PURE__ */ Object.create(null);
|
|
3510
|
-
return
|
|
3510
|
+
return Co.forEach((s) => {
|
|
3511
3511
|
const r = Object.getOwnPropertyDescriptor(t, s);
|
|
3512
3512
|
if (!r)
|
|
3513
3513
|
throw te(G.UNEXPECTED_ERROR);
|
|
@@ -3536,7 +3536,7 @@ function Co(e, t) {
|
|
|
3536
3536
|
});
|
|
3537
3537
|
};
|
|
3538
3538
|
}
|
|
3539
|
-
const
|
|
3539
|
+
const ko = /* @__PURE__ */ Xt({
|
|
3540
3540
|
/* eslint-disable */
|
|
3541
3541
|
name: "i18n-d",
|
|
3542
3542
|
props: Q({
|
|
@@ -3557,20 +3557,20 @@ const Do = /* @__PURE__ */ Xt({
|
|
|
3557
3557
|
});
|
|
3558
3558
|
return ka(e, t, ha, (...a) => (
|
|
3559
3559
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3560
|
-
n[
|
|
3560
|
+
n[Gt](...a)
|
|
3561
3561
|
));
|
|
3562
3562
|
}
|
|
3563
|
-
}), Qn =
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3563
|
+
}), Qn = ko;
|
|
3564
|
+
Br();
|
|
3565
|
+
Er(Xs);
|
|
3566
|
+
pr(fr);
|
|
3567
|
+
hr(ca);
|
|
3568
3568
|
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
3569
3569
|
const e = Se();
|
|
3570
|
-
e.__INTLIFY__ = !0,
|
|
3570
|
+
e.__INTLIFY__ = !0, Js(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
|
|
3571
3571
|
}
|
|
3572
3572
|
process.env.NODE_ENV;
|
|
3573
|
-
const
|
|
3573
|
+
const Ro = (e) => {
|
|
3574
3574
|
const t = {};
|
|
3575
3575
|
for (const n of e)
|
|
3576
3576
|
t[n.key] = n.value;
|
|
@@ -3578,7 +3578,7 @@ const ko = (e) => {
|
|
|
3578
3578
|
}, Po = (e, t) => (t.forEach((n) => {
|
|
3579
3579
|
const a = x.find(e, { key: n.key });
|
|
3580
3580
|
a ? x.merge(a, n) : e.push(n);
|
|
3581
|
-
}), e),
|
|
3581
|
+
}), e), Ra = async ({ baseUrl: e, token: t }) => it.get(e + "/i18n-web/sysoption/getsupportedlangs", {
|
|
3582
3582
|
headers: {
|
|
3583
3583
|
Authorization: t
|
|
3584
3584
|
}
|
|
@@ -3590,7 +3590,7 @@ const ko = (e) => {
|
|
|
3590
3590
|
baseUrl: s,
|
|
3591
3591
|
token: r
|
|
3592
3592
|
}) => new Promise(async (o, l) => {
|
|
3593
|
-
const u = s + "/i18n-web/kv_translate/kv_translates", _ = a ? u + "?lastPullDate=" + a : u, E = await
|
|
3593
|
+
const u = s + "/i18n-web/kv_translate/kv_translates", _ = a ? u + "?lastPullDate=" + a : u, E = await it({
|
|
3594
3594
|
url: _,
|
|
3595
3595
|
method: "GET",
|
|
3596
3596
|
headers: {
|
|
@@ -3601,21 +3601,21 @@ const ko = (e) => {
|
|
|
3601
3601
|
}
|
|
3602
3602
|
});
|
|
3603
3603
|
E.data && E.data.result == 0 ? o(E.data.retVal) : o(E);
|
|
3604
|
-
}),
|
|
3604
|
+
}), Mo = async ({ data: e, token: t, baseUrl: n }) => it({
|
|
3605
3605
|
url: n + "/i18n-web/kv_translate/userDicts",
|
|
3606
3606
|
method: "POST",
|
|
3607
3607
|
headers: {
|
|
3608
3608
|
Authorization: t
|
|
3609
3609
|
},
|
|
3610
3610
|
data: e
|
|
3611
|
-
}),
|
|
3611
|
+
}), Fo = async ({ data: e, token: t, baseUrl: n }) => it({
|
|
3612
3612
|
url: n + "/i18n-web/kv_translate/batch",
|
|
3613
3613
|
method: "POST",
|
|
3614
3614
|
data: e,
|
|
3615
3615
|
headers: {
|
|
3616
3616
|
Authorization: t
|
|
3617
3617
|
}
|
|
3618
|
-
}),
|
|
3618
|
+
}), wo = async ({
|
|
3619
3619
|
baseUrl: e,
|
|
3620
3620
|
appCode: t,
|
|
3621
3621
|
language: n = "zh-CN",
|
|
@@ -3789,12 +3789,12 @@ const ko = (e) => {
|
|
|
3789
3789
|
});
|
|
3790
3790
|
});
|
|
3791
3791
|
}), x.isEmpty(n)) {
|
|
3792
|
-
|
|
3792
|
+
tt.error({
|
|
3793
3793
|
content: "没有需要保存的数据"
|
|
3794
3794
|
});
|
|
3795
3795
|
return;
|
|
3796
3796
|
}
|
|
3797
|
-
const a = await
|
|
3797
|
+
const a = await Fo({
|
|
3798
3798
|
baseUrl: this.baseUrl,
|
|
3799
3799
|
data: {
|
|
3800
3800
|
appCode: this.appCode,
|
|
@@ -3803,9 +3803,9 @@ const ko = (e) => {
|
|
|
3803
3803
|
},
|
|
3804
3804
|
token: this.token
|
|
3805
3805
|
});
|
|
3806
|
-
a && a.data.result === 0 ? (
|
|
3806
|
+
a && a.data.result === 0 ? (tt.success({
|
|
3807
3807
|
content: e || a.data.msg
|
|
3808
|
-
}), this.setLanguage(), this.initialData = x.cloneDeep(this.data.datas), t && this.closeModal(), this.mySaveData = []) :
|
|
3808
|
+
}), this.setLanguage(), this.initialData = x.cloneDeep(this.data.datas), t && this.closeModal(), this.mySaveData = []) : tt.error({
|
|
3809
3809
|
content: a.data.msg || "保存失败"
|
|
3810
3810
|
});
|
|
3811
3811
|
},
|
|
@@ -3836,7 +3836,7 @@ const ko = (e) => {
|
|
|
3836
3836
|
},
|
|
3837
3837
|
async search(e, t) {
|
|
3838
3838
|
this.loading = !0;
|
|
3839
|
-
const n = await
|
|
3839
|
+
const n = await Mo({
|
|
3840
3840
|
baseUrl: this.baseUrl,
|
|
3841
3841
|
data: {
|
|
3842
3842
|
appCode: this.appCode,
|
|
@@ -3864,7 +3864,7 @@ const ko = (e) => {
|
|
|
3864
3864
|
},
|
|
3865
3865
|
async init() {
|
|
3866
3866
|
let e = pe.get("I18N_LANGUAGE_SETTING");
|
|
3867
|
-
const t = await
|
|
3867
|
+
const t = await Ra({
|
|
3868
3868
|
token: this.token,
|
|
3869
3869
|
baseUrl: this.baseUrl
|
|
3870
3870
|
});
|
|
@@ -3874,16 +3874,16 @@ const ko = (e) => {
|
|
|
3874
3874
|
x.includes(e, a.code) && (a.checked = !0);
|
|
3875
3875
|
}), this.languages = n, this.getPageData();
|
|
3876
3876
|
} else
|
|
3877
|
-
|
|
3877
|
+
tt.error("获取语言失败,出错了");
|
|
3878
3878
|
}
|
|
3879
3879
|
}
|
|
3880
|
-
},
|
|
3880
|
+
}, Vo = (e, t) => {
|
|
3881
3881
|
const n = e.__vccOpts || e;
|
|
3882
3882
|
for (const [a, s] of t)
|
|
3883
3883
|
n[a] = s;
|
|
3884
3884
|
return n;
|
|
3885
|
-
},
|
|
3886
|
-
function
|
|
3885
|
+
}, Wo = { key: 0 }, $o = { class: "extra" }, xo = { class: "gc_i18n_page" }, Go = { style: { display: "flex" } };
|
|
3886
|
+
function Ko(e, t, n, a, s, r) {
|
|
3887
3887
|
const o = z("Spin"), l = z("Table"), u = z("TabPane"), _ = z("Icon"), E = z("Checkbox"), N = z("DropdownItem"), p = z("DropdownMenu"), S = z("Dropdown"), D = z("Input"), v = z("Tabs"), A = z("Page"), f = z("Button"), g = z("Modal"), b = Ba("click-away");
|
|
3888
3888
|
return se(), fe(g, {
|
|
3889
3889
|
modelValue: s.isModalVisible,
|
|
@@ -3895,7 +3895,7 @@ function Go(e, t, n, a, s, r) {
|
|
|
3895
3895
|
onOnCancel: r.closeModal
|
|
3896
3896
|
}, {
|
|
3897
3897
|
default: ne(() => [
|
|
3898
|
-
s.isModalVisible ? (se(), mn("div",
|
|
3898
|
+
s.isModalVisible ? (se(), mn("div", Wo, [
|
|
3899
3899
|
re(v, {
|
|
3900
3900
|
modelValue: s.type,
|
|
3901
3901
|
"onUpdate:modelValue": t[2] || (t[2] = (m) => s.type = m),
|
|
@@ -3904,7 +3904,7 @@ function Go(e, t, n, a, s, r) {
|
|
|
3904
3904
|
onOnClick: r.changeTab
|
|
3905
3905
|
}, {
|
|
3906
3906
|
extra: ne(() => [
|
|
3907
|
-
Ne("div",
|
|
3907
|
+
Ne("div", $o, [
|
|
3908
3908
|
ja((se(), fe(S, {
|
|
3909
3909
|
style: { width: "80px" },
|
|
3910
3910
|
transfer: "",
|
|
@@ -3941,7 +3941,7 @@ function Go(e, t, n, a, s, r) {
|
|
|
3941
3941
|
href: "javascript:void(0)",
|
|
3942
3942
|
onClick: t[0] || (t[0] = (...m) => r.handleLanguageSettingOpen && r.handleLanguageSettingOpen(...m))
|
|
3943
3943
|
}, [
|
|
3944
|
-
t[5] || (t[5] =
|
|
3944
|
+
t[5] || (t[5] = Ct(" 语言 ")),
|
|
3945
3945
|
re(_, { type: "ios-arrow-down" })
|
|
3946
3946
|
])
|
|
3947
3947
|
]),
|
|
@@ -4020,8 +4020,8 @@ function Go(e, t, n, a, s, r) {
|
|
|
4020
4020
|
]),
|
|
4021
4021
|
_: 1
|
|
4022
4022
|
}, 8, ["modelValue", "onOnClick"]),
|
|
4023
|
-
Ne("div",
|
|
4024
|
-
Ne("div",
|
|
4023
|
+
Ne("div", xo, [
|
|
4024
|
+
Ne("div", Go, [
|
|
4025
4025
|
re(A, {
|
|
4026
4026
|
modelValue: r.firstResult,
|
|
4027
4027
|
"onUpdate:modelValue": t[3] || (t[3] = (m) => r.firstResult = m),
|
|
@@ -4041,7 +4041,7 @@ function Go(e, t, n, a, s, r) {
|
|
|
4041
4041
|
onClick: r.closeModal
|
|
4042
4042
|
}, {
|
|
4043
4043
|
default: ne(() => t[6] || (t[6] = [
|
|
4044
|
-
|
|
4044
|
+
Ct("关闭")
|
|
4045
4045
|
])),
|
|
4046
4046
|
_: 1
|
|
4047
4047
|
}, 8, ["onClick"]),
|
|
@@ -4050,7 +4050,7 @@ function Go(e, t, n, a, s, r) {
|
|
|
4050
4050
|
onClick: r.saveData
|
|
4051
4051
|
}, {
|
|
4052
4052
|
default: ne(() => t[7] || (t[7] = [
|
|
4053
|
-
|
|
4053
|
+
Ct("保存")
|
|
4054
4054
|
])),
|
|
4055
4055
|
_: 1
|
|
4056
4056
|
}, 8, ["onClick"])
|
|
@@ -4061,8 +4061,8 @@ function Go(e, t, n, a, s, r) {
|
|
|
4061
4061
|
_: 1
|
|
4062
4062
|
}, 8, ["modelValue", "onOnCancel"]);
|
|
4063
4063
|
}
|
|
4064
|
-
const
|
|
4065
|
-
function
|
|
4064
|
+
const Yo = /* @__PURE__ */ Vo(Uo, [["render", Ko], ["__scopeId", "data-v-04b847f9"]]);
|
|
4065
|
+
function jt(e) {
|
|
4066
4066
|
const t = [], n = /(?:\$t|_ctx\.\$t)\s*\(\s*(['"])([^'"]+?)\1/gs;
|
|
4067
4067
|
if (e.template) {
|
|
4068
4068
|
let a;
|
|
@@ -4091,11 +4091,11 @@ function Bt(e) {
|
|
|
4091
4091
|
if (e.components)
|
|
4092
4092
|
for (const a in e.components) {
|
|
4093
4093
|
const s = e.components[a];
|
|
4094
|
-
t.push(...
|
|
4094
|
+
t.push(...jt(s));
|
|
4095
4095
|
}
|
|
4096
4096
|
return [...new Set(t)];
|
|
4097
4097
|
}
|
|
4098
|
-
function
|
|
4098
|
+
function Ho(e) {
|
|
4099
4099
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) {
|
|
4100
4100
|
var a = e.get(t);
|
|
4101
4101
|
a ? a.push(n) : e.set(t, [n]);
|
|
@@ -4111,40 +4111,40 @@ function Yo(e) {
|
|
|
4111
4111
|
});
|
|
4112
4112
|
} };
|
|
4113
4113
|
}
|
|
4114
|
-
const
|
|
4114
|
+
const Pa = function() {
|
|
4115
4115
|
return document.ontouchstart !== null ? "click" : "touchstart";
|
|
4116
|
-
},
|
|
4116
|
+
}, lt = "__vue_click_away__", Ma = function(e, t, n) {
|
|
4117
4117
|
Fa(e);
|
|
4118
4118
|
let a = n.context, s = t.value, r = !1;
|
|
4119
4119
|
setTimeout(function() {
|
|
4120
4120
|
r = !0;
|
|
4121
|
-
}, 0), e[
|
|
4121
|
+
}, 0), e[lt] = function(o) {
|
|
4122
4122
|
if ((!e || !e.contains(o.target)) && s && r && typeof s == "function")
|
|
4123
4123
|
return s.call(a, o);
|
|
4124
|
-
}, document.addEventListener(
|
|
4124
|
+
}, document.addEventListener(Pa(), e[lt], !1);
|
|
4125
4125
|
}, Fa = function(e) {
|
|
4126
|
-
document.removeEventListener(
|
|
4127
|
-
},
|
|
4126
|
+
document.removeEventListener(Pa(), e[lt], !1), delete e[lt];
|
|
4127
|
+
}, Bo = function(e, t, n) {
|
|
4128
4128
|
t.value !== t.oldValue && Ma(e, t, n);
|
|
4129
|
-
},
|
|
4129
|
+
}, jo = {
|
|
4130
4130
|
install: function(e) {
|
|
4131
|
-
e.directive("click-away",
|
|
4131
|
+
e.directive("click-away", Xo);
|
|
4132
4132
|
}
|
|
4133
|
-
},
|
|
4133
|
+
}, Xo = {
|
|
4134
4134
|
mounted: Ma,
|
|
4135
|
-
updated:
|
|
4135
|
+
updated: Bo,
|
|
4136
4136
|
unmounted: Fa
|
|
4137
4137
|
};
|
|
4138
|
-
function
|
|
4138
|
+
function Jo(e) {
|
|
4139
4139
|
const t = {
|
|
4140
4140
|
alg: "HS512"
|
|
4141
4141
|
// 算法
|
|
4142
4142
|
}, n = {
|
|
4143
4143
|
orgCode: e
|
|
4144
4144
|
}, a = JSON.stringify(t), s = JSON.stringify(n);
|
|
4145
|
-
return
|
|
4145
|
+
return qa.JWS.sign("HS512", a, s, "");
|
|
4146
4146
|
}
|
|
4147
|
-
class
|
|
4147
|
+
class Ye {
|
|
4148
4148
|
constructor(t = {}) {
|
|
4149
4149
|
const {
|
|
4150
4150
|
router: n,
|
|
@@ -4156,8 +4156,8 @@ class jt {
|
|
|
4156
4156
|
login: u,
|
|
4157
4157
|
keyboard: _
|
|
4158
4158
|
} = t;
|
|
4159
|
-
this.token = r ||
|
|
4160
|
-
!this.configInstance && this.name != this.loginRouteName && (this.configInstance = this.createModal(this.name), this.configInstance.openModal({ name: this.name }));
|
|
4159
|
+
this.token = r || Jo(o), this.loadI18n = !0, this.appCode = a, this.router = n, this.locale = pe.get("I18N_LANGUAGE") || navigator.language || "zh-CN", this.name = "", this.messages = s || {}, this.translationKeys = [], this.translationKeySet = /* @__PURE__ */ new Set(), this.loginRouteName = l || "login", this.login = u, this.loginTranslationKeys = [], this.keyboard = _ || "shift>t", this.baseUrl = t.dev ? "https://test.ihotel.cn" : "https://trans.ihotel.cn", this.initRouterGuards(), this.initI18n(t), Ua.bind(this.keyboard, (E) => {
|
|
4160
|
+
!this.configInstance && this.name != this.loginRouteName && (this.translationKeys = Array.from(this.translationKeySet), this.configInstance = this.createModal(this.name), this.configInstance.openModal({ name: this.name }));
|
|
4161
4161
|
}), this.setupLanguageChangeListener();
|
|
4162
4162
|
}
|
|
4163
4163
|
// 监听浏览器语言变化
|
|
@@ -4169,9 +4169,9 @@ class jt {
|
|
|
4169
4169
|
}
|
|
4170
4170
|
// 初始化路由守卫
|
|
4171
4171
|
initRouterGuards() {
|
|
4172
|
-
|
|
4172
|
+
Ye._routerGuardRegistered || (Ye._routerGuardRegistered = !0, this.router.beforeEach(async (t, n, a) => {
|
|
4173
4173
|
const { language: s, token: r } = t.query;
|
|
4174
|
-
this.configInstance && this.configInstance.closeModal(), this.name = t.name, r && this.setToken(r), this.loadI18n && await this.setLanguage(s || this.locale), this.loadI18n = !1;
|
|
4174
|
+
this.configInstance && this.configInstance.closeModal(), this.name = t.name, this.translationKeySet = /* @__PURE__ */ new Set(), r && this.setToken(r), this.loadI18n && await this.setLanguage(s || this.locale), this.loadI18n = !1;
|
|
4175
4175
|
const o = this.router.getRoutes().find((l) => l.name === this.loginRouteName || l.path === `/${this.loginRouteName}`);
|
|
4176
4176
|
if (o) {
|
|
4177
4177
|
let l = o.components.default;
|
|
@@ -4182,7 +4182,7 @@ class jt {
|
|
|
4182
4182
|
console.error("加载异步组件时出错:", _), a();
|
|
4183
4183
|
return;
|
|
4184
4184
|
}
|
|
4185
|
-
const u =
|
|
4185
|
+
const u = jt(l);
|
|
4186
4186
|
this.loginTranslationKeys = u;
|
|
4187
4187
|
}
|
|
4188
4188
|
if (t.matched.length > 0) {
|
|
@@ -4197,18 +4197,25 @@ class jt {
|
|
|
4197
4197
|
return;
|
|
4198
4198
|
}
|
|
4199
4199
|
if (_) {
|
|
4200
|
-
const E =
|
|
4200
|
+
const E = jt(_);
|
|
4201
4201
|
l.push(...E);
|
|
4202
4202
|
}
|
|
4203
4203
|
}
|
|
4204
4204
|
this.translationKeys = l;
|
|
4205
4205
|
}
|
|
4206
4206
|
a();
|
|
4207
|
-
}))
|
|
4207
|
+
}), Ye._afterEachGuardRegistered || (Ye._afterEachGuardRegistered = !0, this.router.afterEach(async () => {
|
|
4208
|
+
var s, r, o;
|
|
4209
|
+
await Ja();
|
|
4210
|
+
const t = Array.from(this.translationKeySet), n = Array.from(
|
|
4211
|
+
/* @__PURE__ */ new Set([...this.translationKeys || [], ...t])
|
|
4212
|
+
);
|
|
4213
|
+
this.translationKeys = n, ((o = (r = (s = this.router) == null ? void 0 : s.currentRoute) == null ? void 0 : r.value) == null ? void 0 : o.name) === this.loginRouteName && (this.loginTranslationKeys = n);
|
|
4214
|
+
})));
|
|
4208
4215
|
}
|
|
4209
4216
|
// 初始化 i18n 实例
|
|
4210
4217
|
initI18n(t) {
|
|
4211
|
-
this.i18n =
|
|
4218
|
+
this.i18n = Lo({
|
|
4212
4219
|
locale: this.locale,
|
|
4213
4220
|
globalInjection: !0,
|
|
4214
4221
|
legacy: !1,
|
|
@@ -4221,6 +4228,7 @@ class jt {
|
|
|
4221
4228
|
const n = this.i18n.global.t;
|
|
4222
4229
|
globalThis.$t = this.i18n.global.t = (a, s) => {
|
|
4223
4230
|
var o, l, u;
|
|
4231
|
+
typeof a == "string" && this.translationKeySet.add(a);
|
|
4224
4232
|
const r = (u = (l = (o = this.router) == null ? void 0 : o.currentRoute) == null ? void 0 : l.value) == null ? void 0 : u.name;
|
|
4225
4233
|
if (r) {
|
|
4226
4234
|
const _ = `${r}.${a}`, E = n(_);
|
|
@@ -4248,7 +4256,7 @@ class jt {
|
|
|
4248
4256
|
if (n && !t)
|
|
4249
4257
|
return n;
|
|
4250
4258
|
{
|
|
4251
|
-
const a = await
|
|
4259
|
+
const a = await Ra({
|
|
4252
4260
|
baseUrl: this.baseUrl,
|
|
4253
4261
|
appCode: this.appCode,
|
|
4254
4262
|
token: this.token
|
|
@@ -4261,14 +4269,14 @@ class jt {
|
|
|
4261
4269
|
}
|
|
4262
4270
|
async setLanguage(t) {
|
|
4263
4271
|
return new Promise(async (n, a) => {
|
|
4264
|
-
const s = await
|
|
4272
|
+
const s = await wo({
|
|
4265
4273
|
baseUrl: this.baseUrl,
|
|
4266
4274
|
appCode: this.appCode,
|
|
4267
4275
|
language: t || this.locale,
|
|
4268
4276
|
token: this.token
|
|
4269
4277
|
});
|
|
4270
4278
|
if (s) {
|
|
4271
|
-
const r =
|
|
4279
|
+
const r = Ro(s), o = x.assign(
|
|
4272
4280
|
{},
|
|
4273
4281
|
x.get(this.messages, t),
|
|
4274
4282
|
r
|
|
@@ -4279,10 +4287,10 @@ class jt {
|
|
|
4279
4287
|
});
|
|
4280
4288
|
}
|
|
4281
4289
|
createModal(t) {
|
|
4282
|
-
const n =
|
|
4290
|
+
const n = Ho();
|
|
4283
4291
|
return n.on("closeModal", (a) => {
|
|
4284
4292
|
this.configInstance = null;
|
|
4285
|
-
}),
|
|
4293
|
+
}), Qa(Yo, {
|
|
4286
4294
|
appCode: this.appCode,
|
|
4287
4295
|
token: this.token,
|
|
4288
4296
|
setLanguage: this.setLanguage.bind(this, this.locale),
|
|
@@ -4296,7 +4304,7 @@ class jt {
|
|
|
4296
4304
|
// 基础URL
|
|
4297
4305
|
emitter: n
|
|
4298
4306
|
// 将事件总线作为 prop 传递
|
|
4299
|
-
}).use(_n).use(
|
|
4307
|
+
}).use(_n).use(jo).mount(document.createElement("div"));
|
|
4300
4308
|
}
|
|
4301
4309
|
install(t, n = {}) {
|
|
4302
4310
|
t.use(_n, {
|
|
@@ -4305,5 +4313,5 @@ class jt {
|
|
|
4305
4313
|
}
|
|
4306
4314
|
}
|
|
4307
4315
|
export {
|
|
4308
|
-
|
|
4316
|
+
Ye as default
|
|
4309
4317
|
};
|