gc_i18n 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/gc_i18n.css +1 -1
- package/lib/gc_i18n.js +224 -221
- package/lib/gc_i18n.umd.cjs +5 -5
- package/package.json +1 -1
- package/packages/components/config.vue +6 -6
package/lib/gc_i18n.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './gc_i18n.css';
|
|
2
2
|
import Rs from "keyboardjs";
|
|
3
3
|
import cn, { Message as se } from "view-ui-plus";
|
|
4
|
-
import { effectScope as Ms, ref as Fs, shallowRef as ws, computed as Ye, watch as Pt, isRef as Us, defineComponent as Bt, getCurrentInstance as Ke, h as Jn, Fragment as Qn, inject as Vs, onMounted as Ws, onUnmounted as
|
|
5
|
-
import
|
|
4
|
+
import { effectScope as Ms, ref as Fs, shallowRef as ws, computed as Ye, watch as Pt, isRef as Us, defineComponent as Bt, getCurrentInstance as Ke, h as Jn, Fragment as Qn, inject as Vs, onMounted as Ws, onUnmounted as $s, createVNode as te, Text as xs, createTextVNode as Rt, resolveComponent as le, createBlock as Ie, openBlock as de, withCtx as ve, createElementBlock as un, createCommentVNode as fn, createElementVNode as tt, toDisplayString as Gs, createApp as Ys } from "vue";
|
|
5
|
+
import $ from "lodash-es";
|
|
6
6
|
import ke from "axios";
|
|
7
7
|
import ye from "store2";
|
|
8
8
|
import { jws as Hs } from "jsrsasign";
|
|
@@ -36,7 +36,7 @@ const Qs = Object.prototype.hasOwnProperty;
|
|
|
36
36
|
function ie(e, t) {
|
|
37
37
|
return Qs.call(e, t);
|
|
38
38
|
}
|
|
39
|
-
const B = Array.isArray,
|
|
39
|
+
const B = Array.isArray, x = (e) => typeof e == "function", I = (e) => typeof e == "string", F = (e) => typeof e == "boolean", M = (e) => e !== null && typeof e == "object", qs = (e) => M(e) && x(e.then) && x(e.catch), qn = Object.prototype.toString, jt = (e) => qn.call(e), R = (e) => jt(e) === "[object Object]", Zs = (e) => e == null ? "" : B(e) || R(e) && e.toString === qn ? JSON.stringify(e, null, 2) : String(e);
|
|
40
40
|
function Xt(e, t = "") {
|
|
41
41
|
return e.reduce((n, s, a) => a === 0 ? n + s : n + t + s, "");
|
|
42
42
|
}
|
|
@@ -175,13 +175,13 @@ function ca(e) {
|
|
|
175
175
|
function d() {
|
|
176
176
|
return r = 0, N(n) && (s++, a = 0), o(n) && n++, n++, a++, t[n];
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function O() {
|
|
179
179
|
return o(n + r) && r++, r++, t[n + r];
|
|
180
180
|
}
|
|
181
181
|
function g() {
|
|
182
182
|
n = 0, s = 1, a = 1, r = 0;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function b(p = 0) {
|
|
185
185
|
r = p;
|
|
186
186
|
}
|
|
187
187
|
function v() {
|
|
@@ -199,9 +199,9 @@ function ca(e) {
|
|
|
199
199
|
currentChar: S,
|
|
200
200
|
currentPeek: f,
|
|
201
201
|
next: d,
|
|
202
|
-
peek:
|
|
202
|
+
peek: O,
|
|
203
203
|
reset: g,
|
|
204
|
-
resetPeek:
|
|
204
|
+
resetPeek: b,
|
|
205
205
|
skipToPeek: v
|
|
206
206
|
};
|
|
207
207
|
}
|
|
@@ -267,7 +267,7 @@ function _a(e, t = {}) {
|
|
|
267
267
|
const c = i.charCodeAt(0);
|
|
268
268
|
return c >= 48 && c <= 57;
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function O(i, c) {
|
|
271
271
|
const { currentType: h } = c;
|
|
272
272
|
if (h !== 2)
|
|
273
273
|
return !1;
|
|
@@ -283,7 +283,7 @@ function _a(e, t = {}) {
|
|
|
283
283
|
const D = i.currentPeek() === "-" ? i.peek() : i.currentPeek(), Y = d(D);
|
|
284
284
|
return i.resetPeek(), Y;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function b(i, c) {
|
|
287
287
|
const { currentType: h } = c;
|
|
288
288
|
if (h !== 2)
|
|
289
289
|
return !1;
|
|
@@ -424,11 +424,11 @@ function _a(e, t = {}) {
|
|
|
424
424
|
S(i), C(i, "'");
|
|
425
425
|
let c = "", h = "";
|
|
426
426
|
for (; c = J(i, Lt); )
|
|
427
|
-
c === "\\" ? h +=
|
|
427
|
+
c === "\\" ? h += Ot(i) : h += c;
|
|
428
428
|
const D = i.currentChar();
|
|
429
429
|
return D === Z || D === pe ? (T(k.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, r(), 0), D === Z && (i.next(), C(i, "'")), h) : (C(i, "'"), h);
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function Ot(i) {
|
|
432
432
|
const c = i.currentChar();
|
|
433
433
|
switch (c) {
|
|
434
434
|
case "\\":
|
|
@@ -455,13 +455,13 @@ function _a(e, t = {}) {
|
|
|
455
455
|
}
|
|
456
456
|
return `\\${c}${D}`;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function bt(i) {
|
|
459
459
|
return i !== "{" && i !== "}" && i !== ge && i !== Z;
|
|
460
460
|
}
|
|
461
461
|
function It(i) {
|
|
462
462
|
S(i);
|
|
463
463
|
let c = "", h = "";
|
|
464
|
-
for (; c = J(i,
|
|
464
|
+
for (; c = J(i, bt); )
|
|
465
465
|
h += c;
|
|
466
466
|
return h;
|
|
467
467
|
}
|
|
@@ -478,7 +478,7 @@ function _a(e, t = {}) {
|
|
|
478
478
|
};
|
|
479
479
|
return c("");
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function $e(i) {
|
|
482
482
|
S(i);
|
|
483
483
|
const c = C(
|
|
484
484
|
i,
|
|
@@ -487,7 +487,7 @@ function _a(e, t = {}) {
|
|
|
487
487
|
);
|
|
488
488
|
return S(i), c;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function xe(i, c) {
|
|
491
491
|
let h = null;
|
|
492
492
|
switch (i.currentChar()) {
|
|
493
493
|
case "{":
|
|
@@ -509,14 +509,14 @@ function _a(e, t = {}) {
|
|
|
509
509
|
default: {
|
|
510
510
|
let Y = !0, H = !0, w = !0;
|
|
511
511
|
if (X(i))
|
|
512
|
-
return c.braceNest > 0 && T(k.UNTERMINATED_CLOSING_BRACE, r(), 0), h = E(c, 1,
|
|
512
|
+
return c.braceNest > 0 && T(k.UNTERMINATED_CLOSING_BRACE, r(), 0), h = E(c, 1, $e(i)), c.braceNest = 0, c.inLinked = !1, h;
|
|
513
513
|
if (c.braceNest > 0 && (c.currentType === 4 || c.currentType === 5 || c.currentType === 6))
|
|
514
514
|
return T(k.UNTERMINATED_CLOSING_BRACE, r(), 0), c.braceNest = 0, Ge(i, c);
|
|
515
|
-
if (Y =
|
|
515
|
+
if (Y = O(i, c))
|
|
516
516
|
return h = E(c, 4, Nt(i)), S(i), h;
|
|
517
517
|
if (H = g(i, c))
|
|
518
518
|
return h = E(c, 5, Tt(i)), S(i), h;
|
|
519
|
-
if (w =
|
|
519
|
+
if (w = b(i, c))
|
|
520
520
|
return h = E(c, 6, on(i)), S(i), h;
|
|
521
521
|
if (!Y && !H && !w)
|
|
522
522
|
return h = E(c, 12, It(i)), T(k.INVALID_TOKEN_IN_PLACEHOLDER, r(), 0, h.value), S(i), h;
|
|
@@ -552,7 +552,7 @@ function _a(e, t = {}) {
|
|
|
552
552
|
/* TokenChars.LinkedDelimiter */
|
|
553
553
|
);
|
|
554
554
|
default:
|
|
555
|
-
return X(i) ? (D = E(c, 1,
|
|
555
|
+
return X(i) ? (D = E(c, 1, $e(i)), c.braceNest = 0, c.inLinked = !1, D) : v(i, c) || P(i, c) ? (S(i), Le(i, c)) : p(i, c) ? (S(i), E(c, 11, vt(i))) : U(i, c) ? (S(i), Y === "{" ? xe(i, c) || D : E(c, 10, yt(i))) : (h === 7 && T(k.INVALID_LINKED_FORMAT, r(), 0), c.braceNest = 0, c.inLinked = !1, Ge(i, c));
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
function Ge(i, c) {
|
|
@@ -561,12 +561,12 @@ function _a(e, t = {}) {
|
|
|
561
561
|
/* TokenTypes.EOF */
|
|
562
562
|
};
|
|
563
563
|
if (c.braceNest > 0)
|
|
564
|
-
return
|
|
564
|
+
return xe(i, c) || A(c);
|
|
565
565
|
if (c.inLinked)
|
|
566
566
|
return Le(i, c) || A(c);
|
|
567
567
|
switch (i.currentChar()) {
|
|
568
568
|
case "{":
|
|
569
|
-
return
|
|
569
|
+
return xe(i, c) || A(c);
|
|
570
570
|
case "}":
|
|
571
571
|
return T(k.UNBALANCED_CLOSING_BRACE, r(), 0), i.next(), E(
|
|
572
572
|
c,
|
|
@@ -578,7 +578,7 @@ function _a(e, t = {}) {
|
|
|
578
578
|
return Le(i, c) || A(c);
|
|
579
579
|
default: {
|
|
580
580
|
if (X(i))
|
|
581
|
-
return h = E(c, 1,
|
|
581
|
+
return h = E(c, 1, $e(i)), c.braceNest = 0, c.inLinked = !1, h;
|
|
582
582
|
if (oe(i))
|
|
583
583
|
return E(c, 0, ht(i));
|
|
584
584
|
break;
|
|
@@ -617,132 +617,132 @@ function ga(e, t, n) {
|
|
|
617
617
|
}
|
|
618
618
|
function Ea(e = {}) {
|
|
619
619
|
const t = e.location !== !1, { onError: n } = e;
|
|
620
|
-
function s(f, d,
|
|
620
|
+
function s(f, d, O, g, ...b) {
|
|
621
621
|
const v = f.currentPosition();
|
|
622
622
|
if (v.offset += g, v.column += g, n) {
|
|
623
|
-
const p = t ? Mt(
|
|
623
|
+
const p = t ? Mt(O, v) : null, P = Ve(d, p, {
|
|
624
624
|
domain: ma,
|
|
625
|
-
args:
|
|
625
|
+
args: b
|
|
626
626
|
});
|
|
627
627
|
n(P);
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
function a(f, d,
|
|
630
|
+
function a(f, d, O) {
|
|
631
631
|
const g = { type: f };
|
|
632
|
-
return t && (g.start = d, g.end = d, g.loc = { start:
|
|
632
|
+
return t && (g.start = d, g.end = d, g.loc = { start: O, end: O }), g;
|
|
633
633
|
}
|
|
634
|
-
function r(f, d,
|
|
635
|
-
t && (f.end = d, f.loc && (f.loc.end =
|
|
634
|
+
function r(f, d, O, g) {
|
|
635
|
+
t && (f.end = d, f.loc && (f.loc.end = O));
|
|
636
636
|
}
|
|
637
637
|
function o(f, d) {
|
|
638
|
-
const
|
|
638
|
+
const O = f.context(), g = a(3, O.offset, O.startLoc);
|
|
639
639
|
return g.value = d, r(g, f.currentOffset(), f.currentPosition()), g;
|
|
640
640
|
}
|
|
641
641
|
function l(f, d) {
|
|
642
|
-
const
|
|
642
|
+
const O = f.context(), { lastOffset: g, lastStartLoc: b } = O, v = a(5, g, b);
|
|
643
643
|
return v.index = parseInt(d, 10), f.nextToken(), r(v, f.currentOffset(), f.currentPosition()), v;
|
|
644
644
|
}
|
|
645
645
|
function u(f, d) {
|
|
646
|
-
const
|
|
646
|
+
const O = f.context(), { lastOffset: g, lastStartLoc: b } = O, v = a(4, g, b);
|
|
647
647
|
return v.key = d, f.nextToken(), r(v, f.currentOffset(), f.currentPosition()), v;
|
|
648
648
|
}
|
|
649
649
|
function _(f, d) {
|
|
650
|
-
const
|
|
650
|
+
const O = f.context(), { lastOffset: g, lastStartLoc: b } = O, v = a(9, g, b);
|
|
651
651
|
return v.value = d.replace(da, ga), f.nextToken(), r(v, f.currentOffset(), f.currentPosition()), v;
|
|
652
652
|
}
|
|
653
653
|
function N(f) {
|
|
654
|
-
const d = f.nextToken(),
|
|
655
|
-
return d.type !== 11 ? (s(f, k.UNEXPECTED_EMPTY_LINKED_MODIFIER,
|
|
654
|
+
const d = f.nextToken(), O = f.context(), { lastOffset: g, lastStartLoc: b } = O, v = a(8, g, b);
|
|
655
|
+
return d.type !== 11 ? (s(f, k.UNEXPECTED_EMPTY_LINKED_MODIFIER, O.lastStartLoc, 0), v.value = "", r(v, g, b), {
|
|
656
656
|
nextConsumeToken: d,
|
|
657
657
|
node: v
|
|
658
|
-
}) : (d.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS,
|
|
658
|
+
}) : (d.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, O.lastStartLoc, 0, ue(d)), v.value = d.value || "", r(v, f.currentOffset(), f.currentPosition()), {
|
|
659
659
|
node: v
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
662
|
function T(f, d) {
|
|
663
|
-
const
|
|
663
|
+
const O = f.context(), g = a(7, O.offset, O.startLoc);
|
|
664
664
|
return g.value = d, r(g, f.currentOffset(), f.currentPosition()), g;
|
|
665
665
|
}
|
|
666
666
|
function E(f) {
|
|
667
|
-
const d = f.context(),
|
|
667
|
+
const d = f.context(), O = a(6, d.offset, d.startLoc);
|
|
668
668
|
let g = f.nextToken();
|
|
669
669
|
if (g.type === 8) {
|
|
670
|
-
const
|
|
671
|
-
|
|
670
|
+
const b = N(f);
|
|
671
|
+
O.modifier = b.node, g = b.nextConsumeToken || f.nextToken();
|
|
672
672
|
}
|
|
673
673
|
switch (g.type !== 9 && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(g)), g = f.nextToken(), g.type === 2 && (g = f.nextToken()), g.type) {
|
|
674
674
|
case 10:
|
|
675
|
-
g.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(g)),
|
|
675
|
+
g.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(g)), O.key = T(f, g.value || "");
|
|
676
676
|
break;
|
|
677
677
|
case 4:
|
|
678
|
-
g.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(g)),
|
|
678
|
+
g.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(g)), O.key = u(f, g.value || "");
|
|
679
679
|
break;
|
|
680
680
|
case 5:
|
|
681
|
-
g.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(g)),
|
|
681
|
+
g.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(g)), O.key = l(f, g.value || "");
|
|
682
682
|
break;
|
|
683
683
|
case 6:
|
|
684
|
-
g.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(g)),
|
|
684
|
+
g.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(g)), O.key = _(f, g.value || "");
|
|
685
685
|
break;
|
|
686
686
|
default: {
|
|
687
687
|
s(f, k.UNEXPECTED_EMPTY_LINKED_KEY, d.lastStartLoc, 0);
|
|
688
|
-
const
|
|
689
|
-
return v.value = "", r(v,
|
|
688
|
+
const b = f.context(), v = a(7, b.offset, b.startLoc);
|
|
689
|
+
return v.value = "", r(v, b.offset, b.startLoc), O.key = v, r(O, b.offset, b.startLoc), {
|
|
690
690
|
nextConsumeToken: g,
|
|
691
|
-
node:
|
|
691
|
+
node: O
|
|
692
692
|
};
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
|
-
return r(
|
|
696
|
-
node:
|
|
695
|
+
return r(O, f.currentOffset(), f.currentPosition()), {
|
|
696
|
+
node: O
|
|
697
697
|
};
|
|
698
698
|
}
|
|
699
699
|
function A(f) {
|
|
700
|
-
const d = f.context(),
|
|
701
|
-
|
|
700
|
+
const d = f.context(), O = d.currentType === 1 ? f.currentOffset() : d.offset, g = d.currentType === 1 ? d.endLoc : d.startLoc, b = a(2, O, g);
|
|
701
|
+
b.items = [];
|
|
702
702
|
let v = null;
|
|
703
703
|
do {
|
|
704
704
|
const U = v || f.nextToken();
|
|
705
705
|
switch (v = null, U.type) {
|
|
706
706
|
case 0:
|
|
707
|
-
U.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(U)),
|
|
707
|
+
U.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(U)), b.items.push(o(f, U.value || ""));
|
|
708
708
|
break;
|
|
709
709
|
case 5:
|
|
710
|
-
U.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(U)),
|
|
710
|
+
U.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(U)), b.items.push(l(f, U.value || ""));
|
|
711
711
|
break;
|
|
712
712
|
case 4:
|
|
713
|
-
U.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(U)),
|
|
713
|
+
U.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(U)), b.items.push(u(f, U.value || ""));
|
|
714
714
|
break;
|
|
715
715
|
case 6:
|
|
716
|
-
U.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(U)),
|
|
716
|
+
U.value == null && s(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ue(U)), b.items.push(_(f, U.value || ""));
|
|
717
717
|
break;
|
|
718
718
|
case 7: {
|
|
719
719
|
const X = E(f);
|
|
720
|
-
|
|
720
|
+
b.items.push(X.node), v = X.nextConsumeToken || null;
|
|
721
721
|
break;
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
} while (d.currentType !== 13 && d.currentType !== 1);
|
|
725
725
|
const p = d.currentType === 1 ? d.lastOffset : f.currentOffset(), P = d.currentType === 1 ? d.lastEndLoc : f.currentPosition();
|
|
726
|
-
return r(
|
|
726
|
+
return r(b, p, P), b;
|
|
727
727
|
}
|
|
728
|
-
function C(f, d,
|
|
729
|
-
const
|
|
728
|
+
function C(f, d, O, g) {
|
|
729
|
+
const b = f.context();
|
|
730
730
|
let v = g.items.length === 0;
|
|
731
|
-
const p = a(1, d,
|
|
731
|
+
const p = a(1, d, O);
|
|
732
732
|
p.cases = [], p.cases.push(g);
|
|
733
733
|
do {
|
|
734
734
|
const P = A(f);
|
|
735
735
|
v || (v = P.items.length === 0), p.cases.push(P);
|
|
736
|
-
} while (
|
|
737
|
-
return v && s(f, k.MUST_HAVE_MESSAGES_IN_PLURAL,
|
|
736
|
+
} while (b.currentType !== 13);
|
|
737
|
+
return v && s(f, k.MUST_HAVE_MESSAGES_IN_PLURAL, O, 0), r(p, f.currentOffset(), f.currentPosition()), p;
|
|
738
738
|
}
|
|
739
739
|
function y(f) {
|
|
740
|
-
const d = f.context(), { offset:
|
|
741
|
-
return d.currentType === 13 ?
|
|
740
|
+
const d = f.context(), { offset: O, startLoc: g } = d, b = A(f);
|
|
741
|
+
return d.currentType === 13 ? b : C(f, O, g, b);
|
|
742
742
|
}
|
|
743
743
|
function S(f) {
|
|
744
|
-
const d = _a(f, Q({}, e)),
|
|
745
|
-
return t && g.loc && (g.loc.source = f), g.body = y(d), e.onCacheKey && (g.cacheKey = e.onCacheKey(f)),
|
|
744
|
+
const d = _a(f, Q({}, e)), O = d.context(), g = a(0, O.offset, O.startLoc);
|
|
745
|
+
return t && g.loc && (g.loc.source = f), g.body = y(d), e.onCacheKey && (g.cacheKey = e.onCacheKey(f)), O.currentType !== 13 && s(d, k.UNEXPECTED_LEXICAL_ANALYSIS, O.lastStartLoc, 0, f[O.offset] || ""), r(g, d.currentOffset(), d.currentPosition()), g;
|
|
746
746
|
}
|
|
747
747
|
return { parse: S };
|
|
748
748
|
}
|
|
@@ -893,7 +893,7 @@ function Fe(e) {
|
|
|
893
893
|
delete e.type;
|
|
894
894
|
}
|
|
895
895
|
const La = "parser";
|
|
896
|
-
function
|
|
896
|
+
function Oa(e, t) {
|
|
897
897
|
const { filename: n, breakLineCode: s, needIndent: a } = t, r = t.location !== !1, o = {
|
|
898
898
|
filename: n,
|
|
899
899
|
code: "",
|
|
@@ -935,7 +935,7 @@ function ba(e, t) {
|
|
|
935
935
|
needIndent: () => o.needIndent
|
|
936
936
|
};
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function ba(e, t) {
|
|
939
939
|
const { helper: n } = e;
|
|
940
940
|
e.push(`${n(
|
|
941
941
|
"linked"
|
|
@@ -982,7 +982,7 @@ function Ue(e, t) {
|
|
|
982
982
|
Ia(e, t);
|
|
983
983
|
break;
|
|
984
984
|
case 6:
|
|
985
|
-
|
|
985
|
+
ba(e, t);
|
|
986
986
|
break;
|
|
987
987
|
case 8:
|
|
988
988
|
e.push(JSON.stringify(t.value), t);
|
|
@@ -1026,7 +1026,7 @@ const Aa = (e, t = {}) => {
|
|
|
1026
1026
|
const n = I(t.mode) ? t.mode : "normal", s = I(t.filename) ? t.filename : "message.intl";
|
|
1027
1027
|
t.sourceMap;
|
|
1028
1028
|
const a = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
|
|
1029
|
-
`, r = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], l =
|
|
1029
|
+
`, r = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], l = Oa(e, {
|
|
1030
1030
|
filename: s,
|
|
1031
1031
|
breakLineCode: a,
|
|
1032
1032
|
needIndent: r
|
|
@@ -1186,7 +1186,7 @@ function Va(e, t) {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
const Wa = (e) => e;
|
|
1188
1188
|
let at = W();
|
|
1189
|
-
function
|
|
1189
|
+
function $a(e, t = {}) {
|
|
1190
1190
|
let n = !1;
|
|
1191
1191
|
const s = t.onError || sa;
|
|
1192
1192
|
return t.onError = (a) => {
|
|
@@ -1194,14 +1194,14 @@ function xa(e, t = {}) {
|
|
|
1194
1194
|
}, { ...Sa(e, t), detectError: n };
|
|
1195
1195
|
}
|
|
1196
1196
|
// @__NO_SIDE_EFFECTS__
|
|
1197
|
-
function
|
|
1197
|
+
function xa(e, t) {
|
|
1198
1198
|
if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && I(e)) {
|
|
1199
1199
|
const n = F(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
|
|
1200
1200
|
process.env.NODE_ENV !== "production" && Va(e, n);
|
|
1201
1201
|
const a = (t.onCacheKey || Wa)(e), r = at[a];
|
|
1202
1202
|
if (r)
|
|
1203
1203
|
return r;
|
|
1204
|
-
const { ast: o, detectError: l } =
|
|
1204
|
+
const { ast: o, detectError: l } = $a(e, {
|
|
1205
1205
|
...t,
|
|
1206
1206
|
location: process.env.NODE_ENV !== "production",
|
|
1207
1207
|
jit: !0
|
|
@@ -1263,7 +1263,7 @@ let Ct;
|
|
|
1263
1263
|
function Tn(e) {
|
|
1264
1264
|
if (I(e))
|
|
1265
1265
|
return e;
|
|
1266
|
-
if (
|
|
1266
|
+
if (x(e)) {
|
|
1267
1267
|
if (e.resolvedOnce && Ct != null)
|
|
1268
1268
|
return Ct;
|
|
1269
1269
|
if (e.constructor.name === "Function") {
|
|
@@ -1588,15 +1588,15 @@ function nr(e) {
|
|
|
1588
1588
|
return t;
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
|
-
const
|
|
1591
|
+
const On = /* @__PURE__ */ new Map();
|
|
1592
1592
|
function sr(e, t) {
|
|
1593
1593
|
return M(e) ? e[t] : null;
|
|
1594
1594
|
}
|
|
1595
1595
|
function ar(e, t) {
|
|
1596
1596
|
if (!M(e))
|
|
1597
1597
|
return null;
|
|
1598
|
-
let n =
|
|
1599
|
-
if (n || (n = nr(t), n &&
|
|
1598
|
+
let n = On.get(t);
|
|
1599
|
+
if (n || (n = nr(t), n && On.set(t, n)), !n)
|
|
1600
1600
|
return null;
|
|
1601
1601
|
const s = n.length;
|
|
1602
1602
|
let a = e, r = 0;
|
|
@@ -1605,7 +1605,7 @@ function ar(e, t) {
|
|
|
1605
1605
|
if (os.includes(o) && re(a))
|
|
1606
1606
|
return null;
|
|
1607
1607
|
const l = a[o];
|
|
1608
|
-
if (l === void 0 ||
|
|
1608
|
+
if (l === void 0 || x(a))
|
|
1609
1609
|
return null;
|
|
1610
1610
|
a = l, r++;
|
|
1611
1611
|
}
|
|
@@ -1631,12 +1631,12 @@ const z = {
|
|
|
1631
1631
|
function Ce(e, ...t) {
|
|
1632
1632
|
return lt(or[e], ...t);
|
|
1633
1633
|
}
|
|
1634
|
-
const lr = "11.1.3", ct = -1, Xe = "en-US", ot = "",
|
|
1634
|
+
const lr = "11.1.3", ct = -1, Xe = "en-US", ot = "", bn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
|
|
1635
1635
|
function ir() {
|
|
1636
1636
|
return {
|
|
1637
1637
|
upper: (e, t) => t === "text" && I(e) ? e.toUpperCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
|
|
1638
1638
|
lower: (e, t) => t === "text" && I(e) ? e.toLowerCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
|
|
1639
|
-
capitalize: (e, t) => t === "text" && I(e) ?
|
|
1639
|
+
capitalize: (e, t) => t === "text" && I(e) ? bn(e) : t === "vnode" && M(e) && "__v_isVNode" in e ? bn(e.children) : e
|
|
1640
1640
|
};
|
|
1641
1641
|
}
|
|
1642
1642
|
let is;
|
|
@@ -1661,9 +1661,9 @@ const In = (e) => {
|
|
|
1661
1661
|
}, dr = () => _s;
|
|
1662
1662
|
let vn = 0;
|
|
1663
1663
|
function gr(e = {}) {
|
|
1664
|
-
const t =
|
|
1665
|
-
process.env.NODE_ENV !== "production" &&
|
|
1666
|
-
const
|
|
1664
|
+
const t = x(e.onWarn) ? e.onWarn : he, n = I(e.version) ? e.version : lr, s = I(e.locale) || x(e.locale) ? e.locale : Xe, a = x(s) ? Xe : s, r = B(e.fallbackLocale) || R(e.fallbackLocale) || I(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : a, o = R(e.messages) ? e.messages : Dt(a), l = R(e.datetimeFormats) ? e.datetimeFormats : Dt(a), u = R(e.numberFormats) ? e.numberFormats : Dt(a), _ = Q(W(), e.modifiers, ir()), N = e.pluralRules || W(), T = x(e.missing) ? e.missing : null, E = F(e.missingWarn) || we(e.missingWarn) ? e.missingWarn : !0, A = F(e.fallbackWarn) || we(e.fallbackWarn) ? e.fallbackWarn : !0, C = !!e.fallbackFormat, y = !!e.unresolving, S = x(e.postTranslation) ? e.postTranslation : null, f = R(e.processor) ? e.processor : null, d = F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, O = !!e.escapeParameter, g = x(e.messageCompiler) ? e.messageCompiler : is;
|
|
1665
|
+
process.env.NODE_ENV !== "production" && x(e.messageCompiler) && Jt(Ce(z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
|
|
1666
|
+
const b = x(e.messageResolver) ? e.messageResolver : cs || sr, v = x(e.localeFallbacker) ? e.localeFallbacker : us || Xa, p = M(e.fallbackContext) ? e.fallbackContext : void 0, P = e, U = M(P.__datetimeFormatters) ? P.__datetimeFormatters : /* @__PURE__ */ new Map(), X = M(P.__numberFormatters) ? P.__numberFormatters : /* @__PURE__ */ new Map(), oe = M(P.__meta) ? P.__meta : {};
|
|
1667
1667
|
vn++;
|
|
1668
1668
|
const J = {
|
|
1669
1669
|
version: n,
|
|
@@ -1681,9 +1681,9 @@ function gr(e = {}) {
|
|
|
1681
1681
|
postTranslation: S,
|
|
1682
1682
|
processor: f,
|
|
1683
1683
|
warnHtmlMessage: d,
|
|
1684
|
-
escapeParameter:
|
|
1684
|
+
escapeParameter: O,
|
|
1685
1685
|
messageCompiler: g,
|
|
1686
|
-
messageResolver:
|
|
1686
|
+
messageResolver: b,
|
|
1687
1687
|
localeFallbacker: v,
|
|
1688
1688
|
fallbackContext: p,
|
|
1689
1689
|
onWarn: t,
|
|
@@ -1747,10 +1747,10 @@ function An(e, ...t) {
|
|
|
1747
1747
|
);
|
|
1748
1748
|
if (!I(u) || u === "")
|
|
1749
1749
|
return new Intl.DateTimeFormat(y, T).format(_);
|
|
1750
|
-
let f = {}, d,
|
|
1750
|
+
let f = {}, d, O = null, g = y, b = null;
|
|
1751
1751
|
const v = "datetime format";
|
|
1752
1752
|
for (let U = 0; U < S.length; U++) {
|
|
1753
|
-
if (d =
|
|
1753
|
+
if (d = b = S[U], process.env.NODE_ENV !== "production" && y !== d && ut(A, u) && r(Ce(z.FALLBACK_TO_DATE_FORMAT, {
|
|
1754
1754
|
key: u,
|
|
1755
1755
|
target: d
|
|
1756
1756
|
})), process.env.NODE_ENV !== "production" && y !== d) {
|
|
@@ -1759,20 +1759,20 @@ function An(e, ...t) {
|
|
|
1759
1759
|
type: v,
|
|
1760
1760
|
key: u,
|
|
1761
1761
|
from: g,
|
|
1762
|
-
to:
|
|
1762
|
+
to: b,
|
|
1763
1763
|
groupId: `${v}:${u}`
|
|
1764
1764
|
});
|
|
1765
1765
|
}
|
|
1766
|
-
if (f = n[d] || {},
|
|
1766
|
+
if (f = n[d] || {}, O = f[u], R(O))
|
|
1767
1767
|
break;
|
|
1768
|
-
en(e, u, d, E, v), g =
|
|
1768
|
+
en(e, u, d, E, v), g = b;
|
|
1769
1769
|
}
|
|
1770
|
-
if (!R(
|
|
1770
|
+
if (!R(O) || !I(d))
|
|
1771
1771
|
return s ? ct : u;
|
|
1772
1772
|
let p = `${d}__${u}`;
|
|
1773
1773
|
it(T) || (p = `${p}__${JSON.stringify(T)}`);
|
|
1774
1774
|
let P = l.get(p);
|
|
1775
|
-
return P || (P = new Intl.DateTimeFormat(d, Q({},
|
|
1775
|
+
return P || (P = new Intl.DateTimeFormat(d, Q({}, O, T)), l.set(p, P)), C ? P.formatToParts(_) : P.format(_);
|
|
1776
1776
|
}
|
|
1777
1777
|
const Es = [
|
|
1778
1778
|
"localeMatcher",
|
|
@@ -1841,10 +1841,10 @@ function Cn(e, ...t) {
|
|
|
1841
1841
|
);
|
|
1842
1842
|
if (!I(u) || u === "")
|
|
1843
1843
|
return new Intl.NumberFormat(y, T).format(_);
|
|
1844
|
-
let f = {}, d,
|
|
1844
|
+
let f = {}, d, O = null, g = y, b = null;
|
|
1845
1845
|
const v = "number format";
|
|
1846
1846
|
for (let U = 0; U < S.length; U++) {
|
|
1847
|
-
if (d =
|
|
1847
|
+
if (d = b = S[U], process.env.NODE_ENV !== "production" && y !== d && ut(A, u) && r(Ce(z.FALLBACK_TO_NUMBER_FORMAT, {
|
|
1848
1848
|
key: u,
|
|
1849
1849
|
target: d
|
|
1850
1850
|
})), process.env.NODE_ENV !== "production" && y !== d) {
|
|
@@ -1853,20 +1853,20 @@ function Cn(e, ...t) {
|
|
|
1853
1853
|
type: v,
|
|
1854
1854
|
key: u,
|
|
1855
1855
|
from: g,
|
|
1856
|
-
to:
|
|
1856
|
+
to: b,
|
|
1857
1857
|
groupId: `${v}:${u}`
|
|
1858
1858
|
});
|
|
1859
1859
|
}
|
|
1860
|
-
if (f = n[d] || {},
|
|
1860
|
+
if (f = n[d] || {}, O = f[u], R(O))
|
|
1861
1861
|
break;
|
|
1862
|
-
en(e, u, d, E, v), g =
|
|
1862
|
+
en(e, u, d, E, v), g = b;
|
|
1863
1863
|
}
|
|
1864
|
-
if (!R(
|
|
1864
|
+
if (!R(O) || !I(d))
|
|
1865
1865
|
return s ? ct : u;
|
|
1866
1866
|
let p = `${d}__${u}`;
|
|
1867
1867
|
it(T) || (p = `${p}__${JSON.stringify(T)}`);
|
|
1868
1868
|
let P = l.get(p);
|
|
1869
|
-
return P || (P = new Intl.NumberFormat(d, Q({},
|
|
1869
|
+
return P || (P = new Intl.NumberFormat(d, Q({}, O, T)), l.set(p, P)), C ? P.formatToParts(_) : P.format(_);
|
|
1870
1870
|
}
|
|
1871
1871
|
const ps = [
|
|
1872
1872
|
"localeMatcher",
|
|
@@ -1911,34 +1911,34 @@ const pr = (e) => e, hr = (e) => "", Nr = "text", Tr = (e) => e.length === 0 ? "
|
|
|
1911
1911
|
function kn(e, t) {
|
|
1912
1912
|
return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function Or(e) {
|
|
1915
1915
|
const t = j(e.pluralIndex) ? e.pluralIndex : -1;
|
|
1916
1916
|
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;
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function br(e, t) {
|
|
1919
1919
|
t.count || (t.count = e), t.n || (t.n = e);
|
|
1920
1920
|
}
|
|
1921
1921
|
function Ir(e = {}) {
|
|
1922
|
-
const t = e.locale, n =
|
|
1923
|
-
j(e.pluralIndex) &&
|
|
1922
|
+
const t = e.locale, n = Or(e), s = M(e.pluralRules) && I(t) && x(e.pluralRules[t]) ? e.pluralRules[t] : kn, a = M(e.pluralRules) && I(t) && x(e.pluralRules[t]) ? kn : void 0, r = (f) => f[s(n, f.length, a)], o = e.list || [], l = (f) => o[f], u = e.named || W();
|
|
1923
|
+
j(e.pluralIndex) && br(n, u);
|
|
1924
1924
|
const _ = (f) => u[f];
|
|
1925
1925
|
function N(f, d) {
|
|
1926
|
-
const
|
|
1927
|
-
return
|
|
1926
|
+
const O = x(e.messages) ? e.messages(f, !!d) : M(e.messages) ? e.messages[f] : !1;
|
|
1927
|
+
return O || (e.parent ? e.parent.message(f) : hr);
|
|
1928
1928
|
}
|
|
1929
|
-
const T = (f) => e.modifiers ? e.modifiers[f] : pr, E = R(e.processor) &&
|
|
1929
|
+
const T = (f) => e.modifiers ? e.modifiers[f] : pr, E = R(e.processor) && x(e.processor.normalize) ? e.processor.normalize : Tr, A = R(e.processor) && x(e.processor.interpolate) ? e.processor.interpolate : Lr, C = R(e.processor) && I(e.processor.type) ? e.processor.type : Nr, S = {
|
|
1930
1930
|
list: l,
|
|
1931
1931
|
named: _,
|
|
1932
1932
|
plural: r,
|
|
1933
1933
|
linked: (f, ...d) => {
|
|
1934
|
-
const [
|
|
1935
|
-
let
|
|
1936
|
-
d.length === 1 ? M(
|
|
1934
|
+
const [O, g] = d;
|
|
1935
|
+
let b = "text", v = "";
|
|
1936
|
+
d.length === 1 ? M(O) ? (v = O.modifier || v, b = O.type || b) : I(O) && (v = O || v) : d.length === 2 && (I(O) && (v = O || v), I(g) && (b = g || b));
|
|
1937
1937
|
const p = N(f, !0)(S), P = (
|
|
1938
1938
|
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
|
1939
|
-
|
|
1939
|
+
b === "vnode" && B(p) && v ? p[0] : p
|
|
1940
1940
|
);
|
|
1941
|
-
return v ? T(v)(P,
|
|
1941
|
+
return v ? T(v)(P, b) : P;
|
|
1942
1942
|
},
|
|
1943
1943
|
message: N,
|
|
1944
1944
|
type: C,
|
|
@@ -1948,26 +1948,26 @@ function Ir(e = {}) {
|
|
|
1948
1948
|
};
|
|
1949
1949
|
return S;
|
|
1950
1950
|
}
|
|
1951
|
-
const Pn = () => "", ae = (e) =>
|
|
1951
|
+
const Pn = () => "", ae = (e) => x(e);
|
|
1952
1952
|
function Rn(e, ...t) {
|
|
1953
|
-
const { fallbackFormat: n, postTranslation: s, unresolving: a, messageCompiler: r, fallbackLocale: o, messages: l } = e, [u, _] = Vt(...t), N = F(_.missingWarn) ? _.missingWarn : e.missingWarn, T = F(_.fallbackWarn) ? _.fallbackWarn : e.fallbackWarn, E = F(_.escapeParameter) ? _.escapeParameter : e.escapeParameter, A = !!_.resolvedMessage, C = I(_.default) || F(_.default) ? F(_.default) ? r ? u : () => u : _.default : n ? r ? u : () => u : null, y = n || C != null && (I(C) ||
|
|
1953
|
+
const { fallbackFormat: n, postTranslation: s, unresolving: a, messageCompiler: r, fallbackLocale: o, messages: l } = e, [u, _] = Vt(...t), N = F(_.missingWarn) ? _.missingWarn : e.missingWarn, T = F(_.fallbackWarn) ? _.fallbackWarn : e.fallbackWarn, E = F(_.escapeParameter) ? _.escapeParameter : e.escapeParameter, A = !!_.resolvedMessage, C = I(_.default) || F(_.default) ? F(_.default) ? r ? u : () => u : _.default : n ? r ? u : () => u : null, y = n || C != null && (I(C) || x(C)), S = zt(e, _);
|
|
1954
1954
|
E && vr(_);
|
|
1955
|
-
let [f, d,
|
|
1955
|
+
let [f, d, O] = A ? [
|
|
1956
1956
|
u,
|
|
1957
1957
|
S,
|
|
1958
1958
|
l[S] || W()
|
|
1959
|
-
] : hs(e, u, S, o, T, N), g = f,
|
|
1960
|
-
if (!A && !(I(g) || re(g) || ae(g)) && y && (g = C,
|
|
1959
|
+
] : hs(e, u, S, o, T, N), g = f, b = u;
|
|
1960
|
+
if (!A && !(I(g) || re(g) || ae(g)) && y && (g = C, b = g), !A && (!(I(g) || re(g) || ae(g)) || !I(d)))
|
|
1961
1961
|
return a ? ct : u;
|
|
1962
1962
|
if (process.env.NODE_ENV !== "production" && I(g) && e.messageCompiler == null)
|
|
1963
1963
|
return he(`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;
|
|
1964
1964
|
let v = !1;
|
|
1965
1965
|
const p = () => {
|
|
1966
1966
|
v = !0;
|
|
1967
|
-
}, P = ae(g) ? g : Ns(e, u, d, g,
|
|
1967
|
+
}, P = ae(g) ? g : Ns(e, u, d, g, b, p);
|
|
1968
1968
|
if (v)
|
|
1969
1969
|
return g;
|
|
1970
|
-
const U = Cr(e, d,
|
|
1970
|
+
const U = Cr(e, d, O, _), X = Ir(U), oe = yr(e, P, X), J = s ? s(oe, u) : oe;
|
|
1971
1971
|
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
1972
1972
|
const Pe = {
|
|
1973
1973
|
timestamp: Date.now(),
|
|
@@ -1994,8 +1994,8 @@ function hs(e, t, n, s, a, r) {
|
|
|
1994
1994
|
key: t,
|
|
1995
1995
|
target: E
|
|
1996
1996
|
})), process.env.NODE_ENV !== "production" && n !== E) {
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1997
|
+
const b = e.__v_emitter;
|
|
1998
|
+
b && b.emit("fallback", {
|
|
1999
1999
|
type: S,
|
|
2000
2000
|
key: t,
|
|
2001
2001
|
from: C,
|
|
@@ -2004,21 +2004,21 @@ function hs(e, t, n, s, a, r) {
|
|
|
2004
2004
|
});
|
|
2005
2005
|
}
|
|
2006
2006
|
T = o[E] || W();
|
|
2007
|
-
let d = null,
|
|
2008
|
-
if (process.env.NODE_ENV !== "production" && ce && (d = window.performance.now(),
|
|
2009
|
-
const
|
|
2007
|
+
let d = null, O, g;
|
|
2008
|
+
if (process.env.NODE_ENV !== "production" && ce && (d = window.performance.now(), O = "intlify-message-resolve-start", g = "intlify-message-resolve-end", ne && ne(O)), (A = u(T, t)) === null && (A = T[t]), process.env.NODE_ENV !== "production" && ce) {
|
|
2009
|
+
const b = window.performance.now(), v = e.__v_emitter;
|
|
2010
2010
|
v && d && A && v.emit("message-resolve", {
|
|
2011
2011
|
type: "message-resolve",
|
|
2012
2012
|
key: t,
|
|
2013
2013
|
message: A,
|
|
2014
|
-
time:
|
|
2014
|
+
time: b - d,
|
|
2015
2015
|
groupId: `${S}:${t}`
|
|
2016
|
-
}),
|
|
2016
|
+
}), O && g && ne && Se && (ne(g), Se("intlify message resolve", O, g));
|
|
2017
2017
|
}
|
|
2018
2018
|
if (I(A) || re(A) || ae(A))
|
|
2019
2019
|
break;
|
|
2020
2020
|
if (!Er(E, N)) {
|
|
2021
|
-
const
|
|
2021
|
+
const b = en(
|
|
2022
2022
|
e,
|
|
2023
2023
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2024
2024
|
t,
|
|
@@ -2026,7 +2026,7 @@ function hs(e, t, n, s, a, r) {
|
|
|
2026
2026
|
r,
|
|
2027
2027
|
S
|
|
2028
2028
|
);
|
|
2029
|
-
|
|
2029
|
+
b !== t && (A = b);
|
|
2030
2030
|
}
|
|
2031
2031
|
C = y;
|
|
2032
2032
|
}
|
|
@@ -2259,9 +2259,9 @@ const G = {
|
|
|
2259
2259
|
NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
|
|
2260
2260
|
};
|
|
2261
2261
|
function ee(e, ...t) {
|
|
2262
|
-
return Ve(e, null, process.env.NODE_ENV !== "production" ? { messages:
|
|
2262
|
+
return Ve(e, null, process.env.NODE_ENV !== "production" ? { messages: $r, args: t } : void 0);
|
|
2263
2263
|
}
|
|
2264
|
-
const
|
|
2264
|
+
const $r = {
|
|
2265
2265
|
[G.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
|
|
2266
2266
|
[G.INVALID_ARGUMENT]: "Invalid argument",
|
|
2267
2267
|
[G.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
|
|
@@ -2273,7 +2273,7 @@ const xr = {
|
|
|
2273
2273
|
[G.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
|
|
2274
2274
|
[G.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
|
|
2275
2275
|
[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"
|
|
2276
|
-
},
|
|
2276
|
+
}, $t = /* @__PURE__ */ _e("__translateVNode"), xt = /* @__PURE__ */ _e("__datetimeParts"), Gt = /* @__PURE__ */ _e("__numberParts"), De = /* @__PURE__ */ _e("__enableEmitter"), Je = /* @__PURE__ */ _e("__disableEmitter"), Ls = _e("__setPluralRules"), Os = /* @__PURE__ */ _e("__injectWithOption"), Yt = /* @__PURE__ */ _e("__dispose"), fe = {
|
|
2277
2277
|
FALLBACK_TO_ROOT: rr,
|
|
2278
2278
|
// 8
|
|
2279
2279
|
NOT_FOUND_PARENT_SCOPE: 9,
|
|
@@ -2286,7 +2286,7 @@ const xr = {
|
|
|
2286
2286
|
* @deprecated will be removed at vue-i18n v12
|
|
2287
2287
|
*/
|
|
2288
2288
|
DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12
|
|
2289
|
-
},
|
|
2289
|
+
}, xr = {
|
|
2290
2290
|
[fe.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
|
|
2291
2291
|
[fe.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
|
|
2292
2292
|
[fe.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
|
|
@@ -2301,7 +2301,7 @@ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guid
|
|
|
2301
2301
|
[fe.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: "'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead."
|
|
2302
2302
|
};
|
|
2303
2303
|
function Ze(e, ...t) {
|
|
2304
|
-
return lt(
|
|
2304
|
+
return lt(xr[e], ...t);
|
|
2305
2305
|
}
|
|
2306
2306
|
function Qe(e) {
|
|
2307
2307
|
if (!M(e) || re(e))
|
|
@@ -2344,7 +2344,7 @@ function tn(e, t) {
|
|
|
2344
2344
|
ie(o, l) && Qe(o[l]);
|
|
2345
2345
|
return o;
|
|
2346
2346
|
}
|
|
2347
|
-
function
|
|
2347
|
+
function bs(e) {
|
|
2348
2348
|
return e.type;
|
|
2349
2349
|
}
|
|
2350
2350
|
function Is(e, t, n) {
|
|
@@ -2373,7 +2373,7 @@ function Is(e, t, n) {
|
|
|
2373
2373
|
}
|
|
2374
2374
|
}
|
|
2375
2375
|
function Mn(e) {
|
|
2376
|
-
return te(
|
|
2376
|
+
return te(xs, null, e, 0);
|
|
2377
2377
|
}
|
|
2378
2378
|
const Fn = "__INTLIFY_META__", wn = () => [], Gr = () => !1;
|
|
2379
2379
|
let Un = 0;
|
|
@@ -2383,7 +2383,7 @@ function Vn(e) {
|
|
|
2383
2383
|
const Yr = /* @__NO_SIDE_EFFECTS__ */ () => {
|
|
2384
2384
|
const e = Ke();
|
|
2385
2385
|
let t = null;
|
|
2386
|
-
return e && (t =
|
|
2386
|
+
return e && (t = bs(e)[Fn]) ? { [Fn]: t } : null;
|
|
2387
2387
|
};
|
|
2388
2388
|
function nn(e = {}) {
|
|
2389
2389
|
const { __root: t, __injectWithOption: n } = e, s = t === void 0, a = e.flatJson, r = ce ? Fs : ws;
|
|
@@ -2395,8 +2395,8 @@ function nn(e = {}) {
|
|
|
2395
2395
|
// prettier-ignore
|
|
2396
2396
|
t && o ? t.fallbackLocale.value : I(e.fallbackLocale) || B(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : l.value
|
|
2397
2397
|
), _ = r(tn(l.value, e)), N = r(R(e.datetimeFormats) ? e.datetimeFormats : { [l.value]: {} }), T = r(R(e.numberFormats) ? e.numberFormats : { [l.value]: {} });
|
|
2398
|
-
let E = t ? t.missingWarn : F(e.missingWarn) || we(e.missingWarn) ? e.missingWarn : !0, A = t ? t.fallbackWarn : F(e.fallbackWarn) || we(e.fallbackWarn) ? e.fallbackWarn : !0, C = t ? t.fallbackRoot : F(e.fallbackRoot) ? e.fallbackRoot : !0, y = !!e.fallbackFormat, S =
|
|
2399
|
-
const
|
|
2398
|
+
let E = t ? t.missingWarn : F(e.missingWarn) || we(e.missingWarn) ? e.missingWarn : !0, A = t ? t.fallbackWarn : F(e.fallbackWarn) || we(e.fallbackWarn) ? e.fallbackWarn : !0, C = t ? t.fallbackRoot : F(e.fallbackRoot) ? e.fallbackRoot : !0, y = !!e.fallbackFormat, S = x(e.missing) ? e.missing : null, f = x(e.missing) ? Vn(e.missing) : null, d = x(e.postTranslation) ? e.postTranslation : null, O = t ? t.warnHtmlMessage : F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, g = !!e.escapeParameter;
|
|
2399
|
+
const b = t ? t.modifiers : R(e.modifiers) ? e.modifiers : {};
|
|
2400
2400
|
let v = e.pluralRules || t && t.pluralRules, p;
|
|
2401
2401
|
p = (() => {
|
|
2402
2402
|
s && In(null);
|
|
@@ -2405,7 +2405,7 @@ function nn(e = {}) {
|
|
|
2405
2405
|
locale: l.value,
|
|
2406
2406
|
fallbackLocale: u.value,
|
|
2407
2407
|
messages: _.value,
|
|
2408
|
-
modifiers:
|
|
2408
|
+
modifiers: b,
|
|
2409
2409
|
pluralRules: v,
|
|
2410
2410
|
missing: f === null ? void 0 : f,
|
|
2411
2411
|
missingWarn: E,
|
|
@@ -2413,7 +2413,7 @@ function nn(e = {}) {
|
|
|
2413
2413
|
fallbackFormat: y,
|
|
2414
2414
|
unresolving: !0,
|
|
2415
2415
|
postTranslation: d === null ? void 0 : d,
|
|
2416
|
-
warnHtmlMessage:
|
|
2416
|
+
warnHtmlMessage: O,
|
|
2417
2417
|
escapeParameter: g,
|
|
2418
2418
|
messageResolver: e.messageResolver,
|
|
2419
2419
|
messageCompiler: e.messageCompiler,
|
|
@@ -2444,7 +2444,7 @@ function nn(e = {}) {
|
|
|
2444
2444
|
}
|
|
2445
2445
|
}), J = Ye(() => _.value), Pe = /* @__PURE__ */ Ye(() => N.value), _t = /* @__PURE__ */ Ye(() => T.value);
|
|
2446
2446
|
function mt() {
|
|
2447
|
-
return
|
|
2447
|
+
return x(d) ? d : null;
|
|
2448
2448
|
}
|
|
2449
2449
|
function dt(m) {
|
|
2450
2450
|
d = m, p.postTranslation = m;
|
|
@@ -2458,7 +2458,7 @@ function nn(e = {}) {
|
|
|
2458
2458
|
function pt(m, L) {
|
|
2459
2459
|
return m !== "translate" || !L.resolvedMessage;
|
|
2460
2460
|
}
|
|
2461
|
-
const me = (m, L, V, K,
|
|
2461
|
+
const me = (m, L, V, K, Oe, et) => {
|
|
2462
2462
|
U();
|
|
2463
2463
|
let Re;
|
|
2464
2464
|
try {
|
|
@@ -2468,20 +2468,20 @@ function nn(e = {}) {
|
|
|
2468
2468
|
}
|
|
2469
2469
|
if (V !== "translate exists" && // for not `te` (e.g `t`)
|
|
2470
2470
|
j(Re) && Re === ct || V === "translate exists" && !Re) {
|
|
2471
|
-
const [
|
|
2472
|
-
if (process.env.NODE_ENV !== "production" && t && I(
|
|
2473
|
-
key:
|
|
2471
|
+
const [be, Ps] = L();
|
|
2472
|
+
if (process.env.NODE_ENV !== "production" && t && I(be) && pt(V, Ps) && (C && (ut(A, be) || ms(E, be)) && he(Ze(fe.FALLBACK_TO_ROOT, {
|
|
2473
|
+
key: be,
|
|
2474
2474
|
type: V
|
|
2475
2475
|
})), process.env.NODE_ENV !== "production")) {
|
|
2476
2476
|
const { __v_emitter: ln } = p;
|
|
2477
2477
|
ln && C && ln.emit("fallback", {
|
|
2478
2478
|
type: V,
|
|
2479
|
-
key:
|
|
2479
|
+
key: be,
|
|
2480
2480
|
to: "global",
|
|
2481
|
-
groupId: `${V}:${
|
|
2481
|
+
groupId: `${V}:${be}`
|
|
2482
2482
|
});
|
|
2483
2483
|
}
|
|
2484
|
-
return t && C ? K(t) : be
|
|
2484
|
+
return t && C ? K(t) : Oe(be);
|
|
2485
2485
|
} else {
|
|
2486
2486
|
if (et(Re))
|
|
2487
2487
|
return Re;
|
|
@@ -2506,7 +2506,7 @@ function nn(e = {}) {
|
|
|
2506
2506
|
function Lt(m) {
|
|
2507
2507
|
return m.map((L) => I(L) || j(L) || F(L) ? Mn(String(L)) : L);
|
|
2508
2508
|
}
|
|
2509
|
-
const
|
|
2509
|
+
const Ot = {
|
|
2510
2510
|
normalize: Lt,
|
|
2511
2511
|
interpolate: (m) => m,
|
|
2512
2512
|
type: "vnode"
|
|
@@ -2516,18 +2516,18 @@ function nn(e = {}) {
|
|
|
2516
2516
|
let V;
|
|
2517
2517
|
const K = L;
|
|
2518
2518
|
try {
|
|
2519
|
-
K.processor =
|
|
2519
|
+
K.processor = Ot, V = Reflect.apply(Rn, null, [K, ...m]);
|
|
2520
2520
|
} finally {
|
|
2521
2521
|
K.processor = null;
|
|
2522
2522
|
}
|
|
2523
2523
|
return V;
|
|
2524
|
-
}, () => Vt(...m), "translate", (L) => L[
|
|
2524
|
+
}, () => Vt(...m), "translate", (L) => L[$t](...m), (L) => [Mn(L)], (L) => B(L));
|
|
2525
2525
|
}
|
|
2526
|
-
function
|
|
2526
|
+
function bt(...m) {
|
|
2527
2527
|
return me((L) => Reflect.apply(Cn, null, [L, ...m]), () => Ut(...m), "number format", (L) => L[Gt](...m), wn, (L) => I(L) || B(L));
|
|
2528
2528
|
}
|
|
2529
2529
|
function It(...m) {
|
|
2530
|
-
return me((L) => Reflect.apply(An, null, [L, ...m]), () => wt(...m), "datetime format", (L) => L[
|
|
2530
|
+
return me((L) => Reflect.apply(An, null, [L, ...m]), () => wt(...m), "datetime format", (L) => L[xt](...m), wn, (L) => I(L) || B(L));
|
|
2531
2531
|
}
|
|
2532
2532
|
function vt(m) {
|
|
2533
2533
|
v = m, p.pluralRules = v;
|
|
@@ -2536,15 +2536,15 @@ function nn(e = {}) {
|
|
|
2536
2536
|
return me(() => {
|
|
2537
2537
|
if (!m)
|
|
2538
2538
|
return !1;
|
|
2539
|
-
const V = I(L) ? L : l.value, K = Le(V),
|
|
2540
|
-
return re(
|
|
2539
|
+
const V = I(L) ? L : l.value, K = Le(V), Oe = p.messageResolver(K, m);
|
|
2540
|
+
return re(Oe) || ae(Oe) || I(Oe);
|
|
2541
2541
|
}, () => [m], "translate exists", (V) => Reflect.apply(V.te, V, [m, L]), Gr, (V) => F(V));
|
|
2542
2542
|
}
|
|
2543
|
-
function
|
|
2543
|
+
function $e(m) {
|
|
2544
2544
|
let L = null;
|
|
2545
2545
|
const V = ls(p, u.value, l.value);
|
|
2546
2546
|
for (let K = 0; K < V.length; K++) {
|
|
2547
|
-
const
|
|
2547
|
+
const Oe = _.value[V[K]] || {}, et = p.messageResolver(Oe, m);
|
|
2548
2548
|
if (et != null) {
|
|
2549
2549
|
L = et;
|
|
2550
2550
|
break;
|
|
@@ -2552,8 +2552,8 @@ function nn(e = {}) {
|
|
|
2552
2552
|
}
|
|
2553
2553
|
return L;
|
|
2554
2554
|
}
|
|
2555
|
-
function
|
|
2556
|
-
const L =
|
|
2555
|
+
function xe(m) {
|
|
2556
|
+
const L = $e(m);
|
|
2557
2557
|
return L ?? (t ? t.tm(m) || {} : {});
|
|
2558
2558
|
}
|
|
2559
2559
|
function Le(m) {
|
|
@@ -2614,7 +2614,7 @@ function nn(e = {}) {
|
|
|
2614
2614
|
},
|
|
2615
2615
|
messages: J,
|
|
2616
2616
|
get modifiers() {
|
|
2617
|
-
return
|
|
2617
|
+
return b;
|
|
2618
2618
|
},
|
|
2619
2619
|
get pluralRules() {
|
|
2620
2620
|
return v || {};
|
|
@@ -2647,10 +2647,10 @@ function nn(e = {}) {
|
|
|
2647
2647
|
y = m, p.fallbackFormat = y;
|
|
2648
2648
|
},
|
|
2649
2649
|
get warnHtmlMessage() {
|
|
2650
|
-
return
|
|
2650
|
+
return O;
|
|
2651
2651
|
},
|
|
2652
2652
|
set warnHtmlMessage(m) {
|
|
2653
|
-
|
|
2653
|
+
O = m, p.warnHtmlMessage = m;
|
|
2654
2654
|
},
|
|
2655
2655
|
get escapeParameter() {
|
|
2656
2656
|
return g;
|
|
@@ -2668,7 +2668,7 @@ function nn(e = {}) {
|
|
|
2668
2668
|
setMissingHandler: Et,
|
|
2669
2669
|
[Ls]: vt
|
|
2670
2670
|
};
|
|
2671
|
-
return w.datetimeFormats = Pe, w.numberFormats = _t, w.rt = ht, w.te = yt, w.tm =
|
|
2671
|
+
return w.datetimeFormats = Pe, w.numberFormats = _t, w.rt = ht, w.te = yt, w.tm = xe, w.d = Nt, w.n = Tt, w.getDateTimeFormat = i, w.setDateTimeFormat = c, w.mergeDateTimeFormat = h, w.getNumberFormat = D, w.setNumberFormat = Y, w.mergeNumberFormat = H, w[Os] = n, w[$t] = ze, w[xt] = It, w[Gt] = bt, process.env.NODE_ENV !== "production" && (w[De] = (m) => {
|
|
2672
2672
|
p.__v_emitter = m;
|
|
2673
2673
|
}, w[Je] = () => {
|
|
2674
2674
|
p.__v_emitter = void 0;
|
|
@@ -2792,7 +2792,7 @@ function sn(e) {
|
|
|
2792
2792
|
const t = {};
|
|
2793
2793
|
return Object.keys(e).forEach((n) => {
|
|
2794
2794
|
const s = e[n];
|
|
2795
|
-
|
|
2795
|
+
x(s) && "source" in s ? t[n] = qr(s) : re(s) && s.loc && s.loc.source ? t[n] = s.loc.source : M(s) ? t[n] = sn(s) : t[n] = s;
|
|
2796
2796
|
}), t;
|
|
2797
2797
|
}
|
|
2798
2798
|
const Xr = {
|
|
@@ -2935,23 +2935,23 @@ function no(e, t) {
|
|
|
2935
2935
|
}
|
|
2936
2936
|
}
|
|
2937
2937
|
function so(e) {
|
|
2938
|
-
const t = I(e.locale) ? e.locale : Xe, n = I(e.fallbackLocale) || B(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, s =
|
|
2938
|
+
const t = I(e.locale) ? e.locale : Xe, n = I(e.fallbackLocale) || B(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, s = x(e.missing) ? e.missing : void 0, a = F(e.silentTranslationWarn) || we(e.silentTranslationWarn) ? !e.silentTranslationWarn : !0, r = F(e.silentFallbackWarn) || we(e.silentFallbackWarn) ? !e.silentFallbackWarn : !0, o = F(e.fallbackRoot) ? e.fallbackRoot : !0, l = !!e.formatFallbackMessages, u = R(e.modifiers) ? e.modifiers : {}, _ = e.pluralizationRules, N = x(e.postTranslation) ? e.postTranslation : void 0, T = I(e.warnHtmlInMessage) ? e.warnHtmlInMessage !== "off" : !0, E = !!e.escapeParameterHtml, A = F(e.sync) ? e.sync : !0;
|
|
2939
2939
|
let C = e.messages;
|
|
2940
2940
|
if (R(e.sharedMessages)) {
|
|
2941
|
-
const
|
|
2942
|
-
C = Object.keys(
|
|
2941
|
+
const b = e.sharedMessages;
|
|
2942
|
+
C = Object.keys(b).reduce((p, P) => {
|
|
2943
2943
|
const U = p[P] || (p[P] = {});
|
|
2944
|
-
return Q(U,
|
|
2944
|
+
return Q(U, b[P]), p;
|
|
2945
2945
|
}, C || {});
|
|
2946
2946
|
}
|
|
2947
|
-
const { __i18n: y, __root: S, __injectWithOption: f } = e, d = e.datetimeFormats,
|
|
2947
|
+
const { __i18n: y, __root: S, __injectWithOption: f } = e, d = e.datetimeFormats, O = e.numberFormats, g = e.flatJson;
|
|
2948
2948
|
return {
|
|
2949
2949
|
locale: t,
|
|
2950
2950
|
fallbackLocale: n,
|
|
2951
2951
|
messages: C,
|
|
2952
2952
|
flatJson: g,
|
|
2953
2953
|
datetimeFormats: d,
|
|
2954
|
-
numberFormats:
|
|
2954
|
+
numberFormats: O,
|
|
2955
2955
|
missing: s,
|
|
2956
2956
|
missingWarn: a,
|
|
2957
2957
|
fallbackWarn: r,
|
|
@@ -3148,7 +3148,7 @@ function ao(e, t, n) {
|
|
|
3148
3148
|
if (a.i18n) {
|
|
3149
3149
|
const r = a.i18n;
|
|
3150
3150
|
if (a.__i18n && (r.__i18n = a.__i18n), r.__root = t, this === this.$root)
|
|
3151
|
-
this.$i18n =
|
|
3151
|
+
this.$i18n = $n(e, r);
|
|
3152
3152
|
else {
|
|
3153
3153
|
r.__injectWithOption = !0, r.__extender = n.__vueI18nExtend, this.$i18n = Kt(r);
|
|
3154
3154
|
const o = this.$i18n;
|
|
@@ -3156,7 +3156,7 @@ function ao(e, t, n) {
|
|
|
3156
3156
|
}
|
|
3157
3157
|
} else if (a.__i18n)
|
|
3158
3158
|
if (this === this.$root)
|
|
3159
|
-
this.$i18n =
|
|
3159
|
+
this.$i18n = $n(e, a);
|
|
3160
3160
|
else {
|
|
3161
3161
|
this.$i18n = Kt({
|
|
3162
3162
|
__i18n: a.__i18n,
|
|
@@ -3188,7 +3188,7 @@ function ao(e, t, n) {
|
|
|
3188
3188
|
}
|
|
3189
3189
|
};
|
|
3190
3190
|
}
|
|
3191
|
-
function
|
|
3191
|
+
function $n(e, t) {
|
|
3192
3192
|
e.locale = t.locale || e.locale, e.fallbackLocale = t.fallbackLocale || e.fallbackLocale, e.missing = t.missing || e.missing, e.silentTranslationWarn = t.silentTranslationWarn || e.silentFallbackWarn, e.silentFallbackWarn = t.silentFallbackWarn || e.silentFallbackWarn, e.formatFallbackMessages = t.formatFallbackMessages || e.formatFallbackMessages, e.postTranslation = t.postTranslation || e.postTranslation, e.warnHtmlInMessage = t.warnHtmlInMessage || e.warnHtmlInMessage, e.escapeParameterHtml = t.escapeParameterHtml || e.escapeParameterHtml, e.sync = t.sync || e.sync, e.__composer[Ls](t.pluralizationRules || e.pluralizationRules);
|
|
3193
3193
|
const n = tn(e.locale, {
|
|
3194
3194
|
messages: t.messages,
|
|
@@ -3250,11 +3250,11 @@ const oo = /* @__PURE__ */ Bt({
|
|
|
3250
3250
|
return () => {
|
|
3251
3251
|
const r = Object.keys(n).filter((T) => T !== "_"), o = W();
|
|
3252
3252
|
e.locale && (o.locale = e.locale), e.plural !== void 0 && (o.plural = I(e.plural) ? +e.plural : e.plural);
|
|
3253
|
-
const l = ro(t, r), u = a[
|
|
3253
|
+
const l = ro(t, r), u = a[$t](e.keypath, l, o), _ = Q(W(), s), N = I(e.tag) || M(e.tag) ? e.tag : Ss();
|
|
3254
3254
|
return Jn(N, _, u);
|
|
3255
3255
|
};
|
|
3256
3256
|
}
|
|
3257
|
-
}),
|
|
3257
|
+
}), xn = oo;
|
|
3258
3258
|
function lo(e) {
|
|
3259
3259
|
return B(e) && !I(e[0]);
|
|
3260
3260
|
}
|
|
@@ -3360,7 +3360,7 @@ function Hn(e) {
|
|
|
3360
3360
|
}
|
|
3361
3361
|
function fo(e, t, ...n) {
|
|
3362
3362
|
const s = R(n[0]) ? n[0] : {};
|
|
3363
|
-
(F(s.globalInstall) ? s.globalInstall : !0) && ([
|
|
3363
|
+
(F(s.globalInstall) ? s.globalInstall : !0) && ([xn.name, "I18nT"].forEach((r) => e.component(r, xn)), [Gn.name, "I18nN"].forEach((r) => e.component(r, Gn)), [Bn.name, "I18nD"].forEach((r) => e.component(r, Bn))), e.directive("t", uo(t));
|
|
3364
3364
|
}
|
|
3365
3365
|
const _o = /* @__PURE__ */ _e("global-vue-i18n");
|
|
3366
3366
|
function mo(e = {}) {
|
|
@@ -3388,7 +3388,7 @@ function mo(e = {}) {
|
|
|
3388
3388
|
N.__composerExtend = y.__composerExtend, N.__vueI18nExtend = y.__vueI18nExtend;
|
|
3389
3389
|
}
|
|
3390
3390
|
let A = null;
|
|
3391
|
-
!t && n && (A =
|
|
3391
|
+
!t && n && (A = bo(T, N.global)), __VUE_I18N_FULL_INSTALL__ && fo(T, N, ...E), __VUE_I18N_LEGACY_API__ && t && T.mixin(ao(r, r.__composer, N));
|
|
3392
3392
|
const C = T.unmount;
|
|
3393
3393
|
if (T.unmount = () => {
|
|
3394
3394
|
A && A(), N.dispose(), C();
|
|
@@ -3430,7 +3430,7 @@ function rn(e = {}) {
|
|
|
3430
3430
|
throw ee(G.MUST_BE_CALL_SETUP_TOP);
|
|
3431
3431
|
if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
|
|
3432
3432
|
throw ee(G.NOT_INSTALLED);
|
|
3433
|
-
const n = Eo(t), s = ho(n), a =
|
|
3433
|
+
const n = Eo(t), s = ho(n), a = bs(t), r = po(e, a);
|
|
3434
3434
|
if (r === "global")
|
|
3435
3435
|
return Is(s, e, a), s;
|
|
3436
3436
|
if (r === "parent") {
|
|
@@ -3473,7 +3473,7 @@ function No(e, t, n = !1) {
|
|
|
3473
3473
|
s = o.__getInstance(r);
|
|
3474
3474
|
else if (__VUE_I18N_LEGACY_API__) {
|
|
3475
3475
|
const l = o.__getInstance(r);
|
|
3476
|
-
l != null && (s = l.__composer, n && s && !s[
|
|
3476
|
+
l != null && (s = l.__composer, n && s && !s[Os] && (s = null));
|
|
3477
3477
|
}
|
|
3478
3478
|
if (s != null || a === r)
|
|
3479
3479
|
break;
|
|
@@ -3492,21 +3492,21 @@ function Lo(e, t, n) {
|
|
|
3492
3492
|
const a = n;
|
|
3493
3493
|
a[De] && a[De](s), s.on("*", qe);
|
|
3494
3494
|
}
|
|
3495
|
-
}, t),
|
|
3495
|
+
}, t), $s(() => {
|
|
3496
3496
|
const a = n;
|
|
3497
3497
|
process.env.NODE_ENV !== "production" && t.vnode.el && t.vnode.el.__VUE_I18N__ && (s && s.off("*", qe), a[Je] && a[Je](), delete t.vnode.el.__VUE_I18N__), e.__deleteInstance(t);
|
|
3498
3498
|
const r = a[Yt];
|
|
3499
3499
|
r && (r(), delete a[Yt]);
|
|
3500
3500
|
}, t);
|
|
3501
3501
|
}
|
|
3502
|
-
const
|
|
3502
|
+
const Oo = [
|
|
3503
3503
|
"locale",
|
|
3504
3504
|
"fallbackLocale",
|
|
3505
3505
|
"availableLocales"
|
|
3506
3506
|
], Kn = ["t", "rt", "d", "n", "tm", "te"];
|
|
3507
|
-
function
|
|
3507
|
+
function bo(e, t) {
|
|
3508
3508
|
const n = /* @__PURE__ */ Object.create(null);
|
|
3509
|
-
return
|
|
3509
|
+
return Oo.forEach((a) => {
|
|
3510
3510
|
const r = Object.getOwnPropertyDescriptor(t, a);
|
|
3511
3511
|
if (!r)
|
|
3512
3512
|
throw ee(G.UNEXPECTED_ERROR);
|
|
@@ -3556,12 +3556,12 @@ const Io = /* @__PURE__ */ Bt({
|
|
|
3556
3556
|
});
|
|
3557
3557
|
return Cs(e, t, Es, (...s) => (
|
|
3558
3558
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3559
|
-
n[
|
|
3559
|
+
n[xt](...s)
|
|
3560
3560
|
));
|
|
3561
3561
|
}
|
|
3562
3562
|
}), Bn = Io;
|
|
3563
3563
|
Wr();
|
|
3564
|
-
cr(
|
|
3564
|
+
cr(xa);
|
|
3565
3565
|
ur(ar);
|
|
3566
3566
|
fr(ls);
|
|
3567
3567
|
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
@@ -3575,8 +3575,8 @@ const vo = (e) => {
|
|
|
3575
3575
|
t[n.key] = n.value;
|
|
3576
3576
|
return t;
|
|
3577
3577
|
}, yo = (e, t) => (t.forEach((n) => {
|
|
3578
|
-
const s =
|
|
3579
|
-
s ?
|
|
3578
|
+
const s = $.find(e, { key: n.key });
|
|
3579
|
+
s ? $.merge(s, n) : e.push(n);
|
|
3580
3580
|
}), e), ft = "https://test.ihotel.cn", Ds = async (e) => ke.get(ft + "/i18n-web/sysoption/getsupportedlangs", {
|
|
3581
3581
|
headers: {
|
|
3582
3582
|
Authorization: e
|
|
@@ -3612,7 +3612,7 @@ const vo = (e) => {
|
|
|
3612
3612
|
Authorization: t
|
|
3613
3613
|
}
|
|
3614
3614
|
}), So = async ({ appCode: e, language: t = "zh-CN", token: n }) => new Promise(async (s, a) => {
|
|
3615
|
-
const r = ye.namespace(`I18N_${
|
|
3615
|
+
const r = ye.namespace(`I18N_${$.toUpper(e)}`), o = {
|
|
3616
3616
|
appCode: e,
|
|
3617
3617
|
language: t,
|
|
3618
3618
|
token: n
|
|
@@ -3626,15 +3626,15 @@ const vo = (e) => {
|
|
|
3626
3626
|
lastPullDate: u
|
|
3627
3627
|
});
|
|
3628
3628
|
if (_) {
|
|
3629
|
-
const N =
|
|
3630
|
-
if (
|
|
3629
|
+
const N = $.get(l, "translatesDTOs");
|
|
3630
|
+
if ($.isEmpty(_.translatesDTOs))
|
|
3631
3631
|
s(N);
|
|
3632
3632
|
else {
|
|
3633
3633
|
const T = yo(N, _.translatesDTOs), E = {
|
|
3634
3634
|
lastPullDate: _.lastPullDate,
|
|
3635
3635
|
translatesDTOs: T
|
|
3636
3636
|
};
|
|
3637
|
-
ye.namespace(`I18N_${
|
|
3637
|
+
ye.namespace(`I18N_${$.toUpper(e)}`).set(t, E, ":"), s(T);
|
|
3638
3638
|
}
|
|
3639
3639
|
}
|
|
3640
3640
|
}
|
|
@@ -3703,7 +3703,7 @@ const vo = (e) => {
|
|
|
3703
3703
|
row: n
|
|
3704
3704
|
}) => t("span", {}, n.page === "common" ? "全局" : n.page)
|
|
3705
3705
|
}];
|
|
3706
|
-
return
|
|
3706
|
+
return $.map(this.languages, (t) => {
|
|
3707
3707
|
const n = t.code;
|
|
3708
3708
|
return e.push({
|
|
3709
3709
|
title: t.name,
|
|
@@ -3719,7 +3719,9 @@ const vo = (e) => {
|
|
|
3719
3719
|
onOnChange: (l) => {
|
|
3720
3720
|
const u = l.target.value, {
|
|
3721
3721
|
dictKey: _
|
|
3722
|
-
} = a
|
|
3722
|
+
} = a;
|
|
3723
|
+
console.log("dictKey", _);
|
|
3724
|
+
const N = $.findIndex(this.mySaveData, {
|
|
3723
3725
|
dictKey: _
|
|
3724
3726
|
});
|
|
3725
3727
|
N > -1 ? this.mySaveData[N][n] = u : this.mySaveData.push({
|
|
@@ -3750,38 +3752,39 @@ const vo = (e) => {
|
|
|
3750
3752
|
this.isModalVisible || (this.isModalVisible = !0, this.name = e, this.init());
|
|
3751
3753
|
},
|
|
3752
3754
|
findShallowStringDiff(e) {
|
|
3753
|
-
return
|
|
3755
|
+
return $.find(e, ["_isEdit", !0]);
|
|
3754
3756
|
},
|
|
3755
3757
|
async saveData({
|
|
3756
3758
|
msg: e = "保存成功"
|
|
3757
3759
|
}, t = !0) {
|
|
3758
|
-
const n =
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3760
|
+
const n = [];
|
|
3761
|
+
if ($.map(this.mySaveData, (a) => {
|
|
3762
|
+
$.map(this.languages, (r) => {
|
|
3763
|
+
$.isEmpty(a[r.code]) || n.push({
|
|
3764
|
+
key: a.dictKey,
|
|
3765
|
+
page: a.page,
|
|
3766
|
+
lang: r.code,
|
|
3767
|
+
value: a[r.code]
|
|
3768
|
+
});
|
|
3769
|
+
});
|
|
3770
|
+
}), $.isEmpty(n)) {
|
|
3768
3771
|
se.error({
|
|
3769
3772
|
content: "没有需要保存的数据"
|
|
3770
3773
|
});
|
|
3771
3774
|
return;
|
|
3772
3775
|
}
|
|
3773
|
-
const
|
|
3776
|
+
const s = await Ao({
|
|
3774
3777
|
appCode: this.appCode,
|
|
3775
|
-
data:
|
|
3778
|
+
data: n
|
|
3776
3779
|
}, this.token);
|
|
3777
|
-
|
|
3778
|
-
content: e ||
|
|
3779
|
-
}), this.setLanguage(), this.initialData =
|
|
3780
|
-
content:
|
|
3780
|
+
s && s.data.result === 0 ? (se.success({
|
|
3781
|
+
content: e || s.data.msg
|
|
3782
|
+
}), this.setLanguage(), this.initialData = $.cloneDeep(this.data.datas), t && this.closeModal(), this.mySaveData = []) : se.error({
|
|
3783
|
+
content: s.data.msg || "保存失败"
|
|
3781
3784
|
});
|
|
3782
3785
|
},
|
|
3783
3786
|
async saveNoEqual() {
|
|
3784
|
-
|
|
3787
|
+
$.isEmpty(this.mySaveData) || this.saveData({
|
|
3785
3788
|
msg: "已为您自动保存"
|
|
3786
3789
|
}, !1);
|
|
3787
3790
|
},
|
|
@@ -3796,21 +3799,21 @@ const vo = (e) => {
|
|
|
3796
3799
|
appCode: this.appCode,
|
|
3797
3800
|
searchBlur: this.searchText,
|
|
3798
3801
|
commaSeparatedKeys: this.translationKeys.toString(),
|
|
3799
|
-
commaSeparatedLangs:
|
|
3802
|
+
commaSeparatedLangs: $.map(this.languages, "code").toString(),
|
|
3800
3803
|
firstResult: 0,
|
|
3801
3804
|
pageSize: 99999
|
|
3802
3805
|
}, this.token);
|
|
3803
3806
|
if (t) {
|
|
3804
3807
|
let n = [];
|
|
3805
|
-
|
|
3806
|
-
const a =
|
|
3808
|
+
$.forEach(this.translationKeys, (s) => {
|
|
3809
|
+
const a = $.find(t.data.retVal.datas, {
|
|
3807
3810
|
dictKey: s,
|
|
3808
3811
|
page: this.name
|
|
3809
3812
|
});
|
|
3810
3813
|
if (a)
|
|
3811
3814
|
n.push(a);
|
|
3812
3815
|
else {
|
|
3813
|
-
const r =
|
|
3816
|
+
const r = $.find(t.data.retVal.datas, {
|
|
3814
3817
|
dictKey: s,
|
|
3815
3818
|
page: "common"
|
|
3816
3819
|
});
|
|
@@ -3825,7 +3828,7 @@ const vo = (e) => {
|
|
|
3825
3828
|
localhost: !0
|
|
3826
3829
|
});
|
|
3827
3830
|
}
|
|
3828
|
-
}), this.pageData =
|
|
3831
|
+
}), this.pageData = $.cloneDeep(n), this.initialData = $.cloneDeep(this.pageData), this.pageDataShow = n.slice((e - 1) * this.page.pageSize, e * this.page.pageSize), this.loading = !1;
|
|
3829
3832
|
}
|
|
3830
3833
|
},
|
|
3831
3834
|
async search(e, t) {
|
|
@@ -3833,12 +3836,12 @@ const vo = (e) => {
|
|
|
3833
3836
|
const n = await Xn({
|
|
3834
3837
|
appCode: this.appCode,
|
|
3835
3838
|
searchBlur: this.searchText,
|
|
3836
|
-
commaSeparatedLangs:
|
|
3839
|
+
commaSeparatedLangs: $.map(this.languages, "code").toString(),
|
|
3837
3840
|
firstResult: 0,
|
|
3838
3841
|
pageSize: 10,
|
|
3839
3842
|
...e
|
|
3840
3843
|
}, this.token);
|
|
3841
|
-
n && (this.initialData =
|
|
3844
|
+
n && (this.initialData = $.cloneDeep(n.data.retVal.datas), this.data = $.cloneDeep(n.data.retVal.datas), this.page = {
|
|
3842
3845
|
firstResult: n.data.retVal.firstResult,
|
|
3843
3846
|
pageSize: n.data.retVal.pageSize,
|
|
3844
3847
|
totalRows: n.data.retVal.totalRows
|
|
@@ -3983,7 +3986,7 @@ function Fo(e, t, n, s, a, r) {
|
|
|
3983
3986
|
_: 1
|
|
3984
3987
|
}, 8, ["modelValue", "onOnCancel"]);
|
|
3985
3988
|
}
|
|
3986
|
-
const wo = /* @__PURE__ */ Do(Co, [["render", Fo], ["__scopeId", "data-v-
|
|
3989
|
+
const wo = /* @__PURE__ */ Do(Co, [["render", Fo], ["__scopeId", "data-v-72726a48"]]);
|
|
3987
3990
|
function ks(e) {
|
|
3988
3991
|
const t = [], n = /(?:\$t|_ctx\.\$t)\s*\(\s*(['"])([^'"]+?)\1/gs;
|
|
3989
3992
|
if (e.template) {
|
|
@@ -4133,7 +4136,7 @@ class Ko {
|
|
|
4133
4136
|
token: this.token
|
|
4134
4137
|
});
|
|
4135
4138
|
if (s.data) {
|
|
4136
|
-
const a =
|
|
4139
|
+
const a = $.get(s.data, "retVal");
|
|
4137
4140
|
return ye.set("I18N_LANGUAGES", a), a;
|
|
4138
4141
|
}
|
|
4139
4142
|
}
|
|
@@ -4146,9 +4149,9 @@ class Ko {
|
|
|
4146
4149
|
token: this.token
|
|
4147
4150
|
});
|
|
4148
4151
|
if (a) {
|
|
4149
|
-
const r = vo(a), o =
|
|
4152
|
+
const r = vo(a), o = $.assign(
|
|
4150
4153
|
{},
|
|
4151
|
-
|
|
4154
|
+
$.get(this.messages, t),
|
|
4152
4155
|
r
|
|
4153
4156
|
);
|
|
4154
4157
|
this.i18n.global.setLocaleMessage(t, o);
|