lty-protocol 1.0.14 → 1.0.15
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/components/{IpInput.d.ts → Input.vue.d.ts} +4 -3
- package/dist/components/IpInput.vue.d.ts +21 -0
- package/dist/index.d.ts +2 -2
- package/dist/lty-protocol.mjs +956 -952
- package/dist/lty-protocol.umd.js +6 -6
- package/dist/plugin.d.ts +0 -1
- package/package.json +1 -1
- package/dist/components/Input.d.ts +0 -10
package/dist/lty-protocol.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
const
|
|
1
|
+
import * as St from "vue";
|
|
2
|
+
import { defineComponent as ge, openBlock as Ee, createElementBlock as ve, renderSlot as jn, inject as Xn, ref as Bt, watch as Ce, createBlock as Jn, resolveDynamicComponent as Rr, resolveComponent as Mr, Fragment as at, renderList as Qn, toDisplayString as Fr, createVNode as qn, unref as Ur, effectScope as wr, computed as He, isRef as Vr, shallowRef as $r, h as Zn, onMounted as Wr, onUnmounted as Gr, Text as xr, createApp as Hr } from "vue";
|
|
3
|
+
const Yr = /* @__PURE__ */ ge({
|
|
4
4
|
name: "MyButton",
|
|
5
5
|
__name: "MyButton",
|
|
6
6
|
emits: ["click"],
|
|
@@ -8,19 +8,19 @@ const Gr = /* @__PURE__ */ pe({
|
|
|
8
8
|
const n = t, r = () => {
|
|
9
9
|
n("click");
|
|
10
10
|
};
|
|
11
|
-
return (s, a) => (
|
|
11
|
+
return (s, a) => (Ee(), ve("button", {
|
|
12
12
|
class: "my-btn",
|
|
13
13
|
onClick: r
|
|
14
14
|
}, [
|
|
15
|
-
|
|
15
|
+
jn(s.$slots, "default", {}, void 0, !0)
|
|
16
16
|
]));
|
|
17
17
|
}
|
|
18
|
-
}),
|
|
18
|
+
}), ot = (e, t) => {
|
|
19
19
|
const n = e.__vccOpts || e;
|
|
20
20
|
for (const [r, s] of t)
|
|
21
21
|
n[r] = s;
|
|
22
22
|
return n;
|
|
23
|
-
},
|
|
23
|
+
}, Br = /* @__PURE__ */ ot(Yr, [["__scopeId", "data-v-c654f959"]]), Kr = /* @__PURE__ */ ge({
|
|
24
24
|
name: "MyButton",
|
|
25
25
|
__name: "button2",
|
|
26
26
|
emits: ["click"],
|
|
@@ -28,48 +28,52 @@ const Gr = /* @__PURE__ */ pe({
|
|
|
28
28
|
const n = t, r = () => {
|
|
29
29
|
n("click");
|
|
30
30
|
};
|
|
31
|
-
return (s, a) => (
|
|
31
|
+
return (s, a) => (Ee(), ve("button", {
|
|
32
32
|
class: "my-btn",
|
|
33
33
|
onClick: r
|
|
34
34
|
}, [
|
|
35
|
-
|
|
35
|
+
jn(s.$slots, "default", {}, void 0, !0)
|
|
36
36
|
]));
|
|
37
37
|
}
|
|
38
|
-
}),
|
|
39
|
-
name: "
|
|
38
|
+
}), jr = /* @__PURE__ */ ot(Kr, [["__scopeId", "data-v-1477cfc3"]]), Xr = ge({
|
|
39
|
+
name: "Input",
|
|
40
40
|
props: {
|
|
41
41
|
modelValue: String
|
|
42
42
|
},
|
|
43
43
|
emits: ["update:modelValue"],
|
|
44
44
|
setup(e, { emit: t }) {
|
|
45
|
-
const n =
|
|
46
|
-
return
|
|
47
|
-
modelValue: e.modelValue,
|
|
48
|
-
"onUpdate:modelValue": (r) => t("update:modelValue", r)
|
|
49
|
-
}) : null;
|
|
45
|
+
const n = Xn("UIComponents").Input, r = Bt(e.modelValue);
|
|
46
|
+
return Ce(() => e.modelValue, (s) => r.value = s), Ce(r, (s) => t("update:modelValue", s)), { Comp: n, internalValue: r };
|
|
50
47
|
}
|
|
51
|
-
})
|
|
48
|
+
});
|
|
49
|
+
function Jr(e, t, n, r, s, a) {
|
|
50
|
+
return Ee(), Jn(Rr(e.Comp), {
|
|
51
|
+
modelValue: e.internalValue,
|
|
52
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.internalValue = o)
|
|
53
|
+
}, null, 8, ["modelValue"]);
|
|
54
|
+
}
|
|
55
|
+
const Qr = /* @__PURE__ */ ot(Xr, [["render", Jr]]), qr = ge({
|
|
52
56
|
name: "IpInput",
|
|
57
|
+
components: { Input: Qr },
|
|
53
58
|
props: { modelValue: String },
|
|
54
59
|
emits: ["update:modelValue"],
|
|
55
60
|
setup(e, { emit: t }) {
|
|
56
|
-
const n =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
function fi(e, t) {
|
|
61
|
+
const n = Bt((e.modelValue || "0.0.0.0").split("."));
|
|
62
|
+
return Ce(n, () => t("update:modelValue", n.value.join(".")), { deep: !0 }), Ce(() => e.modelValue, (r) => n.value = (r || "0.0.0.0").split(".")), { segments: n };
|
|
63
|
+
}
|
|
64
|
+
}), Zr = { style: { display: "flex", gap: "4px" } };
|
|
65
|
+
function zr(e, t, n, r, s, a) {
|
|
66
|
+
const o = Mr("Input");
|
|
67
|
+
return Ee(), ve("div", Zr, [
|
|
68
|
+
(Ee(!0), ve(at, null, Qn(e.segments, (i, u) => (Ee(), Jn(o, {
|
|
69
|
+
key: u,
|
|
70
|
+
modelValue: e.segments[u],
|
|
71
|
+
"onUpdate:modelValue": (d) => e.segments[u] = d
|
|
72
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
73
|
+
]);
|
|
74
|
+
}
|
|
75
|
+
const Ni = /* @__PURE__ */ ot(qr, [["render", zr]]);
|
|
76
|
+
function Ti(e, t) {
|
|
73
77
|
e.provide("UIComponents", t);
|
|
74
78
|
}
|
|
75
79
|
class re {
|
|
@@ -89,7 +93,7 @@ class re {
|
|
|
89
93
|
return n.fromPlain(t);
|
|
90
94
|
}
|
|
91
95
|
}
|
|
92
|
-
class
|
|
96
|
+
class es {
|
|
93
97
|
static getDefaultConfig(t) {
|
|
94
98
|
console.log(1231231, t);
|
|
95
99
|
const n = t.baseInfo, r = t.configuration, s = t.tab;
|
|
@@ -100,30 +104,30 @@ class Br {
|
|
|
100
104
|
};
|
|
101
105
|
}
|
|
102
106
|
}
|
|
103
|
-
const
|
|
104
|
-
type:
|
|
105
|
-
baseInfo:
|
|
106
|
-
tab:
|
|
107
|
-
configuration:
|
|
107
|
+
const ts = "Ethernet", ns = [{ key: "name", name: { i18nKey: "name" }, defaultValue: "Ethernet" }, { key: "supplier", name: { i18nKey: "supplier" }, defaultValue: { i18nKey: "company" } }, { key: "version", name: { i18nKey: "verison" }, defaultValue: "1.0.0.0" }, { key: "description", name: { i18nKey: "description" }, defaultValue: { i18nKey: "descriptionMap.ethernet" } }, { key: "category", name: { i18nKey: "category" }, defaultValue: { i18nKey: "ethernet" } }], rs = [{ name: { i18nKey: "general" }, key: "general" }, { name: { i18nKey: "ioMapping" }, key: "ioMapping" }], ss = { general: [{ key: "netInterface", name: { i18nKey: "netInterface" }, dataType: "string", componentType: "strInput", defaultValue: "" }, { key: "ipAddress", name: { i18nKey: "ipAddress" }, dataType: "string", componentType: "ipInput", defaultValue: "192.168.1.1" }, { key: "subnetMask", name: { i18nKey: "subnetMask" }, dataType: "string", componentType: "ipInput", defaultValue: "255.255.255.0" }, { key: "defaultGateway", name: { i18nKey: "defaultGateway" }, dataType: "string", componentType: "ipInput", defaultValue: "0.0.0.0" }, { key: "adaptedOSConfiguration", name: { i18nKey: "adaptedOSConfiguration" }, dataType: "boolean", componentType: "switch", defaultValue: !1 }], ioMapping: [{ key: "busCycleTask", name: { i18nKey: "busCycleTask" }, dataType: "string", componentType: "select", defaultValue: "-1" }] }, as = {
|
|
108
|
+
type: ts,
|
|
109
|
+
baseInfo: ns,
|
|
110
|
+
tab: rs,
|
|
111
|
+
configuration: ss
|
|
108
112
|
};
|
|
109
|
-
class
|
|
110
|
-
type =
|
|
111
|
-
moduleType =
|
|
113
|
+
class lt extends re {
|
|
114
|
+
type = pe.ETHERNET;
|
|
115
|
+
moduleType = it[pe.ETHERNET];
|
|
112
116
|
baseInfo;
|
|
113
117
|
config;
|
|
114
118
|
tab;
|
|
115
119
|
constructor(t) {
|
|
116
120
|
super(t);
|
|
117
|
-
const { baseInfo: n, config: r, tab: s } =
|
|
121
|
+
const { baseInfo: n, config: r, tab: s } = es.getDefaultConfig(as);
|
|
118
122
|
this.baseInfo = n, this.config = r, this.tab = s;
|
|
119
123
|
}
|
|
120
124
|
static fromPlain(t) {
|
|
121
|
-
return new
|
|
125
|
+
return new lt(t);
|
|
122
126
|
}
|
|
123
127
|
}
|
|
124
128
|
class Kt extends re {
|
|
125
|
-
type =
|
|
126
|
-
moduleType =
|
|
129
|
+
type = pe.MODBUS_TCP_SERVER;
|
|
130
|
+
moduleType = it[pe.MODBUS_TCP_SERVER];
|
|
127
131
|
constructor(t) {
|
|
128
132
|
super(t);
|
|
129
133
|
}
|
|
@@ -131,28 +135,28 @@ class Kt extends re {
|
|
|
131
135
|
return new Kt(t);
|
|
132
136
|
}
|
|
133
137
|
}
|
|
134
|
-
class
|
|
135
|
-
type =
|
|
136
|
-
moduleType =
|
|
138
|
+
class jt extends re {
|
|
139
|
+
type = pe.MODBUS_TCP_CLIENT;
|
|
140
|
+
moduleType = it[pe.MODBUS_TCP_CLIENT];
|
|
137
141
|
constructor(t) {
|
|
138
142
|
super(t);
|
|
139
143
|
}
|
|
140
144
|
static fromPlain(t) {
|
|
141
|
-
return new
|
|
145
|
+
return new jt(t);
|
|
142
146
|
}
|
|
143
147
|
}
|
|
144
|
-
class
|
|
145
|
-
type =
|
|
146
|
-
moduleType =
|
|
148
|
+
class Xt extends re {
|
|
149
|
+
type = pe.MODBUS_TCP_SLAVE_DEVICE;
|
|
150
|
+
moduleType = it[pe.MODBUS_TCP_SLAVE_DEVICE];
|
|
147
151
|
constructor(t) {
|
|
148
152
|
super(t);
|
|
149
153
|
}
|
|
150
154
|
static fromPlain(t) {
|
|
151
|
-
return new
|
|
155
|
+
return new Xt(t);
|
|
152
156
|
}
|
|
153
157
|
}
|
|
154
|
-
var
|
|
155
|
-
const
|
|
158
|
+
var pe = /* @__PURE__ */ ((e) => (e.ETHERNET = "Ethernet", e.MODBUS_TCP_SERVER = "ModbusTCPServer", e.MODBUS_TCP_CLIENT = "ModbusTCPClient", e.MODBUS_TCP_SLAVE_DEVICE = "ModbusTCPSlaveDevice", e.MODBUS_SERIAL_PORT = "ModbusSerialPort", e.MODBUS_MASTER = "ModbusMaster", e.MODBUS_SLAVE = "ModbusSlave", e.MODBUS_SERIAL = "ModbusSerial", e.OPCUA_SERVER = "OPCUAServer", e.ETHER_CAT_MASTER = "EtherCatMaster", e.ETHER_CAT_SLAVE = "EtherCatSlave", e.ETHER_CAT_MODULE = "EtherCatModule", e))(pe || {});
|
|
159
|
+
const it = {
|
|
156
160
|
Pprogrammable: 4096,
|
|
157
161
|
// 根节点
|
|
158
162
|
Protgrammable_Safety: 4098,
|
|
@@ -206,10 +210,10 @@ const ot = {
|
|
|
206
210
|
EtherCatModule: 16384
|
|
207
211
|
// Ethercat子模块
|
|
208
212
|
};
|
|
209
|
-
class
|
|
213
|
+
class os {
|
|
210
214
|
map = /* @__PURE__ */ new Map();
|
|
211
215
|
constructor() {
|
|
212
|
-
re.register("Ethernet",
|
|
216
|
+
re.register("Ethernet", lt), re.register("ModbusTCPServer", Kt), re.register("ModbusTCPClient", jt), re.register("ModbusTCPSlaveDevice", Xt);
|
|
213
217
|
}
|
|
214
218
|
init(t) {
|
|
215
219
|
this.clear(), t.forEach((n) => {
|
|
@@ -236,63 +240,63 @@ class Zr {
|
|
|
236
240
|
this.map.clear();
|
|
237
241
|
}
|
|
238
242
|
}
|
|
239
|
-
const
|
|
243
|
+
const ls = /* @__PURE__ */ ge({
|
|
240
244
|
__name: "Ethernet",
|
|
241
245
|
props: {
|
|
242
246
|
config: {}
|
|
243
247
|
},
|
|
244
248
|
setup(e) {
|
|
245
|
-
return (t, n) => (
|
|
249
|
+
return (t, n) => (Ee(!0), ve(at, null, Qn(e.config.tab, (r) => (Ee(), ve("div", {
|
|
246
250
|
key: r.key
|
|
247
|
-
},
|
|
251
|
+
}, Fr(t.$t(r.name.i18nKey)), 1))), 128));
|
|
248
252
|
}
|
|
249
|
-
}),
|
|
253
|
+
}), is = /* @__PURE__ */ ge({
|
|
250
254
|
__name: "App",
|
|
251
255
|
setup(e) {
|
|
252
|
-
new
|
|
253
|
-
const t = new
|
|
256
|
+
new os();
|
|
257
|
+
const t = new lt({
|
|
254
258
|
id: 1,
|
|
255
259
|
deviceId: 1,
|
|
256
260
|
type: "Ethernet"
|
|
257
261
|
});
|
|
258
|
-
return (n, r) => (
|
|
259
|
-
|
|
262
|
+
return (n, r) => (Ee(), ve("div", null, [
|
|
263
|
+
qn(ls, { config: Ur(t) }, null, 8, ["config"])
|
|
260
264
|
]));
|
|
261
265
|
}
|
|
262
266
|
});
|
|
263
267
|
function ue(e, t) {
|
|
264
268
|
typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
|
|
265
269
|
}
|
|
266
|
-
const
|
|
267
|
-
function
|
|
268
|
-
|
|
270
|
+
const fn = {};
|
|
271
|
+
function Jt(e) {
|
|
272
|
+
fn[e] || (fn[e] = !0, ue(e));
|
|
269
273
|
}
|
|
270
274
|
const le = typeof window < "u";
|
|
271
|
-
let ee,
|
|
275
|
+
let ee, Ae;
|
|
272
276
|
if (process.env.NODE_ENV !== "production") {
|
|
273
277
|
const e = le && window.performance;
|
|
274
278
|
e && e.mark && e.measure && e.clearMarks && // @ts-ignore browser compat
|
|
275
279
|
e.clearMeasures && (ee = (t) => {
|
|
276
280
|
e.mark(t);
|
|
277
|
-
},
|
|
281
|
+
}, Ae = (t, n, r) => {
|
|
278
282
|
e.measure(t, n, r), e.clearMarks(n), e.clearMarks(r);
|
|
279
283
|
});
|
|
280
284
|
}
|
|
281
|
-
const
|
|
282
|
-
function
|
|
283
|
-
return t.length === 1 && M(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(
|
|
285
|
+
const cs = /\{([0-9a-zA-Z]+)\}/g;
|
|
286
|
+
function ct(e, ...t) {
|
|
287
|
+
return t.length === 1 && M(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(cs, (n, r) => t.hasOwnProperty(r) ? t[r] : "");
|
|
284
288
|
}
|
|
285
|
-
const fe = (e, t = !1) => t ? Symbol.for(e) : Symbol(e),
|
|
286
|
-
let
|
|
287
|
-
const
|
|
288
|
-
function
|
|
289
|
+
const fe = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), us = (e, t, n) => fs({ l: e, k: t, s: n }), fs = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), j = (e) => typeof e == "number" && isFinite(e), _s = (e) => Qt(e) === "[object Date]", Fe = (e) => Qt(e) === "[object RegExp]", ut = (e) => R(e) && Object.keys(e).length === 0, J = Object.assign, ms = Object.create, $ = (e = null) => ms(e);
|
|
290
|
+
let _n;
|
|
291
|
+
const Oe = () => _n || (_n = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : $());
|
|
292
|
+
function mn(e) {
|
|
289
293
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/").replace(/=/g, "=");
|
|
290
294
|
}
|
|
291
|
-
function
|
|
295
|
+
function dn(e) {
|
|
292
296
|
return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
293
297
|
}
|
|
294
|
-
function
|
|
295
|
-
return e = e.replace(/(\w+)\s*=\s*"([^"]*)"/g, (r, s, a) => `${s}="${
|
|
298
|
+
function ds(e) {
|
|
299
|
+
return e = e.replace(/(\w+)\s*=\s*"([^"]*)"/g, (r, s, a) => `${s}="${dn(a)}"`), e = e.replace(/(\w+)\s*=\s*'([^']*)'/g, (r, s, a) => `${s}='${dn(a)}'`), /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e) && (process.env.NODE_ENV !== "production" && ue("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")), [
|
|
296
300
|
// In href, src, action, formaction attributes
|
|
297
301
|
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
|
298
302
|
// In style attributes within url()
|
|
@@ -301,36 +305,36 @@ function os(e) {
|
|
|
301
305
|
e = e.replace(r, "$1javascript:");
|
|
302
306
|
}), e;
|
|
303
307
|
}
|
|
304
|
-
const
|
|
308
|
+
const Es = Object.prototype.hasOwnProperty;
|
|
305
309
|
function oe(e, t) {
|
|
306
|
-
return
|
|
310
|
+
return Es.call(e, t);
|
|
307
311
|
}
|
|
308
|
-
const H = Array.isArray, W = (e) => typeof e == "function", L = (e) => typeof e == "string", F = (e) => typeof e == "boolean", M = (e) => e !== null && typeof e == "object",
|
|
309
|
-
function
|
|
312
|
+
const H = Array.isArray, W = (e) => typeof e == "function", L = (e) => typeof e == "string", F = (e) => typeof e == "boolean", M = (e) => e !== null && typeof e == "object", ps = (e) => M(e) && W(e.then) && W(e.catch), zn = Object.prototype.toString, Qt = (e) => zn.call(e), R = (e) => Qt(e) === "[object Object]", gs = (e) => e == null ? "" : H(e) || R(e) && e.toString === zn ? JSON.stringify(e, null, 2) : String(e);
|
|
313
|
+
function qt(e, t = "") {
|
|
310
314
|
return e.reduce((n, r, s) => s === 0 ? n + r : n + t + r, "");
|
|
311
315
|
}
|
|
312
|
-
const
|
|
313
|
-
function
|
|
316
|
+
const En = 2;
|
|
317
|
+
function Ns(e, t = 0, n = e.length) {
|
|
314
318
|
const r = e.split(/\r?\n/);
|
|
315
319
|
let s = 0;
|
|
316
320
|
const a = [];
|
|
317
321
|
for (let o = 0; o < r.length; o++)
|
|
318
322
|
if (s += r[o].length + 1, s >= t) {
|
|
319
|
-
for (let i = o -
|
|
323
|
+
for (let i = o - En; i <= o + En || n > s; i++) {
|
|
320
324
|
if (i < 0 || i >= r.length)
|
|
321
325
|
continue;
|
|
322
326
|
const u = i + 1;
|
|
323
327
|
a.push(`${u}${" ".repeat(3 - String(u).length)}| ${r[i]}`);
|
|
324
|
-
const
|
|
328
|
+
const d = r[i].length;
|
|
325
329
|
if (i === o) {
|
|
326
|
-
const I = t - (s -
|
|
330
|
+
const I = t - (s - d) + 1, b = Math.max(1, n > s ? d - I : n - t);
|
|
327
331
|
a.push(" | " + " ".repeat(I) + "^".repeat(b));
|
|
328
332
|
} else if (i > o) {
|
|
329
333
|
if (n > s) {
|
|
330
|
-
const I = Math.max(Math.min(n - s,
|
|
334
|
+
const I = Math.max(Math.min(n - s, d), 1);
|
|
331
335
|
a.push(" | " + "^".repeat(I));
|
|
332
336
|
}
|
|
333
|
-
s +=
|
|
337
|
+
s += d + 1;
|
|
334
338
|
}
|
|
335
339
|
}
|
|
336
340
|
break;
|
|
@@ -338,7 +342,7 @@ function us(e, t = 0, n = e.length) {
|
|
|
338
342
|
return a.join(`
|
|
339
343
|
`);
|
|
340
344
|
}
|
|
341
|
-
function
|
|
345
|
+
function Zt() {
|
|
342
346
|
const e = /* @__PURE__ */ new Map();
|
|
343
347
|
return {
|
|
344
348
|
events: e,
|
|
@@ -367,10 +371,10 @@ function rt(e, t) {
|
|
|
367
371
|
});
|
|
368
372
|
}
|
|
369
373
|
}
|
|
370
|
-
function
|
|
374
|
+
function Ts(e, t, n) {
|
|
371
375
|
return { line: e, column: t, offset: n };
|
|
372
376
|
}
|
|
373
|
-
function
|
|
377
|
+
function Rt(e, t, n) {
|
|
374
378
|
return { start: e, end: t };
|
|
375
379
|
}
|
|
376
380
|
const P = {
|
|
@@ -394,7 +398,7 @@ const P = {
|
|
|
394
398
|
UNHANDLED_CODEGEN_NODE_TYPE: 15,
|
|
395
399
|
// minifier error codes
|
|
396
400
|
UNHANDLED_MINIFIER_NODE_TYPE: 16
|
|
397
|
-
},
|
|
401
|
+
}, bs = 17, hs = {
|
|
398
402
|
// tokenizer error messages
|
|
399
403
|
[P.EXPECTED_TOKEN]: "Expected token: '{0}'",
|
|
400
404
|
[P.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
|
|
@@ -416,26 +420,26 @@ const P = {
|
|
|
416
420
|
// minimizer error messages
|
|
417
421
|
[P.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
|
|
418
422
|
};
|
|
419
|
-
function
|
|
420
|
-
const { domain: r, messages: s, args: a } = n, o = process.env.NODE_ENV !== "production" ?
|
|
423
|
+
function Ve(e, t, n = {}) {
|
|
424
|
+
const { domain: r, messages: s, args: a } = n, o = process.env.NODE_ENV !== "production" ? ct((s || hs)[e] || "", ...a || []) : e, i = new SyntaxError(String(o));
|
|
421
425
|
return i.code = e, t && (i.location = t), i.domain = r, i;
|
|
422
426
|
}
|
|
423
|
-
function
|
|
427
|
+
function Is(e) {
|
|
424
428
|
throw e;
|
|
425
429
|
}
|
|
426
|
-
const
|
|
427
|
-
`,
|
|
428
|
-
function
|
|
430
|
+
const Ls = /<\/?[\w\s="/.':;#-\/]+>/, Os = (e) => Ls.test(e), ie = " ", vs = "\r", Q = `
|
|
431
|
+
`, Cs = "\u2028", As = "\u2029";
|
|
432
|
+
function Ss(e) {
|
|
429
433
|
const t = e;
|
|
430
434
|
let n = 0, r = 1, s = 1, a = 0;
|
|
431
|
-
const o = (p) => t[p] ===
|
|
435
|
+
const o = (p) => t[p] === vs && t[p + 1] === Q, i = (p) => t[p] === Q, u = (p) => t[p] === As, d = (p) => t[p] === Cs, I = (p) => o(p) || i(p) || u(p) || d(p), b = () => n, N = () => r, A = () => s, D = () => a, C = (p) => o(p) || u(p) || d(p) ? Q : t[p], S = () => C(n), f = () => C(n + a);
|
|
432
436
|
function m() {
|
|
433
437
|
return a = 0, I(n) && (r++, s = 0), o(n) && n++, n++, s++, t[n];
|
|
434
438
|
}
|
|
435
439
|
function h() {
|
|
436
440
|
return o(n + a) && a++, a++, t[n + a];
|
|
437
441
|
}
|
|
438
|
-
function
|
|
442
|
+
function E() {
|
|
439
443
|
n = 0, r = 1, s = 1, a = 0;
|
|
440
444
|
}
|
|
441
445
|
function O(p = 0) {
|
|
@@ -457,14 +461,14 @@ function bs(e) {
|
|
|
457
461
|
currentPeek: f,
|
|
458
462
|
next: m,
|
|
459
463
|
peek: h,
|
|
460
|
-
reset:
|
|
464
|
+
reset: E,
|
|
461
465
|
resetPeek: O,
|
|
462
466
|
skipToPeek: v
|
|
463
467
|
};
|
|
464
468
|
}
|
|
465
|
-
const me = void 0,
|
|
466
|
-
function
|
|
467
|
-
const n = t.location !== !1, r =
|
|
469
|
+
const me = void 0, ys = ".", pn = "'", Ps = "tokenizer";
|
|
470
|
+
function Ds(e, t = {}) {
|
|
471
|
+
const n = t.location !== !1, r = Ss(e), s = () => r.index(), a = () => Ts(r.line(), r.column(), r.index()), o = a(), i = s(), u = {
|
|
468
472
|
currentType: 13,
|
|
469
473
|
offset: i,
|
|
470
474
|
startLoc: o,
|
|
@@ -476,12 +480,12 @@ function Ls(e, t = {}) {
|
|
|
476
480
|
braceNest: 0,
|
|
477
481
|
inLinked: !1,
|
|
478
482
|
text: ""
|
|
479
|
-
},
|
|
483
|
+
}, d = () => u, { onError: I } = t;
|
|
480
484
|
function b(l, c, g, ...y) {
|
|
481
|
-
const x =
|
|
485
|
+
const x = d();
|
|
482
486
|
if (c.column += g, c.offset += g, I) {
|
|
483
|
-
const
|
|
484
|
-
domain:
|
|
487
|
+
const B = n ? Rt(x.startLoc, c) : null, U = Ve(l, B, {
|
|
488
|
+
domain: Ps,
|
|
485
489
|
args: y
|
|
486
490
|
});
|
|
487
491
|
I(U);
|
|
@@ -490,7 +494,7 @@ function Ls(e, t = {}) {
|
|
|
490
494
|
function N(l, c, g) {
|
|
491
495
|
l.endLoc = a(), l.currentType = c;
|
|
492
496
|
const y = { type: c };
|
|
493
|
-
return n && (y.loc =
|
|
497
|
+
return n && (y.loc = Rt(l.startLoc, l.endLoc)), g != null && (y.value = g), y;
|
|
494
498
|
}
|
|
495
499
|
const A = (l) => N(
|
|
496
500
|
l,
|
|
@@ -532,7 +536,7 @@ function Ls(e, t = {}) {
|
|
|
532
536
|
const y = f(l.currentPeek());
|
|
533
537
|
return l.resetPeek(), y;
|
|
534
538
|
}
|
|
535
|
-
function
|
|
539
|
+
function E(l, c) {
|
|
536
540
|
const { currentType: g } = c;
|
|
537
541
|
if (g !== 2)
|
|
538
542
|
return !1;
|
|
@@ -545,7 +549,7 @@ function Ls(e, t = {}) {
|
|
|
545
549
|
if (g !== 2)
|
|
546
550
|
return !1;
|
|
547
551
|
C(l);
|
|
548
|
-
const y = l.currentPeek() ===
|
|
552
|
+
const y = l.currentPeek() === pn;
|
|
549
553
|
return l.resetPeek(), y;
|
|
550
554
|
}
|
|
551
555
|
function v(l, c) {
|
|
@@ -577,8 +581,8 @@ function Ls(e, t = {}) {
|
|
|
577
581
|
if (g !== 9)
|
|
578
582
|
return !1;
|
|
579
583
|
const y = () => {
|
|
580
|
-
const
|
|
581
|
-
return
|
|
584
|
+
const B = l.currentPeek();
|
|
585
|
+
return B === "{" ? f(l.peek()) : B === "@" || B === "|" || B === ":" || B === "." || B === ie || !B ? !1 : B === Q ? (l.peek(), y()) : ae(l, !1);
|
|
582
586
|
}, x = y();
|
|
583
587
|
return l.resetPeek(), x;
|
|
584
588
|
}
|
|
@@ -588,9 +592,9 @@ function Ls(e, t = {}) {
|
|
|
588
592
|
return l.resetPeek(), c;
|
|
589
593
|
}
|
|
590
594
|
function ae(l, c = !0) {
|
|
591
|
-
const g = (x = !1,
|
|
595
|
+
const g = (x = !1, B = "") => {
|
|
592
596
|
const U = l.currentPeek();
|
|
593
|
-
return U === "{" || U === "@" || !U ? x : U === "|" ? !(
|
|
597
|
+
return U === "{" || U === "@" || !U ? x : U === "|" ? !(B === ie || B === Q) : U === ie ? (l.peek(), g(!0, ie)) : U === Q ? (l.peek(), g(!0, Q)) : !0;
|
|
594
598
|
}, y = g();
|
|
595
599
|
return c && l.resetPeek(), y;
|
|
596
600
|
}
|
|
@@ -598,7 +602,7 @@ function Ls(e, t = {}) {
|
|
|
598
602
|
const g = l.currentChar();
|
|
599
603
|
return g === me ? me : c(g) ? (l.next(), g) : null;
|
|
600
604
|
}
|
|
601
|
-
function
|
|
605
|
+
function Pe(l) {
|
|
602
606
|
const c = l.charCodeAt(0);
|
|
603
607
|
return c >= 97 && c <= 122 || // a-z
|
|
604
608
|
c >= 65 && c <= 90 || // A-Z
|
|
@@ -606,10 +610,10 @@ function Ls(e, t = {}) {
|
|
|
606
610
|
c === 95 || // _
|
|
607
611
|
c === 36;
|
|
608
612
|
}
|
|
609
|
-
function
|
|
610
|
-
return Y(l,
|
|
613
|
+
function mt(l) {
|
|
614
|
+
return Y(l, Pe);
|
|
611
615
|
}
|
|
612
|
-
function
|
|
616
|
+
function dt(l) {
|
|
613
617
|
const c = l.charCodeAt(0);
|
|
614
618
|
return c >= 97 && c <= 122 || // a-z
|
|
615
619
|
c >= 65 && c <= 90 || // A-Z
|
|
@@ -618,32 +622,32 @@ function Ls(e, t = {}) {
|
|
|
618
622
|
c === 36 || // $
|
|
619
623
|
c === 45;
|
|
620
624
|
}
|
|
621
|
-
function
|
|
622
|
-
return Y(l,
|
|
625
|
+
function Et(l) {
|
|
626
|
+
return Y(l, dt);
|
|
623
627
|
}
|
|
624
|
-
function
|
|
628
|
+
function pt(l) {
|
|
625
629
|
const c = l.charCodeAt(0);
|
|
626
630
|
return c >= 48 && c <= 57;
|
|
627
631
|
}
|
|
628
|
-
function
|
|
629
|
-
return Y(l,
|
|
632
|
+
function gt(l) {
|
|
633
|
+
return Y(l, pt);
|
|
630
634
|
}
|
|
631
|
-
function
|
|
635
|
+
function Nt(l) {
|
|
632
636
|
const c = l.charCodeAt(0);
|
|
633
637
|
return c >= 48 && c <= 57 || // 0-9
|
|
634
638
|
c >= 65 && c <= 70 || // A-F
|
|
635
639
|
c >= 97 && c <= 102;
|
|
636
640
|
}
|
|
637
641
|
function _e(l) {
|
|
638
|
-
return Y(l,
|
|
642
|
+
return Y(l, Nt);
|
|
639
643
|
}
|
|
640
|
-
function
|
|
644
|
+
function $e(l) {
|
|
641
645
|
let c = "", g = "";
|
|
642
|
-
for (; c =
|
|
646
|
+
for (; c = gt(l); )
|
|
643
647
|
g += c;
|
|
644
648
|
return g;
|
|
645
649
|
}
|
|
646
|
-
function
|
|
650
|
+
function Tt(l) {
|
|
647
651
|
let c = "";
|
|
648
652
|
for (; ; ) {
|
|
649
653
|
const g = l.currentChar();
|
|
@@ -662,10 +666,10 @@ function Ls(e, t = {}) {
|
|
|
662
666
|
}
|
|
663
667
|
return c;
|
|
664
668
|
}
|
|
665
|
-
function
|
|
669
|
+
function bt(l) {
|
|
666
670
|
S(l);
|
|
667
671
|
let c = "", g = "";
|
|
668
|
-
for (; c =
|
|
672
|
+
for (; c = Et(l); )
|
|
669
673
|
g += c;
|
|
670
674
|
const y = l.currentChar();
|
|
671
675
|
if (y && y !== "}" && y !== me && y !== ie && y !== Q && y !== " ") {
|
|
@@ -674,23 +678,23 @@ function Ls(e, t = {}) {
|
|
|
674
678
|
}
|
|
675
679
|
return l.currentChar() === me && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g;
|
|
676
680
|
}
|
|
677
|
-
function
|
|
681
|
+
function ht(l) {
|
|
678
682
|
S(l);
|
|
679
683
|
let c = "";
|
|
680
|
-
return l.currentChar() === "-" ? (l.next(), c += `-${
|
|
684
|
+
return l.currentChar() === "-" ? (l.next(), c += `-${$e(l)}`) : c += $e(l), l.currentChar() === me && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), c;
|
|
681
685
|
}
|
|
682
|
-
function
|
|
683
|
-
return l !==
|
|
686
|
+
function It(l) {
|
|
687
|
+
return l !== pn && l !== Q;
|
|
684
688
|
}
|
|
685
|
-
function
|
|
689
|
+
function cn(l) {
|
|
686
690
|
S(l), D(l, "'");
|
|
687
691
|
let c = "", g = "";
|
|
688
|
-
for (; c = Y(l,
|
|
689
|
-
c === "\\" ? g +=
|
|
692
|
+
for (; c = Y(l, It); )
|
|
693
|
+
c === "\\" ? g += Lt(l) : g += c;
|
|
690
694
|
const y = l.currentChar();
|
|
691
695
|
return y === Q || y === me ? (b(P.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), y === Q && (l.next(), D(l, "'")), g) : (D(l, "'"), g);
|
|
692
696
|
}
|
|
693
|
-
function
|
|
697
|
+
function Lt(l) {
|
|
694
698
|
const c = l.currentChar();
|
|
695
699
|
switch (c) {
|
|
696
700
|
case "\\":
|
|
@@ -708,39 +712,39 @@ function Ls(e, t = {}) {
|
|
|
708
712
|
D(l, c);
|
|
709
713
|
let y = "";
|
|
710
714
|
for (let x = 0; x < g; x++) {
|
|
711
|
-
const
|
|
712
|
-
if (!
|
|
715
|
+
const B = _e(l);
|
|
716
|
+
if (!B) {
|
|
713
717
|
b(P.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${c}${y}${l.currentChar()}`);
|
|
714
718
|
break;
|
|
715
719
|
}
|
|
716
|
-
y +=
|
|
720
|
+
y += B;
|
|
717
721
|
}
|
|
718
722
|
return `\\${c}${y}`;
|
|
719
723
|
}
|
|
720
|
-
function
|
|
724
|
+
function Ot(l) {
|
|
721
725
|
return l !== "{" && l !== "}" && l !== ie && l !== Q;
|
|
722
726
|
}
|
|
723
727
|
function Ze(l) {
|
|
724
728
|
S(l);
|
|
725
729
|
let c = "", g = "";
|
|
726
|
-
for (; c = Y(l,
|
|
730
|
+
for (; c = Y(l, Ot); )
|
|
727
731
|
g += c;
|
|
728
732
|
return g;
|
|
729
733
|
}
|
|
730
|
-
function
|
|
734
|
+
function vt(l) {
|
|
731
735
|
let c = "", g = "";
|
|
732
|
-
for (; c =
|
|
736
|
+
for (; c = mt(l); )
|
|
733
737
|
g += c;
|
|
734
738
|
return g;
|
|
735
739
|
}
|
|
736
|
-
function
|
|
740
|
+
function Ct(l) {
|
|
737
741
|
const c = (g) => {
|
|
738
742
|
const y = l.currentChar();
|
|
739
743
|
return y === "{" || y === "@" || y === "|" || y === "(" || y === ")" || !y || y === ie ? g : (g += y, l.next(), c(g));
|
|
740
744
|
};
|
|
741
745
|
return c("");
|
|
742
746
|
}
|
|
743
|
-
function
|
|
747
|
+
function We(l) {
|
|
744
748
|
S(l);
|
|
745
749
|
const c = D(
|
|
746
750
|
l,
|
|
@@ -749,7 +753,7 @@ function Ls(e, t = {}) {
|
|
|
749
753
|
);
|
|
750
754
|
return S(l), c;
|
|
751
755
|
}
|
|
752
|
-
function
|
|
756
|
+
function Ge(l, c) {
|
|
753
757
|
let g = null;
|
|
754
758
|
switch (l.currentChar()) {
|
|
755
759
|
case "{":
|
|
@@ -767,27 +771,27 @@ function Ls(e, t = {}) {
|
|
|
767
771
|
/* TokenChars.BraceRight */
|
|
768
772
|
), c.braceNest--, c.braceNest > 0 && S(l), c.inLinked && c.braceNest === 0 && (c.inLinked = !1), g;
|
|
769
773
|
case "@":
|
|
770
|
-
return c.braceNest > 0 && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g =
|
|
774
|
+
return c.braceNest > 0 && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g = be(l, c) || A(c), c.braceNest = 0, g;
|
|
771
775
|
default: {
|
|
772
|
-
let x = !0,
|
|
776
|
+
let x = !0, B = !0, U = !0;
|
|
773
777
|
if (X(l))
|
|
774
|
-
return c.braceNest > 0 && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g = N(c, 1,
|
|
778
|
+
return c.braceNest > 0 && b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), g = N(c, 1, We(l)), c.braceNest = 0, c.inLinked = !1, g;
|
|
775
779
|
if (c.braceNest > 0 && (c.currentType === 4 || c.currentType === 5 || c.currentType === 6))
|
|
776
|
-
return b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), c.braceNest = 0,
|
|
780
|
+
return b(P.UNTERMINATED_CLOSING_BRACE, a(), 0), c.braceNest = 0, xe(l, c);
|
|
777
781
|
if (x = h(l, c))
|
|
778
|
-
return g = N(c, 4,
|
|
779
|
-
if (
|
|
780
|
-
return g = N(c, 5,
|
|
782
|
+
return g = N(c, 4, bt(l)), S(l), g;
|
|
783
|
+
if (B = E(l, c))
|
|
784
|
+
return g = N(c, 5, ht(l)), S(l), g;
|
|
781
785
|
if (U = O(l, c))
|
|
782
|
-
return g = N(c, 6,
|
|
783
|
-
if (!x && !
|
|
786
|
+
return g = N(c, 6, cn(l)), S(l), g;
|
|
787
|
+
if (!x && !B && !U)
|
|
784
788
|
return g = N(c, 12, Ze(l)), b(P.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, g.value), S(l), g;
|
|
785
789
|
break;
|
|
786
790
|
}
|
|
787
791
|
}
|
|
788
792
|
return g;
|
|
789
793
|
}
|
|
790
|
-
function
|
|
794
|
+
function be(l, c) {
|
|
791
795
|
const { currentType: g } = c;
|
|
792
796
|
let y = null;
|
|
793
797
|
const x = l.currentChar();
|
|
@@ -814,21 +818,21 @@ function Ls(e, t = {}) {
|
|
|
814
818
|
/* TokenChars.LinkedDelimiter */
|
|
815
819
|
);
|
|
816
820
|
default:
|
|
817
|
-
return X(l) ? (y = N(c, 1,
|
|
821
|
+
return X(l) ? (y = N(c, 1, We(l)), c.braceNest = 0, c.inLinked = !1, y) : v(l, c) || k(l, c) ? (S(l), be(l, c)) : p(l, c) ? (S(l), N(c, 11, vt(l))) : w(l, c) ? (S(l), x === "{" ? Ge(l, c) || y : N(c, 10, Ct(l))) : (g === 7 && b(P.INVALID_LINKED_FORMAT, a(), 0), c.braceNest = 0, c.inLinked = !1, xe(l, c));
|
|
818
822
|
}
|
|
819
823
|
}
|
|
820
|
-
function
|
|
824
|
+
function xe(l, c) {
|
|
821
825
|
let g = {
|
|
822
826
|
type: 13
|
|
823
827
|
/* TokenTypes.EOF */
|
|
824
828
|
};
|
|
825
829
|
if (c.braceNest > 0)
|
|
826
|
-
return
|
|
830
|
+
return Ge(l, c) || A(c);
|
|
827
831
|
if (c.inLinked)
|
|
828
|
-
return
|
|
832
|
+
return be(l, c) || A(c);
|
|
829
833
|
switch (l.currentChar()) {
|
|
830
834
|
case "{":
|
|
831
|
-
return
|
|
835
|
+
return Ge(l, c) || A(c);
|
|
832
836
|
case "}":
|
|
833
837
|
return b(P.UNBALANCED_CLOSING_BRACE, a(), 0), l.next(), N(
|
|
834
838
|
c,
|
|
@@ -837,34 +841,34 @@ function Ls(e, t = {}) {
|
|
|
837
841
|
/* TokenChars.BraceRight */
|
|
838
842
|
);
|
|
839
843
|
case "@":
|
|
840
|
-
return
|
|
844
|
+
return be(l, c) || A(c);
|
|
841
845
|
default: {
|
|
842
846
|
if (X(l))
|
|
843
|
-
return g = N(c, 1,
|
|
847
|
+
return g = N(c, 1, We(l)), c.braceNest = 0, c.inLinked = !1, g;
|
|
844
848
|
if (ae(l))
|
|
845
|
-
return N(c, 0,
|
|
849
|
+
return N(c, 0, Tt(l));
|
|
846
850
|
break;
|
|
847
851
|
}
|
|
848
852
|
}
|
|
849
853
|
return g;
|
|
850
854
|
}
|
|
851
|
-
function
|
|
855
|
+
function At() {
|
|
852
856
|
const { currentType: l, offset: c, startLoc: g, endLoc: y } = u;
|
|
853
857
|
return u.lastType = l, u.lastOffset = c, u.lastStartLoc = g, u.lastEndLoc = y, u.offset = s(), u.startLoc = a(), r.currentChar() === me ? N(
|
|
854
858
|
u,
|
|
855
859
|
13
|
|
856
860
|
/* TokenTypes.EOF */
|
|
857
|
-
) :
|
|
861
|
+
) : xe(r, u);
|
|
858
862
|
}
|
|
859
863
|
return {
|
|
860
|
-
nextToken:
|
|
864
|
+
nextToken: At,
|
|
861
865
|
currentOffset: s,
|
|
862
866
|
currentPosition: a,
|
|
863
|
-
context:
|
|
867
|
+
context: d
|
|
864
868
|
};
|
|
865
869
|
}
|
|
866
|
-
const
|
|
867
|
-
function
|
|
870
|
+
const ks = "parser", Rs = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
|
|
871
|
+
function Ms(e, t, n) {
|
|
868
872
|
switch (e) {
|
|
869
873
|
case "\\\\":
|
|
870
874
|
return "\\";
|
|
@@ -877,44 +881,44 @@ function Cs(e, t, n) {
|
|
|
877
881
|
}
|
|
878
882
|
}
|
|
879
883
|
}
|
|
880
|
-
function
|
|
884
|
+
function Fs(e = {}) {
|
|
881
885
|
const t = e.location !== !1, { onError: n } = e;
|
|
882
|
-
function r(f, m, h,
|
|
886
|
+
function r(f, m, h, E, ...O) {
|
|
883
887
|
const v = f.currentPosition();
|
|
884
|
-
if (v.offset +=
|
|
885
|
-
const p = t ?
|
|
886
|
-
domain:
|
|
888
|
+
if (v.offset += E, v.column += E, n) {
|
|
889
|
+
const p = t ? Rt(h, v) : null, k = Ve(m, p, {
|
|
890
|
+
domain: ks,
|
|
887
891
|
args: O
|
|
888
892
|
});
|
|
889
893
|
n(k);
|
|
890
894
|
}
|
|
891
895
|
}
|
|
892
896
|
function s(f, m, h) {
|
|
893
|
-
const
|
|
894
|
-
return t && (
|
|
897
|
+
const E = { type: f };
|
|
898
|
+
return t && (E.start = m, E.end = m, E.loc = { start: h, end: h }), E;
|
|
895
899
|
}
|
|
896
|
-
function a(f, m, h,
|
|
900
|
+
function a(f, m, h, E) {
|
|
897
901
|
t && (f.end = m, f.loc && (f.loc.end = h));
|
|
898
902
|
}
|
|
899
903
|
function o(f, m) {
|
|
900
|
-
const h = f.context(),
|
|
901
|
-
return
|
|
904
|
+
const h = f.context(), E = s(3, h.offset, h.startLoc);
|
|
905
|
+
return E.value = m, a(E, f.currentOffset(), f.currentPosition()), E;
|
|
902
906
|
}
|
|
903
907
|
function i(f, m) {
|
|
904
|
-
const h = f.context(), { lastOffset:
|
|
908
|
+
const h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(5, E, O);
|
|
905
909
|
return v.index = parseInt(m, 10), f.nextToken(), a(v, f.currentOffset(), f.currentPosition()), v;
|
|
906
910
|
}
|
|
907
911
|
function u(f, m) {
|
|
908
|
-
const h = f.context(), { lastOffset:
|
|
912
|
+
const h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(4, E, O);
|
|
909
913
|
return v.key = m, f.nextToken(), a(v, f.currentOffset(), f.currentPosition()), v;
|
|
910
914
|
}
|
|
911
|
-
function
|
|
912
|
-
const h = f.context(), { lastOffset:
|
|
913
|
-
return v.value = m.replace(
|
|
915
|
+
function d(f, m) {
|
|
916
|
+
const h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(9, E, O);
|
|
917
|
+
return v.value = m.replace(Rs, Ms), f.nextToken(), a(v, f.currentOffset(), f.currentPosition()), v;
|
|
914
918
|
}
|
|
915
919
|
function I(f) {
|
|
916
|
-
const m = f.nextToken(), h = f.context(), { lastOffset:
|
|
917
|
-
return m.type !== 11 ? (r(f, P.UNEXPECTED_EMPTY_LINKED_MODIFIER, h.lastStartLoc, 0), v.value = "", a(v,
|
|
920
|
+
const m = f.nextToken(), h = f.context(), { lastOffset: E, lastStartLoc: O } = h, v = s(8, E, O);
|
|
921
|
+
return m.type !== 11 ? (r(f, P.UNEXPECTED_EMPTY_LINKED_MODIFIER, h.lastStartLoc, 0), v.value = "", a(v, E, O), {
|
|
918
922
|
nextConsumeToken: m,
|
|
919
923
|
node: v
|
|
920
924
|
}) : (m.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ce(m)), v.value = m.value || "", a(v, f.currentOffset(), f.currentPosition()), {
|
|
@@ -922,34 +926,34 @@ function As(e = {}) {
|
|
|
922
926
|
});
|
|
923
927
|
}
|
|
924
928
|
function b(f, m) {
|
|
925
|
-
const h = f.context(),
|
|
926
|
-
return
|
|
929
|
+
const h = f.context(), E = s(7, h.offset, h.startLoc);
|
|
930
|
+
return E.value = m, a(E, f.currentOffset(), f.currentPosition()), E;
|
|
927
931
|
}
|
|
928
932
|
function N(f) {
|
|
929
933
|
const m = f.context(), h = s(6, m.offset, m.startLoc);
|
|
930
|
-
let
|
|
931
|
-
if (
|
|
934
|
+
let E = f.nextToken();
|
|
935
|
+
if (E.type === 8) {
|
|
932
936
|
const O = I(f);
|
|
933
|
-
h.modifier = O.node,
|
|
937
|
+
h.modifier = O.node, E = O.nextConsumeToken || f.nextToken();
|
|
934
938
|
}
|
|
935
|
-
switch (
|
|
939
|
+
switch (E.type !== 9 && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(E)), E = f.nextToken(), E.type === 2 && (E = f.nextToken()), E.type) {
|
|
936
940
|
case 10:
|
|
937
|
-
|
|
941
|
+
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(E)), h.key = b(f, E.value || "");
|
|
938
942
|
break;
|
|
939
943
|
case 4:
|
|
940
|
-
|
|
944
|
+
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(E)), h.key = u(f, E.value || "");
|
|
941
945
|
break;
|
|
942
946
|
case 5:
|
|
943
|
-
|
|
947
|
+
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(E)), h.key = i(f, E.value || "");
|
|
944
948
|
break;
|
|
945
949
|
case 6:
|
|
946
|
-
|
|
950
|
+
E.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(E)), h.key = d(f, E.value || "");
|
|
947
951
|
break;
|
|
948
952
|
default: {
|
|
949
953
|
r(f, P.UNEXPECTED_EMPTY_LINKED_KEY, m.lastStartLoc, 0);
|
|
950
954
|
const O = f.context(), v = s(7, O.offset, O.startLoc);
|
|
951
955
|
return v.value = "", a(v, O.offset, O.startLoc), h.key = v, a(h, O.offset, O.startLoc), {
|
|
952
|
-
nextConsumeToken:
|
|
956
|
+
nextConsumeToken: E,
|
|
953
957
|
node: h
|
|
954
958
|
};
|
|
955
959
|
}
|
|
@@ -959,7 +963,7 @@ function As(e = {}) {
|
|
|
959
963
|
};
|
|
960
964
|
}
|
|
961
965
|
function A(f) {
|
|
962
|
-
const m = f.context(), h = m.currentType === 1 ? f.currentOffset() : m.offset,
|
|
966
|
+
const m = f.context(), h = m.currentType === 1 ? f.currentOffset() : m.offset, E = m.currentType === 1 ? m.endLoc : m.startLoc, O = s(2, h, E);
|
|
963
967
|
O.items = [];
|
|
964
968
|
let v = null;
|
|
965
969
|
do {
|
|
@@ -975,7 +979,7 @@ function As(e = {}) {
|
|
|
975
979
|
w.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(w)), O.items.push(u(f, w.value || ""));
|
|
976
980
|
break;
|
|
977
981
|
case 6:
|
|
978
|
-
w.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(w)), O.items.push(
|
|
982
|
+
w.value == null && r(f, P.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ce(w)), O.items.push(d(f, w.value || ""));
|
|
979
983
|
break;
|
|
980
984
|
case 7: {
|
|
981
985
|
const X = N(f);
|
|
@@ -987,11 +991,11 @@ function As(e = {}) {
|
|
|
987
991
|
const p = m.currentType === 1 ? m.lastOffset : f.currentOffset(), k = m.currentType === 1 ? m.lastEndLoc : f.currentPosition();
|
|
988
992
|
return a(O, p, k), O;
|
|
989
993
|
}
|
|
990
|
-
function D(f, m, h,
|
|
994
|
+
function D(f, m, h, E) {
|
|
991
995
|
const O = f.context();
|
|
992
|
-
let v =
|
|
996
|
+
let v = E.items.length === 0;
|
|
993
997
|
const p = s(1, m, h);
|
|
994
|
-
p.cases = [], p.cases.push(
|
|
998
|
+
p.cases = [], p.cases.push(E);
|
|
995
999
|
do {
|
|
996
1000
|
const k = A(f);
|
|
997
1001
|
v || (v = k.items.length === 0), p.cases.push(k);
|
|
@@ -999,12 +1003,12 @@ function As(e = {}) {
|
|
|
999
1003
|
return v && r(f, P.MUST_HAVE_MESSAGES_IN_PLURAL, h, 0), a(p, f.currentOffset(), f.currentPosition()), p;
|
|
1000
1004
|
}
|
|
1001
1005
|
function C(f) {
|
|
1002
|
-
const m = f.context(), { offset: h, startLoc:
|
|
1003
|
-
return m.currentType === 13 ? O : D(f, h,
|
|
1006
|
+
const m = f.context(), { offset: h, startLoc: E } = m, O = A(f);
|
|
1007
|
+
return m.currentType === 13 ? O : D(f, h, E, O);
|
|
1004
1008
|
}
|
|
1005
1009
|
function S(f) {
|
|
1006
|
-
const m =
|
|
1007
|
-
return t &&
|
|
1010
|
+
const m = Ds(f, J({}, e)), h = m.context(), E = s(0, h.offset, h.startLoc);
|
|
1011
|
+
return t && E.loc && (E.loc.source = f), E.body = C(m), e.onCacheKey && (E.cacheKey = e.onCacheKey(f)), h.currentType !== 13 && r(m, P.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, f[h.offset] || ""), a(E, m.currentOffset(), m.currentPosition()), E;
|
|
1008
1012
|
}
|
|
1009
1013
|
return { parse: S };
|
|
1010
1014
|
}
|
|
@@ -1014,30 +1018,30 @@ function ce(e) {
|
|
|
1014
1018
|
const t = (e.value || "").replace(/\r?\n/gu, "\\n");
|
|
1015
1019
|
return t.length > 10 ? t.slice(0, 9) + "…" : t;
|
|
1016
1020
|
}
|
|
1017
|
-
function
|
|
1021
|
+
function Us(e, t = {}) {
|
|
1018
1022
|
const n = {
|
|
1019
1023
|
ast: e,
|
|
1020
1024
|
helpers: /* @__PURE__ */ new Set()
|
|
1021
1025
|
};
|
|
1022
1026
|
return { context: () => n, helper: (a) => (n.helpers.add(a), a) };
|
|
1023
1027
|
}
|
|
1024
|
-
function
|
|
1028
|
+
function gn(e, t) {
|
|
1025
1029
|
for (let n = 0; n < e.length; n++)
|
|
1026
|
-
|
|
1030
|
+
zt(e[n], t);
|
|
1027
1031
|
}
|
|
1028
|
-
function
|
|
1032
|
+
function zt(e, t) {
|
|
1029
1033
|
switch (e.type) {
|
|
1030
1034
|
case 1:
|
|
1031
|
-
|
|
1035
|
+
gn(e.cases, t), t.helper(
|
|
1032
1036
|
"plural"
|
|
1033
1037
|
/* HelperNameMap.PLURAL */
|
|
1034
1038
|
);
|
|
1035
1039
|
break;
|
|
1036
1040
|
case 2:
|
|
1037
|
-
|
|
1041
|
+
gn(e.items, t);
|
|
1038
1042
|
break;
|
|
1039
1043
|
case 6: {
|
|
1040
|
-
|
|
1044
|
+
zt(e.key, t), t.helper(
|
|
1041
1045
|
"linked"
|
|
1042
1046
|
/* HelperNameMap.LINKED */
|
|
1043
1047
|
), t.helper(
|
|
@@ -1066,20 +1070,20 @@ function Zt(e, t) {
|
|
|
1066
1070
|
break;
|
|
1067
1071
|
}
|
|
1068
1072
|
}
|
|
1069
|
-
function
|
|
1070
|
-
const n =
|
|
1073
|
+
function ws(e, t = {}) {
|
|
1074
|
+
const n = Us(e);
|
|
1071
1075
|
n.helper(
|
|
1072
1076
|
"normalize"
|
|
1073
1077
|
/* HelperNameMap.NORMALIZE */
|
|
1074
|
-
), e.body &&
|
|
1078
|
+
), e.body && zt(e.body, n);
|
|
1075
1079
|
const r = n.context();
|
|
1076
1080
|
e.helpers = Array.from(r.helpers);
|
|
1077
1081
|
}
|
|
1078
|
-
function
|
|
1082
|
+
function Vs(e) {
|
|
1079
1083
|
const t = e.body;
|
|
1080
|
-
return t.type === 2 ?
|
|
1084
|
+
return t.type === 2 ? Nn(t) : t.cases.forEach((n) => Nn(n)), e;
|
|
1081
1085
|
}
|
|
1082
|
-
function
|
|
1086
|
+
function Nn(e) {
|
|
1083
1087
|
if (e.items.length === 1) {
|
|
1084
1088
|
const t = e.items[0];
|
|
1085
1089
|
(t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
|
|
@@ -1092,7 +1096,7 @@ function gn(e) {
|
|
|
1092
1096
|
t.push(r.value);
|
|
1093
1097
|
}
|
|
1094
1098
|
if (t.length === e.items.length) {
|
|
1095
|
-
e.static =
|
|
1099
|
+
e.static = qt(t);
|
|
1096
1100
|
for (let n = 0; n < e.items.length; n++) {
|
|
1097
1101
|
const r = e.items[n];
|
|
1098
1102
|
(r.type === 3 || r.type === 9) && delete r.value;
|
|
@@ -1100,25 +1104,25 @@ function gn(e) {
|
|
|
1100
1104
|
}
|
|
1101
1105
|
}
|
|
1102
1106
|
}
|
|
1103
|
-
const
|
|
1104
|
-
function
|
|
1107
|
+
const $s = "minifier";
|
|
1108
|
+
function Re(e) {
|
|
1105
1109
|
switch (e.t = e.type, e.type) {
|
|
1106
1110
|
case 0: {
|
|
1107
1111
|
const t = e;
|
|
1108
|
-
|
|
1112
|
+
Re(t.body), t.b = t.body, delete t.body;
|
|
1109
1113
|
break;
|
|
1110
1114
|
}
|
|
1111
1115
|
case 1: {
|
|
1112
1116
|
const t = e, n = t.cases;
|
|
1113
1117
|
for (let r = 0; r < n.length; r++)
|
|
1114
|
-
|
|
1118
|
+
Re(n[r]);
|
|
1115
1119
|
t.c = n, delete t.cases;
|
|
1116
1120
|
break;
|
|
1117
1121
|
}
|
|
1118
1122
|
case 2: {
|
|
1119
1123
|
const t = e, n = t.items;
|
|
1120
1124
|
for (let r = 0; r < n.length; r++)
|
|
1121
|
-
|
|
1125
|
+
Re(n[r]);
|
|
1122
1126
|
t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
|
|
1123
1127
|
break;
|
|
1124
1128
|
}
|
|
@@ -1132,7 +1136,7 @@ function Pe(e) {
|
|
|
1132
1136
|
}
|
|
1133
1137
|
case 6: {
|
|
1134
1138
|
const t = e;
|
|
1135
|
-
|
|
1139
|
+
Re(t.key), t.k = t.key, delete t.key, t.modifier && (Re(t.modifier), t.m = t.modifier, delete t.modifier);
|
|
1136
1140
|
break;
|
|
1137
1141
|
}
|
|
1138
1142
|
case 5: {
|
|
@@ -1147,15 +1151,15 @@ function Pe(e) {
|
|
|
1147
1151
|
}
|
|
1148
1152
|
default:
|
|
1149
1153
|
if (process.env.NODE_ENV !== "production")
|
|
1150
|
-
throw
|
|
1151
|
-
domain:
|
|
1154
|
+
throw Ve(P.UNHANDLED_MINIFIER_NODE_TYPE, null, {
|
|
1155
|
+
domain: $s,
|
|
1152
1156
|
args: [e.type]
|
|
1153
1157
|
});
|
|
1154
1158
|
}
|
|
1155
1159
|
delete e.type;
|
|
1156
1160
|
}
|
|
1157
|
-
const
|
|
1158
|
-
function
|
|
1161
|
+
const Ws = "parser";
|
|
1162
|
+
function Gs(e, t) {
|
|
1159
1163
|
const { filename: n, breakLineCode: r, needIndent: s } = t, a = t.location !== !1, o = {
|
|
1160
1164
|
filename: n,
|
|
1161
1165
|
code: "",
|
|
@@ -1172,20 +1176,20 @@ function Rs(e, t) {
|
|
|
1172
1176
|
function u(C, S) {
|
|
1173
1177
|
o.code += C;
|
|
1174
1178
|
}
|
|
1175
|
-
function
|
|
1179
|
+
function d(C, S = !0) {
|
|
1176
1180
|
const f = S ? r : "";
|
|
1177
1181
|
u(s ? f + " ".repeat(C) : f);
|
|
1178
1182
|
}
|
|
1179
1183
|
function I(C = !0) {
|
|
1180
1184
|
const S = ++o.indentLevel;
|
|
1181
|
-
C &&
|
|
1185
|
+
C && d(S);
|
|
1182
1186
|
}
|
|
1183
1187
|
function b(C = !0) {
|
|
1184
1188
|
const S = --o.indentLevel;
|
|
1185
|
-
C &&
|
|
1189
|
+
C && d(S);
|
|
1186
1190
|
}
|
|
1187
1191
|
function N() {
|
|
1188
|
-
|
|
1192
|
+
d(o.indentLevel);
|
|
1189
1193
|
}
|
|
1190
1194
|
return {
|
|
1191
1195
|
context: i,
|
|
@@ -1197,25 +1201,25 @@ function Rs(e, t) {
|
|
|
1197
1201
|
needIndent: () => o.needIndent
|
|
1198
1202
|
};
|
|
1199
1203
|
}
|
|
1200
|
-
function
|
|
1204
|
+
function xs(e, t) {
|
|
1201
1205
|
const { helper: n } = e;
|
|
1202
1206
|
e.push(`${n(
|
|
1203
1207
|
"linked"
|
|
1204
1208
|
/* HelperNameMap.LINKED */
|
|
1205
|
-
)}(`),
|
|
1209
|
+
)}(`), Ue(e, t.key), t.modifier ? (e.push(", "), Ue(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
|
|
1206
1210
|
}
|
|
1207
|
-
function
|
|
1211
|
+
function Hs(e, t) {
|
|
1208
1212
|
const { helper: n, needIndent: r } = e;
|
|
1209
1213
|
e.push(`${n(
|
|
1210
1214
|
"normalize"
|
|
1211
1215
|
/* HelperNameMap.NORMALIZE */
|
|
1212
1216
|
)}([`), e.indent(r());
|
|
1213
1217
|
const s = t.items.length;
|
|
1214
|
-
for (let a = 0; a < s && (
|
|
1218
|
+
for (let a = 0; a < s && (Ue(e, t.items[a]), a !== s - 1); a++)
|
|
1215
1219
|
e.push(", ");
|
|
1216
1220
|
e.deindent(r()), e.push("])");
|
|
1217
1221
|
}
|
|
1218
|
-
function
|
|
1222
|
+
function Ys(e, t) {
|
|
1219
1223
|
const { helper: n, needIndent: r } = e;
|
|
1220
1224
|
if (t.cases.length > 1) {
|
|
1221
1225
|
e.push(`${n(
|
|
@@ -1223,28 +1227,28 @@ function Us(e, t) {
|
|
|
1223
1227
|
/* HelperNameMap.PLURAL */
|
|
1224
1228
|
)}([`), e.indent(r());
|
|
1225
1229
|
const s = t.cases.length;
|
|
1226
|
-
for (let a = 0; a < s && (
|
|
1230
|
+
for (let a = 0; a < s && (Ue(e, t.cases[a]), a !== s - 1); a++)
|
|
1227
1231
|
e.push(", ");
|
|
1228
1232
|
e.deindent(r()), e.push("])");
|
|
1229
1233
|
}
|
|
1230
1234
|
}
|
|
1231
|
-
function
|
|
1232
|
-
t.body ?
|
|
1235
|
+
function Bs(e, t) {
|
|
1236
|
+
t.body ? Ue(e, t.body) : e.push("null");
|
|
1233
1237
|
}
|
|
1234
|
-
function
|
|
1238
|
+
function Ue(e, t) {
|
|
1235
1239
|
const { helper: n } = e;
|
|
1236
1240
|
switch (t.type) {
|
|
1237
1241
|
case 0:
|
|
1238
|
-
|
|
1242
|
+
Bs(e, t);
|
|
1239
1243
|
break;
|
|
1240
1244
|
case 1:
|
|
1241
|
-
|
|
1245
|
+
Ys(e, t);
|
|
1242
1246
|
break;
|
|
1243
1247
|
case 2:
|
|
1244
|
-
|
|
1248
|
+
Hs(e, t);
|
|
1245
1249
|
break;
|
|
1246
1250
|
case 6:
|
|
1247
|
-
|
|
1251
|
+
xs(e, t);
|
|
1248
1252
|
break;
|
|
1249
1253
|
case 8:
|
|
1250
1254
|
e.push(JSON.stringify(t.value), t);
|
|
@@ -1278,82 +1282,82 @@ function Re(e, t) {
|
|
|
1278
1282
|
break;
|
|
1279
1283
|
default:
|
|
1280
1284
|
if (process.env.NODE_ENV !== "production")
|
|
1281
|
-
throw
|
|
1282
|
-
domain:
|
|
1285
|
+
throw Ve(P.UNHANDLED_CODEGEN_NODE_TYPE, null, {
|
|
1286
|
+
domain: Ws,
|
|
1283
1287
|
args: [t.type]
|
|
1284
1288
|
});
|
|
1285
1289
|
}
|
|
1286
1290
|
}
|
|
1287
|
-
const
|
|
1291
|
+
const Ks = (e, t = {}) => {
|
|
1288
1292
|
const n = L(t.mode) ? t.mode : "normal", r = L(t.filename) ? t.filename : "message.intl";
|
|
1289
1293
|
t.sourceMap;
|
|
1290
1294
|
const s = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
|
|
1291
|
-
`, a = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], i =
|
|
1295
|
+
`, a = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], i = Gs(e, {
|
|
1292
1296
|
filename: r,
|
|
1293
1297
|
breakLineCode: s,
|
|
1294
1298
|
needIndent: a
|
|
1295
1299
|
});
|
|
1296
|
-
i.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), i.indent(a), o.length > 0 && (i.push(`const { ${
|
|
1297
|
-
const { code: u, map:
|
|
1300
|
+
i.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), i.indent(a), o.length > 0 && (i.push(`const { ${qt(o.map((I) => `${I}: _${I}`), ", ")} } = ctx`), i.newline()), i.push("return "), Ue(i, e), i.deindent(a), i.push("}"), delete e.helpers;
|
|
1301
|
+
const { code: u, map: d } = i.context();
|
|
1298
1302
|
return {
|
|
1299
1303
|
ast: e,
|
|
1300
1304
|
code: u,
|
|
1301
|
-
map:
|
|
1305
|
+
map: d ? d.toJSON() : void 0
|
|
1302
1306
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1303
1307
|
};
|
|
1304
1308
|
};
|
|
1305
|
-
function
|
|
1306
|
-
const n = J({}, t), r = !!n.jit, s = !!n.minify, a = n.optimize == null ? !0 : n.optimize, i =
|
|
1307
|
-
return r ? (a &&
|
|
1309
|
+
function js(e, t = {}) {
|
|
1310
|
+
const n = J({}, t), r = !!n.jit, s = !!n.minify, a = n.optimize == null ? !0 : n.optimize, i = Fs(n).parse(e);
|
|
1311
|
+
return r ? (a && Vs(i), s && Re(i), { ast: i, code: "" }) : (ws(i, n), Ks(i, n));
|
|
1308
1312
|
}
|
|
1309
|
-
function
|
|
1310
|
-
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (
|
|
1313
|
+
function Xs() {
|
|
1314
|
+
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Oe().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Oe().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
|
|
1311
1315
|
}
|
|
1312
1316
|
function se(e) {
|
|
1313
|
-
return M(e) &&
|
|
1317
|
+
return M(e) && en(e) === 0 && (oe(e, "b") || oe(e, "body"));
|
|
1314
1318
|
}
|
|
1315
|
-
const
|
|
1316
|
-
function
|
|
1317
|
-
return
|
|
1319
|
+
const er = ["b", "body"];
|
|
1320
|
+
function Js(e) {
|
|
1321
|
+
return Ne(e, er);
|
|
1318
1322
|
}
|
|
1319
|
-
const
|
|
1320
|
-
function
|
|
1321
|
-
return
|
|
1323
|
+
const tr = ["c", "cases"];
|
|
1324
|
+
function Qs(e) {
|
|
1325
|
+
return Ne(e, tr, []);
|
|
1322
1326
|
}
|
|
1323
|
-
const
|
|
1324
|
-
function
|
|
1325
|
-
return
|
|
1327
|
+
const nr = ["s", "static"];
|
|
1328
|
+
function qs(e) {
|
|
1329
|
+
return Ne(e, nr);
|
|
1326
1330
|
}
|
|
1327
|
-
const
|
|
1328
|
-
function
|
|
1329
|
-
return
|
|
1331
|
+
const rr = ["i", "items"];
|
|
1332
|
+
function Zs(e) {
|
|
1333
|
+
return Ne(e, rr, []);
|
|
1330
1334
|
}
|
|
1331
|
-
const
|
|
1332
|
-
function
|
|
1333
|
-
return
|
|
1335
|
+
const sr = ["t", "type"];
|
|
1336
|
+
function en(e) {
|
|
1337
|
+
return Ne(e, sr);
|
|
1334
1338
|
}
|
|
1335
|
-
const
|
|
1339
|
+
const ar = ["v", "value"];
|
|
1336
1340
|
function tt(e, t) {
|
|
1337
|
-
const n =
|
|
1341
|
+
const n = Ne(e, ar);
|
|
1338
1342
|
if (n != null)
|
|
1339
1343
|
return n;
|
|
1340
|
-
throw
|
|
1344
|
+
throw Be(t);
|
|
1341
1345
|
}
|
|
1342
|
-
const
|
|
1343
|
-
function
|
|
1344
|
-
return
|
|
1346
|
+
const or = ["m", "modifier"];
|
|
1347
|
+
function zs(e) {
|
|
1348
|
+
return Ne(e, or);
|
|
1345
1349
|
}
|
|
1346
|
-
const
|
|
1347
|
-
function
|
|
1348
|
-
const t =
|
|
1350
|
+
const lr = ["k", "key"];
|
|
1351
|
+
function ea(e) {
|
|
1352
|
+
const t = Ne(e, lr);
|
|
1349
1353
|
if (t)
|
|
1350
1354
|
return t;
|
|
1351
|
-
throw
|
|
1355
|
+
throw Be(
|
|
1352
1356
|
6
|
|
1353
1357
|
/* NodeTypes.Linked */
|
|
1354
1358
|
);
|
|
1355
1359
|
}
|
|
1356
|
-
function
|
|
1360
|
+
function Ne(e, t, n) {
|
|
1357
1361
|
for (let r = 0; r < t.length; r++) {
|
|
1358
1362
|
const s = t[r];
|
|
1359
1363
|
if (oe(e, s) && e[s] != null)
|
|
@@ -1361,49 +1365,49 @@ function ge(e, t, n) {
|
|
|
1361
1365
|
}
|
|
1362
1366
|
return n;
|
|
1363
1367
|
}
|
|
1364
|
-
const
|
|
1365
|
-
...Zn,
|
|
1366
|
-
...zn,
|
|
1368
|
+
const ir = [
|
|
1367
1369
|
...er,
|
|
1368
1370
|
...tr,
|
|
1369
|
-
...
|
|
1370
|
-
...sr,
|
|
1371
|
+
...nr,
|
|
1371
1372
|
...rr,
|
|
1372
|
-
...
|
|
1373
|
+
...lr,
|
|
1374
|
+
...or,
|
|
1375
|
+
...ar,
|
|
1376
|
+
...sr
|
|
1373
1377
|
];
|
|
1374
|
-
function
|
|
1378
|
+
function Be(e) {
|
|
1375
1379
|
return new Error(`unhandled node type: ${e}`);
|
|
1376
1380
|
}
|
|
1377
|
-
function
|
|
1378
|
-
return (n) =>
|
|
1381
|
+
function yt(e) {
|
|
1382
|
+
return (n) => ta(n, e);
|
|
1379
1383
|
}
|
|
1380
|
-
function
|
|
1381
|
-
const n =
|
|
1384
|
+
function ta(e, t) {
|
|
1385
|
+
const n = Js(t);
|
|
1382
1386
|
if (n == null)
|
|
1383
|
-
throw
|
|
1387
|
+
throw Be(
|
|
1384
1388
|
0
|
|
1385
1389
|
/* NodeTypes.Resource */
|
|
1386
1390
|
);
|
|
1387
|
-
if (
|
|
1388
|
-
const a =
|
|
1391
|
+
if (en(n) === 1) {
|
|
1392
|
+
const a = Qs(n);
|
|
1389
1393
|
return e.plural(a.reduce((o, i) => [
|
|
1390
1394
|
...o,
|
|
1391
|
-
|
|
1395
|
+
Tn(e, i)
|
|
1392
1396
|
], []));
|
|
1393
1397
|
} else
|
|
1394
|
-
return
|
|
1398
|
+
return Tn(e, n);
|
|
1395
1399
|
}
|
|
1396
|
-
function
|
|
1397
|
-
const n =
|
|
1400
|
+
function Tn(e, t) {
|
|
1401
|
+
const n = qs(t);
|
|
1398
1402
|
if (n != null)
|
|
1399
1403
|
return e.type === "text" ? n : e.normalize([n]);
|
|
1400
1404
|
{
|
|
1401
|
-
const r =
|
|
1405
|
+
const r = Zs(t).reduce((s, a) => [...s, Mt(e, a)], []);
|
|
1402
1406
|
return e.normalize(r);
|
|
1403
1407
|
}
|
|
1404
1408
|
}
|
|
1405
|
-
function
|
|
1406
|
-
const n =
|
|
1409
|
+
function Mt(e, t) {
|
|
1410
|
+
const n = en(t);
|
|
1407
1411
|
switch (n) {
|
|
1408
1412
|
case 3:
|
|
1409
1413
|
return tt(t, n);
|
|
@@ -1415,7 +1419,7 @@ function Rt(e, t) {
|
|
|
1415
1419
|
return e.interpolate(e.named(r.k));
|
|
1416
1420
|
if (oe(r, "key") && r.key)
|
|
1417
1421
|
return e.interpolate(e.named(r.key));
|
|
1418
|
-
throw
|
|
1422
|
+
throw Be(n);
|
|
1419
1423
|
}
|
|
1420
1424
|
case 5: {
|
|
1421
1425
|
const r = t;
|
|
@@ -1423,11 +1427,11 @@ function Rt(e, t) {
|
|
|
1423
1427
|
return e.interpolate(e.list(r.i));
|
|
1424
1428
|
if (oe(r, "index") && j(r.index))
|
|
1425
1429
|
return e.interpolate(e.list(r.index));
|
|
1426
|
-
throw
|
|
1430
|
+
throw Be(n);
|
|
1427
1431
|
}
|
|
1428
1432
|
case 6: {
|
|
1429
|
-
const r = t, s =
|
|
1430
|
-
return e.linked(
|
|
1433
|
+
const r = t, s = zs(r), a = ea(r);
|
|
1434
|
+
return e.linked(Mt(e, a), s ? Mt(e, s) : void 0, e.type);
|
|
1431
1435
|
}
|
|
1432
1436
|
case 7:
|
|
1433
1437
|
return tt(t, n);
|
|
@@ -1437,32 +1441,32 @@ function Rt(e, t) {
|
|
|
1437
1441
|
throw new Error(`unhandled node on format message part: ${n}`);
|
|
1438
1442
|
}
|
|
1439
1443
|
}
|
|
1440
|
-
const
|
|
1441
|
-
function
|
|
1442
|
-
t &&
|
|
1444
|
+
const na = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
|
|
1445
|
+
function ra(e, t) {
|
|
1446
|
+
t && Os(e) && ue(ct(na, { source: e }));
|
|
1443
1447
|
}
|
|
1444
|
-
const
|
|
1448
|
+
const sa = (e) => e;
|
|
1445
1449
|
let nt = $();
|
|
1446
|
-
function
|
|
1450
|
+
function aa(e, t = {}) {
|
|
1447
1451
|
let n = !1;
|
|
1448
|
-
const r = t.onError ||
|
|
1452
|
+
const r = t.onError || Is;
|
|
1449
1453
|
return t.onError = (s) => {
|
|
1450
1454
|
n = !0, r(s);
|
|
1451
|
-
}, {
|
|
1455
|
+
}, { ...js(e, t), detectError: n };
|
|
1452
1456
|
}
|
|
1453
1457
|
// @__NO_SIDE_EFFECTS__
|
|
1454
|
-
function
|
|
1458
|
+
function oa(e, t) {
|
|
1455
1459
|
if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && L(e)) {
|
|
1456
1460
|
const n = F(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
|
|
1457
|
-
process.env.NODE_ENV !== "production" &&
|
|
1458
|
-
const s = (t.onCacheKey ||
|
|
1461
|
+
process.env.NODE_ENV !== "production" && ra(e, n);
|
|
1462
|
+
const s = (t.onCacheKey || sa)(e), a = nt[s];
|
|
1459
1463
|
if (a)
|
|
1460
1464
|
return a;
|
|
1461
|
-
const { ast: o, detectError: i } =
|
|
1465
|
+
const { ast: o, detectError: i } = aa(e, {
|
|
1462
1466
|
...t,
|
|
1463
1467
|
location: process.env.NODE_ENV !== "production",
|
|
1464
1468
|
jit: !0
|
|
1465
|
-
}), u =
|
|
1469
|
+
}), u = yt(o);
|
|
1466
1470
|
return i ? u : nt[s] = u;
|
|
1467
1471
|
} else {
|
|
1468
1472
|
if (process.env.NODE_ENV !== "production" && !se(e))
|
|
@@ -1470,29 +1474,29 @@ function Zs(e, t) {
|
|
|
1470
1474
|
const n = e.cacheKey;
|
|
1471
1475
|
if (n) {
|
|
1472
1476
|
const r = nt[n];
|
|
1473
|
-
return r || (nt[n] =
|
|
1477
|
+
return r || (nt[n] = yt(e));
|
|
1474
1478
|
} else
|
|
1475
|
-
return
|
|
1479
|
+
return yt(e);
|
|
1476
1480
|
}
|
|
1477
1481
|
}
|
|
1478
|
-
let
|
|
1479
|
-
function
|
|
1480
|
-
|
|
1482
|
+
let Ke = null;
|
|
1483
|
+
function la(e) {
|
|
1484
|
+
Ke = e;
|
|
1481
1485
|
}
|
|
1482
|
-
function
|
|
1483
|
-
|
|
1486
|
+
function ia(e, t, n) {
|
|
1487
|
+
Ke && Ke.emit("i18n:init", {
|
|
1484
1488
|
timestamp: Date.now(),
|
|
1485
1489
|
i18n: e,
|
|
1486
1490
|
version: t,
|
|
1487
1491
|
meta: n
|
|
1488
1492
|
});
|
|
1489
1493
|
}
|
|
1490
|
-
const
|
|
1491
|
-
function
|
|
1492
|
-
return (t) =>
|
|
1494
|
+
const ca = /* @__PURE__ */ ua("function:translate");
|
|
1495
|
+
function ua(e) {
|
|
1496
|
+
return (t) => Ke && Ke.emit(e, t);
|
|
1493
1497
|
}
|
|
1494
1498
|
const q = {
|
|
1495
|
-
INVALID_ARGUMENT:
|
|
1499
|
+
INVALID_ARGUMENT: bs,
|
|
1496
1500
|
// 17
|
|
1497
1501
|
INVALID_DATE_ARGUMENT: 18,
|
|
1498
1502
|
INVALID_ISO_DATE_ARGUMENT: 19,
|
|
@@ -1500,11 +1504,11 @@ const q = {
|
|
|
1500
1504
|
NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
|
|
1501
1505
|
NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
|
|
1502
1506
|
NOT_SUPPORT_LOCALE_TYPE: 23
|
|
1503
|
-
},
|
|
1507
|
+
}, fa = 24;
|
|
1504
1508
|
function de(e) {
|
|
1505
|
-
return
|
|
1509
|
+
return Ve(e, null, process.env.NODE_ENV !== "production" ? { messages: _a } : void 0);
|
|
1506
1510
|
}
|
|
1507
|
-
const
|
|
1511
|
+
const _a = {
|
|
1508
1512
|
[q.INVALID_ARGUMENT]: "Invalid arguments",
|
|
1509
1513
|
[q.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
|
|
1510
1514
|
[q.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
|
|
@@ -1513,33 +1517,33 @@ const sa = {
|
|
|
1513
1517
|
[q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function",
|
|
1514
1518
|
[q.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type"
|
|
1515
1519
|
};
|
|
1516
|
-
function
|
|
1517
|
-
return t.locale != null ?
|
|
1520
|
+
function tn(e, t) {
|
|
1521
|
+
return t.locale != null ? bn(t.locale) : bn(e.locale);
|
|
1518
1522
|
}
|
|
1519
|
-
let
|
|
1520
|
-
function
|
|
1523
|
+
let Pt;
|
|
1524
|
+
function bn(e) {
|
|
1521
1525
|
if (L(e))
|
|
1522
1526
|
return e;
|
|
1523
1527
|
if (W(e)) {
|
|
1524
|
-
if (e.resolvedOnce &&
|
|
1525
|
-
return
|
|
1528
|
+
if (e.resolvedOnce && Pt != null)
|
|
1529
|
+
return Pt;
|
|
1526
1530
|
if (e.constructor.name === "Function") {
|
|
1527
1531
|
const t = e();
|
|
1528
|
-
if (
|
|
1532
|
+
if (ps(t))
|
|
1529
1533
|
throw de(q.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
|
|
1530
|
-
return
|
|
1534
|
+
return Pt = t;
|
|
1531
1535
|
} else
|
|
1532
1536
|
throw de(q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
|
|
1533
1537
|
} else
|
|
1534
1538
|
throw de(q.NOT_SUPPORT_LOCALE_TYPE);
|
|
1535
1539
|
}
|
|
1536
|
-
function
|
|
1540
|
+
function ma(e, t, n) {
|
|
1537
1541
|
return [.../* @__PURE__ */ new Set([
|
|
1538
1542
|
n,
|
|
1539
1543
|
...H(t) ? t : M(t) ? Object.keys(t) : L(t) ? [t] : [n]
|
|
1540
1544
|
])];
|
|
1541
1545
|
}
|
|
1542
|
-
function
|
|
1546
|
+
function cr(e, t, n) {
|
|
1543
1547
|
const r = L(n) ? n : je, s = e;
|
|
1544
1548
|
s.__localeChainCache || (s.__localeChainCache = /* @__PURE__ */ new Map());
|
|
1545
1549
|
let a = s.__localeChainCache.get(r);
|
|
@@ -1547,30 +1551,30 @@ function lr(e, t, n) {
|
|
|
1547
1551
|
a = [];
|
|
1548
1552
|
let o = [n];
|
|
1549
1553
|
for (; H(o); )
|
|
1550
|
-
o =
|
|
1554
|
+
o = hn(a, o, t);
|
|
1551
1555
|
const i = H(t) || !R(t) ? t : t.default ? t.default : null;
|
|
1552
|
-
o = L(i) ? [i] : i, H(o) &&
|
|
1556
|
+
o = L(i) ? [i] : i, H(o) && hn(a, o, !1), s.__localeChainCache.set(r, a);
|
|
1553
1557
|
}
|
|
1554
1558
|
return a;
|
|
1555
1559
|
}
|
|
1556
|
-
function
|
|
1560
|
+
function hn(e, t, n) {
|
|
1557
1561
|
let r = !0;
|
|
1558
1562
|
for (let s = 0; s < t.length && F(r); s++) {
|
|
1559
1563
|
const a = t[s];
|
|
1560
|
-
L(a) && (r =
|
|
1564
|
+
L(a) && (r = da(e, t[s], n));
|
|
1561
1565
|
}
|
|
1562
1566
|
return r;
|
|
1563
1567
|
}
|
|
1564
|
-
function
|
|
1568
|
+
function da(e, t, n) {
|
|
1565
1569
|
let r;
|
|
1566
1570
|
const s = t.split("-");
|
|
1567
1571
|
do {
|
|
1568
1572
|
const a = s.join("-");
|
|
1569
|
-
r =
|
|
1573
|
+
r = Ea(e, a, n), s.splice(-1, 1);
|
|
1570
1574
|
} while (s.length && r === !0);
|
|
1571
1575
|
return r;
|
|
1572
1576
|
}
|
|
1573
|
-
function
|
|
1577
|
+
function Ea(e, t, n) {
|
|
1574
1578
|
let r = !1;
|
|
1575
1579
|
if (!e.includes(t) && (r = !0, t)) {
|
|
1576
1580
|
r = t[t.length - 1] !== "!";
|
|
@@ -1579,8 +1583,8 @@ function la(e, t, n) {
|
|
|
1579
1583
|
}
|
|
1580
1584
|
return r;
|
|
1581
1585
|
}
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1586
|
+
const Te = [];
|
|
1587
|
+
Te[
|
|
1584
1588
|
0
|
|
1585
1589
|
/* States.BEFORE_PATH */
|
|
1586
1590
|
] = {
|
|
@@ -1602,7 +1606,7 @@ Ne[
|
|
|
1602
1606
|
/* States.AFTER_PATH */
|
|
1603
1607
|
]
|
|
1604
1608
|
};
|
|
1605
|
-
|
|
1609
|
+
Te[
|
|
1606
1610
|
1
|
|
1607
1611
|
/* States.IN_PATH */
|
|
1608
1612
|
] = {
|
|
@@ -1623,7 +1627,7 @@ Ne[
|
|
|
1623
1627
|
/* States.AFTER_PATH */
|
|
1624
1628
|
]
|
|
1625
1629
|
};
|
|
1626
|
-
|
|
1630
|
+
Te[
|
|
1627
1631
|
2
|
|
1628
1632
|
/* States.BEFORE_IDENT */
|
|
1629
1633
|
] = {
|
|
@@ -1642,7 +1646,7 @@ Ne[
|
|
|
1642
1646
|
/* Actions.APPEND */
|
|
1643
1647
|
]
|
|
1644
1648
|
};
|
|
1645
|
-
|
|
1649
|
+
Te[
|
|
1646
1650
|
3
|
|
1647
1651
|
/* States.IN_IDENT */
|
|
1648
1652
|
] = {
|
|
@@ -1677,7 +1681,7 @@ Ne[
|
|
|
1677
1681
|
/* Actions.PUSH */
|
|
1678
1682
|
]
|
|
1679
1683
|
};
|
|
1680
|
-
|
|
1684
|
+
Te[
|
|
1681
1685
|
4
|
|
1682
1686
|
/* States.IN_SUB_PATH */
|
|
1683
1687
|
] = {
|
|
@@ -1708,7 +1712,7 @@ Ne[
|
|
|
1708
1712
|
/* Actions.APPEND */
|
|
1709
1713
|
]
|
|
1710
1714
|
};
|
|
1711
|
-
|
|
1715
|
+
Te[
|
|
1712
1716
|
5
|
|
1713
1717
|
/* States.IN_SINGLE_QUOTE */
|
|
1714
1718
|
] = {
|
|
@@ -1724,7 +1728,7 @@ Ne[
|
|
|
1724
1728
|
/* Actions.APPEND */
|
|
1725
1729
|
]
|
|
1726
1730
|
};
|
|
1727
|
-
|
|
1731
|
+
Te[
|
|
1728
1732
|
6
|
|
1729
1733
|
/* States.IN_DOUBLE_QUOTE */
|
|
1730
1734
|
] = {
|
|
@@ -1740,15 +1744,15 @@ Ne[
|
|
|
1740
1744
|
/* Actions.APPEND */
|
|
1741
1745
|
]
|
|
1742
1746
|
};
|
|
1743
|
-
const
|
|
1744
|
-
function
|
|
1745
|
-
return
|
|
1747
|
+
const pa = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
|
|
1748
|
+
function ga(e) {
|
|
1749
|
+
return pa.test(e);
|
|
1746
1750
|
}
|
|
1747
|
-
function
|
|
1751
|
+
function Na(e) {
|
|
1748
1752
|
const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
|
|
1749
1753
|
return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
|
|
1750
1754
|
}
|
|
1751
|
-
function
|
|
1755
|
+
function Ta(e) {
|
|
1752
1756
|
if (e == null)
|
|
1753
1757
|
return "o";
|
|
1754
1758
|
switch (e.charCodeAt(0)) {
|
|
@@ -1785,13 +1789,13 @@ function fa(e) {
|
|
|
1785
1789
|
}
|
|
1786
1790
|
return "i";
|
|
1787
1791
|
}
|
|
1788
|
-
function
|
|
1792
|
+
function ba(e) {
|
|
1789
1793
|
const t = e.trim();
|
|
1790
|
-
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 :
|
|
1794
|
+
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : ga(t) ? Na(t) : "*" + t;
|
|
1791
1795
|
}
|
|
1792
|
-
function
|
|
1796
|
+
function ha(e) {
|
|
1793
1797
|
const t = [];
|
|
1794
|
-
let n = -1, r = 0, s = 0, a, o, i, u,
|
|
1798
|
+
let n = -1, r = 0, s = 0, a, o, i, u, d, I, b;
|
|
1795
1799
|
const N = [];
|
|
1796
1800
|
N[
|
|
1797
1801
|
0
|
|
@@ -1821,7 +1825,7 @@ function ma(e) {
|
|
|
1821
1825
|
/* Actions.APPEND */
|
|
1822
1826
|
]();
|
|
1823
1827
|
else {
|
|
1824
|
-
if (s = 0, o === void 0 || (o =
|
|
1828
|
+
if (s = 0, o === void 0 || (o = ba(o), o === !1))
|
|
1825
1829
|
return !1;
|
|
1826
1830
|
N[
|
|
1827
1831
|
1
|
|
@@ -1839,27 +1843,27 @@ function ma(e) {
|
|
|
1839
1843
|
}
|
|
1840
1844
|
for (; r !== null; )
|
|
1841
1845
|
if (n++, a = e[n], !(a === "\\" && A())) {
|
|
1842
|
-
if (u =
|
|
1846
|
+
if (u = Ta(a), b = Te[r], d = b[u] || b.l || 8, d === 8 || (r = d[0], d[1] !== void 0 && (I = N[d[1]], I && (i = a, I() === !1))))
|
|
1843
1847
|
return;
|
|
1844
1848
|
if (r === 7)
|
|
1845
1849
|
return t;
|
|
1846
1850
|
}
|
|
1847
1851
|
}
|
|
1848
|
-
const
|
|
1849
|
-
function
|
|
1852
|
+
const In = /* @__PURE__ */ new Map();
|
|
1853
|
+
function Ia(e, t) {
|
|
1850
1854
|
return M(e) ? e[t] : null;
|
|
1851
1855
|
}
|
|
1852
|
-
function
|
|
1856
|
+
function La(e, t) {
|
|
1853
1857
|
if (!M(e))
|
|
1854
1858
|
return null;
|
|
1855
|
-
let n =
|
|
1856
|
-
if (n || (n =
|
|
1859
|
+
let n = In.get(t);
|
|
1860
|
+
if (n || (n = ha(t), n && In.set(t, n)), !n)
|
|
1857
1861
|
return null;
|
|
1858
1862
|
const r = n.length;
|
|
1859
1863
|
let s = e, a = 0;
|
|
1860
1864
|
for (; a < r; ) {
|
|
1861
1865
|
const o = n[a];
|
|
1862
|
-
if (
|
|
1866
|
+
if (ir.includes(o) && se(s))
|
|
1863
1867
|
return null;
|
|
1864
1868
|
const i = s[o];
|
|
1865
1869
|
if (i === void 0 || W(s))
|
|
@@ -1876,7 +1880,7 @@ const Z = {
|
|
|
1876
1880
|
CANNOT_FORMAT_DATE: 5,
|
|
1877
1881
|
FALLBACK_TO_DATE_FORMAT: 6,
|
|
1878
1882
|
EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7
|
|
1879
|
-
},
|
|
1883
|
+
}, Oa = 8, va = {
|
|
1880
1884
|
[Z.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
|
|
1881
1885
|
[Z.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
|
|
1882
1886
|
[Z.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
|
|
@@ -1885,50 +1889,50 @@ const Z = {
|
|
|
1885
1889
|
[Z.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
|
|
1886
1890
|
[Z.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."
|
|
1887
1891
|
};
|
|
1888
|
-
function
|
|
1889
|
-
return
|
|
1892
|
+
function Se(e, ...t) {
|
|
1893
|
+
return ct(va[e], ...t);
|
|
1890
1894
|
}
|
|
1891
|
-
const
|
|
1892
|
-
function
|
|
1895
|
+
const Ca = "11.2.8", ft = -1, je = "en-US", st = "", Ln = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
|
|
1896
|
+
function Aa() {
|
|
1893
1897
|
return {
|
|
1894
1898
|
upper: (e, t) => t === "text" && L(e) ? e.toUpperCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
|
|
1895
1899
|
lower: (e, t) => t === "text" && L(e) ? e.toLowerCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
|
|
1896
|
-
capitalize: (e, t) => t === "text" && L(e) ?
|
|
1900
|
+
capitalize: (e, t) => t === "text" && L(e) ? Ln(e) : t === "vnode" && M(e) && "__v_isVNode" in e ? Ln(e.children) : e
|
|
1897
1901
|
};
|
|
1898
1902
|
}
|
|
1899
|
-
let ir;
|
|
1900
|
-
function ba(e) {
|
|
1901
|
-
ir = e;
|
|
1902
|
-
}
|
|
1903
|
-
let cr;
|
|
1904
|
-
function ha(e) {
|
|
1905
|
-
cr = e;
|
|
1906
|
-
}
|
|
1907
1903
|
let ur;
|
|
1908
|
-
function
|
|
1904
|
+
function Sa(e) {
|
|
1909
1905
|
ur = e;
|
|
1910
1906
|
}
|
|
1911
|
-
let fr
|
|
1912
|
-
|
|
1907
|
+
let fr;
|
|
1908
|
+
function ya(e) {
|
|
1913
1909
|
fr = e;
|
|
1914
|
-
}
|
|
1915
|
-
let _r
|
|
1916
|
-
|
|
1910
|
+
}
|
|
1911
|
+
let _r;
|
|
1912
|
+
function Pa(e) {
|
|
1917
1913
|
_r = e;
|
|
1918
|
-
}
|
|
1919
|
-
let
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1914
|
+
}
|
|
1915
|
+
let mr = null;
|
|
1916
|
+
const Da = /* @__NO_SIDE_EFFECTS__ */ (e) => {
|
|
1917
|
+
mr = e;
|
|
1918
|
+
}, ka = /* @__NO_SIDE_EFFECTS__ */ () => mr;
|
|
1919
|
+
let dr = null;
|
|
1920
|
+
const On = (e) => {
|
|
1921
|
+
dr = e;
|
|
1922
|
+
}, Ra = () => dr;
|
|
1923
|
+
let vn = 0;
|
|
1924
|
+
function Ma(e = {}) {
|
|
1925
|
+
const t = W(e.onWarn) ? e.onWarn : ue, n = L(e.version) ? e.version : Ca, r = L(e.locale) || W(e.locale) ? e.locale : je, s = W(r) ? je : r, a = H(e.fallbackLocale) || R(e.fallbackLocale) || L(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : s, o = R(e.messages) ? e.messages : Dt(s), i = R(e.datetimeFormats) ? e.datetimeFormats : Dt(s), u = R(e.numberFormats) ? e.numberFormats : Dt(s), d = J($(), e.modifiers, Aa()), I = e.pluralRules || $(), b = W(e.missing) ? e.missing : null, N = F(e.missingWarn) || Fe(e.missingWarn) ? e.missingWarn : !0, A = F(e.fallbackWarn) || Fe(e.fallbackWarn) ? e.fallbackWarn : !0, D = !!e.fallbackFormat, C = !!e.unresolving, S = W(e.postTranslation) ? e.postTranslation : null, f = R(e.processor) ? e.processor : null, m = F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, h = !!e.escapeParameter, E = W(e.messageCompiler) ? e.messageCompiler : ur;
|
|
1926
|
+
process.env.NODE_ENV !== "production" && W(e.messageCompiler) && Jt(Se(Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
|
|
1927
|
+
const O = W(e.messageResolver) ? e.messageResolver : fr || Ia, v = W(e.localeFallbacker) ? e.localeFallbacker : _r || ma, p = M(e.fallbackContext) ? e.fallbackContext : void 0, k = e, w = M(k.__datetimeFormatters) ? k.__datetimeFormatters : /* @__PURE__ */ new Map(), X = M(k.__numberFormatters) ? k.__numberFormatters : /* @__PURE__ */ new Map(), ae = M(k.__meta) ? k.__meta : {};
|
|
1928
|
+
vn++;
|
|
1925
1929
|
const Y = {
|
|
1926
1930
|
version: n,
|
|
1927
|
-
cid:
|
|
1931
|
+
cid: vn,
|
|
1928
1932
|
locale: r,
|
|
1929
1933
|
fallbackLocale: a,
|
|
1930
1934
|
messages: o,
|
|
1931
|
-
modifiers:
|
|
1935
|
+
modifiers: d,
|
|
1932
1936
|
pluralRules: I,
|
|
1933
1937
|
missing: b,
|
|
1934
1938
|
missingWarn: N,
|
|
@@ -1939,23 +1943,23 @@ function Ca(e = {}) {
|
|
|
1939
1943
|
processor: f,
|
|
1940
1944
|
warnHtmlMessage: m,
|
|
1941
1945
|
escapeParameter: h,
|
|
1942
|
-
messageCompiler:
|
|
1946
|
+
messageCompiler: E,
|
|
1943
1947
|
messageResolver: O,
|
|
1944
1948
|
localeFallbacker: v,
|
|
1945
1949
|
fallbackContext: p,
|
|
1946
1950
|
onWarn: t,
|
|
1947
1951
|
__meta: ae
|
|
1948
1952
|
};
|
|
1949
|
-
return Y.datetimeFormats = i, Y.numberFormats = u, Y.__datetimeFormatters = w, Y.__numberFormatters = X, process.env.NODE_ENV !== "production" && (Y.__v_emitter = k.__v_emitter != null ? k.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) &&
|
|
1953
|
+
return Y.datetimeFormats = i, Y.numberFormats = u, Y.__datetimeFormatters = w, Y.__numberFormatters = X, process.env.NODE_ENV !== "production" && (Y.__v_emitter = k.__v_emitter != null ? k.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && ia(Y, n, ae), Y;
|
|
1950
1954
|
}
|
|
1951
|
-
const
|
|
1952
|
-
function
|
|
1955
|
+
const Dt = (e) => ({ [e]: $() });
|
|
1956
|
+
function _t(e, t) {
|
|
1953
1957
|
return e instanceof RegExp ? e.test(t) : e;
|
|
1954
1958
|
}
|
|
1955
|
-
function
|
|
1959
|
+
function Er(e, t) {
|
|
1956
1960
|
return e instanceof RegExp ? e.test(t) : e;
|
|
1957
1961
|
}
|
|
1958
|
-
function
|
|
1962
|
+
function nn(e, t, n, r, s) {
|
|
1959
1963
|
const { missing: a, onWarn: o } = e;
|
|
1960
1964
|
if (process.env.NODE_ENV !== "production") {
|
|
1961
1965
|
const i = e.__v_emitter;
|
|
@@ -1970,44 +1974,44 @@ function tn(e, t, n, r, s) {
|
|
|
1970
1974
|
const i = a(e, n, t, s);
|
|
1971
1975
|
return L(i) ? i : t;
|
|
1972
1976
|
} else
|
|
1973
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1977
|
+
return process.env.NODE_ENV !== "production" && Er(r, t) && o(Se(Z.NOT_FOUND_KEY, { key: t, locale: n })), t;
|
|
1974
1978
|
}
|
|
1975
|
-
function
|
|
1979
|
+
function Ye(e, t, n) {
|
|
1976
1980
|
const r = e;
|
|
1977
1981
|
r.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
|
|
1978
1982
|
}
|
|
1979
|
-
function
|
|
1983
|
+
function pr(e, t) {
|
|
1980
1984
|
return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
|
|
1981
1985
|
}
|
|
1982
|
-
function
|
|
1986
|
+
function Fa(e, t) {
|
|
1983
1987
|
const n = t.indexOf(e);
|
|
1984
1988
|
if (n === -1)
|
|
1985
1989
|
return !1;
|
|
1986
1990
|
for (let r = n + 1; r < t.length; r++)
|
|
1987
|
-
if (
|
|
1991
|
+
if (pr(e, t[r]))
|
|
1988
1992
|
return !0;
|
|
1989
1993
|
return !1;
|
|
1990
1994
|
}
|
|
1991
|
-
const
|
|
1992
|
-
dateTimeFormat:
|
|
1993
|
-
numberFormat:
|
|
1995
|
+
const Cn = typeof Intl < "u", gr = {
|
|
1996
|
+
dateTimeFormat: Cn && typeof Intl.DateTimeFormat < "u",
|
|
1997
|
+
numberFormat: Cn && typeof Intl.NumberFormat < "u"
|
|
1994
1998
|
};
|
|
1995
|
-
function
|
|
1999
|
+
function An(e, ...t) {
|
|
1996
2000
|
const { datetimeFormats: n, unresolving: r, fallbackLocale: s, onWarn: a, localeFallbacker: o } = e, { __datetimeFormatters: i } = e;
|
|
1997
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
1998
|
-
return a(
|
|
1999
|
-
const [u,
|
|
2001
|
+
if (process.env.NODE_ENV !== "production" && !gr.dateTimeFormat)
|
|
2002
|
+
return a(Se(Z.CANNOT_FORMAT_DATE)), st;
|
|
2003
|
+
const [u, d, I, b] = Ft(...t), N = F(I.missingWarn) ? I.missingWarn : e.missingWarn, A = F(I.fallbackWarn) ? I.fallbackWarn : e.fallbackWarn, D = !!I.part, C = tn(e, I), S = o(
|
|
2000
2004
|
e,
|
|
2001
2005
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2002
2006
|
s,
|
|
2003
2007
|
C
|
|
2004
2008
|
);
|
|
2005
2009
|
if (!L(u) || u === "")
|
|
2006
|
-
return new Intl.DateTimeFormat(C, b).format(
|
|
2007
|
-
let f = {}, m, h = null,
|
|
2010
|
+
return new Intl.DateTimeFormat(C, b).format(d);
|
|
2011
|
+
let f = {}, m, h = null, E = C, O = null;
|
|
2008
2012
|
const v = "datetime format";
|
|
2009
2013
|
for (let w = 0; w < S.length; w++) {
|
|
2010
|
-
if (m = O = S[w], process.env.NODE_ENV !== "production" && C !== m &&
|
|
2014
|
+
if (m = O = S[w], process.env.NODE_ENV !== "production" && C !== m && _t(A, u) && a(Se(Z.FALLBACK_TO_DATE_FORMAT, {
|
|
2011
2015
|
key: u,
|
|
2012
2016
|
target: m
|
|
2013
2017
|
})), process.env.NODE_ENV !== "production" && C !== m) {
|
|
@@ -2015,23 +2019,23 @@ function Cn(e, ...t) {
|
|
|
2015
2019
|
X && X.emit("fallback", {
|
|
2016
2020
|
type: v,
|
|
2017
2021
|
key: u,
|
|
2018
|
-
from:
|
|
2022
|
+
from: E,
|
|
2019
2023
|
to: O,
|
|
2020
2024
|
groupId: `${v}:${u}`
|
|
2021
2025
|
});
|
|
2022
2026
|
}
|
|
2023
2027
|
if (f = n[m] || {}, h = f[u], R(h))
|
|
2024
2028
|
break;
|
|
2025
|
-
|
|
2029
|
+
nn(e, u, m, N, v), E = O;
|
|
2026
2030
|
}
|
|
2027
2031
|
if (!R(h) || !L(m))
|
|
2028
|
-
return r ?
|
|
2032
|
+
return r ? ft : u;
|
|
2029
2033
|
let p = `${m}__${u}`;
|
|
2030
|
-
|
|
2034
|
+
ut(b) || (p = `${p}__${JSON.stringify(b)}`);
|
|
2031
2035
|
let k = i.get(p);
|
|
2032
|
-
return k || (k = new Intl.DateTimeFormat(m, J({}, h, b)), i.set(p, k)), D ? k.formatToParts(
|
|
2036
|
+
return k || (k = new Intl.DateTimeFormat(m, J({}, h, b)), i.set(p, k)), D ? k.formatToParts(d) : k.format(d);
|
|
2033
2037
|
}
|
|
2034
|
-
const
|
|
2038
|
+
const Nr = [
|
|
2035
2039
|
"localeMatcher",
|
|
2036
2040
|
"weekday",
|
|
2037
2041
|
"era",
|
|
@@ -2053,21 +2057,21 @@ const pr = [
|
|
|
2053
2057
|
"hourCycle",
|
|
2054
2058
|
"fractionalSecondDigits"
|
|
2055
2059
|
];
|
|
2056
|
-
function
|
|
2060
|
+
function Ft(...e) {
|
|
2057
2061
|
const [t, n, r, s] = e, a = $();
|
|
2058
2062
|
let o = $(), i;
|
|
2059
2063
|
if (L(t)) {
|
|
2060
2064
|
const u = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
|
|
2061
2065
|
if (!u)
|
|
2062
2066
|
throw de(q.INVALID_ISO_DATE_ARGUMENT);
|
|
2063
|
-
const
|
|
2064
|
-
i = new Date(
|
|
2067
|
+
const d = u[3] ? u[3].trim().startsWith("T") ? `${u[1].trim()}${u[3].trim()}` : `${u[1].trim()}T${u[3].trim()}` : u[1].trim();
|
|
2068
|
+
i = new Date(d);
|
|
2065
2069
|
try {
|
|
2066
2070
|
i.toISOString();
|
|
2067
2071
|
} catch {
|
|
2068
2072
|
throw de(q.INVALID_ISO_DATE_ARGUMENT);
|
|
2069
2073
|
}
|
|
2070
|
-
} else if (
|
|
2074
|
+
} else if (_s(t)) {
|
|
2071
2075
|
if (isNaN(t.getTime()))
|
|
2072
2076
|
throw de(q.INVALID_DATE_ARGUMENT);
|
|
2073
2077
|
i = t;
|
|
@@ -2076,32 +2080,32 @@ function Mt(...e) {
|
|
|
2076
2080
|
else
|
|
2077
2081
|
throw de(q.INVALID_ARGUMENT);
|
|
2078
2082
|
return L(n) ? a.key = n : R(n) && Object.keys(n).forEach((u) => {
|
|
2079
|
-
|
|
2083
|
+
Nr.includes(u) ? o[u] = n[u] : a[u] = n[u];
|
|
2080
2084
|
}), L(r) ? a.locale = r : R(r) && (o = r), R(s) && (o = s), [a.key || "", i, a, o];
|
|
2081
2085
|
}
|
|
2082
|
-
function
|
|
2086
|
+
function Sn(e, t, n) {
|
|
2083
2087
|
const r = e;
|
|
2084
2088
|
for (const s in n) {
|
|
2085
2089
|
const a = `${t}__${s}`;
|
|
2086
2090
|
r.__datetimeFormatters.has(a) && r.__datetimeFormatters.delete(a);
|
|
2087
2091
|
}
|
|
2088
2092
|
}
|
|
2089
|
-
function
|
|
2093
|
+
function yn(e, ...t) {
|
|
2090
2094
|
const { numberFormats: n, unresolving: r, fallbackLocale: s, onWarn: a, localeFallbacker: o } = e, { __numberFormatters: i } = e;
|
|
2091
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
2092
|
-
return a(
|
|
2093
|
-
const [u,
|
|
2095
|
+
if (process.env.NODE_ENV !== "production" && !gr.numberFormat)
|
|
2096
|
+
return a(Se(Z.CANNOT_FORMAT_NUMBER)), st;
|
|
2097
|
+
const [u, d, I, b] = Ut(...t), N = F(I.missingWarn) ? I.missingWarn : e.missingWarn, A = F(I.fallbackWarn) ? I.fallbackWarn : e.fallbackWarn, D = !!I.part, C = tn(e, I), S = o(
|
|
2094
2098
|
e,
|
|
2095
2099
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2096
2100
|
s,
|
|
2097
2101
|
C
|
|
2098
2102
|
);
|
|
2099
2103
|
if (!L(u) || u === "")
|
|
2100
|
-
return new Intl.NumberFormat(C, b).format(
|
|
2101
|
-
let f = {}, m, h = null,
|
|
2104
|
+
return new Intl.NumberFormat(C, b).format(d);
|
|
2105
|
+
let f = {}, m, h = null, E = C, O = null;
|
|
2102
2106
|
const v = "number format";
|
|
2103
2107
|
for (let w = 0; w < S.length; w++) {
|
|
2104
|
-
if (m = O = S[w], process.env.NODE_ENV !== "production" && C !== m &&
|
|
2108
|
+
if (m = O = S[w], process.env.NODE_ENV !== "production" && C !== m && _t(A, u) && a(Se(Z.FALLBACK_TO_NUMBER_FORMAT, {
|
|
2105
2109
|
key: u,
|
|
2106
2110
|
target: m
|
|
2107
2111
|
})), process.env.NODE_ENV !== "production" && C !== m) {
|
|
@@ -2109,23 +2113,23 @@ function Sn(e, ...t) {
|
|
|
2109
2113
|
X && X.emit("fallback", {
|
|
2110
2114
|
type: v,
|
|
2111
2115
|
key: u,
|
|
2112
|
-
from:
|
|
2116
|
+
from: E,
|
|
2113
2117
|
to: O,
|
|
2114
2118
|
groupId: `${v}:${u}`
|
|
2115
2119
|
});
|
|
2116
2120
|
}
|
|
2117
2121
|
if (f = n[m] || {}, h = f[u], R(h))
|
|
2118
2122
|
break;
|
|
2119
|
-
|
|
2123
|
+
nn(e, u, m, N, v), E = O;
|
|
2120
2124
|
}
|
|
2121
2125
|
if (!R(h) || !L(m))
|
|
2122
|
-
return r ?
|
|
2126
|
+
return r ? ft : u;
|
|
2123
2127
|
let p = `${m}__${u}`;
|
|
2124
|
-
|
|
2128
|
+
ut(b) || (p = `${p}__${JSON.stringify(b)}`);
|
|
2125
2129
|
let k = i.get(p);
|
|
2126
|
-
return k || (k = new Intl.NumberFormat(m, J({}, h, b)), i.set(p, k)), D ? k.formatToParts(
|
|
2130
|
+
return k || (k = new Intl.NumberFormat(m, J({}, h, b)), i.set(p, k)), D ? k.formatToParts(d) : k.format(d);
|
|
2127
2131
|
}
|
|
2128
|
-
const
|
|
2132
|
+
const Tr = [
|
|
2129
2133
|
"localeMatcher",
|
|
2130
2134
|
"style",
|
|
2131
2135
|
"currency",
|
|
@@ -2147,50 +2151,50 @@ const gr = [
|
|
|
2147
2151
|
"roundingIncrement",
|
|
2148
2152
|
"trailingZeroDisplay"
|
|
2149
2153
|
];
|
|
2150
|
-
function
|
|
2154
|
+
function Ut(...e) {
|
|
2151
2155
|
const [t, n, r, s] = e, a = $();
|
|
2152
2156
|
let o = $();
|
|
2153
2157
|
if (!j(t))
|
|
2154
2158
|
throw de(q.INVALID_ARGUMENT);
|
|
2155
2159
|
const i = t;
|
|
2156
2160
|
return L(n) ? a.key = n : R(n) && Object.keys(n).forEach((u) => {
|
|
2157
|
-
|
|
2161
|
+
Tr.includes(u) ? o[u] = n[u] : a[u] = n[u];
|
|
2158
2162
|
}), L(r) ? a.locale = r : R(r) && (o = r), R(s) && (o = s), [a.key || "", i, a, o];
|
|
2159
2163
|
}
|
|
2160
|
-
function
|
|
2164
|
+
function Pn(e, t, n) {
|
|
2161
2165
|
const r = e;
|
|
2162
2166
|
for (const s in n) {
|
|
2163
2167
|
const a = `${t}__${s}`;
|
|
2164
2168
|
r.__numberFormatters.has(a) && r.__numberFormatters.delete(a);
|
|
2165
2169
|
}
|
|
2166
2170
|
}
|
|
2167
|
-
const
|
|
2168
|
-
function
|
|
2171
|
+
const Ua = (e) => e, wa = (e) => "", Va = "text", $a = (e) => e.length === 0 ? "" : qt(e), Wa = gs;
|
|
2172
|
+
function Dn(e, t) {
|
|
2169
2173
|
return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
|
|
2170
2174
|
}
|
|
2171
|
-
function
|
|
2175
|
+
function Ga(e) {
|
|
2172
2176
|
const t = j(e.pluralIndex) ? e.pluralIndex : -1;
|
|
2173
2177
|
return e.named && (j(e.named.count) || j(e.named.n)) ? j(e.named.count) ? e.named.count : j(e.named.n) ? e.named.n : t : t;
|
|
2174
2178
|
}
|
|
2175
|
-
function
|
|
2179
|
+
function xa(e, t) {
|
|
2176
2180
|
t.count || (t.count = e), t.n || (t.n = e);
|
|
2177
2181
|
}
|
|
2178
|
-
function
|
|
2179
|
-
const t = e.locale, n =
|
|
2180
|
-
j(e.pluralIndex) &&
|
|
2181
|
-
const
|
|
2182
|
+
function Ha(e = {}) {
|
|
2183
|
+
const t = e.locale, n = Ga(e), r = M(e.pluralRules) && L(t) && W(e.pluralRules[t]) ? e.pluralRules[t] : Dn, s = M(e.pluralRules) && L(t) && W(e.pluralRules[t]) ? Dn : void 0, a = (f) => f[r(n, f.length, s)], o = e.list || [], i = (f) => o[f], u = e.named || $();
|
|
2184
|
+
j(e.pluralIndex) && xa(n, u);
|
|
2185
|
+
const d = (f) => u[f];
|
|
2182
2186
|
function I(f, m) {
|
|
2183
2187
|
const h = W(e.messages) ? e.messages(f, !!m) : M(e.messages) ? e.messages[f] : !1;
|
|
2184
|
-
return h || (e.parent ? e.parent.message(f) :
|
|
2188
|
+
return h || (e.parent ? e.parent.message(f) : wa);
|
|
2185
2189
|
}
|
|
2186
|
-
const b = (f) => e.modifiers ? e.modifiers[f] :
|
|
2190
|
+
const b = (f) => e.modifiers ? e.modifiers[f] : Ua, N = R(e.processor) && W(e.processor.normalize) ? e.processor.normalize : $a, A = R(e.processor) && W(e.processor.interpolate) ? e.processor.interpolate : Wa, D = R(e.processor) && L(e.processor.type) ? e.processor.type : Va, S = {
|
|
2187
2191
|
list: i,
|
|
2188
|
-
named:
|
|
2192
|
+
named: d,
|
|
2189
2193
|
plural: a,
|
|
2190
2194
|
linked: (f, ...m) => {
|
|
2191
|
-
const [h,
|
|
2195
|
+
const [h, E] = m;
|
|
2192
2196
|
let O = "text", v = "";
|
|
2193
|
-
m.length === 1 ? M(h) ? (v = h.modifier || v, O = h.type || O) : L(h) && (v = h || v) : m.length === 2 && (L(h) && (v = h || v), L(
|
|
2197
|
+
m.length === 1 ? M(h) ? (v = h.modifier || v, O = h.type || O) : L(h) && (v = h || v) : m.length === 2 && (L(h) && (v = h || v), L(E) && (O = E || O));
|
|
2194
2198
|
const p = I(f, !0)(S), k = (
|
|
2195
2199
|
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
|
2196
2200
|
O === "vnode" && H(p) && v ? p[0] : p
|
|
@@ -2205,50 +2209,50 @@ function Fa(e = {}) {
|
|
|
2205
2209
|
};
|
|
2206
2210
|
return S;
|
|
2207
2211
|
}
|
|
2208
|
-
const
|
|
2209
|
-
function
|
|
2210
|
-
const { fallbackFormat: n, postTranslation: r, unresolving: s, messageCompiler: a, fallbackLocale: o, messages: i } = e, [u,
|
|
2211
|
-
N &&
|
|
2212
|
+
const kn = () => "", te = (e) => W(e);
|
|
2213
|
+
function Rn(e, ...t) {
|
|
2214
|
+
const { fallbackFormat: n, postTranslation: r, unresolving: s, messageCompiler: a, fallbackLocale: o, messages: i } = e, [u, d] = wt(...t), I = F(d.missingWarn) ? d.missingWarn : e.missingWarn, b = F(d.fallbackWarn) ? d.fallbackWarn : e.fallbackWarn, N = F(d.escapeParameter) ? d.escapeParameter : e.escapeParameter, A = !!d.resolvedMessage, D = L(d.default) || F(d.default) ? F(d.default) ? a ? u : () => u : d.default : n ? a ? u : () => u : null, C = n || D != null && (L(D) || W(D)), S = tn(e, d);
|
|
2215
|
+
N && Ya(d);
|
|
2212
2216
|
let [f, m, h] = A ? [
|
|
2213
2217
|
u,
|
|
2214
2218
|
S,
|
|
2215
2219
|
i[S] || $()
|
|
2216
|
-
] :
|
|
2217
|
-
if (!A && !(L(
|
|
2218
|
-
return s ?
|
|
2219
|
-
if (process.env.NODE_ENV !== "production" && L(
|
|
2220
|
+
] : br(e, u, S, o, b, I), E = f, O = u;
|
|
2221
|
+
if (!A && !(L(E) || se(E) || te(E)) && C && (E = D, O = E), !A && (!(L(E) || se(E) || te(E)) || !L(m)))
|
|
2222
|
+
return s ? ft : u;
|
|
2223
|
+
if (process.env.NODE_ENV !== "production" && L(E) && e.messageCompiler == null)
|
|
2220
2224
|
return ue(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${u}'.`), u;
|
|
2221
2225
|
let v = !1;
|
|
2222
2226
|
const p = () => {
|
|
2223
2227
|
v = !0;
|
|
2224
|
-
}, k = te(
|
|
2228
|
+
}, k = te(E) ? E : hr(e, u, m, E, O, p);
|
|
2225
2229
|
if (v)
|
|
2226
|
-
return
|
|
2227
|
-
const w =
|
|
2230
|
+
return E;
|
|
2231
|
+
const w = Xa(e, m, h, d), X = Ha(w), ae = Ba(e, k, X);
|
|
2228
2232
|
let Y = r ? r(ae, u) : ae;
|
|
2229
|
-
if (N && L(Y) && (Y =
|
|
2230
|
-
const
|
|
2233
|
+
if (N && L(Y) && (Y = ds(Y)), process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
2234
|
+
const Pe = {
|
|
2231
2235
|
timestamp: Date.now(),
|
|
2232
|
-
key: L(u) ? u : te(
|
|
2233
|
-
locale: m || (te(
|
|
2234
|
-
format: L(
|
|
2236
|
+
key: L(u) ? u : te(E) ? E.key : "",
|
|
2237
|
+
locale: m || (te(E) ? E.locale : ""),
|
|
2238
|
+
format: L(E) ? E : te(E) ? E.source : "",
|
|
2235
2239
|
message: Y
|
|
2236
2240
|
};
|
|
2237
|
-
|
|
2241
|
+
Pe.meta = J({}, e.__meta, /* @__PURE__ */ ka() || {}), ca(Pe);
|
|
2238
2242
|
}
|
|
2239
2243
|
return Y;
|
|
2240
2244
|
}
|
|
2241
|
-
function
|
|
2242
|
-
H(e.list) ? e.list = e.list.map((t) => L(t) ?
|
|
2243
|
-
L(e.named[t]) && (e.named[t] =
|
|
2245
|
+
function Ya(e) {
|
|
2246
|
+
H(e.list) ? e.list = e.list.map((t) => L(t) ? mn(t) : t) : M(e.named) && Object.keys(e.named).forEach((t) => {
|
|
2247
|
+
L(e.named[t]) && (e.named[t] = mn(e.named[t]));
|
|
2244
2248
|
});
|
|
2245
2249
|
}
|
|
2246
|
-
function
|
|
2247
|
-
const { messages: o, onWarn: i, messageResolver: u, localeFallbacker:
|
|
2250
|
+
function br(e, t, n, r, s, a) {
|
|
2251
|
+
const { messages: o, onWarn: i, messageResolver: u, localeFallbacker: d } = e, I = d(e, r, n);
|
|
2248
2252
|
let b = $(), N, A = null, D = n, C = null;
|
|
2249
2253
|
const S = "translate";
|
|
2250
2254
|
for (let f = 0; f < I.length; f++) {
|
|
2251
|
-
if (N = C = I[f], process.env.NODE_ENV !== "production" && n !== N && !
|
|
2255
|
+
if (N = C = I[f], process.env.NODE_ENV !== "production" && n !== N && !pr(n, N) && _t(s, t) && i(Se(Z.FALLBACK_TO_TRANSLATE, {
|
|
2252
2256
|
key: t,
|
|
2253
2257
|
target: N
|
|
2254
2258
|
})), process.env.NODE_ENV !== "production" && n !== N) {
|
|
@@ -2262,8 +2266,8 @@ function Nr(e, t, n, r, s, a) {
|
|
|
2262
2266
|
});
|
|
2263
2267
|
}
|
|
2264
2268
|
b = o[N] || $();
|
|
2265
|
-
let m = null, h,
|
|
2266
|
-
if (process.env.NODE_ENV !== "production" && le && (m = window.performance.now(), h = "intlify-message-resolve-start",
|
|
2269
|
+
let m = null, h, E;
|
|
2270
|
+
if (process.env.NODE_ENV !== "production" && le && (m = window.performance.now(), h = "intlify-message-resolve-start", E = "intlify-message-resolve-end", ee && ee(h)), (A = u(b, t)) === null && (A = b[t]), process.env.NODE_ENV !== "production" && le) {
|
|
2267
2271
|
const O = window.performance.now(), v = e.__v_emitter;
|
|
2268
2272
|
v && m && A && v.emit("message-resolve", {
|
|
2269
2273
|
type: "message-resolve",
|
|
@@ -2271,12 +2275,12 @@ function Nr(e, t, n, r, s, a) {
|
|
|
2271
2275
|
message: A,
|
|
2272
2276
|
time: O - m,
|
|
2273
2277
|
groupId: `${S}:${t}`
|
|
2274
|
-
}), h &&
|
|
2278
|
+
}), h && E && ee && Ae && (ee(E), Ae("intlify message resolve", h, E));
|
|
2275
2279
|
}
|
|
2276
2280
|
if (L(A) || se(A) || te(A))
|
|
2277
2281
|
break;
|
|
2278
|
-
if (!
|
|
2279
|
-
const O =
|
|
2282
|
+
if (!Fa(N, I)) {
|
|
2283
|
+
const O = nn(
|
|
2280
2284
|
e,
|
|
2281
2285
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2282
2286
|
t,
|
|
@@ -2290,7 +2294,7 @@ function Nr(e, t, n, r, s, a) {
|
|
|
2290
2294
|
}
|
|
2291
2295
|
return [A, N, b];
|
|
2292
2296
|
}
|
|
2293
|
-
function
|
|
2297
|
+
function hr(e, t, n, r, s, a) {
|
|
2294
2298
|
const { messageCompiler: o, warnHtmlMessage: i } = e;
|
|
2295
2299
|
if (te(r)) {
|
|
2296
2300
|
const N = r;
|
|
@@ -2300,9 +2304,9 @@ function Tr(e, t, n, r, s, a) {
|
|
|
2300
2304
|
const N = (() => r);
|
|
2301
2305
|
return N.locale = n, N.key = t, N;
|
|
2302
2306
|
}
|
|
2303
|
-
let u = null,
|
|
2304
|
-
process.env.NODE_ENV !== "production" && le && (u = window.performance.now(),
|
|
2305
|
-
const b = o(r,
|
|
2307
|
+
let u = null, d, I;
|
|
2308
|
+
process.env.NODE_ENV !== "production" && le && (u = window.performance.now(), d = "intlify-message-compilation-start", I = "intlify-message-compilation-end", ee && ee(d));
|
|
2309
|
+
const b = o(r, Ka(e, n, s, r, i, a));
|
|
2306
2310
|
if (process.env.NODE_ENV !== "production" && le) {
|
|
2307
2311
|
const N = window.performance.now(), A = e.__v_emitter;
|
|
2308
2312
|
A && u && A.emit("message-compilation", {
|
|
@@ -2310,11 +2314,11 @@ function Tr(e, t, n, r, s, a) {
|
|
|
2310
2314
|
message: r,
|
|
2311
2315
|
time: N - u,
|
|
2312
2316
|
groupId: `translate:${t}`
|
|
2313
|
-
}),
|
|
2317
|
+
}), d && I && ee && Ae && (ee(I), Ae("intlify message compilation", d, I));
|
|
2314
2318
|
}
|
|
2315
2319
|
return b.locale = n, b.key = t, b.source = r, b;
|
|
2316
2320
|
}
|
|
2317
|
-
function
|
|
2321
|
+
function Ba(e, t, n) {
|
|
2318
2322
|
let r = null, s, a;
|
|
2319
2323
|
process.env.NODE_ENV !== "production" && le && (r = window.performance.now(), s = "intlify-message-evaluation-start", a = "intlify-message-evaluation-end", ee && ee(s));
|
|
2320
2324
|
const o = t(n);
|
|
@@ -2325,92 +2329,92 @@ function wa(e, t, n) {
|
|
|
2325
2329
|
value: o,
|
|
2326
2330
|
time: i - r,
|
|
2327
2331
|
groupId: `translate:${t.key}`
|
|
2328
|
-
}), s && a && ee &&
|
|
2332
|
+
}), s && a && ee && Ae && (ee(a), Ae("intlify message evaluation", s, a));
|
|
2329
2333
|
}
|
|
2330
2334
|
return o;
|
|
2331
2335
|
}
|
|
2332
|
-
function
|
|
2336
|
+
function wt(...e) {
|
|
2333
2337
|
const [t, n, r] = e, s = $();
|
|
2334
2338
|
if (!L(t) && !j(t) && !te(t) && !se(t))
|
|
2335
2339
|
throw de(q.INVALID_ARGUMENT);
|
|
2336
2340
|
const a = j(t) ? String(t) : (te(t), t);
|
|
2337
|
-
return j(n) ? s.plural = n : L(n) ? s.default = n : R(n) && !
|
|
2341
|
+
return j(n) ? s.plural = n : L(n) ? s.default = n : R(n) && !ut(n) ? s.named = n : H(n) && (s.list = n), j(r) ? s.plural = r : L(r) ? s.default = r : R(r) && J(s, r), [a, s];
|
|
2338
2342
|
}
|
|
2339
|
-
function
|
|
2343
|
+
function Ka(e, t, n, r, s, a) {
|
|
2340
2344
|
return {
|
|
2341
2345
|
locale: t,
|
|
2342
2346
|
key: n,
|
|
2343
2347
|
warnHtmlMessage: s,
|
|
2344
2348
|
onError: (o) => {
|
|
2345
2349
|
if (a && a(o), process.env.NODE_ENV !== "production") {
|
|
2346
|
-
const i =
|
|
2350
|
+
const i = ja(r), u = `Message compilation error: ${o.message}`, d = o.location && i && Ns(i, o.location.start.offset, o.location.end.offset), I = e.__v_emitter;
|
|
2347
2351
|
I && i && I.emit("compile-error", {
|
|
2348
2352
|
message: i,
|
|
2349
2353
|
error: o.message,
|
|
2350
2354
|
start: o.location && o.location.start.offset,
|
|
2351
2355
|
end: o.location && o.location.end.offset,
|
|
2352
2356
|
groupId: `translate:${n}`
|
|
2353
|
-
}), console.error(
|
|
2354
|
-
${
|
|
2357
|
+
}), console.error(d ? `${u}
|
|
2358
|
+
${d}` : u);
|
|
2355
2359
|
} else
|
|
2356
2360
|
throw o;
|
|
2357
2361
|
},
|
|
2358
|
-
onCacheKey: (o) =>
|
|
2362
|
+
onCacheKey: (o) => us(t, n, o)
|
|
2359
2363
|
};
|
|
2360
2364
|
}
|
|
2361
|
-
function
|
|
2365
|
+
function ja(e) {
|
|
2362
2366
|
if (L(e))
|
|
2363
2367
|
return e;
|
|
2364
2368
|
if (e.loc && e.loc.source)
|
|
2365
2369
|
return e.loc.source;
|
|
2366
2370
|
}
|
|
2367
|
-
function
|
|
2368
|
-
const { modifiers: s, pluralRules: a, messageResolver: o, fallbackLocale: i, fallbackWarn: u, missingWarn:
|
|
2371
|
+
function Xa(e, t, n, r) {
|
|
2372
|
+
const { modifiers: s, pluralRules: a, messageResolver: o, fallbackLocale: i, fallbackWarn: u, missingWarn: d, fallbackContext: I } = e, N = {
|
|
2369
2373
|
locale: t,
|
|
2370
2374
|
modifiers: s,
|
|
2371
2375
|
pluralRules: a,
|
|
2372
2376
|
messages: (A, D) => {
|
|
2373
2377
|
let C = o(n, A);
|
|
2374
2378
|
if (C == null && (I || D)) {
|
|
2375
|
-
const [, , S] =
|
|
2379
|
+
const [, , S] = br(
|
|
2376
2380
|
I || e,
|
|
2377
2381
|
// NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
|
|
2378
2382
|
A,
|
|
2379
2383
|
t,
|
|
2380
2384
|
i,
|
|
2381
2385
|
u,
|
|
2382
|
-
|
|
2386
|
+
d
|
|
2383
2387
|
);
|
|
2384
2388
|
C = o(S, A);
|
|
2385
2389
|
}
|
|
2386
2390
|
if (L(C) || se(C)) {
|
|
2387
2391
|
let S = !1;
|
|
2388
|
-
const m =
|
|
2392
|
+
const m = hr(e, A, t, C, A, () => {
|
|
2389
2393
|
S = !0;
|
|
2390
2394
|
});
|
|
2391
|
-
return S ?
|
|
2392
|
-
} else return te(C) ? C :
|
|
2395
|
+
return S ? kn : m;
|
|
2396
|
+
} else return te(C) ? C : kn;
|
|
2393
2397
|
}
|
|
2394
2398
|
};
|
|
2395
2399
|
return e.processor && (N.processor = e.processor), r.list && (N.list = r.list), r.named && (N.named = r.named), j(r.plural) && (N.pluralIndex = r.plural), N;
|
|
2396
2400
|
}
|
|
2397
|
-
|
|
2398
|
-
function
|
|
2399
|
-
return
|
|
2401
|
+
Xs();
|
|
2402
|
+
function Ja() {
|
|
2403
|
+
return Ir().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
2400
2404
|
}
|
|
2401
|
-
function
|
|
2405
|
+
function Ir() {
|
|
2402
2406
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
2403
2407
|
}
|
|
2404
|
-
const
|
|
2405
|
-
let
|
|
2406
|
-
function
|
|
2408
|
+
const Qa = typeof Proxy == "function", qa = "devtools-plugin:setup", Za = "plugin:settings:set";
|
|
2409
|
+
let ke, Vt;
|
|
2410
|
+
function za() {
|
|
2407
2411
|
var e;
|
|
2408
|
-
return
|
|
2412
|
+
return ke !== void 0 || (typeof window < "u" && window.performance ? (ke = !0, Vt = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ke = !0, Vt = globalThis.perf_hooks.performance) : ke = !1), ke;
|
|
2409
2413
|
}
|
|
2410
|
-
function
|
|
2411
|
-
return
|
|
2414
|
+
function eo() {
|
|
2415
|
+
return za() ? Vt.now() : Date.now();
|
|
2412
2416
|
}
|
|
2413
|
-
class
|
|
2417
|
+
class to {
|
|
2414
2418
|
constructor(t, n) {
|
|
2415
2419
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
|
|
2416
2420
|
const r = {};
|
|
@@ -2438,9 +2442,9 @@ class ja {
|
|
|
2438
2442
|
a = o;
|
|
2439
2443
|
},
|
|
2440
2444
|
now() {
|
|
2441
|
-
return
|
|
2445
|
+
return eo();
|
|
2442
2446
|
}
|
|
2443
|
-
}, n && n.on(
|
|
2447
|
+
}, n && n.on(Za, (o, i) => {
|
|
2444
2448
|
o === this.plugin.id && this.fallbacks.setSettings(i);
|
|
2445
2449
|
}), this.proxiedOn = new Proxy({}, {
|
|
2446
2450
|
get: (o, i) => this.target ? this.target.on[i] : (...u) => {
|
|
@@ -2455,11 +2459,11 @@ class ja {
|
|
|
2455
2459
|
args: u,
|
|
2456
2460
|
resolve: () => {
|
|
2457
2461
|
}
|
|
2458
|
-
}), this.fallbacks[i](...u)) : (...u) => new Promise((
|
|
2462
|
+
}), this.fallbacks[i](...u)) : (...u) => new Promise((d) => {
|
|
2459
2463
|
this.targetQueue.push({
|
|
2460
2464
|
method: i,
|
|
2461
2465
|
args: u,
|
|
2462
|
-
resolve:
|
|
2466
|
+
resolve: d
|
|
2463
2467
|
});
|
|
2464
2468
|
})
|
|
2465
2469
|
});
|
|
@@ -2472,12 +2476,12 @@ class ja {
|
|
|
2472
2476
|
n.resolve(await this.target[n.method](...n.args));
|
|
2473
2477
|
}
|
|
2474
2478
|
}
|
|
2475
|
-
function
|
|
2476
|
-
const n = e, r =
|
|
2479
|
+
function no(e, t) {
|
|
2480
|
+
const n = e, r = Ir(), s = Ja(), a = Qa && n.enableEarlyProxy;
|
|
2477
2481
|
if (s && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !a))
|
|
2478
|
-
s.emit(
|
|
2482
|
+
s.emit(qa, e, t);
|
|
2479
2483
|
else {
|
|
2480
|
-
const o = a ? new
|
|
2484
|
+
const o = a ? new to(n, s) : null;
|
|
2481
2485
|
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
2482
2486
|
pluginDescriptor: n,
|
|
2483
2487
|
setupFn: t,
|
|
@@ -2485,13 +2489,13 @@ function Xa(e, t) {
|
|
|
2485
2489
|
}), o && t(o.proxiedTarget);
|
|
2486
2490
|
}
|
|
2487
2491
|
}
|
|
2488
|
-
const
|
|
2489
|
-
function
|
|
2490
|
-
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (
|
|
2492
|
+
const ro = "11.2.8";
|
|
2493
|
+
function so() {
|
|
2494
|
+
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Oe().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Oe().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Oe().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Oe().__INTLIFY_PROD_DEVTOOLS__ = !1);
|
|
2491
2495
|
}
|
|
2492
2496
|
const G = {
|
|
2493
2497
|
// composer module errors
|
|
2494
|
-
UNEXPECTED_RETURN_TYPE:
|
|
2498
|
+
UNEXPECTED_RETURN_TYPE: fa,
|
|
2495
2499
|
// 24
|
|
2496
2500
|
// legacy module errors
|
|
2497
2501
|
INVALID_ARGUMENT: 25,
|
|
@@ -2512,9 +2516,9 @@ const G = {
|
|
|
2512
2516
|
NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
|
|
2513
2517
|
};
|
|
2514
2518
|
function z(e, ...t) {
|
|
2515
|
-
return
|
|
2519
|
+
return Ve(e, null, process.env.NODE_ENV !== "production" ? { messages: ao, args: t } : void 0);
|
|
2516
2520
|
}
|
|
2517
|
-
const
|
|
2521
|
+
const ao = {
|
|
2518
2522
|
[G.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
|
|
2519
2523
|
[G.INVALID_ARGUMENT]: "Invalid argument",
|
|
2520
2524
|
[G.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
|
|
@@ -2526,8 +2530,8 @@ const qa = {
|
|
|
2526
2530
|
[G.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
|
|
2527
2531
|
[G.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
|
|
2528
2532
|
[G.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
|
|
2529
|
-
},
|
|
2530
|
-
FALLBACK_TO_ROOT:
|
|
2533
|
+
}, $t = /* @__PURE__ */ fe("__translateVNode"), Wt = /* @__PURE__ */ fe("__datetimeParts"), Gt = /* @__PURE__ */ fe("__numberParts"), ye = /* @__PURE__ */ fe("__enableEmitter"), Xe = /* @__PURE__ */ fe("__disableEmitter"), Lr = fe("__setPluralRules"), Or = /* @__PURE__ */ fe("__injectWithOption"), xt = /* @__PURE__ */ fe("__dispose"), ne = {
|
|
2534
|
+
FALLBACK_TO_ROOT: Oa,
|
|
2531
2535
|
// 8
|
|
2532
2536
|
NOT_FOUND_PARENT_SCOPE: 9,
|
|
2533
2537
|
IGNORE_OBJ_FLATTEN: 10,
|
|
@@ -2541,7 +2545,7 @@ const qa = {
|
|
|
2541
2545
|
DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12,
|
|
2542
2546
|
// duplicate `useI18n` calling
|
|
2543
2547
|
DUPLICATE_USE_I18N_CALLING: 13
|
|
2544
|
-
},
|
|
2548
|
+
}, oo = {
|
|
2545
2549
|
[ne.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
|
|
2546
2550
|
[ne.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
|
|
2547
2551
|
[ne.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
|
|
@@ -2556,8 +2560,8 @@ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guid
|
|
|
2556
2560
|
[ne.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: "'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",
|
|
2557
2561
|
[ne.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."
|
|
2558
2562
|
};
|
|
2559
|
-
function
|
|
2560
|
-
return
|
|
2563
|
+
function we(e, ...t) {
|
|
2564
|
+
return ct(oo[e], ...t);
|
|
2561
2565
|
}
|
|
2562
2566
|
function Je(e) {
|
|
2563
2567
|
if (!M(e) || se(e))
|
|
@@ -2573,26 +2577,26 @@ function Je(e) {
|
|
|
2573
2577
|
if (n[o] === "__proto__")
|
|
2574
2578
|
throw new Error(`unsafe key: ${n[o]}`);
|
|
2575
2579
|
if (n[o] in s || (s[n[o]] = $()), !M(s[n[o]])) {
|
|
2576
|
-
process.env.NODE_ENV !== "production" && ue(
|
|
2580
|
+
process.env.NODE_ENV !== "production" && ue(we(ne.IGNORE_OBJ_FLATTEN, {
|
|
2577
2581
|
key: n[o]
|
|
2578
2582
|
})), a = !0;
|
|
2579
2583
|
break;
|
|
2580
2584
|
}
|
|
2581
2585
|
s = s[n[o]];
|
|
2582
2586
|
}
|
|
2583
|
-
if (a || (se(s) ?
|
|
2587
|
+
if (a || (se(s) ? ir.includes(n[r]) || delete e[t] : (s[n[r]] = e[t], delete e[t])), !se(s)) {
|
|
2584
2588
|
const o = s[n[r]];
|
|
2585
2589
|
M(o) && Je(o);
|
|
2586
2590
|
}
|
|
2587
2591
|
}
|
|
2588
2592
|
return e;
|
|
2589
2593
|
}
|
|
2590
|
-
function
|
|
2594
|
+
function rn(e, t) {
|
|
2591
2595
|
const { messages: n, __i18n: r, messageResolver: s, flatJson: a } = t, o = R(n) ? n : H(r) ? $() : { [e]: $() };
|
|
2592
2596
|
if (H(r) && r.forEach((i) => {
|
|
2593
2597
|
if ("locale" in i && "resource" in i) {
|
|
2594
|
-
const { locale: u, resource:
|
|
2595
|
-
u ? (o[u] = o[u] || $(), rt(
|
|
2598
|
+
const { locale: u, resource: d } = i;
|
|
2599
|
+
u ? (o[u] = o[u] || $(), rt(d, o[u])) : rt(d, o);
|
|
2596
2600
|
} else
|
|
2597
2601
|
L(i) && rt(JSON.parse(i), o);
|
|
2598
2602
|
}), s == null && a)
|
|
@@ -2600,12 +2604,12 @@ function nn(e, t) {
|
|
|
2600
2604
|
oe(o, i) && Je(o[i]);
|
|
2601
2605
|
return o;
|
|
2602
2606
|
}
|
|
2603
|
-
function
|
|
2607
|
+
function vr(e) {
|
|
2604
2608
|
return e.type;
|
|
2605
2609
|
}
|
|
2606
|
-
function
|
|
2610
|
+
function Cr(e, t, n) {
|
|
2607
2611
|
let r = M(t.messages) ? t.messages : $();
|
|
2608
|
-
"__i18nGlobal" in n && (r =
|
|
2612
|
+
"__i18nGlobal" in n && (r = rn(e.locale.value, {
|
|
2609
2613
|
messages: r,
|
|
2610
2614
|
__i18n: n.__i18nGlobal
|
|
2611
2615
|
}));
|
|
@@ -2628,25 +2632,25 @@ function Or(e, t, n) {
|
|
|
2628
2632
|
}
|
|
2629
2633
|
}
|
|
2630
2634
|
}
|
|
2631
|
-
function
|
|
2632
|
-
return
|
|
2635
|
+
function Mn(e) {
|
|
2636
|
+
return qn(xr, null, e, 0);
|
|
2633
2637
|
}
|
|
2634
|
-
function
|
|
2638
|
+
function Me() {
|
|
2635
2639
|
const e = "currentInstance";
|
|
2636
|
-
return e in
|
|
2640
|
+
return e in St ? St[e] : St.getCurrentInstance();
|
|
2637
2641
|
}
|
|
2638
|
-
const
|
|
2639
|
-
let
|
|
2640
|
-
function
|
|
2641
|
-
return ((t, n, r, s) => e(n, r,
|
|
2642
|
+
const Fn = "__INTLIFY_META__", Un = () => [], lo = () => !1;
|
|
2643
|
+
let wn = 0;
|
|
2644
|
+
function Vn(e) {
|
|
2645
|
+
return ((t, n, r, s) => e(n, r, Me() || void 0, s));
|
|
2642
2646
|
}
|
|
2643
|
-
const
|
|
2644
|
-
const e =
|
|
2647
|
+
const io = /* @__NO_SIDE_EFFECTS__ */ () => {
|
|
2648
|
+
const e = Me();
|
|
2645
2649
|
let t = null;
|
|
2646
|
-
return e && (t =
|
|
2650
|
+
return e && (t = vr(e)[Fn]) ? { [Fn]: t } : null;
|
|
2647
2651
|
};
|
|
2648
|
-
function
|
|
2649
|
-
const { __root: t, __injectWithOption: n } = e, r = t === void 0, s = e.flatJson, a = le ?
|
|
2652
|
+
function sn(e = {}) {
|
|
2653
|
+
const { __root: t, __injectWithOption: n } = e, r = t === void 0, s = e.flatJson, a = le ? Bt : $r;
|
|
2650
2654
|
let o = F(e.inheritLocale) ? e.inheritLocale : !0;
|
|
2651
2655
|
const i = a(
|
|
2652
2656
|
// prettier-ignore
|
|
@@ -2654,17 +2658,17 @@ function rn(e = {}) {
|
|
|
2654
2658
|
), u = a(
|
|
2655
2659
|
// prettier-ignore
|
|
2656
2660
|
t && o ? t.fallbackLocale.value : L(e.fallbackLocale) || H(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : i.value
|
|
2657
|
-
),
|
|
2658
|
-
let N = t ? t.missingWarn : F(e.missingWarn) ||
|
|
2661
|
+
), d = a(rn(i.value, e)), I = a(R(e.datetimeFormats) ? e.datetimeFormats : { [i.value]: {} }), b = a(R(e.numberFormats) ? e.numberFormats : { [i.value]: {} });
|
|
2662
|
+
let N = t ? t.missingWarn : F(e.missingWarn) || Fe(e.missingWarn) ? e.missingWarn : !0, A = t ? t.fallbackWarn : F(e.fallbackWarn) || Fe(e.fallbackWarn) ? e.fallbackWarn : !0, D = t ? t.fallbackRoot : F(e.fallbackRoot) ? e.fallbackRoot : !0, C = !!e.fallbackFormat, S = W(e.missing) ? e.missing : null, f = W(e.missing) ? Vn(e.missing) : null, m = W(e.postTranslation) ? e.postTranslation : null, h = t ? t.warnHtmlMessage : F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, E = !!e.escapeParameter;
|
|
2659
2663
|
const O = t ? t.modifiers : R(e.modifiers) ? e.modifiers : {};
|
|
2660
2664
|
let v = e.pluralRules || t && t.pluralRules, p;
|
|
2661
2665
|
p = (() => {
|
|
2662
|
-
r &&
|
|
2666
|
+
r && On(null);
|
|
2663
2667
|
const _ = {
|
|
2664
|
-
version:
|
|
2668
|
+
version: ro,
|
|
2665
2669
|
locale: i.value,
|
|
2666
2670
|
fallbackLocale: u.value,
|
|
2667
|
-
messages:
|
|
2671
|
+
messages: d.value,
|
|
2668
2672
|
modifiers: O,
|
|
2669
2673
|
pluralRules: v,
|
|
2670
2674
|
missing: f === null ? void 0 : f,
|
|
@@ -2674,137 +2678,137 @@ function rn(e = {}) {
|
|
|
2674
2678
|
unresolving: !0,
|
|
2675
2679
|
postTranslation: m === null ? void 0 : m,
|
|
2676
2680
|
warnHtmlMessage: h,
|
|
2677
|
-
escapeParameter:
|
|
2681
|
+
escapeParameter: E,
|
|
2678
2682
|
messageResolver: e.messageResolver,
|
|
2679
2683
|
messageCompiler: e.messageCompiler,
|
|
2680
2684
|
__meta: { framework: "vue" }
|
|
2681
2685
|
};
|
|
2682
2686
|
_.datetimeFormats = I.value, _.numberFormats = b.value, _.__datetimeFormatters = R(p) ? p.__datetimeFormatters : void 0, _.__numberFormatters = R(p) ? p.__numberFormatters : void 0, process.env.NODE_ENV !== "production" && (_.__v_emitter = R(p) ? p.__v_emitter : void 0);
|
|
2683
|
-
const T =
|
|
2684
|
-
return r &&
|
|
2685
|
-
})(),
|
|
2687
|
+
const T = Ma(_);
|
|
2688
|
+
return r && On(T), T;
|
|
2689
|
+
})(), Ye(p, i.value, u.value);
|
|
2686
2690
|
function w() {
|
|
2687
2691
|
return [
|
|
2688
2692
|
i.value,
|
|
2689
2693
|
u.value,
|
|
2690
|
-
|
|
2694
|
+
d.value,
|
|
2691
2695
|
I.value,
|
|
2692
2696
|
b.value
|
|
2693
2697
|
];
|
|
2694
2698
|
}
|
|
2695
|
-
const X =
|
|
2699
|
+
const X = He({
|
|
2696
2700
|
get: () => i.value,
|
|
2697
2701
|
set: (_) => {
|
|
2698
2702
|
p.locale = _, i.value = _;
|
|
2699
2703
|
}
|
|
2700
|
-
}), ae =
|
|
2704
|
+
}), ae = He({
|
|
2701
2705
|
get: () => u.value,
|
|
2702
2706
|
set: (_) => {
|
|
2703
|
-
p.fallbackLocale = _, u.value = _,
|
|
2707
|
+
p.fallbackLocale = _, u.value = _, Ye(p, i.value, _);
|
|
2704
2708
|
}
|
|
2705
|
-
}), Y =
|
|
2706
|
-
function
|
|
2709
|
+
}), Y = He(() => d.value), Pe = /* @__PURE__ */ He(() => I.value), mt = /* @__PURE__ */ He(() => b.value);
|
|
2710
|
+
function dt() {
|
|
2707
2711
|
return W(m) ? m : null;
|
|
2708
2712
|
}
|
|
2709
|
-
function
|
|
2713
|
+
function Et(_) {
|
|
2710
2714
|
m = _, p.postTranslation = _;
|
|
2711
2715
|
}
|
|
2712
|
-
function
|
|
2716
|
+
function pt() {
|
|
2713
2717
|
return S;
|
|
2714
2718
|
}
|
|
2715
|
-
function
|
|
2716
|
-
_ !== null && (f =
|
|
2719
|
+
function gt(_) {
|
|
2720
|
+
_ !== null && (f = Vn(_)), S = _, p.missing = f;
|
|
2717
2721
|
}
|
|
2718
|
-
function
|
|
2722
|
+
function Nt(_, T) {
|
|
2719
2723
|
return _ !== "translate" || !T.resolvedMessage;
|
|
2720
2724
|
}
|
|
2721
|
-
const _e = (_, T, V,
|
|
2725
|
+
const _e = (_, T, V, K, he, ze) => {
|
|
2722
2726
|
w();
|
|
2723
|
-
let
|
|
2727
|
+
let De;
|
|
2724
2728
|
try {
|
|
2725
|
-
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (p.fallbackContext = t ?
|
|
2729
|
+
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (p.fallbackContext = t ? Ra() : void 0), De = _(p);
|
|
2726
2730
|
} finally {
|
|
2727
2731
|
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (p.fallbackContext = void 0);
|
|
2728
2732
|
}
|
|
2729
2733
|
if (V !== "translate exists" && // for not `te` (e.g `t`)
|
|
2730
|
-
j(
|
|
2731
|
-
const [
|
|
2732
|
-
if (process.env.NODE_ENV !== "production" && t && L(
|
|
2733
|
-
key:
|
|
2734
|
+
j(De) && De === ft || V === "translate exists" && !De) {
|
|
2735
|
+
const [Ie, kr] = T();
|
|
2736
|
+
if (process.env.NODE_ENV !== "production" && t && L(Ie) && Nt(V, kr) && (D && (_t(A, Ie) || Er(N, Ie)) && ue(we(ne.FALLBACK_TO_ROOT, {
|
|
2737
|
+
key: Ie,
|
|
2734
2738
|
type: V
|
|
2735
2739
|
})), process.env.NODE_ENV !== "production")) {
|
|
2736
|
-
const { __v_emitter:
|
|
2737
|
-
|
|
2740
|
+
const { __v_emitter: un } = p;
|
|
2741
|
+
un && D && un.emit("fallback", {
|
|
2738
2742
|
type: V,
|
|
2739
|
-
key:
|
|
2743
|
+
key: Ie,
|
|
2740
2744
|
to: "global",
|
|
2741
|
-
groupId: `${V}:${
|
|
2745
|
+
groupId: `${V}:${Ie}`
|
|
2742
2746
|
});
|
|
2743
2747
|
}
|
|
2744
|
-
return t && D ?
|
|
2748
|
+
return t && D ? K(t) : he(Ie);
|
|
2745
2749
|
} else {
|
|
2746
|
-
if (ze(
|
|
2747
|
-
return
|
|
2750
|
+
if (ze(De))
|
|
2751
|
+
return De;
|
|
2748
2752
|
throw z(G.UNEXPECTED_RETURN_TYPE);
|
|
2749
2753
|
}
|
|
2750
2754
|
};
|
|
2751
|
-
function
|
|
2752
|
-
return _e((T) => Reflect.apply(
|
|
2755
|
+
function $e(..._) {
|
|
2756
|
+
return _e((T) => Reflect.apply(Rn, null, [T, ..._]), () => wt(..._), "translate", (T) => Reflect.apply(T.t, T, [..._]), (T) => T, (T) => L(T));
|
|
2753
2757
|
}
|
|
2754
|
-
function
|
|
2755
|
-
const [T, V,
|
|
2756
|
-
if (
|
|
2758
|
+
function Tt(..._) {
|
|
2759
|
+
const [T, V, K] = _;
|
|
2760
|
+
if (K && !M(K))
|
|
2757
2761
|
throw z(G.INVALID_ARGUMENT);
|
|
2758
|
-
return
|
|
2762
|
+
return $e(T, V, J({ resolvedMessage: !0 }, K || {}));
|
|
2759
2763
|
}
|
|
2760
|
-
function
|
|
2761
|
-
return _e((T) => Reflect.apply(
|
|
2764
|
+
function bt(..._) {
|
|
2765
|
+
return _e((T) => Reflect.apply(An, null, [T, ..._]), () => Ft(..._), "datetime format", (T) => Reflect.apply(T.d, T, [..._]), () => st, (T) => L(T) || H(T));
|
|
2762
2766
|
}
|
|
2763
|
-
function
|
|
2764
|
-
return _e((T) => Reflect.apply(
|
|
2767
|
+
function ht(..._) {
|
|
2768
|
+
return _e((T) => Reflect.apply(yn, null, [T, ..._]), () => Ut(..._), "number format", (T) => Reflect.apply(T.n, T, [..._]), () => st, (T) => L(T) || H(T));
|
|
2765
2769
|
}
|
|
2766
|
-
function
|
|
2767
|
-
return _.map((T) => L(T) || j(T) || F(T) ?
|
|
2770
|
+
function It(_) {
|
|
2771
|
+
return _.map((T) => L(T) || j(T) || F(T) ? Mn(String(T)) : T);
|
|
2768
2772
|
}
|
|
2769
|
-
const
|
|
2770
|
-
normalize:
|
|
2773
|
+
const Lt = {
|
|
2774
|
+
normalize: It,
|
|
2771
2775
|
interpolate: (_) => _,
|
|
2772
2776
|
type: "vnode"
|
|
2773
2777
|
};
|
|
2774
2778
|
function qe(..._) {
|
|
2775
2779
|
return _e((T) => {
|
|
2776
2780
|
let V;
|
|
2777
|
-
const
|
|
2781
|
+
const K = T;
|
|
2778
2782
|
try {
|
|
2779
|
-
|
|
2783
|
+
K.processor = Lt, V = Reflect.apply(Rn, null, [K, ..._]);
|
|
2780
2784
|
} finally {
|
|
2781
|
-
|
|
2785
|
+
K.processor = null;
|
|
2782
2786
|
}
|
|
2783
2787
|
return V;
|
|
2784
|
-
}, () =>
|
|
2788
|
+
}, () => wt(..._), "translate", (T) => T[$t](..._), (T) => [Mn(T)], (T) => H(T));
|
|
2785
2789
|
}
|
|
2786
|
-
function
|
|
2787
|
-
return _e((T) => Reflect.apply(
|
|
2790
|
+
function Ot(..._) {
|
|
2791
|
+
return _e((T) => Reflect.apply(yn, null, [T, ..._]), () => Ut(..._), "number format", (T) => T[Gt](..._), Un, (T) => L(T) || H(T));
|
|
2788
2792
|
}
|
|
2789
2793
|
function Ze(..._) {
|
|
2790
|
-
return _e((T) => Reflect.apply(
|
|
2794
|
+
return _e((T) => Reflect.apply(An, null, [T, ..._]), () => Ft(..._), "datetime format", (T) => T[Wt](..._), Un, (T) => L(T) || H(T));
|
|
2791
2795
|
}
|
|
2792
|
-
function
|
|
2796
|
+
function vt(_) {
|
|
2793
2797
|
v = _, p.pluralRules = v;
|
|
2794
2798
|
}
|
|
2795
|
-
function
|
|
2799
|
+
function Ct(_, T) {
|
|
2796
2800
|
return _e(() => {
|
|
2797
2801
|
if (!_)
|
|
2798
2802
|
return !1;
|
|
2799
|
-
const V = L(T) ? T : i.value,
|
|
2800
|
-
return se(
|
|
2801
|
-
}, () => [_], "translate exists", (V) => Reflect.apply(V.te, V, [_, T]),
|
|
2803
|
+
const V = L(T) ? T : i.value, K = be(V), he = p.messageResolver(K, _);
|
|
2804
|
+
return se(he) || te(he) || L(he);
|
|
2805
|
+
}, () => [_], "translate exists", (V) => Reflect.apply(V.te, V, [_, T]), lo, (V) => F(V));
|
|
2802
2806
|
}
|
|
2803
|
-
function
|
|
2807
|
+
function We(_) {
|
|
2804
2808
|
let T = null;
|
|
2805
|
-
const V =
|
|
2806
|
-
for (let
|
|
2807
|
-
const
|
|
2809
|
+
const V = cr(p, u.value, i.value);
|
|
2810
|
+
for (let K = 0; K < V.length; K++) {
|
|
2811
|
+
const he = d.value[V[K]] || {}, ze = p.messageResolver(he, _);
|
|
2808
2812
|
if (ze != null) {
|
|
2809
2813
|
T = ze;
|
|
2810
2814
|
break;
|
|
@@ -2812,65 +2816,65 @@ function rn(e = {}) {
|
|
|
2812
2816
|
}
|
|
2813
2817
|
return T;
|
|
2814
2818
|
}
|
|
2815
|
-
function
|
|
2816
|
-
const T =
|
|
2819
|
+
function Ge(_) {
|
|
2820
|
+
const T = We(_);
|
|
2817
2821
|
return T ?? (t ? t.tm(_) || {} : {});
|
|
2818
2822
|
}
|
|
2819
|
-
function
|
|
2820
|
-
return
|
|
2823
|
+
function be(_) {
|
|
2824
|
+
return d.value[_] || {};
|
|
2821
2825
|
}
|
|
2822
|
-
function
|
|
2826
|
+
function xe(_, T) {
|
|
2823
2827
|
if (s) {
|
|
2824
2828
|
const V = { [_]: T };
|
|
2825
|
-
for (const
|
|
2826
|
-
oe(V,
|
|
2829
|
+
for (const K in V)
|
|
2830
|
+
oe(V, K) && Je(V[K]);
|
|
2827
2831
|
T = V[_];
|
|
2828
2832
|
}
|
|
2829
|
-
|
|
2833
|
+
d.value[_] = T, p.messages = d.value;
|
|
2830
2834
|
}
|
|
2831
|
-
function
|
|
2832
|
-
|
|
2835
|
+
function At(_, T) {
|
|
2836
|
+
d.value[_] = d.value[_] || {};
|
|
2833
2837
|
const V = { [_]: T };
|
|
2834
2838
|
if (s)
|
|
2835
|
-
for (const
|
|
2836
|
-
oe(V,
|
|
2837
|
-
T = V[_], rt(T,
|
|
2839
|
+
for (const K in V)
|
|
2840
|
+
oe(V, K) && Je(V[K]);
|
|
2841
|
+
T = V[_], rt(T, d.value[_]), p.messages = d.value;
|
|
2838
2842
|
}
|
|
2839
2843
|
function l(_) {
|
|
2840
2844
|
return I.value[_] || {};
|
|
2841
2845
|
}
|
|
2842
2846
|
function c(_, T) {
|
|
2843
|
-
I.value[_] = T, p.datetimeFormats = I.value,
|
|
2847
|
+
I.value[_] = T, p.datetimeFormats = I.value, Sn(p, _, T);
|
|
2844
2848
|
}
|
|
2845
2849
|
function g(_, T) {
|
|
2846
|
-
I.value[_] = J(I.value[_] || {}, T), p.datetimeFormats = I.value,
|
|
2850
|
+
I.value[_] = J(I.value[_] || {}, T), p.datetimeFormats = I.value, Sn(p, _, T);
|
|
2847
2851
|
}
|
|
2848
2852
|
function y(_) {
|
|
2849
2853
|
return b.value[_] || {};
|
|
2850
2854
|
}
|
|
2851
2855
|
function x(_, T) {
|
|
2852
|
-
b.value[_] = T, p.numberFormats = b.value,
|
|
2856
|
+
b.value[_] = T, p.numberFormats = b.value, Pn(p, _, T);
|
|
2853
2857
|
}
|
|
2854
|
-
function
|
|
2855
|
-
b.value[_] = J(b.value[_] || {}, T), p.numberFormats = b.value,
|
|
2858
|
+
function B(_, T) {
|
|
2859
|
+
b.value[_] = J(b.value[_] || {}, T), p.numberFormats = b.value, Pn(p, _, T);
|
|
2856
2860
|
}
|
|
2857
|
-
|
|
2858
|
-
o && (i.value = _, p.locale = _,
|
|
2859
|
-
}),
|
|
2860
|
-
o && (u.value = _, p.fallbackLocale = _,
|
|
2861
|
+
wn++, t && le && (Ce(t.locale, (_) => {
|
|
2862
|
+
o && (i.value = _, p.locale = _, Ye(p, i.value, u.value));
|
|
2863
|
+
}), Ce(t.fallbackLocale, (_) => {
|
|
2864
|
+
o && (u.value = _, p.fallbackLocale = _, Ye(p, i.value, u.value));
|
|
2861
2865
|
}));
|
|
2862
2866
|
const U = {
|
|
2863
|
-
id:
|
|
2867
|
+
id: wn,
|
|
2864
2868
|
locale: X,
|
|
2865
2869
|
fallbackLocale: ae,
|
|
2866
2870
|
get inheritLocale() {
|
|
2867
2871
|
return o;
|
|
2868
2872
|
},
|
|
2869
2873
|
set inheritLocale(_) {
|
|
2870
|
-
o = _, _ && t && (i.value = t.locale.value, u.value = t.fallbackLocale.value,
|
|
2874
|
+
o = _, _ && t && (i.value = t.locale.value, u.value = t.fallbackLocale.value, Ye(p, i.value, u.value));
|
|
2871
2875
|
},
|
|
2872
2876
|
get availableLocales() {
|
|
2873
|
-
return Object.keys(
|
|
2877
|
+
return Object.keys(d.value).sort();
|
|
2874
2878
|
},
|
|
2875
2879
|
messages: Y,
|
|
2876
2880
|
get modifiers() {
|
|
@@ -2913,81 +2917,81 @@ function rn(e = {}) {
|
|
|
2913
2917
|
h = _, p.warnHtmlMessage = _;
|
|
2914
2918
|
},
|
|
2915
2919
|
get escapeParameter() {
|
|
2916
|
-
return
|
|
2920
|
+
return E;
|
|
2917
2921
|
},
|
|
2918
2922
|
set escapeParameter(_) {
|
|
2919
|
-
|
|
2920
|
-
},
|
|
2921
|
-
t:
|
|
2922
|
-
getLocaleMessage:
|
|
2923
|
-
setLocaleMessage:
|
|
2924
|
-
mergeLocaleMessage:
|
|
2925
|
-
getPostTranslationHandler:
|
|
2926
|
-
setPostTranslationHandler:
|
|
2927
|
-
getMissingHandler:
|
|
2928
|
-
setMissingHandler:
|
|
2929
|
-
[
|
|
2923
|
+
E = _, p.escapeParameter = _;
|
|
2924
|
+
},
|
|
2925
|
+
t: $e,
|
|
2926
|
+
getLocaleMessage: be,
|
|
2927
|
+
setLocaleMessage: xe,
|
|
2928
|
+
mergeLocaleMessage: At,
|
|
2929
|
+
getPostTranslationHandler: dt,
|
|
2930
|
+
setPostTranslationHandler: Et,
|
|
2931
|
+
getMissingHandler: pt,
|
|
2932
|
+
setMissingHandler: gt,
|
|
2933
|
+
[Lr]: vt
|
|
2930
2934
|
};
|
|
2931
|
-
return U.datetimeFormats =
|
|
2935
|
+
return U.datetimeFormats = Pe, U.numberFormats = mt, U.rt = Tt, U.te = Ct, U.tm = Ge, U.d = bt, U.n = ht, U.getDateTimeFormat = l, U.setDateTimeFormat = c, U.mergeDateTimeFormat = g, U.getNumberFormat = y, U.setNumberFormat = x, U.mergeNumberFormat = B, U[Or] = n, U[$t] = qe, U[Wt] = Ze, U[Gt] = Ot, process.env.NODE_ENV !== "production" && (U[ye] = (_) => {
|
|
2932
2936
|
p.__v_emitter = _;
|
|
2933
2937
|
}, U[Xe] = () => {
|
|
2934
2938
|
p.__v_emitter = void 0;
|
|
2935
2939
|
}), U;
|
|
2936
2940
|
}
|
|
2937
|
-
const
|
|
2941
|
+
const Ar = "vue-i18n: composer properties", kt = {
|
|
2938
2942
|
"vue-devtools-plugin-vue-i18n": "Vue I18n DevTools",
|
|
2939
2943
|
"vue-i18n-resource-inspector": "Vue I18n DevTools",
|
|
2940
2944
|
"vue-i18n-timeline": "Vue I18n"
|
|
2941
|
-
},
|
|
2945
|
+
}, co = {
|
|
2942
2946
|
"vue-i18n-resource-inspector": "Search for scopes ..."
|
|
2943
|
-
},
|
|
2947
|
+
}, uo = {
|
|
2944
2948
|
"vue-i18n-timeline": 16764185
|
|
2945
2949
|
};
|
|
2946
|
-
let
|
|
2947
|
-
async function
|
|
2950
|
+
let Ht;
|
|
2951
|
+
async function fo(e, t) {
|
|
2948
2952
|
return new Promise((n, r) => {
|
|
2949
2953
|
try {
|
|
2950
|
-
|
|
2954
|
+
no({
|
|
2951
2955
|
id: "vue-devtools-plugin-vue-i18n",
|
|
2952
|
-
label:
|
|
2956
|
+
label: kt["vue-devtools-plugin-vue-i18n"],
|
|
2953
2957
|
packageName: "vue-i18n",
|
|
2954
2958
|
homepage: "https://vue-i18n.intlify.dev",
|
|
2955
2959
|
logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
|
|
2956
|
-
componentStateTypes: [
|
|
2960
|
+
componentStateTypes: [Ar],
|
|
2957
2961
|
app: e
|
|
2958
2962
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2959
2963
|
}, (s) => {
|
|
2960
|
-
|
|
2961
|
-
|
|
2964
|
+
Ht = s, s.on.visitComponentTree(({ componentInstance: o, treeNode: i }) => {
|
|
2965
|
+
_o(o, i, t);
|
|
2962
2966
|
}), s.on.inspectComponent(({ componentInstance: o, instanceData: i }) => {
|
|
2963
|
-
o.__VUE_I18N__ && i && (t.mode === "legacy" ? o.__VUE_I18N__ !== t.global.__composer &&
|
|
2967
|
+
o.__VUE_I18N__ && i && (t.mode === "legacy" ? o.__VUE_I18N__ !== t.global.__composer && $n(i, o.__VUE_I18N__) : $n(i, o.__VUE_I18N__));
|
|
2964
2968
|
}), s.addInspector({
|
|
2965
2969
|
id: "vue-i18n-resource-inspector",
|
|
2966
|
-
label:
|
|
2970
|
+
label: kt["vue-i18n-resource-inspector"],
|
|
2967
2971
|
icon: "language",
|
|
2968
|
-
treeFilterPlaceholder:
|
|
2972
|
+
treeFilterPlaceholder: co["vue-i18n-resource-inspector"]
|
|
2969
2973
|
}), s.on.getInspectorTree((o) => {
|
|
2970
|
-
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" &&
|
|
2974
|
+
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && No(o, t);
|
|
2971
2975
|
});
|
|
2972
2976
|
const a = /* @__PURE__ */ new Map();
|
|
2973
2977
|
s.on.getInspectorState(async (o) => {
|
|
2974
2978
|
if (o.app === e && o.inspectorId === "vue-i18n-resource-inspector")
|
|
2975
|
-
if (s.unhighlightElement(),
|
|
2979
|
+
if (s.unhighlightElement(), bo(o, t), o.nodeId === "global") {
|
|
2976
2980
|
if (!a.has(o.app)) {
|
|
2977
2981
|
const [i] = await s.getComponentInstances(o.app);
|
|
2978
2982
|
a.set(o.app, i);
|
|
2979
2983
|
}
|
|
2980
2984
|
s.highlightElement(a.get(o.app));
|
|
2981
2985
|
} else {
|
|
2982
|
-
const i =
|
|
2986
|
+
const i = To(o.nodeId, t);
|
|
2983
2987
|
i && s.highlightElement(i);
|
|
2984
2988
|
}
|
|
2985
2989
|
}), s.on.editInspectorState((o) => {
|
|
2986
|
-
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" &&
|
|
2990
|
+
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && Io(o, t);
|
|
2987
2991
|
}), s.addTimelineLayer({
|
|
2988
2992
|
id: "vue-i18n-timeline",
|
|
2989
|
-
label:
|
|
2990
|
-
color:
|
|
2993
|
+
label: kt["vue-i18n-timeline"],
|
|
2994
|
+
color: uo["vue-i18n-timeline"]
|
|
2991
2995
|
}), n(!0);
|
|
2992
2996
|
});
|
|
2993
2997
|
} catch (s) {
|
|
@@ -2995,22 +2999,22 @@ async function ro(e, t) {
|
|
|
2995
2999
|
}
|
|
2996
3000
|
});
|
|
2997
3001
|
}
|
|
2998
|
-
function
|
|
3002
|
+
function Sr(e) {
|
|
2999
3003
|
return e.type.name || e.type.displayName || e.type.__file || "Anonymous";
|
|
3000
3004
|
}
|
|
3001
|
-
function
|
|
3005
|
+
function _o(e, t, n) {
|
|
3002
3006
|
const r = n.mode === "composition" ? n.global : n.global.__composer;
|
|
3003
3007
|
if (e && e.__VUE_I18N__ && e.__VUE_I18N__ !== r) {
|
|
3004
3008
|
const s = {
|
|
3005
|
-
label: `i18n (${
|
|
3009
|
+
label: `i18n (${Sr(e)} Scope)`,
|
|
3006
3010
|
textColor: 0,
|
|
3007
3011
|
backgroundColor: 16764185
|
|
3008
3012
|
};
|
|
3009
3013
|
t.tags.push(s);
|
|
3010
3014
|
}
|
|
3011
3015
|
}
|
|
3012
|
-
function
|
|
3013
|
-
const n =
|
|
3016
|
+
function $n(e, t) {
|
|
3017
|
+
const n = Ar;
|
|
3014
3018
|
e.state.push({
|
|
3015
3019
|
type: n,
|
|
3016
3020
|
key: "locale",
|
|
@@ -3035,7 +3039,7 @@ function Vn(e, t) {
|
|
|
3035
3039
|
type: n,
|
|
3036
3040
|
key: "messages",
|
|
3037
3041
|
editable: !1,
|
|
3038
|
-
value:
|
|
3042
|
+
value: an(t.messages.value)
|
|
3039
3043
|
}), e.state.push({
|
|
3040
3044
|
type: n,
|
|
3041
3045
|
key: "datetimeFormats",
|
|
@@ -3048,34 +3052,34 @@ function Vn(e, t) {
|
|
|
3048
3052
|
value: t.numberFormats.value
|
|
3049
3053
|
});
|
|
3050
3054
|
}
|
|
3051
|
-
function
|
|
3055
|
+
function an(e) {
|
|
3052
3056
|
const t = {};
|
|
3053
3057
|
return Object.keys(e).forEach((n) => {
|
|
3054
3058
|
const r = e[n];
|
|
3055
|
-
W(r) && "source" in r ? t[n] =
|
|
3059
|
+
W(r) && "source" in r ? t[n] = go(r) : se(r) && r.loc && r.loc.source ? t[n] = r.loc.source : M(r) ? t[n] = an(r) : t[n] = r;
|
|
3056
3060
|
}), t;
|
|
3057
3061
|
}
|
|
3058
|
-
const
|
|
3062
|
+
const mo = {
|
|
3059
3063
|
"<": "<",
|
|
3060
3064
|
">": ">",
|
|
3061
3065
|
'"': """,
|
|
3062
3066
|
"&": "&"
|
|
3063
3067
|
};
|
|
3064
|
-
function
|
|
3065
|
-
return e.replace(/[<>"&]/g,
|
|
3068
|
+
function Eo(e) {
|
|
3069
|
+
return e.replace(/[<>"&]/g, po);
|
|
3066
3070
|
}
|
|
3067
|
-
function
|
|
3068
|
-
return
|
|
3071
|
+
function po(e) {
|
|
3072
|
+
return mo[e] || e;
|
|
3069
3073
|
}
|
|
3070
|
-
function
|
|
3074
|
+
function go(e) {
|
|
3071
3075
|
return {
|
|
3072
3076
|
_custom: {
|
|
3073
3077
|
type: "function",
|
|
3074
|
-
display: `<span>ƒ</span> ${e.source ? `("${
|
|
3078
|
+
display: `<span>ƒ</span> ${e.source ? `("${Eo(e.source)}")` : "(?)"}`
|
|
3075
3079
|
}
|
|
3076
3080
|
};
|
|
3077
3081
|
}
|
|
3078
|
-
function
|
|
3082
|
+
function No(e, t) {
|
|
3079
3083
|
e.rootNodes.push({
|
|
3080
3084
|
id: "global",
|
|
3081
3085
|
label: "Global Scope"
|
|
@@ -3085,11 +3089,11 @@ function co(e, t) {
|
|
|
3085
3089
|
const a = t.mode === "composition" ? s : s.__composer;
|
|
3086
3090
|
n !== a && e.rootNodes.push({
|
|
3087
3091
|
id: a.id.toString(),
|
|
3088
|
-
label: `${
|
|
3092
|
+
label: `${Sr(r)} Scope`
|
|
3089
3093
|
});
|
|
3090
3094
|
}
|
|
3091
3095
|
}
|
|
3092
|
-
function
|
|
3096
|
+
function To(e, t) {
|
|
3093
3097
|
let n = null;
|
|
3094
3098
|
if (e !== "global") {
|
|
3095
3099
|
for (const [r, s] of t.__instances.entries())
|
|
@@ -3100,7 +3104,7 @@ function uo(e, t) {
|
|
|
3100
3104
|
}
|
|
3101
3105
|
return n;
|
|
3102
3106
|
}
|
|
3103
|
-
function
|
|
3107
|
+
function yr(e, t) {
|
|
3104
3108
|
if (e === "global")
|
|
3105
3109
|
return t.mode === "composition" ? t.global : t.global.__composer;
|
|
3106
3110
|
{
|
|
@@ -3108,11 +3112,11 @@ function Ar(e, t) {
|
|
|
3108
3112
|
return n ? t.mode === "composition" ? n : n.__composer : null;
|
|
3109
3113
|
}
|
|
3110
3114
|
}
|
|
3111
|
-
function
|
|
3112
|
-
const n =
|
|
3113
|
-
return n && (e.state =
|
|
3115
|
+
function bo(e, t) {
|
|
3116
|
+
const n = yr(e.nodeId, t);
|
|
3117
|
+
return n && (e.state = ho(n)), null;
|
|
3114
3118
|
}
|
|
3115
|
-
function
|
|
3119
|
+
function ho(e) {
|
|
3116
3120
|
const t = {}, n = "Locale related info", r = [
|
|
3117
3121
|
{
|
|
3118
3122
|
type: n,
|
|
@@ -3145,7 +3149,7 @@ function _o(e) {
|
|
|
3145
3149
|
type: s,
|
|
3146
3150
|
key: "messages",
|
|
3147
3151
|
editable: !1,
|
|
3148
|
-
value:
|
|
3152
|
+
value: an(e.messages.value)
|
|
3149
3153
|
}
|
|
3150
3154
|
];
|
|
3151
3155
|
t[s] = a;
|
|
@@ -3159,7 +3163,7 @@ function _o(e) {
|
|
|
3159
3163
|
}
|
|
3160
3164
|
];
|
|
3161
3165
|
t[o] = i;
|
|
3162
|
-
const u = "Datetime formats info",
|
|
3166
|
+
const u = "Datetime formats info", d = [
|
|
3163
3167
|
{
|
|
3164
3168
|
type: u,
|
|
3165
3169
|
key: "numberFormats",
|
|
@@ -3167,14 +3171,14 @@ function _o(e) {
|
|
|
3167
3171
|
value: e.numberFormats.value
|
|
3168
3172
|
}
|
|
3169
3173
|
];
|
|
3170
|
-
t[u] =
|
|
3174
|
+
t[u] = d;
|
|
3171
3175
|
}
|
|
3172
3176
|
return t;
|
|
3173
3177
|
}
|
|
3174
3178
|
function Qe(e, t) {
|
|
3175
|
-
if (
|
|
3179
|
+
if (Ht) {
|
|
3176
3180
|
let n;
|
|
3177
|
-
t && "groupId" in t && (n = t.groupId, delete t.groupId),
|
|
3181
|
+
t && "groupId" in t && (n = t.groupId, delete t.groupId), Ht.addTimelineEvent({
|
|
3178
3182
|
layerId: "vue-i18n-timeline",
|
|
3179
3183
|
event: {
|
|
3180
3184
|
title: e,
|
|
@@ -3187,15 +3191,15 @@ function Qe(e, t) {
|
|
|
3187
3191
|
});
|
|
3188
3192
|
}
|
|
3189
3193
|
}
|
|
3190
|
-
function
|
|
3191
|
-
const n =
|
|
3194
|
+
function Io(e, t) {
|
|
3195
|
+
const n = yr(e.nodeId, t);
|
|
3192
3196
|
if (n) {
|
|
3193
3197
|
const [r] = e.path;
|
|
3194
3198
|
r === "locale" && L(e.state.value) ? n.locale.value = e.state.value : r === "fallbackLocale" && (L(e.state.value) || H(e.state.value) || M(e.state.value)) ? n.fallbackLocale.value = e.state.value : r === "inheritLocale" && F(e.state.value) && (n.inheritLocale = e.state.value);
|
|
3195
3199
|
}
|
|
3196
3200
|
}
|
|
3197
|
-
function
|
|
3198
|
-
const t = L(e.locale) ? e.locale : je, n = L(e.fallbackLocale) || H(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, r = W(e.missing) ? e.missing : void 0, s = F(e.silentTranslationWarn) ||
|
|
3201
|
+
function Lo(e) {
|
|
3202
|
+
const t = L(e.locale) ? e.locale : je, n = L(e.fallbackLocale) || H(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, r = W(e.missing) ? e.missing : void 0, s = F(e.silentTranslationWarn) || Fe(e.silentTranslationWarn) ? !e.silentTranslationWarn : !0, a = F(e.silentFallbackWarn) || Fe(e.silentFallbackWarn) ? !e.silentFallbackWarn : !0, o = F(e.fallbackRoot) ? e.fallbackRoot : !0, i = !!e.formatFallbackMessages, u = R(e.modifiers) ? e.modifiers : {}, d = e.pluralizationRules, I = W(e.postTranslation) ? e.postTranslation : void 0, b = L(e.warnHtmlInMessage) ? e.warnHtmlInMessage !== "off" : !0, N = !!e.escapeParameterHtml, A = F(e.sync) ? e.sync : !0;
|
|
3199
3203
|
let D = e.messages;
|
|
3200
3204
|
if (R(e.sharedMessages)) {
|
|
3201
3205
|
const O = e.sharedMessages;
|
|
@@ -3204,12 +3208,12 @@ function Eo(e) {
|
|
|
3204
3208
|
return J(w, O[k]), p;
|
|
3205
3209
|
}, D || {});
|
|
3206
3210
|
}
|
|
3207
|
-
const { __i18n: C, __root: S, __injectWithOption: f } = e, m = e.datetimeFormats, h = e.numberFormats,
|
|
3211
|
+
const { __i18n: C, __root: S, __injectWithOption: f } = e, m = e.datetimeFormats, h = e.numberFormats, E = e.flatJson;
|
|
3208
3212
|
return {
|
|
3209
3213
|
locale: t,
|
|
3210
3214
|
fallbackLocale: n,
|
|
3211
3215
|
messages: D,
|
|
3212
|
-
flatJson:
|
|
3216
|
+
flatJson: E,
|
|
3213
3217
|
datetimeFormats: m,
|
|
3214
3218
|
numberFormats: h,
|
|
3215
3219
|
missing: r,
|
|
@@ -3218,7 +3222,7 @@ function Eo(e) {
|
|
|
3218
3222
|
fallbackRoot: o,
|
|
3219
3223
|
fallbackFormat: i,
|
|
3220
3224
|
modifiers: u,
|
|
3221
|
-
pluralRules:
|
|
3225
|
+
pluralRules: d,
|
|
3222
3226
|
postTranslation: I,
|
|
3223
3227
|
warnHtmlMessage: b,
|
|
3224
3228
|
escapeParameter: N,
|
|
@@ -3229,8 +3233,8 @@ function Eo(e) {
|
|
|
3229
3233
|
__injectWithOption: f
|
|
3230
3234
|
};
|
|
3231
3235
|
}
|
|
3232
|
-
function
|
|
3233
|
-
const t =
|
|
3236
|
+
function Yt(e = {}) {
|
|
3237
|
+
const t = sn(Lo(e)), { __extender: n } = e, r = {
|
|
3234
3238
|
// id
|
|
3235
3239
|
id: t.id,
|
|
3236
3240
|
// locale
|
|
@@ -3392,33 +3396,33 @@ function Ht(e = {}) {
|
|
|
3392
3396
|
};
|
|
3393
3397
|
return r.__extender = n, process.env.NODE_ENV !== "production" && (r.__enableEmitter = (s) => {
|
|
3394
3398
|
const a = t;
|
|
3395
|
-
a[
|
|
3399
|
+
a[ye] && a[ye](s);
|
|
3396
3400
|
}, r.__disableEmitter = () => {
|
|
3397
3401
|
const s = t;
|
|
3398
3402
|
s[Xe] && s[Xe]();
|
|
3399
3403
|
}), r;
|
|
3400
3404
|
}
|
|
3401
|
-
function
|
|
3405
|
+
function Oo(e, t, n) {
|
|
3402
3406
|
return {
|
|
3403
3407
|
beforeCreate() {
|
|
3404
|
-
const r =
|
|
3408
|
+
const r = Me();
|
|
3405
3409
|
if (!r)
|
|
3406
3410
|
throw z(G.UNEXPECTED_ERROR);
|
|
3407
3411
|
const s = this.$options;
|
|
3408
3412
|
if (s.i18n) {
|
|
3409
3413
|
const a = s.i18n;
|
|
3410
3414
|
if (s.__i18n && (a.__i18n = s.__i18n), a.__root = t, this === this.$root)
|
|
3411
|
-
this.$i18n =
|
|
3415
|
+
this.$i18n = Wn(e, a);
|
|
3412
3416
|
else {
|
|
3413
|
-
a.__injectWithOption = !0, a.__extender = n.__vueI18nExtend, this.$i18n =
|
|
3417
|
+
a.__injectWithOption = !0, a.__extender = n.__vueI18nExtend, this.$i18n = Yt(a);
|
|
3414
3418
|
const o = this.$i18n;
|
|
3415
3419
|
o.__extender && (o.__disposer = o.__extender(this.$i18n));
|
|
3416
3420
|
}
|
|
3417
3421
|
} else if (s.__i18n)
|
|
3418
3422
|
if (this === this.$root)
|
|
3419
|
-
this.$i18n =
|
|
3423
|
+
this.$i18n = Wn(e, s);
|
|
3420
3424
|
else {
|
|
3421
|
-
this.$i18n =
|
|
3425
|
+
this.$i18n = Yt({
|
|
3422
3426
|
__i18n: s.__i18n,
|
|
3423
3427
|
__injectWithOption: !0,
|
|
3424
3428
|
__extender: n.__vueI18nExtend,
|
|
@@ -3429,21 +3433,21 @@ function po(e, t, n) {
|
|
|
3429
3433
|
}
|
|
3430
3434
|
else
|
|
3431
3435
|
this.$i18n = e;
|
|
3432
|
-
s.__i18nGlobal &&
|
|
3436
|
+
s.__i18nGlobal && Cr(t, s, s), this.$t = (...a) => this.$i18n.t(...a), this.$rt = (...a) => this.$i18n.rt(...a), this.$te = (a, o) => this.$i18n.te(a, o), this.$d = (...a) => this.$i18n.d(...a), this.$n = (...a) => this.$i18n.n(...a), this.$tm = (a) => this.$i18n.tm(a), n.__setInstance(r, this.$i18n);
|
|
3433
3437
|
},
|
|
3434
3438
|
mounted() {
|
|
3435
3439
|
if (process.env.NODE_ENV !== "production" && this.$i18n) {
|
|
3436
|
-
const r =
|
|
3440
|
+
const r = Me();
|
|
3437
3441
|
if (!r)
|
|
3438
3442
|
return;
|
|
3439
3443
|
const s = this.$i18n;
|
|
3440
3444
|
r.__VUE_I18N__ = s.__composer;
|
|
3441
|
-
const a = this.__v_emitter =
|
|
3445
|
+
const a = this.__v_emitter = Zt();
|
|
3442
3446
|
s.__enableEmitter && s.__enableEmitter(a), a.on("*", Qe);
|
|
3443
3447
|
}
|
|
3444
3448
|
},
|
|
3445
3449
|
unmounted() {
|
|
3446
|
-
const r =
|
|
3450
|
+
const r = Me();
|
|
3447
3451
|
if (!r)
|
|
3448
3452
|
throw z(G.UNEXPECTED_ERROR);
|
|
3449
3453
|
const s = this.$i18n;
|
|
@@ -3451,15 +3455,15 @@ function po(e, t, n) {
|
|
|
3451
3455
|
}
|
|
3452
3456
|
};
|
|
3453
3457
|
}
|
|
3454
|
-
function
|
|
3455
|
-
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[
|
|
3456
|
-
const n =
|
|
3458
|
+
function Wn(e, t) {
|
|
3459
|
+
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[Lr](t.pluralizationRules || e.pluralizationRules);
|
|
3460
|
+
const n = rn(e.locale, {
|
|
3457
3461
|
messages: t.messages,
|
|
3458
3462
|
__i18n: t.__i18n
|
|
3459
3463
|
});
|
|
3460
3464
|
return Object.keys(n).forEach((r) => e.mergeLocaleMessage(r, n[r])), t.datetimeFormats && Object.keys(t.datetimeFormats).forEach((r) => e.mergeDateTimeFormat(r, t.datetimeFormats[r])), t.numberFormats && Object.keys(t.numberFormats).forEach((r) => e.mergeNumberFormat(r, t.numberFormats[r])), e;
|
|
3461
3465
|
}
|
|
3462
|
-
const
|
|
3466
|
+
const on = {
|
|
3463
3467
|
tag: {
|
|
3464
3468
|
type: [String, Object]
|
|
3465
3469
|
},
|
|
@@ -3477,20 +3481,20 @@ const an = {
|
|
|
3477
3481
|
type: Object
|
|
3478
3482
|
}
|
|
3479
3483
|
};
|
|
3480
|
-
function
|
|
3484
|
+
function vo({ slots: e }, t) {
|
|
3481
3485
|
return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((r, s) => [
|
|
3482
3486
|
...r,
|
|
3483
3487
|
// prettier-ignore
|
|
3484
|
-
...s.type ===
|
|
3488
|
+
...s.type === at ? s.children : [s]
|
|
3485
3489
|
], []) : t.reduce((n, r) => {
|
|
3486
3490
|
const s = e[r];
|
|
3487
3491
|
return s && (n[r] = s()), n;
|
|
3488
3492
|
}, $());
|
|
3489
3493
|
}
|
|
3490
|
-
function
|
|
3491
|
-
return
|
|
3494
|
+
function Pr() {
|
|
3495
|
+
return at;
|
|
3492
3496
|
}
|
|
3493
|
-
const
|
|
3497
|
+
const Co = /* @__PURE__ */ ge({
|
|
3494
3498
|
/* eslint-disable */
|
|
3495
3499
|
name: "i18n-t",
|
|
3496
3500
|
props: J({
|
|
@@ -3502,42 +3506,42 @@ const No = /* @__PURE__ */ pe({
|
|
|
3502
3506
|
type: [Number, String],
|
|
3503
3507
|
validator: (e) => j(e) || !isNaN(e)
|
|
3504
3508
|
}
|
|
3505
|
-
},
|
|
3509
|
+
}, on),
|
|
3506
3510
|
/* eslint-enable */
|
|
3507
3511
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3508
3512
|
setup(e, t) {
|
|
3509
|
-
const { slots: n, attrs: r } = t, s = e.i18n ||
|
|
3513
|
+
const { slots: n, attrs: r } = t, s = e.i18n || ln({
|
|
3510
3514
|
useScope: e.scope,
|
|
3511
3515
|
__useComponent: !0
|
|
3512
3516
|
});
|
|
3513
3517
|
return () => {
|
|
3514
3518
|
const a = Object.keys(n).filter((b) => b[0] !== "_"), o = $();
|
|
3515
3519
|
e.locale && (o.locale = e.locale), e.plural !== void 0 && (o.plural = L(e.plural) ? +e.plural : e.plural);
|
|
3516
|
-
const i =
|
|
3517
|
-
return
|
|
3520
|
+
const i = vo(t, a), u = s[$t](e.keypath, i, o), d = J($(), r), I = L(e.tag) || M(e.tag) ? e.tag : Pr();
|
|
3521
|
+
return Zn(I, d, u);
|
|
3518
3522
|
};
|
|
3519
3523
|
}
|
|
3520
|
-
}),
|
|
3521
|
-
function
|
|
3524
|
+
}), Gn = Co;
|
|
3525
|
+
function Ao(e) {
|
|
3522
3526
|
return H(e) && !L(e[0]);
|
|
3523
3527
|
}
|
|
3524
|
-
function
|
|
3528
|
+
function Dr(e, t, n, r) {
|
|
3525
3529
|
const { slots: s, attrs: a } = t;
|
|
3526
3530
|
return () => {
|
|
3527
3531
|
const o = { part: !0 };
|
|
3528
3532
|
let i = $();
|
|
3529
3533
|
e.locale && (o.locale = e.locale), L(e.format) ? o.key = e.format : M(e.format) && (L(e.format.key) && (o.key = e.format.key), i = Object.keys(e.format).reduce((N, A) => n.includes(A) ? J($(), N, { [A]: e.format[A] }) : N, $()));
|
|
3530
3534
|
const u = r(e.value, o, i);
|
|
3531
|
-
let
|
|
3532
|
-
H(u) ?
|
|
3535
|
+
let d = [o.key];
|
|
3536
|
+
H(u) ? d = u.map((N, A) => {
|
|
3533
3537
|
const D = s[N.type], C = D ? D({ [N.type]: N.value, index: A, parts: u }) : [N.value];
|
|
3534
|
-
return
|
|
3535
|
-
}) : L(u) && (
|
|
3536
|
-
const I = J($(), a), b = L(e.tag) || M(e.tag) ? e.tag :
|
|
3537
|
-
return
|
|
3538
|
+
return Ao(C) && (C[0].key = `${N.type}-${A}`), C;
|
|
3539
|
+
}) : L(u) && (d = [u]);
|
|
3540
|
+
const I = J($(), a), b = L(e.tag) || M(e.tag) ? e.tag : Pr();
|
|
3541
|
+
return Zn(b, I, d);
|
|
3538
3542
|
};
|
|
3539
3543
|
}
|
|
3540
|
-
const
|
|
3544
|
+
const So = /* @__PURE__ */ ge({
|
|
3541
3545
|
/* eslint-disable */
|
|
3542
3546
|
name: "i18n-n",
|
|
3543
3547
|
props: J({
|
|
@@ -3548,21 +3552,21 @@ const bo = /* @__PURE__ */ pe({
|
|
|
3548
3552
|
format: {
|
|
3549
3553
|
type: [String, Object]
|
|
3550
3554
|
}
|
|
3551
|
-
},
|
|
3555
|
+
}, on),
|
|
3552
3556
|
/* eslint-enable */
|
|
3553
3557
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3554
3558
|
setup(e, t) {
|
|
3555
|
-
const n = e.i18n ||
|
|
3559
|
+
const n = e.i18n || ln({
|
|
3556
3560
|
useScope: e.scope,
|
|
3557
3561
|
__useComponent: !0
|
|
3558
3562
|
});
|
|
3559
|
-
return
|
|
3563
|
+
return Dr(e, t, Tr, (...r) => (
|
|
3560
3564
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3561
|
-
n[
|
|
3565
|
+
n[Gt](...r)
|
|
3562
3566
|
));
|
|
3563
3567
|
}
|
|
3564
|
-
}),
|
|
3565
|
-
function
|
|
3568
|
+
}), xn = So;
|
|
3569
|
+
function yo(e, t) {
|
|
3566
3570
|
const n = e;
|
|
3567
3571
|
if (e.mode === "composition")
|
|
3568
3572
|
return n.__getInstance(t) || e.global;
|
|
@@ -3571,33 +3575,33 @@ function ho(e, t) {
|
|
|
3571
3575
|
return r != null ? r.__composer : e.global.__composer;
|
|
3572
3576
|
}
|
|
3573
3577
|
}
|
|
3574
|
-
function
|
|
3578
|
+
function Po(e) {
|
|
3575
3579
|
const t = (o) => {
|
|
3576
|
-
process.env.NODE_ENV !== "production" &&
|
|
3580
|
+
process.env.NODE_ENV !== "production" && Jt(we(ne.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));
|
|
3577
3581
|
const { instance: i, value: u } = o;
|
|
3578
3582
|
if (!i || !i.$)
|
|
3579
3583
|
throw z(G.UNEXPECTED_ERROR);
|
|
3580
|
-
const
|
|
3584
|
+
const d = yo(e, i.$), I = Hn(u);
|
|
3581
3585
|
return [
|
|
3582
|
-
Reflect.apply(
|
|
3583
|
-
|
|
3586
|
+
Reflect.apply(d.t, d, [...Yn(I)]),
|
|
3587
|
+
d
|
|
3584
3588
|
];
|
|
3585
3589
|
};
|
|
3586
3590
|
return {
|
|
3587
3591
|
created: (o, i) => {
|
|
3588
|
-
const [u,
|
|
3589
|
-
le && e.global ===
|
|
3592
|
+
const [u, d] = t(i);
|
|
3593
|
+
le && e.global === d && (o.__i18nWatcher = Ce(d.locale, () => {
|
|
3590
3594
|
i.instance && i.instance.$forceUpdate();
|
|
3591
|
-
})), o.__composer =
|
|
3595
|
+
})), o.__composer = d, o.textContent = u;
|
|
3592
3596
|
},
|
|
3593
3597
|
unmounted: (o) => {
|
|
3594
3598
|
le && o.__i18nWatcher && (o.__i18nWatcher(), o.__i18nWatcher = void 0, delete o.__i18nWatcher), o.__composer && (o.__composer = void 0, delete o.__composer);
|
|
3595
3599
|
},
|
|
3596
3600
|
beforeUpdate: (o, { value: i }) => {
|
|
3597
3601
|
if (o.__composer) {
|
|
3598
|
-
const u = o.__composer,
|
|
3602
|
+
const u = o.__composer, d = Hn(i);
|
|
3599
3603
|
o.textContent = Reflect.apply(u.t, u, [
|
|
3600
|
-
...
|
|
3604
|
+
...Yn(d)
|
|
3601
3605
|
]);
|
|
3602
3606
|
}
|
|
3603
3607
|
},
|
|
@@ -3607,7 +3611,7 @@ function Io(e) {
|
|
|
3607
3611
|
}
|
|
3608
3612
|
};
|
|
3609
3613
|
}
|
|
3610
|
-
function
|
|
3614
|
+
function Hn(e) {
|
|
3611
3615
|
if (L(e))
|
|
3612
3616
|
return { path: e };
|
|
3613
3617
|
if (R(e)) {
|
|
@@ -3617,26 +3621,26 @@ function xn(e) {
|
|
|
3617
3621
|
} else
|
|
3618
3622
|
throw z(G.INVALID_VALUE);
|
|
3619
3623
|
}
|
|
3620
|
-
function
|
|
3624
|
+
function Yn(e) {
|
|
3621
3625
|
const { path: t, locale: n, args: r, choice: s, plural: a } = e, o = {}, i = r || {};
|
|
3622
3626
|
return L(n) && (o.locale = n), j(s) && (o.plural = s), j(a) && (o.plural = a), [t, i, o];
|
|
3623
3627
|
}
|
|
3624
|
-
function
|
|
3628
|
+
function Do(e, t, ...n) {
|
|
3625
3629
|
const r = R(n[0]) ? n[0] : {};
|
|
3626
|
-
(!F(r.globalInstall) || r.globalInstall) && ([
|
|
3630
|
+
(!F(r.globalInstall) || r.globalInstall) && ([Gn.name, "I18nT"].forEach((a) => e.component(a, Gn)), [xn.name, "I18nN"].forEach((a) => e.component(a, xn)), [Kn.name, "I18nD"].forEach((a) => e.component(a, Kn))), e.directive("t", Po(t));
|
|
3627
3631
|
}
|
|
3628
|
-
const
|
|
3629
|
-
function
|
|
3632
|
+
const ko = /* @__PURE__ */ fe("global-vue-i18n");
|
|
3633
|
+
function Ro(e = {}) {
|
|
3630
3634
|
const t = __VUE_I18N_LEGACY_API__ && F(e.legacy) ? e.legacy : __VUE_I18N_LEGACY_API__;
|
|
3631
|
-
process.env.NODE_ENV !== "production" && t &&
|
|
3632
|
-
const n = F(e.globalInjection) ? e.globalInjection : !0, r = /* @__PURE__ */ new Map(), [s, a] =
|
|
3635
|
+
process.env.NODE_ENV !== "production" && t && Jt(we(ne.DEPRECATE_LEGACY_MODE));
|
|
3636
|
+
const n = F(e.globalInjection) ? e.globalInjection : !0, r = /* @__PURE__ */ new Map(), [s, a] = Mo(e, t), o = /* @__PURE__ */ fe(process.env.NODE_ENV !== "production" ? "vue-i18n" : "");
|
|
3633
3637
|
function i(b) {
|
|
3634
3638
|
return r.get(b) || null;
|
|
3635
3639
|
}
|
|
3636
3640
|
function u(b, N) {
|
|
3637
3641
|
r.set(b, N);
|
|
3638
3642
|
}
|
|
3639
|
-
function
|
|
3643
|
+
function d(b) {
|
|
3640
3644
|
r.delete(b);
|
|
3641
3645
|
}
|
|
3642
3646
|
const I = {
|
|
@@ -3651,20 +3655,20 @@ function vo(e = {}) {
|
|
|
3651
3655
|
I.__composerExtend = C.__composerExtend, I.__vueI18nExtend = C.__vueI18nExtend;
|
|
3652
3656
|
}
|
|
3653
3657
|
let A = null;
|
|
3654
|
-
!t && n && (A =
|
|
3658
|
+
!t && n && (A = xo(b, I.global)), __VUE_I18N_FULL_INSTALL__ && Do(b, I, ...N), __VUE_I18N_LEGACY_API__ && t && b.mixin(Oo(a, a.__composer, I));
|
|
3655
3659
|
const D = b.unmount;
|
|
3656
3660
|
if (b.unmount = () => {
|
|
3657
3661
|
A && A(), I.dispose(), D();
|
|
3658
3662
|
}, process.env.NODE_ENV !== "production") {
|
|
3659
|
-
if (!await
|
|
3663
|
+
if (!await fo(b, I))
|
|
3660
3664
|
throw z(G.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
|
|
3661
|
-
const S =
|
|
3665
|
+
const S = Zt();
|
|
3662
3666
|
if (t) {
|
|
3663
3667
|
const f = a;
|
|
3664
3668
|
f.__enableEmitter && f.__enableEmitter(S);
|
|
3665
3669
|
} else {
|
|
3666
3670
|
const f = a;
|
|
3667
|
-
f[
|
|
3671
|
+
f[ye] && f[ye](S);
|
|
3668
3672
|
}
|
|
3669
3673
|
S.on("*", Qe);
|
|
3670
3674
|
}
|
|
@@ -3683,61 +3687,61 @@ function vo(e = {}) {
|
|
|
3683
3687
|
// @internal
|
|
3684
3688
|
__setInstance: u,
|
|
3685
3689
|
// @internal
|
|
3686
|
-
__deleteInstance:
|
|
3690
|
+
__deleteInstance: d
|
|
3687
3691
|
};
|
|
3688
3692
|
return I;
|
|
3689
3693
|
}
|
|
3690
|
-
function
|
|
3691
|
-
const t =
|
|
3694
|
+
function ln(e = {}) {
|
|
3695
|
+
const t = Me();
|
|
3692
3696
|
if (t == null)
|
|
3693
3697
|
throw z(G.MUST_BE_CALL_SETUP_TOP);
|
|
3694
3698
|
if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
|
|
3695
3699
|
throw z(G.NOT_INSTALLED);
|
|
3696
|
-
const n =
|
|
3700
|
+
const n = Fo(t), r = wo(n), s = vr(t), a = Uo(e, s);
|
|
3697
3701
|
if (a === "global")
|
|
3698
|
-
return
|
|
3702
|
+
return Cr(r, e, s), r;
|
|
3699
3703
|
if (a === "parent") {
|
|
3700
|
-
let u =
|
|
3701
|
-
return u == null && (process.env.NODE_ENV !== "production" && ue(
|
|
3704
|
+
let u = Vo(n, t, e.__useComponent);
|
|
3705
|
+
return u == null && (process.env.NODE_ENV !== "production" && ue(we(ne.NOT_FOUND_PARENT_SCOPE)), u = r), u;
|
|
3702
3706
|
}
|
|
3703
3707
|
const o = n;
|
|
3704
3708
|
let i = o.__getInstance(t);
|
|
3705
3709
|
if (i == null) {
|
|
3706
3710
|
const u = J({}, e);
|
|
3707
|
-
"__i18n" in s && (u.__i18n = s.__i18n), r && (u.__root = r), i =
|
|
3711
|
+
"__i18n" in s && (u.__i18n = s.__i18n), r && (u.__root = r), i = sn(u), o.__composerExtend && (i[xt] = o.__composerExtend(i)), Wo(o, t, i), o.__setInstance(t, i);
|
|
3708
3712
|
} else
|
|
3709
|
-
process.env.NODE_ENV !== "production" && a === "local" && ue(
|
|
3713
|
+
process.env.NODE_ENV !== "production" && a === "local" && ue(we(ne.DUPLICATE_USE_I18N_CALLING));
|
|
3710
3714
|
return i;
|
|
3711
3715
|
}
|
|
3712
|
-
function
|
|
3713
|
-
const n =
|
|
3716
|
+
function Mo(e, t) {
|
|
3717
|
+
const n = wr(), r = __VUE_I18N_LEGACY_API__ && t ? n.run(() => Yt(e)) : n.run(() => sn(e));
|
|
3714
3718
|
if (r == null)
|
|
3715
3719
|
throw z(G.UNEXPECTED_ERROR);
|
|
3716
3720
|
return [n, r];
|
|
3717
3721
|
}
|
|
3718
|
-
function
|
|
3719
|
-
const t =
|
|
3722
|
+
function Fo(e) {
|
|
3723
|
+
const t = Xn(e.isCE ? ko : e.appContext.app.__VUE_I18N_SYMBOL__);
|
|
3720
3724
|
if (!t)
|
|
3721
3725
|
throw z(e.isCE ? G.NOT_INSTALLED_WITH_PROVIDE : G.UNEXPECTED_ERROR);
|
|
3722
3726
|
return t;
|
|
3723
3727
|
}
|
|
3724
|
-
function
|
|
3725
|
-
return
|
|
3728
|
+
function Uo(e, t) {
|
|
3729
|
+
return ut(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
|
|
3726
3730
|
}
|
|
3727
|
-
function
|
|
3731
|
+
function wo(e) {
|
|
3728
3732
|
return e.mode === "composition" ? e.global : e.global.__composer;
|
|
3729
3733
|
}
|
|
3730
|
-
function
|
|
3734
|
+
function Vo(e, t, n = !1) {
|
|
3731
3735
|
let r = null;
|
|
3732
3736
|
const s = t.root;
|
|
3733
|
-
let a =
|
|
3737
|
+
let a = $o(t, n);
|
|
3734
3738
|
for (; a != null; ) {
|
|
3735
3739
|
const o = e;
|
|
3736
3740
|
if (e.mode === "composition")
|
|
3737
3741
|
r = o.__getInstance(a);
|
|
3738
3742
|
else if (__VUE_I18N_LEGACY_API__) {
|
|
3739
3743
|
const i = o.__getInstance(a);
|
|
3740
|
-
i != null && (r = i.__composer, n && r && !r[
|
|
3744
|
+
i != null && (r = i.__composer, n && r && !r[Or] && (r = null));
|
|
3741
3745
|
}
|
|
3742
3746
|
if (r != null || s === a)
|
|
3743
3747
|
break;
|
|
@@ -3745,36 +3749,36 @@ function Po(e, t, n = !1) {
|
|
|
3745
3749
|
}
|
|
3746
3750
|
return r;
|
|
3747
3751
|
}
|
|
3748
|
-
function
|
|
3752
|
+
function $o(e, t = !1) {
|
|
3749
3753
|
return e == null ? null : t && e.vnode.ctx || e.parent;
|
|
3750
3754
|
}
|
|
3751
|
-
function
|
|
3755
|
+
function Wo(e, t, n) {
|
|
3752
3756
|
let r = null;
|
|
3753
|
-
|
|
3757
|
+
Wr(() => {
|
|
3754
3758
|
if (process.env.NODE_ENV !== "production") {
|
|
3755
|
-
t.__VUE_I18N__ = n, r =
|
|
3759
|
+
t.__VUE_I18N__ = n, r = Zt();
|
|
3756
3760
|
const s = n;
|
|
3757
|
-
s[
|
|
3761
|
+
s[ye] && s[ye](r), r.on("*", Qe);
|
|
3758
3762
|
}
|
|
3759
|
-
}, t),
|
|
3763
|
+
}, t), Gr(() => {
|
|
3760
3764
|
const s = n;
|
|
3761
3765
|
process.env.NODE_ENV !== "production" && (r && r.off("*", Qe), s[Xe] && s[Xe](), delete t.__VUE_I18N__), e.__deleteInstance(t);
|
|
3762
|
-
const a = s[
|
|
3763
|
-
a && (a(), delete s[
|
|
3766
|
+
const a = s[xt];
|
|
3767
|
+
a && (a(), delete s[xt]);
|
|
3764
3768
|
}, t);
|
|
3765
3769
|
}
|
|
3766
|
-
const
|
|
3770
|
+
const Go = [
|
|
3767
3771
|
"locale",
|
|
3768
3772
|
"fallbackLocale",
|
|
3769
3773
|
"availableLocales"
|
|
3770
|
-
],
|
|
3771
|
-
function
|
|
3774
|
+
], Bn = ["t", "rt", "d", "n", "tm", "te"];
|
|
3775
|
+
function xo(e, t) {
|
|
3772
3776
|
const n = /* @__PURE__ */ Object.create(null);
|
|
3773
|
-
return
|
|
3777
|
+
return Go.forEach((s) => {
|
|
3774
3778
|
const a = Object.getOwnPropertyDescriptor(t, s);
|
|
3775
3779
|
if (!a)
|
|
3776
3780
|
throw z(G.UNEXPECTED_ERROR);
|
|
3777
|
-
const o =
|
|
3781
|
+
const o = Vr(a.value) ? {
|
|
3778
3782
|
get() {
|
|
3779
3783
|
return a.value.value;
|
|
3780
3784
|
},
|
|
@@ -3788,18 +3792,18 @@ function Mo(e, t) {
|
|
|
3788
3792
|
}
|
|
3789
3793
|
};
|
|
3790
3794
|
Object.defineProperty(n, s, o);
|
|
3791
|
-
}), e.config.globalProperties.$i18n = n,
|
|
3795
|
+
}), e.config.globalProperties.$i18n = n, Bn.forEach((s) => {
|
|
3792
3796
|
const a = Object.getOwnPropertyDescriptor(t, s);
|
|
3793
3797
|
if (!a || !a.value)
|
|
3794
3798
|
throw z(G.UNEXPECTED_ERROR);
|
|
3795
3799
|
Object.defineProperty(e.config.globalProperties, `$${s}`, a);
|
|
3796
3800
|
}), () => {
|
|
3797
|
-
delete e.config.globalProperties.$i18n,
|
|
3801
|
+
delete e.config.globalProperties.$i18n, Bn.forEach((s) => {
|
|
3798
3802
|
delete e.config.globalProperties[`$${s}`];
|
|
3799
3803
|
});
|
|
3800
3804
|
};
|
|
3801
3805
|
}
|
|
3802
|
-
const
|
|
3806
|
+
const Ho = /* @__PURE__ */ ge({
|
|
3803
3807
|
/* eslint-disable */
|
|
3804
3808
|
name: "i18n-d",
|
|
3805
3809
|
props: J({
|
|
@@ -3810,149 +3814,149 @@ const Fo = /* @__PURE__ */ pe({
|
|
|
3810
3814
|
format: {
|
|
3811
3815
|
type: [String, Object]
|
|
3812
3816
|
}
|
|
3813
|
-
},
|
|
3817
|
+
}, on),
|
|
3814
3818
|
/* eslint-enable */
|
|
3815
3819
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3816
3820
|
setup(e, t) {
|
|
3817
|
-
const n = e.i18n ||
|
|
3821
|
+
const n = e.i18n || ln({
|
|
3818
3822
|
useScope: e.scope,
|
|
3819
3823
|
__useComponent: !0
|
|
3820
3824
|
});
|
|
3821
|
-
return
|
|
3825
|
+
return Dr(e, t, Nr, (...r) => (
|
|
3822
3826
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3823
|
-
n[
|
|
3827
|
+
n[Wt](...r)
|
|
3824
3828
|
));
|
|
3825
3829
|
}
|
|
3826
|
-
}), Kn =
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3830
|
+
}), Kn = Ho;
|
|
3831
|
+
so();
|
|
3832
|
+
Sa(oa);
|
|
3833
|
+
ya(La);
|
|
3834
|
+
Pa(cr);
|
|
3831
3835
|
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
3832
|
-
const e =
|
|
3833
|
-
e.__INTLIFY__ = !0,
|
|
3836
|
+
const e = Oe();
|
|
3837
|
+
e.__INTLIFY__ = !0, la(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
|
|
3834
3838
|
}
|
|
3835
3839
|
process.env.NODE_ENV;
|
|
3836
|
-
const
|
|
3837
|
-
name:
|
|
3838
|
-
supplier:
|
|
3839
|
-
version:
|
|
3840
|
-
description:
|
|
3841
|
-
category:
|
|
3842
|
-
general:
|
|
3843
|
-
ioMapping:
|
|
3844
|
-
modbusSlaveChannel:
|
|
3845
|
-
status:
|
|
3846
|
-
ethernet:
|
|
3847
|
-
modbusTcpServer:
|
|
3848
|
-
modbusTcpClient:
|
|
3849
|
-
modbusTCPSlaveDevice:
|
|
3850
|
-
company:
|
|
3851
|
-
descriptionMap:
|
|
3852
|
-
netInterface:
|
|
3853
|
-
ipAddress:
|
|
3854
|
-
subnetMask:
|
|
3855
|
-
defaultGateway:
|
|
3856
|
-
adaptedOSConfiguration:
|
|
3857
|
-
busCycleTask:
|
|
3858
|
-
defaultTask:
|
|
3859
|
-
responseTimeout:
|
|
3860
|
-
socketTimeout:
|
|
3861
|
-
reconnect:
|
|
3862
|
-
slaveIpAddress:
|
|
3863
|
-
port:
|
|
3864
|
-
watchDog:
|
|
3865
|
-
slavePort:
|
|
3866
|
-
bindToAdapter:
|
|
3867
|
-
holdingRegister:
|
|
3868
|
-
writable:
|
|
3869
|
-
inputRegister:
|
|
3870
|
-
discreteBitArea:
|
|
3871
|
-
coil:
|
|
3872
|
-
discreteInput:
|
|
3873
|
-
dataModel:
|
|
3874
|
-
startAddress:
|
|
3875
|
-
},
|
|
3876
|
-
name:
|
|
3877
|
-
supplier:
|
|
3878
|
-
version:
|
|
3879
|
-
description:
|
|
3880
|
-
category:
|
|
3881
|
-
general:
|
|
3882
|
-
ioMapping:
|
|
3883
|
-
modbusSlaveChannel:
|
|
3884
|
-
status:
|
|
3885
|
-
ethernet:
|
|
3886
|
-
modbusTcpServer:
|
|
3887
|
-
modbusTcpClient:
|
|
3888
|
-
modbusTCPSlaveDevice:
|
|
3889
|
-
company:
|
|
3890
|
-
descriptionMap:
|
|
3891
|
-
netInterface:
|
|
3892
|
-
ipAddress:
|
|
3893
|
-
subnetMask:
|
|
3894
|
-
defaultGateway:
|
|
3895
|
-
adaptedOSConfiguration:
|
|
3896
|
-
busCycleTask:
|
|
3897
|
-
defaultTask:
|
|
3898
|
-
responseTimeout:
|
|
3899
|
-
socketTimeout:
|
|
3900
|
-
reconnect:
|
|
3901
|
-
slaveIpAddress:
|
|
3902
|
-
port:
|
|
3903
|
-
watchDog:
|
|
3904
|
-
slavePort:
|
|
3905
|
-
bindToAdapter:
|
|
3906
|
-
holdingRegister:
|
|
3907
|
-
writable:
|
|
3908
|
-
inputRegister:
|
|
3909
|
-
discreteBitArea:
|
|
3910
|
-
coil:
|
|
3911
|
-
discreteInput:
|
|
3912
|
-
dataModel:
|
|
3913
|
-
startAddress:
|
|
3914
|
-
},
|
|
3915
|
-
zh:
|
|
3916
|
-
en:
|
|
3917
|
-
},
|
|
3840
|
+
const Yo = "名称", Bo = "供应商", Ko = "版本", jo = "描述", Xo = "类别", Jo = "通用", Qo = "I/O映射", qo = "Modbus从站通道", Zo = "状态", zo = "以太网", el = "Modbus TCP服务器", tl = "Modbus TCP客户端", nl = "Modbus TCP从站设备", rl = "成都数字创新科技有限公司", sl = { ethernet: "一种在以太网上充当Modbus服务器的设备。", modbusTcpServer: "一种在以太网上充当Modbus TCP服务器的设备。", modbusTcpClient: "一种在以太网上充当Modbus TCP客户端的设备。", modbusTCPSlaveDevice: "一种在以太网上充当Modbus TCP从站设备。" }, al = "网络接口", ol = "IP地址", ll = "子网掩码", il = "默认网关", cl = "适配操作系统配置", ul = "总线周期任务", fl = "使用父总线循环设置", _l = "响应超时(ms)", ml = "Socket超时(ms)", dl = "自动重连", El = "从站IP地址", pl = "端口", gl = " 看门狗", Nl = "从站端口", Tl = "绑定到适配器", bl = "保持寄存器", hl = "可写入", Il = "输入寄存器", Ll = "离散位区域", Ol = "线圈", vl = "离散输入", Cl = "数据模型", Al = "起始地址", Sl = {
|
|
3841
|
+
name: Yo,
|
|
3842
|
+
supplier: Bo,
|
|
3843
|
+
version: Ko,
|
|
3844
|
+
description: jo,
|
|
3845
|
+
category: Xo,
|
|
3846
|
+
general: Jo,
|
|
3847
|
+
ioMapping: Qo,
|
|
3848
|
+
modbusSlaveChannel: qo,
|
|
3849
|
+
status: Zo,
|
|
3850
|
+
ethernet: zo,
|
|
3851
|
+
modbusTcpServer: el,
|
|
3852
|
+
modbusTcpClient: tl,
|
|
3853
|
+
modbusTCPSlaveDevice: nl,
|
|
3854
|
+
company: rl,
|
|
3855
|
+
descriptionMap: sl,
|
|
3856
|
+
netInterface: al,
|
|
3857
|
+
ipAddress: ol,
|
|
3858
|
+
subnetMask: ll,
|
|
3859
|
+
defaultGateway: il,
|
|
3860
|
+
adaptedOSConfiguration: cl,
|
|
3861
|
+
busCycleTask: ul,
|
|
3862
|
+
defaultTask: fl,
|
|
3863
|
+
responseTimeout: _l,
|
|
3864
|
+
socketTimeout: ml,
|
|
3865
|
+
reconnect: dl,
|
|
3866
|
+
slaveIpAddress: El,
|
|
3867
|
+
port: pl,
|
|
3868
|
+
watchDog: gl,
|
|
3869
|
+
slavePort: Nl,
|
|
3870
|
+
bindToAdapter: Tl,
|
|
3871
|
+
holdingRegister: bl,
|
|
3872
|
+
writable: hl,
|
|
3873
|
+
inputRegister: Il,
|
|
3874
|
+
discreteBitArea: Ll,
|
|
3875
|
+
coil: Ol,
|
|
3876
|
+
discreteInput: vl,
|
|
3877
|
+
dataModel: Cl,
|
|
3878
|
+
startAddress: Al
|
|
3879
|
+
}, yl = "Name", Pl = "Supplier", Dl = "Version", kl = "Description", Rl = "Category", Ml = "General", Fl = "I/O Mapping", Ul = "Modbus Slave Channel", wl = "Status", Vl = "Ethernet", $l = "Modbus TCP Server", Wl = "Modbus TCP Client", Gl = "Modbus TCP Slave Device", xl = "Chengdu AIOSYS Innovation Technology Co., Ltd.", Hl = { ethernet: "A device that works as a Modbus Server on Ethernet.", modbusTcpServer: "A device that works as a Modbus TCP Server.", modbusTcpClient: "A device that works as a Modbus TCP Client.", modbusTCPSlaveDevice: "A device that works as a Modbus TCP Slave Device." }, Yl = "Network Interface", Bl = "IP Address", Kl = "Subnet Mask", jl = "Default Gateway", Xl = "Adapted OS Configuration", Jl = "Bus Cycle Task", Ql = "Use Parent Bus Cycle Setting", ql = "Response Timeout(ms)", Zl = "Socket Timeout(ms)", zl = "Reconnect", ei = "Slave IP Address", ti = "Port", ni = "Watch Dog", ri = "Slave Port", si = "Bind to Adapter", ai = "Holding Register", oi = "Writable", li = "Input Register", ii = "Discrete Bit Area", ci = "Coil", ui = "Discrete Input", fi = "Data Model", _i = "Start Address", mi = {
|
|
3880
|
+
name: yl,
|
|
3881
|
+
supplier: Pl,
|
|
3882
|
+
version: Dl,
|
|
3883
|
+
description: kl,
|
|
3884
|
+
category: Rl,
|
|
3885
|
+
general: Ml,
|
|
3886
|
+
ioMapping: Fl,
|
|
3887
|
+
modbusSlaveChannel: Ul,
|
|
3888
|
+
status: wl,
|
|
3889
|
+
ethernet: Vl,
|
|
3890
|
+
modbusTcpServer: $l,
|
|
3891
|
+
modbusTcpClient: Wl,
|
|
3892
|
+
modbusTCPSlaveDevice: Gl,
|
|
3893
|
+
company: xl,
|
|
3894
|
+
descriptionMap: Hl,
|
|
3895
|
+
netInterface: Yl,
|
|
3896
|
+
ipAddress: Bl,
|
|
3897
|
+
subnetMask: Kl,
|
|
3898
|
+
defaultGateway: jl,
|
|
3899
|
+
adaptedOSConfiguration: Xl,
|
|
3900
|
+
busCycleTask: Jl,
|
|
3901
|
+
defaultTask: Ql,
|
|
3902
|
+
responseTimeout: ql,
|
|
3903
|
+
socketTimeout: Zl,
|
|
3904
|
+
reconnect: zl,
|
|
3905
|
+
slaveIpAddress: ei,
|
|
3906
|
+
port: ti,
|
|
3907
|
+
watchDog: ni,
|
|
3908
|
+
slavePort: ri,
|
|
3909
|
+
bindToAdapter: si,
|
|
3910
|
+
holdingRegister: ai,
|
|
3911
|
+
writable: oi,
|
|
3912
|
+
inputRegister: li,
|
|
3913
|
+
discreteBitArea: ii,
|
|
3914
|
+
coil: ci,
|
|
3915
|
+
discreteInput: ui,
|
|
3916
|
+
dataModel: fi,
|
|
3917
|
+
startAddress: _i
|
|
3918
|
+
}, di = {
|
|
3919
|
+
zh: Sl,
|
|
3920
|
+
en: mi
|
|
3921
|
+
}, Le = Ro({
|
|
3918
3922
|
legacy: !1,
|
|
3919
3923
|
locale: "zh",
|
|
3920
3924
|
fallbackLocale: "en",
|
|
3921
|
-
messages:
|
|
3925
|
+
messages: di
|
|
3922
3926
|
});
|
|
3923
|
-
typeof window < "u" && (window.$t =
|
|
3927
|
+
typeof window < "u" && (window.$t = Le.global.t.bind(Le.global), Object.defineProperty(window, "$locale", {
|
|
3924
3928
|
get() {
|
|
3925
|
-
return typeof
|
|
3929
|
+
return typeof Le.global.locale == "string" ? Le.global.locale : Le.global.locale.value;
|
|
3926
3930
|
},
|
|
3927
3931
|
set(e) {
|
|
3928
|
-
|
|
3932
|
+
Le.global.locale = e;
|
|
3929
3933
|
}
|
|
3930
3934
|
}));
|
|
3931
|
-
const
|
|
3932
|
-
|
|
3933
|
-
const
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
],
|
|
3935
|
+
const Ei = Hr(is).use(Le);
|
|
3936
|
+
Ei.mount("#app");
|
|
3937
|
+
const pi = [
|
|
3938
|
+
Br,
|
|
3939
|
+
jr
|
|
3940
|
+
], bi = {
|
|
3937
3941
|
install(e) {
|
|
3938
|
-
|
|
3942
|
+
pi.forEach((t) => {
|
|
3939
3943
|
e.component(t.name, t);
|
|
3940
3944
|
});
|
|
3941
3945
|
}
|
|
3942
3946
|
};
|
|
3943
3947
|
export {
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3948
|
+
jr as Button2,
|
|
3949
|
+
lt as EthernetProtocolItem,
|
|
3950
|
+
Qr as Input,
|
|
3951
|
+
Ni as IpInput,
|
|
3952
|
+
jt as ModbusTCPClientProtocolItem,
|
|
3949
3953
|
Kt as ModbusTCPServerProtocolItem,
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
+
Xt as ModbusTCPSlaveDeviceProtocolItem,
|
|
3955
|
+
Br as MyButton,
|
|
3956
|
+
Ti as MyLibPlugin,
|
|
3957
|
+
os as ProtocolCollection,
|
|
3954
3958
|
re as ProtocolItem,
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3959
|
+
pe as ProtocolType,
|
|
3960
|
+
bi as default,
|
|
3961
|
+
it as protocolMap
|
|
3958
3962
|
};
|