@vtj/parser 0.20.1 → 0.20.3
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/index.cjs +11 -11
- package/dist/index.mjs +1225 -1190
- package/package.json +3 -3
- package/types/version.d.ts +2 -2
- package/types/vue/scriptSetup.d.ts +2 -1
- package/types/vue/template.d.ts +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { parse as He, compileTemplate as We } from "@vue/compiler-sfc";
|
|
2
|
-
import { parse as
|
|
2
|
+
import { parse as Eu } from "@babel/parser";
|
|
3
3
|
import Ee from "@babel/traverse";
|
|
4
4
|
import Ie from "@babel/generator";
|
|
5
|
-
import { createProjectFileIndex as
|
|
6
|
-
import { GLOBAL_API_MAP as ye, UI_PACKAGES as
|
|
7
|
-
import { NodeTypes as
|
|
8
|
-
import { upperFirstCamelCase as
|
|
9
|
-
import
|
|
10
|
-
import * as
|
|
5
|
+
import { createProjectFileIndex as Iu, getSourceFilePath as wu, BlockModel as Je } from "@vtj/core";
|
|
6
|
+
import { GLOBAL_API_MAP as ye, UI_PACKAGES as Au, UI_GLOBAL_API_MAPS as Xe, tsFormatter as ne } from "@vtj/coder";
|
|
7
|
+
import { NodeTypes as E } from "@vue/compiler-core";
|
|
8
|
+
import { upperFirstCamelCase as ku, unBase64 as Tu, uid as se } from "@vtj/base";
|
|
9
|
+
import Nu from "postcss";
|
|
10
|
+
import * as ju from "sass";
|
|
11
11
|
import * as q from "@babel/types";
|
|
12
12
|
/**!
|
|
13
13
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
14
14
|
* @name @vtj/parser
|
|
15
15
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
16
|
-
* @version 0.20.
|
|
16
|
+
* @version 0.20.3
|
|
17
17
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
18
18
|
*/
|
|
19
|
-
const
|
|
20
|
-
function
|
|
21
|
-
const { descriptor: e, errors: t } = He(u),
|
|
19
|
+
const A0 = "0.20.3";
|
|
20
|
+
function B(u) {
|
|
21
|
+
const { descriptor: e, errors: t } = He(u), r = e.template?.content || "", a = !!e.scriptSetup, n = (e.scriptSetup || e.script)?.content || "", s = e.styles.map((i) => i.content);
|
|
22
22
|
return {
|
|
23
|
-
template:
|
|
23
|
+
template: r,
|
|
24
24
|
script: n,
|
|
25
25
|
styles: s,
|
|
26
26
|
errors: t,
|
|
27
|
-
isScriptSetup:
|
|
27
|
+
isScriptSetup: a
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
return
|
|
30
|
+
function L(u) {
|
|
31
|
+
return Eu(u, { sourceType: "module", plugins: ["typescript"] });
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function X(u, e) {
|
|
34
34
|
return (Ee.default || Ee)(u, e);
|
|
35
35
|
}
|
|
36
36
|
function A(u) {
|
|
37
37
|
if (!u) return "";
|
|
38
38
|
try {
|
|
39
|
-
return
|
|
39
|
+
return ae(u), (Ie.default || Ie)(u, {
|
|
40
40
|
comments: !1,
|
|
41
41
|
concise: !0,
|
|
42
42
|
retainLines: !1,
|
|
@@ -48,60 +48,60 @@ function A(u) {
|
|
|
48
48
|
return console.error("代码生成错误", e), "";
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const Vu = /* @__PURE__ */ new Set([
|
|
52
52
|
"TSAsExpression",
|
|
53
53
|
"TSTypeAssertion",
|
|
54
54
|
"TSNonNullExpression"
|
|
55
55
|
]);
|
|
56
|
-
function
|
|
56
|
+
function ae(u) {
|
|
57
57
|
if (!(!u || typeof u != "object")) {
|
|
58
58
|
if (Array.isArray(u)) {
|
|
59
|
-
for (const e of u)
|
|
59
|
+
for (const e of u) ae(e);
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
if (
|
|
62
|
+
if (Vu.has(u.type) && u.expression) {
|
|
63
63
|
const e = u.expression;
|
|
64
|
-
|
|
64
|
+
ae(e);
|
|
65
65
|
const t = {
|
|
66
66
|
start: u.start,
|
|
67
67
|
end: u.end,
|
|
68
68
|
loc: u.loc
|
|
69
69
|
};
|
|
70
|
-
for (const
|
|
71
|
-
|
|
70
|
+
for (const r of Object.keys(e))
|
|
71
|
+
r === "type" || r === "loc" || r === "start" || r === "end" || r === "extra" || r === "leadingComments" || r === "trailingComments" || r === "innerComments" || (u[r] = e[r]);
|
|
72
72
|
u.type = e.type, u.start = t.start, u.end = t.end, u.loc = t.loc, delete u.typeAnnotation, delete u.typeParameters;
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
delete u.typeAnnotation, delete u.returnType, delete u.typeParameters, u.type === "Identifier" && delete u.optional;
|
|
76
76
|
for (const e of Object.keys(u))
|
|
77
|
-
e === "type" || e === "loc" || e === "start" || e === "end" || e === "extra" || e === "leadingComments" || e === "trailingComments" || e === "innerComments" || e === "errors" ||
|
|
77
|
+
e === "type" || e === "loc" || e === "start" || e === "end" || e === "extra" || e === "leadingComments" || e === "trailingComments" || e === "innerComments" || e === "errors" || ae(u[e]);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function ue(u) {
|
|
81
81
|
return !!u && u.type === "JSExpression";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function qu(u) {
|
|
84
84
|
return typeof u == "object" && !!u && u.type === "JSFunction";
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return !!
|
|
86
|
+
function de(u) {
|
|
87
|
+
return !!ue(u) || !!qu(u);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return !!u && !
|
|
89
|
+
function Du(u) {
|
|
90
|
+
return !!u && !ue(u) && typeof u != "string";
|
|
91
91
|
}
|
|
92
92
|
function ze(u, e) {
|
|
93
93
|
try {
|
|
94
|
-
const t =
|
|
95
|
-
return
|
|
94
|
+
const t = L(u);
|
|
95
|
+
return X(t, e), A(t) || "";
|
|
96
96
|
} catch {
|
|
97
97
|
return "";
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function Ru(u) {
|
|
101
101
|
if (!u) return "";
|
|
102
102
|
try {
|
|
103
|
-
const e =
|
|
104
|
-
return
|
|
103
|
+
const e = L(u);
|
|
104
|
+
return X(e, {
|
|
105
105
|
// TS as 断言 / <T> 断言 / 非空断言 → 只保留表达式本身
|
|
106
106
|
TSAsExpression: (t) => {
|
|
107
107
|
t.replaceWith(t.node.expression);
|
|
@@ -127,29 +127,29 @@ function Du(u) {
|
|
|
127
127
|
},
|
|
128
128
|
// 退出节点时统一删除残留的 TS 属性
|
|
129
129
|
exit: (t) => {
|
|
130
|
-
const
|
|
131
|
-
|
|
130
|
+
const r = t.node;
|
|
131
|
+
r && (delete r.typeAnnotation, delete r.returnType, delete r.typeParameters, r.type === "Identifier" && delete r.optional);
|
|
132
132
|
}
|
|
133
133
|
}), A(e) || "";
|
|
134
134
|
} catch {
|
|
135
135
|
return u;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Cu(u, e) {
|
|
139
139
|
const t = [];
|
|
140
140
|
try {
|
|
141
|
-
const { descriptor:
|
|
142
|
-
if (
|
|
141
|
+
const { descriptor: r, errors: a } = He(u);
|
|
142
|
+
if (a && a.length > 0 && a.forEach((s) => {
|
|
143
143
|
const i = s.message || String(s), o = s.loc;
|
|
144
144
|
o && o.start ? t.push(
|
|
145
145
|
`Vue SFC 错误: ${i} (位置: ${o.start.line}:${o.start.column})`
|
|
146
146
|
) : t.push(`Vue SFC 错误: ${i}`);
|
|
147
|
-
}),
|
|
147
|
+
}), r.template)
|
|
148
148
|
try {
|
|
149
149
|
const s = We({
|
|
150
150
|
id: "validation",
|
|
151
151
|
filename: e,
|
|
152
|
-
source:
|
|
152
|
+
source: r.template.content,
|
|
153
153
|
isProd: !1
|
|
154
154
|
});
|
|
155
155
|
s.errors && s.errors.length > 0 && s.errors.forEach((i) => {
|
|
@@ -161,34 +161,34 @@ function Ru(u, e) {
|
|
|
161
161
|
} catch (s) {
|
|
162
162
|
t.push(`模板编译错误: ${s.message}`);
|
|
163
163
|
}
|
|
164
|
-
const n = (
|
|
164
|
+
const n = (r.scriptSetup || r.script)?.content;
|
|
165
165
|
if (n)
|
|
166
166
|
try {
|
|
167
|
-
|
|
167
|
+
L(n);
|
|
168
168
|
} catch (s) {
|
|
169
169
|
t.push(`脚本语法错误: ${s.message}`);
|
|
170
170
|
}
|
|
171
|
-
} catch (
|
|
172
|
-
t.push(`Vue SFC 解析错误: ${
|
|
171
|
+
} catch (r) {
|
|
172
|
+
t.push(`Vue SFC 解析错误: ${r.message}`);
|
|
173
173
|
}
|
|
174
174
|
return t.length > 0 ? t : null;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
const e =
|
|
178
|
-
return e.styles && (
|
|
179
|
-
CallExpression(
|
|
180
|
-
const n =
|
|
176
|
+
function k0(u) {
|
|
177
|
+
const e = B(u), t = L(e.script), r = {};
|
|
178
|
+
return e.styles && (r.css = e.styles[0] || ""), X(t, {
|
|
179
|
+
CallExpression(a) {
|
|
180
|
+
const n = a.node.callee?.name;
|
|
181
181
|
if (n) {
|
|
182
|
-
const s = A(
|
|
183
|
-
s && (
|
|
182
|
+
const s = A(a.node.arguments[0]);
|
|
183
|
+
s && (r[n] = {
|
|
184
184
|
type: "JSFunction",
|
|
185
185
|
value: s
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
}),
|
|
189
|
+
}), r;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function D(u, e, t) {
|
|
192
192
|
if (!u.includes(e)) return u;
|
|
193
193
|
try {
|
|
194
194
|
return Ze(u, e, t);
|
|
@@ -196,7 +196,7 @@ function R(u, e, t) {
|
|
|
196
196
|
return u;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function _u(u, e) {
|
|
200
200
|
if (!u.includes(e)) return u;
|
|
201
201
|
try {
|
|
202
202
|
return Ze(u, e, `this.${e}.value`, !0);
|
|
@@ -204,39 +204,39 @@ function Cu(u, e) {
|
|
|
204
204
|
return u;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
function Ze(u, e, t,
|
|
208
|
-
let
|
|
207
|
+
function Ze(u, e, t, r = !1) {
|
|
208
|
+
let a, n = 0;
|
|
209
209
|
try {
|
|
210
|
-
|
|
210
|
+
a = L(u);
|
|
211
211
|
} catch {
|
|
212
212
|
try {
|
|
213
213
|
const o = "(()=>{", d = o + u + "})";
|
|
214
|
-
|
|
214
|
+
a = L(d), n = o.length;
|
|
215
215
|
} catch {
|
|
216
216
|
const o = "(()=>(", d = o + u + "))";
|
|
217
|
-
|
|
217
|
+
a = L(d), n = o.length;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
const s = [];
|
|
221
|
-
if (
|
|
221
|
+
if (X(a, {
|
|
222
222
|
Identifier(o) {
|
|
223
223
|
const c = o.node;
|
|
224
224
|
if (c.name !== e) return;
|
|
225
|
-
const d =
|
|
225
|
+
const d = Ou(o);
|
|
226
226
|
if (d === "skip") return;
|
|
227
|
-
const l = (c.start ?? 0) - n,
|
|
228
|
-
if (l < 0 ||
|
|
229
|
-
const
|
|
230
|
-
s.some((
|
|
227
|
+
const l = (c.start ?? 0) - n, b = (c.end ?? 0) - n;
|
|
228
|
+
if (l < 0 || b > u.length) return;
|
|
229
|
+
const p = r && d === "replace" && Lu(o) ? `this.${e}` : t, x = d === "expand" ? `${e}: ${t}` : p;
|
|
230
|
+
s.some((S) => S.start === l && S.end === b) || s.push({ start: l, end: b, text: x });
|
|
231
231
|
},
|
|
232
232
|
StringLiteral(o) {
|
|
233
|
-
|
|
233
|
+
Pu(o, e, t, n, u, s);
|
|
234
234
|
},
|
|
235
235
|
TemplateLiteral(o) {
|
|
236
|
-
|
|
236
|
+
Mu(o, e, t, n, u, s);
|
|
237
237
|
},
|
|
238
238
|
MemberExpression(o) {
|
|
239
|
-
|
|
239
|
+
r ? we(o, e, t, n, u, s) : Ae(
|
|
240
240
|
o,
|
|
241
241
|
e,
|
|
242
242
|
t,
|
|
@@ -246,7 +246,7 @@ function Ze(u, e, t, a = !1) {
|
|
|
246
246
|
);
|
|
247
247
|
},
|
|
248
248
|
OptionalMemberExpression(o) {
|
|
249
|
-
|
|
249
|
+
r ? we(o, e, t, n, u, s) : Ae(
|
|
250
250
|
o,
|
|
251
251
|
e,
|
|
252
252
|
t,
|
|
@@ -262,22 +262,22 @@ function Ze(u, e, t, a = !1) {
|
|
|
262
262
|
i = i.slice(0, o) + d + i.slice(c);
|
|
263
263
|
return i;
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function Lu(u) {
|
|
266
266
|
const e = u.parent;
|
|
267
267
|
return (e?.type === "MemberExpression" || e?.type === "OptionalMemberExpression") && e.object === u.node && !e.computed && e.property?.type === "Identifier" && e.property.name === "value";
|
|
268
268
|
}
|
|
269
|
-
function we(u, e, t,
|
|
269
|
+
function we(u, e, t, r, a, n) {
|
|
270
270
|
const s = u.node;
|
|
271
271
|
if (s.object?.type !== "Identifier" || s.object.name !== "_ctx" || s.computed || s.property?.type !== "Identifier" || s.property.name !== e)
|
|
272
272
|
return;
|
|
273
|
-
const i = u.parent, o = (i?.type === "MemberExpression" || i?.type === "OptionalMemberExpression") && i.object === s && !i.computed && i.property?.type === "Identifier" && i.property.name === "value", c = (s.start ?? 0) -
|
|
274
|
-
c < 0 || d >
|
|
273
|
+
const i = u.parent, o = (i?.type === "MemberExpression" || i?.type === "OptionalMemberExpression") && i.object === s && !i.computed && i.property?.type === "Identifier" && i.property.name === "value", c = (s.start ?? 0) - r, d = (s.end ?? 0) - r;
|
|
274
|
+
c < 0 || d > a.length || n.push({
|
|
275
275
|
start: c,
|
|
276
276
|
end: d,
|
|
277
277
|
text: o ? `this.${e}` : t
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function Pu(u, e, t, r, a, n) {
|
|
281
281
|
const s = u.node;
|
|
282
282
|
if (!s.value.includes(e)) return;
|
|
283
283
|
const i = u.parent;
|
|
@@ -288,11 +288,11 @@ function Lu(u, e, t, a, r, n) {
|
|
|
288
288
|
for (; c < o.length; ) {
|
|
289
289
|
const d = o.indexOf(e, c);
|
|
290
290
|
if (d === -1) break;
|
|
291
|
-
const l = 1 + d,
|
|
292
|
-
|
|
291
|
+
const l = 1 + d, b = (s.start ?? 0) - r + l, p = b + e.length;
|
|
292
|
+
b >= 0 && p <= a.length && !n.some((x) => x.start === b && x.end === p) && n.push({ start: b, end: p, text: t }), c = d + e.length;
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Mu(u, e, t, r, a, n) {
|
|
296
296
|
const s = u.parent;
|
|
297
297
|
if (s?.type !== "NewExpression" || s?.callee?.name !== "RegExp")
|
|
298
298
|
return;
|
|
@@ -302,25 +302,25 @@ function Pu(u, e, t, a, r, n) {
|
|
|
302
302
|
if (!d.includes(e)) continue;
|
|
303
303
|
let l = 0;
|
|
304
304
|
for (; l < d.length; ) {
|
|
305
|
-
const
|
|
306
|
-
if (
|
|
307
|
-
const
|
|
308
|
-
if (
|
|
309
|
-
const
|
|
310
|
-
|
|
305
|
+
const b = d.indexOf(e, l);
|
|
306
|
+
if (b === -1) break;
|
|
307
|
+
const p = (c.start ?? 0) - r;
|
|
308
|
+
if (p < 0 || p > a.length) break;
|
|
309
|
+
const x = p + b, S = x + e.length;
|
|
310
|
+
x >= 0 && S <= a.length && !n.some((I) => I.start === x && I.end === S) && n.push({ start: x, end: S, text: t }), l = b + e.length;
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
function Ae(u, e, t,
|
|
314
|
+
function Ae(u, e, t, r, a, n) {
|
|
315
315
|
const s = u.node;
|
|
316
316
|
if (s.object?.type !== "ThisExpression" || s.computed || s.property?.type !== "Identifier" || s.property.name !== e)
|
|
317
317
|
return;
|
|
318
|
-
const i = (s.start ?? 0) -
|
|
319
|
-
i < 0 || o >
|
|
318
|
+
const i = (s.start ?? 0) - r, o = (s.end ?? 0) - r;
|
|
319
|
+
i < 0 || o > a.length || n.some((c) => c.start === i && c.end === o) || n.push({ start: i, end: o, text: t });
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
const t = u.parent,
|
|
323
|
-
switch (
|
|
321
|
+
function Ou(u, e) {
|
|
322
|
+
const t = u.parent, r = t?.type ?? "", a = u.parentPath?.parent;
|
|
323
|
+
switch (r) {
|
|
324
324
|
// 成员访问 obj.key / obj[key] / obj?.key / obj?.[key]
|
|
325
325
|
case "MemberExpression":
|
|
326
326
|
case "OptionalMemberExpression": {
|
|
@@ -333,9 +333,9 @@ function Mu(u, e) {
|
|
|
333
333
|
// 对象属性 { key: val } / { key } / { [key]: val }
|
|
334
334
|
case "ObjectProperty": {
|
|
335
335
|
if (t.key === u.node)
|
|
336
|
-
return t.computed ? "replace" : t.shorthand ?
|
|
336
|
+
return t.computed ? "replace" : t.shorthand ? a && a?.type === "ObjectPattern" ? "skip" : "expand" : "skip";
|
|
337
337
|
if (t.value === u.node)
|
|
338
|
-
return
|
|
338
|
+
return a && a?.type === "ObjectPattern" ? "skip" : "replace";
|
|
339
339
|
break;
|
|
340
340
|
}
|
|
341
341
|
// 变量声明 const/let/var key = ...
|
|
@@ -425,21 +425,21 @@ function Mu(u, e) {
|
|
|
425
425
|
break;
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
|
-
return
|
|
428
|
+
return Bu(u) || Fu(u) ? "skip" : "replace";
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function Bu(u) {
|
|
431
431
|
let e = u.parentPath;
|
|
432
432
|
for (; e; ) {
|
|
433
|
-
const t = e.node,
|
|
434
|
-
if (
|
|
433
|
+
const t = e.node, r = t?.type ?? "";
|
|
434
|
+
if (r === "FunctionDeclaration" || r === "FunctionExpression" || r === "ArrowFunctionExpression" || r === "ClassMethod" || r === "ObjectMethod" || r === "TSDeclareFunction")
|
|
435
435
|
return (t.params ?? []).includes(u.node);
|
|
436
|
-
if (
|
|
436
|
+
if (r === "Program" || r === "BlockStatement" || r === "ObjectExpression" || r === "ArrayExpression" || r === "StaticBlock")
|
|
437
437
|
break;
|
|
438
438
|
e = e.parentPath;
|
|
439
439
|
}
|
|
440
440
|
return !1;
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function Fu(u) {
|
|
443
443
|
let e = u.parentPath;
|
|
444
444
|
for (; e; ) {
|
|
445
445
|
const t = e.node?.type ?? "";
|
|
@@ -452,24 +452,24 @@ function Bu(u) {
|
|
|
452
452
|
}
|
|
453
453
|
function ke(u, e, t) {
|
|
454
454
|
const {
|
|
455
|
-
context:
|
|
456
|
-
computed:
|
|
455
|
+
context: r = {},
|
|
456
|
+
computed: a = [],
|
|
457
457
|
libs: n = {},
|
|
458
458
|
members: s = [],
|
|
459
459
|
props: i = [],
|
|
460
460
|
platform: o
|
|
461
|
-
} = t || {}, c = Array.from(
|
|
461
|
+
} = t || {}, c = Array.from(r[e || ""] || /* @__PURE__ */ new Set());
|
|
462
462
|
if (c)
|
|
463
463
|
for (const d of c)
|
|
464
|
-
u =
|
|
465
|
-
for (const d of
|
|
466
|
-
u.includes(`this.${d}.value`) || (u =
|
|
464
|
+
u = D(u, d, `this.context.${d}`);
|
|
465
|
+
for (const d of a)
|
|
466
|
+
u.includes(`this.${d}.value`) || (u = D(u, d, `this.${d}.value`));
|
|
467
467
|
for (const d of i)
|
|
468
|
-
u =
|
|
468
|
+
u = D(u, d, `this.${d}`);
|
|
469
469
|
for (const [d, l] of Object.entries(n))
|
|
470
|
-
u =
|
|
470
|
+
u = D(u, d, `this.$libs.${l}.${d}`), u = D(u, `this.${d}`, `this.$libs.${l}.${d}`);
|
|
471
471
|
for (const d of s)
|
|
472
|
-
u =
|
|
472
|
+
u = D(u, d, `this.${d}`);
|
|
473
473
|
if (o === "uniapp") {
|
|
474
474
|
const d = /\suni\./g;
|
|
475
475
|
u = u.replace(d, "this.$libs.UniH5.uni.");
|
|
@@ -482,13 +482,13 @@ function k(u) {
|
|
|
482
482
|
value: /^\{[\w\W]*\}$/.test(u) ? `(${u})` : u
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function R(u) {
|
|
486
486
|
return {
|
|
487
487
|
type: "JSFunction",
|
|
488
488
|
value: u
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
|
-
const
|
|
491
|
+
const $u = [
|
|
492
492
|
"beforeCreate",
|
|
493
493
|
"created",
|
|
494
494
|
"beforeMount",
|
|
@@ -502,46 +502,46 @@ const Fu = [
|
|
|
502
502
|
"renderTriggered",
|
|
503
503
|
"activated",
|
|
504
504
|
"deactivated"
|
|
505
|
-
],
|
|
505
|
+
], Uu = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg,path,circle,rect,polygon".split(
|
|
506
506
|
","
|
|
507
|
-
),
|
|
507
|
+
), Gu = "component,slot,template".split(","), Hu = "view,swiper,progress,icon,text,button,checkbox,editor,form,input,label,picker,radio,slider,switch,textarea,audio,camera,image,video,map,canvas".split(
|
|
508
508
|
","
|
|
509
509
|
);
|
|
510
|
-
function
|
|
511
|
-
return e === "uniapp" &&
|
|
510
|
+
function Wu(u, e = "web") {
|
|
511
|
+
return e === "uniapp" && Hu.includes(u);
|
|
512
512
|
}
|
|
513
513
|
function Qe(u, e = "web") {
|
|
514
|
-
return (
|
|
514
|
+
return (Uu.includes(u) || Gu.includes(u)) && !Wu(u, e) ? u : ku(u);
|
|
515
515
|
}
|
|
516
516
|
function Ke(u) {
|
|
517
|
-
return u.replace(/\s+/g, " ").split(";").reduce((t,
|
|
518
|
-
const [
|
|
519
|
-
return
|
|
517
|
+
return u.replace(/\s+/g, " ").split(";").reduce((t, r) => {
|
|
518
|
+
const [a, n] = r.split(":").map((s) => s.trim());
|
|
519
|
+
return a && n && (t[a] = n), t;
|
|
520
520
|
}, {});
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Ju(u, e, t) {
|
|
523
523
|
if (t === "ObjectExpression")
|
|
524
|
-
return `(Object.assign({${u.split(" ").map((
|
|
524
|
+
return `(Object.assign({${u.split(" ").map((a) => `'${a}': true`).join(",")}}, ${e}))`;
|
|
525
525
|
if (t === "ArrayExpression")
|
|
526
|
-
return `([${u.split(" ").map((
|
|
526
|
+
return `([${u.split(" ").map((a) => `'${a}'`).join(",")}].concat(${e}))`;
|
|
527
527
|
}
|
|
528
528
|
function Ye(u = "") {
|
|
529
529
|
const t = u.trim().match(/DataSource:\s*([^\n=]+={0,2})/)?.[1] || "";
|
|
530
530
|
try {
|
|
531
|
-
return t ? JSON.parse(
|
|
532
|
-
} catch (
|
|
533
|
-
return console.warn("extractDataSource fail",
|
|
531
|
+
return t ? JSON.parse(Tu(t)) : null;
|
|
532
|
+
} catch (r) {
|
|
533
|
+
return console.warn("extractDataSource fail", r), null;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
const
|
|
536
|
+
const Xu = /* @__PURE__ */ new Uint16Array(
|
|
537
537
|
// prettier-ignore
|
|
538
538
|
/* @__PURE__ */ 'ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((u) => u.charCodeAt(0))
|
|
539
|
-
),
|
|
539
|
+
), zu = /* @__PURE__ */ new Uint16Array(
|
|
540
540
|
// prettier-ignore
|
|
541
541
|
/* @__PURE__ */ "Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((u) => u.charCodeAt(0))
|
|
542
542
|
);
|
|
543
543
|
var le;
|
|
544
|
-
const
|
|
544
|
+
const Zu = /* @__PURE__ */ new Map([
|
|
545
545
|
[0, 65533],
|
|
546
546
|
// C1 Unicode control character reference replacements
|
|
547
547
|
[128, 8364],
|
|
@@ -578,42 +578,42 @@ const zu = /* @__PURE__ */ new Map([
|
|
|
578
578
|
return u > 65535 && (u -= 65536, e += String.fromCharCode(u >>> 10 & 1023 | 55296), u = 56320 | u & 1023), e += String.fromCharCode(u), e;
|
|
579
579
|
}
|
|
580
580
|
);
|
|
581
|
-
function
|
|
581
|
+
function Qu(u) {
|
|
582
582
|
var e;
|
|
583
|
-
return u >= 55296 && u <= 57343 || u > 1114111 ? 65533 : (e =
|
|
583
|
+
return u >= 55296 && u <= 57343 || u > 1114111 ? 65533 : (e = Zu.get(u)) !== null && e !== void 0 ? e : u;
|
|
584
584
|
}
|
|
585
585
|
var V;
|
|
586
586
|
(function(u) {
|
|
587
587
|
u[u.NUM = 35] = "NUM", u[u.SEMI = 59] = "SEMI", u[u.EQUALS = 61] = "EQUALS", u[u.ZERO = 48] = "ZERO", u[u.NINE = 57] = "NINE", u[u.LOWER_A = 97] = "LOWER_A", u[u.LOWER_F = 102] = "LOWER_F", u[u.LOWER_X = 120] = "LOWER_X", u[u.LOWER_Z = 122] = "LOWER_Z", u[u.UPPER_A = 65] = "UPPER_A", u[u.UPPER_F = 70] = "UPPER_F", u[u.UPPER_Z = 90] = "UPPER_Z";
|
|
588
588
|
})(V || (V = {}));
|
|
589
|
-
const
|
|
589
|
+
const Ku = 32;
|
|
590
590
|
var W;
|
|
591
591
|
(function(u) {
|
|
592
592
|
u[u.VALUE_LENGTH = 49152] = "VALUE_LENGTH", u[u.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", u[u.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
593
593
|
})(W || (W = {}));
|
|
594
|
-
function
|
|
594
|
+
function pe(u) {
|
|
595
595
|
return u >= V.ZERO && u <= V.NINE;
|
|
596
596
|
}
|
|
597
|
-
function Ku(u) {
|
|
598
|
-
return u >= V.UPPER_A && u <= V.UPPER_F || u >= V.LOWER_A && u <= V.LOWER_F;
|
|
599
|
-
}
|
|
600
597
|
function Yu(u) {
|
|
601
|
-
return u >= V.UPPER_A && u <= V.
|
|
598
|
+
return u >= V.UPPER_A && u <= V.UPPER_F || u >= V.LOWER_A && u <= V.LOWER_F;
|
|
602
599
|
}
|
|
603
600
|
function et(u) {
|
|
604
|
-
return u
|
|
601
|
+
return u >= V.UPPER_A && u <= V.UPPER_Z || u >= V.LOWER_A && u <= V.LOWER_Z || pe(u);
|
|
602
|
+
}
|
|
603
|
+
function ut(u) {
|
|
604
|
+
return u === V.EQUALS || et(u);
|
|
605
605
|
}
|
|
606
606
|
var j;
|
|
607
607
|
(function(u) {
|
|
608
608
|
u[u.EntityStart = 0] = "EntityStart", u[u.NumericStart = 1] = "NumericStart", u[u.NumericDecimal = 2] = "NumericDecimal", u[u.NumericHex = 3] = "NumericHex", u[u.NamedEntity = 4] = "NamedEntity";
|
|
609
609
|
})(j || (j = {}));
|
|
610
|
-
var
|
|
610
|
+
var F;
|
|
611
611
|
(function(u) {
|
|
612
612
|
u[u.Legacy = 0] = "Legacy", u[u.Strict = 1] = "Strict", u[u.Attribute = 2] = "Attribute";
|
|
613
|
-
})(
|
|
614
|
-
class
|
|
615
|
-
constructor(e, t,
|
|
616
|
-
this.decodeTree = e, this.emitCodePoint = t, this.errors =
|
|
613
|
+
})(F || (F = {}));
|
|
614
|
+
class tt {
|
|
615
|
+
constructor(e, t, r) {
|
|
616
|
+
this.decodeTree = e, this.emitCodePoint = t, this.errors = r, this.state = j.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = F.Strict;
|
|
617
617
|
}
|
|
618
618
|
/** Resets the instance to make it reusable. */
|
|
619
619
|
startEntity(e) {
|
|
@@ -654,12 +654,12 @@ class ut {
|
|
|
654
654
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
655
655
|
*/
|
|
656
656
|
stateNumericStart(e, t) {
|
|
657
|
-
return t >= e.length ? -1 : (e.charCodeAt(t) |
|
|
657
|
+
return t >= e.length ? -1 : (e.charCodeAt(t) | Ku) === V.LOWER_X ? (this.state = j.NumericHex, this.consumed += 1, this.stateNumericHex(e, t + 1)) : (this.state = j.NumericDecimal, this.stateNumericDecimal(e, t));
|
|
658
658
|
}
|
|
659
|
-
addToNumericResult(e, t,
|
|
660
|
-
if (t !==
|
|
661
|
-
const n =
|
|
662
|
-
this.result = this.result * Math.pow(
|
|
659
|
+
addToNumericResult(e, t, r, a) {
|
|
660
|
+
if (t !== r) {
|
|
661
|
+
const n = r - t;
|
|
662
|
+
this.result = this.result * Math.pow(a, n) + Number.parseInt(e.substr(t, n), a), this.consumed += n;
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
/**
|
|
@@ -672,15 +672,15 @@ class ut {
|
|
|
672
672
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
673
673
|
*/
|
|
674
674
|
stateNumericHex(e, t) {
|
|
675
|
-
const
|
|
675
|
+
const r = t;
|
|
676
676
|
for (; t < e.length; ) {
|
|
677
|
-
const
|
|
678
|
-
if (
|
|
677
|
+
const a = e.charCodeAt(t);
|
|
678
|
+
if (pe(a) || Yu(a))
|
|
679
679
|
t += 1;
|
|
680
680
|
else
|
|
681
|
-
return this.addToNumericResult(e,
|
|
681
|
+
return this.addToNumericResult(e, r, t, 16), this.emitNumericEntity(a, 3);
|
|
682
682
|
}
|
|
683
|
-
return this.addToNumericResult(e,
|
|
683
|
+
return this.addToNumericResult(e, r, t, 16), -1;
|
|
684
684
|
}
|
|
685
685
|
/**
|
|
686
686
|
* Parses a decimal numeric entity.
|
|
@@ -692,15 +692,15 @@ class ut {
|
|
|
692
692
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
693
693
|
*/
|
|
694
694
|
stateNumericDecimal(e, t) {
|
|
695
|
-
const
|
|
695
|
+
const r = t;
|
|
696
696
|
for (; t < e.length; ) {
|
|
697
|
-
const
|
|
698
|
-
if (
|
|
697
|
+
const a = e.charCodeAt(t);
|
|
698
|
+
if (pe(a))
|
|
699
699
|
t += 1;
|
|
700
700
|
else
|
|
701
|
-
return this.addToNumericResult(e,
|
|
701
|
+
return this.addToNumericResult(e, r, t, 10), this.emitNumericEntity(a, 2);
|
|
702
702
|
}
|
|
703
|
-
return this.addToNumericResult(e,
|
|
703
|
+
return this.addToNumericResult(e, r, t, 10), -1;
|
|
704
704
|
}
|
|
705
705
|
/**
|
|
706
706
|
* Validate and emit a numeric entity.
|
|
@@ -716,14 +716,14 @@ class ut {
|
|
|
716
716
|
* @returns The number of characters that were consumed.
|
|
717
717
|
*/
|
|
718
718
|
emitNumericEntity(e, t) {
|
|
719
|
-
var
|
|
719
|
+
var r;
|
|
720
720
|
if (this.consumed <= t)
|
|
721
|
-
return (
|
|
721
|
+
return (r = this.errors) === null || r === void 0 || r.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
722
722
|
if (e === V.SEMI)
|
|
723
723
|
this.consumed += 1;
|
|
724
|
-
else if (this.decodeMode ===
|
|
724
|
+
else if (this.decodeMode === F.Strict)
|
|
725
725
|
return 0;
|
|
726
|
-
return this.emitCodePoint(
|
|
726
|
+
return this.emitCodePoint(Qu(this.result), this.consumed), this.errors && (e !== V.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
727
727
|
}
|
|
728
728
|
/**
|
|
729
729
|
* Parses a named entity.
|
|
@@ -735,19 +735,19 @@ class ut {
|
|
|
735
735
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
736
736
|
*/
|
|
737
737
|
stateNamedEntity(e, t) {
|
|
738
|
-
const { decodeTree:
|
|
739
|
-
let
|
|
738
|
+
const { decodeTree: r } = this;
|
|
739
|
+
let a = r[this.treeIndex], n = (a & W.VALUE_LENGTH) >> 14;
|
|
740
740
|
for (; t < e.length; t++, this.excess++) {
|
|
741
741
|
const s = e.charCodeAt(t);
|
|
742
|
-
if (this.treeIndex =
|
|
742
|
+
if (this.treeIndex = rt(r, a, this.treeIndex + Math.max(1, n), s), this.treeIndex < 0)
|
|
743
743
|
return this.result === 0 || // If we are parsing an attribute
|
|
744
|
-
this.decodeMode ===
|
|
744
|
+
this.decodeMode === F.Attribute && // We shouldn't have consumed any characters after the entity,
|
|
745
745
|
(n === 0 || // And there should be no invalid characters.
|
|
746
|
-
|
|
747
|
-
if (
|
|
746
|
+
ut(s)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
747
|
+
if (a = r[this.treeIndex], n = (a & W.VALUE_LENGTH) >> 14, n !== 0) {
|
|
748
748
|
if (s === V.SEMI)
|
|
749
749
|
return this.emitNamedEntityData(this.treeIndex, n, this.consumed + this.excess);
|
|
750
|
-
this.decodeMode !==
|
|
750
|
+
this.decodeMode !== F.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
753
|
return -1;
|
|
@@ -759,8 +759,8 @@ class ut {
|
|
|
759
759
|
*/
|
|
760
760
|
emitNotTerminatedNamedEntity() {
|
|
761
761
|
var e;
|
|
762
|
-
const { result: t, decodeTree:
|
|
763
|
-
return this.emitNamedEntityData(t,
|
|
762
|
+
const { result: t, decodeTree: r } = this, a = (r[t] & W.VALUE_LENGTH) >> 14;
|
|
763
|
+
return this.emitNamedEntityData(t, a, this.consumed), (e = this.errors) === null || e === void 0 || e.missingSemicolonAfterCharacterReference(), this.consumed;
|
|
764
764
|
}
|
|
765
765
|
/**
|
|
766
766
|
* Emit a named entity.
|
|
@@ -771,9 +771,9 @@ class ut {
|
|
|
771
771
|
*
|
|
772
772
|
* @returns The number of characters consumed.
|
|
773
773
|
*/
|
|
774
|
-
emitNamedEntityData(e, t,
|
|
775
|
-
const { decodeTree:
|
|
776
|
-
return this.emitCodePoint(t === 1 ?
|
|
774
|
+
emitNamedEntityData(e, t, r) {
|
|
775
|
+
const { decodeTree: a } = this;
|
|
776
|
+
return this.emitCodePoint(t === 1 ? a[e] & ~W.VALUE_LENGTH : a[e + 1], r), t === 3 && this.emitCodePoint(a[e + 2], r), r;
|
|
777
777
|
}
|
|
778
778
|
/**
|
|
779
779
|
* Signal to the parser that the end of the input was reached.
|
|
@@ -786,7 +786,7 @@ class ut {
|
|
|
786
786
|
var e;
|
|
787
787
|
switch (this.state) {
|
|
788
788
|
case j.NamedEntity:
|
|
789
|
-
return this.result !== 0 && (this.decodeMode !==
|
|
789
|
+
return this.result !== 0 && (this.decodeMode !== F.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
790
790
|
// Otherwise, emit a numeric entity if we have one.
|
|
791
791
|
case j.NumericDecimal:
|
|
792
792
|
return this.emitNumericEntity(0, 2);
|
|
@@ -799,47 +799,47 @@ class ut {
|
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
const
|
|
804
|
-
if (
|
|
805
|
-
return n !== 0 &&
|
|
802
|
+
function rt(u, e, t, r) {
|
|
803
|
+
const a = (e & W.BRANCH_LENGTH) >> 7, n = e & W.JUMP_TABLE;
|
|
804
|
+
if (a === 0)
|
|
805
|
+
return n !== 0 && r === n ? t : -1;
|
|
806
806
|
if (n) {
|
|
807
|
-
const o =
|
|
808
|
-
return o < 0 || o >=
|
|
807
|
+
const o = r - n;
|
|
808
|
+
return o < 0 || o >= a ? -1 : u[t + o] - 1;
|
|
809
809
|
}
|
|
810
|
-
let s = t, i = s +
|
|
810
|
+
let s = t, i = s + a - 1;
|
|
811
811
|
for (; s <= i; ) {
|
|
812
812
|
const o = s + i >>> 1, c = u[o];
|
|
813
|
-
if (c <
|
|
813
|
+
if (c < r)
|
|
814
814
|
s = o + 1;
|
|
815
|
-
else if (c >
|
|
815
|
+
else if (c > r)
|
|
816
816
|
i = o - 1;
|
|
817
817
|
else
|
|
818
|
-
return u[o +
|
|
818
|
+
return u[o + a];
|
|
819
819
|
}
|
|
820
820
|
return -1;
|
|
821
821
|
}
|
|
822
|
-
var
|
|
822
|
+
var v;
|
|
823
823
|
(function(u) {
|
|
824
824
|
u[u.Tab = 9] = "Tab", u[u.NewLine = 10] = "NewLine", u[u.FormFeed = 12] = "FormFeed", u[u.CarriageReturn = 13] = "CarriageReturn", u[u.Space = 32] = "Space", u[u.ExclamationMark = 33] = "ExclamationMark", u[u.Number = 35] = "Number", u[u.Amp = 38] = "Amp", u[u.SingleQuote = 39] = "SingleQuote", u[u.DoubleQuote = 34] = "DoubleQuote", u[u.Dash = 45] = "Dash", u[u.Slash = 47] = "Slash", u[u.Zero = 48] = "Zero", u[u.Nine = 57] = "Nine", u[u.Semi = 59] = "Semi", u[u.Lt = 60] = "Lt", u[u.Eq = 61] = "Eq", u[u.Gt = 62] = "Gt", u[u.Questionmark = 63] = "Questionmark", u[u.UpperA = 65] = "UpperA", u[u.LowerA = 97] = "LowerA", u[u.UpperF = 70] = "UpperF", u[u.LowerF = 102] = "LowerF", u[u.UpperZ = 90] = "UpperZ", u[u.LowerZ = 122] = "LowerZ", u[u.LowerX = 120] = "LowerX", u[u.OpeningSquareBracket = 91] = "OpeningSquareBracket";
|
|
825
|
-
})(
|
|
825
|
+
})(v || (v = {}));
|
|
826
826
|
var f;
|
|
827
827
|
(function(u) {
|
|
828
828
|
u[u.Text = 1] = "Text", u[u.BeforeTagName = 2] = "BeforeTagName", u[u.InTagName = 3] = "InTagName", u[u.InSelfClosingTag = 4] = "InSelfClosingTag", u[u.BeforeClosingTagName = 5] = "BeforeClosingTagName", u[u.InClosingTagName = 6] = "InClosingTagName", u[u.AfterClosingTagName = 7] = "AfterClosingTagName", u[u.BeforeAttributeName = 8] = "BeforeAttributeName", u[u.InAttributeName = 9] = "InAttributeName", u[u.AfterAttributeName = 10] = "AfterAttributeName", u[u.BeforeAttributeValue = 11] = "BeforeAttributeValue", u[u.InAttributeValueDq = 12] = "InAttributeValueDq", u[u.InAttributeValueSq = 13] = "InAttributeValueSq", u[u.InAttributeValueNq = 14] = "InAttributeValueNq", u[u.BeforeDeclaration = 15] = "BeforeDeclaration", u[u.InDeclaration = 16] = "InDeclaration", u[u.InProcessingInstruction = 17] = "InProcessingInstruction", u[u.BeforeComment = 18] = "BeforeComment", u[u.CDATASequence = 19] = "CDATASequence", u[u.InSpecialComment = 20] = "InSpecialComment", u[u.InCommentLike = 21] = "InCommentLike", u[u.BeforeSpecialS = 22] = "BeforeSpecialS", u[u.BeforeSpecialT = 23] = "BeforeSpecialT", u[u.SpecialStartSequence = 24] = "SpecialStartSequence", u[u.InSpecialTag = 25] = "InSpecialTag", u[u.InEntity = 26] = "InEntity";
|
|
829
829
|
})(f || (f = {}));
|
|
830
830
|
function U(u) {
|
|
831
|
-
return u ===
|
|
831
|
+
return u === v.Space || u === v.NewLine || u === v.Tab || u === v.FormFeed || u === v.CarriageReturn;
|
|
832
832
|
}
|
|
833
|
-
function
|
|
834
|
-
return u ===
|
|
833
|
+
function re(u) {
|
|
834
|
+
return u === v.Slash || u === v.Gt || U(u);
|
|
835
835
|
}
|
|
836
836
|
function at(u) {
|
|
837
|
-
return u >=
|
|
837
|
+
return u >= v.LowerA && u <= v.LowerZ || u >= v.UpperA && u <= v.UpperZ;
|
|
838
838
|
}
|
|
839
|
-
var
|
|
839
|
+
var $;
|
|
840
840
|
(function(u) {
|
|
841
841
|
u[u.NoValue = 0] = "NoValue", u[u.Unquoted = 1] = "Unquoted", u[u.Single = 2] = "Single", u[u.Double = 3] = "Double";
|
|
842
|
-
})(
|
|
842
|
+
})($ || ($ = {}));
|
|
843
843
|
const N = {
|
|
844
844
|
Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
|
|
845
845
|
// CDATA[
|
|
@@ -869,9 +869,9 @@ const N = {
|
|
|
869
869
|
XmpEnd: new Uint8Array([60, 47, 120, 109, 112])
|
|
870
870
|
// `</xmp`
|
|
871
871
|
};
|
|
872
|
-
class
|
|
873
|
-
constructor({ xmlMode: e = !1, decodeEntities: t = !0 },
|
|
874
|
-
this.cbs =
|
|
872
|
+
class nt {
|
|
873
|
+
constructor({ xmlMode: e = !1, decodeEntities: t = !0 }, r) {
|
|
874
|
+
this.cbs = r, this.state = f.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = f.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = e, this.decodeEntities = t, this.entityDecoder = new tt(e ? zu : Xu, (a, n) => this.emitCodePoint(a, n));
|
|
875
875
|
}
|
|
876
876
|
reset() {
|
|
877
877
|
this.state = f.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = f.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0;
|
|
@@ -889,13 +889,13 @@ class rt {
|
|
|
889
889
|
this.running = !0, this.index < this.buffer.length + this.offset && this.parse();
|
|
890
890
|
}
|
|
891
891
|
stateText(e) {
|
|
892
|
-
e ===
|
|
892
|
+
e === v.Lt || !this.decodeEntities && this.fastForwardTo(v.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = f.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && e === v.Amp && this.startEntity();
|
|
893
893
|
}
|
|
894
894
|
stateSpecialStartSequence(e) {
|
|
895
895
|
const t = this.sequenceIndex === this.currentSequence.length;
|
|
896
896
|
if (!(t ? (
|
|
897
897
|
// If we are at the end of the sequence, make sure the tag name has ended
|
|
898
|
-
|
|
898
|
+
re(e)
|
|
899
899
|
) : (
|
|
900
900
|
// Otherwise, do a case-insensitive comparison
|
|
901
901
|
(e | 32) === this.currentSequence[this.sequenceIndex]
|
|
@@ -910,18 +910,18 @@ class rt {
|
|
|
910
910
|
/** Look for an end tag. For <title> tags, also decode entities. */
|
|
911
911
|
stateInSpecialTag(e) {
|
|
912
912
|
if (this.sequenceIndex === this.currentSequence.length) {
|
|
913
|
-
if (e ===
|
|
913
|
+
if (e === v.Gt || U(e)) {
|
|
914
914
|
const t = this.index - this.currentSequence.length;
|
|
915
915
|
if (this.sectionStart < t) {
|
|
916
|
-
const
|
|
917
|
-
this.index = t, this.cbs.ontext(this.sectionStart, t), this.index =
|
|
916
|
+
const r = this.index;
|
|
917
|
+
this.index = t, this.cbs.ontext(this.sectionStart, t), this.index = r;
|
|
918
918
|
}
|
|
919
919
|
this.isSpecial = !1, this.sectionStart = t + 2, this.stateInClosingTagName(e);
|
|
920
920
|
return;
|
|
921
921
|
}
|
|
922
922
|
this.sequenceIndex = 0;
|
|
923
923
|
}
|
|
924
|
-
(e | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === N.TitleEnd ? this.decodeEntities && e ===
|
|
924
|
+
(e | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === N.TitleEnd ? this.decodeEntities && e === v.Amp && this.startEntity() : this.fastForwardTo(v.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(e === v.Lt);
|
|
925
925
|
}
|
|
926
926
|
stateCDATASequence(e) {
|
|
927
927
|
e === N.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === N.Cdata.length && (this.state = f.InCommentLike, this.currentSequence = N.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = f.InDeclaration, this.stateInDeclaration(e));
|
|
@@ -956,74 +956,74 @@ class rt {
|
|
|
956
956
|
* We allow anything that wouldn't end the tag.
|
|
957
957
|
*/
|
|
958
958
|
isTagStartChar(e) {
|
|
959
|
-
return this.xmlMode ? !
|
|
959
|
+
return this.xmlMode ? !re(e) : at(e);
|
|
960
960
|
}
|
|
961
961
|
startSpecial(e, t) {
|
|
962
962
|
this.isSpecial = !0, this.currentSequence = e, this.sequenceIndex = t, this.state = f.SpecialStartSequence;
|
|
963
963
|
}
|
|
964
964
|
stateBeforeTagName(e) {
|
|
965
|
-
if (e ===
|
|
965
|
+
if (e === v.ExclamationMark)
|
|
966
966
|
this.state = f.BeforeDeclaration, this.sectionStart = this.index + 1;
|
|
967
|
-
else if (e ===
|
|
967
|
+
else if (e === v.Questionmark)
|
|
968
968
|
this.state = f.InProcessingInstruction, this.sectionStart = this.index + 1;
|
|
969
969
|
else if (this.isTagStartChar(e)) {
|
|
970
970
|
const t = e | 32;
|
|
971
971
|
this.sectionStart = this.index, this.xmlMode ? this.state = f.InTagName : t === N.ScriptEnd[2] ? this.state = f.BeforeSpecialS : t === N.TitleEnd[2] || t === N.XmpEnd[2] ? this.state = f.BeforeSpecialT : this.state = f.InTagName;
|
|
972
|
-
} else e ===
|
|
972
|
+
} else e === v.Slash ? this.state = f.BeforeClosingTagName : (this.state = f.Text, this.stateText(e));
|
|
973
973
|
}
|
|
974
974
|
stateInTagName(e) {
|
|
975
|
-
|
|
975
|
+
re(e) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = f.BeforeAttributeName, this.stateBeforeAttributeName(e));
|
|
976
976
|
}
|
|
977
977
|
stateBeforeClosingTagName(e) {
|
|
978
|
-
U(e) || (e ===
|
|
978
|
+
U(e) || (e === v.Gt ? this.state = f.Text : (this.state = this.isTagStartChar(e) ? f.InClosingTagName : f.InSpecialComment, this.sectionStart = this.index));
|
|
979
979
|
}
|
|
980
980
|
stateInClosingTagName(e) {
|
|
981
|
-
(e ===
|
|
981
|
+
(e === v.Gt || U(e)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = f.AfterClosingTagName, this.stateAfterClosingTagName(e));
|
|
982
982
|
}
|
|
983
983
|
stateAfterClosingTagName(e) {
|
|
984
|
-
(e ===
|
|
984
|
+
(e === v.Gt || this.fastForwardTo(v.Gt)) && (this.state = f.Text, this.sectionStart = this.index + 1);
|
|
985
985
|
}
|
|
986
986
|
stateBeforeAttributeName(e) {
|
|
987
|
-
e ===
|
|
987
|
+
e === v.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = f.InSpecialTag, this.sequenceIndex = 0) : this.state = f.Text, this.sectionStart = this.index + 1) : e === v.Slash ? this.state = f.InSelfClosingTag : U(e) || (this.state = f.InAttributeName, this.sectionStart = this.index);
|
|
988
988
|
}
|
|
989
989
|
stateInSelfClosingTag(e) {
|
|
990
|
-
e ===
|
|
990
|
+
e === v.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = f.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : U(e) || (this.state = f.BeforeAttributeName, this.stateBeforeAttributeName(e));
|
|
991
991
|
}
|
|
992
992
|
stateInAttributeName(e) {
|
|
993
|
-
(e ===
|
|
993
|
+
(e === v.Eq || re(e)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = f.AfterAttributeName, this.stateAfterAttributeName(e));
|
|
994
994
|
}
|
|
995
995
|
stateAfterAttributeName(e) {
|
|
996
|
-
e ===
|
|
996
|
+
e === v.Eq ? this.state = f.BeforeAttributeValue : e === v.Slash || e === v.Gt ? (this.cbs.onattribend($.NoValue, this.sectionStart), this.sectionStart = -1, this.state = f.BeforeAttributeName, this.stateBeforeAttributeName(e)) : U(e) || (this.cbs.onattribend($.NoValue, this.sectionStart), this.state = f.InAttributeName, this.sectionStart = this.index);
|
|
997
997
|
}
|
|
998
998
|
stateBeforeAttributeValue(e) {
|
|
999
|
-
e ===
|
|
999
|
+
e === v.DoubleQuote ? (this.state = f.InAttributeValueDq, this.sectionStart = this.index + 1) : e === v.SingleQuote ? (this.state = f.InAttributeValueSq, this.sectionStart = this.index + 1) : U(e) || (this.sectionStart = this.index, this.state = f.InAttributeValueNq, this.stateInAttributeValueNoQuotes(e));
|
|
1000
1000
|
}
|
|
1001
1001
|
handleInAttributeValue(e, t) {
|
|
1002
|
-
e === t || !this.decodeEntities && this.fastForwardTo(t) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(t ===
|
|
1002
|
+
e === t || !this.decodeEntities && this.fastForwardTo(t) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(t === v.DoubleQuote ? $.Double : $.Single, this.index + 1), this.state = f.BeforeAttributeName) : this.decodeEntities && e === v.Amp && this.startEntity();
|
|
1003
1003
|
}
|
|
1004
1004
|
stateInAttributeValueDoubleQuotes(e) {
|
|
1005
|
-
this.handleInAttributeValue(e,
|
|
1005
|
+
this.handleInAttributeValue(e, v.DoubleQuote);
|
|
1006
1006
|
}
|
|
1007
1007
|
stateInAttributeValueSingleQuotes(e) {
|
|
1008
|
-
this.handleInAttributeValue(e,
|
|
1008
|
+
this.handleInAttributeValue(e, v.SingleQuote);
|
|
1009
1009
|
}
|
|
1010
1010
|
stateInAttributeValueNoQuotes(e) {
|
|
1011
|
-
U(e) || e ===
|
|
1011
|
+
U(e) || e === v.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend($.Unquoted, this.index), this.state = f.BeforeAttributeName, this.stateBeforeAttributeName(e)) : this.decodeEntities && e === v.Amp && this.startEntity();
|
|
1012
1012
|
}
|
|
1013
1013
|
stateBeforeDeclaration(e) {
|
|
1014
|
-
e ===
|
|
1014
|
+
e === v.OpeningSquareBracket ? (this.state = f.CDATASequence, this.sequenceIndex = 0) : this.state = e === v.Dash ? f.BeforeComment : f.InDeclaration;
|
|
1015
1015
|
}
|
|
1016
1016
|
stateInDeclaration(e) {
|
|
1017
|
-
(e ===
|
|
1017
|
+
(e === v.Gt || this.fastForwardTo(v.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = f.Text, this.sectionStart = this.index + 1);
|
|
1018
1018
|
}
|
|
1019
1019
|
stateInProcessingInstruction(e) {
|
|
1020
|
-
(e ===
|
|
1020
|
+
(e === v.Gt || this.fastForwardTo(v.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = f.Text, this.sectionStart = this.index + 1);
|
|
1021
1021
|
}
|
|
1022
1022
|
stateBeforeComment(e) {
|
|
1023
|
-
e ===
|
|
1023
|
+
e === v.Dash ? (this.state = f.InCommentLike, this.currentSequence = N.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = f.InDeclaration;
|
|
1024
1024
|
}
|
|
1025
1025
|
stateInSpecialComment(e) {
|
|
1026
|
-
(e ===
|
|
1026
|
+
(e === v.Gt || this.fastForwardTo(v.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = f.Text, this.sectionStart = this.index + 1);
|
|
1027
1027
|
}
|
|
1028
1028
|
stateBeforeSpecialS(e) {
|
|
1029
1029
|
const t = e | 32;
|
|
@@ -1048,7 +1048,7 @@ class rt {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
1050
|
startEntity() {
|
|
1051
|
-
this.baseState = this.state, this.state = f.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ?
|
|
1051
|
+
this.baseState = this.state, this.state = f.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? F.Strict : this.baseState === f.Text || this.baseState === f.InSpecialTag ? F.Legacy : F.Attribute);
|
|
1052
1052
|
}
|
|
1053
1053
|
stateInEntity() {
|
|
1054
1054
|
const e = this.entityDecoder.write(this.buffer, this.index - this.offset);
|
|
@@ -1193,7 +1193,7 @@ class rt {
|
|
|
1193
1193
|
this.baseState !== f.Text && this.baseState !== f.InSpecialTag ? (this.sectionStart < this.entityStart && this.cbs.onattribdata(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + t, this.index = this.sectionStart - 1, this.cbs.onattribentity(e)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + t, this.index = this.sectionStart - 1, this.cbs.ontextentity(e, this.sectionStart));
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
|
-
const
|
|
1196
|
+
const Z = /* @__PURE__ */ new Set([
|
|
1197
1197
|
"input",
|
|
1198
1198
|
"option",
|
|
1199
1199
|
"optgroup",
|
|
@@ -1201,7 +1201,7 @@ const z = /* @__PURE__ */ new Set([
|
|
|
1201
1201
|
"button",
|
|
1202
1202
|
"datalist",
|
|
1203
1203
|
"textarea"
|
|
1204
|
-
]), T = /* @__PURE__ */ new Set(["p"]), Ne = /* @__PURE__ */ new Set(["thead", "tbody"]), je = /* @__PURE__ */ new Set(["dd", "dt"]), Ve = /* @__PURE__ */ new Set(["rt", "rp"]),
|
|
1204
|
+
]), T = /* @__PURE__ */ new Set(["p"]), Ne = /* @__PURE__ */ new Set(["thead", "tbody"]), je = /* @__PURE__ */ new Set(["dd", "dt"]), Ve = /* @__PURE__ */ new Set(["rt", "rp"]), st = /* @__PURE__ */ new Map([
|
|
1205
1205
|
["tr", /* @__PURE__ */ new Set(["tr", "th", "td"])],
|
|
1206
1206
|
["th", /* @__PURE__ */ new Set(["th"])],
|
|
1207
1207
|
["td", /* @__PURE__ */ new Set(["thead", "th", "td"])],
|
|
@@ -1214,12 +1214,12 @@ const z = /* @__PURE__ */ new Set([
|
|
|
1214
1214
|
["h4", T],
|
|
1215
1215
|
["h5", T],
|
|
1216
1216
|
["h6", T],
|
|
1217
|
-
["select",
|
|
1218
|
-
["input",
|
|
1219
|
-
["output",
|
|
1220
|
-
["button",
|
|
1221
|
-
["datalist",
|
|
1222
|
-
["textarea",
|
|
1217
|
+
["select", Z],
|
|
1218
|
+
["input", Z],
|
|
1219
|
+
["output", Z],
|
|
1220
|
+
["button", Z],
|
|
1221
|
+
["datalist", Z],
|
|
1222
|
+
["textarea", Z],
|
|
1223
1223
|
["option", /* @__PURE__ */ new Set(["option"])],
|
|
1224
1224
|
["optgroup", /* @__PURE__ */ new Set(["optgroup", "option"])],
|
|
1225
1225
|
["dd", je],
|
|
@@ -1249,7 +1249,7 @@ const z = /* @__PURE__ */ new Set([
|
|
|
1249
1249
|
["rp", Ve],
|
|
1250
1250
|
["tbody", Ne],
|
|
1251
1251
|
["tfoot", Ne]
|
|
1252
|
-
]),
|
|
1252
|
+
]), it = /* @__PURE__ */ new Set([
|
|
1253
1253
|
"area",
|
|
1254
1254
|
"base",
|
|
1255
1255
|
"basefont",
|
|
@@ -1279,51 +1279,51 @@ const z = /* @__PURE__ */ new Set([
|
|
|
1279
1279
|
"foreignobject",
|
|
1280
1280
|
"desc",
|
|
1281
1281
|
"title"
|
|
1282
|
-
]),
|
|
1283
|
-
class
|
|
1282
|
+
]), ct = /\s|\//;
|
|
1283
|
+
class ot {
|
|
1284
1284
|
constructor(e, t = {}) {
|
|
1285
|
-
var
|
|
1286
|
-
this.options = t, this.startIndex = 0, this.endIndex = 0, this.openTagStart = 0, this.tagname = "", this.attribname = "", this.attribvalue = "", this.attribs = null, this.stack = [], this.buffers = [], this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1, this.cbs = e ?? {}, this.htmlMode = !this.options.xmlMode, this.lowerCaseTagNames = (
|
|
1285
|
+
var r, a, n, s, i, o;
|
|
1286
|
+
this.options = t, this.startIndex = 0, this.endIndex = 0, this.openTagStart = 0, this.tagname = "", this.attribname = "", this.attribvalue = "", this.attribs = null, this.stack = [], this.buffers = [], this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1, this.cbs = e ?? {}, this.htmlMode = !this.options.xmlMode, this.lowerCaseTagNames = (r = t.lowerCaseTags) !== null && r !== void 0 ? r : this.htmlMode, this.lowerCaseAttributeNames = (a = t.lowerCaseAttributeNames) !== null && a !== void 0 ? a : this.htmlMode, this.recognizeSelfClosing = (n = t.recognizeSelfClosing) !== null && n !== void 0 ? n : !this.htmlMode, this.tokenizer = new ((s = t.Tokenizer) !== null && s !== void 0 ? s : nt)(this.options, this), this.foreignContext = [!this.htmlMode], (o = (i = this.cbs).onparserinit) === null || o === void 0 || o.call(i, this);
|
|
1287
1287
|
}
|
|
1288
1288
|
// Tokenizer event handlers
|
|
1289
1289
|
/** @internal */
|
|
1290
1290
|
ontext(e, t) {
|
|
1291
|
-
var
|
|
1291
|
+
var r, a;
|
|
1292
1292
|
const n = this.getSlice(e, t);
|
|
1293
|
-
this.endIndex = t - 1, (
|
|
1293
|
+
this.endIndex = t - 1, (a = (r = this.cbs).ontext) === null || a === void 0 || a.call(r, n), this.startIndex = t;
|
|
1294
1294
|
}
|
|
1295
1295
|
/** @internal */
|
|
1296
1296
|
ontextentity(e, t) {
|
|
1297
|
-
var
|
|
1298
|
-
this.endIndex = t - 1, (
|
|
1297
|
+
var r, a;
|
|
1298
|
+
this.endIndex = t - 1, (a = (r = this.cbs).ontext) === null || a === void 0 || a.call(r, Te(e)), this.startIndex = t;
|
|
1299
1299
|
}
|
|
1300
1300
|
/**
|
|
1301
1301
|
* Checks if the current tag is a void element. Override this if you want
|
|
1302
1302
|
* to specify your own additional void elements.
|
|
1303
1303
|
*/
|
|
1304
1304
|
isVoidElement(e) {
|
|
1305
|
-
return this.htmlMode &&
|
|
1305
|
+
return this.htmlMode && it.has(e);
|
|
1306
1306
|
}
|
|
1307
1307
|
/** @internal */
|
|
1308
1308
|
onopentagname(e, t) {
|
|
1309
1309
|
this.endIndex = t;
|
|
1310
|
-
let
|
|
1311
|
-
this.lowerCaseTagNames && (
|
|
1310
|
+
let r = this.getSlice(e, t);
|
|
1311
|
+
this.lowerCaseTagNames && (r = r.toLowerCase()), this.emitOpenTag(r);
|
|
1312
1312
|
}
|
|
1313
1313
|
emitOpenTag(e) {
|
|
1314
|
-
var t,
|
|
1314
|
+
var t, r, a, n;
|
|
1315
1315
|
this.openTagStart = this.startIndex, this.tagname = e;
|
|
1316
|
-
const s = this.htmlMode &&
|
|
1316
|
+
const s = this.htmlMode && st.get(e);
|
|
1317
1317
|
if (s)
|
|
1318
1318
|
for (; this.stack.length > 0 && s.has(this.stack[0]); ) {
|
|
1319
1319
|
const i = this.stack.shift();
|
|
1320
|
-
(
|
|
1320
|
+
(r = (t = this.cbs).onclosetag) === null || r === void 0 || r.call(t, i, !0);
|
|
1321
1321
|
}
|
|
1322
|
-
this.isVoidElement(e) || (this.stack.unshift(e), this.htmlMode && (qe.has(e) ? this.foreignContext.unshift(!0) : De.has(e) && this.foreignContext.unshift(!1))), (n = (
|
|
1322
|
+
this.isVoidElement(e) || (this.stack.unshift(e), this.htmlMode && (qe.has(e) ? this.foreignContext.unshift(!0) : De.has(e) && this.foreignContext.unshift(!1))), (n = (a = this.cbs).onopentagname) === null || n === void 0 || n.call(a, e), this.cbs.onopentag && (this.attribs = {});
|
|
1323
1323
|
}
|
|
1324
1324
|
endOpenTag(e) {
|
|
1325
|
-
var t,
|
|
1326
|
-
this.startIndex = this.openTagStart, this.attribs && ((
|
|
1325
|
+
var t, r;
|
|
1326
|
+
this.startIndex = this.openTagStart, this.attribs && ((r = (t = this.cbs).onopentag) === null || r === void 0 || r.call(t, this.tagname, this.attribs, e), this.attribs = null), this.cbs.onclosetag && this.isVoidElement(this.tagname) && this.cbs.onclosetag(this.tagname, !0), this.tagname = "";
|
|
1327
1327
|
}
|
|
1328
1328
|
/** @internal */
|
|
1329
1329
|
onopentagend(e) {
|
|
@@ -1331,17 +1331,17 @@ class ct {
|
|
|
1331
1331
|
}
|
|
1332
1332
|
/** @internal */
|
|
1333
1333
|
onclosetag(e, t) {
|
|
1334
|
-
var
|
|
1334
|
+
var r, a, n, s, i, o, c, d;
|
|
1335
1335
|
this.endIndex = t;
|
|
1336
1336
|
let l = this.getSlice(e, t);
|
|
1337
1337
|
if (this.lowerCaseTagNames && (l = l.toLowerCase()), this.htmlMode && (qe.has(l) || De.has(l)) && this.foreignContext.shift(), this.isVoidElement(l))
|
|
1338
1338
|
this.htmlMode && l === "br" && ((s = (n = this.cbs).onopentagname) === null || s === void 0 || s.call(n, "br"), (o = (i = this.cbs).onopentag) === null || o === void 0 || o.call(i, "br", {}, !0), (d = (c = this.cbs).onclosetag) === null || d === void 0 || d.call(c, "br", !1));
|
|
1339
1339
|
else {
|
|
1340
|
-
const
|
|
1341
|
-
if (
|
|
1342
|
-
for (let
|
|
1343
|
-
const
|
|
1344
|
-
(
|
|
1340
|
+
const b = this.stack.indexOf(l);
|
|
1341
|
+
if (b !== -1)
|
|
1342
|
+
for (let p = 0; p <= b; p++) {
|
|
1343
|
+
const x = this.stack.shift();
|
|
1344
|
+
(a = (r = this.cbs).onclosetag) === null || a === void 0 || a.call(r, x, p !== b);
|
|
1345
1345
|
}
|
|
1346
1346
|
else this.htmlMode && l === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(!0));
|
|
1347
1347
|
}
|
|
@@ -1352,15 +1352,15 @@ class ct {
|
|
|
1352
1352
|
this.endIndex = e, this.recognizeSelfClosing || this.foreignContext[0] ? (this.closeCurrentTag(!1), this.startIndex = e + 1) : this.onopentagend(e);
|
|
1353
1353
|
}
|
|
1354
1354
|
closeCurrentTag(e) {
|
|
1355
|
-
var t,
|
|
1356
|
-
const
|
|
1357
|
-
this.endOpenTag(e), this.stack[0] ===
|
|
1355
|
+
var t, r;
|
|
1356
|
+
const a = this.tagname;
|
|
1357
|
+
this.endOpenTag(e), this.stack[0] === a && ((r = (t = this.cbs).onclosetag) === null || r === void 0 || r.call(t, a, !e), this.stack.shift());
|
|
1358
1358
|
}
|
|
1359
1359
|
/** @internal */
|
|
1360
1360
|
onattribname(e, t) {
|
|
1361
1361
|
this.startIndex = e;
|
|
1362
|
-
const
|
|
1363
|
-
this.attribname = this.lowerCaseAttributeNames ?
|
|
1362
|
+
const r = this.getSlice(e, t);
|
|
1363
|
+
this.attribname = this.lowerCaseAttributeNames ? r.toLowerCase() : r;
|
|
1364
1364
|
}
|
|
1365
1365
|
/** @internal */
|
|
1366
1366
|
onattribdata(e, t) {
|
|
@@ -1372,53 +1372,53 @@ class ct {
|
|
|
1372
1372
|
}
|
|
1373
1373
|
/** @internal */
|
|
1374
1374
|
onattribend(e, t) {
|
|
1375
|
-
var
|
|
1376
|
-
this.endIndex = t, (
|
|
1375
|
+
var r, a;
|
|
1376
|
+
this.endIndex = t, (a = (r = this.cbs).onattribute) === null || a === void 0 || a.call(r, this.attribname, this.attribvalue, e === $.Double ? '"' : e === $.Single ? "'" : e === $.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = "";
|
|
1377
1377
|
}
|
|
1378
1378
|
getInstructionName(e) {
|
|
1379
|
-
const t = e.search(
|
|
1380
|
-
let
|
|
1381
|
-
return this.lowerCaseTagNames && (
|
|
1379
|
+
const t = e.search(ct);
|
|
1380
|
+
let r = t < 0 ? e : e.substr(0, t);
|
|
1381
|
+
return this.lowerCaseTagNames && (r = r.toLowerCase()), r;
|
|
1382
1382
|
}
|
|
1383
1383
|
/** @internal */
|
|
1384
1384
|
ondeclaration(e, t) {
|
|
1385
1385
|
this.endIndex = t;
|
|
1386
|
-
const
|
|
1386
|
+
const r = this.getSlice(e, t);
|
|
1387
1387
|
if (this.cbs.onprocessinginstruction) {
|
|
1388
|
-
const
|
|
1389
|
-
this.cbs.onprocessinginstruction(`!${
|
|
1388
|
+
const a = this.getInstructionName(r);
|
|
1389
|
+
this.cbs.onprocessinginstruction(`!${a}`, `!${r}`);
|
|
1390
1390
|
}
|
|
1391
1391
|
this.startIndex = t + 1;
|
|
1392
1392
|
}
|
|
1393
1393
|
/** @internal */
|
|
1394
1394
|
onprocessinginstruction(e, t) {
|
|
1395
1395
|
this.endIndex = t;
|
|
1396
|
-
const
|
|
1396
|
+
const r = this.getSlice(e, t);
|
|
1397
1397
|
if (this.cbs.onprocessinginstruction) {
|
|
1398
|
-
const
|
|
1399
|
-
this.cbs.onprocessinginstruction(`?${
|
|
1398
|
+
const a = this.getInstructionName(r);
|
|
1399
|
+
this.cbs.onprocessinginstruction(`?${a}`, `?${r}`);
|
|
1400
1400
|
}
|
|
1401
1401
|
this.startIndex = t + 1;
|
|
1402
1402
|
}
|
|
1403
1403
|
/** @internal */
|
|
1404
|
-
oncomment(e, t,
|
|
1405
|
-
var
|
|
1406
|
-
this.endIndex = t, (n = (
|
|
1404
|
+
oncomment(e, t, r) {
|
|
1405
|
+
var a, n, s, i;
|
|
1406
|
+
this.endIndex = t, (n = (a = this.cbs).oncomment) === null || n === void 0 || n.call(a, this.getSlice(e, t - r)), (i = (s = this.cbs).oncommentend) === null || i === void 0 || i.call(s), this.startIndex = t + 1;
|
|
1407
1407
|
}
|
|
1408
1408
|
/** @internal */
|
|
1409
|
-
oncdata(e, t,
|
|
1410
|
-
var
|
|
1409
|
+
oncdata(e, t, r) {
|
|
1410
|
+
var a, n, s, i, o, c, d, l, b, p;
|
|
1411
1411
|
this.endIndex = t;
|
|
1412
|
-
const
|
|
1413
|
-
!this.htmlMode || this.options.recognizeCDATA ? ((n = (
|
|
1412
|
+
const x = this.getSlice(e, t - r);
|
|
1413
|
+
!this.htmlMode || this.options.recognizeCDATA ? ((n = (a = this.cbs).oncdatastart) === null || n === void 0 || n.call(a), (i = (s = this.cbs).ontext) === null || i === void 0 || i.call(s, x), (c = (o = this.cbs).oncdataend) === null || c === void 0 || c.call(o)) : ((l = (d = this.cbs).oncomment) === null || l === void 0 || l.call(d, `[CDATA[${x}]]`), (p = (b = this.cbs).oncommentend) === null || p === void 0 || p.call(b)), this.startIndex = t + 1;
|
|
1414
1414
|
}
|
|
1415
1415
|
/** @internal */
|
|
1416
1416
|
onend() {
|
|
1417
1417
|
var e, t;
|
|
1418
1418
|
if (this.cbs.onclosetag) {
|
|
1419
1419
|
this.endIndex = this.startIndex;
|
|
1420
|
-
for (let
|
|
1421
|
-
this.cbs.onclosetag(this.stack[
|
|
1420
|
+
for (let r = 0; r < this.stack.length; r++)
|
|
1421
|
+
this.cbs.onclosetag(this.stack[r], !0);
|
|
1422
1422
|
}
|
|
1423
1423
|
(t = (e = this.cbs).onend) === null || t === void 0 || t.call(e);
|
|
1424
1424
|
}
|
|
@@ -1426,8 +1426,8 @@ class ct {
|
|
|
1426
1426
|
* Resets the parser to a blank state, ready to parse a new HTML document
|
|
1427
1427
|
*/
|
|
1428
1428
|
reset() {
|
|
1429
|
-
var e, t,
|
|
1430
|
-
(t = (e = this.cbs).onreset) === null || t === void 0 || t.call(e), this.tokenizer.reset(), this.tagname = "", this.attribname = "", this.attribs = null, this.stack.length = 0, this.startIndex = 0, this.endIndex = 0, (
|
|
1429
|
+
var e, t, r, a;
|
|
1430
|
+
(t = (e = this.cbs).onreset) === null || t === void 0 || t.call(e), this.tokenizer.reset(), this.tagname = "", this.attribname = "", this.attribs = null, this.stack.length = 0, this.startIndex = 0, this.endIndex = 0, (a = (r = this.cbs).onparserinit) === null || a === void 0 || a.call(r, this), this.buffers.length = 0, this.foreignContext.length = 0, this.foreignContext.unshift(!this.htmlMode), this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1;
|
|
1431
1431
|
}
|
|
1432
1432
|
/**
|
|
1433
1433
|
* Resets the parser, then parses a complete document and
|
|
@@ -1441,10 +1441,10 @@ class ct {
|
|
|
1441
1441
|
getSlice(e, t) {
|
|
1442
1442
|
for (; e - this.bufferOffset >= this.buffers[0].length; )
|
|
1443
1443
|
this.shiftBuffer();
|
|
1444
|
-
let
|
|
1444
|
+
let r = this.buffers[0].slice(e - this.bufferOffset, t - this.bufferOffset);
|
|
1445
1445
|
for (; t - this.bufferOffset > this.buffers[0].length; )
|
|
1446
|
-
this.shiftBuffer(),
|
|
1447
|
-
return
|
|
1446
|
+
this.shiftBuffer(), r += this.buffers[0].slice(0, t - this.bufferOffset);
|
|
1447
|
+
return r;
|
|
1448
1448
|
}
|
|
1449
1449
|
shiftBuffer() {
|
|
1450
1450
|
this.bufferOffset += this.buffers[0].length, this.writeIndex--, this.buffers.shift();
|
|
@@ -1455,9 +1455,9 @@ class ct {
|
|
|
1455
1455
|
* @param chunk Chunk to parse.
|
|
1456
1456
|
*/
|
|
1457
1457
|
write(e) {
|
|
1458
|
-
var t,
|
|
1458
|
+
var t, r;
|
|
1459
1459
|
if (this.ended) {
|
|
1460
|
-
(
|
|
1460
|
+
(r = (t = this.cbs).onerror) === null || r === void 0 || r.call(t, new Error(".write() after done!"));
|
|
1461
1461
|
return;
|
|
1462
1462
|
}
|
|
1463
1463
|
this.buffers.push(e), this.tokenizer.running && (this.tokenizer.write(e), this.writeIndex++);
|
|
@@ -1468,9 +1468,9 @@ class ct {
|
|
|
1468
1468
|
* @param chunk Optional final chunk to parse.
|
|
1469
1469
|
*/
|
|
1470
1470
|
end(e) {
|
|
1471
|
-
var t,
|
|
1471
|
+
var t, r;
|
|
1472
1472
|
if (this.ended) {
|
|
1473
|
-
(
|
|
1473
|
+
(r = (t = this.cbs).onerror) === null || r === void 0 || r.call(t, new Error(".end() after done!"));
|
|
1474
1474
|
return;
|
|
1475
1475
|
}
|
|
1476
1476
|
e && this.write(e), this.ended = !0, this.tokenizer.end();
|
|
@@ -1509,20 +1509,20 @@ class ct {
|
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
1511
|
function Re(u, e = "web") {
|
|
1512
|
-
const t = { name: "", children: [] },
|
|
1513
|
-
let
|
|
1514
|
-
const n = new
|
|
1512
|
+
const t = { name: "", children: [] }, r = [t];
|
|
1513
|
+
let a = "";
|
|
1514
|
+
const n = new ot(
|
|
1515
1515
|
{
|
|
1516
1516
|
onopentag: (s, i, o) => {
|
|
1517
|
-
const c =
|
|
1518
|
-
|
|
1517
|
+
const c = r[r.length - 1];
|
|
1518
|
+
a.trim() && (Array.isArray(c.children) ? c.children.push({
|
|
1519
1519
|
name: "span",
|
|
1520
|
-
children:
|
|
1521
|
-
}) : c.children =
|
|
1520
|
+
children: a.trim()
|
|
1521
|
+
}) : c.children = a.trim(), a = "");
|
|
1522
1522
|
const d = Object.entries(i || {}).reduce(
|
|
1523
|
-
(
|
|
1524
|
-
let [
|
|
1525
|
-
return
|
|
1523
|
+
(b, p) => {
|
|
1524
|
+
let [x = "", S = ""] = p;
|
|
1525
|
+
return x && (b[x] = S), b;
|
|
1526
1526
|
},
|
|
1527
1527
|
{}
|
|
1528
1528
|
);
|
|
@@ -1537,31 +1537,31 @@ function Re(u, e = "web") {
|
|
|
1537
1537
|
children: c.children
|
|
1538
1538
|
},
|
|
1539
1539
|
l
|
|
1540
|
-
] : c.children = [l], o ||
|
|
1540
|
+
] : c.children = [l], o || r.push(l);
|
|
1541
1541
|
},
|
|
1542
1542
|
ontext: (s) => {
|
|
1543
1543
|
const i = s.trim();
|
|
1544
|
-
i && i !== '"' && (
|
|
1544
|
+
i && i !== '"' && (a += i);
|
|
1545
1545
|
},
|
|
1546
1546
|
onclosetag: () => {
|
|
1547
|
-
const s =
|
|
1548
|
-
|
|
1547
|
+
const s = r.pop();
|
|
1548
|
+
a.trim() && (Array.isArray(s?.children) ? s.children.push({
|
|
1549
1549
|
name: "span",
|
|
1550
|
-
children:
|
|
1551
|
-
}) : s && (s.children =
|
|
1550
|
+
children: a.trim()
|
|
1551
|
+
}) : s && (s.children = a.trim()), a = "");
|
|
1552
1552
|
}
|
|
1553
1553
|
},
|
|
1554
1554
|
{ decodeEntities: !0 }
|
|
1555
1555
|
);
|
|
1556
1556
|
return n.write(u.replace(/\\"/g, '"')), n.end(), t.children || [];
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1559
|
-
const
|
|
1560
|
-
imports:
|
|
1558
|
+
function dt(u, e) {
|
|
1559
|
+
const r = {
|
|
1560
|
+
imports: lt(u),
|
|
1561
1561
|
emits: [],
|
|
1562
1562
|
errors: []
|
|
1563
|
-
},
|
|
1564
|
-
return
|
|
1563
|
+
}, a = L(u);
|
|
1564
|
+
return X(a, {
|
|
1565
1565
|
ExportDefaultDeclaration(n) {
|
|
1566
1566
|
const s = n.node.declaration;
|
|
1567
1567
|
if (s.type !== "CallExpression") return;
|
|
@@ -1574,129 +1574,129 @@ function ot(u, e) {
|
|
|
1574
1574
|
), d = o.find(
|
|
1575
1575
|
(l) => l.key.name === "computed"
|
|
1576
1576
|
);
|
|
1577
|
-
d && (
|
|
1577
|
+
d && (r.computed = uu(d.value), r.watchers = xt(d.value));
|
|
1578
1578
|
for (const l of o)
|
|
1579
1579
|
switch (l.key.name) {
|
|
1580
1580
|
case "name":
|
|
1581
|
-
|
|
1581
|
+
r.name = l.value.value;
|
|
1582
1582
|
break;
|
|
1583
1583
|
case "methods":
|
|
1584
|
-
|
|
1584
|
+
r.handlers = ht(l.value), r.methods = mt(l.value), r.dataSources = bt(
|
|
1585
1585
|
l.value,
|
|
1586
1586
|
e
|
|
1587
1587
|
);
|
|
1588
1588
|
break;
|
|
1589
1589
|
case "watch":
|
|
1590
|
-
|
|
1590
|
+
r.watch = gt(
|
|
1591
1591
|
l.value,
|
|
1592
|
-
|
|
1592
|
+
r.watchers
|
|
1593
1593
|
);
|
|
1594
1594
|
break;
|
|
1595
1595
|
case "props":
|
|
1596
|
-
|
|
1596
|
+
r.props = vt(l.value);
|
|
1597
1597
|
break;
|
|
1598
1598
|
case "inject":
|
|
1599
|
-
|
|
1599
|
+
r.inject = It(l.value);
|
|
1600
1600
|
break;
|
|
1601
1601
|
case "expose":
|
|
1602
|
-
|
|
1602
|
+
r.expose = wt(l.value);
|
|
1603
1603
|
break;
|
|
1604
1604
|
case "emits":
|
|
1605
|
-
|
|
1605
|
+
r.emits = At(l.value);
|
|
1606
1606
|
break;
|
|
1607
1607
|
case "directives":
|
|
1608
|
-
|
|
1608
|
+
r.directives = Tt(l.value);
|
|
1609
1609
|
break;
|
|
1610
1610
|
}
|
|
1611
1611
|
for (const l of c)
|
|
1612
1612
|
switch (l.key.name) {
|
|
1613
1613
|
case "setup":
|
|
1614
|
-
|
|
1614
|
+
r.state = pt(l.body);
|
|
1615
1615
|
break;
|
|
1616
1616
|
}
|
|
1617
|
-
|
|
1617
|
+
r.lifeCycles = yt(c);
|
|
1618
1618
|
},
|
|
1619
1619
|
CallExpression(n) {
|
|
1620
|
-
const s =
|
|
1620
|
+
const s = Et(n.node);
|
|
1621
1621
|
if (s.length)
|
|
1622
1622
|
for (let i of s)
|
|
1623
|
-
|
|
1623
|
+
r.emits?.find((c) => c.name === i.name) || r.emits?.push(i);
|
|
1624
1624
|
}
|
|
1625
|
-
}),
|
|
1625
|
+
}), r;
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1628
|
-
const e = /import\s+{(.+?)}\s+from\s+['"](.+?)['"]/g, t = /import\s+(.+?)\s+from\s+['"](.+?)['"]/g,
|
|
1627
|
+
function lt(u) {
|
|
1628
|
+
const e = /import\s+{(.+?)}\s+from\s+['"](.+?)['"]/g, t = /import\s+(.+?)\s+from\s+['"](.+?)['"]/g, r = /^{(.+?)}$/, a = [];
|
|
1629
1629
|
let n;
|
|
1630
1630
|
const s = u.replace(/\n/g, " ");
|
|
1631
1631
|
for (; (n = e.exec(s)) !== null; ) {
|
|
1632
1632
|
const i = n[2] === "@element-plus/icons-vue" ? "@vtj/icons" : n[2];
|
|
1633
|
-
|
|
1633
|
+
a.push({
|
|
1634
1634
|
from: i,
|
|
1635
1635
|
imports: n[1].split(",").map((o) => o.trim())
|
|
1636
1636
|
});
|
|
1637
1637
|
}
|
|
1638
1638
|
for (; (n = t.exec(s)) !== null; ) {
|
|
1639
1639
|
const i = n[1], o = n[2];
|
|
1640
|
-
i && !
|
|
1640
|
+
i && !r.test(i) && a.push({
|
|
1641
1641
|
from: o,
|
|
1642
1642
|
imports: i
|
|
1643
1643
|
});
|
|
1644
1644
|
}
|
|
1645
|
-
return
|
|
1645
|
+
return a;
|
|
1646
1646
|
}
|
|
1647
|
-
function
|
|
1647
|
+
function ft(u) {
|
|
1648
1648
|
for (const e of u.body)
|
|
1649
1649
|
if (e.type === "VariableDeclaration" && e.kind == "const") {
|
|
1650
|
-
const { id: t, init:
|
|
1651
|
-
if (t.loc?.identifierName === "state" &&
|
|
1652
|
-
return
|
|
1650
|
+
const { id: t, init: r } = e.declarations[0];
|
|
1651
|
+
if (t.loc?.identifierName === "state" && r?.type === "CallExpression" && r.callee.loc?.identifierName === "reactive")
|
|
1652
|
+
return r.arguments[0];
|
|
1653
1653
|
}
|
|
1654
1654
|
return null;
|
|
1655
1655
|
}
|
|
1656
|
-
function
|
|
1657
|
-
const e =
|
|
1656
|
+
function pt(u) {
|
|
1657
|
+
const e = ft(u);
|
|
1658
1658
|
if (!e) return {};
|
|
1659
1659
|
const t = {};
|
|
1660
|
-
for (const
|
|
1661
|
-
if (
|
|
1662
|
-
const { key:
|
|
1663
|
-
if (
|
|
1660
|
+
for (const r of e.properties)
|
|
1661
|
+
if (r.type === "ObjectProperty") {
|
|
1662
|
+
const { key: a, value: n } = r;
|
|
1663
|
+
if (a.type === "Identifier") {
|
|
1664
1664
|
const s = A(n);
|
|
1665
|
-
t[
|
|
1665
|
+
t[a.name] = k(s);
|
|
1666
1666
|
}
|
|
1667
|
-
} else if (
|
|
1668
|
-
const { key:
|
|
1669
|
-
if (
|
|
1667
|
+
} else if (r.type === "ObjectMethod") {
|
|
1668
|
+
const { key: a, params: n, body: s } = r;
|
|
1669
|
+
if (a.type === "Identifier") {
|
|
1670
1670
|
const i = A(s), c = `(${n.map((d) => d.name || "none").join(",")}) => ${i}`;
|
|
1671
|
-
t[
|
|
1671
|
+
t[a.name] = k(c);
|
|
1672
1672
|
}
|
|
1673
1673
|
}
|
|
1674
1674
|
return t;
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1677
|
-
const { key: e, async: t, params:
|
|
1676
|
+
function z(u) {
|
|
1677
|
+
const { key: e, async: t, params: r, body: a } = u, n = r?.map((s) => s.type === "ObjectPattern" ? `{${s.properties.map((o) => o.key?.name || o.name).join(",")}}` : s.type === "AssignmentPattern" ? s.left.name + "=" + (s.right?.extra?.raw || "null") : s.name).join(", ");
|
|
1678
1678
|
if (e.type === "Identifier") {
|
|
1679
1679
|
const s = e.name, i = u.value;
|
|
1680
1680
|
if (i && i.type === "ObjectExpression") {
|
|
1681
|
-
const
|
|
1681
|
+
const p = A(i), x = s.startsWith("watcher_");
|
|
1682
1682
|
return {
|
|
1683
|
-
id:
|
|
1683
|
+
id: x ? s.replace("watcher_", "") : "",
|
|
1684
1684
|
name: s,
|
|
1685
|
-
watcher:
|
|
1686
|
-
exp: k(
|
|
1685
|
+
watcher: x,
|
|
1686
|
+
exp: k(p)
|
|
1687
1687
|
};
|
|
1688
1688
|
}
|
|
1689
1689
|
let o = "{}";
|
|
1690
|
-
if (
|
|
1691
|
-
let
|
|
1692
|
-
|
|
1690
|
+
if (a && (o = A(a) || "{}"), i && i.type === "CallExpression") {
|
|
1691
|
+
let p = A(i) || "";
|
|
1692
|
+
p = p.replace("function () {", "() => {"), o = `{ return (${p})}`;
|
|
1693
1693
|
}
|
|
1694
1694
|
const d = `${t ? "async " : ""}(${n}) => ${o}`, l = s.startsWith("watcher_");
|
|
1695
1695
|
return {
|
|
1696
1696
|
id: l ? s.replace("watcher_", "") : "",
|
|
1697
1697
|
name: s,
|
|
1698
1698
|
watcher: l,
|
|
1699
|
-
exp:
|
|
1699
|
+
exp: R(d)
|
|
1700
1700
|
};
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
@@ -1707,14 +1707,14 @@ function uu(u) {
|
|
|
1707
1707
|
if (!u) return {};
|
|
1708
1708
|
const e = {};
|
|
1709
1709
|
for (const t of u.properties) {
|
|
1710
|
-
const
|
|
1711
|
-
|
|
1710
|
+
const r = z(t);
|
|
1711
|
+
r && !r.watcher && !eu(r.exp.value) && (e[r.name] = r.exp);
|
|
1712
1712
|
}
|
|
1713
1713
|
return e;
|
|
1714
1714
|
}
|
|
1715
1715
|
function bt(u, e) {
|
|
1716
1716
|
if (!u) return {};
|
|
1717
|
-
const t = {},
|
|
1717
|
+
const t = {}, r = /apis\['([\w]*)'\]/, a = (n) => {
|
|
1718
1718
|
const s = n.indexOf(".then(");
|
|
1719
1719
|
if (s === -1) return null;
|
|
1720
1720
|
let i = 1, o = s + 6;
|
|
@@ -1725,12 +1725,12 @@ function bt(u, e) {
|
|
|
1725
1725
|
return n.substring(s + 6, o - 1).trim();
|
|
1726
1726
|
};
|
|
1727
1727
|
for (const n of u.properties) {
|
|
1728
|
-
const s =
|
|
1728
|
+
const s = z(n), i = n.body.body?.[0], o = (i?.leadingComments?.[0].value || "").trim(), c = Ye(o);
|
|
1729
1729
|
if (s && eu(s.exp.value)) {
|
|
1730
1730
|
if (s.exp.value.includes("this.provider.apis")) {
|
|
1731
|
-
const l = (s.exp.value.match(
|
|
1731
|
+
const l = (s.exp.value.match(r) || [])[1];
|
|
1732
1732
|
if (!l) continue;
|
|
1733
|
-
const
|
|
1733
|
+
const b = kt(e, l), p = a(s.exp.value);
|
|
1734
1734
|
t[s.name] = {
|
|
1735
1735
|
ref: l,
|
|
1736
1736
|
name: s.name,
|
|
@@ -1741,18 +1741,18 @@ function bt(u, e) {
|
|
|
1741
1741
|
})`
|
|
1742
1742
|
},
|
|
1743
1743
|
type: "api",
|
|
1744
|
-
label:
|
|
1744
|
+
label: b?.label || "",
|
|
1745
1745
|
transform: {
|
|
1746
1746
|
type: "JSFunction",
|
|
1747
|
-
value:
|
|
1747
|
+
value: p || `(res) => {
|
|
1748
1748
|
return res;
|
|
1749
1749
|
}`
|
|
1750
1750
|
},
|
|
1751
|
-
mockTemplate:
|
|
1751
|
+
mockTemplate: b?.mockTemplate
|
|
1752
1752
|
};
|
|
1753
1753
|
}
|
|
1754
1754
|
if (s.exp.value.includes("this.provider.createMock")) {
|
|
1755
|
-
const d = i?.declarations?.[0]?.init?.arguments?.[0], l =
|
|
1755
|
+
const d = i?.declarations?.[0]?.init?.arguments?.[0], l = a(s.exp.value);
|
|
1756
1756
|
t[s.name] = {
|
|
1757
1757
|
ref: "",
|
|
1758
1758
|
name: s.name,
|
|
@@ -1780,152 +1780,152 @@ function bt(u, e) {
|
|
|
1780
1780
|
}
|
|
1781
1781
|
return t;
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1784
|
-
const e = uu(u), t = /\_([\w]{5,})$/,
|
|
1785
|
-
for (const
|
|
1786
|
-
if (!t.test(
|
|
1787
|
-
const n = e[
|
|
1788
|
-
n && (a
|
|
1783
|
+
function mt(u) {
|
|
1784
|
+
const e = uu(u), t = /\_([\w]{5,})$/, r = {};
|
|
1785
|
+
for (const a of Object.keys(e))
|
|
1786
|
+
if (!t.test(a)) {
|
|
1787
|
+
const n = e[a];
|
|
1788
|
+
n && (r[a] = n);
|
|
1789
1789
|
}
|
|
1790
|
-
return
|
|
1790
|
+
return r;
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1792
|
+
function ht(u) {
|
|
1793
1793
|
if (!u) return {};
|
|
1794
1794
|
const e = {}, t = /\_([\w]{5,})$/;
|
|
1795
|
-
for (const
|
|
1796
|
-
const
|
|
1797
|
-
if (t.test(
|
|
1795
|
+
for (const r of u.properties) {
|
|
1796
|
+
const a = r.key.name;
|
|
1797
|
+
if (t.test(a))
|
|
1798
1798
|
try {
|
|
1799
|
-
if (
|
|
1799
|
+
if (r.body.body[0]?.argument) {
|
|
1800
1800
|
const n = A(
|
|
1801
|
-
|
|
1801
|
+
r.body.body[0].argument.callee.object
|
|
1802
1802
|
);
|
|
1803
|
-
e[
|
|
1803
|
+
e[a] = R(n);
|
|
1804
1804
|
} else
|
|
1805
|
-
e[
|
|
1805
|
+
e[a] = z(r)?.exp;
|
|
1806
1806
|
} catch (n) {
|
|
1807
1807
|
console.warn(n);
|
|
1808
1808
|
}
|
|
1809
1809
|
}
|
|
1810
1810
|
return e;
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1812
|
+
function xt(u) {
|
|
1813
1813
|
if (!u) return {};
|
|
1814
1814
|
const e = {};
|
|
1815
1815
|
for (const t of u.properties) {
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1816
|
+
const r = z(t);
|
|
1817
|
+
r && r.watcher && (e[r.name] = r.exp);
|
|
1818
1818
|
}
|
|
1819
1819
|
return e;
|
|
1820
1820
|
}
|
|
1821
|
-
function
|
|
1821
|
+
function ee(u, e) {
|
|
1822
1822
|
return !!tu(u, e);
|
|
1823
1823
|
}
|
|
1824
1824
|
function tu(u, e) {
|
|
1825
1825
|
return u?.find(
|
|
1826
|
-
(
|
|
1826
|
+
(r) => r.key?.name === e
|
|
1827
1827
|
)?.value?.value;
|
|
1828
1828
|
}
|
|
1829
1829
|
function Ce(u, e) {
|
|
1830
1830
|
const t = u?.find(
|
|
1831
|
-
(
|
|
1831
|
+
(r) => r.key?.name === e
|
|
1832
1832
|
);
|
|
1833
1833
|
if (t)
|
|
1834
|
-
return
|
|
1834
|
+
return z(t)?.exp;
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1836
|
+
function gt(u, e = {}) {
|
|
1837
1837
|
const t = [];
|
|
1838
|
-
for (const
|
|
1839
|
-
const { key:
|
|
1838
|
+
for (const r of u.properties) {
|
|
1839
|
+
const { key: a, value: n } = r, s = a.value || a.name || "";
|
|
1840
1840
|
if (e[s]) {
|
|
1841
1841
|
const i = n.properties;
|
|
1842
1842
|
t.push({
|
|
1843
1843
|
id: s.replace("watcher_", ""),
|
|
1844
1844
|
source: e[s],
|
|
1845
|
-
deep:
|
|
1846
|
-
immediate:
|
|
1845
|
+
deep: ee(i, "deep"),
|
|
1846
|
+
immediate: ee(i, "immediate"),
|
|
1847
1847
|
handler: Ce(i, "handler")
|
|
1848
1848
|
});
|
|
1849
|
-
} else if (
|
|
1850
|
-
id:
|
|
1849
|
+
} else if (r.type === "ObjectMethod" && t.push({
|
|
1850
|
+
id: se(),
|
|
1851
1851
|
source: {
|
|
1852
1852
|
type: "JSFunction",
|
|
1853
1853
|
value: `() => { return this.${s}; }`
|
|
1854
1854
|
},
|
|
1855
1855
|
deep: !1,
|
|
1856
1856
|
immediate: !1,
|
|
1857
|
-
handler:
|
|
1858
|
-
}),
|
|
1857
|
+
handler: z(r)?.exp
|
|
1858
|
+
}), r.type === "ObjectProperty") {
|
|
1859
1859
|
const i = n.properties;
|
|
1860
1860
|
t.push({
|
|
1861
|
-
id:
|
|
1861
|
+
id: se(),
|
|
1862
1862
|
source: {
|
|
1863
1863
|
type: "JSFunction",
|
|
1864
1864
|
value: `() => { return this.${s}; }`
|
|
1865
1865
|
},
|
|
1866
|
-
deep:
|
|
1867
|
-
immediate:
|
|
1866
|
+
deep: ee(i, "deep"),
|
|
1867
|
+
immediate: ee(i, "immediate"),
|
|
1868
1868
|
handler: Ce(i, "handler")
|
|
1869
1869
|
});
|
|
1870
1870
|
}
|
|
1871
1871
|
}
|
|
1872
1872
|
return t;
|
|
1873
1873
|
}
|
|
1874
|
-
function
|
|
1874
|
+
function yt(u) {
|
|
1875
1875
|
const e = {};
|
|
1876
1876
|
for (const t of u) {
|
|
1877
|
-
const
|
|
1878
|
-
if (
|
|
1879
|
-
const
|
|
1880
|
-
|
|
1877
|
+
const r = t.key.name;
|
|
1878
|
+
if ($u.includes(r)) {
|
|
1879
|
+
const a = z(t);
|
|
1880
|
+
a && (e[a.name] = a.exp);
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
return e;
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function St(u) {
|
|
1886
1886
|
const e = u?.find(
|
|
1887
1887
|
(t) => t.key?.name === "type"
|
|
1888
1888
|
);
|
|
1889
1889
|
if (e)
|
|
1890
1890
|
return e.value.type === "ArrayExpression" ? e.value.elements.map((t) => t.name) : e.value.name;
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1892
|
+
function ru(u) {
|
|
1893
1893
|
const e = u?.find(
|
|
1894
1894
|
(t) => t.key?.name === "default"
|
|
1895
1895
|
);
|
|
1896
1896
|
if (e)
|
|
1897
1897
|
return k(A(e.value));
|
|
1898
1898
|
}
|
|
1899
|
-
function
|
|
1899
|
+
function vt(u) {
|
|
1900
1900
|
if (!u) return [];
|
|
1901
1901
|
let e = [];
|
|
1902
1902
|
return u.type === "ArrayExpression" ? e = u.elements.map((t) => t.value) : u.type === "ObjectExpression" && (e = u.properties?.map((t) => {
|
|
1903
|
-
const { key:
|
|
1903
|
+
const { key: r, value: a } = t, n = a.properties || [];
|
|
1904
1904
|
return {
|
|
1905
|
-
name:
|
|
1906
|
-
required:
|
|
1907
|
-
type:
|
|
1908
|
-
default:
|
|
1905
|
+
name: r.name,
|
|
1906
|
+
required: ee(n, "required"),
|
|
1907
|
+
type: St(n),
|
|
1908
|
+
default: ru(n)
|
|
1909
1909
|
};
|
|
1910
1910
|
})), e;
|
|
1911
1911
|
}
|
|
1912
|
-
function
|
|
1912
|
+
function Et(u) {
|
|
1913
1913
|
const e = [];
|
|
1914
1914
|
if (u.callee.type === "MemberExpression" && u.callee.property?.name === "$emit") {
|
|
1915
|
-
const [
|
|
1915
|
+
const [r, ...a] = (u.arguments || []).map(
|
|
1916
1916
|
(n) => n.value || n.name
|
|
1917
1917
|
);
|
|
1918
|
-
|
|
1919
|
-
name:
|
|
1920
|
-
params:
|
|
1918
|
+
r && e.push({
|
|
1919
|
+
name: r,
|
|
1920
|
+
params: a.filter((n) => !!n)
|
|
1921
1921
|
});
|
|
1922
1922
|
}
|
|
1923
1923
|
return e;
|
|
1924
1924
|
}
|
|
1925
|
-
function
|
|
1925
|
+
function It(u) {
|
|
1926
1926
|
let e = [];
|
|
1927
1927
|
return u.type === "ObjectExpression" && (e = u.properties?.map((t) => {
|
|
1928
|
-
const { key:
|
|
1928
|
+
const { key: r, value: a } = t, n = a.properties, s = r.name, i = tu(n, "from"), o = ru(n);
|
|
1929
1929
|
return {
|
|
1930
1930
|
name: s,
|
|
1931
1931
|
from: i || s,
|
|
@@ -1933,30 +1933,30 @@ function Et(u) {
|
|
|
1933
1933
|
};
|
|
1934
1934
|
})), e;
|
|
1935
1935
|
}
|
|
1936
|
-
function
|
|
1936
|
+
function wt(u) {
|
|
1937
1937
|
return u && u.elements ? u.elements.map((e) => e?.type === "StringLiteral" ? e.value : "").filter((e) => !!e) : [];
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1939
|
+
function At(u) {
|
|
1940
1940
|
return u && u.elements ? u.elements.map((e) => e?.type === "StringLiteral" && e.value ? { name: e.value, params: [] } : null).filter((e) => !!e) : [];
|
|
1941
1941
|
}
|
|
1942
|
-
function
|
|
1942
|
+
function kt(u, e) {
|
|
1943
1943
|
return (u.apis || []).find((t) => t.id === e || t.name === e);
|
|
1944
1944
|
}
|
|
1945
|
-
function
|
|
1945
|
+
function Tt(u) {
|
|
1946
1946
|
if (!u?.properties) return {};
|
|
1947
1947
|
const e = {};
|
|
1948
1948
|
for (const t of u.properties) {
|
|
1949
|
-
const { key:
|
|
1950
|
-
|
|
1949
|
+
const { key: r, value: a } = t;
|
|
1950
|
+
r?.name && a?.name && (e[r.name] = e[r.name.toLowerCase()] = {
|
|
1951
1951
|
type: "JSExpression",
|
|
1952
|
-
value:
|
|
1952
|
+
value: a.name
|
|
1953
1953
|
});
|
|
1954
1954
|
}
|
|
1955
1955
|
return e;
|
|
1956
1956
|
}
|
|
1957
|
-
let
|
|
1958
|
-
function
|
|
1959
|
-
|
|
1957
|
+
let be = [], ie = {}, au = {}, nu = {}, su = {}, ce = "web", iu = [], me, cu = {};
|
|
1958
|
+
function ou(u, e, t = "", r) {
|
|
1959
|
+
be = [], ie = {}, au = r?.handlers || {}, su = r?.styles || {}, ce = r?.platform || "web", iu = r?.imports || [], nu = r?.directives || {}, me = r?.resolveSchemaImport, cu = r?.componentDefines || {};
|
|
1960
1960
|
const n = We({
|
|
1961
1961
|
id: u,
|
|
1962
1962
|
filename: e,
|
|
@@ -1965,47 +1965,47 @@ function cu(u, e, t = "", a) {
|
|
|
1965
1965
|
slotted: !0
|
|
1966
1966
|
}).ast?.children || [], s = [];
|
|
1967
1967
|
for (const i of n) {
|
|
1968
|
-
const o =
|
|
1968
|
+
const o = Q(i);
|
|
1969
1969
|
Array.isArray(o) ? s.push(...o) : s.push(o);
|
|
1970
1970
|
}
|
|
1971
1971
|
return {
|
|
1972
1972
|
nodes: s.filter((i) => !!i),
|
|
1973
|
-
slots:
|
|
1974
|
-
context:
|
|
1973
|
+
slots: be,
|
|
1974
|
+
context: ie
|
|
1975
1975
|
};
|
|
1976
1976
|
}
|
|
1977
|
-
function
|
|
1977
|
+
function Nt(u) {
|
|
1978
1978
|
if (u.name === "slot") {
|
|
1979
1979
|
let e = "default";
|
|
1980
1980
|
const t = [];
|
|
1981
|
-
for (const [
|
|
1982
|
-
|
|
1983
|
-
|
|
1981
|
+
for (const [r, a] of Object.entries(u.props || {}))
|
|
1982
|
+
r === "name" ? e = a : t.push(r);
|
|
1983
|
+
be.push({
|
|
1984
1984
|
name: e,
|
|
1985
1985
|
params: t
|
|
1986
1986
|
});
|
|
1987
1987
|
}
|
|
1988
1988
|
}
|
|
1989
|
-
function
|
|
1989
|
+
function jt(u) {
|
|
1990
1990
|
const e = {};
|
|
1991
1991
|
for (const t of u) {
|
|
1992
|
-
if (t.type ===
|
|
1992
|
+
if (t.type === E.ATTRIBUTE)
|
|
1993
1993
|
if (t.name === "class") {
|
|
1994
|
-
const
|
|
1994
|
+
const r = t.value?.content || "", a = /[\w]+_[\w]{5,}/, n = r.match(a)?.[0] || "", s = r.split(" ").filter((o) => o !== n), i = su[`.${n}`];
|
|
1995
1995
|
i && (e.style = i), s.length && (e.class = s.join(" "));
|
|
1996
1996
|
} else if (t.name === "style") {
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1997
|
+
const r = t.value?.content || "";
|
|
1998
|
+
r && (e.style = Ke(r));
|
|
1999
1999
|
} else
|
|
2000
2000
|
e[t.name] = t.value?.content || "";
|
|
2001
|
-
if (t.type ===
|
|
2001
|
+
if (t.type === E.DIRECTIVE && t.name === "bind" && (t.exp?.type === E.SIMPLE_EXPRESSION && t.arg?.type === E.SIMPLE_EXPRESSION && (e[t.arg.content] = k(`(${t.exp.content})`)), t.exp?.type === E.COMPOUND_EXPRESSION && t.arg?.type === E.SIMPLE_EXPRESSION))
|
|
2002
2002
|
if (t.arg.content === "class" && e.class) {
|
|
2003
|
-
const
|
|
2003
|
+
const r = t.exp.ast.type, a = Ju(
|
|
2004
2004
|
e.class,
|
|
2005
2005
|
t.exp.loc.source,
|
|
2006
|
-
|
|
2006
|
+
r
|
|
2007
2007
|
);
|
|
2008
|
-
|
|
2008
|
+
a && (e[t.arg.content] = k(a));
|
|
2009
2009
|
} else
|
|
2010
2010
|
e[t.arg.content] = k(
|
|
2011
2011
|
`(${t.exp.loc.source})`
|
|
@@ -2013,91 +2013,91 @@ function Nt(u) {
|
|
|
2013
2013
|
}
|
|
2014
2014
|
return e;
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2016
|
+
function Vt(u = {}) {
|
|
2017
2017
|
const e = {};
|
|
2018
|
-
for (const [t,
|
|
2019
|
-
e[t === "tap" ? "click" : t] =
|
|
2018
|
+
for (const [t, r] of Object.entries(u))
|
|
2019
|
+
e[t === "tap" ? "click" : t] = r;
|
|
2020
2020
|
return e;
|
|
2021
2021
|
}
|
|
2022
|
-
function
|
|
2022
|
+
function qt(u, e = {}) {
|
|
2023
2023
|
const t = {};
|
|
2024
|
-
for (const
|
|
2025
|
-
if (
|
|
2026
|
-
const
|
|
2024
|
+
for (const r of u)
|
|
2025
|
+
if (r.type === E.DIRECTIVE && r.name === "on" && r.arg?.type === E.SIMPLE_EXPRESSION) {
|
|
2026
|
+
const a = r.modifiers.reduce(
|
|
2027
2027
|
(c, d) => (d.content && (c[d.content] = !0), c),
|
|
2028
2028
|
{}
|
|
2029
2029
|
);
|
|
2030
|
-
let n =
|
|
2030
|
+
let n = r.exp?.loc.source || "";
|
|
2031
2031
|
n || (n = "() => {}");
|
|
2032
|
-
const s = new RegExp(`${
|
|
2032
|
+
const s = new RegExp(`${r.arg.content}_[\\w]{5,}`), i = n.match(s)?.[0] || "", o = e[i];
|
|
2033
2033
|
if (i && o)
|
|
2034
|
-
t[
|
|
2035
|
-
name:
|
|
2034
|
+
t[r.arg.content] = {
|
|
2035
|
+
name: r.arg.content,
|
|
2036
2036
|
handler: o,
|
|
2037
|
-
modifiers:
|
|
2037
|
+
modifiers: a
|
|
2038
2038
|
};
|
|
2039
2039
|
else {
|
|
2040
|
-
const c =
|
|
2041
|
-
let
|
|
2040
|
+
const c = r.exp?.ast, d = c?.type, l = d === "CallExpression", b = d === "ArrowFunctionExpression", p = d === "FunctionExpression", x = d === "Identifier", S = d === "MemberExpression", I = !c && /^[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*$/.test(n);
|
|
2041
|
+
let g;
|
|
2042
2042
|
if (l)
|
|
2043
|
-
|
|
2044
|
-
else if (
|
|
2045
|
-
|
|
2046
|
-
else if (
|
|
2047
|
-
const
|
|
2048
|
-
|
|
2043
|
+
g = k(n);
|
|
2044
|
+
else if (x || S || I)
|
|
2045
|
+
g = R(n);
|
|
2046
|
+
else if (b || p) {
|
|
2047
|
+
const m = c?.body, h = c?.params;
|
|
2048
|
+
m && m.type === "Identifier" && (!h || h.length === 0) ? g = R(m.name) : g = R(n);
|
|
2049
2049
|
} else {
|
|
2050
|
-
let
|
|
2050
|
+
let m = !1;
|
|
2051
2051
|
try {
|
|
2052
|
-
const
|
|
2053
|
-
if (
|
|
2054
|
-
const w =
|
|
2055
|
-
|
|
2052
|
+
const y = L(n).program.body;
|
|
2053
|
+
if (y.length === 1 && y[0].type === "ExpressionStatement") {
|
|
2054
|
+
const w = y[0].expression?.type;
|
|
2055
|
+
m = w === "ArrowFunctionExpression" || w === "FunctionExpression";
|
|
2056
2056
|
}
|
|
2057
2057
|
} catch {
|
|
2058
2058
|
}
|
|
2059
|
-
if (
|
|
2060
|
-
|
|
2059
|
+
if (m)
|
|
2060
|
+
g = R(n);
|
|
2061
2061
|
else {
|
|
2062
|
-
const
|
|
2063
|
-
|
|
2062
|
+
const y = /\$event\b/.test(n) ? "($event) => " : "() => ";
|
|
2063
|
+
g = R(`${y}${n}`);
|
|
2064
2064
|
}
|
|
2065
2065
|
}
|
|
2066
|
-
t[
|
|
2067
|
-
name:
|
|
2068
|
-
handler:
|
|
2069
|
-
modifiers:
|
|
2066
|
+
t[r.arg.content] = {
|
|
2067
|
+
name: r.arg.content,
|
|
2068
|
+
handler: g,
|
|
2069
|
+
modifiers: a
|
|
2070
2070
|
};
|
|
2071
2071
|
}
|
|
2072
2072
|
}
|
|
2073
|
-
return
|
|
2073
|
+
return Vt(t);
|
|
2074
2074
|
}
|
|
2075
|
-
function
|
|
2076
|
-
const t = [],
|
|
2077
|
-
if (e && (u.type ===
|
|
2078
|
-
if (u ===
|
|
2079
|
-
const s = n === 0 ? "vIf" :
|
|
2075
|
+
function K(u, e) {
|
|
2076
|
+
const t = [], r = ["if", "for", "model", "show", "bind", "html"];
|
|
2077
|
+
if (e && (u.type === E.IF_BRANCH || u.type === E.IF) && e.forEach((a, n) => {
|
|
2078
|
+
if (u === a) {
|
|
2079
|
+
const s = n === 0 ? "vIf" : a.condition ? "vElseIf" : "vElse", i = a.condition?.loc.source || "";
|
|
2080
2080
|
t.push({
|
|
2081
2081
|
name: s,
|
|
2082
2082
|
value: s === "vElse" ? !0 : k(i)
|
|
2083
2083
|
});
|
|
2084
2084
|
const o = u.children?.[0];
|
|
2085
|
-
if (o && o.type !==
|
|
2086
|
-
const c =
|
|
2085
|
+
if (o && o.type !== E.FOR) {
|
|
2086
|
+
const c = K(o);
|
|
2087
2087
|
t.push(...c);
|
|
2088
2088
|
}
|
|
2089
2089
|
}
|
|
2090
|
-
}), u.type ===
|
|
2090
|
+
}), u.type === E.FOR && t.push({
|
|
2091
2091
|
name: "vFor",
|
|
2092
2092
|
value: k(u.source.loc.source),
|
|
2093
2093
|
iterator: {
|
|
2094
2094
|
item: u.valueAlias?.loc.source || "item",
|
|
2095
2095
|
index: u.keyAlias?.loc.source || "index"
|
|
2096
2096
|
}
|
|
2097
|
-
}), u.type ===
|
|
2098
|
-
const
|
|
2099
|
-
(d) => d.type ===
|
|
2100
|
-
), n =
|
|
2097
|
+
}), u.type === E.ELEMENT) {
|
|
2098
|
+
const a = u.props.filter(
|
|
2099
|
+
(d) => d.type === E.DIRECTIVE
|
|
2100
|
+
), n = a.filter((d) => d.name === "model");
|
|
2101
2101
|
n.length && n.forEach((d) => {
|
|
2102
2102
|
t.push({
|
|
2103
2103
|
name: "vModel",
|
|
@@ -2105,63 +2105,63 @@ function Q(u, e) {
|
|
|
2105
2105
|
value: k(d.exp?.loc.source || "")
|
|
2106
2106
|
});
|
|
2107
2107
|
});
|
|
2108
|
-
const s =
|
|
2108
|
+
const s = a.find((d) => d.name === "show");
|
|
2109
2109
|
s && t.push({
|
|
2110
2110
|
name: "vShow",
|
|
2111
2111
|
value: k(s.exp?.loc.source || "")
|
|
2112
2112
|
});
|
|
2113
|
-
const i =
|
|
2113
|
+
const i = a.find((d) => d.name === "bind" && !d.arg);
|
|
2114
2114
|
i && t.push({
|
|
2115
2115
|
name: "vBind",
|
|
2116
2116
|
value: k(i.exp?.loc.source || "")
|
|
2117
2117
|
});
|
|
2118
|
-
const o =
|
|
2118
|
+
const o = a.find((d) => d.name === "html");
|
|
2119
2119
|
o && t.push({
|
|
2120
2120
|
name: "vHtml",
|
|
2121
2121
|
value: k(o.exp?.loc.source || "")
|
|
2122
2122
|
});
|
|
2123
|
-
const c =
|
|
2123
|
+
const c = a.filter((d) => !r.includes(d.name));
|
|
2124
2124
|
for (const d of c) {
|
|
2125
2125
|
const l = (d.modifiers || []).reduce(
|
|
2126
|
-
(
|
|
2126
|
+
(x, S) => (x[S.content] = !0, x),
|
|
2127
2127
|
{}
|
|
2128
|
-
),
|
|
2129
|
-
|
|
2130
|
-
name:
|
|
2128
|
+
), b = d.arg?.content || void 0, p = nu[d.name];
|
|
2129
|
+
p && t.push({
|
|
2130
|
+
name: p,
|
|
2131
2131
|
value: k(d.exp?.loc.source || ""),
|
|
2132
|
-
arg:
|
|
2132
|
+
arg: b,
|
|
2133
2133
|
modifiers: l
|
|
2134
2134
|
});
|
|
2135
2135
|
}
|
|
2136
2136
|
}
|
|
2137
2137
|
return t;
|
|
2138
2138
|
}
|
|
2139
|
-
function
|
|
2139
|
+
function du(u) {
|
|
2140
2140
|
let e = "";
|
|
2141
|
-
if (u.type ===
|
|
2142
|
-
const { props: t = [], tag:
|
|
2143
|
-
for (const
|
|
2144
|
-
if (
|
|
2145
|
-
const n =
|
|
2141
|
+
if (u.type === E.ELEMENT) {
|
|
2142
|
+
const { props: t = [], tag: r } = u;
|
|
2143
|
+
for (const a of t)
|
|
2144
|
+
if (a.name === "class") {
|
|
2145
|
+
const n = a.value?.content || "", s = new RegExp(`${r}_([\\w]+)`);
|
|
2146
2146
|
e = n.match(s)?.[1] || "";
|
|
2147
|
-
} else if (
|
|
2148
|
-
const n =
|
|
2147
|
+
} else if (a.type === E.DIRECTIVE && a.name === "on") {
|
|
2148
|
+
const n = a.arg?.loc?.source || "", s = a.exp?.loc?.source || "", i = new RegExp(`${n}_([\\w]+)`);
|
|
2149
2149
|
e = s.match(i)?.[1] || "";
|
|
2150
2150
|
}
|
|
2151
2151
|
}
|
|
2152
|
-
return e ||
|
|
2152
|
+
return e || se();
|
|
2153
2153
|
}
|
|
2154
|
-
function
|
|
2154
|
+
function Dt(u) {
|
|
2155
2155
|
const e = /\.\/(.+?)\.vue/;
|
|
2156
|
-
for (const { from: t, imports:
|
|
2157
|
-
if (Array.isArray(
|
|
2156
|
+
for (const { from: t, imports: r } of iu) {
|
|
2157
|
+
if (Array.isArray(r) && r.includes(u))
|
|
2158
2158
|
return t;
|
|
2159
|
-
if (
|
|
2160
|
-
const
|
|
2161
|
-
if (
|
|
2159
|
+
if (r === u) {
|
|
2160
|
+
const a = me?.(t);
|
|
2161
|
+
if (a)
|
|
2162
2162
|
return {
|
|
2163
2163
|
type: "Schema",
|
|
2164
|
-
id:
|
|
2164
|
+
id: a
|
|
2165
2165
|
};
|
|
2166
2166
|
if (me) return;
|
|
2167
2167
|
const n = t.match(e)?.[1];
|
|
@@ -2174,145 +2174,147 @@ function qt(u) {
|
|
|
2174
2174
|
}
|
|
2175
2175
|
}
|
|
2176
2176
|
function he(u, e) {
|
|
2177
|
-
const t = new Set(e?.id ?
|
|
2178
|
-
let
|
|
2179
|
-
if (
|
|
2180
|
-
const { item: s = "item", index: i = "index" } =
|
|
2181
|
-
|
|
2177
|
+
const t = new Set(e?.id ? ie[e.id] : []), r = (u.directives || []).find((s) => s.name === "vFor");
|
|
2178
|
+
let a = new Set(Array.from(t));
|
|
2179
|
+
if (r) {
|
|
2180
|
+
const { item: s = "item", index: i = "index" } = r.iterator || {};
|
|
2181
|
+
a = /* @__PURE__ */ new Set([s, i, ...Array.from(a)]);
|
|
2182
2182
|
}
|
|
2183
2183
|
const n = u.slot;
|
|
2184
2184
|
if (n) {
|
|
2185
2185
|
const s = typeof n == "string" ? [] : n.params || [], i = s.length ? s : [`scope_${e?.id}`];
|
|
2186
|
-
|
|
2187
|
-
}
|
|
2188
|
-
|
|
2189
|
-
}
|
|
2190
|
-
function fe(u, e, t,
|
|
2191
|
-
const
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2186
|
+
a = /* @__PURE__ */ new Set([...i, ...Array.from(a)]);
|
|
2187
|
+
}
|
|
2188
|
+
ie[u.id] = a;
|
|
2189
|
+
}
|
|
2190
|
+
function fe(u, e, t, r) {
|
|
2191
|
+
const a = jt(u.props), n = u.tag === "component" && ue(a.is) ? a.is.value.replace(/^\((.*)\)$/, "$1").replace(/^_ctx\./, "").trim() : "", s = cu[n];
|
|
2192
|
+
s && delete a.is;
|
|
2193
|
+
const i = {
|
|
2194
|
+
name: s ? n : Qe(u.tag, ce),
|
|
2195
|
+
from: s || Dt(u.tag),
|
|
2196
|
+
props: a,
|
|
2197
|
+
events: qt(u.props, au),
|
|
2198
|
+
directives: K(t || u, r)
|
|
2197
2199
|
};
|
|
2198
|
-
|
|
2199
|
-
const
|
|
2200
|
-
return he(
|
|
2200
|
+
i.id = du(u), he(i, e);
|
|
2201
|
+
const o = te(i, u.children);
|
|
2202
|
+
return he(i, e), Nt(o), o;
|
|
2201
2203
|
}
|
|
2202
|
-
function
|
|
2203
|
-
return u.map((t) =>
|
|
2204
|
+
function Rt(u = [], e) {
|
|
2205
|
+
return u.map((t) => Q(t, e, u));
|
|
2204
2206
|
}
|
|
2205
|
-
function
|
|
2206
|
-
if (u.type ===
|
|
2207
|
+
function Q(u, e, t) {
|
|
2208
|
+
if (u.type === E.ELEMENT)
|
|
2207
2209
|
return fe(u, e);
|
|
2208
|
-
if (u.type ===
|
|
2209
|
-
return
|
|
2210
|
-
if (t && u.type ===
|
|
2211
|
-
const
|
|
2212
|
-
(
|
|
2210
|
+
if (u.type === E.IF)
|
|
2211
|
+
return Ct(u);
|
|
2212
|
+
if (t && u.type === E.IF_BRANCH) {
|
|
2213
|
+
const r = u.children.find(
|
|
2214
|
+
(a) => a.type === E.ELEMENT || a.type === E.FOR
|
|
2213
2215
|
);
|
|
2214
|
-
if (
|
|
2215
|
-
if (
|
|
2216
|
-
return fe(
|
|
2217
|
-
if (
|
|
2218
|
-
const n = { name: "div", directives:
|
|
2219
|
-
return
|
|
2216
|
+
if (r) {
|
|
2217
|
+
if (r.type === E.ELEMENT)
|
|
2218
|
+
return fe(r, e, u, t);
|
|
2219
|
+
if (r.type === E.FOR) {
|
|
2220
|
+
const n = { name: "div", directives: K(u) };
|
|
2221
|
+
return te(n, u.children || []);
|
|
2220
2222
|
}
|
|
2221
2223
|
}
|
|
2222
2224
|
return "";
|
|
2223
2225
|
}
|
|
2224
|
-
if (u.type ===
|
|
2225
|
-
const
|
|
2226
|
-
if (u.children.length > 1 ||
|
|
2227
|
-
const n = { name: "span", directives:
|
|
2228
|
-
return
|
|
2226
|
+
if (u.type === E.FOR) {
|
|
2227
|
+
const r = u.children[0];
|
|
2228
|
+
if (u.children.length > 1 || r.type !== E.ELEMENT) {
|
|
2229
|
+
const n = { name: "span", directives: K(u) };
|
|
2230
|
+
return te(n, u.children);
|
|
2229
2231
|
} else
|
|
2230
|
-
return fe(
|
|
2232
|
+
return fe(r, e, u);
|
|
2231
2233
|
}
|
|
2232
|
-
if (u.type ===
|
|
2233
|
-
return u.content.type ==
|
|
2234
|
+
if (u.type === E.TEXT_CALL)
|
|
2235
|
+
return u.content.type == E.TEXT ? u.content.content : u.content.type === E.INTERPOLATION ? k(u.content.content.loc.source) : u.content.type === E.COMPOUND_EXPRESSION ? _e(
|
|
2234
2236
|
u.content.children
|
|
2235
2237
|
) : "";
|
|
2236
|
-
if (u.type ===
|
|
2238
|
+
if (u.type === E.TEXT)
|
|
2237
2239
|
return u.content;
|
|
2238
|
-
if (u.type ===
|
|
2240
|
+
if (u.type === E.INTERPOLATION && (u.content.type === E.SIMPLE_EXPRESSION || u.content.type === E.COMPOUND_EXPRESSION))
|
|
2239
2241
|
return k(u.content.loc.source);
|
|
2240
|
-
if (u.type ===
|
|
2242
|
+
if (u.type === E.COMPOUND_EXPRESSION)
|
|
2241
2243
|
return _e(
|
|
2242
2244
|
u.children
|
|
2243
2245
|
);
|
|
2244
|
-
u.type !==
|
|
2246
|
+
u.type !== E.COMMENT && console.warn("未处理", u.type);
|
|
2245
2247
|
}
|
|
2246
2248
|
function _e(u = []) {
|
|
2247
|
-
const e = u.filter((
|
|
2248
|
-
for (const
|
|
2249
|
+
const e = u.filter((r) => typeof r != "string"), t = [];
|
|
2250
|
+
for (const r of e)
|
|
2249
2251
|
t.push({
|
|
2250
2252
|
name: "span",
|
|
2251
|
-
children:
|
|
2253
|
+
children: r.type === E.TEXT ? r.loc.source : k(r.content?.loc.source)
|
|
2252
2254
|
});
|
|
2253
2255
|
return {
|
|
2254
2256
|
name: "span",
|
|
2255
2257
|
children: t
|
|
2256
2258
|
};
|
|
2257
2259
|
}
|
|
2258
|
-
function
|
|
2260
|
+
function te(u, e = []) {
|
|
2259
2261
|
const t = [];
|
|
2260
|
-
for (const
|
|
2261
|
-
if (
|
|
2262
|
-
const
|
|
2263
|
-
if (
|
|
2264
|
-
const n = Re(
|
|
2262
|
+
for (const r of e)
|
|
2263
|
+
if (r.type === E.ELEMENT && r.codegenNode?.value?.arguments) {
|
|
2264
|
+
const a = r.codegenNode.value.arguments[0];
|
|
2265
|
+
if (a) {
|
|
2266
|
+
const n = Re(a, ce);
|
|
2265
2267
|
t.push(...n);
|
|
2266
2268
|
}
|
|
2267
|
-
} else if (
|
|
2268
|
-
const
|
|
2269
|
-
for (const n of
|
|
2270
|
-
const s = n.type ===
|
|
2269
|
+
} else if (r.type === E.ELEMENT && r.tag === "template") {
|
|
2270
|
+
const a = r.props.find((n) => n.name === "slot");
|
|
2271
|
+
for (const n of r.children) {
|
|
2272
|
+
const s = n.type === E.TEXT || n.type === E.TEXT_CALL ? {
|
|
2271
2273
|
name: "span",
|
|
2272
|
-
children:
|
|
2273
|
-
} :
|
|
2274
|
+
children: Q(n, u)
|
|
2275
|
+
} : Q(n, u);
|
|
2274
2276
|
s && (Array.isArray(s) ? s : [s]).forEach((o) => {
|
|
2275
|
-
|
|
2276
|
-
name:
|
|
2277
|
-
params:
|
|
2278
|
-
scope:
|
|
2277
|
+
Du(o) && a?.type === E.DIRECTIVE && (o.id = du(n), o.slot = {
|
|
2278
|
+
name: a.arg?.content || "default",
|
|
2279
|
+
params: a.exp?.identifiers || [],
|
|
2280
|
+
scope: a.exp?.type === E.SIMPLE_EXPRESSION ? a.exp.content : ""
|
|
2279
2281
|
}, he(o, u)), t.push(o);
|
|
2280
2282
|
});
|
|
2281
2283
|
}
|
|
2282
|
-
} else if (
|
|
2283
|
-
const
|
|
2284
|
-
if (
|
|
2285
|
-
const n = Re(
|
|
2284
|
+
} else if (r.type === E.JS_CALL_EXPRESSION) {
|
|
2285
|
+
const a = r.arguments?.[0];
|
|
2286
|
+
if (a) {
|
|
2287
|
+
const n = Re(a, ce);
|
|
2286
2288
|
t.push(...n);
|
|
2287
2289
|
}
|
|
2288
|
-
} else if (
|
|
2289
|
-
const
|
|
2290
|
-
|
|
2290
|
+
} else if (r.type === E.TEXT_CALL) {
|
|
2291
|
+
const a = Q(r, u);
|
|
2292
|
+
a && (Array.isArray(a) ? t.push(...a) : t.push(a));
|
|
2291
2293
|
} else {
|
|
2292
|
-
const
|
|
2293
|
-
|
|
2294
|
+
const a = Q(r, u);
|
|
2295
|
+
a && (Array.isArray(a) ? t.push(...a) : t.push(a));
|
|
2294
2296
|
}
|
|
2295
2297
|
if (t.length === 1) {
|
|
2296
|
-
const
|
|
2297
|
-
u.children = typeof
|
|
2298
|
+
const r = t[0];
|
|
2299
|
+
u.children = typeof r == "string" || ue(r) ? r : [r];
|
|
2298
2300
|
} else
|
|
2299
|
-
u.children = t.map((
|
|
2301
|
+
u.children = t.map((r) => typeof r == "string" || ue(r) ? { name: "span", children: r } : r);
|
|
2300
2302
|
return u;
|
|
2301
2303
|
}
|
|
2302
|
-
function
|
|
2303
|
-
const e = u.branches || [], t = e[0],
|
|
2304
|
+
function Ct(u) {
|
|
2305
|
+
const e = u.branches || [], t = e[0], r = t?.children || [];
|
|
2304
2306
|
if (t?.isTemplateIf)
|
|
2305
|
-
return e.map((
|
|
2306
|
-
const s = { name: "div", directives:
|
|
2307
|
-
return
|
|
2307
|
+
return e.map((a) => {
|
|
2308
|
+
const s = { name: "div", directives: K(a, e) };
|
|
2309
|
+
return te(s, a.children || []);
|
|
2308
2310
|
});
|
|
2309
|
-
if (
|
|
2310
|
-
const n = { name: "div", directives:
|
|
2311
|
-
return
|
|
2311
|
+
if (r.length > 1 || r[0] && r[0].type !== E.ELEMENT) {
|
|
2312
|
+
const n = { name: "div", directives: K(t, e) };
|
|
2313
|
+
return te(n, t.children);
|
|
2312
2314
|
}
|
|
2313
|
-
return
|
|
2315
|
+
return Rt(e);
|
|
2314
2316
|
}
|
|
2315
|
-
const
|
|
2317
|
+
const _t = {
|
|
2316
2318
|
onBeforeMount: "beforeMount",
|
|
2317
2319
|
onMounted: "mounted",
|
|
2318
2320
|
onBeforeUpdate: "beforeUpdate",
|
|
@@ -2343,16 +2345,16 @@ const Ct = {
|
|
|
2343
2345
|
onNavigationBarSearchInputClicked: "onNavigationBarSearchInputClicked",
|
|
2344
2346
|
onShareTimeline: "onShareTimeline",
|
|
2345
2347
|
onAddToFavorites: "onAddToFavorites"
|
|
2346
|
-
},
|
|
2348
|
+
}, Lt = /* @__PURE__ */ new Set([
|
|
2347
2349
|
"vue-router",
|
|
2348
2350
|
"pinia",
|
|
2349
2351
|
"vue-i18n",
|
|
2350
2352
|
"@vtj/renderer"
|
|
2351
|
-
]),
|
|
2353
|
+
]), Pt = new Set(
|
|
2352
2354
|
Object.values(ye).map((u) => u.composable).filter((u) => !!u)
|
|
2353
2355
|
);
|
|
2354
|
-
function
|
|
2355
|
-
const t =
|
|
2356
|
+
function Mt(u, e) {
|
|
2357
|
+
const t = Ot(u), r = Bt(t), { dependencies: a = [] } = e || {}, n = a.reduce(
|
|
2356
2358
|
(c, d) => (c[d.package] = d.library, c),
|
|
2357
2359
|
{}
|
|
2358
2360
|
), s = {
|
|
@@ -2373,141 +2375,147 @@ function Pt(u, e) {
|
|
|
2373
2375
|
setup: void 0,
|
|
2374
2376
|
handlers: {},
|
|
2375
2377
|
dataSources: {},
|
|
2376
|
-
directives: {}
|
|
2377
|
-
|
|
2378
|
-
|
|
2378
|
+
directives: {},
|
|
2379
|
+
componentDefines: {}
|
|
2380
|
+
}, i = [], o = L(u);
|
|
2381
|
+
if (X(o, {
|
|
2379
2382
|
// 顶层变量声明
|
|
2380
2383
|
VariableDeclaration(c) {
|
|
2381
2384
|
if (c.parent.type !== "Program") return;
|
|
2382
2385
|
const d = c.node;
|
|
2383
|
-
for (const
|
|
2384
|
-
if (!
|
|
2385
|
-
const
|
|
2386
|
-
if (
|
|
2387
|
-
const
|
|
2388
|
-
if (
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2386
|
+
for (const b of d.declarations) {
|
|
2387
|
+
if (!b.init) continue;
|
|
2388
|
+
const p = b.init;
|
|
2389
|
+
if (p.type === "CallExpression") {
|
|
2390
|
+
const x = $t(p), S = M(b.id);
|
|
2391
|
+
if (S && x) {
|
|
2392
|
+
s.componentDefines[S] = x;
|
|
2393
|
+
return;
|
|
2394
|
+
}
|
|
2395
|
+
const I = Le(p);
|
|
2396
|
+
if (I === "ref") {
|
|
2397
|
+
const m = M(b.id);
|
|
2398
|
+
if (m) {
|
|
2399
|
+
const h = p.arguments[0] ? A(p.arguments[0]) : "undefined";
|
|
2400
|
+
s.refs[m] = k(h);
|
|
2393
2401
|
}
|
|
2394
2402
|
return;
|
|
2395
2403
|
}
|
|
2396
|
-
if (
|
|
2397
|
-
const
|
|
2398
|
-
if (
|
|
2399
|
-
if (
|
|
2400
|
-
s.state =
|
|
2404
|
+
if (I === "reactive") {
|
|
2405
|
+
const m = M(b.id);
|
|
2406
|
+
if (m)
|
|
2407
|
+
if (m === "__state")
|
|
2408
|
+
s.state = Ut(p.arguments[0]);
|
|
2401
2409
|
else {
|
|
2402
|
-
const h =
|
|
2403
|
-
s.reactives[
|
|
2410
|
+
const h = p.arguments[0] ? A(p.arguments[0]) : "{}";
|
|
2411
|
+
s.reactives[m] = k(h);
|
|
2404
2412
|
}
|
|
2405
2413
|
return;
|
|
2406
2414
|
}
|
|
2407
|
-
if (
|
|
2408
|
-
const
|
|
2409
|
-
if (
|
|
2410
|
-
const h =
|
|
2411
|
-
h.type === "ArrowFunctionExpression" || h.type === "FunctionExpression" ? s.computed[
|
|
2412
|
-
} else
|
|
2415
|
+
if (I === "computed") {
|
|
2416
|
+
const m = M(b.id);
|
|
2417
|
+
if (m && p.arguments[0]) {
|
|
2418
|
+
const h = p.arguments[0], y = A(h);
|
|
2419
|
+
h.type === "ArrowFunctionExpression" || h.type === "FunctionExpression" ? s.computed[m] = R(y) : s.computed[m] = k(y);
|
|
2420
|
+
} else m && (s.computed[m] = R("() => {}"));
|
|
2413
2421
|
return;
|
|
2414
2422
|
}
|
|
2415
|
-
if (
|
|
2416
|
-
const
|
|
2417
|
-
if (
|
|
2418
|
-
const h =
|
|
2423
|
+
if (I === "inject") {
|
|
2424
|
+
const m = M(b.id);
|
|
2425
|
+
if (m) {
|
|
2426
|
+
const h = p.arguments[0], y = p.arguments[1], w = h ? Me(h) : m;
|
|
2419
2427
|
s.inject.push({
|
|
2420
|
-
name:
|
|
2421
|
-
from:
|
|
2422
|
-
default:
|
|
2428
|
+
name: m,
|
|
2429
|
+
from: w || m,
|
|
2430
|
+
default: y ? k(A(y)) : void 0
|
|
2423
2431
|
});
|
|
2424
2432
|
}
|
|
2425
2433
|
return;
|
|
2426
2434
|
}
|
|
2427
|
-
if (
|
|
2428
|
-
s.props = Oe(
|
|
2435
|
+
if (I === "defineProps" || I === "withDefaults") {
|
|
2436
|
+
s.props = Oe(p);
|
|
2429
2437
|
return;
|
|
2430
2438
|
}
|
|
2431
|
-
if (
|
|
2432
|
-
s.emits = Fe(
|
|
2439
|
+
if (I === "defineEmits") {
|
|
2440
|
+
s.emits = Fe(p);
|
|
2433
2441
|
return;
|
|
2434
2442
|
}
|
|
2435
|
-
if (
|
|
2436
|
-
const
|
|
2437
|
-
if (
|
|
2438
|
-
const
|
|
2439
|
-
|
|
2443
|
+
if (I && /^use[A-Z]/.test(I)) {
|
|
2444
|
+
const m = r.get(I);
|
|
2445
|
+
if (Ft(I, m)) {
|
|
2446
|
+
const w = Pe(b.id);
|
|
2447
|
+
w.length > 0 && (s.globalApiDestructured ??= [], s.globalApiDestructured.push({ callee: I, destructure: w }));
|
|
2440
2448
|
return;
|
|
2441
2449
|
}
|
|
2442
|
-
if (
|
|
2443
|
-
if (!
|
|
2450
|
+
if (I === "useProvider") return;
|
|
2451
|
+
if (!m)
|
|
2444
2452
|
continue;
|
|
2445
|
-
const h =
|
|
2446
|
-
if (h ||
|
|
2447
|
-
if (h && s.composables.some((
|
|
2453
|
+
const h = M(b.id), y = Pe(b.id);
|
|
2454
|
+
if (h || y.length) {
|
|
2455
|
+
if (h && s.composables.some((J) => J.name === h))
|
|
2448
2456
|
return;
|
|
2449
|
-
let
|
|
2450
|
-
const
|
|
2451
|
-
|
|
2452
|
-
const
|
|
2453
|
-
name: h ||
|
|
2457
|
+
let w;
|
|
2458
|
+
const C = n[m];
|
|
2459
|
+
C ? w = `this.$libs.${C}.${I}` : w = I;
|
|
2460
|
+
const _ = {
|
|
2461
|
+
name: h || y[0] || I,
|
|
2454
2462
|
composable: {
|
|
2455
2463
|
type: "JSExpression",
|
|
2456
|
-
value:
|
|
2464
|
+
value: w
|
|
2457
2465
|
}
|
|
2458
2466
|
};
|
|
2459
|
-
|
|
2460
|
-
(
|
|
2461
|
-
)),
|
|
2467
|
+
p.arguments.length > 0 && (_.args = p.arguments.map(
|
|
2468
|
+
(J) => k(A(J))
|
|
2469
|
+
)), y.length > 0 && (_.destructure = y), s.composables.push(_);
|
|
2462
2470
|
}
|
|
2463
2471
|
return;
|
|
2464
2472
|
}
|
|
2465
|
-
const
|
|
2466
|
-
if (
|
|
2473
|
+
const g = M(b.id);
|
|
2474
|
+
if (g && g.startsWith("__") || I === "getCurrentInstance")
|
|
2467
2475
|
return;
|
|
2468
2476
|
}
|
|
2469
|
-
if (
|
|
2470
|
-
const
|
|
2471
|
-
if (
|
|
2472
|
-
const
|
|
2473
|
-
if ($e(
|
|
2474
|
-
const
|
|
2475
|
-
if (
|
|
2476
|
-
s.dataSources[
|
|
2477
|
+
if (p.type === "ArrowFunctionExpression" || p.type === "FunctionExpression") {
|
|
2478
|
+
const x = M(b.id);
|
|
2479
|
+
if (x) {
|
|
2480
|
+
const S = A(p);
|
|
2481
|
+
if ($e(S)) {
|
|
2482
|
+
const I = Ue(x, S, e);
|
|
2483
|
+
if (I) {
|
|
2484
|
+
s.dataSources[x] = I;
|
|
2477
2485
|
return;
|
|
2478
2486
|
}
|
|
2479
2487
|
}
|
|
2480
|
-
s.methods[
|
|
2488
|
+
s.methods[x] = R(S);
|
|
2481
2489
|
}
|
|
2482
2490
|
return;
|
|
2483
2491
|
}
|
|
2484
|
-
if (
|
|
2485
|
-
const
|
|
2486
|
-
if (
|
|
2492
|
+
if (p.type === "MemberExpression") {
|
|
2493
|
+
const x = p.object, S = x.type === "Identifier" ? x.name : x.type === "MemberExpression" && x.object.type === "Identifier" ? x.object.name : null;
|
|
2494
|
+
if (S && r.has(S))
|
|
2487
2495
|
return;
|
|
2488
2496
|
}
|
|
2489
2497
|
}
|
|
2490
|
-
if (d.declarations.some((
|
|
2491
|
-
const
|
|
2492
|
-
return
|
|
2498
|
+
if (d.declarations.some((b) => {
|
|
2499
|
+
const p = M(b.id);
|
|
2500
|
+
return p && p.startsWith("__");
|
|
2493
2501
|
}))
|
|
2494
2502
|
return;
|
|
2495
|
-
if (d.declarations.every((
|
|
2496
|
-
const
|
|
2497
|
-
return
|
|
2503
|
+
if (d.declarations.every((b) => {
|
|
2504
|
+
const p = b.init;
|
|
2505
|
+
return p && (p.type === "ObjectExpression" || p.type === "ArrayExpression");
|
|
2498
2506
|
}) && d.declarations.length > 0) {
|
|
2499
|
-
for (const
|
|
2500
|
-
const
|
|
2501
|
-
|
|
2507
|
+
for (const b of d.declarations) {
|
|
2508
|
+
const p = M(b.id);
|
|
2509
|
+
p && b.init && (s.reactives[p] = k(A(b.init)));
|
|
2502
2510
|
}
|
|
2503
2511
|
return;
|
|
2504
2512
|
}
|
|
2505
|
-
for (const
|
|
2506
|
-
const
|
|
2507
|
-
if (
|
|
2508
|
-
const
|
|
2513
|
+
for (const b of d.declarations) {
|
|
2514
|
+
const p = b.init;
|
|
2515
|
+
if (p) {
|
|
2516
|
+
const x = M(b.id) || "(unknown)", S = A(p), I = p.type;
|
|
2509
2517
|
throw new Error(
|
|
2510
|
-
`[vtj/parser] 无法处理顶层变量声明 "const ${
|
|
2518
|
+
`[vtj/parser] 无法处理顶层变量声明 "const ${x} = ${S}":不支持的类型 "${I}"。仅支持 ObjectExpression / ArrayExpression 兜底自动转换为 reactive()。请改用 ref()、reactive()、computed() 或函数声明。`
|
|
2511
2519
|
);
|
|
2512
2520
|
}
|
|
2513
2521
|
}
|
|
@@ -2520,15 +2528,15 @@ function Pt(u, e) {
|
|
|
2520
2528
|
if (c.parent.type !== "Program") return;
|
|
2521
2529
|
const d = c.node;
|
|
2522
2530
|
if (!d.id) return;
|
|
2523
|
-
const l = d.id.name,
|
|
2524
|
-
if ($e(
|
|
2525
|
-
const
|
|
2526
|
-
if (
|
|
2527
|
-
s.dataSources[l] =
|
|
2531
|
+
const l = d.id.name, b = Jt(d);
|
|
2532
|
+
if ($e(b)) {
|
|
2533
|
+
const p = Ue(l, b, e);
|
|
2534
|
+
if (p) {
|
|
2535
|
+
s.dataSources[l] = p;
|
|
2528
2536
|
return;
|
|
2529
2537
|
}
|
|
2530
2538
|
}
|
|
2531
|
-
s.methods[l] =
|
|
2539
|
+
s.methods[l] = R(b);
|
|
2532
2540
|
},
|
|
2533
2541
|
// 顶层类声明 → 禁止,抛出异常
|
|
2534
2542
|
ClassDeclaration(c) {
|
|
@@ -2543,53 +2551,53 @@ function Pt(u, e) {
|
|
|
2543
2551
|
if (c.parent.type !== "Program") return;
|
|
2544
2552
|
const d = c.node, l = d.expression;
|
|
2545
2553
|
if (l.type !== "CallExpression") {
|
|
2546
|
-
const
|
|
2554
|
+
const x = A(d);
|
|
2547
2555
|
throw new Error(
|
|
2548
|
-
`[vtj/parser] 无法处理顶层表达式语句 "${
|
|
2556
|
+
`[vtj/parser] 无法处理顶层表达式语句 "${x}":DSL 不支持游离的顶层表达式,请改用生命周期钩子(如 onMounted)或声明确赋值。`
|
|
2549
2557
|
);
|
|
2550
2558
|
}
|
|
2551
|
-
const
|
|
2552
|
-
if (
|
|
2553
|
-
const
|
|
2554
|
-
|
|
2559
|
+
const b = Le(l);
|
|
2560
|
+
if (b === "watch") {
|
|
2561
|
+
const x = Wt(l);
|
|
2562
|
+
x && s.watch.push(x);
|
|
2555
2563
|
return;
|
|
2556
2564
|
}
|
|
2557
|
-
if (
|
|
2558
|
-
const
|
|
2559
|
-
|
|
2565
|
+
if (b && b in _t) {
|
|
2566
|
+
const x = l.arguments[0];
|
|
2567
|
+
x && (s.lifeCycles[b] = R(A(x)));
|
|
2560
2568
|
return;
|
|
2561
2569
|
}
|
|
2562
|
-
if (
|
|
2563
|
-
const
|
|
2564
|
-
if (
|
|
2565
|
-
const
|
|
2566
|
-
if (
|
|
2567
|
-
const
|
|
2568
|
-
|
|
2570
|
+
if (b === "provide") {
|
|
2571
|
+
const x = l.arguments[0], S = l.arguments[1];
|
|
2572
|
+
if (x && S) {
|
|
2573
|
+
const I = Me(x);
|
|
2574
|
+
if (I) {
|
|
2575
|
+
const g = A(S);
|
|
2576
|
+
S.type === "ArrowFunctionExpression" || S.type === "FunctionExpression" ? s.provide[I] = R(g) : s.provide[I] = k(g);
|
|
2569
2577
|
}
|
|
2570
2578
|
}
|
|
2571
2579
|
return;
|
|
2572
2580
|
}
|
|
2573
|
-
if (
|
|
2574
|
-
s.expose =
|
|
2581
|
+
if (b === "defineExpose") {
|
|
2582
|
+
s.expose = Ht(l);
|
|
2575
2583
|
return;
|
|
2576
2584
|
}
|
|
2577
|
-
if (
|
|
2585
|
+
if (b === "defineProps" || b === "withDefaults") {
|
|
2578
2586
|
s.props = Oe(l);
|
|
2579
2587
|
return;
|
|
2580
2588
|
}
|
|
2581
|
-
if (
|
|
2589
|
+
if (b === "defineEmits") {
|
|
2582
2590
|
s.emits = Fe(l);
|
|
2583
2591
|
return;
|
|
2584
2592
|
}
|
|
2585
|
-
const
|
|
2593
|
+
const p = A(d);
|
|
2586
2594
|
throw new Error(
|
|
2587
|
-
`[vtj/parser] 无法处理顶层调用语句 "${
|
|
2595
|
+
`[vtj/parser] 无法处理顶层调用语句 "${p}":DSL 不支持游离的顶层函数调用,请改用生命周期钩子(如 onMounted)或归类到方法声明中。`
|
|
2588
2596
|
);
|
|
2589
2597
|
}
|
|
2590
2598
|
}), i.length > 0) {
|
|
2591
2599
|
const d = i.some((l) => /\bawait\b/.test(l)) ? "async () =>" : "() =>";
|
|
2592
|
-
s.setup =
|
|
2600
|
+
s.setup = R(
|
|
2593
2601
|
`${d} {
|
|
2594
2602
|
${i.join(`
|
|
2595
2603
|
`)}
|
|
@@ -2598,45 +2606,71 @@ ${i.join(`
|
|
|
2598
2606
|
}
|
|
2599
2607
|
return s;
|
|
2600
2608
|
}
|
|
2601
|
-
function
|
|
2602
|
-
const e = /import\s+{(.+?)}\s+from\s+['"](.+?)['"]/g, t = /import\s+(.+?)\s+from\s+['"](.+?)['"]/g,
|
|
2609
|
+
function Ot(u) {
|
|
2610
|
+
const e = /import\s+{(.+?)}\s+from\s+['"](.+?)['"]/g, t = /import\s+(.+?)\s+from\s+['"](.+?)['"]/g, r = /^{(.+?)}$/, a = [];
|
|
2603
2611
|
let n;
|
|
2604
2612
|
const s = u.replace(/\n/g, " ");
|
|
2605
2613
|
for (; (n = e.exec(s)) !== null; ) {
|
|
2606
2614
|
const i = n[2] === "@element-plus/icons-vue" ? "@vtj/icons" : n[2];
|
|
2607
|
-
|
|
2615
|
+
a.push({
|
|
2608
2616
|
from: i,
|
|
2609
2617
|
imports: n[1].split(",").map((o) => o.trim())
|
|
2610
2618
|
});
|
|
2611
2619
|
}
|
|
2612
2620
|
for (; (n = t.exec(s)) !== null; ) {
|
|
2613
2621
|
const i = n[1], o = n[2];
|
|
2614
|
-
i && !
|
|
2622
|
+
i && !r.test(i) && a.push({
|
|
2615
2623
|
from: o,
|
|
2616
2624
|
imports: i
|
|
2617
2625
|
});
|
|
2618
2626
|
}
|
|
2619
|
-
return
|
|
2627
|
+
return a;
|
|
2620
2628
|
}
|
|
2621
|
-
function
|
|
2629
|
+
function Bt(u) {
|
|
2622
2630
|
const e = /* @__PURE__ */ new Map();
|
|
2623
2631
|
for (const t of u)
|
|
2624
2632
|
if (Array.isArray(t.imports))
|
|
2625
|
-
for (const
|
|
2626
|
-
const
|
|
2633
|
+
for (const r of t.imports) {
|
|
2634
|
+
const a = r.match(/^\S+\s+as\s+(\S+)$/), n = a ? a[1] : r;
|
|
2627
2635
|
e.set(n, t.from);
|
|
2628
2636
|
}
|
|
2629
2637
|
else
|
|
2630
2638
|
e.set(t.imports, t.from);
|
|
2631
2639
|
return e;
|
|
2632
2640
|
}
|
|
2633
|
-
function
|
|
2634
|
-
return e &&
|
|
2641
|
+
function Ft(u, e) {
|
|
2642
|
+
return e && Lt.has(e) ? !0 : Pt.has(u);
|
|
2635
2643
|
}
|
|
2636
2644
|
function Le(u) {
|
|
2637
2645
|
return u.callee.type === "Identifier" ? u.callee.name : null;
|
|
2638
2646
|
}
|
|
2639
|
-
function
|
|
2647
|
+
function $t(u) {
|
|
2648
|
+
const e = u.callee;
|
|
2649
|
+
if (e.type !== "MemberExpression" || e.computed || e.object.type !== "Identifier" || e.object.name !== "__provider" || e.property.type !== "Identifier")
|
|
2650
|
+
return null;
|
|
2651
|
+
const t = u.arguments[0];
|
|
2652
|
+
if (e.property.name === "defineUrlSchemaComponent" && t?.type === "StringLiteral")
|
|
2653
|
+
return { type: "UrlSchema", url: t.value };
|
|
2654
|
+
if (e.property.name !== "definePluginComponent" || t?.type !== "ObjectExpression")
|
|
2655
|
+
return null;
|
|
2656
|
+
const r = new Map(
|
|
2657
|
+
t.properties.filter((o) => o.type === "ObjectProperty").map((o) => [
|
|
2658
|
+
o.key.type === "Identifier" ? o.key.name : o.key.type === "StringLiteral" ? o.key.value : "",
|
|
2659
|
+
o.value
|
|
2660
|
+
])
|
|
2661
|
+
), a = r.get("type"), n = r.get("urls"), s = r.get("library");
|
|
2662
|
+
if (a?.type !== "StringLiteral" || a.value !== "Plugin" || n?.type !== "ArrayExpression")
|
|
2663
|
+
return null;
|
|
2664
|
+
const i = n.elements.map(
|
|
2665
|
+
(o) => o?.type === "StringLiteral" ? o.value : null
|
|
2666
|
+
);
|
|
2667
|
+
return i.some((o) => o === null) ? null : {
|
|
2668
|
+
type: "Plugin",
|
|
2669
|
+
urls: i,
|
|
2670
|
+
library: s?.type === "StringLiteral" ? s.value : void 0
|
|
2671
|
+
};
|
|
2672
|
+
}
|
|
2673
|
+
function M(u) {
|
|
2640
2674
|
return u?.type === "Identifier" ? u.name : null;
|
|
2641
2675
|
}
|
|
2642
2676
|
function Pe(u) {
|
|
@@ -2645,18 +2679,18 @@ function Pe(u) {
|
|
|
2645
2679
|
function Me(u) {
|
|
2646
2680
|
return u.type === "StringLiteral" ? u.value : null;
|
|
2647
2681
|
}
|
|
2648
|
-
function
|
|
2682
|
+
function Ut(u) {
|
|
2649
2683
|
if (!u || u.type !== "ObjectExpression") return {};
|
|
2650
2684
|
const e = {};
|
|
2651
2685
|
for (const t of u.properties)
|
|
2652
2686
|
if (t.type === "ObjectProperty") {
|
|
2653
|
-
const
|
|
2654
|
-
|
|
2687
|
+
const r = t.key?.name;
|
|
2688
|
+
r && (e[r] = k(A(t.value)));
|
|
2655
2689
|
} else if (t.type === "ObjectMethod") {
|
|
2656
|
-
const
|
|
2657
|
-
if (
|
|
2658
|
-
const
|
|
2659
|
-
e[
|
|
2690
|
+
const r = t.key?.name;
|
|
2691
|
+
if (r) {
|
|
2692
|
+
const a = A(t.body), n = t.params.map((s) => s.name || "none").join(",");
|
|
2693
|
+
e[r] = k(`(${n}) => ${a}`);
|
|
2660
2694
|
}
|
|
2661
2695
|
}
|
|
2662
2696
|
return e;
|
|
@@ -2665,8 +2699,8 @@ function Oe(u) {
|
|
|
2665
2699
|
if (u.callee.type === "Identifier" && u.callee.name === "withDefaults") {
|
|
2666
2700
|
const e = u.arguments[0];
|
|
2667
2701
|
if (e?.type === "CallExpression") {
|
|
2668
|
-
const t = Be(e),
|
|
2669
|
-
return
|
|
2702
|
+
const t = Be(e), r = u.arguments[1];
|
|
2703
|
+
return r?.type === "ObjectExpression" && Gt(t, r), t;
|
|
2670
2704
|
}
|
|
2671
2705
|
}
|
|
2672
2706
|
return Be(u);
|
|
@@ -2675,34 +2709,34 @@ function Be(u) {
|
|
|
2675
2709
|
const e = u.arguments[0];
|
|
2676
2710
|
return e ? e.type === "ArrayExpression" ? e.elements.map((t) => t?.type === "StringLiteral" ? t.value : "").filter(Boolean) : e.type === "ObjectExpression" ? e.properties.map((t) => {
|
|
2677
2711
|
if (t.type !== "ObjectProperty") return null;
|
|
2678
|
-
const
|
|
2679
|
-
if (!
|
|
2712
|
+
const r = t.key?.name;
|
|
2713
|
+
if (!r) return null;
|
|
2680
2714
|
if (t.value?.type === "Identifier")
|
|
2681
|
-
return { name:
|
|
2715
|
+
return { name: r, type: t.value.name };
|
|
2682
2716
|
if (t.value?.type === "ObjectExpression") {
|
|
2683
|
-
const
|
|
2717
|
+
const a = t.value.properties;
|
|
2684
2718
|
return {
|
|
2685
|
-
name:
|
|
2686
|
-
type:
|
|
2687
|
-
required: xe(
|
|
2688
|
-
default:
|
|
2719
|
+
name: r,
|
|
2720
|
+
type: Xt(a),
|
|
2721
|
+
required: xe(a, "required"),
|
|
2722
|
+
default: zt(a)
|
|
2689
2723
|
};
|
|
2690
2724
|
}
|
|
2691
|
-
return
|
|
2725
|
+
return r;
|
|
2692
2726
|
}).filter(Boolean) : [] : [];
|
|
2693
2727
|
}
|
|
2694
|
-
function
|
|
2728
|
+
function Gt(u, e) {
|
|
2695
2729
|
for (const t of e.properties) {
|
|
2696
2730
|
if (t.type !== "ObjectProperty") continue;
|
|
2697
|
-
const
|
|
2698
|
-
if (!
|
|
2699
|
-
const
|
|
2700
|
-
(n) => typeof n == "string" ? n ===
|
|
2731
|
+
const r = t.key?.name;
|
|
2732
|
+
if (!r) continue;
|
|
2733
|
+
const a = u.findIndex(
|
|
2734
|
+
(n) => typeof n == "string" ? n === r : n.name === r
|
|
2701
2735
|
);
|
|
2702
|
-
if (
|
|
2703
|
-
const n = u[
|
|
2704
|
-
typeof n == "string" ? u[
|
|
2705
|
-
name:
|
|
2736
|
+
if (a >= 0) {
|
|
2737
|
+
const n = u[a];
|
|
2738
|
+
typeof n == "string" ? u[a] = {
|
|
2739
|
+
name: r,
|
|
2706
2740
|
default: k(A(t.value))
|
|
2707
2741
|
} : n.default = k(A(t.value));
|
|
2708
2742
|
}
|
|
@@ -2712,38 +2746,38 @@ function Fe(u) {
|
|
|
2712
2746
|
const e = u.arguments[0];
|
|
2713
2747
|
return e ? e.type === "ArrayExpression" ? e.elements.map((t) => t?.type === "StringLiteral" ? { name: t.value, params: [] } : null).filter(Boolean) : [] : [];
|
|
2714
2748
|
}
|
|
2715
|
-
function
|
|
2749
|
+
function Ht(u) {
|
|
2716
2750
|
const e = u.arguments[0];
|
|
2717
2751
|
return !e || e.type !== "ObjectExpression" ? [] : e.properties.map((t) => (t.type === "ObjectProperty" || t.type === "ObjectMethod") && t.key?.name || "").filter(Boolean);
|
|
2718
2752
|
}
|
|
2719
|
-
function
|
|
2720
|
-
const [e, t,
|
|
2753
|
+
function Wt(u) {
|
|
2754
|
+
const [e, t, r] = u.arguments;
|
|
2721
2755
|
if (!e || !t) return null;
|
|
2722
|
-
const
|
|
2756
|
+
const a = A(e), n = A(t);
|
|
2723
2757
|
let s = !1, i = !1;
|
|
2724
|
-
if (
|
|
2725
|
-
const o =
|
|
2758
|
+
if (r?.type === "ObjectExpression") {
|
|
2759
|
+
const o = r.properties;
|
|
2726
2760
|
s = xe(o, "deep"), i = xe(o, "immediate");
|
|
2727
2761
|
}
|
|
2728
2762
|
return {
|
|
2729
|
-
id:
|
|
2730
|
-
source:
|
|
2731
|
-
e.type === "ArrowFunctionExpression" || e.type === "FunctionExpression" ?
|
|
2763
|
+
id: se(),
|
|
2764
|
+
source: R(
|
|
2765
|
+
e.type === "ArrowFunctionExpression" || e.type === "FunctionExpression" ? a : `() => { return ${a}; }`
|
|
2732
2766
|
),
|
|
2733
|
-
handler:
|
|
2767
|
+
handler: R(n),
|
|
2734
2768
|
deep: s,
|
|
2735
2769
|
immediate: i
|
|
2736
2770
|
};
|
|
2737
2771
|
}
|
|
2738
|
-
function
|
|
2739
|
-
const e = u.async ? "async " : "", t = u.params.map((
|
|
2740
|
-
return `${e}(${t}) => ${
|
|
2772
|
+
function Jt(u) {
|
|
2773
|
+
const e = u.async ? "async " : "", t = u.params.map((a) => a.type === "ObjectPattern" ? `{${a.properties.map((s) => s.key?.name || s.name).join(",")}}` : a.type === "AssignmentPattern" ? a.left.name + "=" + (a.right?.extra?.raw || "null") : a.name).join(", "), r = A(u.body) || "{}";
|
|
2774
|
+
return `${e}(${t}) => ${r}`;
|
|
2741
2775
|
}
|
|
2742
2776
|
function $e(u) {
|
|
2743
2777
|
return /return\s+await\s+__provider\.apis\['[\w]*'\]\s*\.apply/.test(u) || /return\s+await\s+__provider\.createMock/.test(u);
|
|
2744
2778
|
}
|
|
2745
2779
|
function Ue(u, e, t) {
|
|
2746
|
-
const
|
|
2780
|
+
const r = /apis\['([\w]*)'\]/, n = Ye(""), s = (i) => {
|
|
2747
2781
|
const o = i.indexOf(".then(");
|
|
2748
2782
|
if (o === -1) return null;
|
|
2749
2783
|
let c = 1, d = o + 6;
|
|
@@ -2754,7 +2788,7 @@ function Ue(u, e, t) {
|
|
|
2754
2788
|
return i.substring(o + 6, d - 1).trim();
|
|
2755
2789
|
};
|
|
2756
2790
|
if (e.includes("__provider.apis")) {
|
|
2757
|
-
const o = (e.match(
|
|
2791
|
+
const o = (e.match(r) || [])[1];
|
|
2758
2792
|
if (!o) return null;
|
|
2759
2793
|
const c = (t.apis || []).find((l) => l.id === o || l.name === o), d = s(e);
|
|
2760
2794
|
return {
|
|
@@ -2806,159 +2840,159 @@ function Ue(u, e, t) {
|
|
|
2806
2840
|
}
|
|
2807
2841
|
function xe(u, e) {
|
|
2808
2842
|
return !!u?.find(
|
|
2809
|
-
(
|
|
2843
|
+
(r) => r.key?.name === e
|
|
2810
2844
|
)?.value?.value;
|
|
2811
2845
|
}
|
|
2812
|
-
function
|
|
2846
|
+
function Xt(u) {
|
|
2813
2847
|
const e = u?.find(
|
|
2814
2848
|
(t) => t.key?.name === "type"
|
|
2815
2849
|
);
|
|
2816
2850
|
if (e)
|
|
2817
2851
|
return e.value.type === "ArrayExpression" ? e.value.elements.map((t) => t.name) : e.value.name;
|
|
2818
2852
|
}
|
|
2819
|
-
function
|
|
2853
|
+
function zt(u) {
|
|
2820
2854
|
const e = u?.find(
|
|
2821
2855
|
(t) => t.key?.name === "default"
|
|
2822
2856
|
);
|
|
2823
2857
|
if (e)
|
|
2824
2858
|
return k(A(e.value));
|
|
2825
2859
|
}
|
|
2826
|
-
function
|
|
2827
|
-
const e = [], t = {},
|
|
2860
|
+
function Zt(u) {
|
|
2861
|
+
const e = [], t = {}, r = [];
|
|
2828
2862
|
try {
|
|
2829
|
-
const
|
|
2863
|
+
const a = ju.compileString(u, { charset: !1 })?.css || "", n = Nu.parse(a), s = /^.[\w]+_[\w]{5,}/;
|
|
2830
2864
|
for (const i of n.nodes)
|
|
2831
2865
|
if (i.type === "rule") {
|
|
2832
2866
|
const o = {};
|
|
2833
2867
|
s.test(i.selector) ? (i.nodes.forEach((c) => {
|
|
2834
2868
|
c.type === "decl" && (o[c.prop] = c.value);
|
|
2835
|
-
}), t[i.selector] = o) :
|
|
2869
|
+
}), t[i.selector] = o) : r.push(i.toString());
|
|
2836
2870
|
} else
|
|
2837
|
-
|
|
2838
|
-
} catch (
|
|
2839
|
-
e.push(`css解析出错了,错误信息:[ ${
|
|
2871
|
+
r.push(i.toString());
|
|
2872
|
+
} catch (a) {
|
|
2873
|
+
e.push(`css解析出错了,错误信息:[ ${a.message} ]
|
|
2840
2874
|
`);
|
|
2841
2875
|
}
|
|
2842
2876
|
return {
|
|
2843
2877
|
errors: e,
|
|
2844
2878
|
styles: t,
|
|
2845
|
-
css:
|
|
2879
|
+
css: r.join(`
|
|
2846
2880
|
`)
|
|
2847
2881
|
};
|
|
2848
2882
|
}
|
|
2849
2883
|
function ge(u, e, t) {
|
|
2850
|
-
let
|
|
2884
|
+
let r = "", a = 0;
|
|
2851
2885
|
const n = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`/g;
|
|
2852
2886
|
let s;
|
|
2853
2887
|
for (; (s = n.exec(u)) !== null; ) {
|
|
2854
|
-
const i = u.slice(
|
|
2855
|
-
|
|
2888
|
+
const i = u.slice(a, s.index);
|
|
2889
|
+
r += i.replace(e, t);
|
|
2856
2890
|
const o = s[0];
|
|
2857
|
-
o.startsWith("`") ?
|
|
2891
|
+
o.startsWith("`") ? r += Qt(o, e, t) : r += o, a = s.index + s[0].length;
|
|
2858
2892
|
}
|
|
2859
|
-
return
|
|
2893
|
+
return r += u.slice(a).replace(e, t), r;
|
|
2860
2894
|
}
|
|
2861
|
-
function
|
|
2862
|
-
let
|
|
2895
|
+
function Qt(u, e, t) {
|
|
2896
|
+
let r = "", a = 0;
|
|
2863
2897
|
const n = /\$\{([^}]*)\}/g;
|
|
2864
2898
|
let s;
|
|
2865
2899
|
for (; (s = n.exec(u)) !== null; ) {
|
|
2866
|
-
|
|
2900
|
+
r += u.slice(a, s.index);
|
|
2867
2901
|
const o = s[1].replace(e, t);
|
|
2868
|
-
|
|
2902
|
+
r += "${" + o + "}", a = s.index + s[0].length;
|
|
2869
2903
|
}
|
|
2870
|
-
return
|
|
2904
|
+
return r += u.slice(a), r;
|
|
2871
2905
|
}
|
|
2872
|
-
function
|
|
2906
|
+
function Kt(u, e) {
|
|
2873
2907
|
if (!u) return u;
|
|
2874
2908
|
let t = u;
|
|
2875
|
-
const
|
|
2876
|
-
for (const
|
|
2877
|
-
t =
|
|
2909
|
+
const r = [...e.refs, ...e.computed];
|
|
2910
|
+
for (const a of r)
|
|
2911
|
+
t = _u(t, a);
|
|
2878
2912
|
t = ge(
|
|
2879
2913
|
t,
|
|
2880
2914
|
/__instance\.proxy\.\$forceUpdate\./g,
|
|
2881
2915
|
"__instance.proxy."
|
|
2882
2916
|
);
|
|
2883
|
-
for (const [
|
|
2917
|
+
for (const [a, n] of Object.entries(
|
|
2884
2918
|
e.reverseMemberApiMap || {}
|
|
2885
2919
|
))
|
|
2886
2920
|
for (const [s, i] of Object.entries(n)) {
|
|
2887
2921
|
const o = new RegExp(
|
|
2888
|
-
`\\b${
|
|
2922
|
+
`\\b${oe(a)}\\.${oe(s)}\\b`,
|
|
2889
2923
|
"g"
|
|
2890
2924
|
);
|
|
2891
2925
|
t = ge(t, o, `this.${i}`);
|
|
2892
2926
|
}
|
|
2893
|
-
for (const
|
|
2894
|
-
t =
|
|
2895
|
-
for (const
|
|
2896
|
-
t =
|
|
2897
|
-
for (const [
|
|
2898
|
-
t =
|
|
2899
|
-
e.hasState && (t =
|
|
2900
|
-
for (const
|
|
2901
|
-
t =
|
|
2902
|
-
for (const
|
|
2903
|
-
t =
|
|
2904
|
-
for (const
|
|
2905
|
-
t =
|
|
2906
|
-
for (const
|
|
2907
|
-
t =
|
|
2908
|
-
for (const
|
|
2909
|
-
t =
|
|
2927
|
+
for (const a of e.props)
|
|
2928
|
+
t = Yt(t, "__props", a, `this.${a}`);
|
|
2929
|
+
for (const a of e.props)
|
|
2930
|
+
t = D(t, a, `this.${a}`);
|
|
2931
|
+
for (const [a, n] of Object.entries(e.reverseApiMap))
|
|
2932
|
+
t = D(t, a, `this.${n}`);
|
|
2933
|
+
e.hasState && (t = D(t, "__state", "this.state"));
|
|
2934
|
+
for (const a of e.reactives)
|
|
2935
|
+
t = D(t, a, `this.${a}`);
|
|
2936
|
+
for (const a of e.methods)
|
|
2937
|
+
t = D(t, a, `this.${a}`);
|
|
2938
|
+
for (const a of e.composables)
|
|
2939
|
+
t = D(t, a, `this.${a}`);
|
|
2940
|
+
for (const a of e.injects)
|
|
2941
|
+
t = D(t, a, `this.${a}`);
|
|
2942
|
+
for (const a of e.dataSources)
|
|
2943
|
+
t = D(t, a, `this.${a}`);
|
|
2910
2944
|
return t = t.replace(/this\.this\./g, "this."), t;
|
|
2911
2945
|
}
|
|
2912
|
-
function
|
|
2946
|
+
function oe(u) {
|
|
2913
2947
|
return u.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2914
2948
|
}
|
|
2915
|
-
function
|
|
2916
|
-
const
|
|
2917
|
-
`\\b${
|
|
2949
|
+
function Yt(u, e, t, r) {
|
|
2950
|
+
const a = new RegExp(
|
|
2951
|
+
`\\b${oe(e)}\\.${oe(t)}\\b`,
|
|
2918
2952
|
"g"
|
|
2919
2953
|
);
|
|
2920
|
-
return ge(u,
|
|
2954
|
+
return ge(u, a, r);
|
|
2921
2955
|
}
|
|
2922
|
-
function
|
|
2956
|
+
function lu(u) {
|
|
2923
2957
|
const e = {}, t = {};
|
|
2924
|
-
for (const [
|
|
2925
|
-
if (
|
|
2926
|
-
if (
|
|
2927
|
-
const n =
|
|
2928
|
-
t[s] || (t[s] = {}), t[s][i] =
|
|
2958
|
+
for (const [r, a] of Object.entries(ye))
|
|
2959
|
+
if (a.replace)
|
|
2960
|
+
if (a.replace.includes(".")) {
|
|
2961
|
+
const n = a.replace.lastIndexOf("."), s = a.replace.substring(0, n), i = a.replace.substring(n + 1);
|
|
2962
|
+
t[s] || (t[s] = {}), t[s][i] = r, e[r] = r;
|
|
2929
2963
|
} else
|
|
2930
|
-
e[
|
|
2964
|
+
e[a.replace] = r;
|
|
2931
2965
|
if (u) {
|
|
2932
|
-
const
|
|
2933
|
-
if (
|
|
2934
|
-
for (const [
|
|
2966
|
+
const r = Xe[u];
|
|
2967
|
+
if (r) {
|
|
2968
|
+
for (const [a, n] of Object.entries(r))
|
|
2935
2969
|
if (n.replace)
|
|
2936
2970
|
if (n.replace.includes(".")) {
|
|
2937
2971
|
const s = n.replace.lastIndexOf("."), i = n.replace.substring(0, s), o = n.replace.substring(s + 1);
|
|
2938
|
-
t[i] || (t[i] = {}), t[i][o] =
|
|
2972
|
+
t[i] || (t[i] = {}), t[i][o] = a, e[a] = a;
|
|
2939
2973
|
} else
|
|
2940
|
-
e[n.replace] =
|
|
2974
|
+
e[n.replace] = a;
|
|
2941
2975
|
}
|
|
2942
2976
|
}
|
|
2943
2977
|
return { simple: e, member: t };
|
|
2944
2978
|
}
|
|
2945
|
-
function
|
|
2979
|
+
function e0(u) {
|
|
2946
2980
|
for (const e of u)
|
|
2947
|
-
if (
|
|
2981
|
+
if (Au.includes(e.from)) return e.from;
|
|
2948
2982
|
}
|
|
2949
|
-
function
|
|
2950
|
-
const e = {}, t = (
|
|
2951
|
-
for (const [
|
|
2983
|
+
function u0(u) {
|
|
2984
|
+
const e = {}, t = (r) => {
|
|
2985
|
+
for (const [a, n] of Object.entries(r)) {
|
|
2952
2986
|
if (!n.composable || !n.replace || !n.replace.includes("."))
|
|
2953
2987
|
continue;
|
|
2954
2988
|
e[n.composable] || (e[n.composable] = {});
|
|
2955
2989
|
const s = n.replace.substring(n.replace.lastIndexOf(".") + 1);
|
|
2956
|
-
e[n.composable][s] =
|
|
2990
|
+
e[n.composable][s] = a;
|
|
2957
2991
|
}
|
|
2958
2992
|
};
|
|
2959
2993
|
if (t(ye), u) {
|
|
2960
|
-
const
|
|
2961
|
-
|
|
2994
|
+
const r = Xe[u];
|
|
2995
|
+
r && t(r);
|
|
2962
2996
|
}
|
|
2963
2997
|
return e;
|
|
2964
2998
|
}
|
|
@@ -2975,18 +3009,18 @@ function Ge(u, e) {
|
|
|
2975
3009
|
dataSources: new Set(e.dataSources),
|
|
2976
3010
|
hasState: e.hasState,
|
|
2977
3011
|
reverseApiMap: e.globalApiVars,
|
|
2978
|
-
reverseMemberApiMap: e.reverseMemberApiMap ||
|
|
3012
|
+
reverseMemberApiMap: e.reverseMemberApiMap || lu().member
|
|
2979
3013
|
};
|
|
2980
|
-
let
|
|
2981
|
-
|
|
2982
|
-
for (const [
|
|
2983
|
-
|
|
2984
|
-
return
|
|
3014
|
+
let r = Kt(u, t);
|
|
3015
|
+
r = r.replace(/_ctx\./g, "this."), r = r.replace(/this\.this\./g, "this.");
|
|
3016
|
+
for (const [a, n] of Object.entries(e.libs || {}))
|
|
3017
|
+
r = D(r, a, `this.$libs.${n}.${a}`);
|
|
3018
|
+
return r;
|
|
2985
3019
|
}
|
|
2986
|
-
function
|
|
2987
|
-
const e =
|
|
3020
|
+
function t0(u) {
|
|
3021
|
+
const e = e0(u.imports || []), { simple: t, member: r } = lu(e);
|
|
2988
3022
|
if (u.globalApiDestructured && u.globalApiDestructured.length > 0) {
|
|
2989
|
-
const n =
|
|
3023
|
+
const n = u0(e);
|
|
2990
3024
|
for (const { callee: s, destructure: i } of u.globalApiDestructured) {
|
|
2991
3025
|
const o = n[s];
|
|
2992
3026
|
if (o)
|
|
@@ -2994,11 +3028,11 @@ function e0(u) {
|
|
|
2994
3028
|
o[c] && (t[c] = o[c]);
|
|
2995
3029
|
}
|
|
2996
3030
|
}
|
|
2997
|
-
const
|
|
3031
|
+
const a = /* @__PURE__ */ new Set();
|
|
2998
3032
|
for (const n of u.composables || [])
|
|
2999
3033
|
if (n.destructure && n.destructure.length > 0)
|
|
3000
|
-
for (const s of n.destructure)
|
|
3001
|
-
else n.name &&
|
|
3034
|
+
for (const s of n.destructure) a.add(s);
|
|
3035
|
+
else n.name && a.add(n.name);
|
|
3002
3036
|
return {
|
|
3003
3037
|
refs: new Set(Object.keys(u.refs || {})),
|
|
3004
3038
|
reactives: new Set(Object.keys(u.reactives || {})),
|
|
@@ -3007,20 +3041,20 @@ function e0(u) {
|
|
|
3007
3041
|
props: new Set(
|
|
3008
3042
|
(u.props || []).map((n) => typeof n == "string" ? n : n.name)
|
|
3009
3043
|
),
|
|
3010
|
-
composables:
|
|
3044
|
+
composables: a,
|
|
3011
3045
|
injects: new Set((u.inject || []).map((n) => n.name)),
|
|
3012
3046
|
dataSources: new Set(Object.keys(u.dataSources || {})),
|
|
3013
3047
|
hasState: Object.keys(u.state || {}).length > 0,
|
|
3014
3048
|
reverseApiMap: t,
|
|
3015
|
-
reverseMemberApiMap:
|
|
3049
|
+
reverseMemberApiMap: r
|
|
3016
3050
|
};
|
|
3017
3051
|
}
|
|
3018
|
-
const
|
|
3052
|
+
const fu = "arrow-double-left, arrow-double-right, contact, notes, records, cash-back-record, newspaper, discount, completed, user, description, list-switch, list-switching, link-o, miniprogram-o, qq, wechat-moments, weibo, cash-o, guide-o, invitation, shield-o, exchange, eye, enlarge, expand-o, eye-o, expand, filter-o, fire, fail, failure, fire-o, flag-o, font, font-o, gem-o, flower-o, gem, gift-card, friends, friends-o, gold-coin, gold-coin-o, good-job-o, gift, gift-o, gift-card-o, good-job, home-o, goods-collect, graphic, goods-collect-o, hot-o, info, hotel-o, info-o, hot-sale-o, hot, like, idcard, like-o, hot-sale, location-o, location, label, lock, label-o, map-marked, logistics, manager, more, live, manager-o, medal, more-o, music-o, music, new-arrival-o, medal-o, new-o, free-postage, newspaper-o, new-arrival, minus, orders-o, new, paid, notes-o, other-pay, pause-circle, pause, pause-circle-o, peer-pay, pending-payment, passed, plus, phone-circle-o, phone-o, printer, photo-fail, phone, photo-o, play-circle, play, phone-circle, point-gift-o, point-gift, play-circle-o, shrink, photo, qr, qr-invalid, question-o, revoke, replay, service, question, search, refund-o, service-o, scan, share, send-gift-o, share-o, setting, points, photograph, shop, shop-o, shop-collect-o, shop-collect, smile, shopping-cart-o, sign, sort, star-o, smile-comment-o, stop, stop-circle-o, smile-o, star, success, stop-circle, records-o, shopping-cart, tosend, todo-list, thumb-circle-o, thumb-circle, umbrella-circle, underway, upgrade, todo-list-o, tv-o, underway-o, user-o, vip-card-o, vip-card, send-gift, wap-home, wap-nav, volume-o, video, wap-home-o, volume, warning, weapp-nav, wechat-pay, wechat, setting-o, youzan-shield, warn-o, smile-comment, user-circle-o, video-o, add-square, add, arrow-down, arrow-up, arrow, after-sale, add-o, alipay, ascending, apps-o, aim, award, arrow-left, award-o, audio, bag-o, balance-list, back-top, bag, balance-pay, balance-o, bar-chart-o, bars, balance-list-o, birthday-cake-o, bookmark, bill, bell, browsing-history-o, browsing-history, bookmark-o, bulb-o, bullhorn-o, bill-o, calendar-o, brush-o, card, cart-o, cart-circle, cart-circle-o, cart, cash-on-deliver, cash-back-record-o, cashier-o, chart-trending-o, certificate, chat, clear, chat-o, checked, clock, clock-o, close, closed-eye, circle, cluster-o, column, comment-circle-o, cluster, comment, comment-o, comment-circle, completed-o, credit-pay, coupon, debit-pay, coupon-o, contact-o, descending, desktop-o, diamond-o, description-o, delete, diamond, delete-o, cross, edit, ellipsis, down, discount-o, ecard-pay, envelop-o".split(
|
|
3019
3053
|
", "
|
|
3020
|
-
),
|
|
3054
|
+
), r0 = "AddLocation, Aim, AlarmClock, Apple, ArrowDownBold, ArrowDown, ArrowLeftBold, ArrowLeft, ArrowRightBold, ArrowRight, ArrowUpBold, ArrowUp, Avatar, Back, Baseball, Basketball, BellFilled, Bell, Bicycle, BottomLeft, BottomRight, Bottom, Bowl, Box, Briefcase, BrushFilled, Brush, Burger, Calendar, CameraFilled, Camera, CaretBottom, CaretLeft, CaretRight, CaretTop, Cellphone, ChatDotRound, ChatDotSquare, ChatLineRound, ChatLineSquare, ChatRound, ChatSquare, Check, Checked, Cherry, Chicken, ChromeFilled, CircleCheckFilled, CircleCheck, CircleCloseFilled, CircleClose, CirclePlusFilled, CirclePlus, Clock, CloseBold, Close, Cloudy, CoffeeCup, Coffee, Coin, ColdDrink, CollectionTag, Collection, Comment, Compass, Connection, Coordinate, CopyDocument, Cpu, CreditCard, Crop, DArrowLeft, DArrowRight, DCaret, DataAnalysis, DataBoard, DataLine, DeleteFilled, DeleteLocation, Delete, Dessert, Discount, DishDot, Dish, DocumentAdd, DocumentChecked, DocumentCopy, DocumentDelete, DocumentRemove, Document, Download, Drizzling, EditPen, Edit, ElemeFilled, Eleme, ElementPlus, Expand, Failed, Female, Files, Film, Filter, Finished, FirstAidKit, Flag, Fold, FolderAdd, FolderChecked, FolderDelete, FolderOpened, FolderRemove, Folder, Food, Football, ForkSpoon, Fries, FullScreen, GobletFull, GobletSquareFull, GobletSquare, Goblet, GoldMedal, GoodsFilled, Goods, Grape, Grid, Guide, Handbag, Headset, HelpFilled, Help, Hide, Histogram, HomeFilled, HotWater, House, IceCreamRound, IceCreamSquare, IceCream, IceDrink, IceTea, InfoFilled, Iphone, Key, KnifeFork, Lightning, Link, List, Loading, LocationFilled, LocationInformation, Location, Lock, Lollipop, MagicStick, Magnet, Male, Management, MapLocation, Medal, Memo, Menu, MessageBox, Message, Mic, Microphone, MilkTea, Minus, Money, Monitor, MoonNight, Moon, MoreFilled, More, MostlyCloudy, Mouse, Mug, MuteNotification, Mute, NoSmoking, Notebook, Notification, Odometer, OfficeBuilding, Open, Operation, Opportunity, Orange, Paperclip, PartlyCloudy, Pear, PhoneFilled, Phone, PictureFilled, PictureRounded, Picture, PieChart, Place, Platform, Plus, Pointer, Position, Postcard, Pouring, Present, PriceTag, Printer, Promotion, QuartzWatch, QuestionFilled, Rank, ReadingLamp, Reading, RefreshLeft, RefreshRight, Refresh, Refrigerator, RemoveFilled, Remove, Right, ScaleToOriginal, School, Scissor, Search, Select, Sell, SemiSelect, Service, SetUp, Setting, Share, Ship, Shop, ShoppingBag, ShoppingCartFull, ShoppingCart, ShoppingTrolley, Smoking, Soccer, SoldOut, SortDown, SortUp, Sort, Stamp, StarFilled, Star, Stopwatch, SuccessFilled, Sugar, SuitcaseLine, Suitcase, Sunny, Sunrise, Sunset, SwitchButton, SwitchFilled, Switch, TakeawayBox, Ticket, Tickets, Timer, ToiletPaper, Tools, TopLeft, TopRight, Top, TrendCharts, TrophyBase, Trophy, TurnOff, Umbrella, Unlock, UploadFilled, Upload, UserFilled, User, Van, VideoCameraFilled, VideoCamera, VideoPause, VideoPlay, View, WalletFilled, Wallet, WarnTriangleFilled, WarningFilled, Warning, Watch, Watermelon, WindPower, ZoomIn, ZoomOut, VtjIconChatRecord, VtjIconNewChat, VtjIconAi, VtjIconUniapp, VtjIconWindowMax, VtjIconWindowMin, VtjIconWindowClose, VtjIconWindowNormal, VtjIconWindowDown, VtjIconWindowUp, VtjIconNpSave, VtjIconNpFile, VtjIconNpEdit, VtjIconNpShare, VtjIconNpSearch, VtjIconNpExport, VtjIconNpImport, VtjIconNpList, VtjIconNpPrint, VtjIconNpCancel, VtjIconNpConfirm, VtjIconNpReset, VtjIconNpReturnAll, VtjIconNpReturn, VtjIconNpRemove, VtjIconNpRemoveRow, VtjIconNpDelete, VtjIconNpExit, VtjIconNpRefresh, VtjIconNpAdd, VtjIconNpSelect, VtjIconNpAddRow, VtjIconNpExtend, VtjIconNpClose, VtjIconNpSubmit, VtjIconDeps, VtjIconBack, VtjIconHome, VtjIconApi, VtjIconExport, VtjIconImport, VtjIconGreater, VtjIconSmaller, VtjIconCheck, VtjIconSwitch, VtjIconCopy, VtjIconLock, VtjIconUnlock, VtjIconLayers, VtjIconConsole, VtjIconTeam, VtjIconPublish, VtjIconPreview, VtjIconSave, VtjIconPc, VtjIconPhone, VtjIconPad, VtjIconRedo, VtjIconRefresh, VtjIconUndo, VtjIconCategory, VtjIconProject, VtjIconNotice, VtjIconFav, VtjIconBug, VtjIconFile, VtjIconFolder, VtjIconUpload, VtjIconDownload, VtjIconUser, VtjIconSetting, VtjIconArrowRight, VtjIconArrowLeft, VtjIconArrowDown, VtjIconArrowUp, VtjIconShare, VtjIconData, VtjIconTemplate, VtjIconExitFullscreen, VtjIconFullscreen, VtjIconEdit, VtjIconRemove, VtjIconJs, VtjIconDatabase, VtjIconInfo, VtjIconPlus, VtjIconMinus, VtjIconHelp, VtjIconVars, VtjIconOutline, VtjIconVisible, VtjIconInvisible, VtjIconDocument, VtjIconHistory, VtjIconFixed, VtjIconUnfixed, VtjIconSearch, VtjIconMore, VtjIconClose, VtjIconComponents, VtjIconBlock".split(
|
|
3021
3055
|
", "
|
|
3022
|
-
),
|
|
3023
|
-
class
|
|
3056
|
+
), a0 = "user", O = "User";
|
|
3057
|
+
class n0 {
|
|
3024
3058
|
validate(e) {
|
|
3025
3059
|
const t = {
|
|
3026
3060
|
valid: !0,
|
|
@@ -3029,12 +3063,12 @@ class a0 {
|
|
|
3029
3063
|
illegalVtjIcons: []
|
|
3030
3064
|
};
|
|
3031
3065
|
this.isCompleteSFC(e) || (t.errors.push("代码不符合Vue3单文件组件规范"), t.valid = !1);
|
|
3032
|
-
const
|
|
3033
|
-
return
|
|
3066
|
+
const r = this.checkSyntax(e);
|
|
3067
|
+
return r ? (t.errors.push(`代码语法错误: ${r}`), t.valid = !1, t) : (this.checkSetup(e) || (t.errors.push("setup不符合低代码模版要求"), t.valid = !1), this.hasUnchangedComment(e) && (t.errors.push("代码不完整,需要输出完整代码,不能有任何省略"), t.valid = !1), t.illegalVantIcons = this.checkVantIcons(e), t.illegalVtjIcons = this.checkVtjIcons(e), t);
|
|
3034
3068
|
}
|
|
3035
3069
|
isCompleteSFC(e) {
|
|
3036
3070
|
try {
|
|
3037
|
-
const t =
|
|
3071
|
+
const t = B(e);
|
|
3038
3072
|
return !!(t.template && t.script && t.styles);
|
|
3039
3073
|
} catch {
|
|
3040
3074
|
return !1;
|
|
@@ -3043,256 +3077,256 @@ class a0 {
|
|
|
3043
3077
|
checkSyntax(e) {
|
|
3044
3078
|
let t = "";
|
|
3045
3079
|
try {
|
|
3046
|
-
const
|
|
3047
|
-
|
|
3048
|
-
} catch (
|
|
3049
|
-
|
|
3080
|
+
const r = B(e);
|
|
3081
|
+
L(r.script);
|
|
3082
|
+
} catch (r) {
|
|
3083
|
+
r instanceof SyntaxError && (t = r.message);
|
|
3050
3084
|
}
|
|
3051
3085
|
return t;
|
|
3052
3086
|
}
|
|
3053
3087
|
checkSetup(e) {
|
|
3054
|
-
const t =
|
|
3088
|
+
const t = B(e);
|
|
3055
3089
|
if (t.isScriptSetup)
|
|
3056
3090
|
return !0;
|
|
3057
|
-
let
|
|
3091
|
+
let r = 0;
|
|
3058
3092
|
return ze(t.script, {
|
|
3059
|
-
ObjectMethod(
|
|
3060
|
-
|
|
3093
|
+
ObjectMethod(a) {
|
|
3094
|
+
a.node.key.name === "setup" && (r = a.node.body.body.filter(
|
|
3061
3095
|
(s) => !q.isEmptyStatement(s)
|
|
3062
3096
|
).length);
|
|
3063
3097
|
}
|
|
3064
|
-
}),
|
|
3098
|
+
}), r === 3;
|
|
3065
3099
|
}
|
|
3066
3100
|
findVantIcons(e) {
|
|
3067
|
-
const t =
|
|
3068
|
-
return
|
|
3101
|
+
const t = B(e), r = /<(?:VanIcon|van-icon)\b[^>]*>/g, a = t.template.match(r) || [], n = [];
|
|
3102
|
+
return a.forEach((s) => {
|
|
3069
3103
|
const i = s.match(/\bname="([^"]+)"/);
|
|
3070
3104
|
i && n.push(i[1]);
|
|
3071
3105
|
}), [...new Set(n)];
|
|
3072
3106
|
}
|
|
3073
3107
|
checkVantIcons(e) {
|
|
3074
|
-
const t = this.findVantIcons(e),
|
|
3075
|
-
for (const
|
|
3076
|
-
|
|
3077
|
-
return
|
|
3108
|
+
const t = this.findVantIcons(e), r = [];
|
|
3109
|
+
for (const a of t)
|
|
3110
|
+
fu.includes(a) || r.push(a);
|
|
3111
|
+
return r;
|
|
3078
3112
|
}
|
|
3079
3113
|
findVtjIcons(e) {
|
|
3080
|
-
const t =
|
|
3081
|
-
return !
|
|
3114
|
+
const t = B(e), r = /import\s*{([^}]+)}\s*from\s*['"]\@vtj\/icons['"]/, a = t.script.match(r);
|
|
3115
|
+
return !a || !a[1] ? [] : a[1].split(",").map((n) => n.trim()).filter(Boolean);
|
|
3082
3116
|
}
|
|
3083
3117
|
checkVtjIcons(e) {
|
|
3084
|
-
const t = this.findVtjIcons(e),
|
|
3085
|
-
for (const
|
|
3086
|
-
|
|
3087
|
-
return
|
|
3118
|
+
const t = this.findVtjIcons(e), r = [];
|
|
3119
|
+
for (const a of t)
|
|
3120
|
+
r0.includes(a) || r.push(a);
|
|
3121
|
+
return r;
|
|
3088
3122
|
}
|
|
3089
3123
|
hasUnchangedComment(e) {
|
|
3090
|
-
const t = /<!--([\s\S]*?)-->/g,
|
|
3124
|
+
const t = /<!--([\s\S]*?)-->/g, r = /\/\*([\s\S]*?)\*\//g, a = /\/\/(.*)/g;
|
|
3091
3125
|
return [
|
|
3092
3126
|
...e.match(t) || [],
|
|
3093
|
-
...e.match(
|
|
3094
|
-
...e.match(
|
|
3127
|
+
...e.match(r) || [],
|
|
3128
|
+
...e.match(a) || []
|
|
3095
3129
|
].some(
|
|
3096
3130
|
(s) => /不变/.test(s.replace(/\*/g, ""))
|
|
3097
3131
|
// 移除多行注释的星号避免干扰
|
|
3098
3132
|
);
|
|
3099
3133
|
}
|
|
3100
3134
|
}
|
|
3101
|
-
function
|
|
3135
|
+
function s0(u) {
|
|
3102
3136
|
const e = [];
|
|
3103
3137
|
let t = u;
|
|
3104
|
-
const
|
|
3105
|
-
if (!
|
|
3138
|
+
const r = B(u);
|
|
3139
|
+
if (!r.template || !r.script)
|
|
3106
3140
|
return {
|
|
3107
3141
|
fixed: !1,
|
|
3108
3142
|
originalCode: u,
|
|
3109
3143
|
fixedCode: u,
|
|
3110
3144
|
changes: []
|
|
3111
3145
|
};
|
|
3112
|
-
const
|
|
3146
|
+
const a = i0(r.script), n = r.template;
|
|
3113
3147
|
let s = n;
|
|
3114
3148
|
const i = [], o = /\{\{([^}]+)\}\}/g;
|
|
3115
3149
|
let c;
|
|
3116
3150
|
for (; (c = o.exec(n)) !== null; ) {
|
|
3117
|
-
const
|
|
3118
|
-
if (
|
|
3119
|
-
const
|
|
3151
|
+
const g = c[0], m = c[1], h = H(m, a);
|
|
3152
|
+
if (h !== m) {
|
|
3153
|
+
const y = G(n, c.index);
|
|
3120
3154
|
i.push({
|
|
3121
3155
|
start: c.index,
|
|
3122
|
-
end: c.index +
|
|
3123
|
-
original:
|
|
3124
|
-
replacement: `{{${
|
|
3125
|
-
line:
|
|
3126
|
-
column:
|
|
3156
|
+
end: c.index + g.length,
|
|
3157
|
+
original: g,
|
|
3158
|
+
replacement: `{{${h}}}`,
|
|
3159
|
+
line: y.line,
|
|
3160
|
+
column: y.column
|
|
3127
3161
|
}), e.push({
|
|
3128
|
-
line:
|
|
3129
|
-
column:
|
|
3130
|
-
original:
|
|
3131
|
-
fixed:
|
|
3162
|
+
line: y.line + 1,
|
|
3163
|
+
column: y.column,
|
|
3164
|
+
original: m.trim(),
|
|
3165
|
+
fixed: h.trim(),
|
|
3132
3166
|
message: "修复插值表达式:添加 state. 前缀"
|
|
3133
3167
|
});
|
|
3134
3168
|
}
|
|
3135
3169
|
}
|
|
3136
3170
|
const d = /:(\w+)="([^"]+)"/g;
|
|
3137
3171
|
for (; (c = d.exec(n)) !== null; ) {
|
|
3138
|
-
const
|
|
3139
|
-
if (
|
|
3172
|
+
const g = c[0], m = c[1], h = c[2], y = H(h, a);
|
|
3173
|
+
if (y !== h) {
|
|
3140
3174
|
const w = G(n, c.index);
|
|
3141
3175
|
i.push({
|
|
3142
3176
|
start: c.index,
|
|
3143
|
-
end: c.index +
|
|
3144
|
-
original:
|
|
3145
|
-
replacement: `:${
|
|
3177
|
+
end: c.index + g.length,
|
|
3178
|
+
original: g,
|
|
3179
|
+
replacement: `:${m}="${y}"`,
|
|
3146
3180
|
line: w.line,
|
|
3147
3181
|
column: w.column
|
|
3148
3182
|
}), e.push({
|
|
3149
3183
|
line: w.line + 1,
|
|
3150
3184
|
column: w.column,
|
|
3151
|
-
original:
|
|
3152
|
-
fixed:
|
|
3185
|
+
original: h,
|
|
3186
|
+
fixed: y,
|
|
3153
3187
|
message: "修复绑定属性:添加 state. 前缀"
|
|
3154
3188
|
});
|
|
3155
3189
|
}
|
|
3156
3190
|
}
|
|
3157
3191
|
const l = /v-(if|else-if|show)="([^"]+)"/g;
|
|
3158
3192
|
for (; (c = l.exec(n)) !== null; ) {
|
|
3159
|
-
const
|
|
3160
|
-
if (
|
|
3193
|
+
const g = c[0], m = c[1], h = c[2], y = H(h, a);
|
|
3194
|
+
if (y !== h) {
|
|
3161
3195
|
const w = G(n, c.index);
|
|
3162
3196
|
i.push({
|
|
3163
3197
|
start: c.index,
|
|
3164
|
-
end: c.index +
|
|
3165
|
-
original:
|
|
3166
|
-
replacement: `v-${
|
|
3198
|
+
end: c.index + g.length,
|
|
3199
|
+
original: g,
|
|
3200
|
+
replacement: `v-${m}="${y}"`,
|
|
3167
3201
|
line: w.line,
|
|
3168
3202
|
column: w.column
|
|
3169
3203
|
}), e.push({
|
|
3170
3204
|
line: w.line + 1,
|
|
3171
3205
|
column: w.column,
|
|
3172
|
-
original:
|
|
3173
|
-
fixed:
|
|
3174
|
-
message: `修复 v-${
|
|
3206
|
+
original: h,
|
|
3207
|
+
fixed: y,
|
|
3208
|
+
message: `修复 v-${m} 指令:添加 state. 前缀`
|
|
3175
3209
|
});
|
|
3176
3210
|
}
|
|
3177
3211
|
}
|
|
3178
|
-
const
|
|
3179
|
-
for (; (c =
|
|
3180
|
-
const
|
|
3181
|
-
if (
|
|
3182
|
-
const [,
|
|
3212
|
+
const b = /v-for="([^"]+)"/g;
|
|
3213
|
+
for (; (c = b.exec(n)) !== null; ) {
|
|
3214
|
+
const g = c[0], h = c[1].match(/^(.+)\s+in\s+(.+)$/);
|
|
3215
|
+
if (h) {
|
|
3216
|
+
const [, y, w] = h, C = H(
|
|
3183
3217
|
w,
|
|
3184
|
-
|
|
3218
|
+
a
|
|
3185
3219
|
);
|
|
3186
|
-
if (
|
|
3187
|
-
const
|
|
3220
|
+
if (C !== w) {
|
|
3221
|
+
const _ = G(n, c.index), J = `v-for="${y} in ${C}"`;
|
|
3188
3222
|
i.push({
|
|
3189
3223
|
start: c.index,
|
|
3190
|
-
end: c.index +
|
|
3191
|
-
original:
|
|
3192
|
-
replacement:
|
|
3193
|
-
line:
|
|
3194
|
-
column:
|
|
3224
|
+
end: c.index + g.length,
|
|
3225
|
+
original: g,
|
|
3226
|
+
replacement: J,
|
|
3227
|
+
line: _.line,
|
|
3228
|
+
column: _.column
|
|
3195
3229
|
}), e.push({
|
|
3196
|
-
line:
|
|
3197
|
-
column:
|
|
3230
|
+
line: _.line + 1,
|
|
3231
|
+
column: _.column,
|
|
3198
3232
|
original: w,
|
|
3199
|
-
fixed:
|
|
3233
|
+
fixed: C,
|
|
3200
3234
|
message: "修复 v-for 指令:添加 state. 前缀"
|
|
3201
3235
|
});
|
|
3202
3236
|
}
|
|
3203
3237
|
}
|
|
3204
3238
|
}
|
|
3205
|
-
const
|
|
3206
|
-
for (; (c =
|
|
3207
|
-
const
|
|
3208
|
-
if (
|
|
3209
|
-
const
|
|
3239
|
+
const p = /v-model="([^"]+)"/g;
|
|
3240
|
+
for (; (c = p.exec(n)) !== null; ) {
|
|
3241
|
+
const g = c[0], m = c[1], h = H(m, a);
|
|
3242
|
+
if (h !== m) {
|
|
3243
|
+
const y = G(n, c.index);
|
|
3210
3244
|
i.push({
|
|
3211
3245
|
start: c.index,
|
|
3212
|
-
end: c.index +
|
|
3213
|
-
original: h,
|
|
3214
|
-
replacement: `v-model="${x}"`,
|
|
3215
|
-
line: E.line,
|
|
3216
|
-
column: E.column
|
|
3217
|
-
}), e.push({
|
|
3218
|
-
line: E.line + 1,
|
|
3219
|
-
column: E.column,
|
|
3246
|
+
end: c.index + g.length,
|
|
3220
3247
|
original: g,
|
|
3221
|
-
|
|
3248
|
+
replacement: `v-model="${h}"`,
|
|
3249
|
+
line: y.line,
|
|
3250
|
+
column: y.column
|
|
3251
|
+
}), e.push({
|
|
3252
|
+
line: y.line + 1,
|
|
3253
|
+
column: y.column,
|
|
3254
|
+
original: m,
|
|
3255
|
+
fixed: h,
|
|
3222
3256
|
message: "修复 v-model 指令:添加 state. 前缀"
|
|
3223
3257
|
});
|
|
3224
3258
|
}
|
|
3225
3259
|
}
|
|
3226
|
-
const
|
|
3227
|
-
for (; (c =
|
|
3228
|
-
const
|
|
3229
|
-
if (
|
|
3230
|
-
const
|
|
3260
|
+
const x = /v-bind="([^"]+)"/g;
|
|
3261
|
+
for (; (c = x.exec(n)) !== null; ) {
|
|
3262
|
+
const g = c[0], m = c[1], h = H(m, a);
|
|
3263
|
+
if (h !== m) {
|
|
3264
|
+
const y = G(n, c.index);
|
|
3231
3265
|
i.push({
|
|
3232
3266
|
start: c.index,
|
|
3233
|
-
end: c.index +
|
|
3234
|
-
original: h,
|
|
3235
|
-
replacement: `v-bind="${x}"`,
|
|
3236
|
-
line: E.line,
|
|
3237
|
-
column: E.column
|
|
3238
|
-
}), e.push({
|
|
3239
|
-
line: E.line + 1,
|
|
3240
|
-
column: E.column,
|
|
3267
|
+
end: c.index + g.length,
|
|
3241
3268
|
original: g,
|
|
3242
|
-
|
|
3269
|
+
replacement: `v-bind="${h}"`,
|
|
3270
|
+
line: y.line,
|
|
3271
|
+
column: y.column
|
|
3272
|
+
}), e.push({
|
|
3273
|
+
line: y.line + 1,
|
|
3274
|
+
column: y.column,
|
|
3275
|
+
original: m,
|
|
3276
|
+
fixed: h,
|
|
3243
3277
|
message: "修复 v-bind 指令:添加 state. 前缀"
|
|
3244
3278
|
});
|
|
3245
3279
|
}
|
|
3246
3280
|
}
|
|
3247
|
-
const
|
|
3248
|
-
for (; (c =
|
|
3249
|
-
const
|
|
3250
|
-
if (
|
|
3281
|
+
const S = /v-(text|html)="([^"]+)"/g;
|
|
3282
|
+
for (; (c = S.exec(n)) !== null; ) {
|
|
3283
|
+
const g = c[0], m = c[1], h = c[2], y = H(h, a);
|
|
3284
|
+
if (y !== h) {
|
|
3251
3285
|
const w = G(n, c.index);
|
|
3252
3286
|
i.push({
|
|
3253
3287
|
start: c.index,
|
|
3254
|
-
end: c.index +
|
|
3255
|
-
original:
|
|
3256
|
-
replacement: `v-${
|
|
3288
|
+
end: c.index + g.length,
|
|
3289
|
+
original: g,
|
|
3290
|
+
replacement: `v-${m}="${y}"`,
|
|
3257
3291
|
line: w.line,
|
|
3258
3292
|
column: w.column
|
|
3259
3293
|
}), e.push({
|
|
3260
3294
|
line: w.line + 1,
|
|
3261
3295
|
column: w.column,
|
|
3262
|
-
original:
|
|
3263
|
-
fixed:
|
|
3264
|
-
message: `修复 v-${
|
|
3296
|
+
original: h,
|
|
3297
|
+
fixed: y,
|
|
3298
|
+
message: `修复 v-${m} 指令:添加 state. 前缀`
|
|
3265
3299
|
});
|
|
3266
3300
|
}
|
|
3267
3301
|
}
|
|
3268
|
-
const
|
|
3269
|
-
for (; (c =
|
|
3270
|
-
const
|
|
3271
|
-
if (w !==
|
|
3272
|
-
const
|
|
3302
|
+
const I = /(@|v-on:)(\w+)="([^"]+)"/g;
|
|
3303
|
+
for (; (c = I.exec(n)) !== null; ) {
|
|
3304
|
+
const g = c[0], m = c[1], h = c[2], y = c[3], w = c0(y, a);
|
|
3305
|
+
if (w !== y) {
|
|
3306
|
+
const C = G(n, c.index);
|
|
3273
3307
|
i.push({
|
|
3274
3308
|
start: c.index,
|
|
3275
|
-
end: c.index +
|
|
3276
|
-
original:
|
|
3277
|
-
replacement: `${
|
|
3278
|
-
line:
|
|
3279
|
-
column:
|
|
3309
|
+
end: c.index + g.length,
|
|
3310
|
+
original: g,
|
|
3311
|
+
replacement: `${m}${h}="${w}"`,
|
|
3312
|
+
line: C.line,
|
|
3313
|
+
column: C.column
|
|
3280
3314
|
}), e.push({
|
|
3281
|
-
line:
|
|
3282
|
-
column:
|
|
3283
|
-
original:
|
|
3315
|
+
line: C.line + 1,
|
|
3316
|
+
column: C.column,
|
|
3317
|
+
original: y,
|
|
3284
3318
|
fixed: w,
|
|
3285
3319
|
message: "修复事件处理器:添加 state. 前缀"
|
|
3286
3320
|
});
|
|
3287
3321
|
}
|
|
3288
3322
|
}
|
|
3289
|
-
if (i.sort((
|
|
3290
|
-
s = s.substring(0,
|
|
3323
|
+
if (i.sort((g, m) => m.start - g.start), i.forEach((g) => {
|
|
3324
|
+
s = s.substring(0, g.start) + g.replacement + s.substring(g.end);
|
|
3291
3325
|
}), i.length > 0) {
|
|
3292
|
-
const
|
|
3293
|
-
t = u.substring(0,
|
|
3326
|
+
const g = u.indexOf("<template>"), m = u.lastIndexOf("</template>") + 11;
|
|
3327
|
+
t = u.substring(0, g) + `<template>
|
|
3294
3328
|
` + s + `
|
|
3295
|
-
</template>` + u.substring(
|
|
3329
|
+
</template>` + u.substring(m);
|
|
3296
3330
|
}
|
|
3297
3331
|
return {
|
|
3298
3332
|
fixed: i.length > 0,
|
|
@@ -3301,15 +3335,15 @@ function r0(u) {
|
|
|
3301
3335
|
changes: e
|
|
3302
3336
|
};
|
|
3303
3337
|
}
|
|
3304
|
-
function
|
|
3338
|
+
function i0(u) {
|
|
3305
3339
|
const e = /* @__PURE__ */ new Set();
|
|
3306
3340
|
try {
|
|
3307
|
-
const t =
|
|
3308
|
-
|
|
3309
|
-
CallExpression(
|
|
3310
|
-
if (
|
|
3311
|
-
const
|
|
3312
|
-
|
|
3341
|
+
const t = L(u);
|
|
3342
|
+
X(t, {
|
|
3343
|
+
CallExpression(r) {
|
|
3344
|
+
if (r.node.callee.type === "Identifier" && r.node.callee.name === "reactive" && r.node.arguments.length > 0 && r.node.arguments[0].type === "ObjectExpression") {
|
|
3345
|
+
const a = r.parent;
|
|
3346
|
+
a.type === "VariableDeclarator" && a.id.type === "Identifier" && a.id.name === "state" && r.node.arguments[0].properties.forEach((s) => {
|
|
3313
3347
|
s.type === "ObjectProperty" && s.key.type === "Identifier" && e.add(s.key.name);
|
|
3314
3348
|
});
|
|
3315
3349
|
}
|
|
@@ -3322,22 +3356,22 @@ function n0(u) {
|
|
|
3322
3356
|
}
|
|
3323
3357
|
function H(u, e) {
|
|
3324
3358
|
let t = u.trim();
|
|
3325
|
-
return e.forEach((
|
|
3326
|
-
const
|
|
3327
|
-
|
|
3359
|
+
return e.forEach((r) => {
|
|
3360
|
+
const a = new RegExp(`(?<![\\w.])${r}(?![\\w])`, "g");
|
|
3361
|
+
a.test(t) && !t.includes(`state.${r}`) && (t = t.replace(a, `state.${r}`));
|
|
3328
3362
|
}), t;
|
|
3329
3363
|
}
|
|
3330
|
-
function
|
|
3364
|
+
function c0(u, e) {
|
|
3331
3365
|
let t = u.trim();
|
|
3332
|
-
return e.forEach((
|
|
3333
|
-
const
|
|
3334
|
-
`(?<![\\w.])${
|
|
3366
|
+
return e.forEach((r) => {
|
|
3367
|
+
const a = new RegExp(
|
|
3368
|
+
`(?<![\\w.])${r}(\\+\\+|--|\\s*[+\\-*/]=)`,
|
|
3335
3369
|
"g"
|
|
3336
3370
|
), n = new RegExp(
|
|
3337
|
-
`(\\+\\+|--)?(?<![\\w.])${
|
|
3371
|
+
`(\\+\\+|--)?(?<![\\w.])${r}(?![\\w])`,
|
|
3338
3372
|
"g"
|
|
3339
3373
|
);
|
|
3340
|
-
t.includes(`state.${
|
|
3374
|
+
t.includes(`state.${r}`) || (t = t.replace(a, `state.${r}$1`), t = t.replace(n, (s, i) => i ? `${i}state.${r}` : s.includes(r) && !s.includes("state.") ? `state.${r}` : s));
|
|
3341
3375
|
}), H(t, e);
|
|
3342
3376
|
}
|
|
3343
3377
|
function G(u, e) {
|
|
@@ -3348,36 +3382,36 @@ function G(u, e) {
|
|
|
3348
3382
|
column: t[t.length - 1].length
|
|
3349
3383
|
};
|
|
3350
3384
|
}
|
|
3351
|
-
class
|
|
3385
|
+
class o0 {
|
|
3352
3386
|
fixBasedOnValidation(e, t) {
|
|
3353
|
-
let
|
|
3354
|
-
return t.illegalVantIcons.length && (
|
|
3387
|
+
let r = e;
|
|
3388
|
+
return t.illegalVantIcons.length && (r = this.fixVantIcons(r)), t.illegalVtjIcons.length && (r = this.fixVtjIcons(r, t.illegalVtjIcons)), s0(r).fixedCode;
|
|
3355
3389
|
}
|
|
3356
3390
|
fixVantIcons(e) {
|
|
3357
|
-
const t =
|
|
3391
|
+
const t = B(e), r = t.template.replace(
|
|
3358
3392
|
/<(?:VanIcon|van-icon)\s+[^>]*name="([^"]+)"[^>]*>/g,
|
|
3359
|
-
(
|
|
3393
|
+
(a, n) => a.includes(":name=") || a.includes("v-bind:name=") || fu.includes(n) ? a : a.replace(n, a0)
|
|
3360
3394
|
);
|
|
3361
|
-
return this.reconstructSFC(t,
|
|
3395
|
+
return this.reconstructSFC(t, r, t.script);
|
|
3362
3396
|
}
|
|
3363
3397
|
fixVtjIcons(e, t = []) {
|
|
3364
|
-
const
|
|
3365
|
-
let
|
|
3366
|
-
|
|
3398
|
+
const r = B(e);
|
|
3399
|
+
let a = !1;
|
|
3400
|
+
r.script = ze(r.script, {
|
|
3367
3401
|
ImportDeclaration(i) {
|
|
3368
3402
|
if (i.node.source.value === "@vtj/icons") {
|
|
3369
3403
|
const o = i.node.specifiers, c = [];
|
|
3370
3404
|
let d = !1;
|
|
3371
3405
|
for (const l of o) {
|
|
3372
|
-
const
|
|
3373
|
-
|
|
3406
|
+
const b = l.imported?.name;
|
|
3407
|
+
b === O && (d = !0, a = !0), t.includes(b) || c.push(
|
|
3374
3408
|
q.importSpecifier(l.local, l.imported)
|
|
3375
3409
|
);
|
|
3376
3410
|
}
|
|
3377
|
-
!d && !
|
|
3411
|
+
!d && !a && (a = !0, c.push(
|
|
3378
3412
|
q.importSpecifier(
|
|
3379
|
-
q.identifier(
|
|
3380
|
-
q.identifier(
|
|
3413
|
+
q.identifier(O),
|
|
3414
|
+
q.identifier(O)
|
|
3381
3415
|
)
|
|
3382
3416
|
)), i.node.specifiers = c;
|
|
3383
3417
|
}
|
|
@@ -3392,8 +3426,8 @@ class i0 {
|
|
|
3392
3426
|
(l) => !t.includes(l.key.name)
|
|
3393
3427
|
), c.argument.properties.push(
|
|
3394
3428
|
q.objectProperty(
|
|
3395
|
-
q.identifier(
|
|
3396
|
-
q.identifier(
|
|
3429
|
+
q.identifier(O),
|
|
3430
|
+
q.identifier(O),
|
|
3397
3431
|
!1,
|
|
3398
3432
|
!0
|
|
3399
3433
|
)
|
|
@@ -3402,151 +3436,151 @@ class i0 {
|
|
|
3402
3436
|
}
|
|
3403
3437
|
},
|
|
3404
3438
|
ObjectProperty(i) {
|
|
3405
|
-
if (q.isIdentifier(i.node.value) && t.includes(i.node.value.name) && (i.node.value = q.identifier(
|
|
3439
|
+
if (q.isIdentifier(i.node.value) && t.includes(i.node.value.name) && (i.node.value = q.identifier(O)), q.isArrayExpression(i.node.value)) {
|
|
3406
3440
|
const o = i.node.value.elements;
|
|
3407
|
-
i.node.value.elements = o.map((c) => q.isIdentifier(c) && t.includes(c.name) ? q.identifier(
|
|
3441
|
+
i.node.value.elements = o.map((c) => q.isIdentifier(c) && t.includes(c.name) ? q.identifier(O) : c);
|
|
3408
3442
|
}
|
|
3409
3443
|
},
|
|
3410
3444
|
AssignmentExpression(i) {
|
|
3411
|
-
q.isIdentifier(i.node.right) && t.includes(i.node.right.name) && (i.node.right = q.identifier(
|
|
3445
|
+
q.isIdentifier(i.node.right) && t.includes(i.node.right.name) && (i.node.right = q.identifier(O));
|
|
3412
3446
|
}
|
|
3413
3447
|
});
|
|
3414
|
-
const n = /:icon\s*=\s*["']([^"']+)["']/g, s =
|
|
3448
|
+
const n = /:icon\s*=\s*["']([^"']+)["']/g, s = r.template.match(n);
|
|
3415
3449
|
if (s)
|
|
3416
3450
|
for (const i of s) {
|
|
3417
3451
|
let o = i;
|
|
3418
3452
|
for (const c of t)
|
|
3419
|
-
o = o.replace(new RegExp(c, "g"),
|
|
3420
|
-
|
|
3453
|
+
o = o.replace(new RegExp(c, "g"), O);
|
|
3454
|
+
r.template = r.template.replace(i, o);
|
|
3421
3455
|
}
|
|
3422
3456
|
for (const i of t)
|
|
3423
|
-
|
|
3457
|
+
r.template = r.template.replace(
|
|
3424
3458
|
new RegExp(`:icon="${i}"`, "g"),
|
|
3425
|
-
`:icon="${
|
|
3459
|
+
`:icon="${O}"`
|
|
3426
3460
|
);
|
|
3427
|
-
return this.reconstructSFC(
|
|
3461
|
+
return this.reconstructSFC(r, r.template, r.script);
|
|
3428
3462
|
}
|
|
3429
|
-
reconstructSFC(e, t,
|
|
3430
|
-
let
|
|
3431
|
-
if (t && e.template && (
|
|
3463
|
+
reconstructSFC(e, t, r) {
|
|
3464
|
+
let a = "";
|
|
3465
|
+
if (t && e.template && (a += `<template>
|
|
3432
3466
|
${t}
|
|
3433
3467
|
</template>
|
|
3434
3468
|
|
|
3435
|
-
`),
|
|
3469
|
+
`), r && e.script) {
|
|
3436
3470
|
const n = e.isScriptSetup ? " setup" : "";
|
|
3437
|
-
|
|
3438
|
-
${
|
|
3471
|
+
a += `<script${n}>
|
|
3472
|
+
${r}
|
|
3439
3473
|
<\/script>
|
|
3440
3474
|
|
|
3441
3475
|
`;
|
|
3442
3476
|
}
|
|
3443
3477
|
return e.styles.forEach((n) => {
|
|
3444
|
-
|
|
3445
|
-
`,
|
|
3446
|
-
`,
|
|
3478
|
+
a += `<style lang="scss" scoped>
|
|
3479
|
+
`, a += `${n}
|
|
3480
|
+
`, a += `</style>
|
|
3447
3481
|
|
|
3448
3482
|
`;
|
|
3449
|
-
}),
|
|
3483
|
+
}), a;
|
|
3450
3484
|
}
|
|
3451
3485
|
}
|
|
3452
|
-
function
|
|
3486
|
+
function d0(u) {
|
|
3453
3487
|
const e = [];
|
|
3454
3488
|
for (const t of u.replace(/\\/g, "/").split("/"))
|
|
3455
3489
|
!t || t === "." || (t === ".." ? e.pop() : e.push(t));
|
|
3456
3490
|
return e.join("/");
|
|
3457
3491
|
}
|
|
3458
|
-
function
|
|
3492
|
+
function l0(u) {
|
|
3459
3493
|
return u.split("/").slice(0, -1).join("/");
|
|
3460
3494
|
}
|
|
3461
|
-
function
|
|
3495
|
+
function f0(u, e) {
|
|
3462
3496
|
const t = u.split(/[?#]/)[0].replace(/\\/g, "/");
|
|
3463
|
-
let
|
|
3464
|
-
return t.startsWith("@/") ?
|
|
3497
|
+
let r = t;
|
|
3498
|
+
return t.startsWith("@/") ? r = `src/${t.slice(2)}` : t.startsWith(".") && e && (r = `${l0(e)}/${t}`), r = d0(r).replace(/^\//, ""), r.endsWith(".vue") ? r : `${r}.vue`;
|
|
3465
3499
|
}
|
|
3466
|
-
function
|
|
3467
|
-
const
|
|
3500
|
+
function pu(u, e, t) {
|
|
3501
|
+
const r = Iu(e), a = r.byId.get(t), n = a ? wu(a, e.platform) : void 0, s = f0(
|
|
3468
3502
|
u,
|
|
3469
3503
|
n
|
|
3470
|
-
).toLowerCase(), i =
|
|
3504
|
+
).toLowerCase(), i = r.blockIdBySourcePath.get(s);
|
|
3471
3505
|
if (i) return i;
|
|
3472
3506
|
const o = u.split(/[?#]/)[0].replace(/\\/g, "/").split("/").pop()?.replace(/\.vue$/i, "");
|
|
3473
3507
|
return o && e.blocks?.some((c) => c.id === o) ? o : void 0;
|
|
3474
3508
|
}
|
|
3475
|
-
async function
|
|
3476
|
-
const { id: e, name: t, source:
|
|
3509
|
+
async function T0(u) {
|
|
3510
|
+
const { id: e, name: t, source: r, project: a } = u, n = Cu(r, t);
|
|
3477
3511
|
if (n)
|
|
3478
3512
|
return Promise.reject(n);
|
|
3479
|
-
const { dependencies: s = [], platform: i = "web" } =
|
|
3513
|
+
const { dependencies: s = [], platform: i = "web" } = a || {}, o = new n0(), c = new o0(), d = o.validate(r);
|
|
3480
3514
|
let l = [];
|
|
3481
3515
|
if (!d.valid)
|
|
3482
3516
|
return l = d.errors, Promise.reject(l);
|
|
3483
|
-
const
|
|
3484
|
-
|
|
3517
|
+
const b = c.fixBasedOnValidation(r, d), p = B(b);
|
|
3518
|
+
p.script = Ru(p.script);
|
|
3485
3519
|
const {
|
|
3486
|
-
styles:
|
|
3487
|
-
css:
|
|
3488
|
-
errors:
|
|
3489
|
-
} =
|
|
3520
|
+
styles: x,
|
|
3521
|
+
css: S,
|
|
3522
|
+
errors: I
|
|
3523
|
+
} = Zt(p.styles.join(`
|
|
3490
3524
|
`));
|
|
3491
|
-
return l.push(...
|
|
3525
|
+
return l.push(...I), l.length ? Promise.reject(l) : p.isScriptSetup ? b0(p, {
|
|
3492
3526
|
id: e,
|
|
3493
3527
|
name: t,
|
|
3494
|
-
project:
|
|
3528
|
+
project: a,
|
|
3495
3529
|
platform: i,
|
|
3496
3530
|
dependencies: s,
|
|
3497
|
-
styles:
|
|
3498
|
-
css:
|
|
3499
|
-
}) :
|
|
3531
|
+
styles: x,
|
|
3532
|
+
css: S
|
|
3533
|
+
}) : p0(p, {
|
|
3500
3534
|
id: e,
|
|
3501
3535
|
name: t,
|
|
3502
|
-
project:
|
|
3536
|
+
project: a,
|
|
3503
3537
|
platform: i,
|
|
3504
3538
|
dependencies: s,
|
|
3505
|
-
styles:
|
|
3506
|
-
css:
|
|
3539
|
+
styles: x,
|
|
3540
|
+
css: S
|
|
3507
3541
|
});
|
|
3508
3542
|
}
|
|
3509
|
-
async function
|
|
3510
|
-
const { id: t, name:
|
|
3543
|
+
async function p0(u, e) {
|
|
3544
|
+
const { id: t, name: r, project: a, platform: n, dependencies: s, styles: i, css: o } = e, {
|
|
3511
3545
|
state: c,
|
|
3512
3546
|
watch: d,
|
|
3513
3547
|
lifeCycles: l,
|
|
3514
|
-
computed:
|
|
3515
|
-
methods:
|
|
3516
|
-
props:
|
|
3517
|
-
emits:
|
|
3518
|
-
expose:
|
|
3519
|
-
inject:
|
|
3520
|
-
handlers:
|
|
3521
|
-
imports:
|
|
3522
|
-
dataSources:
|
|
3548
|
+
computed: b,
|
|
3549
|
+
methods: p,
|
|
3550
|
+
props: x,
|
|
3551
|
+
emits: S,
|
|
3552
|
+
expose: I,
|
|
3553
|
+
inject: g,
|
|
3554
|
+
handlers: m,
|
|
3555
|
+
imports: h,
|
|
3556
|
+
dataSources: y,
|
|
3523
3557
|
directives: w
|
|
3524
|
-
} =
|
|
3558
|
+
} = dt(u.script, a), { nodes: C, slots: _, context: J } = ou(t, r, u.template, {
|
|
3525
3559
|
platform: n,
|
|
3526
|
-
handlers:
|
|
3560
|
+
handlers: m,
|
|
3527
3561
|
styles: i,
|
|
3528
|
-
imports:
|
|
3562
|
+
imports: h,
|
|
3529
3563
|
directives: w,
|
|
3530
|
-
resolveSchemaImport: (
|
|
3564
|
+
resolveSchemaImport: (P) => pu(P, a, t)
|
|
3531
3565
|
}), Se = {
|
|
3532
3566
|
id: t,
|
|
3533
|
-
name:
|
|
3534
|
-
inject:
|
|
3535
|
-
props:
|
|
3567
|
+
name: r,
|
|
3568
|
+
inject: g,
|
|
3569
|
+
props: x,
|
|
3536
3570
|
state: c,
|
|
3537
3571
|
watch: d,
|
|
3538
3572
|
lifeCycles: l,
|
|
3539
|
-
computed:
|
|
3540
|
-
methods:
|
|
3541
|
-
dataSources:
|
|
3542
|
-
slots:
|
|
3543
|
-
emits:
|
|
3544
|
-
expose:
|
|
3545
|
-
nodes:
|
|
3573
|
+
computed: b,
|
|
3574
|
+
methods: p,
|
|
3575
|
+
dataSources: y,
|
|
3576
|
+
slots: _,
|
|
3577
|
+
emits: S,
|
|
3578
|
+
expose: I,
|
|
3579
|
+
nodes: C,
|
|
3546
3580
|
css: o
|
|
3547
|
-
},
|
|
3548
|
-
(
|
|
3549
|
-
),
|
|
3581
|
+
}, xu = Object.keys(b || {}), gu = (x || []).map(
|
|
3582
|
+
(P) => typeof P == "string" ? P : P.name
|
|
3583
|
+
), yu = [
|
|
3550
3584
|
"$el",
|
|
3551
3585
|
"$emit",
|
|
3552
3586
|
"$nextTick",
|
|
@@ -3562,42 +3596,43 @@ async function l0(u, e) {
|
|
|
3562
3596
|
"state",
|
|
3563
3597
|
"$props",
|
|
3564
3598
|
"props",
|
|
3565
|
-
...Object.keys(
|
|
3566
|
-
], { libs:
|
|
3599
|
+
...Object.keys(p || {})
|
|
3600
|
+
], { libs: Su } = hu(h, s), ve = {
|
|
3567
3601
|
platform: n,
|
|
3568
|
-
context:
|
|
3569
|
-
computed:
|
|
3570
|
-
libs:
|
|
3571
|
-
members:
|
|
3572
|
-
props:
|
|
3602
|
+
context: J,
|
|
3603
|
+
computed: xu,
|
|
3604
|
+
libs: Su,
|
|
3605
|
+
members: yu,
|
|
3606
|
+
props: gu
|
|
3573
3607
|
};
|
|
3574
3608
|
return await bu(
|
|
3575
3609
|
Se,
|
|
3576
|
-
async (
|
|
3577
|
-
await
|
|
3578
|
-
if (
|
|
3579
|
-
const
|
|
3580
|
-
|
|
3610
|
+
async (P) => {
|
|
3611
|
+
await mu(P, async (Y) => {
|
|
3612
|
+
if (de(Y)) {
|
|
3613
|
+
const vu = await ne(Y.value);
|
|
3614
|
+
Y.value = ke(vu, P.id, ve);
|
|
3581
3615
|
}
|
|
3582
3616
|
});
|
|
3583
3617
|
},
|
|
3584
|
-
async (
|
|
3585
|
-
const
|
|
3586
|
-
|
|
3618
|
+
async (P) => {
|
|
3619
|
+
const Y = await ne(P.value);
|
|
3620
|
+
P.value = ke(Y, "", ve);
|
|
3587
3621
|
}
|
|
3588
3622
|
), new Je(Se).toDsl();
|
|
3589
3623
|
}
|
|
3590
|
-
async function
|
|
3591
|
-
const { id: t, name:
|
|
3624
|
+
async function b0(u, e) {
|
|
3625
|
+
const { id: t, name: r, project: a, platform: n, styles: s, css: i, dependencies: o } = e, c = Mt(u.script, a), { nodes: d, slots: l, context: b } = ou(t, r, u.template, {
|
|
3592
3626
|
platform: n,
|
|
3593
3627
|
handlers: c.handlers,
|
|
3594
3628
|
styles: s,
|
|
3595
3629
|
imports: c.imports,
|
|
3596
3630
|
directives: c.directives,
|
|
3597
|
-
|
|
3598
|
-
|
|
3631
|
+
componentDefines: c.componentDefines,
|
|
3632
|
+
resolveSchemaImport: (m) => pu(m, a, t)
|
|
3633
|
+
}), p = {
|
|
3599
3634
|
id: t,
|
|
3600
|
-
name:
|
|
3635
|
+
name: r,
|
|
3601
3636
|
apiMode: "composition",
|
|
3602
3637
|
inject: c.inject,
|
|
3603
3638
|
props: c.props,
|
|
@@ -3617,57 +3652,57 @@ async function f0(u, e) {
|
|
|
3617
3652
|
expose: c.expose,
|
|
3618
3653
|
nodes: d,
|
|
3619
3654
|
css: i
|
|
3620
|
-
}, { libs:
|
|
3621
|
-
refs: Array.from(
|
|
3622
|
-
reactives: Array.from(
|
|
3623
|
-
hasState:
|
|
3624
|
-
computed: Array.from(
|
|
3625
|
-
methods: Array.from(
|
|
3626
|
-
props: Array.from(
|
|
3627
|
-
composables: Array.from(
|
|
3628
|
-
injects: Array.from(
|
|
3629
|
-
dataSources: Array.from(
|
|
3630
|
-
globalApiVars:
|
|
3631
|
-
reverseMemberApiMap:
|
|
3632
|
-
libs:
|
|
3655
|
+
}, { libs: x } = hu(c.imports, o), S = t0(c), I = {
|
|
3656
|
+
refs: Array.from(S.refs),
|
|
3657
|
+
reactives: Array.from(S.reactives),
|
|
3658
|
+
hasState: S.hasState,
|
|
3659
|
+
computed: Array.from(S.computed),
|
|
3660
|
+
methods: Array.from(S.methods),
|
|
3661
|
+
props: Array.from(S.props),
|
|
3662
|
+
composables: Array.from(S.composables),
|
|
3663
|
+
injects: Array.from(S.injects),
|
|
3664
|
+
dataSources: Array.from(S.dataSources),
|
|
3665
|
+
globalApiVars: S.reverseApiMap,
|
|
3666
|
+
reverseMemberApiMap: S.reverseMemberApiMap,
|
|
3667
|
+
libs: x
|
|
3633
3668
|
};
|
|
3634
3669
|
return await bu(
|
|
3635
|
-
|
|
3636
|
-
async (
|
|
3637
|
-
await
|
|
3638
|
-
if (
|
|
3639
|
-
const
|
|
3640
|
-
let w = Ge(
|
|
3641
|
-
const
|
|
3642
|
-
|
|
3670
|
+
p,
|
|
3671
|
+
async (m) => {
|
|
3672
|
+
await mu(m, async (h) => {
|
|
3673
|
+
if (de(h)) {
|
|
3674
|
+
const y = await ne(h.value);
|
|
3675
|
+
let w = Ge(y, I);
|
|
3676
|
+
const C = Array.from(
|
|
3677
|
+
b[m.id] || /* @__PURE__ */ new Set()
|
|
3643
3678
|
);
|
|
3644
|
-
for (const
|
|
3645
|
-
w =
|
|
3646
|
-
|
|
3679
|
+
for (const _ of C)
|
|
3680
|
+
w = D(w, _, `this.context.${_}`);
|
|
3681
|
+
h.value = w;
|
|
3647
3682
|
}
|
|
3648
3683
|
});
|
|
3649
3684
|
},
|
|
3650
|
-
async (
|
|
3651
|
-
const
|
|
3652
|
-
|
|
3685
|
+
async (m) => {
|
|
3686
|
+
const h = await ne(m.value);
|
|
3687
|
+
m.value = Ge(h, I);
|
|
3653
3688
|
}
|
|
3654
|
-
), new Je(
|
|
3689
|
+
), new Je(p).toDsl();
|
|
3655
3690
|
}
|
|
3656
3691
|
async function bu(u, e, t) {
|
|
3657
|
-
const
|
|
3658
|
-
if (await e(
|
|
3659
|
-
for (const
|
|
3660
|
-
await
|
|
3661
|
-
},
|
|
3662
|
-
if (!
|
|
3663
|
-
if (Array.isArray(
|
|
3664
|
-
for (let
|
|
3665
|
-
await
|
|
3692
|
+
const r = async (g, m) => {
|
|
3693
|
+
if (await e(g, m), Array.isArray(g?.children))
|
|
3694
|
+
for (const h of g?.children || [])
|
|
3695
|
+
await r(h, g);
|
|
3696
|
+
}, a = async (g) => {
|
|
3697
|
+
if (!g || typeof g != "object") return;
|
|
3698
|
+
if (Array.isArray(g)) {
|
|
3699
|
+
for (let h of g)
|
|
3700
|
+
await a(h);
|
|
3666
3701
|
return;
|
|
3667
3702
|
}
|
|
3668
|
-
const
|
|
3669
|
-
for (const
|
|
3670
|
-
|
|
3703
|
+
const m = Object.values(g);
|
|
3704
|
+
for (const h of m)
|
|
3705
|
+
de(h) ? await t(h) : await a(h);
|
|
3671
3706
|
}, {
|
|
3672
3707
|
state: n,
|
|
3673
3708
|
watch: s,
|
|
@@ -3676,13 +3711,13 @@ async function bu(u, e, t) {
|
|
|
3676
3711
|
dataSources: c,
|
|
3677
3712
|
methods: d,
|
|
3678
3713
|
lifeCycles: l,
|
|
3679
|
-
inject:
|
|
3680
|
-
setup:
|
|
3681
|
-
provide:
|
|
3682
|
-
refs:
|
|
3683
|
-
reactives:
|
|
3714
|
+
inject: b,
|
|
3715
|
+
setup: p,
|
|
3716
|
+
provide: x,
|
|
3717
|
+
refs: S,
|
|
3718
|
+
reactives: I
|
|
3684
3719
|
} = u;
|
|
3685
|
-
if (await
|
|
3720
|
+
if (await a({
|
|
3686
3721
|
state: n,
|
|
3687
3722
|
watch: s,
|
|
3688
3723
|
computed: i,
|
|
@@ -3690,46 +3725,46 @@ async function bu(u, e, t) {
|
|
|
3690
3725
|
dataSources: c,
|
|
3691
3726
|
methods: d,
|
|
3692
3727
|
lifeCycles: l,
|
|
3693
|
-
inject:
|
|
3694
|
-
setup:
|
|
3695
|
-
provide:
|
|
3696
|
-
refs:
|
|
3697
|
-
reactives:
|
|
3728
|
+
inject: b,
|
|
3729
|
+
setup: p,
|
|
3730
|
+
provide: x,
|
|
3731
|
+
refs: S,
|
|
3732
|
+
reactives: I
|
|
3698
3733
|
}), Array.isArray(u.nodes))
|
|
3699
|
-
for (const
|
|
3700
|
-
await
|
|
3701
|
-
}
|
|
3702
|
-
async function
|
|
3703
|
-
const t = async (
|
|
3704
|
-
if (!
|
|
3705
|
-
if (Array.isArray(
|
|
3706
|
-
for (let n of
|
|
3734
|
+
for (const g of u.nodes)
|
|
3735
|
+
await r(g);
|
|
3736
|
+
}
|
|
3737
|
+
async function mu(u, e) {
|
|
3738
|
+
const t = async (r) => {
|
|
3739
|
+
if (!r || typeof r != "object") return;
|
|
3740
|
+
if (Array.isArray(r)) {
|
|
3741
|
+
for (let n of r)
|
|
3707
3742
|
await e(n), await t(n);
|
|
3708
3743
|
return;
|
|
3709
3744
|
}
|
|
3710
|
-
if (
|
|
3711
|
-
await e(
|
|
3745
|
+
if (de(r)) {
|
|
3746
|
+
await e(r);
|
|
3712
3747
|
return;
|
|
3713
3748
|
}
|
|
3714
|
-
const
|
|
3715
|
-
for (const n of
|
|
3749
|
+
const a = Object.values(r);
|
|
3750
|
+
for (const n of a)
|
|
3716
3751
|
await e(n), await t(n);
|
|
3717
3752
|
};
|
|
3718
3753
|
await t(u);
|
|
3719
3754
|
}
|
|
3720
|
-
function
|
|
3721
|
-
const t = {},
|
|
3722
|
-
(
|
|
3755
|
+
function hu(u = [], e = []) {
|
|
3756
|
+
const t = {}, r = e.reduce(
|
|
3757
|
+
(a, n) => (a[n.package] = n.library, a),
|
|
3723
3758
|
{}
|
|
3724
3759
|
);
|
|
3725
|
-
for (const { from:
|
|
3760
|
+
for (const { from: a, imports: n } of u)
|
|
3726
3761
|
if (Array.isArray(n))
|
|
3727
3762
|
n.forEach((s) => {
|
|
3728
|
-
const i = a
|
|
3763
|
+
const i = r[a];
|
|
3729
3764
|
i && (t[s] = i);
|
|
3730
3765
|
});
|
|
3731
3766
|
else {
|
|
3732
|
-
const s = a
|
|
3767
|
+
const s = r[a];
|
|
3733
3768
|
s && (t[n] = s);
|
|
3734
3769
|
}
|
|
3735
3770
|
return {
|
|
@@ -3737,12 +3772,12 @@ function mu(u = [], e = []) {
|
|
|
3737
3772
|
};
|
|
3738
3773
|
}
|
|
3739
3774
|
export {
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3775
|
+
o0 as AutoFixer,
|
|
3776
|
+
n0 as ComponentValidator,
|
|
3777
|
+
A0 as VTJ_PARSER_VERSION,
|
|
3743
3778
|
Re as htmlToNodes,
|
|
3744
|
-
|
|
3745
|
-
|
|
3779
|
+
k0 as parseUniApp,
|
|
3780
|
+
T0 as parseVue,
|
|
3746
3781
|
ke as patchCode,
|
|
3747
|
-
|
|
3782
|
+
D as replacer
|
|
3748
3783
|
};
|