@gui-chat-plugin/mulmocast 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/index-BKaPBxSE.cjs +1 -0
- package/dist/{index-Cr5DHTE4.js → index-BaFRLiBo.js} +40 -41
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/vue/Preview.vue.d.ts +2 -1
- package/dist/vue/Preview.vue.d.ts.map +1 -1
- package/dist/vue/View.vue.d.ts +2 -1
- package/dist/vue/View.vue.d.ts.map +1 -1
- package/dist/vue.cjs +1 -22
- package/dist/vue.js +534 -4157
- package/package.json +9 -9
- package/dist/index-Dq4GS0bB.cjs +0 -1
package/dist/vue.js
CHANGED
|
@@ -1,3608 +1,23 @@
|
|
|
1
|
-
import { v as
|
|
2
|
-
import { T as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
/*!
|
|
6
|
-
* shared v11.2.8
|
|
7
|
-
* (c) 2025 kazuya kawaguchi
|
|
8
|
-
* Released under the MIT License.
|
|
9
|
-
*/
|
|
10
|
-
function Se(e, t) {
|
|
11
|
-
typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
|
|
12
|
-
}
|
|
13
|
-
const cn = {};
|
|
14
|
-
function Xt(e) {
|
|
15
|
-
cn[e] || (cn[e] = !0, Se(e));
|
|
16
|
-
}
|
|
17
|
-
const Le = typeof window < "u";
|
|
18
|
-
let pe, He;
|
|
19
|
-
if (process.env.NODE_ENV !== "production") {
|
|
20
|
-
const e = Le && window.performance;
|
|
21
|
-
e && e.mark && e.measure && e.clearMarks && // @ts-ignore browser compat
|
|
22
|
-
e.clearMeasures && (pe = (t) => {
|
|
23
|
-
e.mark(t);
|
|
24
|
-
}, He = (t, n, a) => {
|
|
25
|
-
e.measure(t, n, a), e.clearMarks(n), e.clearMarks(a);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
const Ya = /\{([0-9a-zA-Z]+)\}/g;
|
|
29
|
-
function Lt(e, ...t) {
|
|
30
|
-
return t.length === 1 && $(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(Ya, (n, a) => t.hasOwnProperty(a) ? t[a] : "");
|
|
31
|
-
}
|
|
32
|
-
const Ae = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Ha = (e, t, n) => Ka({ l: e, k: t, s: n }), Ka = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), ne = (e) => typeof e == "number" && isFinite(e), Ba = (e) => Jt(e) === "[object Date]", et = (e) => Jt(e) === "[object RegExp]", Ot = (e) => F(e) && Object.keys(e).length === 0, re = Object.assign, Xa = Object.create, K = (e = null) => Xa(e);
|
|
33
|
-
let un;
|
|
34
|
-
const Ye = () => un || (un = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : K());
|
|
35
|
-
function fn(e) {
|
|
36
|
-
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/").replace(/=/g, "=");
|
|
37
|
-
}
|
|
38
|
-
function dn(e) {
|
|
39
|
-
return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
40
|
-
}
|
|
41
|
-
function Ja(e) {
|
|
42
|
-
return e = e.replace(/(\w+)\s*=\s*"([^"]*)"/g, (a, r, s) => `${r}="${dn(s)}"`), e = e.replace(/(\w+)\s*=\s*'([^']*)'/g, (a, r, s) => `${r}='${dn(s)}'`), /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e) && (process.env.NODE_ENV !== "production" && Se("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."), e = e.replace(/(\s+)(on)(\w+\s*=)/gi, "$1on$3")), [
|
|
43
|
-
// In href, src, action, formaction attributes
|
|
44
|
-
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
|
45
|
-
// In style attributes within url()
|
|
46
|
-
/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
|
|
47
|
-
].forEach((a) => {
|
|
48
|
-
e = e.replace(a, "$1javascript:");
|
|
49
|
-
}), e;
|
|
50
|
-
}
|
|
51
|
-
const Qa = Object.prototype.hasOwnProperty;
|
|
52
|
-
function Te(e, t) {
|
|
53
|
-
return Qa.call(e, t);
|
|
54
|
-
}
|
|
55
|
-
const z = Array.isArray, X = (e) => typeof e == "function", S = (e) => typeof e == "string", x = (e) => typeof e == "boolean", $ = (e) => e !== null && typeof e == "object", qa = (e) => $(e) && X(e.then) && X(e.catch), Zn = Object.prototype.toString, Jt = (e) => Zn.call(e), F = (e) => Jt(e) === "[object Object]", Za = (e) => e == null ? "" : z(e) || F(e) && e.toString === Zn ? JSON.stringify(e, null, 2) : String(e);
|
|
56
|
-
function Qt(e, t = "") {
|
|
57
|
-
return e.reduce((n, a, r) => r === 0 ? n + a : n + t + a, "");
|
|
58
|
-
}
|
|
59
|
-
const _n = 2;
|
|
60
|
-
function za(e, t = 0, n = e.length) {
|
|
61
|
-
const a = e.split(/\r?\n/);
|
|
62
|
-
let r = 0;
|
|
63
|
-
const s = [];
|
|
64
|
-
for (let o = 0; o < a.length; o++)
|
|
65
|
-
if (r += a[o].length + 1, r >= t) {
|
|
66
|
-
for (let l = o - _n; l <= o + _n || n > r; l++) {
|
|
67
|
-
if (l < 0 || l >= a.length)
|
|
68
|
-
continue;
|
|
69
|
-
const c = l + 1;
|
|
70
|
-
s.push(`${c}${" ".repeat(3 - String(c).length)}| ${a[l]}`);
|
|
71
|
-
const _ = a[l].length;
|
|
72
|
-
if (l === o) {
|
|
73
|
-
const b = t - (r - _) + 1, v = Math.max(1, n > r ? _ - b : n - t);
|
|
74
|
-
s.push(" | " + " ".repeat(b) + "^".repeat(v));
|
|
75
|
-
} else if (l > o) {
|
|
76
|
-
if (n > r) {
|
|
77
|
-
const b = Math.max(Math.min(n - r, _), 1);
|
|
78
|
-
s.push(" | " + "^".repeat(b));
|
|
79
|
-
}
|
|
80
|
-
r += _ + 1;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
return s.join(`
|
|
86
|
-
`);
|
|
87
|
-
}
|
|
88
|
-
function qt() {
|
|
89
|
-
const e = /* @__PURE__ */ new Map();
|
|
90
|
-
return {
|
|
91
|
-
events: e,
|
|
92
|
-
on(n, a) {
|
|
93
|
-
const r = e.get(n);
|
|
94
|
-
r && r.push(a) || e.set(n, [a]);
|
|
95
|
-
},
|
|
96
|
-
off(n, a) {
|
|
97
|
-
const r = e.get(n);
|
|
98
|
-
r && r.splice(r.indexOf(a) >>> 0, 1);
|
|
99
|
-
},
|
|
100
|
-
emit(n, a) {
|
|
101
|
-
(e.get(n) || []).slice().map((r) => r(a)), (e.get("*") || []).slice().map((r) => r(n, a));
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
const Et = (e) => !$(e) || z(e);
|
|
106
|
-
function Nt(e, t) {
|
|
107
|
-
if (Et(e) || Et(t))
|
|
108
|
-
throw new Error("Invalid value");
|
|
109
|
-
const n = [{ src: e, des: t }];
|
|
110
|
-
for (; n.length; ) {
|
|
111
|
-
const { src: a, des: r } = n.pop();
|
|
112
|
-
Object.keys(a).forEach((s) => {
|
|
113
|
-
s !== "__proto__" && ($(a[s]) && !$(r[s]) && (r[s] = Array.isArray(a[s]) ? [] : K()), Et(r[s]) || Et(a[s]) ? r[s] = a[s] : n.push({ src: a[s], des: r[s] }));
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
/*!
|
|
118
|
-
* message-compiler v11.2.8
|
|
119
|
-
* (c) 2025 kazuya kawaguchi
|
|
120
|
-
* Released under the MIT License.
|
|
121
|
-
*/
|
|
122
|
-
function er(e, t, n) {
|
|
123
|
-
return { line: e, column: t, offset: n };
|
|
124
|
-
}
|
|
125
|
-
function Ft(e, t, n) {
|
|
126
|
-
return { start: e, end: t };
|
|
127
|
-
}
|
|
128
|
-
const w = {
|
|
129
|
-
// tokenizer error codes
|
|
130
|
-
EXPECTED_TOKEN: 1,
|
|
131
|
-
INVALID_TOKEN_IN_PLACEHOLDER: 2,
|
|
132
|
-
UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
|
|
133
|
-
UNKNOWN_ESCAPE_SEQUENCE: 4,
|
|
134
|
-
INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
|
|
135
|
-
UNBALANCED_CLOSING_BRACE: 6,
|
|
136
|
-
UNTERMINATED_CLOSING_BRACE: 7,
|
|
137
|
-
EMPTY_PLACEHOLDER: 8,
|
|
138
|
-
NOT_ALLOW_NEST_PLACEHOLDER: 9,
|
|
139
|
-
INVALID_LINKED_FORMAT: 10,
|
|
140
|
-
// parser error codes
|
|
141
|
-
MUST_HAVE_MESSAGES_IN_PLURAL: 11,
|
|
142
|
-
UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
|
|
143
|
-
UNEXPECTED_EMPTY_LINKED_KEY: 13,
|
|
144
|
-
UNEXPECTED_LEXICAL_ANALYSIS: 14,
|
|
145
|
-
// generator error codes
|
|
146
|
-
UNHANDLED_CODEGEN_NODE_TYPE: 15,
|
|
147
|
-
// minifier error codes
|
|
148
|
-
UNHANDLED_MINIFIER_NODE_TYPE: 16
|
|
149
|
-
}, tr = 17, nr = {
|
|
150
|
-
// tokenizer error messages
|
|
151
|
-
[w.EXPECTED_TOKEN]: "Expected token: '{0}'",
|
|
152
|
-
[w.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
|
|
153
|
-
[w.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder",
|
|
154
|
-
[w.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}",
|
|
155
|
-
[w.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}",
|
|
156
|
-
[w.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace",
|
|
157
|
-
[w.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace",
|
|
158
|
-
[w.EMPTY_PLACEHOLDER]: "Empty placeholder",
|
|
159
|
-
[w.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder",
|
|
160
|
-
[w.INVALID_LINKED_FORMAT]: "Invalid linked format",
|
|
161
|
-
// parser error messages
|
|
162
|
-
[w.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages",
|
|
163
|
-
[w.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier",
|
|
164
|
-
[w.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key",
|
|
165
|
-
[w.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'",
|
|
166
|
-
// generator error messages
|
|
167
|
-
[w.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'",
|
|
168
|
-
// minimizer error messages
|
|
169
|
-
[w.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
|
|
170
|
-
};
|
|
171
|
-
function at(e, t, n = {}) {
|
|
172
|
-
const { domain: a, messages: r, args: s } = n, o = process.env.NODE_ENV !== "production" ? Lt((r || nr)[e] || "", ...s || []) : e, l = new SyntaxError(String(o));
|
|
173
|
-
return l.code = e, t && (l.location = t), l.domain = a, l;
|
|
174
|
-
}
|
|
175
|
-
function ar(e) {
|
|
176
|
-
throw e;
|
|
177
|
-
}
|
|
178
|
-
const rr = /<\/?[\w\s="/.':;#-\/]+>/, sr = (e) => rr.test(e), Ie = " ", or = "\r", ue = `
|
|
179
|
-
`, lr = "\u2028", ir = "\u2029";
|
|
180
|
-
function cr(e) {
|
|
181
|
-
const t = e;
|
|
182
|
-
let n = 0, a = 1, r = 1, s = 0;
|
|
183
|
-
const o = (N) => t[N] === or && t[N + 1] === ue, l = (N) => t[N] === ue, c = (N) => t[N] === ir, _ = (N) => t[N] === lr, b = (N) => o(N) || l(N) || c(N) || _(N), v = () => n, p = () => a, P = () => r, R = () => s, I = (N) => o(N) || c(N) || _(N) ? ue : t[N], L = () => I(n), f = () => I(n + s);
|
|
184
|
-
function d() {
|
|
185
|
-
return s = 0, b(n) && (a++, r = 0), o(n) && n++, n++, r++, t[n];
|
|
186
|
-
}
|
|
187
|
-
function g() {
|
|
188
|
-
return o(n + s) && s++, s++, t[n + s];
|
|
189
|
-
}
|
|
190
|
-
function m() {
|
|
191
|
-
n = 0, a = 1, r = 1, s = 0;
|
|
192
|
-
}
|
|
193
|
-
function O(N = 0) {
|
|
194
|
-
s = N;
|
|
195
|
-
}
|
|
196
|
-
function y() {
|
|
197
|
-
const N = n + s;
|
|
198
|
-
for (; N !== n; )
|
|
199
|
-
d();
|
|
200
|
-
s = 0;
|
|
201
|
-
}
|
|
202
|
-
return {
|
|
203
|
-
index: v,
|
|
204
|
-
line: p,
|
|
205
|
-
column: P,
|
|
206
|
-
peekOffset: R,
|
|
207
|
-
charAt: I,
|
|
208
|
-
currentChar: L,
|
|
209
|
-
currentPeek: f,
|
|
210
|
-
next: d,
|
|
211
|
-
peek: g,
|
|
212
|
-
reset: m,
|
|
213
|
-
resetPeek: O,
|
|
214
|
-
skipToPeek: y
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
const Ce = void 0, ur = ".", mn = "'", fr = "tokenizer";
|
|
218
|
-
function dr(e, t = {}) {
|
|
219
|
-
const n = t.location !== !1, a = cr(e), r = () => a.index(), s = () => er(a.line(), a.column(), a.index()), o = s(), l = r(), c = {
|
|
220
|
-
currentType: 13,
|
|
221
|
-
offset: l,
|
|
222
|
-
startLoc: o,
|
|
223
|
-
endLoc: o,
|
|
224
|
-
lastType: 13,
|
|
225
|
-
lastOffset: l,
|
|
226
|
-
lastStartLoc: o,
|
|
227
|
-
lastEndLoc: o,
|
|
228
|
-
braceNest: 0,
|
|
229
|
-
inLinked: !1,
|
|
230
|
-
text: ""
|
|
231
|
-
}, _ = () => c, { onError: b } = t;
|
|
232
|
-
function v(i, u, h, ...k) {
|
|
233
|
-
const Z = _();
|
|
234
|
-
if (u.column += h, u.offset += h, b) {
|
|
235
|
-
const ee = n ? Ft(Z.startLoc, u) : null, G = at(i, ee, {
|
|
236
|
-
domain: fr,
|
|
237
|
-
args: k
|
|
238
|
-
});
|
|
239
|
-
b(G);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
function p(i, u, h) {
|
|
243
|
-
i.endLoc = s(), i.currentType = u;
|
|
244
|
-
const k = { type: u };
|
|
245
|
-
return n && (k.loc = Ft(i.startLoc, i.endLoc)), h != null && (k.value = h), k;
|
|
246
|
-
}
|
|
247
|
-
const P = (i) => p(
|
|
248
|
-
i,
|
|
249
|
-
13
|
|
250
|
-
/* TokenTypes.EOF */
|
|
251
|
-
);
|
|
252
|
-
function R(i, u) {
|
|
253
|
-
return i.currentChar() === u ? (i.next(), u) : (v(w.EXPECTED_TOKEN, s(), 0, u), "");
|
|
254
|
-
}
|
|
255
|
-
function I(i) {
|
|
256
|
-
let u = "";
|
|
257
|
-
for (; i.currentPeek() === Ie || i.currentPeek() === ue; )
|
|
258
|
-
u += i.currentPeek(), i.peek();
|
|
259
|
-
return u;
|
|
260
|
-
}
|
|
261
|
-
function L(i) {
|
|
262
|
-
const u = I(i);
|
|
263
|
-
return i.skipToPeek(), u;
|
|
264
|
-
}
|
|
265
|
-
function f(i) {
|
|
266
|
-
if (i === Ce)
|
|
267
|
-
return !1;
|
|
268
|
-
const u = i.charCodeAt(0);
|
|
269
|
-
return u >= 97 && u <= 122 || // a-z
|
|
270
|
-
u >= 65 && u <= 90 || // A-Z
|
|
271
|
-
u === 95;
|
|
272
|
-
}
|
|
273
|
-
function d(i) {
|
|
274
|
-
if (i === Ce)
|
|
275
|
-
return !1;
|
|
276
|
-
const u = i.charCodeAt(0);
|
|
277
|
-
return u >= 48 && u <= 57;
|
|
278
|
-
}
|
|
279
|
-
function g(i, u) {
|
|
280
|
-
const { currentType: h } = u;
|
|
281
|
-
if (h !== 2)
|
|
282
|
-
return !1;
|
|
283
|
-
I(i);
|
|
284
|
-
const k = f(i.currentPeek());
|
|
285
|
-
return i.resetPeek(), k;
|
|
286
|
-
}
|
|
287
|
-
function m(i, u) {
|
|
288
|
-
const { currentType: h } = u;
|
|
289
|
-
if (h !== 2)
|
|
290
|
-
return !1;
|
|
291
|
-
I(i);
|
|
292
|
-
const k = i.currentPeek() === "-" ? i.peek() : i.currentPeek(), Z = d(k);
|
|
293
|
-
return i.resetPeek(), Z;
|
|
294
|
-
}
|
|
295
|
-
function O(i, u) {
|
|
296
|
-
const { currentType: h } = u;
|
|
297
|
-
if (h !== 2)
|
|
298
|
-
return !1;
|
|
299
|
-
I(i);
|
|
300
|
-
const k = i.currentPeek() === mn;
|
|
301
|
-
return i.resetPeek(), k;
|
|
302
|
-
}
|
|
303
|
-
function y(i, u) {
|
|
304
|
-
const { currentType: h } = u;
|
|
305
|
-
if (h !== 7)
|
|
306
|
-
return !1;
|
|
307
|
-
I(i);
|
|
308
|
-
const k = i.currentPeek() === ".";
|
|
309
|
-
return i.resetPeek(), k;
|
|
310
|
-
}
|
|
311
|
-
function N(i, u) {
|
|
312
|
-
const { currentType: h } = u;
|
|
313
|
-
if (h !== 8)
|
|
314
|
-
return !1;
|
|
315
|
-
I(i);
|
|
316
|
-
const k = f(i.currentPeek());
|
|
317
|
-
return i.resetPeek(), k;
|
|
318
|
-
}
|
|
319
|
-
function M(i, u) {
|
|
320
|
-
const { currentType: h } = u;
|
|
321
|
-
if (!(h === 7 || h === 11))
|
|
322
|
-
return !1;
|
|
323
|
-
I(i);
|
|
324
|
-
const k = i.currentPeek() === ":";
|
|
325
|
-
return i.resetPeek(), k;
|
|
326
|
-
}
|
|
327
|
-
function V(i, u) {
|
|
328
|
-
const { currentType: h } = u;
|
|
329
|
-
if (h !== 9)
|
|
330
|
-
return !1;
|
|
331
|
-
const k = () => {
|
|
332
|
-
const ee = i.currentPeek();
|
|
333
|
-
return ee === "{" ? f(i.peek()) : ee === "@" || ee === "|" || ee === ":" || ee === "." || ee === Ie || !ee ? !1 : ee === ue ? (i.peek(), k()) : ce(i, !1);
|
|
334
|
-
}, Z = k();
|
|
335
|
-
return i.resetPeek(), Z;
|
|
336
|
-
}
|
|
337
|
-
function q(i) {
|
|
338
|
-
I(i);
|
|
339
|
-
const u = i.currentPeek() === "|";
|
|
340
|
-
return i.resetPeek(), u;
|
|
341
|
-
}
|
|
342
|
-
function ce(i, u = !0) {
|
|
343
|
-
const h = (Z = !1, ee = "") => {
|
|
344
|
-
const G = i.currentPeek();
|
|
345
|
-
return G === "{" || G === "@" || !G ? Z : G === "|" ? !(ee === Ie || ee === ue) : G === Ie ? (i.peek(), h(!0, Ie)) : G === ue ? (i.peek(), h(!0, ue)) : !0;
|
|
346
|
-
}, k = h();
|
|
347
|
-
return u && i.resetPeek(), k;
|
|
348
|
-
}
|
|
349
|
-
function D(i, u) {
|
|
350
|
-
const h = i.currentChar();
|
|
351
|
-
return h === Ce ? Ce : u(h) ? (i.next(), h) : null;
|
|
352
|
-
}
|
|
353
|
-
function W(i) {
|
|
354
|
-
const u = i.charCodeAt(0);
|
|
355
|
-
return u >= 97 && u <= 122 || // a-z
|
|
356
|
-
u >= 65 && u <= 90 || // A-Z
|
|
357
|
-
u >= 48 && u <= 57 || // 0-9
|
|
358
|
-
u === 95 || // _
|
|
359
|
-
u === 36;
|
|
360
|
-
}
|
|
361
|
-
function de(i) {
|
|
362
|
-
return D(i, W);
|
|
363
|
-
}
|
|
364
|
-
function Pe(i) {
|
|
365
|
-
const u = i.charCodeAt(0);
|
|
366
|
-
return u >= 97 && u <= 122 || // a-z
|
|
367
|
-
u >= 65 && u <= 90 || // A-Z
|
|
368
|
-
u >= 48 && u <= 57 || // 0-9
|
|
369
|
-
u === 95 || // _
|
|
370
|
-
u === 36 || // $
|
|
371
|
-
u === 45;
|
|
372
|
-
}
|
|
373
|
-
function C(i) {
|
|
374
|
-
return D(i, Pe);
|
|
375
|
-
}
|
|
376
|
-
function A(i) {
|
|
377
|
-
const u = i.charCodeAt(0);
|
|
378
|
-
return u >= 48 && u <= 57;
|
|
379
|
-
}
|
|
380
|
-
function U(i) {
|
|
381
|
-
return D(i, A);
|
|
382
|
-
}
|
|
383
|
-
function ie(i) {
|
|
384
|
-
const u = i.charCodeAt(0);
|
|
385
|
-
return u >= 48 && u <= 57 || // 0-9
|
|
386
|
-
u >= 65 && u <= 70 || // A-F
|
|
387
|
-
u >= 97 && u <= 102;
|
|
388
|
-
}
|
|
389
|
-
function se(i) {
|
|
390
|
-
return D(i, ie);
|
|
391
|
-
}
|
|
392
|
-
function oe(i) {
|
|
393
|
-
let u = "", h = "";
|
|
394
|
-
for (; u = U(i); )
|
|
395
|
-
h += u;
|
|
396
|
-
return h;
|
|
397
|
-
}
|
|
398
|
-
function ae(i) {
|
|
399
|
-
let u = "";
|
|
400
|
-
for (; ; ) {
|
|
401
|
-
const h = i.currentChar();
|
|
402
|
-
if (h === "{" || h === "}" || h === "@" || h === "|" || !h)
|
|
403
|
-
break;
|
|
404
|
-
if (h === Ie || h === ue)
|
|
405
|
-
if (ce(i))
|
|
406
|
-
u += h, i.next();
|
|
407
|
-
else {
|
|
408
|
-
if (q(i))
|
|
409
|
-
break;
|
|
410
|
-
u += h, i.next();
|
|
411
|
-
}
|
|
412
|
-
else
|
|
413
|
-
u += h, i.next();
|
|
414
|
-
}
|
|
415
|
-
return u;
|
|
416
|
-
}
|
|
417
|
-
function _e(i) {
|
|
418
|
-
L(i);
|
|
419
|
-
let u = "", h = "";
|
|
420
|
-
for (; u = C(i); )
|
|
421
|
-
h += u;
|
|
422
|
-
const k = i.currentChar();
|
|
423
|
-
if (k && k !== "}" && k !== Ce && k !== Ie && k !== ue && k !== " ") {
|
|
424
|
-
const Z = Oe(i);
|
|
425
|
-
return v(w.INVALID_TOKEN_IN_PLACEHOLDER, s(), 0, h + Z), h + Z;
|
|
426
|
-
}
|
|
427
|
-
return i.currentChar() === Ce && v(w.UNTERMINATED_CLOSING_BRACE, s(), 0), h;
|
|
428
|
-
}
|
|
429
|
-
function De(i) {
|
|
430
|
-
L(i);
|
|
431
|
-
let u = "";
|
|
432
|
-
return i.currentChar() === "-" ? (i.next(), u += `-${oe(i)}`) : u += oe(i), i.currentChar() === Ce && v(w.UNTERMINATED_CLOSING_BRACE, s(), 0), u;
|
|
433
|
-
}
|
|
434
|
-
function Xe(i) {
|
|
435
|
-
return i !== mn && i !== ue;
|
|
436
|
-
}
|
|
437
|
-
function he(i) {
|
|
438
|
-
L(i), R(i, "'");
|
|
439
|
-
let u = "", h = "";
|
|
440
|
-
for (; u = D(i, Xe); )
|
|
441
|
-
u === "\\" ? h += we(i) : h += u;
|
|
442
|
-
const k = i.currentChar();
|
|
443
|
-
return k === ue || k === Ce ? (v(w.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, s(), 0), k === ue && (i.next(), R(i, "'")), h) : (R(i, "'"), h);
|
|
444
|
-
}
|
|
445
|
-
function we(i) {
|
|
446
|
-
const u = i.currentChar();
|
|
447
|
-
switch (u) {
|
|
448
|
-
case "\\":
|
|
449
|
-
case "'":
|
|
450
|
-
return i.next(), `\\${u}`;
|
|
451
|
-
case "u":
|
|
452
|
-
return Ve(i, u, 4);
|
|
453
|
-
case "U":
|
|
454
|
-
return Ve(i, u, 6);
|
|
455
|
-
default:
|
|
456
|
-
return v(w.UNKNOWN_ESCAPE_SEQUENCE, s(), 0, u), "";
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
function Ve(i, u, h) {
|
|
460
|
-
R(i, u);
|
|
461
|
-
let k = "";
|
|
462
|
-
for (let Z = 0; Z < h; Z++) {
|
|
463
|
-
const ee = se(i);
|
|
464
|
-
if (!ee) {
|
|
465
|
-
v(w.INVALID_UNICODE_ESCAPE_SEQUENCE, s(), 0, `\\${u}${k}${i.currentChar()}`);
|
|
466
|
-
break;
|
|
467
|
-
}
|
|
468
|
-
k += ee;
|
|
469
|
-
}
|
|
470
|
-
return `\\${u}${k}`;
|
|
471
|
-
}
|
|
472
|
-
function Je(i) {
|
|
473
|
-
return i !== "{" && i !== "}" && i !== Ie && i !== ue;
|
|
474
|
-
}
|
|
475
|
-
function Oe(i) {
|
|
476
|
-
L(i);
|
|
477
|
-
let u = "", h = "";
|
|
478
|
-
for (; u = D(i, Je); )
|
|
479
|
-
h += u;
|
|
480
|
-
return h;
|
|
481
|
-
}
|
|
482
|
-
function At(i) {
|
|
483
|
-
let u = "", h = "";
|
|
484
|
-
for (; u = de(i); )
|
|
485
|
-
h += u;
|
|
486
|
-
return h;
|
|
487
|
-
}
|
|
488
|
-
function Pt(i) {
|
|
489
|
-
const u = (h) => {
|
|
490
|
-
const k = i.currentChar();
|
|
491
|
-
return k === "{" || k === "@" || k === "|" || k === "(" || k === ")" || !k || k === Ie ? h : (h += k, i.next(), u(h));
|
|
492
|
-
};
|
|
493
|
-
return u("");
|
|
494
|
-
}
|
|
495
|
-
function rt(i) {
|
|
496
|
-
L(i);
|
|
497
|
-
const u = R(
|
|
498
|
-
i,
|
|
499
|
-
"|"
|
|
500
|
-
/* TokenChars.Pipe */
|
|
501
|
-
);
|
|
502
|
-
return L(i), u;
|
|
503
|
-
}
|
|
504
|
-
function st(i, u) {
|
|
505
|
-
let h = null;
|
|
506
|
-
switch (i.currentChar()) {
|
|
507
|
-
case "{":
|
|
508
|
-
return u.braceNest >= 1 && v(w.NOT_ALLOW_NEST_PLACEHOLDER, s(), 0), i.next(), h = p(
|
|
509
|
-
u,
|
|
510
|
-
2,
|
|
511
|
-
"{"
|
|
512
|
-
/* TokenChars.BraceLeft */
|
|
513
|
-
), L(i), u.braceNest++, h;
|
|
514
|
-
case "}":
|
|
515
|
-
return u.braceNest > 0 && u.currentType === 2 && v(w.EMPTY_PLACEHOLDER, s(), 0), i.next(), h = p(
|
|
516
|
-
u,
|
|
517
|
-
3,
|
|
518
|
-
"}"
|
|
519
|
-
/* TokenChars.BraceRight */
|
|
520
|
-
), u.braceNest--, u.braceNest > 0 && L(i), u.inLinked && u.braceNest === 0 && (u.inLinked = !1), h;
|
|
521
|
-
case "@":
|
|
522
|
-
return u.braceNest > 0 && v(w.UNTERMINATED_CLOSING_BRACE, s(), 0), h = $e(i, u) || P(u), u.braceNest = 0, h;
|
|
523
|
-
default: {
|
|
524
|
-
let Z = !0, ee = !0, G = !0;
|
|
525
|
-
if (q(i))
|
|
526
|
-
return u.braceNest > 0 && v(w.UNTERMINATED_CLOSING_BRACE, s(), 0), h = p(u, 1, rt(i)), u.braceNest = 0, u.inLinked = !1, h;
|
|
527
|
-
if (u.braceNest > 0 && (u.currentType === 4 || u.currentType === 5 || u.currentType === 6))
|
|
528
|
-
return v(w.UNTERMINATED_CLOSING_BRACE, s(), 0), u.braceNest = 0, ot(i, u);
|
|
529
|
-
if (Z = g(i, u))
|
|
530
|
-
return h = p(u, 4, _e(i)), L(i), h;
|
|
531
|
-
if (ee = m(i, u))
|
|
532
|
-
return h = p(u, 5, De(i)), L(i), h;
|
|
533
|
-
if (G = O(i, u))
|
|
534
|
-
return h = p(u, 6, he(i)), L(i), h;
|
|
535
|
-
if (!Z && !ee && !G)
|
|
536
|
-
return h = p(u, 12, Oe(i)), v(w.INVALID_TOKEN_IN_PLACEHOLDER, s(), 0, h.value), L(i), h;
|
|
537
|
-
break;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
return h;
|
|
541
|
-
}
|
|
542
|
-
function $e(i, u) {
|
|
543
|
-
const { currentType: h } = u;
|
|
544
|
-
let k = null;
|
|
545
|
-
const Z = i.currentChar();
|
|
546
|
-
switch ((h === 7 || h === 8 || h === 11 || h === 9) && (Z === ue || Z === Ie) && v(w.INVALID_LINKED_FORMAT, s(), 0), Z) {
|
|
547
|
-
case "@":
|
|
548
|
-
return i.next(), k = p(
|
|
549
|
-
u,
|
|
550
|
-
7,
|
|
551
|
-
"@"
|
|
552
|
-
/* TokenChars.LinkedAlias */
|
|
553
|
-
), u.inLinked = !0, k;
|
|
554
|
-
case ".":
|
|
555
|
-
return L(i), i.next(), p(
|
|
556
|
-
u,
|
|
557
|
-
8,
|
|
558
|
-
"."
|
|
559
|
-
/* TokenChars.LinkedDot */
|
|
560
|
-
);
|
|
561
|
-
case ":":
|
|
562
|
-
return L(i), i.next(), p(
|
|
563
|
-
u,
|
|
564
|
-
9,
|
|
565
|
-
":"
|
|
566
|
-
/* TokenChars.LinkedDelimiter */
|
|
567
|
-
);
|
|
568
|
-
default:
|
|
569
|
-
return q(i) ? (k = p(u, 1, rt(i)), u.braceNest = 0, u.inLinked = !1, k) : y(i, u) || M(i, u) ? (L(i), $e(i, u)) : N(i, u) ? (L(i), p(u, 11, At(i))) : V(i, u) ? (L(i), Z === "{" ? st(i, u) || k : p(u, 10, Pt(i))) : (h === 7 && v(w.INVALID_LINKED_FORMAT, s(), 0), u.braceNest = 0, u.inLinked = !1, ot(i, u));
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
function ot(i, u) {
|
|
573
|
-
let h = {
|
|
574
|
-
type: 13
|
|
575
|
-
/* TokenTypes.EOF */
|
|
576
|
-
};
|
|
577
|
-
if (u.braceNest > 0)
|
|
578
|
-
return st(i, u) || P(u);
|
|
579
|
-
if (u.inLinked)
|
|
580
|
-
return $e(i, u) || P(u);
|
|
581
|
-
switch (i.currentChar()) {
|
|
582
|
-
case "{":
|
|
583
|
-
return st(i, u) || P(u);
|
|
584
|
-
case "}":
|
|
585
|
-
return v(w.UNBALANCED_CLOSING_BRACE, s(), 0), i.next(), p(
|
|
586
|
-
u,
|
|
587
|
-
3,
|
|
588
|
-
"}"
|
|
589
|
-
/* TokenChars.BraceRight */
|
|
590
|
-
);
|
|
591
|
-
case "@":
|
|
592
|
-
return $e(i, u) || P(u);
|
|
593
|
-
default: {
|
|
594
|
-
if (q(i))
|
|
595
|
-
return h = p(u, 1, rt(i)), u.braceNest = 0, u.inLinked = !1, h;
|
|
596
|
-
if (ce(i))
|
|
597
|
-
return p(u, 0, ae(i));
|
|
598
|
-
break;
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
return h;
|
|
602
|
-
}
|
|
603
|
-
function Ct() {
|
|
604
|
-
const { currentType: i, offset: u, startLoc: h, endLoc: k } = c;
|
|
605
|
-
return c.lastType = i, c.lastOffset = u, c.lastStartLoc = h, c.lastEndLoc = k, c.offset = r(), c.startLoc = s(), a.currentChar() === Ce ? p(
|
|
606
|
-
c,
|
|
607
|
-
13
|
|
608
|
-
/* TokenTypes.EOF */
|
|
609
|
-
) : ot(a, c);
|
|
610
|
-
}
|
|
611
|
-
return {
|
|
612
|
-
nextToken: Ct,
|
|
613
|
-
currentOffset: r,
|
|
614
|
-
currentPosition: s,
|
|
615
|
-
context: _
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
const _r = "parser", mr = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
|
|
619
|
-
function Er(e, t, n) {
|
|
620
|
-
switch (e) {
|
|
621
|
-
case "\\\\":
|
|
622
|
-
return "\\";
|
|
623
|
-
// eslint-disable-next-line no-useless-escape
|
|
624
|
-
case "\\'":
|
|
625
|
-
return "'";
|
|
626
|
-
default: {
|
|
627
|
-
const a = parseInt(t || n, 16);
|
|
628
|
-
return a <= 55295 || a >= 57344 ? String.fromCodePoint(a) : "�";
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
function pr(e = {}) {
|
|
633
|
-
const t = e.location !== !1, { onError: n } = e;
|
|
634
|
-
function a(f, d, g, m, ...O) {
|
|
635
|
-
const y = f.currentPosition();
|
|
636
|
-
if (y.offset += m, y.column += m, n) {
|
|
637
|
-
const N = t ? Ft(g, y) : null, M = at(d, N, {
|
|
638
|
-
domain: _r,
|
|
639
|
-
args: O
|
|
640
|
-
});
|
|
641
|
-
n(M);
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
function r(f, d, g) {
|
|
645
|
-
const m = { type: f };
|
|
646
|
-
return t && (m.start = d, m.end = d, m.loc = { start: g, end: g }), m;
|
|
647
|
-
}
|
|
648
|
-
function s(f, d, g, m) {
|
|
649
|
-
t && (f.end = d, f.loc && (f.loc.end = g));
|
|
650
|
-
}
|
|
651
|
-
function o(f, d) {
|
|
652
|
-
const g = f.context(), m = r(3, g.offset, g.startLoc);
|
|
653
|
-
return m.value = d, s(m, f.currentOffset(), f.currentPosition()), m;
|
|
654
|
-
}
|
|
655
|
-
function l(f, d) {
|
|
656
|
-
const g = f.context(), { lastOffset: m, lastStartLoc: O } = g, y = r(5, m, O);
|
|
657
|
-
return y.index = parseInt(d, 10), f.nextToken(), s(y, f.currentOffset(), f.currentPosition()), y;
|
|
658
|
-
}
|
|
659
|
-
function c(f, d) {
|
|
660
|
-
const g = f.context(), { lastOffset: m, lastStartLoc: O } = g, y = r(4, m, O);
|
|
661
|
-
return y.key = d, f.nextToken(), s(y, f.currentOffset(), f.currentPosition()), y;
|
|
662
|
-
}
|
|
663
|
-
function _(f, d) {
|
|
664
|
-
const g = f.context(), { lastOffset: m, lastStartLoc: O } = g, y = r(9, m, O);
|
|
665
|
-
return y.value = d.replace(mr, Er), f.nextToken(), s(y, f.currentOffset(), f.currentPosition()), y;
|
|
666
|
-
}
|
|
667
|
-
function b(f) {
|
|
668
|
-
const d = f.nextToken(), g = f.context(), { lastOffset: m, lastStartLoc: O } = g, y = r(8, m, O);
|
|
669
|
-
return d.type !== 11 ? (a(f, w.UNEXPECTED_EMPTY_LINKED_MODIFIER, g.lastStartLoc, 0), y.value = "", s(y, m, O), {
|
|
670
|
-
nextConsumeToken: d,
|
|
671
|
-
node: y
|
|
672
|
-
}) : (d.value == null && a(f, w.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, ye(d)), y.value = d.value || "", s(y, f.currentOffset(), f.currentPosition()), {
|
|
673
|
-
node: y
|
|
674
|
-
});
|
|
675
|
-
}
|
|
676
|
-
function v(f, d) {
|
|
677
|
-
const g = f.context(), m = r(7, g.offset, g.startLoc);
|
|
678
|
-
return m.value = d, s(m, f.currentOffset(), f.currentPosition()), m;
|
|
679
|
-
}
|
|
680
|
-
function p(f) {
|
|
681
|
-
const d = f.context(), g = r(6, d.offset, d.startLoc);
|
|
682
|
-
let m = f.nextToken();
|
|
683
|
-
if (m.type === 8) {
|
|
684
|
-
const O = b(f);
|
|
685
|
-
g.modifier = O.node, m = O.nextConsumeToken || f.nextToken();
|
|
686
|
-
}
|
|
687
|
-
switch (m.type !== 9 && a(f, w.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ye(m)), m = f.nextToken(), m.type === 2 && (m = f.nextToken()), m.type) {
|
|
688
|
-
case 10:
|
|
689
|
-
m.value == null && a(f, w.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ye(m)), g.key = v(f, m.value || "");
|
|
690
|
-
break;
|
|
691
|
-
case 4:
|
|
692
|
-
m.value == null && a(f, w.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ye(m)), g.key = c(f, m.value || "");
|
|
693
|
-
break;
|
|
694
|
-
case 5:
|
|
695
|
-
m.value == null && a(f, w.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ye(m)), g.key = l(f, m.value || "");
|
|
696
|
-
break;
|
|
697
|
-
case 6:
|
|
698
|
-
m.value == null && a(f, w.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ye(m)), g.key = _(f, m.value || "");
|
|
699
|
-
break;
|
|
700
|
-
default: {
|
|
701
|
-
a(f, w.UNEXPECTED_EMPTY_LINKED_KEY, d.lastStartLoc, 0);
|
|
702
|
-
const O = f.context(), y = r(7, O.offset, O.startLoc);
|
|
703
|
-
return y.value = "", s(y, O.offset, O.startLoc), g.key = y, s(g, O.offset, O.startLoc), {
|
|
704
|
-
nextConsumeToken: m,
|
|
705
|
-
node: g
|
|
706
|
-
};
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
return s(g, f.currentOffset(), f.currentPosition()), {
|
|
710
|
-
node: g
|
|
711
|
-
};
|
|
712
|
-
}
|
|
713
|
-
function P(f) {
|
|
714
|
-
const d = f.context(), g = d.currentType === 1 ? f.currentOffset() : d.offset, m = d.currentType === 1 ? d.endLoc : d.startLoc, O = r(2, g, m);
|
|
715
|
-
O.items = [];
|
|
716
|
-
let y = null;
|
|
717
|
-
do {
|
|
718
|
-
const V = y || f.nextToken();
|
|
719
|
-
switch (y = null, V.type) {
|
|
720
|
-
case 0:
|
|
721
|
-
V.value == null && a(f, w.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ye(V)), O.items.push(o(f, V.value || ""));
|
|
722
|
-
break;
|
|
723
|
-
case 5:
|
|
724
|
-
V.value == null && a(f, w.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ye(V)), O.items.push(l(f, V.value || ""));
|
|
725
|
-
break;
|
|
726
|
-
case 4:
|
|
727
|
-
V.value == null && a(f, w.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ye(V)), O.items.push(c(f, V.value || ""));
|
|
728
|
-
break;
|
|
729
|
-
case 6:
|
|
730
|
-
V.value == null && a(f, w.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ye(V)), O.items.push(_(f, V.value || ""));
|
|
731
|
-
break;
|
|
732
|
-
case 7: {
|
|
733
|
-
const q = p(f);
|
|
734
|
-
O.items.push(q.node), y = q.nextConsumeToken || null;
|
|
735
|
-
break;
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
} while (d.currentType !== 13 && d.currentType !== 1);
|
|
739
|
-
const N = d.currentType === 1 ? d.lastOffset : f.currentOffset(), M = d.currentType === 1 ? d.lastEndLoc : f.currentPosition();
|
|
740
|
-
return s(O, N, M), O;
|
|
741
|
-
}
|
|
742
|
-
function R(f, d, g, m) {
|
|
743
|
-
const O = f.context();
|
|
744
|
-
let y = m.items.length === 0;
|
|
745
|
-
const N = r(1, d, g);
|
|
746
|
-
N.cases = [], N.cases.push(m);
|
|
747
|
-
do {
|
|
748
|
-
const M = P(f);
|
|
749
|
-
y || (y = M.items.length === 0), N.cases.push(M);
|
|
750
|
-
} while (O.currentType !== 13);
|
|
751
|
-
return y && a(f, w.MUST_HAVE_MESSAGES_IN_PLURAL, g, 0), s(N, f.currentOffset(), f.currentPosition()), N;
|
|
752
|
-
}
|
|
753
|
-
function I(f) {
|
|
754
|
-
const d = f.context(), { offset: g, startLoc: m } = d, O = P(f);
|
|
755
|
-
return d.currentType === 13 ? O : R(f, g, m, O);
|
|
756
|
-
}
|
|
757
|
-
function L(f) {
|
|
758
|
-
const d = dr(f, re({}, e)), g = d.context(), m = r(0, g.offset, g.startLoc);
|
|
759
|
-
return t && m.loc && (m.loc.source = f), m.body = I(d), e.onCacheKey && (m.cacheKey = e.onCacheKey(f)), g.currentType !== 13 && a(d, w.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, f[g.offset] || ""), s(m, d.currentOffset(), d.currentPosition()), m;
|
|
760
|
-
}
|
|
761
|
-
return { parse: L };
|
|
762
|
-
}
|
|
763
|
-
function ye(e) {
|
|
764
|
-
if (e.type === 13)
|
|
765
|
-
return "EOF";
|
|
766
|
-
const t = (e.value || "").replace(/\r?\n/gu, "\\n");
|
|
767
|
-
return t.length > 10 ? t.slice(0, 9) + "…" : t;
|
|
768
|
-
}
|
|
769
|
-
function gr(e, t = {}) {
|
|
770
|
-
const n = {
|
|
771
|
-
ast: e,
|
|
772
|
-
helpers: /* @__PURE__ */ new Set()
|
|
773
|
-
};
|
|
774
|
-
return { context: () => n, helper: (s) => (n.helpers.add(s), s) };
|
|
775
|
-
}
|
|
776
|
-
function En(e, t) {
|
|
777
|
-
for (let n = 0; n < e.length; n++)
|
|
778
|
-
Zt(e[n], t);
|
|
779
|
-
}
|
|
780
|
-
function Zt(e, t) {
|
|
781
|
-
switch (e.type) {
|
|
782
|
-
case 1:
|
|
783
|
-
En(e.cases, t), t.helper(
|
|
784
|
-
"plural"
|
|
785
|
-
/* HelperNameMap.PLURAL */
|
|
786
|
-
);
|
|
787
|
-
break;
|
|
788
|
-
case 2:
|
|
789
|
-
En(e.items, t);
|
|
790
|
-
break;
|
|
791
|
-
case 6: {
|
|
792
|
-
Zt(e.key, t), t.helper(
|
|
793
|
-
"linked"
|
|
794
|
-
/* HelperNameMap.LINKED */
|
|
795
|
-
), t.helper(
|
|
796
|
-
"type"
|
|
797
|
-
/* HelperNameMap.TYPE */
|
|
798
|
-
);
|
|
799
|
-
break;
|
|
800
|
-
}
|
|
801
|
-
case 5:
|
|
802
|
-
t.helper(
|
|
803
|
-
"interpolate"
|
|
804
|
-
/* HelperNameMap.INTERPOLATE */
|
|
805
|
-
), t.helper(
|
|
806
|
-
"list"
|
|
807
|
-
/* HelperNameMap.LIST */
|
|
808
|
-
);
|
|
809
|
-
break;
|
|
810
|
-
case 4:
|
|
811
|
-
t.helper(
|
|
812
|
-
"interpolate"
|
|
813
|
-
/* HelperNameMap.INTERPOLATE */
|
|
814
|
-
), t.helper(
|
|
815
|
-
"named"
|
|
816
|
-
/* HelperNameMap.NAMED */
|
|
817
|
-
);
|
|
818
|
-
break;
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
function vr(e, t = {}) {
|
|
822
|
-
const n = gr(e);
|
|
823
|
-
n.helper(
|
|
824
|
-
"normalize"
|
|
825
|
-
/* HelperNameMap.NORMALIZE */
|
|
826
|
-
), e.body && Zt(e.body, n);
|
|
827
|
-
const a = n.context();
|
|
828
|
-
e.helpers = Array.from(a.helpers);
|
|
829
|
-
}
|
|
830
|
-
function Nr(e) {
|
|
831
|
-
const t = e.body;
|
|
832
|
-
return t.type === 2 ? pn(t) : t.cases.forEach((n) => pn(n)), e;
|
|
833
|
-
}
|
|
834
|
-
function pn(e) {
|
|
835
|
-
if (e.items.length === 1) {
|
|
836
|
-
const t = e.items[0];
|
|
837
|
-
(t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
|
|
838
|
-
} else {
|
|
839
|
-
const t = [];
|
|
840
|
-
for (let n = 0; n < e.items.length; n++) {
|
|
841
|
-
const a = e.items[n];
|
|
842
|
-
if (!(a.type === 3 || a.type === 9) || a.value == null)
|
|
843
|
-
break;
|
|
844
|
-
t.push(a.value);
|
|
845
|
-
}
|
|
846
|
-
if (t.length === e.items.length) {
|
|
847
|
-
e.static = Qt(t);
|
|
848
|
-
for (let n = 0; n < e.items.length; n++) {
|
|
849
|
-
const a = e.items[n];
|
|
850
|
-
(a.type === 3 || a.type === 9) && delete a.value;
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
const hr = "minifier";
|
|
856
|
-
function Ze(e) {
|
|
857
|
-
switch (e.t = e.type, e.type) {
|
|
858
|
-
case 0: {
|
|
859
|
-
const t = e;
|
|
860
|
-
Ze(t.body), t.b = t.body, delete t.body;
|
|
861
|
-
break;
|
|
862
|
-
}
|
|
863
|
-
case 1: {
|
|
864
|
-
const t = e, n = t.cases;
|
|
865
|
-
for (let a = 0; a < n.length; a++)
|
|
866
|
-
Ze(n[a]);
|
|
867
|
-
t.c = n, delete t.cases;
|
|
868
|
-
break;
|
|
869
|
-
}
|
|
870
|
-
case 2: {
|
|
871
|
-
const t = e, n = t.items;
|
|
872
|
-
for (let a = 0; a < n.length; a++)
|
|
873
|
-
Ze(n[a]);
|
|
874
|
-
t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
|
|
875
|
-
break;
|
|
876
|
-
}
|
|
877
|
-
case 3:
|
|
878
|
-
case 9:
|
|
879
|
-
case 8:
|
|
880
|
-
case 7: {
|
|
881
|
-
const t = e;
|
|
882
|
-
t.value && (t.v = t.value, delete t.value);
|
|
883
|
-
break;
|
|
884
|
-
}
|
|
885
|
-
case 6: {
|
|
886
|
-
const t = e;
|
|
887
|
-
Ze(t.key), t.k = t.key, delete t.key, t.modifier && (Ze(t.modifier), t.m = t.modifier, delete t.modifier);
|
|
888
|
-
break;
|
|
889
|
-
}
|
|
890
|
-
case 5: {
|
|
891
|
-
const t = e;
|
|
892
|
-
t.i = t.index, delete t.index;
|
|
893
|
-
break;
|
|
894
|
-
}
|
|
895
|
-
case 4: {
|
|
896
|
-
const t = e;
|
|
897
|
-
t.k = t.key, delete t.key;
|
|
898
|
-
break;
|
|
899
|
-
}
|
|
900
|
-
default:
|
|
901
|
-
if (process.env.NODE_ENV !== "production")
|
|
902
|
-
throw at(w.UNHANDLED_MINIFIER_NODE_TYPE, null, {
|
|
903
|
-
domain: hr,
|
|
904
|
-
args: [e.type]
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
delete e.type;
|
|
908
|
-
}
|
|
909
|
-
const br = "parser";
|
|
910
|
-
function Tr(e, t) {
|
|
911
|
-
const { filename: n, breakLineCode: a, needIndent: r } = t, s = t.location !== !1, o = {
|
|
912
|
-
filename: n,
|
|
913
|
-
code: "",
|
|
914
|
-
column: 1,
|
|
915
|
-
line: 1,
|
|
916
|
-
offset: 0,
|
|
917
|
-
map: void 0,
|
|
918
|
-
breakLineCode: a,
|
|
919
|
-
needIndent: r,
|
|
920
|
-
indentLevel: 0
|
|
921
|
-
};
|
|
922
|
-
s && e.loc && (o.source = e.loc.source);
|
|
923
|
-
const l = () => o;
|
|
924
|
-
function c(I, L) {
|
|
925
|
-
o.code += I;
|
|
926
|
-
}
|
|
927
|
-
function _(I, L = !0) {
|
|
928
|
-
const f = L ? a : "";
|
|
929
|
-
c(r ? f + " ".repeat(I) : f);
|
|
930
|
-
}
|
|
931
|
-
function b(I = !0) {
|
|
932
|
-
const L = ++o.indentLevel;
|
|
933
|
-
I && _(L);
|
|
934
|
-
}
|
|
935
|
-
function v(I = !0) {
|
|
936
|
-
const L = --o.indentLevel;
|
|
937
|
-
I && _(L);
|
|
938
|
-
}
|
|
939
|
-
function p() {
|
|
940
|
-
_(o.indentLevel);
|
|
941
|
-
}
|
|
942
|
-
return {
|
|
943
|
-
context: l,
|
|
944
|
-
push: c,
|
|
945
|
-
indent: b,
|
|
946
|
-
deindent: v,
|
|
947
|
-
newline: p,
|
|
948
|
-
helper: (I) => `_${I}`,
|
|
949
|
-
needIndent: () => o.needIndent
|
|
950
|
-
};
|
|
951
|
-
}
|
|
952
|
-
function Lr(e, t) {
|
|
953
|
-
const { helper: n } = e;
|
|
954
|
-
e.push(`${n(
|
|
955
|
-
"linked"
|
|
956
|
-
/* HelperNameMap.LINKED */
|
|
957
|
-
)}(`), tt(e, t.key), t.modifier ? (e.push(", "), tt(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
|
|
958
|
-
}
|
|
959
|
-
function Or(e, t) {
|
|
960
|
-
const { helper: n, needIndent: a } = e;
|
|
961
|
-
e.push(`${n(
|
|
962
|
-
"normalize"
|
|
963
|
-
/* HelperNameMap.NORMALIZE */
|
|
964
|
-
)}([`), e.indent(a());
|
|
965
|
-
const r = t.items.length;
|
|
966
|
-
for (let s = 0; s < r && (tt(e, t.items[s]), s !== r - 1); s++)
|
|
967
|
-
e.push(", ");
|
|
968
|
-
e.deindent(a()), e.push("])");
|
|
969
|
-
}
|
|
970
|
-
function Ir(e, t) {
|
|
971
|
-
const { helper: n, needIndent: a } = e;
|
|
972
|
-
if (t.cases.length > 1) {
|
|
973
|
-
e.push(`${n(
|
|
974
|
-
"plural"
|
|
975
|
-
/* HelperNameMap.PLURAL */
|
|
976
|
-
)}([`), e.indent(a());
|
|
977
|
-
const r = t.cases.length;
|
|
978
|
-
for (let s = 0; s < r && (tt(e, t.cases[s]), s !== r - 1); s++)
|
|
979
|
-
e.push(", ");
|
|
980
|
-
e.deindent(a()), e.push("])");
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
function yr(e, t) {
|
|
984
|
-
t.body ? tt(e, t.body) : e.push("null");
|
|
985
|
-
}
|
|
986
|
-
function tt(e, t) {
|
|
987
|
-
const { helper: n } = e;
|
|
988
|
-
switch (t.type) {
|
|
989
|
-
case 0:
|
|
990
|
-
yr(e, t);
|
|
991
|
-
break;
|
|
992
|
-
case 1:
|
|
993
|
-
Ir(e, t);
|
|
994
|
-
break;
|
|
995
|
-
case 2:
|
|
996
|
-
Or(e, t);
|
|
997
|
-
break;
|
|
998
|
-
case 6:
|
|
999
|
-
Lr(e, t);
|
|
1000
|
-
break;
|
|
1001
|
-
case 8:
|
|
1002
|
-
e.push(JSON.stringify(t.value), t);
|
|
1003
|
-
break;
|
|
1004
|
-
case 7:
|
|
1005
|
-
e.push(JSON.stringify(t.value), t);
|
|
1006
|
-
break;
|
|
1007
|
-
case 5:
|
|
1008
|
-
e.push(`${n(
|
|
1009
|
-
"interpolate"
|
|
1010
|
-
/* HelperNameMap.INTERPOLATE */
|
|
1011
|
-
)}(${n(
|
|
1012
|
-
"list"
|
|
1013
|
-
/* HelperNameMap.LIST */
|
|
1014
|
-
)}(${t.index}))`, t);
|
|
1015
|
-
break;
|
|
1016
|
-
case 4:
|
|
1017
|
-
e.push(`${n(
|
|
1018
|
-
"interpolate"
|
|
1019
|
-
/* HelperNameMap.INTERPOLATE */
|
|
1020
|
-
)}(${n(
|
|
1021
|
-
"named"
|
|
1022
|
-
/* HelperNameMap.NAMED */
|
|
1023
|
-
)}(${JSON.stringify(t.key)}))`, t);
|
|
1024
|
-
break;
|
|
1025
|
-
case 9:
|
|
1026
|
-
e.push(JSON.stringify(t.value), t);
|
|
1027
|
-
break;
|
|
1028
|
-
case 3:
|
|
1029
|
-
e.push(JSON.stringify(t.value), t);
|
|
1030
|
-
break;
|
|
1031
|
-
default:
|
|
1032
|
-
if (process.env.NODE_ENV !== "production")
|
|
1033
|
-
throw at(w.UNHANDLED_CODEGEN_NODE_TYPE, null, {
|
|
1034
|
-
domain: br,
|
|
1035
|
-
args: [t.type]
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
const Sr = (e, t = {}) => {
|
|
1040
|
-
const n = S(t.mode) ? t.mode : "normal", a = S(t.filename) ? t.filename : "message.intl";
|
|
1041
|
-
t.sourceMap;
|
|
1042
|
-
const r = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
|
|
1043
|
-
`, s = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], l = Tr(e, {
|
|
1044
|
-
filename: a,
|
|
1045
|
-
breakLineCode: r,
|
|
1046
|
-
needIndent: s
|
|
1047
|
-
});
|
|
1048
|
-
l.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), l.indent(s), o.length > 0 && (l.push(`const { ${Qt(o.map((b) => `${b}: _${b}`), ", ")} } = ctx`), l.newline()), l.push("return "), tt(l, e), l.deindent(s), l.push("}"), delete e.helpers;
|
|
1049
|
-
const { code: c, map: _ } = l.context();
|
|
1050
|
-
return {
|
|
1051
|
-
ast: e,
|
|
1052
|
-
code: c,
|
|
1053
|
-
map: _ ? _.toJSON() : void 0
|
|
1054
|
-
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1055
|
-
};
|
|
1056
|
-
};
|
|
1057
|
-
function Ar(e, t = {}) {
|
|
1058
|
-
const n = re({}, t), a = !!n.jit, r = !!n.minify, s = n.optimize == null ? !0 : n.optimize, l = pr(n).parse(e);
|
|
1059
|
-
return a ? (s && Nr(l), r && Ze(l), { ast: l, code: "" }) : (vr(l, n), Sr(l, n));
|
|
1060
|
-
}
|
|
1061
|
-
/*!
|
|
1062
|
-
* core-base v11.2.8
|
|
1063
|
-
* (c) 2025 kazuya kawaguchi
|
|
1064
|
-
* Released under the MIT License.
|
|
1065
|
-
*/
|
|
1066
|
-
function Pr() {
|
|
1067
|
-
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ye().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ye().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
|
|
1068
|
-
}
|
|
1069
|
-
function Ne(e) {
|
|
1070
|
-
return $(e) && zt(e) === 0 && (Te(e, "b") || Te(e, "body"));
|
|
1071
|
-
}
|
|
1072
|
-
const zn = ["b", "body"];
|
|
1073
|
-
function Cr(e) {
|
|
1074
|
-
return Fe(e, zn);
|
|
1075
|
-
}
|
|
1076
|
-
const ea = ["c", "cases"];
|
|
1077
|
-
function kr(e) {
|
|
1078
|
-
return Fe(e, ea, []);
|
|
1079
|
-
}
|
|
1080
|
-
const ta = ["s", "static"];
|
|
1081
|
-
function Rr(e) {
|
|
1082
|
-
return Fe(e, ta);
|
|
1083
|
-
}
|
|
1084
|
-
const na = ["i", "items"];
|
|
1085
|
-
function Dr(e) {
|
|
1086
|
-
return Fe(e, na, []);
|
|
1087
|
-
}
|
|
1088
|
-
const aa = ["t", "type"];
|
|
1089
|
-
function zt(e) {
|
|
1090
|
-
return Fe(e, aa);
|
|
1091
|
-
}
|
|
1092
|
-
const ra = ["v", "value"];
|
|
1093
|
-
function pt(e, t) {
|
|
1094
|
-
const n = Fe(e, ra);
|
|
1095
|
-
if (n != null)
|
|
1096
|
-
return n;
|
|
1097
|
-
throw it(t);
|
|
1098
|
-
}
|
|
1099
|
-
const sa = ["m", "modifier"];
|
|
1100
|
-
function wr(e) {
|
|
1101
|
-
return Fe(e, sa);
|
|
1102
|
-
}
|
|
1103
|
-
const oa = ["k", "key"];
|
|
1104
|
-
function Mr(e) {
|
|
1105
|
-
const t = Fe(e, oa);
|
|
1106
|
-
if (t)
|
|
1107
|
-
return t;
|
|
1108
|
-
throw it(
|
|
1109
|
-
6
|
|
1110
|
-
/* NodeTypes.Linked */
|
|
1111
|
-
);
|
|
1112
|
-
}
|
|
1113
|
-
function Fe(e, t, n) {
|
|
1114
|
-
for (let a = 0; a < t.length; a++) {
|
|
1115
|
-
const r = t[a];
|
|
1116
|
-
if (Te(e, r) && e[r] != null)
|
|
1117
|
-
return e[r];
|
|
1118
|
-
}
|
|
1119
|
-
return n;
|
|
1120
|
-
}
|
|
1121
|
-
const la = [
|
|
1122
|
-
...zn,
|
|
1123
|
-
...ea,
|
|
1124
|
-
...ta,
|
|
1125
|
-
...na,
|
|
1126
|
-
...oa,
|
|
1127
|
-
...sa,
|
|
1128
|
-
...ra,
|
|
1129
|
-
...aa
|
|
1130
|
-
];
|
|
1131
|
-
function it(e) {
|
|
1132
|
-
return new Error(`unhandled node type: ${e}`);
|
|
1133
|
-
}
|
|
1134
|
-
function Rt(e) {
|
|
1135
|
-
return (n) => Fr(n, e);
|
|
1136
|
-
}
|
|
1137
|
-
function Fr(e, t) {
|
|
1138
|
-
const n = Cr(t);
|
|
1139
|
-
if (n == null)
|
|
1140
|
-
throw it(
|
|
1141
|
-
0
|
|
1142
|
-
/* NodeTypes.Resource */
|
|
1143
|
-
);
|
|
1144
|
-
if (zt(n) === 1) {
|
|
1145
|
-
const s = kr(n);
|
|
1146
|
-
return e.plural(s.reduce((o, l) => [
|
|
1147
|
-
...o,
|
|
1148
|
-
gn(e, l)
|
|
1149
|
-
], []));
|
|
1150
|
-
} else
|
|
1151
|
-
return gn(e, n);
|
|
1152
|
-
}
|
|
1153
|
-
function gn(e, t) {
|
|
1154
|
-
const n = Rr(t);
|
|
1155
|
-
if (n != null)
|
|
1156
|
-
return e.type === "text" ? n : e.normalize([n]);
|
|
1157
|
-
{
|
|
1158
|
-
const a = Dr(t).reduce((r, s) => [...r, Ut(e, s)], []);
|
|
1159
|
-
return e.normalize(a);
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
function Ut(e, t) {
|
|
1163
|
-
const n = zt(t);
|
|
1164
|
-
switch (n) {
|
|
1165
|
-
case 3:
|
|
1166
|
-
return pt(t, n);
|
|
1167
|
-
case 9:
|
|
1168
|
-
return pt(t, n);
|
|
1169
|
-
case 4: {
|
|
1170
|
-
const a = t;
|
|
1171
|
-
if (Te(a, "k") && a.k)
|
|
1172
|
-
return e.interpolate(e.named(a.k));
|
|
1173
|
-
if (Te(a, "key") && a.key)
|
|
1174
|
-
return e.interpolate(e.named(a.key));
|
|
1175
|
-
throw it(n);
|
|
1176
|
-
}
|
|
1177
|
-
case 5: {
|
|
1178
|
-
const a = t;
|
|
1179
|
-
if (Te(a, "i") && ne(a.i))
|
|
1180
|
-
return e.interpolate(e.list(a.i));
|
|
1181
|
-
if (Te(a, "index") && ne(a.index))
|
|
1182
|
-
return e.interpolate(e.list(a.index));
|
|
1183
|
-
throw it(n);
|
|
1184
|
-
}
|
|
1185
|
-
case 6: {
|
|
1186
|
-
const a = t, r = wr(a), s = Mr(a);
|
|
1187
|
-
return e.linked(Ut(e, s), r ? Ut(e, r) : void 0, e.type);
|
|
1188
|
-
}
|
|
1189
|
-
case 7:
|
|
1190
|
-
return pt(t, n);
|
|
1191
|
-
case 8:
|
|
1192
|
-
return pt(t, n);
|
|
1193
|
-
default:
|
|
1194
|
-
throw new Error(`unhandled node on format message part: ${n}`);
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
const Ur = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
|
|
1198
|
-
function Vr(e, t) {
|
|
1199
|
-
t && sr(e) && Se(Lt(Ur, { source: e }));
|
|
1200
|
-
}
|
|
1201
|
-
const $r = (e) => e;
|
|
1202
|
-
let gt = K();
|
|
1203
|
-
function xr(e, t = {}) {
|
|
1204
|
-
let n = !1;
|
|
1205
|
-
const a = t.onError || ar;
|
|
1206
|
-
return t.onError = (r) => {
|
|
1207
|
-
n = !0, a(r);
|
|
1208
|
-
}, { ...Ar(e, t), detectError: n };
|
|
1209
|
-
}
|
|
1210
|
-
// @__NO_SIDE_EFFECTS__
|
|
1211
|
-
function Wr(e, t) {
|
|
1212
|
-
if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && S(e)) {
|
|
1213
|
-
const n = x(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
|
|
1214
|
-
process.env.NODE_ENV !== "production" && Vr(e, n);
|
|
1215
|
-
const r = (t.onCacheKey || $r)(e), s = gt[r];
|
|
1216
|
-
if (s)
|
|
1217
|
-
return s;
|
|
1218
|
-
const { ast: o, detectError: l } = xr(e, {
|
|
1219
|
-
...t,
|
|
1220
|
-
location: process.env.NODE_ENV !== "production",
|
|
1221
|
-
jit: !0
|
|
1222
|
-
}), c = Rt(o);
|
|
1223
|
-
return l ? c : gt[r] = c;
|
|
1224
|
-
} else {
|
|
1225
|
-
if (process.env.NODE_ENV !== "production" && !Ne(e))
|
|
1226
|
-
return Se(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), (() => e);
|
|
1227
|
-
const n = e.cacheKey;
|
|
1228
|
-
if (n) {
|
|
1229
|
-
const a = gt[n];
|
|
1230
|
-
return a || (gt[n] = Rt(e));
|
|
1231
|
-
} else
|
|
1232
|
-
return Rt(e);
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
let ct = null;
|
|
1236
|
-
function Gr(e) {
|
|
1237
|
-
ct = e;
|
|
1238
|
-
}
|
|
1239
|
-
function jr(e, t, n) {
|
|
1240
|
-
ct && ct.emit("i18n:init", {
|
|
1241
|
-
timestamp: Date.now(),
|
|
1242
|
-
i18n: e,
|
|
1243
|
-
version: t,
|
|
1244
|
-
meta: n
|
|
1245
|
-
});
|
|
1246
|
-
}
|
|
1247
|
-
const Yr = /* @__PURE__ */ Hr("function:translate");
|
|
1248
|
-
function Hr(e) {
|
|
1249
|
-
return (t) => ct && ct.emit(e, t);
|
|
1250
|
-
}
|
|
1251
|
-
const fe = {
|
|
1252
|
-
INVALID_ARGUMENT: tr,
|
|
1253
|
-
// 17
|
|
1254
|
-
INVALID_DATE_ARGUMENT: 18,
|
|
1255
|
-
INVALID_ISO_DATE_ARGUMENT: 19,
|
|
1256
|
-
NOT_SUPPORT_NON_STRING_MESSAGE: 20,
|
|
1257
|
-
NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
|
|
1258
|
-
NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
|
|
1259
|
-
NOT_SUPPORT_LOCALE_TYPE: 23
|
|
1260
|
-
}, Kr = 24;
|
|
1261
|
-
function Re(e) {
|
|
1262
|
-
return at(e, null, process.env.NODE_ENV !== "production" ? { messages: Br } : void 0);
|
|
1263
|
-
}
|
|
1264
|
-
const Br = {
|
|
1265
|
-
[fe.INVALID_ARGUMENT]: "Invalid arguments",
|
|
1266
|
-
[fe.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
|
|
1267
|
-
[fe.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
|
|
1268
|
-
[fe.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message",
|
|
1269
|
-
[fe.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: "cannot support promise value",
|
|
1270
|
-
[fe.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function",
|
|
1271
|
-
[fe.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type"
|
|
1272
|
-
};
|
|
1273
|
-
function en(e, t) {
|
|
1274
|
-
return t.locale != null ? vn(t.locale) : vn(e.locale);
|
|
1275
|
-
}
|
|
1276
|
-
let Dt;
|
|
1277
|
-
function vn(e) {
|
|
1278
|
-
if (S(e))
|
|
1279
|
-
return e;
|
|
1280
|
-
if (X(e)) {
|
|
1281
|
-
if (e.resolvedOnce && Dt != null)
|
|
1282
|
-
return Dt;
|
|
1283
|
-
if (e.constructor.name === "Function") {
|
|
1284
|
-
const t = e();
|
|
1285
|
-
if (qa(t))
|
|
1286
|
-
throw Re(fe.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
|
|
1287
|
-
return Dt = t;
|
|
1288
|
-
} else
|
|
1289
|
-
throw Re(fe.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
|
|
1290
|
-
} else
|
|
1291
|
-
throw Re(fe.NOT_SUPPORT_LOCALE_TYPE);
|
|
1292
|
-
}
|
|
1293
|
-
function Xr(e, t, n) {
|
|
1294
|
-
return [.../* @__PURE__ */ new Set([
|
|
1295
|
-
n,
|
|
1296
|
-
...z(t) ? t : $(t) ? Object.keys(t) : S(t) ? [t] : [n]
|
|
1297
|
-
])];
|
|
1298
|
-
}
|
|
1299
|
-
function ia(e, t, n) {
|
|
1300
|
-
const a = S(n) ? n : ut, r = e;
|
|
1301
|
-
r.__localeChainCache || (r.__localeChainCache = /* @__PURE__ */ new Map());
|
|
1302
|
-
let s = r.__localeChainCache.get(a);
|
|
1303
|
-
if (!s) {
|
|
1304
|
-
s = [];
|
|
1305
|
-
let o = [n];
|
|
1306
|
-
for (; z(o); )
|
|
1307
|
-
o = Nn(s, o, t);
|
|
1308
|
-
const l = z(t) || !F(t) ? t : t.default ? t.default : null;
|
|
1309
|
-
o = S(l) ? [l] : l, z(o) && Nn(s, o, !1), r.__localeChainCache.set(a, s);
|
|
1310
|
-
}
|
|
1311
|
-
return s;
|
|
1312
|
-
}
|
|
1313
|
-
function Nn(e, t, n) {
|
|
1314
|
-
let a = !0;
|
|
1315
|
-
for (let r = 0; r < t.length && x(a); r++) {
|
|
1316
|
-
const s = t[r];
|
|
1317
|
-
S(s) && (a = Jr(e, t[r], n));
|
|
1318
|
-
}
|
|
1319
|
-
return a;
|
|
1320
|
-
}
|
|
1321
|
-
function Jr(e, t, n) {
|
|
1322
|
-
let a;
|
|
1323
|
-
const r = t.split("-");
|
|
1324
|
-
do {
|
|
1325
|
-
const s = r.join("-");
|
|
1326
|
-
a = Qr(e, s, n), r.splice(-1, 1);
|
|
1327
|
-
} while (r.length && a === !0);
|
|
1328
|
-
return a;
|
|
1329
|
-
}
|
|
1330
|
-
function Qr(e, t, n) {
|
|
1331
|
-
let a = !1;
|
|
1332
|
-
if (!e.includes(t) && (a = !0, t)) {
|
|
1333
|
-
a = t[t.length - 1] !== "!";
|
|
1334
|
-
const r = t.replace(/!/g, "");
|
|
1335
|
-
e.push(r), (z(n) || F(n)) && n[r] && (a = n[r]);
|
|
1336
|
-
}
|
|
1337
|
-
return a;
|
|
1338
|
-
}
|
|
1339
|
-
const Ue = [];
|
|
1340
|
-
Ue[
|
|
1341
|
-
0
|
|
1342
|
-
/* States.BEFORE_PATH */
|
|
1343
|
-
] = {
|
|
1344
|
-
w: [
|
|
1345
|
-
0
|
|
1346
|
-
/* States.BEFORE_PATH */
|
|
1347
|
-
],
|
|
1348
|
-
i: [
|
|
1349
|
-
3,
|
|
1350
|
-
0
|
|
1351
|
-
/* Actions.APPEND */
|
|
1352
|
-
],
|
|
1353
|
-
"[": [
|
|
1354
|
-
4
|
|
1355
|
-
/* States.IN_SUB_PATH */
|
|
1356
|
-
],
|
|
1357
|
-
o: [
|
|
1358
|
-
7
|
|
1359
|
-
/* States.AFTER_PATH */
|
|
1360
|
-
]
|
|
1361
|
-
};
|
|
1362
|
-
Ue[
|
|
1363
|
-
1
|
|
1364
|
-
/* States.IN_PATH */
|
|
1365
|
-
] = {
|
|
1366
|
-
w: [
|
|
1367
|
-
1
|
|
1368
|
-
/* States.IN_PATH */
|
|
1369
|
-
],
|
|
1370
|
-
".": [
|
|
1371
|
-
2
|
|
1372
|
-
/* States.BEFORE_IDENT */
|
|
1373
|
-
],
|
|
1374
|
-
"[": [
|
|
1375
|
-
4
|
|
1376
|
-
/* States.IN_SUB_PATH */
|
|
1377
|
-
],
|
|
1378
|
-
o: [
|
|
1379
|
-
7
|
|
1380
|
-
/* States.AFTER_PATH */
|
|
1381
|
-
]
|
|
1382
|
-
};
|
|
1383
|
-
Ue[
|
|
1384
|
-
2
|
|
1385
|
-
/* States.BEFORE_IDENT */
|
|
1386
|
-
] = {
|
|
1387
|
-
w: [
|
|
1388
|
-
2
|
|
1389
|
-
/* States.BEFORE_IDENT */
|
|
1390
|
-
],
|
|
1391
|
-
i: [
|
|
1392
|
-
3,
|
|
1393
|
-
0
|
|
1394
|
-
/* Actions.APPEND */
|
|
1395
|
-
],
|
|
1396
|
-
0: [
|
|
1397
|
-
3,
|
|
1398
|
-
0
|
|
1399
|
-
/* Actions.APPEND */
|
|
1400
|
-
]
|
|
1401
|
-
};
|
|
1402
|
-
Ue[
|
|
1403
|
-
3
|
|
1404
|
-
/* States.IN_IDENT */
|
|
1405
|
-
] = {
|
|
1406
|
-
i: [
|
|
1407
|
-
3,
|
|
1408
|
-
0
|
|
1409
|
-
/* Actions.APPEND */
|
|
1410
|
-
],
|
|
1411
|
-
0: [
|
|
1412
|
-
3,
|
|
1413
|
-
0
|
|
1414
|
-
/* Actions.APPEND */
|
|
1415
|
-
],
|
|
1416
|
-
w: [
|
|
1417
|
-
1,
|
|
1418
|
-
1
|
|
1419
|
-
/* Actions.PUSH */
|
|
1420
|
-
],
|
|
1421
|
-
".": [
|
|
1422
|
-
2,
|
|
1423
|
-
1
|
|
1424
|
-
/* Actions.PUSH */
|
|
1425
|
-
],
|
|
1426
|
-
"[": [
|
|
1427
|
-
4,
|
|
1428
|
-
1
|
|
1429
|
-
/* Actions.PUSH */
|
|
1430
|
-
],
|
|
1431
|
-
o: [
|
|
1432
|
-
7,
|
|
1433
|
-
1
|
|
1434
|
-
/* Actions.PUSH */
|
|
1435
|
-
]
|
|
1436
|
-
};
|
|
1437
|
-
Ue[
|
|
1438
|
-
4
|
|
1439
|
-
/* States.IN_SUB_PATH */
|
|
1440
|
-
] = {
|
|
1441
|
-
"'": [
|
|
1442
|
-
5,
|
|
1443
|
-
0
|
|
1444
|
-
/* Actions.APPEND */
|
|
1445
|
-
],
|
|
1446
|
-
'"': [
|
|
1447
|
-
6,
|
|
1448
|
-
0
|
|
1449
|
-
/* Actions.APPEND */
|
|
1450
|
-
],
|
|
1451
|
-
"[": [
|
|
1452
|
-
4,
|
|
1453
|
-
2
|
|
1454
|
-
/* Actions.INC_SUB_PATH_DEPTH */
|
|
1455
|
-
],
|
|
1456
|
-
"]": [
|
|
1457
|
-
1,
|
|
1458
|
-
3
|
|
1459
|
-
/* Actions.PUSH_SUB_PATH */
|
|
1460
|
-
],
|
|
1461
|
-
o: 8,
|
|
1462
|
-
l: [
|
|
1463
|
-
4,
|
|
1464
|
-
0
|
|
1465
|
-
/* Actions.APPEND */
|
|
1466
|
-
]
|
|
1467
|
-
};
|
|
1468
|
-
Ue[
|
|
1469
|
-
5
|
|
1470
|
-
/* States.IN_SINGLE_QUOTE */
|
|
1471
|
-
] = {
|
|
1472
|
-
"'": [
|
|
1473
|
-
4,
|
|
1474
|
-
0
|
|
1475
|
-
/* Actions.APPEND */
|
|
1476
|
-
],
|
|
1477
|
-
o: 8,
|
|
1478
|
-
l: [
|
|
1479
|
-
5,
|
|
1480
|
-
0
|
|
1481
|
-
/* Actions.APPEND */
|
|
1482
|
-
]
|
|
1483
|
-
};
|
|
1484
|
-
Ue[
|
|
1485
|
-
6
|
|
1486
|
-
/* States.IN_DOUBLE_QUOTE */
|
|
1487
|
-
] = {
|
|
1488
|
-
'"': [
|
|
1489
|
-
4,
|
|
1490
|
-
0
|
|
1491
|
-
/* Actions.APPEND */
|
|
1492
|
-
],
|
|
1493
|
-
o: 8,
|
|
1494
|
-
l: [
|
|
1495
|
-
6,
|
|
1496
|
-
0
|
|
1497
|
-
/* Actions.APPEND */
|
|
1498
|
-
]
|
|
1499
|
-
};
|
|
1500
|
-
const qr = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
|
|
1501
|
-
function Zr(e) {
|
|
1502
|
-
return qr.test(e);
|
|
1503
|
-
}
|
|
1504
|
-
function zr(e) {
|
|
1505
|
-
const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
|
|
1506
|
-
return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
|
|
1507
|
-
}
|
|
1508
|
-
function es(e) {
|
|
1509
|
-
if (e == null)
|
|
1510
|
-
return "o";
|
|
1511
|
-
switch (e.charCodeAt(0)) {
|
|
1512
|
-
case 91:
|
|
1513
|
-
// [
|
|
1514
|
-
case 93:
|
|
1515
|
-
// ]
|
|
1516
|
-
case 46:
|
|
1517
|
-
// .
|
|
1518
|
-
case 34:
|
|
1519
|
-
// "
|
|
1520
|
-
case 39:
|
|
1521
|
-
return e;
|
|
1522
|
-
case 95:
|
|
1523
|
-
// _
|
|
1524
|
-
case 36:
|
|
1525
|
-
// $
|
|
1526
|
-
case 45:
|
|
1527
|
-
return "i";
|
|
1528
|
-
case 9:
|
|
1529
|
-
// Tab (HT)
|
|
1530
|
-
case 10:
|
|
1531
|
-
// Newline (LF)
|
|
1532
|
-
case 13:
|
|
1533
|
-
// Return (CR)
|
|
1534
|
-
case 160:
|
|
1535
|
-
// No-break space (NBSP)
|
|
1536
|
-
case 65279:
|
|
1537
|
-
// Byte Order Mark (BOM)
|
|
1538
|
-
case 8232:
|
|
1539
|
-
// Line Separator (LS)
|
|
1540
|
-
case 8233:
|
|
1541
|
-
return "w";
|
|
1542
|
-
}
|
|
1543
|
-
return "i";
|
|
1544
|
-
}
|
|
1545
|
-
function ts(e) {
|
|
1546
|
-
const t = e.trim();
|
|
1547
|
-
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : Zr(t) ? zr(t) : "*" + t;
|
|
1548
|
-
}
|
|
1549
|
-
function ns(e) {
|
|
1550
|
-
const t = [];
|
|
1551
|
-
let n = -1, a = 0, r = 0, s, o, l, c, _, b, v;
|
|
1552
|
-
const p = [];
|
|
1553
|
-
p[
|
|
1554
|
-
0
|
|
1555
|
-
/* Actions.APPEND */
|
|
1556
|
-
] = () => {
|
|
1557
|
-
o === void 0 ? o = l : o += l;
|
|
1558
|
-
}, p[
|
|
1559
|
-
1
|
|
1560
|
-
/* Actions.PUSH */
|
|
1561
|
-
] = () => {
|
|
1562
|
-
o !== void 0 && (t.push(o), o = void 0);
|
|
1563
|
-
}, p[
|
|
1564
|
-
2
|
|
1565
|
-
/* Actions.INC_SUB_PATH_DEPTH */
|
|
1566
|
-
] = () => {
|
|
1567
|
-
p[
|
|
1568
|
-
0
|
|
1569
|
-
/* Actions.APPEND */
|
|
1570
|
-
](), r++;
|
|
1571
|
-
}, p[
|
|
1572
|
-
3
|
|
1573
|
-
/* Actions.PUSH_SUB_PATH */
|
|
1574
|
-
] = () => {
|
|
1575
|
-
if (r > 0)
|
|
1576
|
-
r--, a = 4, p[
|
|
1577
|
-
0
|
|
1578
|
-
/* Actions.APPEND */
|
|
1579
|
-
]();
|
|
1580
|
-
else {
|
|
1581
|
-
if (r = 0, o === void 0 || (o = ts(o), o === !1))
|
|
1582
|
-
return !1;
|
|
1583
|
-
p[
|
|
1584
|
-
1
|
|
1585
|
-
/* Actions.PUSH */
|
|
1586
|
-
]();
|
|
1587
|
-
}
|
|
1588
|
-
};
|
|
1589
|
-
function P() {
|
|
1590
|
-
const R = e[n + 1];
|
|
1591
|
-
if (a === 5 && R === "'" || a === 6 && R === '"')
|
|
1592
|
-
return n++, l = "\\" + R, p[
|
|
1593
|
-
0
|
|
1594
|
-
/* Actions.APPEND */
|
|
1595
|
-
](), !0;
|
|
1596
|
-
}
|
|
1597
|
-
for (; a !== null; )
|
|
1598
|
-
if (n++, s = e[n], !(s === "\\" && P())) {
|
|
1599
|
-
if (c = es(s), v = Ue[a], _ = v[c] || v.l || 8, _ === 8 || (a = _[0], _[1] !== void 0 && (b = p[_[1]], b && (l = s, b() === !1))))
|
|
1600
|
-
return;
|
|
1601
|
-
if (a === 7)
|
|
1602
|
-
return t;
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
const hn = /* @__PURE__ */ new Map();
|
|
1606
|
-
function as(e, t) {
|
|
1607
|
-
return $(e) ? e[t] : null;
|
|
1608
|
-
}
|
|
1609
|
-
function rs(e, t) {
|
|
1610
|
-
if (!$(e))
|
|
1611
|
-
return null;
|
|
1612
|
-
let n = hn.get(t);
|
|
1613
|
-
if (n || (n = ns(t), n && hn.set(t, n)), !n)
|
|
1614
|
-
return null;
|
|
1615
|
-
const a = n.length;
|
|
1616
|
-
let r = e, s = 0;
|
|
1617
|
-
for (; s < a; ) {
|
|
1618
|
-
const o = n[s];
|
|
1619
|
-
if (la.includes(o) && Ne(r))
|
|
1620
|
-
return null;
|
|
1621
|
-
const l = r[o];
|
|
1622
|
-
if (l === void 0 || X(r))
|
|
1623
|
-
return null;
|
|
1624
|
-
r = l, s++;
|
|
1625
|
-
}
|
|
1626
|
-
return r;
|
|
1627
|
-
}
|
|
1628
|
-
const me = {
|
|
1629
|
-
NOT_FOUND_KEY: 1,
|
|
1630
|
-
FALLBACK_TO_TRANSLATE: 2,
|
|
1631
|
-
CANNOT_FORMAT_NUMBER: 3,
|
|
1632
|
-
FALLBACK_TO_NUMBER_FORMAT: 4,
|
|
1633
|
-
CANNOT_FORMAT_DATE: 5,
|
|
1634
|
-
FALLBACK_TO_DATE_FORMAT: 6,
|
|
1635
|
-
EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7
|
|
1636
|
-
}, ss = 8, os = {
|
|
1637
|
-
[me.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
|
|
1638
|
-
[me.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
|
|
1639
|
-
[me.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
|
|
1640
|
-
[me.FALLBACK_TO_NUMBER_FORMAT]: "Fall back to number format '{key}' key with '{target}' locale.",
|
|
1641
|
-
[me.CANNOT_FORMAT_DATE]: "Cannot format a date value due to not supported Intl.DateTimeFormat.",
|
|
1642
|
-
[me.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
|
|
1643
|
-
[me.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."
|
|
1644
|
-
};
|
|
1645
|
-
function Ke(e, ...t) {
|
|
1646
|
-
return Lt(os[e], ...t);
|
|
1647
|
-
}
|
|
1648
|
-
const ls = "11.2.8", It = -1, ut = "en-US", bt = "", bn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
|
|
1649
|
-
function is() {
|
|
1650
|
-
return {
|
|
1651
|
-
upper: (e, t) => t === "text" && S(e) ? e.toUpperCase() : t === "vnode" && $(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
|
|
1652
|
-
lower: (e, t) => t === "text" && S(e) ? e.toLowerCase() : t === "vnode" && $(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
|
|
1653
|
-
capitalize: (e, t) => t === "text" && S(e) ? bn(e) : t === "vnode" && $(e) && "__v_isVNode" in e ? bn(e.children) : e
|
|
1654
|
-
};
|
|
1655
|
-
}
|
|
1656
|
-
let ca;
|
|
1657
|
-
function cs(e) {
|
|
1658
|
-
ca = e;
|
|
1659
|
-
}
|
|
1660
|
-
let ua;
|
|
1661
|
-
function us(e) {
|
|
1662
|
-
ua = e;
|
|
1663
|
-
}
|
|
1664
|
-
let fa;
|
|
1665
|
-
function fs(e) {
|
|
1666
|
-
fa = e;
|
|
1667
|
-
}
|
|
1668
|
-
let da = null;
|
|
1669
|
-
const ds = /* @__NO_SIDE_EFFECTS__ */ (e) => {
|
|
1670
|
-
da = e;
|
|
1671
|
-
}, _s = /* @__NO_SIDE_EFFECTS__ */ () => da;
|
|
1672
|
-
let _a = null;
|
|
1673
|
-
const Tn = (e) => {
|
|
1674
|
-
_a = e;
|
|
1675
|
-
}, ms = () => _a;
|
|
1676
|
-
let Ln = 0;
|
|
1677
|
-
function Es(e = {}) {
|
|
1678
|
-
const t = X(e.onWarn) ? e.onWarn : Se, n = S(e.version) ? e.version : ls, a = S(e.locale) || X(e.locale) ? e.locale : ut, r = X(a) ? ut : a, s = z(e.fallbackLocale) || F(e.fallbackLocale) || S(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : r, o = F(e.messages) ? e.messages : wt(r), l = F(e.datetimeFormats) ? e.datetimeFormats : wt(r), c = F(e.numberFormats) ? e.numberFormats : wt(r), _ = re(K(), e.modifiers, is()), b = e.pluralRules || K(), v = X(e.missing) ? e.missing : null, p = x(e.missingWarn) || et(e.missingWarn) ? e.missingWarn : !0, P = x(e.fallbackWarn) || et(e.fallbackWarn) ? e.fallbackWarn : !0, R = !!e.fallbackFormat, I = !!e.unresolving, L = X(e.postTranslation) ? e.postTranslation : null, f = F(e.processor) ? e.processor : null, d = x(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, g = !!e.escapeParameter, m = X(e.messageCompiler) ? e.messageCompiler : ca;
|
|
1679
|
-
process.env.NODE_ENV !== "production" && X(e.messageCompiler) && Xt(Ke(me.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
|
|
1680
|
-
const O = X(e.messageResolver) ? e.messageResolver : ua || as, y = X(e.localeFallbacker) ? e.localeFallbacker : fa || Xr, N = $(e.fallbackContext) ? e.fallbackContext : void 0, M = e, V = $(M.__datetimeFormatters) ? M.__datetimeFormatters : /* @__PURE__ */ new Map(), q = $(M.__numberFormatters) ? M.__numberFormatters : /* @__PURE__ */ new Map(), ce = $(M.__meta) ? M.__meta : {};
|
|
1681
|
-
Ln++;
|
|
1682
|
-
const D = {
|
|
1683
|
-
version: n,
|
|
1684
|
-
cid: Ln,
|
|
1685
|
-
locale: a,
|
|
1686
|
-
fallbackLocale: s,
|
|
1687
|
-
messages: o,
|
|
1688
|
-
modifiers: _,
|
|
1689
|
-
pluralRules: b,
|
|
1690
|
-
missing: v,
|
|
1691
|
-
missingWarn: p,
|
|
1692
|
-
fallbackWarn: P,
|
|
1693
|
-
fallbackFormat: R,
|
|
1694
|
-
unresolving: I,
|
|
1695
|
-
postTranslation: L,
|
|
1696
|
-
processor: f,
|
|
1697
|
-
warnHtmlMessage: d,
|
|
1698
|
-
escapeParameter: g,
|
|
1699
|
-
messageCompiler: m,
|
|
1700
|
-
messageResolver: O,
|
|
1701
|
-
localeFallbacker: y,
|
|
1702
|
-
fallbackContext: N,
|
|
1703
|
-
onWarn: t,
|
|
1704
|
-
__meta: ce
|
|
1705
|
-
};
|
|
1706
|
-
return D.datetimeFormats = l, D.numberFormats = c, D.__datetimeFormatters = V, D.__numberFormatters = q, process.env.NODE_ENV !== "production" && (D.__v_emitter = M.__v_emitter != null ? M.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && jr(D, n, ce), D;
|
|
1707
|
-
}
|
|
1708
|
-
const wt = (e) => ({ [e]: K() });
|
|
1709
|
-
function yt(e, t) {
|
|
1710
|
-
return e instanceof RegExp ? e.test(t) : e;
|
|
1711
|
-
}
|
|
1712
|
-
function ma(e, t) {
|
|
1713
|
-
return e instanceof RegExp ? e.test(t) : e;
|
|
1714
|
-
}
|
|
1715
|
-
function tn(e, t, n, a, r) {
|
|
1716
|
-
const { missing: s, onWarn: o } = e;
|
|
1717
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1718
|
-
const l = e.__v_emitter;
|
|
1719
|
-
l && l.emit("missing", {
|
|
1720
|
-
locale: n,
|
|
1721
|
-
key: t,
|
|
1722
|
-
type: r,
|
|
1723
|
-
groupId: `${r}:${t}`
|
|
1724
|
-
});
|
|
1725
|
-
}
|
|
1726
|
-
if (s !== null) {
|
|
1727
|
-
const l = s(e, n, t, r);
|
|
1728
|
-
return S(l) ? l : t;
|
|
1729
|
-
} else
|
|
1730
|
-
return process.env.NODE_ENV !== "production" && ma(a, t) && o(Ke(me.NOT_FOUND_KEY, { key: t, locale: n })), t;
|
|
1731
|
-
}
|
|
1732
|
-
function lt(e, t, n) {
|
|
1733
|
-
const a = e;
|
|
1734
|
-
a.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
|
|
1735
|
-
}
|
|
1736
|
-
function Ea(e, t) {
|
|
1737
|
-
return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
|
|
1738
|
-
}
|
|
1739
|
-
function ps(e, t) {
|
|
1740
|
-
const n = t.indexOf(e);
|
|
1741
|
-
if (n === -1)
|
|
1742
|
-
return !1;
|
|
1743
|
-
for (let a = n + 1; a < t.length; a++)
|
|
1744
|
-
if (Ea(e, t[a]))
|
|
1745
|
-
return !0;
|
|
1746
|
-
return !1;
|
|
1747
|
-
}
|
|
1748
|
-
const On = typeof Intl < "u", pa = {
|
|
1749
|
-
dateTimeFormat: On && typeof Intl.DateTimeFormat < "u",
|
|
1750
|
-
numberFormat: On && typeof Intl.NumberFormat < "u"
|
|
1751
|
-
};
|
|
1752
|
-
function In(e, ...t) {
|
|
1753
|
-
const { datetimeFormats: n, unresolving: a, fallbackLocale: r, onWarn: s, localeFallbacker: o } = e, { __datetimeFormatters: l } = e;
|
|
1754
|
-
if (process.env.NODE_ENV !== "production" && !pa.dateTimeFormat)
|
|
1755
|
-
return s(Ke(me.CANNOT_FORMAT_DATE)), bt;
|
|
1756
|
-
const [c, _, b, v] = Vt(...t), p = x(b.missingWarn) ? b.missingWarn : e.missingWarn, P = x(b.fallbackWarn) ? b.fallbackWarn : e.fallbackWarn, R = !!b.part, I = en(e, b), L = o(
|
|
1757
|
-
e,
|
|
1758
|
-
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1759
|
-
r,
|
|
1760
|
-
I
|
|
1761
|
-
);
|
|
1762
|
-
if (!S(c) || c === "")
|
|
1763
|
-
return new Intl.DateTimeFormat(I, v).format(_);
|
|
1764
|
-
let f = {}, d, g = null, m = I, O = null;
|
|
1765
|
-
const y = "datetime format";
|
|
1766
|
-
for (let V = 0; V < L.length; V++) {
|
|
1767
|
-
if (d = O = L[V], process.env.NODE_ENV !== "production" && I !== d && yt(P, c) && s(Ke(me.FALLBACK_TO_DATE_FORMAT, {
|
|
1768
|
-
key: c,
|
|
1769
|
-
target: d
|
|
1770
|
-
})), process.env.NODE_ENV !== "production" && I !== d) {
|
|
1771
|
-
const q = e.__v_emitter;
|
|
1772
|
-
q && q.emit("fallback", {
|
|
1773
|
-
type: y,
|
|
1774
|
-
key: c,
|
|
1775
|
-
from: m,
|
|
1776
|
-
to: O,
|
|
1777
|
-
groupId: `${y}:${c}`
|
|
1778
|
-
});
|
|
1779
|
-
}
|
|
1780
|
-
if (f = n[d] || {}, g = f[c], F(g))
|
|
1781
|
-
break;
|
|
1782
|
-
tn(e, c, d, p, y), m = O;
|
|
1783
|
-
}
|
|
1784
|
-
if (!F(g) || !S(d))
|
|
1785
|
-
return a ? It : c;
|
|
1786
|
-
let N = `${d}__${c}`;
|
|
1787
|
-
Ot(v) || (N = `${N}__${JSON.stringify(v)}`);
|
|
1788
|
-
let M = l.get(N);
|
|
1789
|
-
return M || (M = new Intl.DateTimeFormat(d, re({}, g, v)), l.set(N, M)), R ? M.formatToParts(_) : M.format(_);
|
|
1790
|
-
}
|
|
1791
|
-
const ga = [
|
|
1792
|
-
"localeMatcher",
|
|
1793
|
-
"weekday",
|
|
1794
|
-
"era",
|
|
1795
|
-
"year",
|
|
1796
|
-
"month",
|
|
1797
|
-
"day",
|
|
1798
|
-
"hour",
|
|
1799
|
-
"minute",
|
|
1800
|
-
"second",
|
|
1801
|
-
"timeZoneName",
|
|
1802
|
-
"formatMatcher",
|
|
1803
|
-
"hour12",
|
|
1804
|
-
"timeZone",
|
|
1805
|
-
"dateStyle",
|
|
1806
|
-
"timeStyle",
|
|
1807
|
-
"calendar",
|
|
1808
|
-
"dayPeriod",
|
|
1809
|
-
"numberingSystem",
|
|
1810
|
-
"hourCycle",
|
|
1811
|
-
"fractionalSecondDigits"
|
|
1812
|
-
];
|
|
1813
|
-
function Vt(...e) {
|
|
1814
|
-
const [t, n, a, r] = e, s = K();
|
|
1815
|
-
let o = K(), l;
|
|
1816
|
-
if (S(t)) {
|
|
1817
|
-
const c = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
|
|
1818
|
-
if (!c)
|
|
1819
|
-
throw Re(fe.INVALID_ISO_DATE_ARGUMENT);
|
|
1820
|
-
const _ = c[3] ? c[3].trim().startsWith("T") ? `${c[1].trim()}${c[3].trim()}` : `${c[1].trim()}T${c[3].trim()}` : c[1].trim();
|
|
1821
|
-
l = new Date(_);
|
|
1822
|
-
try {
|
|
1823
|
-
l.toISOString();
|
|
1824
|
-
} catch {
|
|
1825
|
-
throw Re(fe.INVALID_ISO_DATE_ARGUMENT);
|
|
1826
|
-
}
|
|
1827
|
-
} else if (Ba(t)) {
|
|
1828
|
-
if (isNaN(t.getTime()))
|
|
1829
|
-
throw Re(fe.INVALID_DATE_ARGUMENT);
|
|
1830
|
-
l = t;
|
|
1831
|
-
} else if (ne(t))
|
|
1832
|
-
l = t;
|
|
1833
|
-
else
|
|
1834
|
-
throw Re(fe.INVALID_ARGUMENT);
|
|
1835
|
-
return S(n) ? s.key = n : F(n) && Object.keys(n).forEach((c) => {
|
|
1836
|
-
ga.includes(c) ? o[c] = n[c] : s[c] = n[c];
|
|
1837
|
-
}), S(a) ? s.locale = a : F(a) && (o = a), F(r) && (o = r), [s.key || "", l, s, o];
|
|
1838
|
-
}
|
|
1839
|
-
function yn(e, t, n) {
|
|
1840
|
-
const a = e;
|
|
1841
|
-
for (const r in n) {
|
|
1842
|
-
const s = `${t}__${r}`;
|
|
1843
|
-
a.__datetimeFormatters.has(s) && a.__datetimeFormatters.delete(s);
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
function Sn(e, ...t) {
|
|
1847
|
-
const { numberFormats: n, unresolving: a, fallbackLocale: r, onWarn: s, localeFallbacker: o } = e, { __numberFormatters: l } = e;
|
|
1848
|
-
if (process.env.NODE_ENV !== "production" && !pa.numberFormat)
|
|
1849
|
-
return s(Ke(me.CANNOT_FORMAT_NUMBER)), bt;
|
|
1850
|
-
const [c, _, b, v] = $t(...t), p = x(b.missingWarn) ? b.missingWarn : e.missingWarn, P = x(b.fallbackWarn) ? b.fallbackWarn : e.fallbackWarn, R = !!b.part, I = en(e, b), L = o(
|
|
1851
|
-
e,
|
|
1852
|
-
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1853
|
-
r,
|
|
1854
|
-
I
|
|
1855
|
-
);
|
|
1856
|
-
if (!S(c) || c === "")
|
|
1857
|
-
return new Intl.NumberFormat(I, v).format(_);
|
|
1858
|
-
let f = {}, d, g = null, m = I, O = null;
|
|
1859
|
-
const y = "number format";
|
|
1860
|
-
for (let V = 0; V < L.length; V++) {
|
|
1861
|
-
if (d = O = L[V], process.env.NODE_ENV !== "production" && I !== d && yt(P, c) && s(Ke(me.FALLBACK_TO_NUMBER_FORMAT, {
|
|
1862
|
-
key: c,
|
|
1863
|
-
target: d
|
|
1864
|
-
})), process.env.NODE_ENV !== "production" && I !== d) {
|
|
1865
|
-
const q = e.__v_emitter;
|
|
1866
|
-
q && q.emit("fallback", {
|
|
1867
|
-
type: y,
|
|
1868
|
-
key: c,
|
|
1869
|
-
from: m,
|
|
1870
|
-
to: O,
|
|
1871
|
-
groupId: `${y}:${c}`
|
|
1872
|
-
});
|
|
1873
|
-
}
|
|
1874
|
-
if (f = n[d] || {}, g = f[c], F(g))
|
|
1875
|
-
break;
|
|
1876
|
-
tn(e, c, d, p, y), m = O;
|
|
1877
|
-
}
|
|
1878
|
-
if (!F(g) || !S(d))
|
|
1879
|
-
return a ? It : c;
|
|
1880
|
-
let N = `${d}__${c}`;
|
|
1881
|
-
Ot(v) || (N = `${N}__${JSON.stringify(v)}`);
|
|
1882
|
-
let M = l.get(N);
|
|
1883
|
-
return M || (M = new Intl.NumberFormat(d, re({}, g, v)), l.set(N, M)), R ? M.formatToParts(_) : M.format(_);
|
|
1884
|
-
}
|
|
1885
|
-
const va = [
|
|
1886
|
-
"localeMatcher",
|
|
1887
|
-
"style",
|
|
1888
|
-
"currency",
|
|
1889
|
-
"currencyDisplay",
|
|
1890
|
-
"currencySign",
|
|
1891
|
-
"useGrouping",
|
|
1892
|
-
"minimumIntegerDigits",
|
|
1893
|
-
"minimumFractionDigits",
|
|
1894
|
-
"maximumFractionDigits",
|
|
1895
|
-
"minimumSignificantDigits",
|
|
1896
|
-
"maximumSignificantDigits",
|
|
1897
|
-
"compactDisplay",
|
|
1898
|
-
"notation",
|
|
1899
|
-
"signDisplay",
|
|
1900
|
-
"unit",
|
|
1901
|
-
"unitDisplay",
|
|
1902
|
-
"roundingMode",
|
|
1903
|
-
"roundingPriority",
|
|
1904
|
-
"roundingIncrement",
|
|
1905
|
-
"trailingZeroDisplay"
|
|
1906
|
-
];
|
|
1907
|
-
function $t(...e) {
|
|
1908
|
-
const [t, n, a, r] = e, s = K();
|
|
1909
|
-
let o = K();
|
|
1910
|
-
if (!ne(t))
|
|
1911
|
-
throw Re(fe.INVALID_ARGUMENT);
|
|
1912
|
-
const l = t;
|
|
1913
|
-
return S(n) ? s.key = n : F(n) && Object.keys(n).forEach((c) => {
|
|
1914
|
-
va.includes(c) ? o[c] = n[c] : s[c] = n[c];
|
|
1915
|
-
}), S(a) ? s.locale = a : F(a) && (o = a), F(r) && (o = r), [s.key || "", l, s, o];
|
|
1916
|
-
}
|
|
1917
|
-
function An(e, t, n) {
|
|
1918
|
-
const a = e;
|
|
1919
|
-
for (const r in n) {
|
|
1920
|
-
const s = `${t}__${r}`;
|
|
1921
|
-
a.__numberFormatters.has(s) && a.__numberFormatters.delete(s);
|
|
1922
|
-
}
|
|
1923
|
-
}
|
|
1924
|
-
const gs = (e) => e, vs = (e) => "", Ns = "text", hs = (e) => e.length === 0 ? "" : Qt(e), bs = Za;
|
|
1925
|
-
function Pn(e, t) {
|
|
1926
|
-
return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
|
|
1927
|
-
}
|
|
1928
|
-
function Ts(e) {
|
|
1929
|
-
const t = ne(e.pluralIndex) ? e.pluralIndex : -1;
|
|
1930
|
-
return e.named && (ne(e.named.count) || ne(e.named.n)) ? ne(e.named.count) ? e.named.count : ne(e.named.n) ? e.named.n : t : t;
|
|
1931
|
-
}
|
|
1932
|
-
function Ls(e, t) {
|
|
1933
|
-
t.count || (t.count = e), t.n || (t.n = e);
|
|
1934
|
-
}
|
|
1935
|
-
function Os(e = {}) {
|
|
1936
|
-
const t = e.locale, n = Ts(e), a = $(e.pluralRules) && S(t) && X(e.pluralRules[t]) ? e.pluralRules[t] : Pn, r = $(e.pluralRules) && S(t) && X(e.pluralRules[t]) ? Pn : void 0, s = (f) => f[a(n, f.length, r)], o = e.list || [], l = (f) => o[f], c = e.named || K();
|
|
1937
|
-
ne(e.pluralIndex) && Ls(n, c);
|
|
1938
|
-
const _ = (f) => c[f];
|
|
1939
|
-
function b(f, d) {
|
|
1940
|
-
const g = X(e.messages) ? e.messages(f, !!d) : $(e.messages) ? e.messages[f] : !1;
|
|
1941
|
-
return g || (e.parent ? e.parent.message(f) : vs);
|
|
1942
|
-
}
|
|
1943
|
-
const v = (f) => e.modifiers ? e.modifiers[f] : gs, p = F(e.processor) && X(e.processor.normalize) ? e.processor.normalize : hs, P = F(e.processor) && X(e.processor.interpolate) ? e.processor.interpolate : bs, R = F(e.processor) && S(e.processor.type) ? e.processor.type : Ns, L = {
|
|
1944
|
-
list: l,
|
|
1945
|
-
named: _,
|
|
1946
|
-
plural: s,
|
|
1947
|
-
linked: (f, ...d) => {
|
|
1948
|
-
const [g, m] = d;
|
|
1949
|
-
let O = "text", y = "";
|
|
1950
|
-
d.length === 1 ? $(g) ? (y = g.modifier || y, O = g.type || O) : S(g) && (y = g || y) : d.length === 2 && (S(g) && (y = g || y), S(m) && (O = m || O));
|
|
1951
|
-
const N = b(f, !0)(L), M = (
|
|
1952
|
-
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
|
1953
|
-
O === "vnode" && z(N) && y ? N[0] : N
|
|
1954
|
-
);
|
|
1955
|
-
return y ? v(y)(M, O) : M;
|
|
1956
|
-
},
|
|
1957
|
-
message: b,
|
|
1958
|
-
type: R,
|
|
1959
|
-
interpolate: P,
|
|
1960
|
-
normalize: p,
|
|
1961
|
-
values: re(K(), o, c)
|
|
1962
|
-
};
|
|
1963
|
-
return L;
|
|
1964
|
-
}
|
|
1965
|
-
const Cn = () => "", ge = (e) => X(e);
|
|
1966
|
-
function kn(e, ...t) {
|
|
1967
|
-
const { fallbackFormat: n, postTranslation: a, unresolving: r, messageCompiler: s, fallbackLocale: o, messages: l } = e, [c, _] = xt(...t), b = x(_.missingWarn) ? _.missingWarn : e.missingWarn, v = x(_.fallbackWarn) ? _.fallbackWarn : e.fallbackWarn, p = x(_.escapeParameter) ? _.escapeParameter : e.escapeParameter, P = !!_.resolvedMessage, R = S(_.default) || x(_.default) ? x(_.default) ? s ? c : () => c : _.default : n ? s ? c : () => c : null, I = n || R != null && (S(R) || X(R)), L = en(e, _);
|
|
1968
|
-
p && Is(_);
|
|
1969
|
-
let [f, d, g] = P ? [
|
|
1970
|
-
c,
|
|
1971
|
-
L,
|
|
1972
|
-
l[L] || K()
|
|
1973
|
-
] : Na(e, c, L, o, v, b), m = f, O = c;
|
|
1974
|
-
if (!P && !(S(m) || Ne(m) || ge(m)) && I && (m = R, O = m), !P && (!(S(m) || Ne(m) || ge(m)) || !S(d)))
|
|
1975
|
-
return r ? It : c;
|
|
1976
|
-
if (process.env.NODE_ENV !== "production" && S(m) && e.messageCompiler == null)
|
|
1977
|
-
return Se(`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 '${c}'.`), c;
|
|
1978
|
-
let y = !1;
|
|
1979
|
-
const N = () => {
|
|
1980
|
-
y = !0;
|
|
1981
|
-
}, M = ge(m) ? m : ha(e, c, d, m, O, N);
|
|
1982
|
-
if (y)
|
|
1983
|
-
return m;
|
|
1984
|
-
const V = Ps(e, d, g, _), q = Os(V), ce = ys(e, M, q);
|
|
1985
|
-
let D = a ? a(ce, c) : ce;
|
|
1986
|
-
if (p && S(D) && (D = Ja(D)), process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
1987
|
-
const W = {
|
|
1988
|
-
timestamp: Date.now(),
|
|
1989
|
-
key: S(c) ? c : ge(m) ? m.key : "",
|
|
1990
|
-
locale: d || (ge(m) ? m.locale : ""),
|
|
1991
|
-
format: S(m) ? m : ge(m) ? m.source : "",
|
|
1992
|
-
message: D
|
|
1993
|
-
};
|
|
1994
|
-
W.meta = re({}, e.__meta, /* @__PURE__ */ _s() || {}), Yr(W);
|
|
1995
|
-
}
|
|
1996
|
-
return D;
|
|
1997
|
-
}
|
|
1998
|
-
function Is(e) {
|
|
1999
|
-
z(e.list) ? e.list = e.list.map((t) => S(t) ? fn(t) : t) : $(e.named) && Object.keys(e.named).forEach((t) => {
|
|
2000
|
-
S(e.named[t]) && (e.named[t] = fn(e.named[t]));
|
|
2001
|
-
});
|
|
2002
|
-
}
|
|
2003
|
-
function Na(e, t, n, a, r, s) {
|
|
2004
|
-
const { messages: o, onWarn: l, messageResolver: c, localeFallbacker: _ } = e, b = _(e, a, n);
|
|
2005
|
-
let v = K(), p, P = null, R = n, I = null;
|
|
2006
|
-
const L = "translate";
|
|
2007
|
-
for (let f = 0; f < b.length; f++) {
|
|
2008
|
-
if (p = I = b[f], process.env.NODE_ENV !== "production" && n !== p && !Ea(n, p) && yt(r, t) && l(Ke(me.FALLBACK_TO_TRANSLATE, {
|
|
2009
|
-
key: t,
|
|
2010
|
-
target: p
|
|
2011
|
-
})), process.env.NODE_ENV !== "production" && n !== p) {
|
|
2012
|
-
const O = e.__v_emitter;
|
|
2013
|
-
O && O.emit("fallback", {
|
|
2014
|
-
type: L,
|
|
2015
|
-
key: t,
|
|
2016
|
-
from: R,
|
|
2017
|
-
to: I,
|
|
2018
|
-
groupId: `${L}:${t}`
|
|
2019
|
-
});
|
|
2020
|
-
}
|
|
2021
|
-
v = o[p] || K();
|
|
2022
|
-
let d = null, g, m;
|
|
2023
|
-
if (process.env.NODE_ENV !== "production" && Le && (d = window.performance.now(), g = "intlify-message-resolve-start", m = "intlify-message-resolve-end", pe && pe(g)), (P = c(v, t)) === null && (P = v[t]), process.env.NODE_ENV !== "production" && Le) {
|
|
2024
|
-
const O = window.performance.now(), y = e.__v_emitter;
|
|
2025
|
-
y && d && P && y.emit("message-resolve", {
|
|
2026
|
-
type: "message-resolve",
|
|
2027
|
-
key: t,
|
|
2028
|
-
message: P,
|
|
2029
|
-
time: O - d,
|
|
2030
|
-
groupId: `${L}:${t}`
|
|
2031
|
-
}), g && m && pe && He && (pe(m), He("intlify message resolve", g, m));
|
|
2032
|
-
}
|
|
2033
|
-
if (S(P) || Ne(P) || ge(P))
|
|
2034
|
-
break;
|
|
2035
|
-
if (!ps(p, b)) {
|
|
2036
|
-
const O = tn(
|
|
2037
|
-
e,
|
|
2038
|
-
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2039
|
-
t,
|
|
2040
|
-
p,
|
|
2041
|
-
s,
|
|
2042
|
-
L
|
|
2043
|
-
);
|
|
2044
|
-
O !== t && (P = O);
|
|
2045
|
-
}
|
|
2046
|
-
R = I;
|
|
2047
|
-
}
|
|
2048
|
-
return [P, p, v];
|
|
2049
|
-
}
|
|
2050
|
-
function ha(e, t, n, a, r, s) {
|
|
2051
|
-
const { messageCompiler: o, warnHtmlMessage: l } = e;
|
|
2052
|
-
if (ge(a)) {
|
|
2053
|
-
const p = a;
|
|
2054
|
-
return p.locale = p.locale || n, p.key = p.key || t, p;
|
|
2055
|
-
}
|
|
2056
|
-
if (o == null) {
|
|
2057
|
-
const p = (() => a);
|
|
2058
|
-
return p.locale = n, p.key = t, p;
|
|
2059
|
-
}
|
|
2060
|
-
let c = null, _, b;
|
|
2061
|
-
process.env.NODE_ENV !== "production" && Le && (c = window.performance.now(), _ = "intlify-message-compilation-start", b = "intlify-message-compilation-end", pe && pe(_));
|
|
2062
|
-
const v = o(a, Ss(e, n, r, a, l, s));
|
|
2063
|
-
if (process.env.NODE_ENV !== "production" && Le) {
|
|
2064
|
-
const p = window.performance.now(), P = e.__v_emitter;
|
|
2065
|
-
P && c && P.emit("message-compilation", {
|
|
2066
|
-
type: "message-compilation",
|
|
2067
|
-
message: a,
|
|
2068
|
-
time: p - c,
|
|
2069
|
-
groupId: `translate:${t}`
|
|
2070
|
-
}), _ && b && pe && He && (pe(b), He("intlify message compilation", _, b));
|
|
2071
|
-
}
|
|
2072
|
-
return v.locale = n, v.key = t, v.source = a, v;
|
|
2073
|
-
}
|
|
2074
|
-
function ys(e, t, n) {
|
|
2075
|
-
let a = null, r, s;
|
|
2076
|
-
process.env.NODE_ENV !== "production" && Le && (a = window.performance.now(), r = "intlify-message-evaluation-start", s = "intlify-message-evaluation-end", pe && pe(r));
|
|
2077
|
-
const o = t(n);
|
|
2078
|
-
if (process.env.NODE_ENV !== "production" && Le) {
|
|
2079
|
-
const l = window.performance.now(), c = e.__v_emitter;
|
|
2080
|
-
c && a && c.emit("message-evaluation", {
|
|
2081
|
-
type: "message-evaluation",
|
|
2082
|
-
value: o,
|
|
2083
|
-
time: l - a,
|
|
2084
|
-
groupId: `translate:${t.key}`
|
|
2085
|
-
}), r && s && pe && He && (pe(s), He("intlify message evaluation", r, s));
|
|
2086
|
-
}
|
|
2087
|
-
return o;
|
|
2088
|
-
}
|
|
2089
|
-
function xt(...e) {
|
|
2090
|
-
const [t, n, a] = e, r = K();
|
|
2091
|
-
if (!S(t) && !ne(t) && !ge(t) && !Ne(t))
|
|
2092
|
-
throw Re(fe.INVALID_ARGUMENT);
|
|
2093
|
-
const s = ne(t) ? String(t) : (ge(t), t);
|
|
2094
|
-
return ne(n) ? r.plural = n : S(n) ? r.default = n : F(n) && !Ot(n) ? r.named = n : z(n) && (r.list = n), ne(a) ? r.plural = a : S(a) ? r.default = a : F(a) && re(r, a), [s, r];
|
|
2095
|
-
}
|
|
2096
|
-
function Ss(e, t, n, a, r, s) {
|
|
2097
|
-
return {
|
|
2098
|
-
locale: t,
|
|
2099
|
-
key: n,
|
|
2100
|
-
warnHtmlMessage: r,
|
|
2101
|
-
onError: (o) => {
|
|
2102
|
-
if (s && s(o), process.env.NODE_ENV !== "production") {
|
|
2103
|
-
const l = As(a), c = `Message compilation error: ${o.message}`, _ = o.location && l && za(l, o.location.start.offset, o.location.end.offset), b = e.__v_emitter;
|
|
2104
|
-
b && l && b.emit("compile-error", {
|
|
2105
|
-
message: l,
|
|
2106
|
-
error: o.message,
|
|
2107
|
-
start: o.location && o.location.start.offset,
|
|
2108
|
-
end: o.location && o.location.end.offset,
|
|
2109
|
-
groupId: `translate:${n}`
|
|
2110
|
-
}), console.error(_ ? `${c}
|
|
2111
|
-
${_}` : c);
|
|
2112
|
-
} else
|
|
2113
|
-
throw o;
|
|
2114
|
-
},
|
|
2115
|
-
onCacheKey: (o) => Ha(t, n, o)
|
|
2116
|
-
};
|
|
2117
|
-
}
|
|
2118
|
-
function As(e) {
|
|
2119
|
-
if (S(e))
|
|
2120
|
-
return e;
|
|
2121
|
-
if (e.loc && e.loc.source)
|
|
2122
|
-
return e.loc.source;
|
|
2123
|
-
}
|
|
2124
|
-
function Ps(e, t, n, a) {
|
|
2125
|
-
const { modifiers: r, pluralRules: s, messageResolver: o, fallbackLocale: l, fallbackWarn: c, missingWarn: _, fallbackContext: b } = e, p = {
|
|
2126
|
-
locale: t,
|
|
2127
|
-
modifiers: r,
|
|
2128
|
-
pluralRules: s,
|
|
2129
|
-
messages: (P, R) => {
|
|
2130
|
-
let I = o(n, P);
|
|
2131
|
-
if (I == null && (b || R)) {
|
|
2132
|
-
const [, , L] = Na(
|
|
2133
|
-
b || e,
|
|
2134
|
-
// NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
|
|
2135
|
-
P,
|
|
2136
|
-
t,
|
|
2137
|
-
l,
|
|
2138
|
-
c,
|
|
2139
|
-
_
|
|
2140
|
-
);
|
|
2141
|
-
I = o(L, P);
|
|
2142
|
-
}
|
|
2143
|
-
if (S(I) || Ne(I)) {
|
|
2144
|
-
let L = !1;
|
|
2145
|
-
const d = ha(e, P, t, I, P, () => {
|
|
2146
|
-
L = !0;
|
|
2147
|
-
});
|
|
2148
|
-
return L ? Cn : d;
|
|
2149
|
-
} else return ge(I) ? I : Cn;
|
|
2150
|
-
}
|
|
2151
|
-
};
|
|
2152
|
-
return e.processor && (p.processor = e.processor), a.list && (p.list = a.list), a.named && (p.named = a.named), ne(a.plural) && (p.pluralIndex = a.plural), p;
|
|
2153
|
-
}
|
|
2154
|
-
Pr();
|
|
2155
|
-
function Cs() {
|
|
2156
|
-
return ba().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
2157
|
-
}
|
|
2158
|
-
function ba() {
|
|
2159
|
-
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
2160
|
-
}
|
|
2161
|
-
const ks = typeof Proxy == "function", Rs = "devtools-plugin:setup", Ds = "plugin:settings:set";
|
|
2162
|
-
let qe, Wt;
|
|
2163
|
-
function ws() {
|
|
2164
|
-
var e;
|
|
2165
|
-
return qe !== void 0 || (typeof window < "u" && window.performance ? (qe = !0, Wt = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (qe = !0, Wt = globalThis.perf_hooks.performance) : qe = !1), qe;
|
|
2166
|
-
}
|
|
2167
|
-
function Ms() {
|
|
2168
|
-
return ws() ? Wt.now() : Date.now();
|
|
2169
|
-
}
|
|
2170
|
-
class Fs {
|
|
2171
|
-
constructor(t, n) {
|
|
2172
|
-
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
|
|
2173
|
-
const a = {};
|
|
2174
|
-
if (t.settings)
|
|
2175
|
-
for (const o in t.settings) {
|
|
2176
|
-
const l = t.settings[o];
|
|
2177
|
-
a[o] = l.defaultValue;
|
|
2178
|
-
}
|
|
2179
|
-
const r = `__vue-devtools-plugin-settings__${t.id}`;
|
|
2180
|
-
let s = Object.assign({}, a);
|
|
2181
|
-
try {
|
|
2182
|
-
const o = localStorage.getItem(r), l = JSON.parse(o);
|
|
2183
|
-
Object.assign(s, l);
|
|
2184
|
-
} catch {
|
|
2185
|
-
}
|
|
2186
|
-
this.fallbacks = {
|
|
2187
|
-
getSettings() {
|
|
2188
|
-
return s;
|
|
2189
|
-
},
|
|
2190
|
-
setSettings(o) {
|
|
2191
|
-
try {
|
|
2192
|
-
localStorage.setItem(r, JSON.stringify(o));
|
|
2193
|
-
} catch {
|
|
2194
|
-
}
|
|
2195
|
-
s = o;
|
|
2196
|
-
},
|
|
2197
|
-
now() {
|
|
2198
|
-
return Ms();
|
|
2199
|
-
}
|
|
2200
|
-
}, n && n.on(Ds, (o, l) => {
|
|
2201
|
-
o === this.plugin.id && this.fallbacks.setSettings(l);
|
|
2202
|
-
}), this.proxiedOn = new Proxy({}, {
|
|
2203
|
-
get: (o, l) => this.target ? this.target.on[l] : (...c) => {
|
|
2204
|
-
this.onQueue.push({
|
|
2205
|
-
method: l,
|
|
2206
|
-
args: c
|
|
2207
|
-
});
|
|
2208
|
-
}
|
|
2209
|
-
}), this.proxiedTarget = new Proxy({}, {
|
|
2210
|
-
get: (o, l) => this.target ? this.target[l] : l === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(l) ? (...c) => (this.targetQueue.push({
|
|
2211
|
-
method: l,
|
|
2212
|
-
args: c,
|
|
2213
|
-
resolve: () => {
|
|
2214
|
-
}
|
|
2215
|
-
}), this.fallbacks[l](...c)) : (...c) => new Promise((_) => {
|
|
2216
|
-
this.targetQueue.push({
|
|
2217
|
-
method: l,
|
|
2218
|
-
args: c,
|
|
2219
|
-
resolve: _
|
|
2220
|
-
});
|
|
2221
|
-
})
|
|
2222
|
-
});
|
|
2223
|
-
}
|
|
2224
|
-
async setRealTarget(t) {
|
|
2225
|
-
this.target = t;
|
|
2226
|
-
for (const n of this.onQueue)
|
|
2227
|
-
this.target.on[n.method](...n.args);
|
|
2228
|
-
for (const n of this.targetQueue)
|
|
2229
|
-
n.resolve(await this.target[n.method](...n.args));
|
|
2230
|
-
}
|
|
2231
|
-
}
|
|
2232
|
-
function Us(e, t) {
|
|
2233
|
-
const n = e, a = ba(), r = Cs(), s = ks && n.enableEarlyProxy;
|
|
2234
|
-
if (r && (a.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
|
|
2235
|
-
r.emit(Rs, e, t);
|
|
2236
|
-
else {
|
|
2237
|
-
const o = s ? new Fs(n, r) : null;
|
|
2238
|
-
(a.__VUE_DEVTOOLS_PLUGINS__ = a.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
2239
|
-
pluginDescriptor: n,
|
|
2240
|
-
setupFn: t,
|
|
2241
|
-
proxy: o
|
|
2242
|
-
}), o && t(o.proxiedTarget);
|
|
2243
|
-
}
|
|
2244
|
-
}
|
|
2245
|
-
/*!
|
|
2246
|
-
* vue-i18n v11.2.8
|
|
2247
|
-
* (c) 2025 kazuya kawaguchi
|
|
2248
|
-
* Released under the MIT License.
|
|
2249
|
-
*/
|
|
2250
|
-
const Vs = "11.2.8";
|
|
2251
|
-
function $s() {
|
|
2252
|
-
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Ye().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Ye().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ye().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ye().__INTLIFY_PROD_DEVTOOLS__ = !1);
|
|
2253
|
-
}
|
|
2254
|
-
const J = {
|
|
2255
|
-
// composer module errors
|
|
2256
|
-
UNEXPECTED_RETURN_TYPE: Kr,
|
|
2257
|
-
// 24
|
|
2258
|
-
// legacy module errors
|
|
2259
|
-
INVALID_ARGUMENT: 25,
|
|
2260
|
-
// i18n module errors
|
|
2261
|
-
MUST_BE_CALL_SETUP_TOP: 26,
|
|
2262
|
-
NOT_INSTALLED: 27,
|
|
2263
|
-
// directive module errors
|
|
2264
|
-
REQUIRED_VALUE: 28,
|
|
2265
|
-
INVALID_VALUE: 29,
|
|
2266
|
-
// vue-devtools errors
|
|
2267
|
-
CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: 30,
|
|
2268
|
-
NOT_INSTALLED_WITH_PROVIDE: 31,
|
|
2269
|
-
// unexpected error
|
|
2270
|
-
UNEXPECTED_ERROR: 32,
|
|
2271
|
-
// not compatible legacy vue-i18n constructor
|
|
2272
|
-
NOT_COMPATIBLE_LEGACY_VUE_I18N: 33,
|
|
2273
|
-
// Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly
|
|
2274
|
-
NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
|
|
2275
|
-
};
|
|
2276
|
-
function Ee(e, ...t) {
|
|
2277
|
-
return at(e, null, process.env.NODE_ENV !== "production" ? { messages: xs, args: t } : void 0);
|
|
2278
|
-
}
|
|
2279
|
-
const xs = {
|
|
2280
|
-
[J.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
|
|
2281
|
-
[J.INVALID_ARGUMENT]: "Invalid argument",
|
|
2282
|
-
[J.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
|
|
2283
|
-
[J.NOT_INSTALLED]: "Need to install with `app.use` function",
|
|
2284
|
-
[J.UNEXPECTED_ERROR]: "Unexpected error",
|
|
2285
|
-
[J.REQUIRED_VALUE]: "Required in value: {0}",
|
|
2286
|
-
[J.INVALID_VALUE]: "Invalid value",
|
|
2287
|
-
[J.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: "Cannot setup vue-devtools plugin",
|
|
2288
|
-
[J.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
|
|
2289
|
-
[J.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
|
|
2290
|
-
[J.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
|
|
2291
|
-
}, Gt = /* @__PURE__ */ Ae("__translateVNode"), jt = /* @__PURE__ */ Ae("__datetimeParts"), Yt = /* @__PURE__ */ Ae("__numberParts"), Be = /* @__PURE__ */ Ae("__enableEmitter"), ft = /* @__PURE__ */ Ae("__disableEmitter"), Ta = Ae("__setPluralRules"), La = /* @__PURE__ */ Ae("__injectWithOption"), Ht = /* @__PURE__ */ Ae("__dispose"), ve = {
|
|
2292
|
-
FALLBACK_TO_ROOT: ss,
|
|
2293
|
-
// 8
|
|
2294
|
-
NOT_FOUND_PARENT_SCOPE: 9,
|
|
2295
|
-
IGNORE_OBJ_FLATTEN: 10,
|
|
2296
|
-
/**
|
|
2297
|
-
* @deprecated will be removed at vue-i18n v12
|
|
2298
|
-
*/
|
|
2299
|
-
DEPRECATE_LEGACY_MODE: 11,
|
|
2300
|
-
/**
|
|
2301
|
-
* @deprecated will be removed at vue-i18n v12
|
|
2302
|
-
*/
|
|
2303
|
-
DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12,
|
|
2304
|
-
// duplicate `useI18n` calling
|
|
2305
|
-
DUPLICATE_USE_I18N_CALLING: 13
|
|
2306
|
-
}, Ws = {
|
|
2307
|
-
[ve.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
|
|
2308
|
-
[ve.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
|
|
2309
|
-
[ve.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
|
|
2310
|
-
/**
|
|
2311
|
-
* @deprecated will be removed at vue-i18n v12
|
|
2312
|
-
*/
|
|
2313
|
-
[ve.DEPRECATE_LEGACY_MODE]: `Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
|
2314
|
-
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,
|
|
2315
|
-
/**
|
|
2316
|
-
* @deprecated will be removed at vue-i18n v12
|
|
2317
|
-
*/
|
|
2318
|
-
[ve.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: "'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",
|
|
2319
|
-
[ve.DUPLICATE_USE_I18N_CALLING]: "Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."
|
|
2320
|
-
};
|
|
2321
|
-
function nt(e, ...t) {
|
|
2322
|
-
return Lt(Ws[e], ...t);
|
|
2323
|
-
}
|
|
2324
|
-
function dt(e) {
|
|
2325
|
-
if (!$(e) || Ne(e))
|
|
2326
|
-
return e;
|
|
2327
|
-
for (const t in e)
|
|
2328
|
-
if (Te(e, t))
|
|
2329
|
-
if (!t.includes("."))
|
|
2330
|
-
$(e[t]) && dt(e[t]);
|
|
2331
|
-
else {
|
|
2332
|
-
const n = t.split("."), a = n.length - 1;
|
|
2333
|
-
let r = e, s = !1;
|
|
2334
|
-
for (let o = 0; o < a; o++) {
|
|
2335
|
-
if (n[o] === "__proto__")
|
|
2336
|
-
throw new Error(`unsafe key: ${n[o]}`);
|
|
2337
|
-
if (n[o] in r || (r[n[o]] = K()), !$(r[n[o]])) {
|
|
2338
|
-
process.env.NODE_ENV !== "production" && Se(nt(ve.IGNORE_OBJ_FLATTEN, {
|
|
2339
|
-
key: n[o]
|
|
2340
|
-
})), s = !0;
|
|
2341
|
-
break;
|
|
2342
|
-
}
|
|
2343
|
-
r = r[n[o]];
|
|
2344
|
-
}
|
|
2345
|
-
if (s || (Ne(r) ? la.includes(n[a]) || delete e[t] : (r[n[a]] = e[t], delete e[t])), !Ne(r)) {
|
|
2346
|
-
const o = r[n[a]];
|
|
2347
|
-
$(o) && dt(o);
|
|
2348
|
-
}
|
|
2349
|
-
}
|
|
2350
|
-
return e;
|
|
2351
|
-
}
|
|
2352
|
-
function nn(e, t) {
|
|
2353
|
-
const { messages: n, __i18n: a, messageResolver: r, flatJson: s } = t, o = F(n) ? n : z(a) ? K() : { [e]: K() };
|
|
2354
|
-
if (z(a) && a.forEach((l) => {
|
|
2355
|
-
if ("locale" in l && "resource" in l) {
|
|
2356
|
-
const { locale: c, resource: _ } = l;
|
|
2357
|
-
c ? (o[c] = o[c] || K(), Nt(_, o[c])) : Nt(_, o);
|
|
2358
|
-
} else
|
|
2359
|
-
S(l) && Nt(JSON.parse(l), o);
|
|
2360
|
-
}), r == null && s)
|
|
2361
|
-
for (const l in o)
|
|
2362
|
-
Te(o, l) && dt(o[l]);
|
|
2363
|
-
return o;
|
|
2364
|
-
}
|
|
2365
|
-
function Oa(e) {
|
|
2366
|
-
return e.type;
|
|
2367
|
-
}
|
|
2368
|
-
function Ia(e, t, n) {
|
|
2369
|
-
let a = $(t.messages) ? t.messages : K();
|
|
2370
|
-
"__i18nGlobal" in n && (a = nn(e.locale.value, {
|
|
2371
|
-
messages: a,
|
|
2372
|
-
__i18n: n.__i18nGlobal
|
|
2373
|
-
}));
|
|
2374
|
-
const r = Object.keys(a);
|
|
2375
|
-
r.length && r.forEach((s) => {
|
|
2376
|
-
e.mergeLocaleMessage(s, a[s]);
|
|
2377
|
-
});
|
|
2378
|
-
{
|
|
2379
|
-
if ($(t.datetimeFormats)) {
|
|
2380
|
-
const s = Object.keys(t.datetimeFormats);
|
|
2381
|
-
s.length && s.forEach((o) => {
|
|
2382
|
-
e.mergeDateTimeFormat(o, t.datetimeFormats[o]);
|
|
2383
|
-
});
|
|
2384
|
-
}
|
|
2385
|
-
if ($(t.numberFormats)) {
|
|
2386
|
-
const s = Object.keys(t.numberFormats);
|
|
2387
|
-
s.length && s.forEach((o) => {
|
|
2388
|
-
e.mergeNumberFormat(o, t.numberFormats[o]);
|
|
2389
|
-
});
|
|
2390
|
-
}
|
|
2391
|
-
}
|
|
2392
|
-
}
|
|
2393
|
-
function Rn(e) {
|
|
2394
|
-
return vt(Wa, null, e, 0);
|
|
2395
|
-
}
|
|
2396
|
-
function ze() {
|
|
2397
|
-
const e = "currentInstance";
|
|
2398
|
-
return e in kt ? kt[e] : kt.getCurrentInstance();
|
|
2399
|
-
}
|
|
2400
|
-
const Dn = "__INTLIFY_META__", wn = () => [], Gs = () => !1;
|
|
2401
|
-
let Mn = 0;
|
|
2402
|
-
function Fn(e) {
|
|
2403
|
-
return ((t, n, a, r) => e(n, a, ze() || void 0, r));
|
|
2404
|
-
}
|
|
2405
|
-
const js = /* @__NO_SIDE_EFFECTS__ */ () => {
|
|
2406
|
-
const e = ze();
|
|
2407
|
-
let t = null;
|
|
2408
|
-
return e && (t = Oa(e)[Dn]) ? { [Dn]: t } : null;
|
|
2409
|
-
};
|
|
2410
|
-
function an(e = {}) {
|
|
2411
|
-
const { __root: t, __injectWithOption: n } = e, a = t === void 0, r = e.flatJson, s = Le ? Q : Ua;
|
|
2412
|
-
let o = x(e.inheritLocale) ? e.inheritLocale : !0;
|
|
2413
|
-
const l = s(
|
|
2414
|
-
// prettier-ignore
|
|
2415
|
-
t && o ? t.locale.value : S(e.locale) ? e.locale : ut
|
|
2416
|
-
), c = s(
|
|
2417
|
-
// prettier-ignore
|
|
2418
|
-
t && o ? t.fallbackLocale.value : S(e.fallbackLocale) || z(e.fallbackLocale) || F(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : l.value
|
|
2419
|
-
), _ = s(nn(l.value, e)), b = s(F(e.datetimeFormats) ? e.datetimeFormats : { [l.value]: {} }), v = s(F(e.numberFormats) ? e.numberFormats : { [l.value]: {} });
|
|
2420
|
-
let p = t ? t.missingWarn : x(e.missingWarn) || et(e.missingWarn) ? e.missingWarn : !0, P = t ? t.fallbackWarn : x(e.fallbackWarn) || et(e.fallbackWarn) ? e.fallbackWarn : !0, R = t ? t.fallbackRoot : x(e.fallbackRoot) ? e.fallbackRoot : !0, I = !!e.fallbackFormat, L = X(e.missing) ? e.missing : null, f = X(e.missing) ? Fn(e.missing) : null, d = X(e.postTranslation) ? e.postTranslation : null, g = t ? t.warnHtmlMessage : x(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, m = !!e.escapeParameter;
|
|
2421
|
-
const O = t ? t.modifiers : F(e.modifiers) ? e.modifiers : {};
|
|
2422
|
-
let y = e.pluralRules || t && t.pluralRules, N;
|
|
2423
|
-
N = (() => {
|
|
2424
|
-
a && Tn(null);
|
|
2425
|
-
const E = {
|
|
2426
|
-
version: Vs,
|
|
2427
|
-
locale: l.value,
|
|
2428
|
-
fallbackLocale: c.value,
|
|
2429
|
-
messages: _.value,
|
|
2430
|
-
modifiers: O,
|
|
2431
|
-
pluralRules: y,
|
|
2432
|
-
missing: f === null ? void 0 : f,
|
|
2433
|
-
missingWarn: p,
|
|
2434
|
-
fallbackWarn: P,
|
|
2435
|
-
fallbackFormat: I,
|
|
2436
|
-
unresolving: !0,
|
|
2437
|
-
postTranslation: d === null ? void 0 : d,
|
|
2438
|
-
warnHtmlMessage: g,
|
|
2439
|
-
escapeParameter: m,
|
|
2440
|
-
messageResolver: e.messageResolver,
|
|
2441
|
-
messageCompiler: e.messageCompiler,
|
|
2442
|
-
__meta: { framework: "vue" }
|
|
2443
|
-
};
|
|
2444
|
-
E.datetimeFormats = b.value, E.numberFormats = v.value, E.__datetimeFormatters = F(N) ? N.__datetimeFormatters : void 0, E.__numberFormatters = F(N) ? N.__numberFormatters : void 0, process.env.NODE_ENV !== "production" && (E.__v_emitter = F(N) ? N.__v_emitter : void 0);
|
|
2445
|
-
const T = Es(E);
|
|
2446
|
-
return a && Tn(T), T;
|
|
2447
|
-
})(), lt(N, l.value, c.value);
|
|
2448
|
-
function V() {
|
|
2449
|
-
return [
|
|
2450
|
-
l.value,
|
|
2451
|
-
c.value,
|
|
2452
|
-
_.value,
|
|
2453
|
-
b.value,
|
|
2454
|
-
v.value
|
|
2455
|
-
];
|
|
2456
|
-
}
|
|
2457
|
-
const q = le({
|
|
2458
|
-
get: () => l.value,
|
|
2459
|
-
set: (E) => {
|
|
2460
|
-
N.locale = E, l.value = E;
|
|
2461
|
-
}
|
|
2462
|
-
}), ce = le({
|
|
2463
|
-
get: () => c.value,
|
|
2464
|
-
set: (E) => {
|
|
2465
|
-
N.fallbackLocale = E, c.value = E, lt(N, l.value, E);
|
|
2466
|
-
}
|
|
2467
|
-
}), D = le(() => _.value), W = /* @__PURE__ */ le(() => b.value), de = /* @__PURE__ */ le(() => v.value);
|
|
2468
|
-
function Pe() {
|
|
2469
|
-
return X(d) ? d : null;
|
|
2470
|
-
}
|
|
2471
|
-
function C(E) {
|
|
2472
|
-
d = E, N.postTranslation = E;
|
|
2473
|
-
}
|
|
2474
|
-
function A() {
|
|
2475
|
-
return L;
|
|
2476
|
-
}
|
|
2477
|
-
function U(E) {
|
|
2478
|
-
E !== null && (f = Fn(E)), L = E, N.missing = f;
|
|
2479
|
-
}
|
|
2480
|
-
function ie(E, T) {
|
|
2481
|
-
return E !== "translate" || !T.resolvedMessage;
|
|
2482
|
-
}
|
|
2483
|
-
const se = (E, T, j, te, xe, mt) => {
|
|
2484
|
-
V();
|
|
2485
|
-
let Qe;
|
|
2486
|
-
try {
|
|
2487
|
-
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, a || (N.fallbackContext = t ? ms() : void 0), Qe = E(N);
|
|
2488
|
-
} finally {
|
|
2489
|
-
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, a || (N.fallbackContext = void 0);
|
|
2490
|
-
}
|
|
2491
|
-
if (j !== "translate exists" && // for not `te` (e.g `t`)
|
|
2492
|
-
ne(Qe) && Qe === It || j === "translate exists" && !Qe) {
|
|
2493
|
-
const [We, Ra] = T();
|
|
2494
|
-
if (process.env.NODE_ENV !== "production" && t && S(We) && ie(j, Ra) && (R && (yt(P, We) || ma(p, We)) && Se(nt(ve.FALLBACK_TO_ROOT, {
|
|
2495
|
-
key: We,
|
|
2496
|
-
type: j
|
|
2497
|
-
})), process.env.NODE_ENV !== "production")) {
|
|
2498
|
-
const { __v_emitter: on } = N;
|
|
2499
|
-
on && R && on.emit("fallback", {
|
|
2500
|
-
type: j,
|
|
2501
|
-
key: We,
|
|
2502
|
-
to: "global",
|
|
2503
|
-
groupId: `${j}:${We}`
|
|
2504
|
-
});
|
|
2505
|
-
}
|
|
2506
|
-
return t && R ? te(t) : xe(We);
|
|
2507
|
-
} else {
|
|
2508
|
-
if (mt(Qe))
|
|
2509
|
-
return Qe;
|
|
2510
|
-
throw Ee(J.UNEXPECTED_RETURN_TYPE);
|
|
2511
|
-
}
|
|
2512
|
-
};
|
|
2513
|
-
function oe(...E) {
|
|
2514
|
-
return se((T) => Reflect.apply(kn, null, [T, ...E]), () => xt(...E), "translate", (T) => Reflect.apply(T.t, T, [...E]), (T) => T, (T) => S(T));
|
|
2515
|
-
}
|
|
2516
|
-
function ae(...E) {
|
|
2517
|
-
const [T, j, te] = E;
|
|
2518
|
-
if (te && !$(te))
|
|
2519
|
-
throw Ee(J.INVALID_ARGUMENT);
|
|
2520
|
-
return oe(T, j, re({ resolvedMessage: !0 }, te || {}));
|
|
2521
|
-
}
|
|
2522
|
-
function _e(...E) {
|
|
2523
|
-
return se((T) => Reflect.apply(In, null, [T, ...E]), () => Vt(...E), "datetime format", (T) => Reflect.apply(T.d, T, [...E]), () => bt, (T) => S(T) || z(T));
|
|
2524
|
-
}
|
|
2525
|
-
function De(...E) {
|
|
2526
|
-
return se((T) => Reflect.apply(Sn, null, [T, ...E]), () => $t(...E), "number format", (T) => Reflect.apply(T.n, T, [...E]), () => bt, (T) => S(T) || z(T));
|
|
2527
|
-
}
|
|
2528
|
-
function Xe(E) {
|
|
2529
|
-
return E.map((T) => S(T) || ne(T) || x(T) ? Rn(String(T)) : T);
|
|
2530
|
-
}
|
|
2531
|
-
const we = {
|
|
2532
|
-
normalize: Xe,
|
|
2533
|
-
interpolate: (E) => E,
|
|
2534
|
-
type: "vnode"
|
|
2535
|
-
};
|
|
2536
|
-
function Ve(...E) {
|
|
2537
|
-
return se((T) => {
|
|
2538
|
-
let j;
|
|
2539
|
-
const te = T;
|
|
2540
|
-
try {
|
|
2541
|
-
te.processor = we, j = Reflect.apply(kn, null, [te, ...E]);
|
|
2542
|
-
} finally {
|
|
2543
|
-
te.processor = null;
|
|
2544
|
-
}
|
|
2545
|
-
return j;
|
|
2546
|
-
}, () => xt(...E), "translate", (T) => T[Gt](...E), (T) => [Rn(T)], (T) => z(T));
|
|
2547
|
-
}
|
|
2548
|
-
function Je(...E) {
|
|
2549
|
-
return se((T) => Reflect.apply(Sn, null, [T, ...E]), () => $t(...E), "number format", (T) => T[Yt](...E), wn, (T) => S(T) || z(T));
|
|
2550
|
-
}
|
|
2551
|
-
function Oe(...E) {
|
|
2552
|
-
return se((T) => Reflect.apply(In, null, [T, ...E]), () => Vt(...E), "datetime format", (T) => T[jt](...E), wn, (T) => S(T) || z(T));
|
|
2553
|
-
}
|
|
2554
|
-
function At(E) {
|
|
2555
|
-
y = E, N.pluralRules = y;
|
|
2556
|
-
}
|
|
2557
|
-
function Pt(E, T) {
|
|
2558
|
-
return se(() => {
|
|
2559
|
-
if (!E)
|
|
2560
|
-
return !1;
|
|
2561
|
-
const j = S(T) ? T : l.value, te = $e(j), xe = N.messageResolver(te, E);
|
|
2562
|
-
return Ne(xe) || ge(xe) || S(xe);
|
|
2563
|
-
}, () => [E], "translate exists", (j) => Reflect.apply(j.te, j, [E, T]), Gs, (j) => x(j));
|
|
2564
|
-
}
|
|
2565
|
-
function rt(E) {
|
|
2566
|
-
let T = null;
|
|
2567
|
-
const j = ia(N, c.value, l.value);
|
|
2568
|
-
for (let te = 0; te < j.length; te++) {
|
|
2569
|
-
const xe = _.value[j[te]] || {}, mt = N.messageResolver(xe, E);
|
|
2570
|
-
if (mt != null) {
|
|
2571
|
-
T = mt;
|
|
2572
|
-
break;
|
|
2573
|
-
}
|
|
2574
|
-
}
|
|
2575
|
-
return T;
|
|
2576
|
-
}
|
|
2577
|
-
function st(E) {
|
|
2578
|
-
const T = rt(E);
|
|
2579
|
-
return T ?? (t ? t.tm(E) || {} : {});
|
|
2580
|
-
}
|
|
2581
|
-
function $e(E) {
|
|
2582
|
-
return _.value[E] || {};
|
|
2583
|
-
}
|
|
2584
|
-
function ot(E, T) {
|
|
2585
|
-
if (r) {
|
|
2586
|
-
const j = { [E]: T };
|
|
2587
|
-
for (const te in j)
|
|
2588
|
-
Te(j, te) && dt(j[te]);
|
|
2589
|
-
T = j[E];
|
|
2590
|
-
}
|
|
2591
|
-
_.value[E] = T, N.messages = _.value;
|
|
2592
|
-
}
|
|
2593
|
-
function Ct(E, T) {
|
|
2594
|
-
_.value[E] = _.value[E] || {};
|
|
2595
|
-
const j = { [E]: T };
|
|
2596
|
-
if (r)
|
|
2597
|
-
for (const te in j)
|
|
2598
|
-
Te(j, te) && dt(j[te]);
|
|
2599
|
-
T = j[E], Nt(T, _.value[E]), N.messages = _.value;
|
|
2600
|
-
}
|
|
2601
|
-
function i(E) {
|
|
2602
|
-
return b.value[E] || {};
|
|
2603
|
-
}
|
|
2604
|
-
function u(E, T) {
|
|
2605
|
-
b.value[E] = T, N.datetimeFormats = b.value, yn(N, E, T);
|
|
2606
|
-
}
|
|
2607
|
-
function h(E, T) {
|
|
2608
|
-
b.value[E] = re(b.value[E] || {}, T), N.datetimeFormats = b.value, yn(N, E, T);
|
|
2609
|
-
}
|
|
2610
|
-
function k(E) {
|
|
2611
|
-
return v.value[E] || {};
|
|
2612
|
-
}
|
|
2613
|
-
function Z(E, T) {
|
|
2614
|
-
v.value[E] = T, N.numberFormats = v.value, An(N, E, T);
|
|
2615
|
-
}
|
|
2616
|
-
function ee(E, T) {
|
|
2617
|
-
v.value[E] = re(v.value[E] || {}, T), N.numberFormats = v.value, An(N, E, T);
|
|
2618
|
-
}
|
|
2619
|
-
Mn++, t && Le && (Ge(t.locale, (E) => {
|
|
2620
|
-
o && (l.value = E, N.locale = E, lt(N, l.value, c.value));
|
|
2621
|
-
}), Ge(t.fallbackLocale, (E) => {
|
|
2622
|
-
o && (c.value = E, N.fallbackLocale = E, lt(N, l.value, c.value));
|
|
2623
|
-
}));
|
|
2624
|
-
const G = {
|
|
2625
|
-
id: Mn,
|
|
2626
|
-
locale: q,
|
|
2627
|
-
fallbackLocale: ce,
|
|
2628
|
-
get inheritLocale() {
|
|
2629
|
-
return o;
|
|
2630
|
-
},
|
|
2631
|
-
set inheritLocale(E) {
|
|
2632
|
-
o = E, E && t && (l.value = t.locale.value, c.value = t.fallbackLocale.value, lt(N, l.value, c.value));
|
|
2633
|
-
},
|
|
2634
|
-
get availableLocales() {
|
|
2635
|
-
return Object.keys(_.value).sort();
|
|
2636
|
-
},
|
|
2637
|
-
messages: D,
|
|
2638
|
-
get modifiers() {
|
|
2639
|
-
return O;
|
|
2640
|
-
},
|
|
2641
|
-
get pluralRules() {
|
|
2642
|
-
return y || {};
|
|
2643
|
-
},
|
|
2644
|
-
get isGlobal() {
|
|
2645
|
-
return a;
|
|
2646
|
-
},
|
|
2647
|
-
get missingWarn() {
|
|
2648
|
-
return p;
|
|
2649
|
-
},
|
|
2650
|
-
set missingWarn(E) {
|
|
2651
|
-
p = E, N.missingWarn = p;
|
|
2652
|
-
},
|
|
2653
|
-
get fallbackWarn() {
|
|
2654
|
-
return P;
|
|
2655
|
-
},
|
|
2656
|
-
set fallbackWarn(E) {
|
|
2657
|
-
P = E, N.fallbackWarn = P;
|
|
2658
|
-
},
|
|
2659
|
-
get fallbackRoot() {
|
|
2660
|
-
return R;
|
|
2661
|
-
},
|
|
2662
|
-
set fallbackRoot(E) {
|
|
2663
|
-
R = E;
|
|
2664
|
-
},
|
|
2665
|
-
get fallbackFormat() {
|
|
2666
|
-
return I;
|
|
2667
|
-
},
|
|
2668
|
-
set fallbackFormat(E) {
|
|
2669
|
-
I = E, N.fallbackFormat = I;
|
|
2670
|
-
},
|
|
2671
|
-
get warnHtmlMessage() {
|
|
2672
|
-
return g;
|
|
2673
|
-
},
|
|
2674
|
-
set warnHtmlMessage(E) {
|
|
2675
|
-
g = E, N.warnHtmlMessage = E;
|
|
2676
|
-
},
|
|
2677
|
-
get escapeParameter() {
|
|
2678
|
-
return m;
|
|
2679
|
-
},
|
|
2680
|
-
set escapeParameter(E) {
|
|
2681
|
-
m = E, N.escapeParameter = E;
|
|
2682
|
-
},
|
|
2683
|
-
t: oe,
|
|
2684
|
-
getLocaleMessage: $e,
|
|
2685
|
-
setLocaleMessage: ot,
|
|
2686
|
-
mergeLocaleMessage: Ct,
|
|
2687
|
-
getPostTranslationHandler: Pe,
|
|
2688
|
-
setPostTranslationHandler: C,
|
|
2689
|
-
getMissingHandler: A,
|
|
2690
|
-
setMissingHandler: U,
|
|
2691
|
-
[Ta]: At
|
|
2692
|
-
};
|
|
2693
|
-
return G.datetimeFormats = W, G.numberFormats = de, G.rt = ae, G.te = Pt, G.tm = st, G.d = _e, G.n = De, G.getDateTimeFormat = i, G.setDateTimeFormat = u, G.mergeDateTimeFormat = h, G.getNumberFormat = k, G.setNumberFormat = Z, G.mergeNumberFormat = ee, G[La] = n, G[Gt] = Ve, G[jt] = Oe, G[Yt] = Je, process.env.NODE_ENV !== "production" && (G[Be] = (E) => {
|
|
2694
|
-
N.__v_emitter = E;
|
|
2695
|
-
}, G[ft] = () => {
|
|
2696
|
-
N.__v_emitter = void 0;
|
|
2697
|
-
}), G;
|
|
2698
|
-
}
|
|
2699
|
-
const ya = "vue-i18n: composer properties", Mt = {
|
|
2700
|
-
"vue-devtools-plugin-vue-i18n": "Vue I18n DevTools",
|
|
2701
|
-
"vue-i18n-resource-inspector": "Vue I18n DevTools",
|
|
2702
|
-
"vue-i18n-timeline": "Vue I18n"
|
|
2703
|
-
}, Ys = {
|
|
2704
|
-
"vue-i18n-resource-inspector": "Search for scopes ..."
|
|
2705
|
-
}, Hs = {
|
|
2706
|
-
"vue-i18n-timeline": 16764185
|
|
2707
|
-
};
|
|
2708
|
-
let Kt;
|
|
2709
|
-
async function Ks(e, t) {
|
|
2710
|
-
return new Promise((n, a) => {
|
|
2711
|
-
try {
|
|
2712
|
-
Us({
|
|
2713
|
-
id: "vue-devtools-plugin-vue-i18n",
|
|
2714
|
-
label: Mt["vue-devtools-plugin-vue-i18n"],
|
|
2715
|
-
packageName: "vue-i18n",
|
|
2716
|
-
homepage: "https://vue-i18n.intlify.dev",
|
|
2717
|
-
logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
|
|
2718
|
-
componentStateTypes: [ya],
|
|
2719
|
-
app: e
|
|
2720
|
-
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2721
|
-
}, (r) => {
|
|
2722
|
-
Kt = r, r.on.visitComponentTree(({ componentInstance: o, treeNode: l }) => {
|
|
2723
|
-
Bs(o, l, t);
|
|
2724
|
-
}), r.on.inspectComponent(({ componentInstance: o, instanceData: l }) => {
|
|
2725
|
-
o.__VUE_I18N__ && l && (t.mode === "legacy" ? o.__VUE_I18N__ !== t.global.__composer && Un(l, o.__VUE_I18N__) : Un(l, o.__VUE_I18N__));
|
|
2726
|
-
}), r.addInspector({
|
|
2727
|
-
id: "vue-i18n-resource-inspector",
|
|
2728
|
-
label: Mt["vue-i18n-resource-inspector"],
|
|
2729
|
-
icon: "language",
|
|
2730
|
-
treeFilterPlaceholder: Ys["vue-i18n-resource-inspector"]
|
|
2731
|
-
}), r.on.getInspectorTree((o) => {
|
|
2732
|
-
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && Zs(o, t);
|
|
2733
|
-
});
|
|
2734
|
-
const s = /* @__PURE__ */ new Map();
|
|
2735
|
-
r.on.getInspectorState(async (o) => {
|
|
2736
|
-
if (o.app === e && o.inspectorId === "vue-i18n-resource-inspector")
|
|
2737
|
-
if (r.unhighlightElement(), eo(o, t), o.nodeId === "global") {
|
|
2738
|
-
if (!s.has(o.app)) {
|
|
2739
|
-
const [l] = await r.getComponentInstances(o.app);
|
|
2740
|
-
s.set(o.app, l);
|
|
2741
|
-
}
|
|
2742
|
-
r.highlightElement(s.get(o.app));
|
|
2743
|
-
} else {
|
|
2744
|
-
const l = zs(o.nodeId, t);
|
|
2745
|
-
l && r.highlightElement(l);
|
|
2746
|
-
}
|
|
2747
|
-
}), r.on.editInspectorState((o) => {
|
|
2748
|
-
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && no(o, t);
|
|
2749
|
-
}), r.addTimelineLayer({
|
|
2750
|
-
id: "vue-i18n-timeline",
|
|
2751
|
-
label: Mt["vue-i18n-timeline"],
|
|
2752
|
-
color: Hs["vue-i18n-timeline"]
|
|
2753
|
-
}), n(!0);
|
|
2754
|
-
});
|
|
2755
|
-
} catch (r) {
|
|
2756
|
-
console.error(r), a(!1);
|
|
2757
|
-
}
|
|
2758
|
-
});
|
|
2759
|
-
}
|
|
2760
|
-
function Sa(e) {
|
|
2761
|
-
return e.type.name || e.type.displayName || e.type.__file || "Anonymous";
|
|
2762
|
-
}
|
|
2763
|
-
function Bs(e, t, n) {
|
|
2764
|
-
const a = n.mode === "composition" ? n.global : n.global.__composer;
|
|
2765
|
-
if (e && e.__VUE_I18N__ && e.__VUE_I18N__ !== a) {
|
|
2766
|
-
const r = {
|
|
2767
|
-
label: `i18n (${Sa(e)} Scope)`,
|
|
2768
|
-
textColor: 0,
|
|
2769
|
-
backgroundColor: 16764185
|
|
2770
|
-
};
|
|
2771
|
-
t.tags.push(r);
|
|
2772
|
-
}
|
|
2773
|
-
}
|
|
2774
|
-
function Un(e, t) {
|
|
2775
|
-
const n = ya;
|
|
2776
|
-
e.state.push({
|
|
2777
|
-
type: n,
|
|
2778
|
-
key: "locale",
|
|
2779
|
-
editable: !0,
|
|
2780
|
-
value: t.locale.value
|
|
2781
|
-
}), e.state.push({
|
|
2782
|
-
type: n,
|
|
2783
|
-
key: "availableLocales",
|
|
2784
|
-
editable: !1,
|
|
2785
|
-
value: t.availableLocales
|
|
2786
|
-
}), e.state.push({
|
|
2787
|
-
type: n,
|
|
2788
|
-
key: "fallbackLocale",
|
|
2789
|
-
editable: !0,
|
|
2790
|
-
value: t.fallbackLocale.value
|
|
2791
|
-
}), e.state.push({
|
|
2792
|
-
type: n,
|
|
2793
|
-
key: "inheritLocale",
|
|
2794
|
-
editable: !0,
|
|
2795
|
-
value: t.inheritLocale
|
|
2796
|
-
}), e.state.push({
|
|
2797
|
-
type: n,
|
|
2798
|
-
key: "messages",
|
|
2799
|
-
editable: !1,
|
|
2800
|
-
value: rn(t.messages.value)
|
|
2801
|
-
}), e.state.push({
|
|
2802
|
-
type: n,
|
|
2803
|
-
key: "datetimeFormats",
|
|
2804
|
-
editable: !1,
|
|
2805
|
-
value: t.datetimeFormats.value
|
|
2806
|
-
}), e.state.push({
|
|
2807
|
-
type: n,
|
|
2808
|
-
key: "numberFormats",
|
|
2809
|
-
editable: !1,
|
|
2810
|
-
value: t.numberFormats.value
|
|
2811
|
-
});
|
|
2812
|
-
}
|
|
2813
|
-
function rn(e) {
|
|
2814
|
-
const t = {};
|
|
2815
|
-
return Object.keys(e).forEach((n) => {
|
|
2816
|
-
const a = e[n];
|
|
2817
|
-
X(a) && "source" in a ? t[n] = qs(a) : Ne(a) && a.loc && a.loc.source ? t[n] = a.loc.source : $(a) ? t[n] = rn(a) : t[n] = a;
|
|
2818
|
-
}), t;
|
|
2819
|
-
}
|
|
2820
|
-
const Xs = {
|
|
2821
|
-
"<": "<",
|
|
2822
|
-
">": ">",
|
|
2823
|
-
'"': """,
|
|
2824
|
-
"&": "&"
|
|
2825
|
-
};
|
|
2826
|
-
function Js(e) {
|
|
2827
|
-
return e.replace(/[<>"&]/g, Qs);
|
|
2828
|
-
}
|
|
2829
|
-
function Qs(e) {
|
|
2830
|
-
return Xs[e] || e;
|
|
2831
|
-
}
|
|
2832
|
-
function qs(e) {
|
|
2833
|
-
return {
|
|
2834
|
-
_custom: {
|
|
2835
|
-
type: "function",
|
|
2836
|
-
display: `<span>ƒ</span> ${e.source ? `("${Js(e.source)}")` : "(?)"}`
|
|
2837
|
-
}
|
|
2838
|
-
};
|
|
2839
|
-
}
|
|
2840
|
-
function Zs(e, t) {
|
|
2841
|
-
e.rootNodes.push({
|
|
2842
|
-
id: "global",
|
|
2843
|
-
label: "Global Scope"
|
|
2844
|
-
});
|
|
2845
|
-
const n = t.mode === "composition" ? t.global : t.global.__composer;
|
|
2846
|
-
for (const [a, r] of t.__instances) {
|
|
2847
|
-
const s = t.mode === "composition" ? r : r.__composer;
|
|
2848
|
-
n !== s && e.rootNodes.push({
|
|
2849
|
-
id: s.id.toString(),
|
|
2850
|
-
label: `${Sa(a)} Scope`
|
|
2851
|
-
});
|
|
2852
|
-
}
|
|
2853
|
-
}
|
|
2854
|
-
function zs(e, t) {
|
|
2855
|
-
let n = null;
|
|
2856
|
-
if (e !== "global") {
|
|
2857
|
-
for (const [a, r] of t.__instances.entries())
|
|
2858
|
-
if (r.id.toString() === e) {
|
|
2859
|
-
n = a;
|
|
2860
|
-
break;
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
return n;
|
|
2864
|
-
}
|
|
2865
|
-
function Aa(e, t) {
|
|
2866
|
-
if (e === "global")
|
|
2867
|
-
return t.mode === "composition" ? t.global : t.global.__composer;
|
|
2868
|
-
{
|
|
2869
|
-
const n = Array.from(t.__instances.values()).find((a) => a.id.toString() === e);
|
|
2870
|
-
return n ? t.mode === "composition" ? n : n.__composer : null;
|
|
2871
|
-
}
|
|
2872
|
-
}
|
|
2873
|
-
function eo(e, t) {
|
|
2874
|
-
const n = Aa(e.nodeId, t);
|
|
2875
|
-
return n && (e.state = to(n)), null;
|
|
2876
|
-
}
|
|
2877
|
-
function to(e) {
|
|
2878
|
-
const t = {}, n = "Locale related info", a = [
|
|
2879
|
-
{
|
|
2880
|
-
type: n,
|
|
2881
|
-
key: "locale",
|
|
2882
|
-
editable: !0,
|
|
2883
|
-
value: e.locale.value
|
|
2884
|
-
},
|
|
2885
|
-
{
|
|
2886
|
-
type: n,
|
|
2887
|
-
key: "fallbackLocale",
|
|
2888
|
-
editable: !0,
|
|
2889
|
-
value: e.fallbackLocale.value
|
|
2890
|
-
},
|
|
2891
|
-
{
|
|
2892
|
-
type: n,
|
|
2893
|
-
key: "availableLocales",
|
|
2894
|
-
editable: !1,
|
|
2895
|
-
value: e.availableLocales
|
|
2896
|
-
},
|
|
2897
|
-
{
|
|
2898
|
-
type: n,
|
|
2899
|
-
key: "inheritLocale",
|
|
2900
|
-
editable: !0,
|
|
2901
|
-
value: e.inheritLocale
|
|
2902
|
-
}
|
|
2903
|
-
];
|
|
2904
|
-
t[n] = a;
|
|
2905
|
-
const r = "Locale messages info", s = [
|
|
2906
|
-
{
|
|
2907
|
-
type: r,
|
|
2908
|
-
key: "messages",
|
|
2909
|
-
editable: !1,
|
|
2910
|
-
value: rn(e.messages.value)
|
|
2911
|
-
}
|
|
2912
|
-
];
|
|
2913
|
-
t[r] = s;
|
|
2914
|
-
{
|
|
2915
|
-
const o = "Datetime formats info", l = [
|
|
2916
|
-
{
|
|
2917
|
-
type: o,
|
|
2918
|
-
key: "datetimeFormats",
|
|
2919
|
-
editable: !1,
|
|
2920
|
-
value: e.datetimeFormats.value
|
|
2921
|
-
}
|
|
2922
|
-
];
|
|
2923
|
-
t[o] = l;
|
|
2924
|
-
const c = "Datetime formats info", _ = [
|
|
2925
|
-
{
|
|
2926
|
-
type: c,
|
|
2927
|
-
key: "numberFormats",
|
|
2928
|
-
editable: !1,
|
|
2929
|
-
value: e.numberFormats.value
|
|
2930
|
-
}
|
|
2931
|
-
];
|
|
2932
|
-
t[c] = _;
|
|
2933
|
-
}
|
|
2934
|
-
return t;
|
|
2935
|
-
}
|
|
2936
|
-
function _t(e, t) {
|
|
2937
|
-
if (Kt) {
|
|
2938
|
-
let n;
|
|
2939
|
-
t && "groupId" in t && (n = t.groupId, delete t.groupId), Kt.addTimelineEvent({
|
|
2940
|
-
layerId: "vue-i18n-timeline",
|
|
2941
|
-
event: {
|
|
2942
|
-
title: e,
|
|
2943
|
-
groupId: n,
|
|
2944
|
-
time: Date.now(),
|
|
2945
|
-
meta: {},
|
|
2946
|
-
data: t || {},
|
|
2947
|
-
logType: e === "compile-error" ? "error" : e === "fallback" || e === "missing" ? "warning" : "default"
|
|
2948
|
-
}
|
|
2949
|
-
});
|
|
2950
|
-
}
|
|
2951
|
-
}
|
|
2952
|
-
function no(e, t) {
|
|
2953
|
-
const n = Aa(e.nodeId, t);
|
|
2954
|
-
if (n) {
|
|
2955
|
-
const [a] = e.path;
|
|
2956
|
-
a === "locale" && S(e.state.value) ? n.locale.value = e.state.value : a === "fallbackLocale" && (S(e.state.value) || z(e.state.value) || $(e.state.value)) ? n.fallbackLocale.value = e.state.value : a === "inheritLocale" && x(e.state.value) && (n.inheritLocale = e.state.value);
|
|
2957
|
-
}
|
|
2958
|
-
}
|
|
2959
|
-
function ao(e) {
|
|
2960
|
-
const t = S(e.locale) ? e.locale : ut, n = S(e.fallbackLocale) || z(e.fallbackLocale) || F(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, a = X(e.missing) ? e.missing : void 0, r = x(e.silentTranslationWarn) || et(e.silentTranslationWarn) ? !e.silentTranslationWarn : !0, s = x(e.silentFallbackWarn) || et(e.silentFallbackWarn) ? !e.silentFallbackWarn : !0, o = x(e.fallbackRoot) ? e.fallbackRoot : !0, l = !!e.formatFallbackMessages, c = F(e.modifiers) ? e.modifiers : {}, _ = e.pluralizationRules, b = X(e.postTranslation) ? e.postTranslation : void 0, v = S(e.warnHtmlInMessage) ? e.warnHtmlInMessage !== "off" : !0, p = !!e.escapeParameterHtml, P = x(e.sync) ? e.sync : !0;
|
|
2961
|
-
let R = e.messages;
|
|
2962
|
-
if (F(e.sharedMessages)) {
|
|
2963
|
-
const O = e.sharedMessages;
|
|
2964
|
-
R = Object.keys(O).reduce((N, M) => {
|
|
2965
|
-
const V = N[M] || (N[M] = {});
|
|
2966
|
-
return re(V, O[M]), N;
|
|
2967
|
-
}, R || {});
|
|
2968
|
-
}
|
|
2969
|
-
const { __i18n: I, __root: L, __injectWithOption: f } = e, d = e.datetimeFormats, g = e.numberFormats, m = e.flatJson;
|
|
2970
|
-
return {
|
|
2971
|
-
locale: t,
|
|
2972
|
-
fallbackLocale: n,
|
|
2973
|
-
messages: R,
|
|
2974
|
-
flatJson: m,
|
|
2975
|
-
datetimeFormats: d,
|
|
2976
|
-
numberFormats: g,
|
|
2977
|
-
missing: a,
|
|
2978
|
-
missingWarn: r,
|
|
2979
|
-
fallbackWarn: s,
|
|
2980
|
-
fallbackRoot: o,
|
|
2981
|
-
fallbackFormat: l,
|
|
2982
|
-
modifiers: c,
|
|
2983
|
-
pluralRules: _,
|
|
2984
|
-
postTranslation: b,
|
|
2985
|
-
warnHtmlMessage: v,
|
|
2986
|
-
escapeParameter: p,
|
|
2987
|
-
messageResolver: e.messageResolver,
|
|
2988
|
-
inheritLocale: P,
|
|
2989
|
-
__i18n: I,
|
|
2990
|
-
__root: L,
|
|
2991
|
-
__injectWithOption: f
|
|
2992
|
-
};
|
|
2993
|
-
}
|
|
2994
|
-
function Bt(e = {}) {
|
|
2995
|
-
const t = an(ao(e)), { __extender: n } = e, a = {
|
|
2996
|
-
// id
|
|
2997
|
-
id: t.id,
|
|
2998
|
-
// locale
|
|
2999
|
-
get locale() {
|
|
3000
|
-
return t.locale.value;
|
|
3001
|
-
},
|
|
3002
|
-
set locale(r) {
|
|
3003
|
-
t.locale.value = r;
|
|
3004
|
-
},
|
|
3005
|
-
// fallbackLocale
|
|
3006
|
-
get fallbackLocale() {
|
|
3007
|
-
return t.fallbackLocale.value;
|
|
3008
|
-
},
|
|
3009
|
-
set fallbackLocale(r) {
|
|
3010
|
-
t.fallbackLocale.value = r;
|
|
3011
|
-
},
|
|
3012
|
-
// messages
|
|
3013
|
-
get messages() {
|
|
3014
|
-
return t.messages.value;
|
|
3015
|
-
},
|
|
3016
|
-
// datetimeFormats
|
|
3017
|
-
get datetimeFormats() {
|
|
3018
|
-
return t.datetimeFormats.value;
|
|
3019
|
-
},
|
|
3020
|
-
// numberFormats
|
|
3021
|
-
get numberFormats() {
|
|
3022
|
-
return t.numberFormats.value;
|
|
3023
|
-
},
|
|
3024
|
-
// availableLocales
|
|
3025
|
-
get availableLocales() {
|
|
3026
|
-
return t.availableLocales;
|
|
3027
|
-
},
|
|
3028
|
-
// missing
|
|
3029
|
-
get missing() {
|
|
3030
|
-
return t.getMissingHandler();
|
|
3031
|
-
},
|
|
3032
|
-
set missing(r) {
|
|
3033
|
-
t.setMissingHandler(r);
|
|
3034
|
-
},
|
|
3035
|
-
// silentTranslationWarn
|
|
3036
|
-
get silentTranslationWarn() {
|
|
3037
|
-
return x(t.missingWarn) ? !t.missingWarn : t.missingWarn;
|
|
3038
|
-
},
|
|
3039
|
-
set silentTranslationWarn(r) {
|
|
3040
|
-
t.missingWarn = x(r) ? !r : r;
|
|
3041
|
-
},
|
|
3042
|
-
// silentFallbackWarn
|
|
3043
|
-
get silentFallbackWarn() {
|
|
3044
|
-
return x(t.fallbackWarn) ? !t.fallbackWarn : t.fallbackWarn;
|
|
3045
|
-
},
|
|
3046
|
-
set silentFallbackWarn(r) {
|
|
3047
|
-
t.fallbackWarn = x(r) ? !r : r;
|
|
3048
|
-
},
|
|
3049
|
-
// modifiers
|
|
3050
|
-
get modifiers() {
|
|
3051
|
-
return t.modifiers;
|
|
3052
|
-
},
|
|
3053
|
-
// formatFallbackMessages
|
|
3054
|
-
get formatFallbackMessages() {
|
|
3055
|
-
return t.fallbackFormat;
|
|
3056
|
-
},
|
|
3057
|
-
set formatFallbackMessages(r) {
|
|
3058
|
-
t.fallbackFormat = r;
|
|
3059
|
-
},
|
|
3060
|
-
// postTranslation
|
|
3061
|
-
get postTranslation() {
|
|
3062
|
-
return t.getPostTranslationHandler();
|
|
3063
|
-
},
|
|
3064
|
-
set postTranslation(r) {
|
|
3065
|
-
t.setPostTranslationHandler(r);
|
|
3066
|
-
},
|
|
3067
|
-
// sync
|
|
3068
|
-
get sync() {
|
|
3069
|
-
return t.inheritLocale;
|
|
3070
|
-
},
|
|
3071
|
-
set sync(r) {
|
|
3072
|
-
t.inheritLocale = r;
|
|
3073
|
-
},
|
|
3074
|
-
// warnInHtmlMessage
|
|
3075
|
-
get warnHtmlInMessage() {
|
|
3076
|
-
return t.warnHtmlMessage ? "warn" : "off";
|
|
3077
|
-
},
|
|
3078
|
-
set warnHtmlInMessage(r) {
|
|
3079
|
-
t.warnHtmlMessage = r !== "off";
|
|
3080
|
-
},
|
|
3081
|
-
// escapeParameterHtml
|
|
3082
|
-
get escapeParameterHtml() {
|
|
3083
|
-
return t.escapeParameter;
|
|
3084
|
-
},
|
|
3085
|
-
set escapeParameterHtml(r) {
|
|
3086
|
-
t.escapeParameter = r;
|
|
3087
|
-
},
|
|
3088
|
-
// pluralizationRules
|
|
3089
|
-
get pluralizationRules() {
|
|
3090
|
-
return t.pluralRules || {};
|
|
3091
|
-
},
|
|
3092
|
-
// for internal
|
|
3093
|
-
__composer: t,
|
|
3094
|
-
// t
|
|
3095
|
-
t(...r) {
|
|
3096
|
-
return Reflect.apply(t.t, t, [...r]);
|
|
3097
|
-
},
|
|
3098
|
-
// rt
|
|
3099
|
-
rt(...r) {
|
|
3100
|
-
return Reflect.apply(t.rt, t, [...r]);
|
|
3101
|
-
},
|
|
3102
|
-
// te
|
|
3103
|
-
te(r, s) {
|
|
3104
|
-
return t.te(r, s);
|
|
3105
|
-
},
|
|
3106
|
-
// tm
|
|
3107
|
-
tm(r) {
|
|
3108
|
-
return t.tm(r);
|
|
3109
|
-
},
|
|
3110
|
-
// getLocaleMessage
|
|
3111
|
-
getLocaleMessage(r) {
|
|
3112
|
-
return t.getLocaleMessage(r);
|
|
3113
|
-
},
|
|
3114
|
-
// setLocaleMessage
|
|
3115
|
-
setLocaleMessage(r, s) {
|
|
3116
|
-
t.setLocaleMessage(r, s);
|
|
3117
|
-
},
|
|
3118
|
-
// mergeLocaleMessage
|
|
3119
|
-
mergeLocaleMessage(r, s) {
|
|
3120
|
-
t.mergeLocaleMessage(r, s);
|
|
3121
|
-
},
|
|
3122
|
-
// d
|
|
3123
|
-
d(...r) {
|
|
3124
|
-
return Reflect.apply(t.d, t, [...r]);
|
|
3125
|
-
},
|
|
3126
|
-
// getDateTimeFormat
|
|
3127
|
-
getDateTimeFormat(r) {
|
|
3128
|
-
return t.getDateTimeFormat(r);
|
|
3129
|
-
},
|
|
3130
|
-
// setDateTimeFormat
|
|
3131
|
-
setDateTimeFormat(r, s) {
|
|
3132
|
-
t.setDateTimeFormat(r, s);
|
|
3133
|
-
},
|
|
3134
|
-
// mergeDateTimeFormat
|
|
3135
|
-
mergeDateTimeFormat(r, s) {
|
|
3136
|
-
t.mergeDateTimeFormat(r, s);
|
|
3137
|
-
},
|
|
3138
|
-
// n
|
|
3139
|
-
n(...r) {
|
|
3140
|
-
return Reflect.apply(t.n, t, [...r]);
|
|
3141
|
-
},
|
|
3142
|
-
// getNumberFormat
|
|
3143
|
-
getNumberFormat(r) {
|
|
3144
|
-
return t.getNumberFormat(r);
|
|
3145
|
-
},
|
|
3146
|
-
// setNumberFormat
|
|
3147
|
-
setNumberFormat(r, s) {
|
|
3148
|
-
t.setNumberFormat(r, s);
|
|
3149
|
-
},
|
|
3150
|
-
// mergeNumberFormat
|
|
3151
|
-
mergeNumberFormat(r, s) {
|
|
3152
|
-
t.mergeNumberFormat(r, s);
|
|
3153
|
-
}
|
|
3154
|
-
};
|
|
3155
|
-
return a.__extender = n, process.env.NODE_ENV !== "production" && (a.__enableEmitter = (r) => {
|
|
3156
|
-
const s = t;
|
|
3157
|
-
s[Be] && s[Be](r);
|
|
3158
|
-
}, a.__disableEmitter = () => {
|
|
3159
|
-
const r = t;
|
|
3160
|
-
r[ft] && r[ft]();
|
|
3161
|
-
}), a;
|
|
3162
|
-
}
|
|
3163
|
-
function ro(e, t, n) {
|
|
3164
|
-
return {
|
|
3165
|
-
beforeCreate() {
|
|
3166
|
-
const a = ze();
|
|
3167
|
-
if (!a)
|
|
3168
|
-
throw Ee(J.UNEXPECTED_ERROR);
|
|
3169
|
-
const r = this.$options;
|
|
3170
|
-
if (r.i18n) {
|
|
3171
|
-
const s = r.i18n;
|
|
3172
|
-
if (r.__i18n && (s.__i18n = r.__i18n), s.__root = t, this === this.$root)
|
|
3173
|
-
this.$i18n = Vn(e, s);
|
|
3174
|
-
else {
|
|
3175
|
-
s.__injectWithOption = !0, s.__extender = n.__vueI18nExtend, this.$i18n = Bt(s);
|
|
3176
|
-
const o = this.$i18n;
|
|
3177
|
-
o.__extender && (o.__disposer = o.__extender(this.$i18n));
|
|
3178
|
-
}
|
|
3179
|
-
} else if (r.__i18n)
|
|
3180
|
-
if (this === this.$root)
|
|
3181
|
-
this.$i18n = Vn(e, r);
|
|
3182
|
-
else {
|
|
3183
|
-
this.$i18n = Bt({
|
|
3184
|
-
__i18n: r.__i18n,
|
|
3185
|
-
__injectWithOption: !0,
|
|
3186
|
-
__extender: n.__vueI18nExtend,
|
|
3187
|
-
__root: t
|
|
3188
|
-
});
|
|
3189
|
-
const s = this.$i18n;
|
|
3190
|
-
s.__extender && (s.__disposer = s.__extender(this.$i18n));
|
|
3191
|
-
}
|
|
3192
|
-
else
|
|
3193
|
-
this.$i18n = e;
|
|
3194
|
-
r.__i18nGlobal && Ia(t, r, r), this.$t = (...s) => this.$i18n.t(...s), this.$rt = (...s) => this.$i18n.rt(...s), this.$te = (s, o) => this.$i18n.te(s, o), this.$d = (...s) => this.$i18n.d(...s), this.$n = (...s) => this.$i18n.n(...s), this.$tm = (s) => this.$i18n.tm(s), n.__setInstance(a, this.$i18n);
|
|
3195
|
-
},
|
|
3196
|
-
mounted() {
|
|
3197
|
-
if (process.env.NODE_ENV !== "production" && this.$i18n) {
|
|
3198
|
-
const a = ze();
|
|
3199
|
-
if (!a)
|
|
3200
|
-
return;
|
|
3201
|
-
const r = this.$i18n;
|
|
3202
|
-
a.__VUE_I18N__ = r.__composer;
|
|
3203
|
-
const s = this.__v_emitter = qt();
|
|
3204
|
-
r.__enableEmitter && r.__enableEmitter(s), s.on("*", _t);
|
|
3205
|
-
}
|
|
3206
|
-
},
|
|
3207
|
-
unmounted() {
|
|
3208
|
-
const a = ze();
|
|
3209
|
-
if (!a)
|
|
3210
|
-
throw Ee(J.UNEXPECTED_ERROR);
|
|
3211
|
-
const r = this.$i18n;
|
|
3212
|
-
process.env.NODE_ENV !== "production" && a.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*", _t), delete this.__v_emitter), this.$i18n && (r.__disableEmitter && r.__disableEmitter(), delete a.__VUE_I18N__)), delete this.$t, delete this.$rt, delete this.$te, delete this.$d, delete this.$n, delete this.$tm, r.__disposer && (r.__disposer(), delete r.__disposer, delete r.__extender), n.__deleteInstance(a), delete this.$i18n;
|
|
3213
|
-
}
|
|
3214
|
-
};
|
|
3215
|
-
}
|
|
3216
|
-
function Vn(e, t) {
|
|
3217
|
-
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[Ta](t.pluralizationRules || e.pluralizationRules);
|
|
3218
|
-
const n = nn(e.locale, {
|
|
3219
|
-
messages: t.messages,
|
|
3220
|
-
__i18n: t.__i18n
|
|
3221
|
-
});
|
|
3222
|
-
return Object.keys(n).forEach((a) => e.mergeLocaleMessage(a, n[a])), t.datetimeFormats && Object.keys(t.datetimeFormats).forEach((a) => e.mergeDateTimeFormat(a, t.datetimeFormats[a])), t.numberFormats && Object.keys(t.numberFormats).forEach((a) => e.mergeNumberFormat(a, t.numberFormats[a])), e;
|
|
3223
|
-
}
|
|
3224
|
-
const sn = {
|
|
3225
|
-
tag: {
|
|
3226
|
-
type: [String, Object]
|
|
3227
|
-
},
|
|
3228
|
-
locale: {
|
|
3229
|
-
type: String
|
|
3230
|
-
},
|
|
3231
|
-
scope: {
|
|
3232
|
-
type: String,
|
|
3233
|
-
// NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
|
|
3234
|
-
validator: (e) => e === "parent" || e === "global",
|
|
3235
|
-
default: "parent"
|
|
3236
|
-
/* ComponentI18nScope */
|
|
3237
|
-
},
|
|
3238
|
-
i18n: {
|
|
3239
|
-
type: Object
|
|
3240
|
-
}
|
|
3241
|
-
};
|
|
3242
|
-
function so({ slots: e }, t) {
|
|
3243
|
-
return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((a, r) => [
|
|
3244
|
-
...a,
|
|
3245
|
-
// prettier-ignore
|
|
3246
|
-
...r.type === Tt ? r.children : [r]
|
|
3247
|
-
], []) : t.reduce((n, a) => {
|
|
3248
|
-
const r = e[a];
|
|
3249
|
-
return r && (n[a] = r()), n;
|
|
3250
|
-
}, K());
|
|
3251
|
-
}
|
|
3252
|
-
function Pa() {
|
|
3253
|
-
return Tt;
|
|
3254
|
-
}
|
|
3255
|
-
const oo = /* @__PURE__ */ Me({
|
|
3256
|
-
/* eslint-disable */
|
|
3257
|
-
name: "i18n-t",
|
|
3258
|
-
props: re({
|
|
3259
|
-
keypath: {
|
|
3260
|
-
type: String,
|
|
3261
|
-
required: !0
|
|
3262
|
-
},
|
|
3263
|
-
plural: {
|
|
3264
|
-
type: [Number, String],
|
|
3265
|
-
validator: (e) => ne(e) || !isNaN(e)
|
|
3266
|
-
}
|
|
3267
|
-
}, sn),
|
|
3268
|
-
/* eslint-enable */
|
|
3269
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3270
|
-
setup(e, t) {
|
|
3271
|
-
const { slots: n, attrs: a } = t, r = e.i18n || St({
|
|
3272
|
-
useScope: e.scope,
|
|
3273
|
-
__useComponent: !0
|
|
3274
|
-
});
|
|
3275
|
-
return () => {
|
|
3276
|
-
const s = Object.keys(n).filter((v) => v[0] !== "_"), o = K();
|
|
3277
|
-
e.locale && (o.locale = e.locale), e.plural !== void 0 && (o.plural = S(e.plural) ? +e.plural : e.plural);
|
|
3278
|
-
const l = so(t, s), c = r[Gt](e.keypath, l, o), _ = re(K(), a), b = S(e.tag) || $(e.tag) ? e.tag : Pa();
|
|
3279
|
-
return Bn(b, _, c);
|
|
3280
|
-
};
|
|
3281
|
-
}
|
|
3282
|
-
}), $n = oo;
|
|
3283
|
-
function lo(e) {
|
|
3284
|
-
return z(e) && !S(e[0]);
|
|
3285
|
-
}
|
|
3286
|
-
function Ca(e, t, n, a) {
|
|
3287
|
-
const { slots: r, attrs: s } = t;
|
|
3288
|
-
return () => {
|
|
3289
|
-
const o = { part: !0 };
|
|
3290
|
-
let l = K();
|
|
3291
|
-
e.locale && (o.locale = e.locale), S(e.format) ? o.key = e.format : $(e.format) && (S(e.format.key) && (o.key = e.format.key), l = Object.keys(e.format).reduce((p, P) => n.includes(P) ? re(K(), p, { [P]: e.format[P] }) : p, K()));
|
|
3292
|
-
const c = a(e.value, o, l);
|
|
3293
|
-
let _ = [o.key];
|
|
3294
|
-
z(c) ? _ = c.map((p, P) => {
|
|
3295
|
-
const R = r[p.type], I = R ? R({ [p.type]: p.value, index: P, parts: c }) : [p.value];
|
|
3296
|
-
return lo(I) && (I[0].key = `${p.type}-${P}`), I;
|
|
3297
|
-
}) : S(c) && (_ = [c]);
|
|
3298
|
-
const b = re(K(), s), v = S(e.tag) || $(e.tag) ? e.tag : Pa();
|
|
3299
|
-
return Bn(v, b, _);
|
|
3300
|
-
};
|
|
3301
|
-
}
|
|
3302
|
-
const io = /* @__PURE__ */ Me({
|
|
3303
|
-
/* eslint-disable */
|
|
3304
|
-
name: "i18n-n",
|
|
3305
|
-
props: re({
|
|
3306
|
-
value: {
|
|
3307
|
-
type: Number,
|
|
3308
|
-
required: !0
|
|
3309
|
-
},
|
|
3310
|
-
format: {
|
|
3311
|
-
type: [String, Object]
|
|
3312
|
-
}
|
|
3313
|
-
}, sn),
|
|
3314
|
-
/* eslint-enable */
|
|
3315
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3316
|
-
setup(e, t) {
|
|
3317
|
-
const n = e.i18n || St({
|
|
3318
|
-
useScope: e.scope,
|
|
3319
|
-
__useComponent: !0
|
|
3320
|
-
});
|
|
3321
|
-
return Ca(e, t, va, (...a) => (
|
|
3322
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3323
|
-
n[Yt](...a)
|
|
3324
|
-
));
|
|
3325
|
-
}
|
|
3326
|
-
}), xn = io;
|
|
3327
|
-
function co(e, t) {
|
|
3328
|
-
const n = e;
|
|
3329
|
-
if (e.mode === "composition")
|
|
3330
|
-
return n.__getInstance(t) || e.global;
|
|
3331
|
-
{
|
|
3332
|
-
const a = n.__getInstance(t);
|
|
3333
|
-
return a != null ? a.__composer : e.global.__composer;
|
|
3334
|
-
}
|
|
3335
|
-
}
|
|
3336
|
-
function uo(e) {
|
|
3337
|
-
const t = (o) => {
|
|
3338
|
-
process.env.NODE_ENV !== "production" && Xt(nt(ve.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));
|
|
3339
|
-
const { instance: l, value: c } = o;
|
|
3340
|
-
if (!l || !l.$)
|
|
3341
|
-
throw Ee(J.UNEXPECTED_ERROR);
|
|
3342
|
-
const _ = co(e, l.$), b = Wn(c);
|
|
3343
|
-
return [
|
|
3344
|
-
Reflect.apply(_.t, _, [...Gn(b)]),
|
|
3345
|
-
_
|
|
3346
|
-
];
|
|
3347
|
-
};
|
|
3348
|
-
return {
|
|
3349
|
-
created: (o, l) => {
|
|
3350
|
-
const [c, _] = t(l);
|
|
3351
|
-
Le && e.global === _ && (o.__i18nWatcher = Ge(_.locale, () => {
|
|
3352
|
-
l.instance && l.instance.$forceUpdate();
|
|
3353
|
-
})), o.__composer = _, o.textContent = c;
|
|
3354
|
-
},
|
|
3355
|
-
unmounted: (o) => {
|
|
3356
|
-
Le && o.__i18nWatcher && (o.__i18nWatcher(), o.__i18nWatcher = void 0, delete o.__i18nWatcher), o.__composer && (o.__composer = void 0, delete o.__composer);
|
|
3357
|
-
},
|
|
3358
|
-
beforeUpdate: (o, { value: l }) => {
|
|
3359
|
-
if (o.__composer) {
|
|
3360
|
-
const c = o.__composer, _ = Wn(l);
|
|
3361
|
-
o.textContent = Reflect.apply(c.t, c, [
|
|
3362
|
-
...Gn(_)
|
|
3363
|
-
]);
|
|
3364
|
-
}
|
|
3365
|
-
},
|
|
3366
|
-
getSSRProps: (o) => {
|
|
3367
|
-
const [l] = t(o);
|
|
3368
|
-
return { textContent: l };
|
|
3369
|
-
}
|
|
3370
|
-
};
|
|
3371
|
-
}
|
|
3372
|
-
function Wn(e) {
|
|
3373
|
-
if (S(e))
|
|
3374
|
-
return { path: e };
|
|
3375
|
-
if (F(e)) {
|
|
3376
|
-
if (!("path" in e))
|
|
3377
|
-
throw Ee(J.REQUIRED_VALUE, "path");
|
|
3378
|
-
return e;
|
|
3379
|
-
} else
|
|
3380
|
-
throw Ee(J.INVALID_VALUE);
|
|
3381
|
-
}
|
|
3382
|
-
function Gn(e) {
|
|
3383
|
-
const { path: t, locale: n, args: a, choice: r, plural: s } = e, o = {}, l = a || {};
|
|
3384
|
-
return S(n) && (o.locale = n), ne(r) && (o.plural = r), ne(s) && (o.plural = s), [t, l, o];
|
|
3385
|
-
}
|
|
3386
|
-
function fo(e, t, ...n) {
|
|
3387
|
-
const a = F(n[0]) ? n[0] : {};
|
|
3388
|
-
(x(a.globalInstall) ? a.globalInstall : !0) && ([$n.name, "I18nT"].forEach((s) => e.component(s, $n)), [xn.name, "I18nN"].forEach((s) => e.component(s, xn)), [Yn.name, "I18nD"].forEach((s) => e.component(s, Yn))), e.directive("t", uo(t));
|
|
3389
|
-
}
|
|
3390
|
-
const _o = /* @__PURE__ */ Ae("global-vue-i18n");
|
|
3391
|
-
function mo(e = {}) {
|
|
3392
|
-
const t = __VUE_I18N_LEGACY_API__ && x(e.legacy) ? e.legacy : __VUE_I18N_LEGACY_API__;
|
|
3393
|
-
process.env.NODE_ENV !== "production" && t && Xt(nt(ve.DEPRECATE_LEGACY_MODE));
|
|
3394
|
-
const n = x(e.globalInjection) ? e.globalInjection : !0, a = /* @__PURE__ */ new Map(), [r, s] = Eo(e, t), o = /* @__PURE__ */ Ae(process.env.NODE_ENV !== "production" ? "vue-i18n" : "");
|
|
3395
|
-
function l(v) {
|
|
3396
|
-
return a.get(v) || null;
|
|
3397
|
-
}
|
|
3398
|
-
function c(v, p) {
|
|
3399
|
-
a.set(v, p);
|
|
3400
|
-
}
|
|
3401
|
-
function _(v) {
|
|
3402
|
-
a.delete(v);
|
|
3403
|
-
}
|
|
3404
|
-
const b = {
|
|
3405
|
-
// mode
|
|
3406
|
-
get mode() {
|
|
3407
|
-
return __VUE_I18N_LEGACY_API__ && t ? "legacy" : "composition";
|
|
3408
|
-
},
|
|
3409
|
-
// install plugin
|
|
3410
|
-
async install(v, ...p) {
|
|
3411
|
-
if (process.env.NODE_ENV !== "production" && (v.__VUE_I18N__ = b), v.__VUE_I18N_SYMBOL__ = o, v.provide(v.__VUE_I18N_SYMBOL__, b), F(p[0])) {
|
|
3412
|
-
const I = p[0];
|
|
3413
|
-
b.__composerExtend = I.__composerExtend, b.__vueI18nExtend = I.__vueI18nExtend;
|
|
3414
|
-
}
|
|
3415
|
-
let P = null;
|
|
3416
|
-
!t && n && (P = Lo(v, b.global)), __VUE_I18N_FULL_INSTALL__ && fo(v, b, ...p), __VUE_I18N_LEGACY_API__ && t && v.mixin(ro(s, s.__composer, b));
|
|
3417
|
-
const R = v.unmount;
|
|
3418
|
-
if (v.unmount = () => {
|
|
3419
|
-
P && P(), b.dispose(), R();
|
|
3420
|
-
}, process.env.NODE_ENV !== "production") {
|
|
3421
|
-
if (!await Ks(v, b))
|
|
3422
|
-
throw Ee(J.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
|
|
3423
|
-
const L = qt();
|
|
3424
|
-
if (t) {
|
|
3425
|
-
const f = s;
|
|
3426
|
-
f.__enableEmitter && f.__enableEmitter(L);
|
|
3427
|
-
} else {
|
|
3428
|
-
const f = s;
|
|
3429
|
-
f[Be] && f[Be](L);
|
|
3430
|
-
}
|
|
3431
|
-
L.on("*", _t);
|
|
3432
|
-
}
|
|
3433
|
-
},
|
|
3434
|
-
// global accessor
|
|
3435
|
-
get global() {
|
|
3436
|
-
return s;
|
|
3437
|
-
},
|
|
3438
|
-
dispose() {
|
|
3439
|
-
r.stop();
|
|
3440
|
-
},
|
|
3441
|
-
// @internal
|
|
3442
|
-
__instances: a,
|
|
3443
|
-
// @internal
|
|
3444
|
-
__getInstance: l,
|
|
3445
|
-
// @internal
|
|
3446
|
-
__setInstance: c,
|
|
3447
|
-
// @internal
|
|
3448
|
-
__deleteInstance: _
|
|
3449
|
-
};
|
|
3450
|
-
return b;
|
|
3451
|
-
}
|
|
3452
|
-
function St(e = {}) {
|
|
3453
|
-
const t = ze();
|
|
3454
|
-
if (t == null)
|
|
3455
|
-
throw Ee(J.MUST_BE_CALL_SETUP_TOP);
|
|
3456
|
-
if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
|
|
3457
|
-
throw Ee(J.NOT_INSTALLED);
|
|
3458
|
-
const n = po(t), a = vo(n), r = Oa(t), s = go(e, r);
|
|
3459
|
-
if (s === "global")
|
|
3460
|
-
return Ia(a, e, r), a;
|
|
3461
|
-
if (s === "parent") {
|
|
3462
|
-
let c = No(n, t, e.__useComponent);
|
|
3463
|
-
return c == null && (process.env.NODE_ENV !== "production" && Se(nt(ve.NOT_FOUND_PARENT_SCOPE)), c = a), c;
|
|
3464
|
-
}
|
|
3465
|
-
const o = n;
|
|
3466
|
-
let l = o.__getInstance(t);
|
|
3467
|
-
if (l == null) {
|
|
3468
|
-
const c = re({}, e);
|
|
3469
|
-
"__i18n" in r && (c.__i18n = r.__i18n), a && (c.__root = a), l = an(c), o.__composerExtend && (l[Ht] = o.__composerExtend(l)), bo(o, t, l), o.__setInstance(t, l);
|
|
3470
|
-
} else
|
|
3471
|
-
process.env.NODE_ENV !== "production" && s === "local" && Se(nt(ve.DUPLICATE_USE_I18N_CALLING));
|
|
3472
|
-
return l;
|
|
3473
|
-
}
|
|
3474
|
-
function Eo(e, t) {
|
|
3475
|
-
const n = Fa(), a = __VUE_I18N_LEGACY_API__ && t ? n.run(() => Bt(e)) : n.run(() => an(e));
|
|
3476
|
-
if (a == null)
|
|
3477
|
-
throw Ee(J.UNEXPECTED_ERROR);
|
|
3478
|
-
return [n, a];
|
|
3479
|
-
}
|
|
3480
|
-
function po(e) {
|
|
3481
|
-
const t = $a(e.isCE ? _o : e.appContext.app.__VUE_I18N_SYMBOL__);
|
|
3482
|
-
if (!t)
|
|
3483
|
-
throw Ee(e.isCE ? J.NOT_INSTALLED_WITH_PROVIDE : J.UNEXPECTED_ERROR);
|
|
3484
|
-
return t;
|
|
3485
|
-
}
|
|
3486
|
-
function go(e, t) {
|
|
3487
|
-
return Ot(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
|
|
3488
|
-
}
|
|
3489
|
-
function vo(e) {
|
|
3490
|
-
return e.mode === "composition" ? e.global : e.global.__composer;
|
|
3491
|
-
}
|
|
3492
|
-
function No(e, t, n = !1) {
|
|
3493
|
-
let a = null;
|
|
3494
|
-
const r = t.root;
|
|
3495
|
-
let s = ho(t, n);
|
|
3496
|
-
for (; s != null; ) {
|
|
3497
|
-
const o = e;
|
|
3498
|
-
if (e.mode === "composition")
|
|
3499
|
-
a = o.__getInstance(s);
|
|
3500
|
-
else if (__VUE_I18N_LEGACY_API__) {
|
|
3501
|
-
const l = o.__getInstance(s);
|
|
3502
|
-
l != null && (a = l.__composer, n && a && !a[La] && (a = null));
|
|
3503
|
-
}
|
|
3504
|
-
if (a != null || r === s)
|
|
3505
|
-
break;
|
|
3506
|
-
s = s.parent;
|
|
3507
|
-
}
|
|
3508
|
-
return a;
|
|
3509
|
-
}
|
|
3510
|
-
function ho(e, t = !1) {
|
|
3511
|
-
return e == null ? null : t && e.vnode.ctx || e.parent;
|
|
3512
|
-
}
|
|
3513
|
-
function bo(e, t, n) {
|
|
3514
|
-
let a = null;
|
|
3515
|
-
xa(() => {
|
|
3516
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3517
|
-
t.__VUE_I18N__ = n, a = qt();
|
|
3518
|
-
const r = n;
|
|
3519
|
-
r[Be] && r[Be](a), a.on("*", _t);
|
|
3520
|
-
}
|
|
3521
|
-
}, t), Xn(() => {
|
|
3522
|
-
const r = n;
|
|
3523
|
-
process.env.NODE_ENV !== "production" && (a && a.off("*", _t), r[ft] && r[ft](), delete t.__VUE_I18N__), e.__deleteInstance(t);
|
|
3524
|
-
const s = r[Ht];
|
|
3525
|
-
s && (s(), delete r[Ht]);
|
|
3526
|
-
}, t);
|
|
3527
|
-
}
|
|
3528
|
-
const To = [
|
|
3529
|
-
"locale",
|
|
3530
|
-
"fallbackLocale",
|
|
3531
|
-
"availableLocales"
|
|
3532
|
-
], jn = ["t", "rt", "d", "n", "tm", "te"];
|
|
3533
|
-
function Lo(e, t) {
|
|
3534
|
-
const n = /* @__PURE__ */ Object.create(null);
|
|
3535
|
-
return To.forEach((r) => {
|
|
3536
|
-
const s = Object.getOwnPropertyDescriptor(t, r);
|
|
3537
|
-
if (!s)
|
|
3538
|
-
throw Ee(J.UNEXPECTED_ERROR);
|
|
3539
|
-
const o = Va(s.value) ? {
|
|
3540
|
-
get() {
|
|
3541
|
-
return s.value.value;
|
|
3542
|
-
},
|
|
3543
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3544
|
-
set(l) {
|
|
3545
|
-
s.value.value = l;
|
|
3546
|
-
}
|
|
3547
|
-
} : {
|
|
3548
|
-
get() {
|
|
3549
|
-
return s.get && s.get();
|
|
3550
|
-
}
|
|
3551
|
-
};
|
|
3552
|
-
Object.defineProperty(n, r, o);
|
|
3553
|
-
}), e.config.globalProperties.$i18n = n, jn.forEach((r) => {
|
|
3554
|
-
const s = Object.getOwnPropertyDescriptor(t, r);
|
|
3555
|
-
if (!s || !s.value)
|
|
3556
|
-
throw Ee(J.UNEXPECTED_ERROR);
|
|
3557
|
-
Object.defineProperty(e.config.globalProperties, `$${r}`, s);
|
|
3558
|
-
}), () => {
|
|
3559
|
-
delete e.config.globalProperties.$i18n, jn.forEach((r) => {
|
|
3560
|
-
delete e.config.globalProperties[`$${r}`];
|
|
3561
|
-
});
|
|
3562
|
-
};
|
|
3563
|
-
}
|
|
3564
|
-
const Oo = /* @__PURE__ */ Me({
|
|
3565
|
-
/* eslint-disable */
|
|
3566
|
-
name: "i18n-d",
|
|
3567
|
-
props: re({
|
|
3568
|
-
value: {
|
|
3569
|
-
type: [Number, Date],
|
|
3570
|
-
required: !0
|
|
3571
|
-
},
|
|
3572
|
-
format: {
|
|
3573
|
-
type: [String, Object]
|
|
3574
|
-
}
|
|
3575
|
-
}, sn),
|
|
3576
|
-
/* eslint-enable */
|
|
3577
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3578
|
-
setup(e, t) {
|
|
3579
|
-
const n = e.i18n || St({
|
|
3580
|
-
useScope: e.scope,
|
|
3581
|
-
__useComponent: !0
|
|
3582
|
-
});
|
|
3583
|
-
return Ca(e, t, ga, (...a) => (
|
|
3584
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3585
|
-
n[jt](...a)
|
|
3586
|
-
));
|
|
3587
|
-
}
|
|
3588
|
-
}), Yn = Oo;
|
|
3589
|
-
$s();
|
|
3590
|
-
cs(Wr);
|
|
3591
|
-
us(rs);
|
|
3592
|
-
fs(ia);
|
|
3593
|
-
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
3594
|
-
const e = Ye();
|
|
3595
|
-
e.__INTLIFY__ = !0, Gr(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
|
|
3596
|
-
}
|
|
3597
|
-
process.env.NODE_ENV;
|
|
3598
|
-
const ka = async (e) => await new Promise((t) => setTimeout(t, e)), Io = { class: "items-center justify-center w-full" }, yo = { key: 0 }, So = ["src"], Ao = {
|
|
1
|
+
import { v as le, s as oe, p as ne } from "./index-BaFRLiBo.js";
|
|
2
|
+
import { T as ft, e as yt } from "./index-BaFRLiBo.js";
|
|
3
|
+
import { defineComponent as W, ref as b, computed as L, watch as T, createElementBlock as r, openBlock as s, Fragment as z, renderSlot as ue, withDirectives as Q, createCommentVNode as _, normalizeProps as H, guardReactiveProps as se, createElementVNode as v, createVNode as ie, mergeProps as Y, unref as X, createBlock as ee, vShow as re, renderList as te, toDisplayString as N, onMounted as Z, onUnmounted as ae, createTextVNode as D, normalizeClass as K, vModelText as de } from "vue";
|
|
4
|
+
const G = async (o) => await new Promise((w) => setTimeout(w, o)), ce = { class: "items-center justify-center w-full" }, ve = { key: 0 }, me = ["src"], pe = {
|
|
3599
5
|
key: 1,
|
|
3600
6
|
class: "relative inline-block"
|
|
3601
|
-
},
|
|
7
|
+
}, ge = ["src"], fe = ["src"], ye = {
|
|
8
|
+
key: 2,
|
|
9
|
+
class: "relative inline-block"
|
|
10
|
+
}, be = ["src"], he = ["src"], Se = {
|
|
3602
11
|
key: 3,
|
|
3603
12
|
class: "relative inline-block"
|
|
3604
|
-
},
|
|
3605
|
-
|
|
13
|
+
}, we = ["src"], ke = { key: 4 }, xe = {
|
|
14
|
+
key: 5,
|
|
15
|
+
class: "mt-4 px-6 py-4 text-left"
|
|
16
|
+
}, Pe = { class: "text-lg leading-relaxed font-sans text-gray-800" }, Re = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "text-base leading-relaxed font-sans text-gray-400 mt-3 italic"
|
|
19
|
+
}, Le = "https://github.com/receptron/mulmocast-cli/blob/main/assets/images/mulmocast_credit.png?raw=true", q = /* @__PURE__ */ W({
|
|
20
|
+
__name: "mulmo_player",
|
|
3606
21
|
props: {
|
|
3607
22
|
index: {},
|
|
3608
23
|
videoWithAudioSource: {},
|
|
@@ -3611,321 +26,318 @@ const ka = async (e) => await new Promise((t) => setTimeout(t, e)), Io = { class
|
|
|
3611
26
|
imageSource: {},
|
|
3612
27
|
audioSource: {},
|
|
3613
28
|
text: {},
|
|
3614
|
-
|
|
29
|
+
originalText: {},
|
|
30
|
+
duration: {},
|
|
31
|
+
defaultLang: {},
|
|
32
|
+
currentLang: {},
|
|
33
|
+
playbackSpeed: { default: 1 }
|
|
3615
34
|
},
|
|
3616
35
|
emits: ["play", "pause", "ended"],
|
|
3617
|
-
setup(
|
|
3618
|
-
const
|
|
3619
|
-
|
|
3620
|
-
}, p = (
|
|
3621
|
-
|
|
3622
|
-
|
|
36
|
+
setup(o, { expose: w, emit: u }) {
|
|
37
|
+
const n = o, h = u, m = b(), l = b(), i = b(), d = b(), y = () => {
|
|
38
|
+
l.value && n.videoSource && (n.audioSource && n.currentLang && n.defaultLang && n.currentLang !== n.defaultLang ? l.value.volume = 0.2 : l.value.volume = 0);
|
|
39
|
+
}, p = () => {
|
|
40
|
+
const g = n.playbackSpeed ?? 1;
|
|
41
|
+
m.value && (m.value.playbackRate = g), l.value && (l.value.playbackRate = g), i.value && (i.value.playbackRate = g), d.value && (d.value.playbackRate = g);
|
|
42
|
+
};
|
|
43
|
+
T([() => n.currentLang, () => n.defaultLang, () => n.videoSource, () => n.audioSource], () => {
|
|
44
|
+
y();
|
|
45
|
+
}), T(
|
|
46
|
+
() => n.playbackSpeed,
|
|
47
|
+
() => {
|
|
48
|
+
p();
|
|
49
|
+
}
|
|
50
|
+
), T(l, (g) => {
|
|
51
|
+
g && (y(), p());
|
|
52
|
+
}), T([m, i, d], () => {
|
|
53
|
+
p();
|
|
54
|
+
}), Z(() => {
|
|
55
|
+
y(), p();
|
|
56
|
+
});
|
|
57
|
+
const U = () => {
|
|
58
|
+
x.value = !0, i.value && l.value && (i.value.currentTime = l.value.currentTime, i.value.currentTime === l.value.currentTime && i.value.play()), h("play");
|
|
59
|
+
}, V = (g) => {
|
|
60
|
+
document.hidden || (x.value = !1), !l.value?.ended && i?.value && i.value?.pause(), console.log(g), C(g);
|
|
61
|
+
}, k = () => {
|
|
62
|
+
(!i.value || i.value.ended) && j();
|
|
3623
63
|
}, P = () => {
|
|
3624
|
-
|
|
3625
|
-
!((d = c.value) != null && d.paused) && !((g = c.value) != null && g.ended) && (((m = c.value) == null ? void 0 : m.currentTime) ?? 0) > 0 || f();
|
|
3626
|
-
}, R = () => {
|
|
3627
|
-
var d, g, m;
|
|
3628
|
-
!((d = l.value) != null && d.paused) && !((g = l.value) != null && g.ended) && (((m = l.value) == null ? void 0 : m.currentTime) ?? 0) > 0 || f();
|
|
3629
|
-
}, I = () => {
|
|
3630
|
-
s("play");
|
|
3631
|
-
}, L = (d) => {
|
|
3632
|
-
const g = d.target;
|
|
3633
|
-
g.duration !== g.currentTime && s("pause");
|
|
64
|
+
(!l.value || l.value.ended) && j();
|
|
3634
65
|
}, f = () => {
|
|
3635
|
-
|
|
66
|
+
x.value = !0, h("play");
|
|
67
|
+
}, C = (g) => {
|
|
68
|
+
document.hidden || (x.value = !1);
|
|
69
|
+
const t = g.target;
|
|
70
|
+
t.duration !== t.currentTime && h("pause");
|
|
71
|
+
}, j = () => {
|
|
72
|
+
x.value = !1, h("ended");
|
|
73
|
+
}, x = b(!1);
|
|
74
|
+
let R = null;
|
|
75
|
+
const J = async () => {
|
|
76
|
+
x.value = !0, m.value && (p(), m.value.play()), l.value && (y(), p(), l.value.play(), i.value && (i.value.currentTime = l.value.currentTime, i.value.play())), d.value && (p(), d.value.play()), !m.value && !l.value && !d.value && (await G((n.duration ?? 0) * 1e3), x.value = !1, h("ended"));
|
|
77
|
+
}, M = (g) => {
|
|
78
|
+
g?.paused && !g.ended && g.play().catch(() => {
|
|
79
|
+
});
|
|
80
|
+
}, A = (g, t) => {
|
|
81
|
+
t.paused && !t.ended && (g.ended || (t.currentTime = g.currentTime), t.play().catch(() => {
|
|
82
|
+
}));
|
|
83
|
+
}, $ = () => {
|
|
84
|
+
x.value && (M(m.value), l.value && i.value ? (M(l.value), A(l.value, i.value)) : M(l.value), M(d.value));
|
|
85
|
+
}, I = () => {
|
|
86
|
+
document.hidden && x.value ? R || (R = setInterval($, 500)) : document.hidden || R && (clearInterval(R), R = null);
|
|
87
|
+
}, E = () => {
|
|
88
|
+
document.hidden && x.value && setTimeout($, 50);
|
|
3636
89
|
};
|
|
3637
|
-
return
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
}), (
|
|
3642
|
-
|
|
3643
|
-
|
|
90
|
+
return Z(() => {
|
|
91
|
+
document.addEventListener("visibilitychange", I), m.value?.addEventListener("pause", E), l.value?.addEventListener("pause", E), d.value?.addEventListener("pause", E), i.value?.addEventListener("pause", E);
|
|
92
|
+
}), ae(() => {
|
|
93
|
+
document.removeEventListener("visibilitychange", I), m.value?.removeEventListener("pause", E), l.value?.removeEventListener("pause", E), d.value?.removeEventListener("pause", E), i.value?.removeEventListener("pause", E), R && (clearInterval(R), R = null);
|
|
94
|
+
}), w({
|
|
95
|
+
play: J
|
|
96
|
+
}), (g, t) => (s(), r("div", ce, [
|
|
97
|
+
o.videoWithAudioSource ? (s(), r("div", ve, [
|
|
98
|
+
v("video", {
|
|
3644
99
|
ref_key: "videoWithAudioRef",
|
|
3645
|
-
ref:
|
|
3646
|
-
src:
|
|
100
|
+
ref: m,
|
|
101
|
+
src: o.videoWithAudioSource,
|
|
3647
102
|
class: "mulmocast-video mx-auto h-auto max-h-[80vh] w-auto object-contain",
|
|
3648
103
|
controls: !0,
|
|
3649
104
|
playsinline: "true",
|
|
3650
|
-
onPlay:
|
|
3651
|
-
onPause:
|
|
3652
|
-
onEnded:
|
|
3653
|
-
}, null, 40,
|
|
3654
|
-
])) :
|
|
3655
|
-
|
|
105
|
+
onPlay: f,
|
|
106
|
+
onPause: C,
|
|
107
|
+
onEnded: j
|
|
108
|
+
}, null, 40, me)
|
|
109
|
+
])) : o.soundEffectSource || o.videoSource ? (s(), r("div", pe, [
|
|
110
|
+
v("video", {
|
|
3656
111
|
ref_key: "videoRef",
|
|
3657
112
|
ref: l,
|
|
3658
113
|
class: "mulmocast-video mx-auto h-auto max-h-[80vh] w-auto object-contain",
|
|
3659
|
-
src:
|
|
114
|
+
src: o.soundEffectSource || o.videoSource,
|
|
3660
115
|
controls: !0,
|
|
3661
116
|
playsinline: "true",
|
|
3662
|
-
onPlay:
|
|
3663
|
-
onPause:
|
|
3664
|
-
onEnded:
|
|
3665
|
-
}, null, 40,
|
|
3666
|
-
|
|
117
|
+
onPlay: U,
|
|
118
|
+
onPause: V,
|
|
119
|
+
onEnded: k
|
|
120
|
+
}, null, 40, ge),
|
|
121
|
+
o.audioSource ? (s(), r("audio", {
|
|
3667
122
|
key: 0,
|
|
3668
123
|
ref_key: "audioSyncRef",
|
|
3669
|
-
ref:
|
|
3670
|
-
src:
|
|
124
|
+
ref: i,
|
|
125
|
+
src: o.audioSource,
|
|
3671
126
|
controls: !0,
|
|
3672
127
|
class: "hidden",
|
|
3673
|
-
onEnded:
|
|
3674
|
-
}, null, 40,
|
|
3675
|
-
])) :
|
|
3676
|
-
|
|
128
|
+
onEnded: P
|
|
129
|
+
}, null, 40, fe)) : _("", !0)
|
|
130
|
+
])) : o.audioSource ? (s(), r("div", ye, [
|
|
131
|
+
o.imageSource ? (s(), r("img", {
|
|
132
|
+
key: 0,
|
|
133
|
+
src: o.imageSource,
|
|
134
|
+
class: "mx-auto h-auto max-h-[80vh] w-auto object-contain",
|
|
135
|
+
alt: "Background"
|
|
136
|
+
}, null, 8, be)) : (s(), r("img", {
|
|
137
|
+
key: 1,
|
|
138
|
+
src: Le,
|
|
139
|
+
class: "mx-auto h-auto max-h-[80vh] w-auto object-contain",
|
|
140
|
+
alt: "Background"
|
|
141
|
+
})),
|
|
142
|
+
v("audio", {
|
|
3677
143
|
ref_key: "audioRef",
|
|
3678
|
-
ref:
|
|
3679
|
-
class: "mulmocast-
|
|
3680
|
-
src:
|
|
3681
|
-
poster: e.imageSource ?? Fo,
|
|
144
|
+
ref: d,
|
|
145
|
+
class: "mulmocast-audio absolute inset-0 w-full h-full",
|
|
146
|
+
src: o.audioSource,
|
|
3682
147
|
controls: !0,
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
ref_key: "imageRef",
|
|
3691
|
-
ref: b,
|
|
3692
|
-
src: e.imageSource,
|
|
148
|
+
onPlay: f,
|
|
149
|
+
onPause: C,
|
|
150
|
+
onEnded: j
|
|
151
|
+
}, null, 40, he)
|
|
152
|
+
])) : o.imageSource ? (s(), r("div", Se, [
|
|
153
|
+
v("img", {
|
|
154
|
+
src: o.imageSource,
|
|
3693
155
|
class: "max-w-full max-h-full object-contain"
|
|
3694
|
-
}, null, 8,
|
|
3695
|
-
])) : (
|
|
3696
|
-
|
|
156
|
+
}, null, 8, we)
|
|
157
|
+
])) : (s(), r("div", ke, "No media available")),
|
|
158
|
+
o.text ? (s(), r("div", xe, [
|
|
159
|
+
v("p", Pe, N(o.text), 1),
|
|
160
|
+
o.originalText && o.originalText !== o.text ? (s(), r("p", Re, N(o.originalText), 1)) : _("", !0)
|
|
161
|
+
])) : _("", !0)
|
|
3697
162
|
]));
|
|
3698
163
|
}
|
|
3699
|
-
}),
|
|
164
|
+
}), Ee = ["value"], _e = ["value"], Ce = /* @__PURE__ */ W({
|
|
3700
165
|
__name: "select_language",
|
|
3701
166
|
props: {
|
|
3702
167
|
modelValue: {}
|
|
3703
168
|
},
|
|
3704
169
|
emits: ["update:modelValue"],
|
|
3705
|
-
setup(
|
|
3706
|
-
const
|
|
3707
|
-
|
|
3708
|
-
|
|
170
|
+
setup(o, { emit: w }) {
|
|
171
|
+
const u = ["en", "ja"], n = {
|
|
172
|
+
en: "English",
|
|
173
|
+
ja: "日本語"
|
|
174
|
+
}, h = w, m = (l) => {
|
|
175
|
+
const i = l.target;
|
|
176
|
+
h("update:modelValue", i.value);
|
|
3709
177
|
};
|
|
3710
|
-
return (
|
|
3711
|
-
value:
|
|
3712
|
-
|
|
178
|
+
return (l, i) => (s(), r("select", {
|
|
179
|
+
value: o.modelValue,
|
|
180
|
+
class: "px-4 py-2 bg-white border-2 border-gray-300 rounded-lg shadow-sm hover:border-indigo-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 focus:outline-none transition-colors cursor-pointer text-base font-medium text-gray-700",
|
|
181
|
+
onChange: m
|
|
3713
182
|
}, [
|
|
3714
|
-
(
|
|
3715
|
-
key:
|
|
3716
|
-
value:
|
|
3717
|
-
},
|
|
3718
|
-
], 40,
|
|
3719
|
-
}
|
|
3720
|
-
}),
|
|
3721
|
-
__name: "
|
|
183
|
+
(s(), r(z, null, te(u, (d) => v("option", {
|
|
184
|
+
key: d,
|
|
185
|
+
value: d
|
|
186
|
+
}, N(n[d] || d), 9, _e)), 64))
|
|
187
|
+
], 40, Ee));
|
|
188
|
+
}
|
|
189
|
+
}), Te = { class: "w-full overflow-hidden" }, Oe = { class: "max-w-7xl mx-auto px-4" }, je = { class: "flex items-center justify-between" }, Me = ["disabled"], Ne = { class: "px-4" }, Ue = ["disabled"], Je = ["src"], $e = /* @__PURE__ */ W({
|
|
190
|
+
__name: "mulmo_viewer",
|
|
3722
191
|
props: {
|
|
3723
192
|
dataSet: {},
|
|
3724
193
|
basePath: {},
|
|
3725
|
-
initPage: {}
|
|
194
|
+
initPage: {},
|
|
195
|
+
audioLang: { default: "en" },
|
|
196
|
+
textLang: { default: "en" },
|
|
197
|
+
playbackSpeed: { default: 1 }
|
|
3726
198
|
},
|
|
3727
|
-
emits: ["updatedPage"],
|
|
3728
|
-
setup(
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
}), L = le(() => {
|
|
3743
|
-
var W, de;
|
|
3744
|
-
const D = (de = (W = p.value) == null ? void 0 : W.audioSources) == null ? void 0 : de[v.value];
|
|
3745
|
-
return D ? a.basePath + "/" + D : "";
|
|
3746
|
-
}), f = le(() => {
|
|
3747
|
-
var D;
|
|
3748
|
-
return (D = p.value) != null && D.imageSource ? a.basePath + "/" + p.value.imageSource : "";
|
|
3749
|
-
}), d = le(() => {
|
|
3750
|
-
var D, W, de;
|
|
3751
|
-
return ((W = (D = p.value) == null ? void 0 : D.multiLinguals) == null ? void 0 : W[b.value]) ?? ((de = p.value) == null ? void 0 : de.text) ?? "";
|
|
3752
|
-
}), g = Q(!1), m = () => {
|
|
3753
|
-
g.value = !0, _.value && _.value.play();
|
|
3754
|
-
}, O = () => {
|
|
3755
|
-
console.log("pause"), g.value = !1, _.value && _.value.pause();
|
|
3756
|
-
}, y = async () => {
|
|
3757
|
-
await ka(500), c.value && c.value.play();
|
|
3758
|
-
}, N = (D) => {
|
|
3759
|
-
o.value !== D && (o.value = D, g.value && l.value && y());
|
|
3760
|
-
}, M = (D) => {
|
|
3761
|
-
const W = o.value + D;
|
|
3762
|
-
return W > -1 && W < s ? (N(W), r("updatedPage", W), !0) : !1;
|
|
3763
|
-
}, V = () => {
|
|
3764
|
-
console.log("end"), g.value = !1, l.value && M(1) ? y() : _.value && _.value.pause();
|
|
3765
|
-
};
|
|
3766
|
-
return t({
|
|
3767
|
-
updatePage: N
|
|
3768
|
-
}), (D, W) => {
|
|
3769
|
-
var de, Pe, C, A;
|
|
3770
|
-
return Y(), B("div", $o, [
|
|
3771
|
-
H("div", xo, [
|
|
3772
|
-
H("div", Wo, [
|
|
3773
|
-
H("button", {
|
|
3774
|
-
class: "px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50",
|
|
3775
|
-
disabled: o.value === 0,
|
|
3776
|
-
onClick: W[0] || (W[0] = (U) => M(-1))
|
|
3777
|
-
}, " Prev ", 8, Go),
|
|
3778
|
-
H("div", jo, [
|
|
3779
|
-
vt(Hn, {
|
|
3780
|
-
ref_key: "mediaPlayer",
|
|
3781
|
-
ref: c,
|
|
3782
|
-
"video-with-audio-source": P.value,
|
|
3783
|
-
"video-source": I.value,
|
|
3784
|
-
"sound-effect-source": R.value,
|
|
3785
|
-
"audio-source": L.value,
|
|
3786
|
-
"image-source": f.value,
|
|
3787
|
-
index: o.value,
|
|
3788
|
-
text: d.value,
|
|
3789
|
-
duration: (de = p.value) == null ? void 0 : de.duration,
|
|
3790
|
-
onPlay: m,
|
|
3791
|
-
onPause: O,
|
|
3792
|
-
onEnded: V
|
|
3793
|
-
}, null, 8, ["video-with-audio-source", "video-source", "sound-effect-source", "audio-source", "image-source", "index", "text", "duration"]),
|
|
3794
|
-
o.value + 1 < ht(s) ? Jn((Y(), Qn(Hn, {
|
|
3795
|
-
key: 0,
|
|
3796
|
-
data: (Pe = e.dataSet) == null ? void 0 : Pe.beats[o.value + 1],
|
|
3797
|
-
"base-path": e.basePath,
|
|
3798
|
-
index: o.value + 1
|
|
3799
|
-
}, null, 8, ["data", "base-path", "index"])), [
|
|
3800
|
-
[Ga, !1]
|
|
3801
|
-
]) : be("", !0)
|
|
3802
|
-
]),
|
|
3803
|
-
(C = e.dataSet) != null && C.bgmFile ? (Y(), B("audio", {
|
|
3804
|
-
key: 0,
|
|
3805
|
-
ref_key: "bgmRef",
|
|
3806
|
-
ref: _,
|
|
3807
|
-
src: (A = e.dataSet) == null ? void 0 : A.bgmFile
|
|
3808
|
-
}, null, 8, Yo)) : be("", !0),
|
|
3809
|
-
H("button", {
|
|
3810
|
-
class: "px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50",
|
|
3811
|
-
disabled: o.value >= ht(s) - 1,
|
|
3812
|
-
onClick: W[1] || (W[1] = (U) => M(1))
|
|
3813
|
-
}, " Next ", 8, Ho)
|
|
3814
|
-
])
|
|
3815
|
-
]),
|
|
3816
|
-
H("div", null, [
|
|
3817
|
-
W[4] || (W[4] = je("Audio: ", -1)),
|
|
3818
|
-
vt(Kn, {
|
|
3819
|
-
modelValue: v.value,
|
|
3820
|
-
"onUpdate:modelValue": W[2] || (W[2] = (U) => v.value = U)
|
|
3821
|
-
}, null, 8, ["modelValue"])
|
|
3822
|
-
]),
|
|
3823
|
-
H("div", null, [
|
|
3824
|
-
W[5] || (W[5] = je("Text: ", -1)),
|
|
3825
|
-
vt(Kn, {
|
|
3826
|
-
modelValue: b.value,
|
|
3827
|
-
"onUpdate:modelValue": W[3] || (W[3] = (U) => b.value = U)
|
|
3828
|
-
}, null, 8, ["modelValue"])
|
|
3829
|
-
])
|
|
3830
|
-
]);
|
|
3831
|
-
};
|
|
3832
|
-
}
|
|
3833
|
-
}), Bo = {
|
|
3834
|
-
en: {
|
|
3835
|
-
message: {
|
|
3836
|
-
hello: "Hello"
|
|
3837
|
-
},
|
|
3838
|
-
ui: {
|
|
3839
|
-
common: {
|
|
3840
|
-
noLang: "No language available",
|
|
3841
|
-
noMedia: "No media available"
|
|
3842
|
-
},
|
|
3843
|
-
actions: {
|
|
3844
|
-
translate: "Translate",
|
|
3845
|
-
generateAudio: "Generate Audio"
|
|
3846
|
-
}
|
|
3847
|
-
},
|
|
3848
|
-
mulmoViewer: {
|
|
3849
|
-
text: "Text",
|
|
3850
|
-
audio: "Audio"
|
|
3851
|
-
},
|
|
3852
|
-
project: {
|
|
3853
|
-
productTabs: {
|
|
3854
|
-
slide: {
|
|
3855
|
-
autoPlay: "Auto Play",
|
|
3856
|
-
details: "{current} / {pages}"
|
|
199
|
+
emits: ["updatedPage", "update:audioLang", "update:textLang", "allCompleted"],
|
|
200
|
+
setup(o, { expose: w, emit: u }) {
|
|
201
|
+
const n = o, h = u, m = n.dataSet?.beats?.length ?? 0, l = b(n.initPage ?? 0), i = b(!0), d = b(), y = b(), p = L({
|
|
202
|
+
get: () => n.audioLang,
|
|
203
|
+
set: (t) => h("update:audioLang", t || "en")
|
|
204
|
+
}), U = L({
|
|
205
|
+
get: () => n.textLang,
|
|
206
|
+
set: (t) => h("update:textLang", t || "en")
|
|
207
|
+
});
|
|
208
|
+
T(
|
|
209
|
+
() => n.audioLang,
|
|
210
|
+
async (t, e) => {
|
|
211
|
+
if (t !== e && f.value) {
|
|
212
|
+
const a = f.value;
|
|
213
|
+
f.value = !1, await G(500), a && d.value && (f.value = !0, await d.value.play());
|
|
3857
214
|
}
|
|
3858
215
|
}
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
zh: "Chinese",
|
|
3864
|
-
ko: "Korean",
|
|
3865
|
-
es: "Spanish",
|
|
3866
|
-
fr: "French",
|
|
3867
|
-
de: "German"
|
|
3868
|
-
}
|
|
3869
|
-
},
|
|
3870
|
-
ja: {
|
|
3871
|
-
message: {
|
|
3872
|
-
hello: "こんにちは"
|
|
3873
|
-
},
|
|
3874
|
-
ui: {
|
|
3875
|
-
common: {
|
|
3876
|
-
noLang: "言語がありません",
|
|
3877
|
-
noMedia: "メディアがありません"
|
|
3878
|
-
},
|
|
3879
|
-
actions: {
|
|
3880
|
-
translate: "翻訳",
|
|
3881
|
-
generateAudio: "音声を生成"
|
|
216
|
+
), T(
|
|
217
|
+
() => n.textLang,
|
|
218
|
+
async (t, e) => {
|
|
219
|
+
t !== e && f.value && (await G(100), d.value && await d.value.play());
|
|
3882
220
|
}
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
221
|
+
), T(y, (t) => {
|
|
222
|
+
t && (t.volume = 0.3);
|
|
223
|
+
});
|
|
224
|
+
const V = L(() => n.dataSet?.beats[l.value]), k = (t) => t ? n.basePath + "/" + t : "", P = L(() => k(n.dataSet?.bgmSource)), f = b(!1), C = () => {
|
|
225
|
+
f.value = !0, y.value && (y.value.volume = 0.3, y.value.play());
|
|
226
|
+
}, j = () => {
|
|
227
|
+
console.log("pause"), f.value = !1, y.value && y.value.pause();
|
|
228
|
+
}, x = async () => {
|
|
229
|
+
await G(500), d.value && d.value.play();
|
|
230
|
+
}, R = (t) => {
|
|
231
|
+
l.value !== t && (l.value = t, f.value && i.value && x());
|
|
232
|
+
}, J = (t) => {
|
|
233
|
+
const e = l.value + t;
|
|
234
|
+
return e > -1 && e < m ? (R(e), h("updatedPage", e), !0) : !1;
|
|
235
|
+
}, M = () => {
|
|
236
|
+
console.log("end"), i.value && J(1) ? x() : (f.value = !1, y.value && y.value.pause(), h("allCompleted"));
|
|
237
|
+
}, A = {
|
|
238
|
+
onPlay: C,
|
|
239
|
+
onPause: j,
|
|
240
|
+
onEnded: M
|
|
241
|
+
}, $ = L(() => {
|
|
242
|
+
const t = V.value, e = t?.audioSources?.[p.value], a = t?.multiLinguals?.[U.value] ?? t?.text ?? "", c = n.dataSet?.lang ? t?.multiLinguals?.[n.dataSet.lang] ?? t?.text ?? "" : "";
|
|
243
|
+
return {
|
|
244
|
+
videoWithAudioSource: k(t?.videoWithAudioSource),
|
|
245
|
+
videoSource: k(t?.videoSource),
|
|
246
|
+
soundEffectSource: k(t?.soundEffectSource),
|
|
247
|
+
audioSource: k(e),
|
|
248
|
+
imageSource: k(t?.imageSource),
|
|
249
|
+
index: l.value,
|
|
250
|
+
text: a,
|
|
251
|
+
originalText: c,
|
|
252
|
+
duration: t?.duration,
|
|
253
|
+
defaultLang: n.dataSet?.lang,
|
|
254
|
+
currentLang: p.value,
|
|
255
|
+
playbackSpeed: n.playbackSpeed,
|
|
256
|
+
...A
|
|
257
|
+
};
|
|
258
|
+
}), I = L(() => n.dataSet?.beats[l.value + 1]), E = L(() => {
|
|
259
|
+
if (l.value + 1 >= m) return null;
|
|
260
|
+
const t = I.value;
|
|
261
|
+
return {
|
|
262
|
+
videoWithAudioSource: k(t?.videoWithAudioSource),
|
|
263
|
+
videoSource: k(t?.videoSource),
|
|
264
|
+
soundEffectSource: k(t?.soundEffectSource),
|
|
265
|
+
audioSource: k(t?.audioSources?.[p.value]),
|
|
266
|
+
imageSource: k(t?.imageSource),
|
|
267
|
+
index: l.value + 1,
|
|
268
|
+
text: t?.multiLinguals?.[U.value] ?? t?.text ?? "",
|
|
269
|
+
duration: t?.duration
|
|
270
|
+
};
|
|
271
|
+
}), g = L(() => ({
|
|
272
|
+
MulmoPlayer: q,
|
|
273
|
+
pageProps: $.value,
|
|
274
|
+
currentPage: l.value,
|
|
275
|
+
pageCount: m,
|
|
276
|
+
pageMove: J,
|
|
277
|
+
isPlaying: f.value,
|
|
278
|
+
audioLang: p,
|
|
279
|
+
textLang: U,
|
|
280
|
+
SelectLanguage: Ce,
|
|
281
|
+
mediaPlayerRef: d,
|
|
282
|
+
// Event handlers for direct access
|
|
283
|
+
handlePlay: C,
|
|
284
|
+
handlePause: j,
|
|
285
|
+
handleEnded: M
|
|
286
|
+
}));
|
|
287
|
+
return w({
|
|
288
|
+
updatePage: R
|
|
289
|
+
}), (t, e) => (s(), r(z, null, [
|
|
290
|
+
ue(t.$slots, "default", H(se(g.value)), () => [
|
|
291
|
+
v("div", Te, [
|
|
292
|
+
v("div", Oe, [
|
|
293
|
+
v("div", je, [
|
|
294
|
+
v("button", {
|
|
295
|
+
class: "px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50",
|
|
296
|
+
disabled: l.value === 0,
|
|
297
|
+
onClick: e[0] || (e[0] = (a) => J(-1))
|
|
298
|
+
}, " Prev ", 8, Me),
|
|
299
|
+
v("div", Ne, [
|
|
300
|
+
ie(q, Y({
|
|
301
|
+
ref_key: "mediaPlayer",
|
|
302
|
+
ref: d
|
|
303
|
+
}, $.value), null, 16)
|
|
304
|
+
]),
|
|
305
|
+
v("button", {
|
|
306
|
+
class: "px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50",
|
|
307
|
+
disabled: l.value >= X(m) - 1,
|
|
308
|
+
onClick: e[1] || (e[1] = (a) => J(1))
|
|
309
|
+
}, " Next ", 8, Ue)
|
|
310
|
+
])
|
|
311
|
+
])
|
|
312
|
+
])
|
|
313
|
+
]),
|
|
314
|
+
E.value ? Q((s(), ee(q, H(Y({ key: 0 }, E.value)), null, 16)), [
|
|
315
|
+
[re, !1]
|
|
316
|
+
]) : _("", !0),
|
|
317
|
+
P.value ? (s(), r("audio", {
|
|
318
|
+
key: 1,
|
|
319
|
+
ref_key: "bgmRef",
|
|
320
|
+
ref: y,
|
|
321
|
+
src: P.value
|
|
322
|
+
}, null, 8, Je)) : _("", !0)
|
|
323
|
+
], 64));
|
|
324
|
+
}
|
|
325
|
+
}), Ve = { class: "mulmocast-container" }, Ie = { class: "mulmocast-content-wrapper" }, Ae = { class: "p-4" }, Be = {
|
|
3914
326
|
key: 0,
|
|
3915
327
|
class: "header-row"
|
|
3916
|
-
},
|
|
328
|
+
}, We = { class: "document-title" }, Fe = { class: "button-group" }, De = ["disabled"], Ge = {
|
|
3917
329
|
key: 0,
|
|
3918
330
|
class: "error-message"
|
|
3919
|
-
},
|
|
331
|
+
}, qe = {
|
|
3920
332
|
key: 1,
|
|
3921
333
|
class: "viewer-container"
|
|
3922
|
-
},
|
|
334
|
+
}, ze = ["src"], He = ["src", "alt"], Ye = { class: "beat-text" }, Ze = {
|
|
3923
335
|
key: 0,
|
|
3924
336
|
class: "script-source"
|
|
3925
|
-
},
|
|
337
|
+
}, Ke = {
|
|
3926
338
|
key: 0,
|
|
3927
339
|
class: "error"
|
|
3928
|
-
},
|
|
340
|
+
}, Qe = ["disabled"], Xe = /* @__PURE__ */ W({
|
|
3929
341
|
__name: "View",
|
|
3930
342
|
props: {
|
|
3931
343
|
selectedResult: {},
|
|
@@ -3933,155 +345,138 @@ const Xo = { class: "mulmocast-container" }, Jo = { class: "mulmocast-content-wr
|
|
|
3933
345
|
pluginConfigs: {}
|
|
3934
346
|
},
|
|
3935
347
|
emits: ["updateResult"],
|
|
3936
|
-
setup(
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
),
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
() => {
|
|
3950
|
-
var C, A;
|
|
3951
|
-
return ((A = (C = n.selectedResult) == null ? void 0 : C.data) == null ? void 0 : A.viewerJsonPath) || null;
|
|
3952
|
-
}
|
|
3953
|
-
), g = le(() => {
|
|
3954
|
-
if (!d.value) return "";
|
|
3955
|
-
const C = d.value.indexOf("/output/");
|
|
3956
|
-
if (C !== -1) {
|
|
3957
|
-
const A = d.value.substring(C), U = A.lastIndexOf("/");
|
|
3958
|
-
return A.substring(0, U);
|
|
348
|
+
setup(o, { emit: w }) {
|
|
349
|
+
const u = o, n = L(
|
|
350
|
+
() => u.pluginConfigs?.mulmocast ?? !0
|
|
351
|
+
), h = w, m = b(null), l = b(!1), i = b(null), d = b(null), y = b(
|
|
352
|
+
JSON.stringify(u.selectedResult?.data?.mulmoScript, null, 2) || ""
|
|
353
|
+
), p = b(null), U = b("en"), V = b("en"), k = b(1), P = b(0), f = L(() => u.selectedResult?.data?.moviePath || null), C = L(
|
|
354
|
+
() => u.selectedResult?.data?.viewerJsonPath || null
|
|
355
|
+
), j = L(() => {
|
|
356
|
+
if (!C.value) return "";
|
|
357
|
+
const e = C.value.indexOf("/output/");
|
|
358
|
+
if (e !== -1) {
|
|
359
|
+
const a = C.value.substring(e), c = a.lastIndexOf("/");
|
|
360
|
+
return a.substring(0, c);
|
|
3959
361
|
}
|
|
3960
362
|
return "";
|
|
3961
|
-
}),
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
(U = (A = n.selectedResult) == null ? void 0 : A.data) == null ? void 0 : U.mulmoScript,
|
|
363
|
+
}), x = L(() => {
|
|
364
|
+
const e = JSON.stringify(
|
|
365
|
+
u.selectedResult?.data?.mulmoScript,
|
|
3965
366
|
null,
|
|
3966
367
|
2
|
|
3967
368
|
);
|
|
3968
|
-
return
|
|
369
|
+
return y.value !== e;
|
|
3969
370
|
});
|
|
3970
|
-
|
|
3971
|
-
|
|
371
|
+
ae(() => {
|
|
372
|
+
m.value && URL.revokeObjectURL(m.value);
|
|
3972
373
|
});
|
|
3973
|
-
async function
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
l.value = !0, c.value = null;
|
|
374
|
+
async function R() {
|
|
375
|
+
const e = u.selectedResult?.data?.mulmoScript;
|
|
376
|
+
if (!(!e || l.value || !u.selectedResult)) {
|
|
377
|
+
l.value = !0, i.value = null;
|
|
3978
378
|
try {
|
|
3979
|
-
const
|
|
379
|
+
const a = le(), c = await fetch("/api/generate-movie", {
|
|
3980
380
|
method: "POST",
|
|
3981
381
|
headers: {
|
|
3982
382
|
"Content-Type": "application/json"
|
|
3983
383
|
},
|
|
3984
384
|
body: JSON.stringify({
|
|
3985
|
-
mulmoScript:
|
|
3986
|
-
uuid:
|
|
3987
|
-
images:
|
|
385
|
+
mulmoScript: e,
|
|
386
|
+
uuid: a,
|
|
387
|
+
images: u.selectedResult?.data?.images || {}
|
|
3988
388
|
})
|
|
3989
389
|
});
|
|
3990
|
-
if (
|
|
3991
|
-
const
|
|
3992
|
-
...
|
|
390
|
+
if (c.ok) {
|
|
391
|
+
const S = await c.json(), O = {
|
|
392
|
+
...u.selectedResult,
|
|
3993
393
|
data: {
|
|
3994
|
-
...
|
|
3995
|
-
moviePath:
|
|
3996
|
-
viewerJsonPath:
|
|
394
|
+
...u.selectedResult.data,
|
|
395
|
+
moviePath: S.outputPath,
|
|
396
|
+
viewerJsonPath: S.viewerJsonPath
|
|
3997
397
|
}
|
|
3998
398
|
};
|
|
3999
|
-
|
|
399
|
+
h("updateResult", O);
|
|
4000
400
|
} else {
|
|
4001
|
-
const
|
|
4002
|
-
|
|
401
|
+
const S = await c.json();
|
|
402
|
+
i.value = S.details || S.error || "Failed to generate movie";
|
|
4003
403
|
}
|
|
4004
|
-
} catch (
|
|
4005
|
-
|
|
404
|
+
} catch (a) {
|
|
405
|
+
i.value = a instanceof Error ? a.message : "Unknown error";
|
|
4006
406
|
} finally {
|
|
4007
407
|
l.value = !1;
|
|
4008
408
|
}
|
|
4009
409
|
}
|
|
4010
410
|
}
|
|
4011
|
-
|
|
4012
|
-
() =>
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
},
|
|
4016
|
-
async (C) => {
|
|
4017
|
-
var A, U;
|
|
4018
|
-
!C || (U = (A = n.selectedResult) == null ? void 0 : A.data) != null && U.moviePath || l.value || !n.selectedResult || a.value === !1 || await O();
|
|
411
|
+
T(
|
|
412
|
+
() => u.selectedResult?.data?.mulmoScript,
|
|
413
|
+
async (e) => {
|
|
414
|
+
!e || u.selectedResult?.data?.moviePath || l.value || !u.selectedResult || n.value === !1 || await R();
|
|
4019
415
|
},
|
|
4020
416
|
{ immediate: !0 }
|
|
4021
|
-
),
|
|
4022
|
-
|
|
4023
|
-
async (
|
|
4024
|
-
if (!
|
|
4025
|
-
|
|
417
|
+
), T(
|
|
418
|
+
C,
|
|
419
|
+
async (e) => {
|
|
420
|
+
if (!e) {
|
|
421
|
+
p.value = null;
|
|
4026
422
|
return;
|
|
4027
423
|
}
|
|
4028
424
|
try {
|
|
4029
|
-
const
|
|
425
|
+
const a = await fetch("/api/viewer-json", {
|
|
4030
426
|
method: "POST",
|
|
4031
427
|
headers: {
|
|
4032
428
|
"Content-Type": "application/json"
|
|
4033
429
|
},
|
|
4034
430
|
body: JSON.stringify({
|
|
4035
|
-
viewerJsonPath:
|
|
431
|
+
viewerJsonPath: e
|
|
4036
432
|
})
|
|
4037
433
|
});
|
|
4038
|
-
if (!
|
|
434
|
+
if (!a.ok)
|
|
4039
435
|
throw new Error("Failed to load viewer JSON");
|
|
4040
|
-
|
|
4041
|
-
} catch (
|
|
4042
|
-
console.error("Viewer JSON loading failed:",
|
|
436
|
+
p.value = await a.json();
|
|
437
|
+
} catch (a) {
|
|
438
|
+
console.error("Viewer JSON loading failed:", a), p.value = null;
|
|
4043
439
|
}
|
|
4044
440
|
},
|
|
4045
441
|
{ immediate: !0 }
|
|
4046
|
-
),
|
|
442
|
+
), T(
|
|
4047
443
|
f,
|
|
4048
|
-
async (
|
|
4049
|
-
if (
|
|
444
|
+
async (e) => {
|
|
445
|
+
if (e)
|
|
4050
446
|
try {
|
|
4051
|
-
const
|
|
447
|
+
const a = await fetch("/api/download-movie", {
|
|
4052
448
|
method: "POST",
|
|
4053
449
|
headers: {
|
|
4054
450
|
"Content-Type": "application/json"
|
|
4055
451
|
},
|
|
4056
452
|
body: JSON.stringify({
|
|
4057
|
-
moviePath:
|
|
453
|
+
moviePath: e
|
|
4058
454
|
})
|
|
4059
455
|
});
|
|
4060
|
-
if (!
|
|
456
|
+
if (!a.ok)
|
|
4061
457
|
throw new Error("Failed to load movie");
|
|
4062
|
-
const
|
|
4063
|
-
|
|
4064
|
-
} catch (
|
|
4065
|
-
console.error("Movie loading failed:",
|
|
458
|
+
const c = await a.blob();
|
|
459
|
+
m.value && URL.revokeObjectURL(m.value), m.value = URL.createObjectURL(c);
|
|
460
|
+
} catch (a) {
|
|
461
|
+
console.error("Movie loading failed:", a);
|
|
4066
462
|
}
|
|
4067
463
|
},
|
|
4068
464
|
{ immediate: !0 }
|
|
4069
465
|
);
|
|
4070
|
-
const
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
n.selectedResult.data.mulmoScript,
|
|
466
|
+
const J = () => {
|
|
467
|
+
if (!u.selectedResult?.data?.mulmoScript) return;
|
|
468
|
+
const e = JSON.stringify(
|
|
469
|
+
u.selectedResult.data.mulmoScript,
|
|
4075
470
|
null,
|
|
4076
471
|
2
|
|
4077
|
-
),
|
|
4078
|
-
|
|
4079
|
-
const
|
|
4080
|
-
|
|
4081
|
-
},
|
|
472
|
+
), a = new Blob([e], { type: "application/json" }), c = URL.createObjectURL(a), S = document.createElement("a");
|
|
473
|
+
S.href = c;
|
|
474
|
+
const F = (u.selectedResult.data.mulmoScript.title || "mulmoscript").replace(/[^a-z0-9]/gi, "_").replace(/_+/g, "_").replace(/^_|_$/g, "").toLowerCase();
|
|
475
|
+
S.download = `${F}.json`, document.body.appendChild(S), S.click(), document.body.removeChild(S), URL.revokeObjectURL(c);
|
|
476
|
+
}, M = async () => {
|
|
4082
477
|
if (f.value)
|
|
4083
478
|
try {
|
|
4084
|
-
const
|
|
479
|
+
const e = await fetch("/api/download-movie", {
|
|
4085
480
|
method: "POST",
|
|
4086
481
|
headers: {
|
|
4087
482
|
"Content-Type": "application/json"
|
|
@@ -4090,237 +485,219 @@ const Xo = { class: "mulmocast-container" }, Jo = { class: "mulmocast-content-wr
|
|
|
4090
485
|
moviePath: f.value
|
|
4091
486
|
})
|
|
4092
487
|
});
|
|
4093
|
-
if (!
|
|
488
|
+
if (!e.ok)
|
|
4094
489
|
throw new Error("Failed to download movie");
|
|
4095
|
-
const
|
|
4096
|
-
|
|
4097
|
-
} catch (
|
|
4098
|
-
console.error("Movie download failed:",
|
|
4099
|
-
`Failed to download movie: ${
|
|
490
|
+
const c = e.headers.get("Content-Disposition")?.match(/filename="(.+)"/), S = c ? c[1] : "movie.mp4", O = await e.blob(), F = URL.createObjectURL(O), B = document.createElement("a");
|
|
491
|
+
B.href = F, B.download = S, document.body.appendChild(B), B.click(), document.body.removeChild(B), URL.revokeObjectURL(F);
|
|
492
|
+
} catch (e) {
|
|
493
|
+
console.error("Movie download failed:", e), alert(
|
|
494
|
+
`Failed to download movie: ${e instanceof Error ? e.message : "Unknown error"}`
|
|
4100
495
|
);
|
|
4101
496
|
}
|
|
4102
|
-
},
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
}, q = () => {
|
|
4109
|
-
var C;
|
|
4110
|
-
(C = n.setMute) == null || C.call(n, !1);
|
|
497
|
+
}, A = () => {
|
|
498
|
+
u.setMute?.(!0);
|
|
499
|
+
}, $ = () => {
|
|
500
|
+
u.setMute?.(!1);
|
|
501
|
+
}, I = () => {
|
|
502
|
+
u.setMute?.(!1);
|
|
4111
503
|
};
|
|
4112
|
-
function
|
|
504
|
+
function E() {
|
|
4113
505
|
try {
|
|
4114
|
-
const
|
|
4115
|
-
|
|
4116
|
-
const
|
|
4117
|
-
...
|
|
506
|
+
const e = JSON.parse(y.value);
|
|
507
|
+
d.value = null;
|
|
508
|
+
const a = {
|
|
509
|
+
...u.selectedResult,
|
|
4118
510
|
data: {
|
|
4119
|
-
...
|
|
4120
|
-
mulmoScript:
|
|
511
|
+
...u.selectedResult.data,
|
|
512
|
+
mulmoScript: e,
|
|
4121
513
|
moviePath: void 0,
|
|
4122
514
|
viewerJsonPath: void 0
|
|
4123
515
|
}
|
|
4124
516
|
};
|
|
4125
|
-
|
|
4126
|
-
} catch (
|
|
4127
|
-
|
|
517
|
+
h("updateResult", a);
|
|
518
|
+
} catch (e) {
|
|
519
|
+
d.value = e instanceof Error ? e.message : "Invalid JSON";
|
|
4128
520
|
}
|
|
4129
521
|
}
|
|
4130
|
-
|
|
4131
|
-
() =>
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
},
|
|
4135
|
-
(C) => {
|
|
4136
|
-
b.value = JSON.stringify(C, null, 2) || "", _.value = null;
|
|
522
|
+
T(
|
|
523
|
+
() => u.selectedResult?.data?.mulmoScript,
|
|
524
|
+
(e) => {
|
|
525
|
+
y.value = JSON.stringify(e, null, 2) || "", d.value = null;
|
|
4137
526
|
}
|
|
4138
527
|
);
|
|
4139
|
-
function
|
|
4140
|
-
if (
|
|
4141
|
-
const
|
|
4142
|
-
|
|
4143
|
-
const
|
|
4144
|
-
|
|
528
|
+
function g() {
|
|
529
|
+
if (p.value && P.value < p.value.beats.length - 1) {
|
|
530
|
+
const e = document.querySelector("video, audio"), a = e && !e.paused;
|
|
531
|
+
P.value++, a && setTimeout(() => {
|
|
532
|
+
const c = document.querySelector("video, audio");
|
|
533
|
+
c && c.play().catch(() => {
|
|
4145
534
|
});
|
|
4146
535
|
}, 100);
|
|
4147
536
|
}
|
|
4148
537
|
}
|
|
4149
|
-
function
|
|
4150
|
-
if (
|
|
4151
|
-
const
|
|
4152
|
-
|
|
4153
|
-
const
|
|
4154
|
-
|
|
538
|
+
function t() {
|
|
539
|
+
if (P.value > 0) {
|
|
540
|
+
const e = document.querySelector("video, audio"), a = e && !e.paused;
|
|
541
|
+
P.value--, a && setTimeout(() => {
|
|
542
|
+
const c = document.querySelector("video, audio");
|
|
543
|
+
c && c.play().catch(() => {
|
|
4155
544
|
});
|
|
4156
545
|
}, 100);
|
|
4157
546
|
}
|
|
4158
547
|
}
|
|
4159
|
-
return (
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
(
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
disabled: !f.value,
|
|
4185
|
-
class: ln(["download-btn", f.value ? "download-btn-blue" : "download-btn-disabled"])
|
|
4186
|
-
}, [
|
|
4187
|
-
H("span", {
|
|
4188
|
-
class: ln(["material-icons", { "animate-spin": l.value }])
|
|
4189
|
-
}, ke(l.value ? "hourglass_empty" : "download"), 3),
|
|
4190
|
-
A[6] || (A[6] = je(" Movie ", -1))
|
|
4191
|
-
], 10, el))
|
|
4192
|
-
])
|
|
4193
|
-
])) : be("", !0),
|
|
4194
|
-
(_e = (ae = (oe = e.selectedResult) == null ? void 0 : oe.data) == null ? void 0 : ae.mulmoScript) != null && _e.beats ? (Y(!0), B(Tt, { key: 1 }, qn(e.selectedResult.data.mulmoScript.beats, (he, we) => {
|
|
4195
|
-
var Ve, Je;
|
|
4196
|
-
return Y(), B("div", {
|
|
4197
|
-
key: he.id || we,
|
|
4198
|
-
class: "beat-container"
|
|
548
|
+
return (e, a) => (s(), r("div", Ve, [
|
|
549
|
+
v("div", Ie, [
|
|
550
|
+
v("div", Ae, [
|
|
551
|
+
o.selectedResult?.data?.mulmoScript?.title ? (s(), r("div", Be, [
|
|
552
|
+
v("h1", We, N(o.selectedResult.data.mulmoScript.title), 1),
|
|
553
|
+
v("div", Fe, [
|
|
554
|
+
v("button", {
|
|
555
|
+
onClick: J,
|
|
556
|
+
class: "download-btn download-btn-green"
|
|
557
|
+
}, [...a[4] || (a[4] = [
|
|
558
|
+
v("span", { class: "material-icons" }, "download", -1),
|
|
559
|
+
D(" Script ", -1)
|
|
560
|
+
])]),
|
|
561
|
+
!f.value && !l.value && n.value === !1 ? (s(), r("button", {
|
|
562
|
+
key: 0,
|
|
563
|
+
onClick: R,
|
|
564
|
+
class: "download-btn download-btn-orange"
|
|
565
|
+
}, [...a[5] || (a[5] = [
|
|
566
|
+
v("span", { class: "material-icons" }, "movie", -1),
|
|
567
|
+
D(" Generate Movie ", -1)
|
|
568
|
+
])])) : (s(), r("button", {
|
|
569
|
+
key: 1,
|
|
570
|
+
onClick: M,
|
|
571
|
+
disabled: !f.value,
|
|
572
|
+
class: K(["download-btn", f.value ? "download-btn-blue" : "download-btn-disabled"])
|
|
4199
573
|
}, [
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
574
|
+
v("span", {
|
|
575
|
+
class: K(["material-icons", { "animate-spin": l.value }])
|
|
576
|
+
}, N(l.value ? "hourglass_empty" : "download"), 3),
|
|
577
|
+
a[6] || (a[6] = D(" Movie ", -1))
|
|
578
|
+
], 10, De))
|
|
579
|
+
])
|
|
580
|
+
])) : _("", !0),
|
|
581
|
+
o.selectedResult?.data?.mulmoScript?.beats ? (s(!0), r(z, { key: 1 }, te(o.selectedResult.data.mulmoScript.beats, (c, S) => (s(), r("div", {
|
|
582
|
+
key: c.id || S,
|
|
583
|
+
class: "beat-container"
|
|
584
|
+
}, [
|
|
585
|
+
S === 0 && i.value ? (s(), r("div", Ge, " Movie generation failed: " + N(i.value), 1)) : S === 0 && p.value ? (s(), r("div", qe, [
|
|
586
|
+
P.value > 0 ? (s(), r("button", {
|
|
587
|
+
key: 0,
|
|
588
|
+
onClick: t,
|
|
589
|
+
class: "nav-button nav-button-prev",
|
|
590
|
+
"aria-label": "Previous page"
|
|
591
|
+
}, " ‹ ")) : _("", !0),
|
|
592
|
+
(s(), ee(X($e), {
|
|
593
|
+
ref_for: !0,
|
|
594
|
+
ref: "viewerRef",
|
|
595
|
+
key: `viewer-${P.value}`,
|
|
596
|
+
"audio-lang": U.value,
|
|
597
|
+
"onUpdate:audioLang": a[0] || (a[0] = (O) => U.value = O),
|
|
598
|
+
"text-lang": V.value,
|
|
599
|
+
"onUpdate:textLang": a[1] || (a[1] = (O) => V.value = O),
|
|
600
|
+
"data-set": p.value,
|
|
601
|
+
"base-path": j.value,
|
|
602
|
+
"init-page": P.value,
|
|
603
|
+
"playback-speed": k.value,
|
|
604
|
+
onUpdatedPage: a[2] || (a[2] = (O) => P.value = O)
|
|
605
|
+
}, null, 8, ["audio-lang", "text-lang", "data-set", "base-path", "init-page", "playback-speed"])),
|
|
606
|
+
p.value && P.value < p.value.beats.length - 1 ? (s(), r("button", {
|
|
607
|
+
key: 1,
|
|
608
|
+
onClick: g,
|
|
609
|
+
class: "nav-button nav-button-next",
|
|
610
|
+
"aria-label": "Next page"
|
|
611
|
+
}, " › ")) : _("", !0)
|
|
612
|
+
])) : S === 0 && f.value && m.value && !p.value ? (s(), r("video", {
|
|
613
|
+
key: 2,
|
|
614
|
+
ref_for: !0,
|
|
615
|
+
ref: "videoEl",
|
|
616
|
+
src: m.value,
|
|
617
|
+
controls: "",
|
|
618
|
+
class: "video-player",
|
|
619
|
+
onPlay: A,
|
|
620
|
+
onPause: $,
|
|
621
|
+
onEnded: I
|
|
622
|
+
}, null, 40, ze)) : c.id && o.selectedResult.data?.images?.[c.id] ? (s(), r("img", {
|
|
623
|
+
key: 3,
|
|
624
|
+
src: `data:image/png;base64,${o.selectedResult.data.images[c.id]}`,
|
|
625
|
+
alt: c.text,
|
|
626
|
+
class: "beat-image"
|
|
627
|
+
}, null, 8, He)) : _("", !0),
|
|
628
|
+
v("p", Ye, N(c.text), 1)
|
|
629
|
+
]))), 128)) : _("", !0)
|
|
630
|
+
])
|
|
631
|
+
]),
|
|
632
|
+
o.selectedResult?.data?.mulmoScript ? (s(), r("details", Ze, [
|
|
633
|
+
a[8] || (a[8] = v("summary", null, "Edit MulmoScript Source", -1)),
|
|
634
|
+
d.value ? (s(), r("div", Ke, [
|
|
635
|
+
a[7] || (a[7] = v("strong", null, "Parse Error:", -1)),
|
|
636
|
+
D(" " + N(d.value), 1)
|
|
637
|
+
])) : _("", !0),
|
|
638
|
+
Q(v("textarea", {
|
|
639
|
+
"onUpdate:modelValue": a[3] || (a[3] = (c) => y.value = c),
|
|
640
|
+
class: "script-editor",
|
|
641
|
+
spellcheck: "false"
|
|
642
|
+
}, null, 512), [
|
|
643
|
+
[de, y.value]
|
|
4249
644
|
]),
|
|
4250
|
-
(
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
"onUpdate:modelValue": A[3] || (A[3] = (he) => b.value = he),
|
|
4258
|
-
class: "script-editor",
|
|
4259
|
-
spellcheck: "false"
|
|
4260
|
-
}, null, 512), [
|
|
4261
|
-
[ja, b.value]
|
|
4262
|
-
]),
|
|
4263
|
-
H("button", {
|
|
4264
|
-
onClick: ce,
|
|
4265
|
-
class: "apply-btn",
|
|
4266
|
-
disabled: !m.value
|
|
4267
|
-
}, " Apply Changes ", 8, il)
|
|
4268
|
-
])) : be("", !0)
|
|
4269
|
-
]);
|
|
4270
|
-
};
|
|
645
|
+
v("button", {
|
|
646
|
+
onClick: E,
|
|
647
|
+
class: "apply-btn",
|
|
648
|
+
disabled: !x.value
|
|
649
|
+
}, " Apply Changes ", 8, Qe)
|
|
650
|
+
])) : _("", !0)
|
|
651
|
+
]));
|
|
4271
652
|
}
|
|
4272
|
-
}),
|
|
4273
|
-
const
|
|
4274
|
-
for (const [
|
|
4275
|
-
n
|
|
4276
|
-
return
|
|
4277
|
-
},
|
|
653
|
+
}), et = (o, w) => {
|
|
654
|
+
const u = o.__vccOpts || o;
|
|
655
|
+
for (const [n, h] of w)
|
|
656
|
+
u[n] = h;
|
|
657
|
+
return u;
|
|
658
|
+
}, tt = /* @__PURE__ */ et(Xe, [["__scopeId", "data-v-1e1901ce"]]), at = { class: "bg-green-100 rounded overflow-hidden" }, lt = {
|
|
4278
659
|
key: 0,
|
|
4279
660
|
class: "w-full aspect-video bg-gray-200",
|
|
4280
661
|
style: { position: "relative" }
|
|
4281
|
-
},
|
|
662
|
+
}, ot = ["src", "alt"], nt = { class: "p-2" }, ut = { class: "text-green-600 font-medium text-sm truncate" }, st = /* @__PURE__ */ W({
|
|
4282
663
|
__name: "Preview",
|
|
4283
664
|
props: {
|
|
4284
665
|
result: {}
|
|
4285
666
|
},
|
|
4286
|
-
setup(
|
|
4287
|
-
const
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
return a != null && a.id && ((c = (l = t.result.data) == null ? void 0 : l.images) != null && c[a.id]) ? t.result.data.images[a.id] : null;
|
|
667
|
+
setup(o) {
|
|
668
|
+
const w = o, u = L(() => {
|
|
669
|
+
const n = w.result.data?.mulmoScript?.beats?.[0];
|
|
670
|
+
return n?.id && w.result.data?.images?.[n.id] ? w.result.data.images[n.id] : null;
|
|
4291
671
|
});
|
|
4292
|
-
return (
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
])
|
|
4305
|
-
]);
|
|
4306
|
-
};
|
|
672
|
+
return (n, h) => (s(), r("div", at, [
|
|
673
|
+
u.value ? (s(), r("div", lt, [
|
|
674
|
+
v("img", {
|
|
675
|
+
src: `data:image/png;base64,${u.value}`,
|
|
676
|
+
alt: o.result.data?.mulmoScript?.title || "Presentation",
|
|
677
|
+
class: "w-full h-full object-cover"
|
|
678
|
+
}, null, 8, ot)
|
|
679
|
+
])) : _("", !0),
|
|
680
|
+
v("div", nt, [
|
|
681
|
+
v("div", ut, N(o.result.data?.mulmoScript?.title || o.result.title || "Presentation"), 1)
|
|
682
|
+
])
|
|
683
|
+
]));
|
|
4307
684
|
}
|
|
4308
|
-
}),
|
|
4309
|
-
...
|
|
4310
|
-
viewComponent:
|
|
4311
|
-
previewComponent:
|
|
4312
|
-
samples:
|
|
4313
|
-
systemPrompt:
|
|
4314
|
-
},
|
|
685
|
+
}), it = "showPresentation", rt = `Call the ${it} API to display presentations when the user is asking for a presentation.`, dt = {
|
|
686
|
+
...ne,
|
|
687
|
+
viewComponent: tt,
|
|
688
|
+
previewComponent: st,
|
|
689
|
+
samples: oe,
|
|
690
|
+
systemPrompt: rt
|
|
691
|
+
}, mt = { plugin: dt };
|
|
4315
692
|
export {
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
693
|
+
st as Preview,
|
|
694
|
+
rt as SYSTEM_PROMPT,
|
|
695
|
+
ft as TOOL_DEFINITION,
|
|
696
|
+
it as TOOL_NAME,
|
|
697
|
+
tt as View,
|
|
698
|
+
mt as default,
|
|
699
|
+
yt as executeMulmocast,
|
|
700
|
+
dt as plugin,
|
|
701
|
+
ne as pluginCore,
|
|
702
|
+
oe as samples
|
|
4326
703
|
};
|